From 0ccd4e1884b218e1d524ae4c09e463c1990fa7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:08 -0400 Subject: [PATCH 001/924] New translations global.json (Dutch) --- website/pages/nl/global.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/nl/global.json b/website/pages/nl/global.json index 6a3eb234bfce..199a069285a4 100644 --- a/website/pages/nl/global.json +++ b/website/pages/nl/global.json @@ -1,14 +1,14 @@ { - "collapse": "Collapse", - "expand": "Expand", - "previous": "Previous", - "next": "Next", - "editPage": "Edit page", - "pageSections": "Page Sections", - "linkToThisSection": "Link to this section", - "technicalLevelRequired": "Technical Level Required", - "notFoundTitle": "Oops! This page was lost in space...", - "notFoundSubtitle": "Check if you’re using the right address or explore our website by clicking on the link below.", - "goHome": "Go Home", + "collapse": "Inklappen", + "expand": "Uitvouwen", + "previous": "Vorige", + "next": "Volgende", + "editPage": "Pagina bewerken", + "pageSections": "Pagina Selecties", + "linkToThisSection": "Link naar deze selectie", + "technicalLevelRequired": "Technisch Niveau Vereist", + "notFoundTitle": "Oeps! Deze pagina is in de ruimte verloren gegaan...", + "notFoundSubtitle": "Controleer of je het juiste adres gebruikt of navigeer onze website door op de link hieronder te clicken.", + "goHome": "Naar De Home Pagina Gaan", "video": "Video" } From d9e4964345d5bb4dbe1ac3e3848af8ffb1bd69eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:18 -0400 Subject: [PATCH 002/924] New translations index.json (Czech) --- website/pages/cs/index.json | 62 ++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/cs/index.json b/website/pages/cs/index.json index ddbbb68445fe..2aadf3cd8b80 100644 --- a/website/pages/cs/index.json +++ b/website/pages/cs/index.json @@ -1,74 +1,74 @@ { - "title": "Get Started", - "intro": "Learn about The Graph, a decentralized protocol for indexing and querying data from blockchains.", + "title": "Začněte", + "intro": "Seznamte se s Grafu, decentralizovaným protokolem pro indexování a dotazování dat z blockchainů.", "shortcuts": { "aboutTheGraph": { - "title": "About The Graph", - "description": "Learn more about The Graph" + "title": "O grafu", + "description": "Další informace o Grafu" }, "quickStart": { - "title": "Quick Start", - "description": "Jump in and start with The Graph" + "title": "Rychlé spuštění", + "description": "Přejděte ke Grafu a začněte s ním" }, "developerFaqs": { - "title": "Developer FAQs", - "description": "Frequently asked questions" + "title": "FAQs vývojářů", + "description": "Často kladené otázky" }, "queryFromAnApplication": { - "title": "Query from an Application", - "description": "Learn to query from an application" + "title": "Dotaz z aplikace", + "description": "Naučte se zadávat dotazy z aplikace" }, "createASubgraph": { - "title": "Create a Subgraph", - "description": "Use Studio to create subgraphs" + "title": "Vytvoření podgrafu", + "description": "Vytváření podgrafů pomocí Studio" }, "migrateFromHostedService": { - "title": "Upgrade from the hosted service", - "description": "Upgrading subgraphs to The Graph Network" + "title": "Upgrade z hostované služby", + "description": "Aktualizace podgrafů do sítě grafů" } }, "networkRoles": { - "title": "Network Roles", - "description": "Learn about The Graph’s network roles.", + "title": "Síťové role", + "description": "Zjistěte více o rolích v síti Graf.", "roles": { "developer": { - "title": "Developer", - "description": "Create a subgraph or use existing subgraphs in a dapp" + "title": "Vývojář", + "description": "Vytvoření podgrafu nebo použití existujících podgrafů v dapp" }, "indexer": { "title": "Indexer", - "description": "Operate a node to index data and serve queries" + "description": "Provozování uzlu pro indexování dat a obsluhu dotazů" }, "curator": { - "title": "Curator", - "description": "Organize data by signaling on subgraphs" + "title": "Kurátor", + "description": "Organizace dat pomocí signalizace na podgraf" }, "delegator": { - "title": "Delegator", - "description": "Secure the network by delegating GRT to Indexers" + "title": "Delegát", + "description": "Zabezpečení sítě delegováním GRT na indexátory" } } }, - "readMore": "Read more", + "readMore": "Přečtěte si více", "products": { - "title": "Products", + "title": "Produkty", "products": { "subgraphStudio": { - "title": "Subgraph Studio", - "description": "Create, manage and publish subgraphs and API keys" + "title": "Podgraf Studio", + "description": "Vytváření, správa a publikování podgrafů a klíčů API" }, "graphExplorer": { - "title": "Graph Explorer", - "description": "Explore subgraphs and interact with the protocol" + "title": "Průzkumník grafů", + "description": "Prozkoumání podgrafů a interakce s protokolem" }, "hostedService": { - "title": "Hosted Service", + "title": "Hostovaná služba", "description": "Create and explore subgraphs on the hosted service" } } }, "supportedNetworks": { - "title": "Supported Networks", + "title": "Podporované sítě", "description": "The Graph supports the following networks on The Graph Network and the hosted service.", "graphNetworkAndHostedService": "The Graph Network & hosted service", "hostedService": "hosted service" From 55d0b96e6a68fcae81405225ec17ccc6e97e9d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:20 -0400 Subject: [PATCH 003/924] New translations index.json (Japanese) --- website/pages/ja/index.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/ja/index.json b/website/pages/ja/index.json index 962b9ba681ec..6a8e3e36955a 100644 --- a/website/pages/ja/index.json +++ b/website/pages/ja/index.json @@ -23,8 +23,8 @@ "description": "スタジオを使ってサブグラフを作成" }, "migrateFromHostedService": { - "title": "Upgrade from the hosted service", - "description": "Upgrading subgraphs to The Graph Network" + "title": "ホスティングサービスからのアップグレード", + "description": "The Graph Networkへのサブグラフのアップグレード" } }, "networkRoles": { @@ -63,14 +63,14 @@ }, "hostedService": { "title": "ホステッド サービス", - "description": "Create and explore subgraphs on the hosted service" + "description": "ホスティングサービスでのサブグラフの作成と探索" } } }, "supportedNetworks": { "title": "サポートされているネットワーク", - "description": "The Graph supports the following networks on The Graph Network and the hosted service.", - "graphNetworkAndHostedService": "The Graph Network & hosted service", - "hostedService": "hosted service" + "description": "The Graphでは、The Graph Networkおよびホスティングサービスにおいて、以下のネットワークをサポートしています。", + "graphNetworkAndHostedService": "The Graph Network & ホスティングサービス", + "hostedService": "ホスティングサービス" } } From 4059581f0c2cb7e42041aa56765bf174d957b3cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:21 -0400 Subject: [PATCH 004/924] New translations index.json (Dutch) --- website/pages/nl/index.json | 52 ++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/website/pages/nl/index.json b/website/pages/nl/index.json index ddbbb68445fe..fc3391f05efa 100644 --- a/website/pages/nl/index.json +++ b/website/pages/nl/index.json @@ -1,26 +1,26 @@ { - "title": "Get Started", - "intro": "Learn about The Graph, a decentralized protocol for indexing and querying data from blockchains.", + "title": "Begin", + "intro": "Leer over The Graph, een gedecentraliseerd protocol voor het indexen en opvragen van data op blockchains.", "shortcuts": { "aboutTheGraph": { - "title": "About The Graph", - "description": "Learn more about The Graph" + "title": "Over The Graph", + "description": "Leer meer over The Graph" }, "quickStart": { - "title": "Quick Start", - "description": "Jump in and start with The Graph" + "title": "Snelle Start", + "description": "Spring erin en begin met The Graph" }, "developerFaqs": { - "title": "Developer FAQs", - "description": "Frequently asked questions" + "title": "Ontwikkelaar FAQs", + "description": "Veel gestelde vragen" }, "queryFromAnApplication": { - "title": "Query from an Application", - "description": "Learn to query from an application" + "title": "Vraag van een Applicatie", + "description": "Leer te vragen van een applicatie" }, "createASubgraph": { - "title": "Create a Subgraph", - "description": "Use Studio to create subgraphs" + "title": "Creëer een Subgraph", + "description": "Gebruik Studio om een subgraph te bouwen" }, "migrateFromHostedService": { "title": "Upgrade from the hosted service", @@ -28,47 +28,47 @@ } }, "networkRoles": { - "title": "Network Roles", - "description": "Learn about The Graph’s network roles.", + "title": "Netwerk Rollen", + "description": "Leer over The Graph's netwerk rollen.", "roles": { "developer": { - "title": "Developer", - "description": "Create a subgraph or use existing subgraphs in a dapp" + "title": "Ontwikkelaar", + "description": "Creëer een subgraph of gebruik bestaande subgraphs in een dapp" }, "indexer": { "title": "Indexer", - "description": "Operate a node to index data and serve queries" + "description": "Opereer een knooppunt om data te indexeren en aanvragen te dienen" }, "curator": { "title": "Curator", - "description": "Organize data by signaling on subgraphs" + "description": "Organiseer gegevens door het signaleren op subgraphs" }, "delegator": { "title": "Delegator", - "description": "Secure the network by delegating GRT to Indexers" + "description": "Beveilig het netwerk door het delegeren van GRT naar Indexers" } } }, - "readMore": "Read more", + "readMore": "Lees meer", "products": { - "title": "Products", + "title": "Producten", "products": { "subgraphStudio": { "title": "Subgraph Studio", - "description": "Create, manage and publish subgraphs and API keys" + "description": "Creëer, beheer en publiceer subgraphs en API-sleutels" }, "graphExplorer": { - "title": "Graph Explorer", - "description": "Explore subgraphs and interact with the protocol" + "title": "Graph Verkenner", + "description": "Verken subgraphs en interacteer met het protocol" }, "hostedService": { - "title": "Hosted Service", + "title": "Gehoste Dienst", "description": "Create and explore subgraphs on the hosted service" } } }, "supportedNetworks": { - "title": "Supported Networks", + "title": "Ondersteunde Netwerken", "description": "The Graph supports the following networks on The Graph Network and the hosted service.", "graphNetworkAndHostedService": "The Graph Network & hosted service", "hostedService": "hosted service" From 51c33ab7cee50c69b6ce6594a70c536acbeeafff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:23 -0400 Subject: [PATCH 005/924] New translations index.json (Portuguese) --- website/pages/pt/index.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/pt/index.json b/website/pages/pt/index.json index 23fd790fa2be..c025df027868 100644 --- a/website/pages/pt/index.json +++ b/website/pages/pt/index.json @@ -23,8 +23,8 @@ "description": "Use o Studio para criar subgraphs" }, "migrateFromHostedService": { - "title": "Upgrade from the hosted service", - "description": "Upgrading subgraphs to The Graph Network" + "title": "Migração do serviço hospedado", + "description": "Atualização de subgraphs à Graph Network" } }, "networkRoles": { @@ -63,14 +63,14 @@ }, "hostedService": { "title": "Serviço Hospedado", - "description": "Create and explore subgraphs on the hosted service" + "description": "Crie e explore subgraphs no serviço hospedado" } } }, "supportedNetworks": { "title": "Redes Apoiadas", - "description": "The Graph supports the following networks on The Graph Network and the hosted service.", - "graphNetworkAndHostedService": "The Graph Network & hosted service", - "hostedService": "hosted service" + "description": "O The Graph apoia as seguintes redes na Graph Network e no serviço hospedado.", + "graphNetworkAndHostedService": "The Graph Network & serviço hospedado", + "hostedService": "serviço hospedado" } } From 7929ff15aad571b45926c663d0c94111baff77ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:25 -0400 Subject: [PATCH 006/924] New translations index.json (Turkish) --- website/pages/tr/index.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/tr/index.json b/website/pages/tr/index.json index b2562b57d6d1..4690e573ed52 100644 --- a/website/pages/tr/index.json +++ b/website/pages/tr/index.json @@ -23,8 +23,8 @@ "description": "Subgraph'ler oluşturmak için Studio'yu kullanın" }, "migrateFromHostedService": { - "title": "Upgrade from the hosted service", - "description": "Upgrading subgraphs to The Graph Network" + "title": "Barındırılan hizmetten yükseltme", + "description": "Subgraph'leri Graph Network'e yükseltme" } }, "networkRoles": { @@ -63,14 +63,14 @@ }, "hostedService": { "title": "Barındırılan Hizmet", - "description": "Create and explore subgraphs on the hosted service" + "description": "Barındırılan hizmet üzerinde subgraph'ler oluşturma ve keşfetme" } } }, "supportedNetworks": { "title": "Desteklenen Ağlar", - "description": "The Graph supports the following networks on The Graph Network and the hosted service.", - "graphNetworkAndHostedService": "The Graph Network & hosted service", - "hostedService": "hosted service" + "description": "The Graph, Graph Network ve barındırılan hizmet üzerinde aşağıdaki ağları destekler.", + "graphNetworkAndHostedService": "Graph Network & barındırılan hizmet", + "hostedService": "barındırılan hizmet" } } From fc8e3a9b3aa638122f9b61a0551bf7cb50654d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:27 -0400 Subject: [PATCH 007/924] New translations index.json (Urdu (Pakistan)) --- website/pages/ur/index.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/ur/index.json b/website/pages/ur/index.json index 9d7220cbfe80..e86047ba79e9 100644 --- a/website/pages/ur/index.json +++ b/website/pages/ur/index.json @@ -23,8 +23,8 @@ "description": "سب گراف بنانے کے لیے سٹوڈیو کا استعمال کریں" }, "migrateFromHostedService": { - "title": "Upgrade from the hosted service", - "description": "Upgrading subgraphs to The Graph Network" + "title": "ہوسٹڈ سروس سے اپ گریڈ کریں", + "description": "گراف نیٹ ورک میں سب گراف کو اپ گریڈ کرنا" } }, "networkRoles": { @@ -63,14 +63,14 @@ }, "hostedService": { "title": "ہوسٹڈ سروس", - "description": "Create and explore subgraphs on the hosted service" + "description": "ہوسٹڈ سروس پر سب گرافس بنائیں اور دریافت کریں" } } }, "supportedNetworks": { "title": "تعاون یافتہ نیٹ ورکس", - "description": "The Graph supports the following networks on The Graph Network and the hosted service.", - "graphNetworkAndHostedService": "The Graph Network & hosted service", - "hostedService": "hosted service" + "description": "گراف گراف نیٹ ورک اور ہوسٹڈ سروس پر درج ذیل نیٹ ورکس کو سپورٹ کرتا ہے.", + "graphNetworkAndHostedService": "گراف نیٹ ورک اور ہوسٹڈ سروس", + "hostedService": "ہوسٹڈ سروس" } } From 764ce9fe28f18f85b71cda42d99e39306512d241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:43 -0400 Subject: [PATCH 008/924] New translations cosmos.mdx (French) --- website/pages/fr/cookbook/cosmos.mdx | 44 ++++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/website/pages/fr/cookbook/cosmos.mdx b/website/pages/fr/cookbook/cosmos.mdx index ad5486175d46..4cb8ecd18801 100644 --- a/website/pages/fr/cookbook/cosmos.mdx +++ b/website/pages/fr/cookbook/cosmos.mdx @@ -48,30 +48,30 @@ La définition d'un subgraph comporte trois éléments clés : Le manifeste du subgraph (`subgraph.yaml`) identifie les sources de données du subgraph, les déclencheurs d'intérêt et les fonctions (`handlers`) qui doivent être exécutées en réponse à ces déclencheurs. Vous trouverez ci-dessous un exemple de manifeste de subgraph pour un subgraph Cosmos : ```yaml -version spec: 0.0.5 -description: Exemple de subgraph Cosmos +version spec : 0.0.5 +description : Exemple de subgraph Cosmos schéma: - fichier: ./schema.graphql # lien vers le fichier de schéma + fichier : ./schema.graphql # lien vers le fichier de schéma les sources de données: - - genre: cosmos - nom: CosmosHub - réseau: cosmoshub-4 # Cela changera pour chaque blockchain basée sur le cosmos. Dans ce cas, l’exemple utilise le mainnet Cosmos Hub. - source: - startBlock: 0 # Requis pour Cosmos, définissez-le sur 0 pour démarrer l'indexation à partir de la genèse de la chaîne - cartographie: - Version api: 0.0.7 - langage: wasm/assemblyscript - gestionnaires de blocs: - - handler: handleNewBlock # le nom de la fonction dans le fichier de mappage - Gestionnaires d'événements: - - event: récompenses # le type d'événement qui sera géré - handler: handleReward # le nom de la fonction dans le fichier de mappage - Gestionnaires de transactions: - - handler: handleTransaction # le nom de la fonction dans le fichier de mappage - Gestionnaires de messages: - - message: /cosmos.staking.v1beta1.MsgDelegate # le type d'un message - handler: handleMsgDelegate # le nom de la fonction dans le fichier de mappage - fichier: ./src/mapping.ts # lien vers le fichier avec les mappages Assemblyscript + - genre : cosmos + nom : CosmosHub + réseau : cosmoshub-4 # Cela changera pour chaque blockchain basée sur le cosmos. Dans ce cas, l’exemple utilise le mainnet Cosmos Hub. + source: + startBlock : 0 # Requis pour Cosmos, définissez-le sur 0 pour démarrer l'indexation à partir de la genèse de la chaîne + cartographie : + Version api : 0.0.7 + langage : wasm/assemblyscript + gestionnaires de blocs : + - handler: handleNewBlock # le nom de la fonction dans le fichier de mappage + Gestionnaires d'événements : + - event : récompenses # le type d'événement qui sera géré + handler: handleReward # le nom de la fonction dans le fichier de mappage + Gestionnaires de transactions : + - handler: handleTransaction # le nom de la fonction dans le fichier de mappage + Gestionnaires de messages : + - message : /cosmos.staking.v1beta1.MsgDelegate # le type d'un message + handler : handleMsgDelegate # le nom de la fonction dans le fichier de mappage + fichier : ./src/mapping.ts # lien vers le fichier avec les mappages Assemblyscript ``` - Les subgraphs cosmos introduisent un nouveau `type` de source de données (`cosmos`). From aaa903490741ab3c26d7523a41eb515c1f9d9a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:44 -0400 Subject: [PATCH 009/924] New translations cosmos.mdx (Spanish) --- website/pages/es/cookbook/cosmos.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/es/cookbook/cosmos.mdx b/website/pages/es/cookbook/cosmos.mdx index 11c2684860a1..a9721e2f2680 100644 --- a/website/pages/es/cookbook/cosmos.mdx +++ b/website/pages/es/cookbook/cosmos.mdx @@ -170,7 +170,7 @@ Cada tipo de handler viene con su propia estructura de datos que se pasa como ar - Los handlers de transacciones reciben el tipo `TransactionData`. - Los handlers de mensajes reciben el tipo `MessageData`. -Como parte de `MessageData`, el message handler recibe un contexto de transacción, que contiene la información más importante sobre una transacción que abarca un mensaje. El contexto de transacción también está disponible en el tipo `EventData`, pero solo cuando el evento correspondiente está asociado con una transacción. Además, todos los controladores reciben una referencia a un bloque (`HeaderOnlyBlock`). +Como parte de `MessageData`, el message handler recibe un contexto de transacción, que contiene la información más importante sobre una transacción que abarca un mensaje. El contexto de transacción también está disponible en el tipo ` EventData `, pero solo cuando el evento correspondiente está asociado con una transacción. Además, todos los controladores reciben una referencia a un bloque (` HeaderOnlyBlock `). Puedes encontrar una lista completa de los tipos para la integración Cosmos aquí [here](https://github.com/graphprotocol/graph-ts/blob/4c064a8118dff43b110de22c7756e5d47fcbc8df/chain/cosmos.ts). From a62f795e16ea938ffcf46cf8747e62a2abfd5dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:46 -0400 Subject: [PATCH 010/924] New translations cosmos.mdx (Czech) --- website/pages/cs/cookbook/cosmos.mdx | 132 +++++++++++++-------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/website/pages/cs/cookbook/cosmos.mdx b/website/pages/cs/cookbook/cosmos.mdx index ef21e4bc0855..0f5238e35645 100644 --- a/website/pages/cs/cookbook/cosmos.mdx +++ b/website/pages/cs/cookbook/cosmos.mdx @@ -1,51 +1,51 @@ --- -title: Building Subgraphs on Cosmos +title: Vytváření podgrafů v Cosmos --- -This guide is an introduction on building subgraphs indexing [Cosmos](https://docs.cosmos.network/) based blockchains. +Tato příručka je úvodem k vytváření subgrafů indexujících [Blokové řetězce založené na Cosmos](https://docs.cosmos.network/). -## What are Cosmos subgraphs? +## Co jsou podgrafy Cosmos? -The Graph allows developers to process blockchain events and make the resulting data easily available via an open GraphQL API, known as a subgraph. [Graph Node](https://github.com/graphprotocol/graph-node) is now able to process Cosmos events, which means Cosmos developers can now build subgraphs to easily index on-chain events. +Graph umožňuje vývojářům zpracovávat blockchainové události a výsledná data snadno zpřístupňovat prostřednictvím otevřeného rozhraní GraphQL API, známého jako podgraf. [Graph Node](https://github.com/graphprotocol/graph-node) je nyní schopen zpracovávat události Cosmos, což znamená, že vývojáři Cosmos nyní mohou vytvářet podgrafy pro snadné indexování událostí v řetězci. -There are four types of handlers supported in Cosmos subgraphs: +V podgrafech Cosmos jsou podporovány čtyři typy ovladačů: -- **Block handlers** run whenever a new block is appended to the chain. -- **Event handlers** run when a specific event is emitted. -- **Transaction handlers** run when a transaction occurs. -- **Message handlers** run when a specific message occurs. +- **Obsluhy bloků** se spustí vždy, když je do řetězce přidán nový blok. +- **Obsluhy událostí** se spustí při vyslání určité události. +- **Obsluhy transakcí** +- **Obsluhy zpráv** se spustí při výskytu určité zprávy. -Based on the [official Cosmos documentation](https://docs.cosmos.network/): +Založeno na [oficiální dokumentaci k Cosmos](https://docs.cosmos.network/): -> [Events](https://docs.cosmos.network/main/core/events) are objects that contain information about the execution of the application. They are mainly used by service providers like block explorers and wallets to track the execution of various messages and index transactions. +> [Události](https://docs.cosmos.network/main/core/events) jsou objekty, které obsahují informace o provádění aplikace. Používají je především poskytovatelé služeb, jako jsou průzkumníci bloků a peněženky, ke sledování provádění různých zpráv a indexování transakcí. -> [Transactions](https://docs.cosmos.network/main/core/transactions) are objects created by end-users to trigger state changes in the application. +> [Transakce](https://docs.cosmos.network/main/core/transactions) jsou objekty vytvořené koncovými uživateli za účelem vyvolání změn stavu aplikace. -> [Messages](https://docs.cosmos.network/main/core/transactions#messages) are module-specific objects that trigger state transitions within the scope of the module they belong to. +> [Zprávy](https://docs.cosmos.network/main/core/transactions#messages) jsou objekty specifické pro modul, které spouštějí stavové přechody v rámci modulu, ke kterému patří. -Even though all data can be accessed with a block handler, other handlers enable subgraph developers to process data in a much more granular way. +Přestože ke všem datům lze přistupovat pomocí blokové obsluhy, jiné obsluhy umožňují vývojářům podgrafů zpracovávat data mnohem podrobnějším způsobem. -## Building a Cosmos subgraph +## Sestavení podgrafu Cosmos -### Subgraph Dependencies +### Závislosti podgrafů -[graph-cli](https://github.com/graphprotocol/graph-cli) is a CLI tool to build and deploy subgraphs, version `>=0.30.0` is required in order to work with Cosmos subgraphs. +[graph-cli](https://github.com/graphprotocol/graph-cli) je nástroj příkazového řádku pro sestavování a nasazování podgrafů, je vyžadována verze `>=0.30.0` pro práci s podgrafy Cosmos. -[graph-ts](https://github.com/graphprotocol/graph-ts) is a library of subgraph-specific types, version `>=0.27.0` is required in order to work with Cosmos subgraphs. +"[graph-ts](https://github.com/graphprotocol/graph-ts) je knihovna specifická pro podgrafy obsahující typy, je vyžadována verze `>=0.27.0` pro práci s podgrafy Cosmos. -### Subgraph Main Components +### Hlavní součásti subgrafu -There are three key parts when it comes to defining a subgraph: +Při definování podgrafu existují tři klíčové části: -**subgraph.yaml**: a YAML file containing the subgraph manifest, which identifies which events to track and how to process them. +**subgraph.yaml**: soubor YAML obsahující manifest subgrafu, který určuje, které události se mají sledovat a jak je zpracovat. -**schema.graphql**: a GraphQL schema that defines what data is stored for your subgraph, and how to query it via GraphQL. +**schema.graphql**: schéma GraphQL, které definuje, jaká data jsou uložena pro váš podgraf a jak se na ně dotazovat prostřednictvím GraphQL. -**AssemblyScript Mappings**: [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) code that translates from blockchain data to the entities defined in your schema. +**AssemblyScript Mapování**: Kód v [AssemblyScript](https://github.com/AssemblyScript/assemblyscript), který překládá data z blockchainu do entit definovaných ve vašem schématu. -### Subgraph Manifest Definition +### Definice podgrafu Manifest -The subgraph manifest (`subgraph.yaml`) identifies the data sources for the subgraph, the triggers of interest, and the functions (`handlers`) that should be run in response to those triggers. See below for an example subgraph manifest for a Cosmos subgraph: +Manifest podgrafu (`subgraph.yaml`) identifikuje datové zdroje pro podgraf, spouštěče zájmu a funkce (`handlers`), které by měly být spuštěny jako odpověď na tyto spouštěče. Viz níže příklad manifestu podgrafu pro podgraf Cosmos: ```yaml specVersion: 0.0.5 @@ -74,18 +74,18 @@ dataSources: file: ./src/mapping.ts # link to the file with the Assemblyscript mappings ``` -- Cosmos subgraphs introduce a new `kind` of data source (`cosmos`). -- The `network` should correspond to a chain in the Cosmos ecosystem. In the example, the Cosmos Hub mainnet is used. +- Podgrafy Cosmos zavádějí nový `druh` zdroje dat (`cosmos`). +- `síť` by měla odpovídat řetězci v ekosystému Cosmos. V příkladu je použita hlavní síť Cosmos Hub. -### Schema Definition +### Definice schématu Schema definition describes the structure of the resulting subgraph database and the relationships between entities. This is agnostic of the original data source. There are more details on subgraph schema definition [here](/developing/creating-a-subgraph/#the-graph-ql-schema). -### AssemblyScript Mappings +### AssemblyScript Mapování -The handlers for processing events are written in [AssemblyScript](https://www.assemblyscript.org/). +Obslužné programy pro zpracování událostí jsou napsány v jazyce [AssemblyScript](https://www.assemblyscript.org/). -Cosmos indexing introduces Cosmos-specific data types to the [AssemblyScript API](/developing/assemblyscript-api/). +Indexování Cosmos zavádí datové typy specifické pro Cosmos do [AssemblyScript API](/developing/assemblyscript-api/). ```tsx class Block { @@ -163,42 +163,42 @@ class Any { } ``` -Each handler type comes with its own data structure that is passed as an argument to a mapping function. +Každý typ obslužné rutiny má svou vlastní datovou strukturu, která se předává jako argument mapovací funkci. -- Block handlers receive the `Block` type. -- Event handlers receive the `EventData` type. -- Transaction handlers receive the `TransactionData` type. -- Message handlers receive the `MessageData` type. +- Obsluhy bloků přijímají typ `Block`. +- Obsluhy událostí přijímají typ `EventData`. +- Zpracovatelé transakcí obdrží typ `TransactionData`. +- Zpracovatelé zpráv přijímají typ `MessageData`. -As a part of `MessageData` the message handler receives a transaction context, which contains the most important information about a transaction that encompasses a message. The transaction context is also available in the `EventData` type, but only when the corresponding event is associated with a transaction. Additionally, all handlers receive a reference to a block (`HeaderOnlyBlock`). +Jako součást `MessageData` přijímá zpracovatel zpráv kontext transakce, který obsahuje nejdůležitější informace o transakci, která zahrnuje zprávu. Kontext transakce je také k dispozici ve typu `EventData`, ale pouze, když je příslušná událost spojena s transakcí. Kromě toho všichni zpracovatelé obdrží odkaz na blok (`HeaderOnlyBlock`). -You can find the full list of types for the Cosmos integration [here](https://github.com/graphprotocol/graph-ts/blob/4c064a8118dff43b110de22c7756e5d47fcbc8df/chain/cosmos.ts). +Úplný seznam typů pro integraci Cosmos najdete [zde](https://github.com/graphprotocol/graph-ts/blob/4c064a8118dff43b110de22c7756e5d47fcbc8df/chain/cosmos.ts). -### Message decoding +### Dekódování zpráv -It's important to note that Cosmos messages are chain-specific and they are passed to a subgraph in the form of a serialized [Protocol Buffers](https://developers.google.com/protocol-buffers/) payload. As a result, the message data needs to be decoded in a mapping function before it can be processed. +Je důležité si uvědomit, že zprávy Cosmos jsou specifické pro řetězec a jsou předávány do podgrafu ve formě serializovaného [zátěže protokolových bufferů](https://developers.google.com/protocol-buffers/). V důsledku toho je třeba data zpráv před jejich zpracováním dekódovat v mapovací funkci. -An example of how to decode message data in a subgraph can be found [here](https://github.com/graphprotocol/graph-tooling/blob/main/examples/cosmos-validator-delegations/src/decoding.ts). +Příklad dekódování dat zprávy v podgrafu naleznete [zde](https://github.com/graphprotocol/graph-tooling/blob/main/examples/cosmos-validator-delegations/src/decoding.ts). -## Creating and building a Cosmos subgraph +## Vytvoření a sestavení podgrafu Cosmos -The first step before starting to write the subgraph mappings is to generate the type bindings based on the entities that have been defined in the subgraph schema file (`schema.graphql`). This will allow the mapping functions to create new objects of those types and save them to the store. This is done by using the `codegen` CLI command: +Prvním krokem před začátkem psaní mapovacích funkcí pro podgraf je generovat typové vazby na základě entit definovaných v souboru schématu podgrafu (`schema.graphql`). Toto umožní mapovacím funkcím vytvářet nové objekty těchto typů a ukládat je do úložiště. Toho lze dosáhnout pomocí příkazu `codegen` v příkazovém řádku: ```bash $ graph codegen ``` -Once the mappings are ready, the subgraph needs to be built. This step will highlight any errors the manifest or the mappings might have. A subgraph needs to build successfully in order to be deployed to the Graph Node. It can be done using the `build` CLI command: +Jakmile jsou mapovací funkce připraveny, je třeba sestavit podgraf. Tento krok zvýrazní případné chyby v manifestu nebo mapovacích funkcích. Podgraf musí být úspěšně sestaven, aby mohl být nasazen do Graph Node. Toto lze provést pomocí příkazu `build` v příkazovém řádku: ```bash $ graph build ``` -## Deploying a Cosmos subgraph +## Nasazení podgrafu Cosmos -Once your subgraph has been created, you can deploy your subgraph by using the `graph deploy` CLI command after running the `graph create` CLI command: +Jakmile je váš podgraf vytvořen, můžete ho nasadit pomocí příkazu `graph deploy` veřejného rozhraní příkazové řádky CLI po spuštění příkazu `graph create` veřejného rozhraní příkazové řádky CLI: -**Hosted Service** +**Hostovaná služba** ```bash graph create account/subgraph-name --product hosted-service @@ -208,7 +208,7 @@ graph create account/subgraph-name --product hosted-service graph deploy account/subgraph-name --product hosted-service ``` -**Local Graph Node (based on default configuration):** +**Lokální Graph Node (založený na výchozí konfiguraci):** ```bash graph create subgraph-name --node http://localhost:8020 @@ -218,42 +218,42 @@ graph create subgraph-name --node http://localhost:8020 graph deploy subgraph-name --node http://localhost:8020/ --ipfs http://localhost:5001 ``` -## Querying a Cosmos subgraph +## Dotazování podgrafu Cosmos -The GraphQL endpoint for Cosmos subgraphs is determined by the schema definition, with the existing API interface. Please visit the [GraphQL API documentation](/querying/graphql-api/) for more information. +GraphQL endpoint pro podgrafy Cosmos je určen schématem definice s existujícím rozhraním API. Pro více informací navštivte [dokumentaci GraphQL API](/querying/graphql-api/). -## Supported Cosmos Blockchains +## Podporované blockchainy Cosmos ### Cosmos Hub -#### What is Cosmos Hub? +#### Co je Cosmos Hub? -The [Cosmos Hub blockchain](https://hub.cosmos.network/) is the first blockchain in the [Cosmos](https://cosmos.network/) ecosystem. You can visit the [official documentation](https://docs.cosmos.network/) for more information. +[Cosmos Hub blockchain](https://hub.cosmos.network/) je první blockchain v ekosystému [Cosmos](https://cosmos.network/). Další informace naleznete v [oficiální dokumentaci](https://docs.cosmos.network/). -#### Networks +#### Sítě -Cosmos Hub mainnet is `cosmoshub-4`. Cosmos Hub current testnet is `theta-testnet-001`.
Other Cosmos Hub networks, i.e. `cosmoshub-3`, are halted, therefore no data is provided for them. +Hlavní síť Cosmos Hubu je `cosmoshub-4`. Aktuální testovací síť Cosmos Hubu je `theta-testnet-001`.
Ostatní sítě Cosmos Hubu, tj. `cosmoshub-3`, jsou zastaveny, a proto pro ně nejsou poskytována žádná data. ### Osmosis -> Osmosis support in Graph Node and on the Hosted Service is in beta: please contact the graph team with any questions about building Osmosis subgraphs! +> Podpora Osmosis v Graph Node a v hostované službě je ve fázi beta: s případnými dotazy ohledně vytváření subgrafů Osmosis se obraťte na grafový tým! -#### What is Osmosis? +#### Co je osmosis? -[Osmosis](https://osmosis.zone/) is a decentralized, cross-chain automated market maker (AMM) protocol built on top of the Cosmos SDK. It allows users to create custom liquidity pools and trade IBC-enabled tokens. You can visit the [official documentation](https://docs.osmosis.zone/) for more information. +[Osmosis](https://osmosis.zone/) je decentralizovaný, meziřetězcový protokol automatického tvůrce trhu (AMM) postavený nad sadou Cosmos SDK. Umožňuje uživatelům vytvářet vlastní pooly likvidity a obchodovat s tokeny podporujícími IBC. Další informace naleznete v [oficiální dokumentaci](https://docs.osmosis.zone/). -#### Networks +#### Sítě -Osmosis mainnet is `osmosis-1`. Osmosis current testnet is `osmo-test-4`. +Osmosis mainnet je `osmosis-1`. Aktuální testnet Osmosis je `osmo-test-4`. -## Example Subgraphs +## Příklady podgrafů -Here are some example subgraphs for reference: +Zde je několik příkladů podgrafů: -[Block Filtering Example](https://github.com/graphprotocol/graph-tooling/tree/main/examples/cosmos-block-filtering) +[Příklad blokového filtrování](https://github.com/graphprotocol/graph-tooling/tree/main/examples/cosmos-block-filtering) -[Validator Rewards Example](https://github.com/graphprotocol/graph-tooling/tree/main/examples/cosmos-validator-rewards) +[Příklad odměn](https://github.com/graphprotocol/graph-tooling/tree/main/examples/cosmos-validator-rewards) -[Validator Delegations Example](https://github.com/graphprotocol/graph-tooling/tree/main/examples/cosmos-validator-delegations) +[Příklad delegování validátoru](https://github.com/graphprotocol/graph-tooling/tree/main/examples/cosmos-validator-delegations) -[Osmosis Token Swaps Example](https://github.com/graphprotocol/graph-tooling/tree/main/examples/cosmos-osmosis-token-swaps) +[Příklad výměny tokenů Osmosis](https://github.com/graphprotocol/graph-tooling/tree/main/examples/cosmos-osmosis-token-swaps) From cadc33ee113fa0ed2b47f1ebcfca74d01131b2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:47 -0400 Subject: [PATCH 011/924] New translations cosmos.mdx (German) --- website/pages/de/cookbook/cosmos.mdx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/de/cookbook/cosmos.mdx b/website/pages/de/cookbook/cosmos.mdx index 0978711d1b77..db32f2973747 100644 --- a/website/pages/de/cookbook/cosmos.mdx +++ b/website/pages/de/cookbook/cosmos.mdx @@ -51,30 +51,30 @@ Das Subgraf-Manifest (`subgraph.yaml`) identifiziert die Datenquellen für den S specVersion: 0.0.5 description: Cosmos Subgraph Example schema: - file: ./schema.graphql # link to the schema file + file: ./schema.graphql # Link zur Schemadatei dataSources: - kind: cosmos name: CosmosHub - network: cosmoshub-4 # This will change for each cosmos-based blockchain. In this case, the example uses the Cosmos Hub mainnet. + network: cosmoshub-4 # Dies wird sich für jede kosmosbasierte Blockchain ändern. In diesem Fall verwendet das Beispiel das Cosmos Hub-Mainnet. source: - startBlock: 0 # Required for Cosmos, set this to 0 to start indexing from chain genesis + startBlock: 0 # Erforderlich für Cosmos, setzen Sie dies auf 0, um die Indizierung ab dem Chain-Genesis zu starten mapping: apiVersion: 0.0.7 language: wasm/assemblyscript blockHandlers: - - handler: handleNewBlock # the function name in the mapping file + - handler: handleNewBlock # der Funktionsname in der Zuordnungsdatei eventHandlers: - - event: rewards # the type of the event that will be handled - handler: handleReward # the function name in the mapping file + - event: rewards # die Art des Ereignisses, das behandelt wird + handler: handleReward # der Funktionsname in der Zuordnungsdatei transactionHandlers: - - handler: handleTransaction # the function name in the mapping file + - handler: handleTransaction # der Funktionsname in der Zuordnungsdatei messageHandlers: - - message: /cosmos.staking.v1beta1.MsgDelegate # the type of a message - handler: handleMsgDelegate # the function name in the mapping file - file: ./src/mapping.ts # link to the file with the Assemblyscript mappings + - message: /cosmos.staking.v1beta1.MsgDelegate # die Art einer Meldung + handler: handleMsgDelegate # der Funktionsname in der Zuordnungsdatei + file: ./src/mapping.ts # Link zur Datei mit den Assemblyscript-Zuordnungen ``` -- Cosmos subgraphs introduce a new `kind` of data source (`cosmos`). +- Cosmos-Subgrafen führen eine neue `Art` von Daten-Sourcecode (`cosmos`) ein. - The `network` should correspond to a chain in the Cosmos ecosystem. In the example, the Cosmos Hub mainnet is used. ### Schema-Definition From 242bd53c8e699a3355164fa853ccbb52666975a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:50 -0400 Subject: [PATCH 012/924] New translations cosmos.mdx (Dutch) --- website/pages/nl/cookbook/cosmos.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/nl/cookbook/cosmos.mdx b/website/pages/nl/cookbook/cosmos.mdx index ef21e4bc0855..5fe207067f94 100644 --- a/website/pages/nl/cookbook/cosmos.mdx +++ b/website/pages/nl/cookbook/cosmos.mdx @@ -198,7 +198,7 @@ $ graph build Once your subgraph has been created, you can deploy your subgraph by using the `graph deploy` CLI command after running the `graph create` CLI command: -**Hosted Service** +**Gehoste Dienst** ```bash graph create account/subgraph-name --product hosted-service From cb2102520c024221bc43efd128d582356fbce2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:55 -0400 Subject: [PATCH 013/924] New translations cosmos.mdx (Urdu (Pakistan)) --- website/pages/ur/cookbook/cosmos.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ur/cookbook/cosmos.mdx b/website/pages/ur/cookbook/cosmos.mdx index df28c5b1eecf..5880b8348d76 100644 --- a/website/pages/ur/cookbook/cosmos.mdx +++ b/website/pages/ur/cookbook/cosmos.mdx @@ -165,7 +165,7 @@ class Any { ہر ہینڈلر کی قسم اس کے اپنے ڈیٹا ڈھانچے کے ساتھ آتی ہے جو میپنگ فنکشن کی دلیل کے طور پر پاس کی جاتی ہے. -- بلاک ہینڈلرز کو `Block` قسم موصول ہوتی ہے. +- بلاک ہینڈلرز کو ` Block ` قسم موصول ہوتی ہے. - ایونٹ ہینڈلرز کو `EventData` قسم موصول ہوتی ہے. - ٹرانزیکشن ہینڈلرز کو `TransactionData` قسم موصول ہوتی ہے. - میسج ہینڈلرز کو `MessageData` قسم موصول ہوتی ہے. From 9d11fec6b23c75be6e84bb1953876dab02388233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:01:59 -0400 Subject: [PATCH 014/924] New translations supported-networks.mdx (Romanian) --- website/pages/ro/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/ro/developing/supported-networks.mdx b/website/pages/ro/developing/supported-networks.mdx index d422754aa5ba..335f07c18968 100644 --- a/website/pages/ro/developing/supported-networks.mdx +++ b/website/pages/ro/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Rețele suportate --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 3b39268ca620e75ce36f3b49505bb0bba84b56ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:00 -0400 Subject: [PATCH 015/924] New translations supported-networks.mdx (French) --- website/pages/fr/developing/supported-networks.mdx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/website/pages/fr/developing/supported-networks.mdx b/website/pages/fr/developing/supported-networks.mdx index 36382f46705a..7504121f78f5 100644 --- a/website/pages/fr/developing/supported-networks.mdx +++ b/website/pages/fr/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Réseaux supportés --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. @@ -26,4 +21,4 @@ Les subgraphs alimentés par Substreams indexant `mainnet` Ethereum sont pris en Si votre réseau préféré n'est pas pris en charge par le réseau décentralisé du Graph, vous pouvez lancer votre propre [Nœud Graph](https://github.com/graphprotocol/graph-node) pour indexer tout réseau compatible avec l'EVM. Assurez-vous que la [version](https://github.com/graphprotocol/graph-node/releases) que vous utilisez prend en charge le réseau et que vous disposez de la configuration nécessaire. -Graph Node can also index other protocols, via a Firehose integration. Firehose integrations have been created for NEAR, Arweave and Cosmos-based networks. +Graph Node peut également indexer d'autres protocoles, via une intégration Firehose. Des intégrations Firehose ont été créées pour les réseaux basés sur NEAR, Arweave et Cosmos. From 9117f6a04e509793437904ba6f45509fe1ff841b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:01 -0400 Subject: [PATCH 016/924] New translations supported-networks.mdx (Spanish) --- website/pages/es/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/es/developing/supported-networks.mdx b/website/pages/es/developing/supported-networks.mdx index f6f2fc3c9de8..d5eb03190a1c 100644 --- a/website/pages/es/developing/supported-networks.mdx +++ b/website/pages/es/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Redes admitidas --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 947bb1a64f4e1075bc2e629604568eca89dd3dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:02 -0400 Subject: [PATCH 017/924] New translations supported-networks.mdx (Arabic) --- website/pages/ar/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/ar/developing/supported-networks.mdx b/website/pages/ar/developing/supported-networks.mdx index 44a74bfc0e8e..8df633d1d26c 100644 --- a/website/pages/ar/developing/supported-networks.mdx +++ b/website/pages/ar/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: الشبكات المدعومة --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 60f3429df3377537e6c25c956e65c90bf7849a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:03 -0400 Subject: [PATCH 018/924] New translations supported-networks.mdx (Czech) --- .../cs/developing/supported-networks.mdx | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/website/pages/cs/developing/supported-networks.mdx b/website/pages/cs/developing/supported-networks.mdx index 91fe34b967c4..01196d6b84fe 100644 --- a/website/pages/cs/developing/supported-networks.mdx +++ b/website/pages/cs/developing/supported-networks.mdx @@ -1,29 +1,24 @@ --- -title: Supported Networks +title: Podporované sítě --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' -import { SupportedNetworksTable } from '@/src/supportedNetworks' - -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { SupportedNetworksTable } z '@/src/supportedNetworks' -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - -The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. +Hostovaná služba se spoléhá na stabilitu a spolehlivost základních technologií, konkrétně na poskytované koncové body JSON RPC. -Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. +Ropsten, Rinkeby a Kovan jsou vyřazeny. Více informací najdete na [Blogu nadace Ethereum](https://blog.ethereum.org/2022/06/21/testnet-deprecation). Od 25. února 2023 již nejsou Ropsten, Rinkeby a Kovan podporovány hostovanou službou. Goerli bude po sloučení udržován klientskými vývojáři a je rovněž podporován hostovanou službou. Vývojářům, kteří v současné době používají Ropsten, Rinkeby nebo Kovan jako staging/testovací prostředí, doporučujeme přejít na Goerli. -Subgraphs indexing Gnosis Chain can now be deployed with the `gnosis` network identifier. `xdai` is still supported for existing hosted service subgraphs. +Podgrafy indexující řetězec Gnosis lze nyní nasadit pomocí síťového identifikátoru `gnosis`. `xdai` je stále podporován pro stávající podgrafy hostovaných služeb. -For a full list of which features are supported on the decentralized network, see [this page](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md). +Úplný seznam funkcí podporovaných v decentralizované síti najdete na [této stránce](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md). -Substreams-powered subgraphs indexing `mainnet` Ethereum are supported on the Subgraph Studio and decentralized network. +Substreams-powered podgrafy indexující `mainnet` Ethereum jsou podporovány v Podgraf Studio a decentralizované síti. -## Graph Node +## Uzel grafu -If your preferred network isn't supported on The Graph's decentralized network, you can run your own [Graph Node](https://github.com/graphprotocol/graph-node) to index any EVM-compatible network. Make sure that the [version](https://github.com/graphprotocol/graph-node/releases) you are using supports the network and you have the needed configuration. +Pokud vaše preferovaná síť není v decentralizované síti Graf podporována, můžete spustit vlastní [Uzel grafu](https://github.com/graphprotocol/graph-node) a indexovat jakoukoli síť kompatibilní s EVM. Ujistěte se, že [verze](https://github.com/graphprotocol/graph-node/releases), kterou používáte, podporuje danou síť a že máte potřebnou konfiguraci. -Graph Node can also index other protocols, via a Firehose integration. Firehose integrations have been created for NEAR, Arweave and Cosmos-based networks. +Graph Node dokáže indexovat i jiné protokoly prostřednictvím integrace Firehose. Byly vytvořeny integrace Firehose pro sítě založené na sítích NEAR, Arweave a Cosmos. From 7b7d376cad955f54e01af4a7791e1a6bfa630b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:04 -0400 Subject: [PATCH 019/924] New translations supported-networks.mdx (German) --- website/pages/de/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/de/developing/supported-networks.mdx b/website/pages/de/developing/supported-networks.mdx index 91fe34b967c4..cd82305bfce2 100644 --- a/website/pages/de/developing/supported-networks.mdx +++ b/website/pages/de/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Supported Networks --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 67c8960d89d77a012bf5844659526ab5715e50c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:05 -0400 Subject: [PATCH 020/924] New translations supported-networks.mdx (Italian) --- website/pages/it/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/it/developing/supported-networks.mdx b/website/pages/it/developing/supported-networks.mdx index 5b4e9eaec617..08c9df030c11 100644 --- a/website/pages/it/developing/supported-networks.mdx +++ b/website/pages/it/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Reti supportate --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 73b81aed2b4d8fc4e37aea6196669874cd6415c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:05 -0400 Subject: [PATCH 021/924] New translations supported-networks.mdx (Japanese) --- website/pages/ja/developing/supported-networks.mdx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/website/pages/ja/developing/supported-networks.mdx b/website/pages/ja/developing/supported-networks.mdx index 554284f18a93..e50fde8f0d39 100644 --- a/website/pages/ja/developing/supported-networks.mdx +++ b/website/pages/ja/developing/supported-networks.mdx @@ -2,21 +2,16 @@ title: サポートされているネットワーク --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - -The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. +ホスティングサービスは、基盤となる技術、提供されたJSON RPCエンドポイントの安定性と信頼性に依存しています。 -Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. +Ropsten、Rinkeby、Kovanは非推奨となっています。詳しくは[イーサリアム財団のブログ](https://blog.ethereum.org/2022/06/21/testnet-deprecation)をご覧ください。2023年2月25日をもって、Ropsten、Rinkeby、Kovanはホスティングサービスではサポートされなくなります。Goerliはマージ後もクライアント開発者によって保守され、ホストされたサービスによってもサポートされます。現在Ropsten, Rinkeby, Kovanをステージング/テスト環境として使用している開発者はGoerliに移行することをお勧めします。 -Subgraphs indexing Gnosis Chain can now be deployed with the `gnosis` network identifier. `xdai` is still supported for existing hosted service subgraphs. +Gnosis Chainをインデックスするサブグラフは、`gnosis`ネットワーク識別子でデプロイできるようになりました。`xdai` は既存のホスティングサービスのサブグラフでまだサポートされています。 分散型ネットワークでサポートされている機能の完全なリストについては、[このページ](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md)を参照してください。 From 73b57c2a1df7a953702ad2aa1a0e865d56aa5c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:06 -0400 Subject: [PATCH 022/924] New translations supported-networks.mdx (Korean) --- website/pages/ko/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/ko/developing/supported-networks.mdx b/website/pages/ko/developing/supported-networks.mdx index 4d7ee2ea5284..4719cd60efe4 100644 --- a/website/pages/ko/developing/supported-networks.mdx +++ b/website/pages/ko/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: 지원되는 네트워크들 --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 518994f75d33b875fbe4f223306bd39b88b7f7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:07 -0400 Subject: [PATCH 023/924] New translations supported-networks.mdx (Dutch) --- website/pages/nl/developing/supported-networks.mdx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/website/pages/nl/developing/supported-networks.mdx b/website/pages/nl/developing/supported-networks.mdx index 91fe34b967c4..9c65eb268cc5 100644 --- a/website/pages/nl/developing/supported-networks.mdx +++ b/website/pages/nl/developing/supported-networks.mdx @@ -1,17 +1,12 @@ --- -title: Supported Networks +title: Ondersteunde Netwerken --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 3315fe8130b3449a01bbcb3fa5b25cbe1bfdfc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:08 -0400 Subject: [PATCH 024/924] New translations supported-networks.mdx (Polish) --- website/pages/pl/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/pl/developing/supported-networks.mdx b/website/pages/pl/developing/supported-networks.mdx index 3527784fd9ab..7ebc9a3bf6cf 100644 --- a/website/pages/pl/developing/supported-networks.mdx +++ b/website/pages/pl/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Wspierane sieci --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From a32aff1bb945a2eab27c26591fb05efe64b97e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:09 -0400 Subject: [PATCH 025/924] New translations supported-networks.mdx (Portuguese) --- website/pages/pt/developing/supported-networks.mdx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/website/pages/pt/developing/supported-networks.mdx b/website/pages/pt/developing/supported-networks.mdx index e146c2bcf189..77d7911f3842 100644 --- a/website/pages/pt/developing/supported-networks.mdx +++ b/website/pages/pt/developing/supported-networks.mdx @@ -2,21 +2,16 @@ title: Redes Apoiadas --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - -The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. +O serviço hospedado depende da estabilidade das tecnologias subjacentes, principalmente os endpoints fornecidos em JSON RPC. -Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. +Ropsten, Rinkeby e Kovan serão depreciadas; saiba mais no [blog da Ethereum Foundation](https://blog.ethereum.org/2022/06/21/testnet-deprecation). Desde 25 de fevereiro de 2023, Ropsten, Rinkeby e Kovan não são mais apoiados pelo serviço hospedado. A Goerli será mantida por programadores de clientes após o merge, e também tem apoio no serviço hospedado. Programadores que atualmente usam Ropsten, Rinkeby ou Kovan como seu ambiente de testes estão convidados a migrar à Goerli. -Subgraphs indexing Gnosis Chain can now be deployed with the `gnosis` network identifier. `xdai` is still supported for existing hosted service subgraphs. +Subgraphs que indexam a Gnosis Chain podem agora ser lançadas com o identificador de rede `gnosis`. O `xdai` ainda é apoiado para subgraphs já existentes no serviço hospedado. Para uma lista completa de recursos apoiados na rede descentralizada, veja [esta página](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md). From f8e6af7da81f6f1f1a9b874757292041e82325a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:10 -0400 Subject: [PATCH 026/924] New translations supported-networks.mdx (Russian) --- website/pages/ru/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/ru/developing/supported-networks.mdx b/website/pages/ru/developing/supported-networks.mdx index 5b4426ab4a88..daba34911b4b 100644 --- a/website/pages/ru/developing/supported-networks.mdx +++ b/website/pages/ru/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Поддерживаемые сети --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From ac11d806bc5cfc5a482a52ca0173dad487778209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:11 -0400 Subject: [PATCH 027/924] New translations supported-networks.mdx (Swedish) --- website/pages/sv/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/sv/developing/supported-networks.mdx b/website/pages/sv/developing/supported-networks.mdx index 2429e3aa5275..83d9fdfc287f 100644 --- a/website/pages/sv/developing/supported-networks.mdx +++ b/website/pages/sv/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Stödda Nätverk --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 6ee3f0b000eb77d585efba232290b66aec43f9ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:12 -0400 Subject: [PATCH 028/924] New translations supported-networks.mdx (Turkish) --- .../pages/tr/developing/supported-networks.mdx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/website/pages/tr/developing/supported-networks.mdx b/website/pages/tr/developing/supported-networks.mdx index 7e6be8af793b..d90f7dd6e853 100644 --- a/website/pages/tr/developing/supported-networks.mdx +++ b/website/pages/tr/developing/supported-networks.mdx @@ -2,21 +2,16 @@ title: Desteklenen Ağlar --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' -import { SupportedNetworksTable } from '@/src/supportedNetworks' - -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) +{ getStaticPropsForSupportedNetworks as getStaticProps }'i '@/src/buildGetStaticProps''den dışa aktar +{ SupportedNetworksTable }'yi '@/src/supportedNetworks''den içe aktar -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - -The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. +Barındırılan hizmet, altta yatan teknolojilerin, yani sağlanan JSON RPC uç noktalarının kararlılığına ve güvenilirliğine dayanır. -Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. +Ropsten, Rinkeby ve Kovan kullanımdan kaldırılıyor. Daha fazlasını [Ethereum Vakfı Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation) yazısından okuyabilirsiniz. 25 Şubat 2023 itibarıyla Ropsten, Rinkeby ve Kovan artık barındırılan hizmet tarafından desteklenmiyor. Goerli'nin bakımı, birleşme sonrasında müşteri geliştiricileri tarafından gerçekleştirilecek ve aynı zamanda barındırılan hizmet tarafından da desteklenecek. Şu anda hazırlık/test ortamı olarak Ropsten, Rinkeby veya Kovan'ı kullanan geliştiricilerin Goerli'ye geçmeleri teşvik edilmektedir. -Subgraphs indexing Gnosis Chain can now be deployed with the `gnosis` network identifier. `xdai` is still supported for existing hosted service subgraphs. +Gnosis Chain'i indeksleyen subgraph'ler artık `gnosis` ağ tanımlayıcısı ile deploy edilebilir. `xdai` mevcut barındırılan hizmet subgraph'leri için hala desteklenmektedir. Merkeziyetsiz ağda hangi özelliklerin desteklendiğinin tam listesi için [bu sayfaya](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) göz atın. @@ -24,6 +19,6 @@ Merkeziyetsiz ağda hangi özelliklerin desteklendiğinin tam listesi için [bu ## Graph Node -If your preferred network isn't supported on The Graph's decentralized network, you can run your own [Graph Node](https://github.com/graphprotocol/graph-node) to index any EVM-compatible network. Make sure that the [version](https://github.com/graphprotocol/graph-node/releases) you are using supports the network and you have the needed configuration. +Tercih ettiğiniz ağ Graph'in merkeziyetsiz ağında desteklenmiyorsa EVM uyumlu herhangi bir ağı indekslemek için kendi [Graph Node'unuzu](https://github.com/graphprotocol/graph-node) çalıştırabilirsiniz. Kullandığınız [sürümün](https://github.com/graphprotocol/graph-node/releases) ağı desteklediğinden ve gerekli yapılandırmaya sahip olduğunuzdan emin olun. Graph node'u, bir Firehose entegrasyonu yoluyla diğer protokolleri de indeksleyebilir. NEAR, Arweave ve Cosmos tabanlı ağlar için Firehose entegrasyonları oluşturulmuştur. From 8e645b9e012a65562f5df0bd0b2be1ed1e0c78ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:13 -0400 Subject: [PATCH 029/924] New translations supported-networks.mdx (Ukrainian) --- website/pages/uk/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/uk/developing/supported-networks.mdx b/website/pages/uk/developing/supported-networks.mdx index 08e5da5050ed..398b3257db7a 100644 --- a/website/pages/uk/developing/supported-networks.mdx +++ b/website/pages/uk/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Мережі, які підтримуються --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 56b818783b3d08c1828bc5913018e289e18ee9bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:14 -0400 Subject: [PATCH 030/924] New translations supported-networks.mdx (Chinese Simplified) --- website/pages/zh/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/zh/developing/supported-networks.mdx b/website/pages/zh/developing/supported-networks.mdx index 03bb22ed8683..c0bced3ae466 100644 --- a/website/pages/zh/developing/supported-networks.mdx +++ b/website/pages/zh/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: 支持的网络 --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 994b5b96ee87c7988c3d36f5178cb4e800157a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:15 -0400 Subject: [PATCH 031/924] New translations supported-networks.mdx (Urdu (Pakistan)) --- website/pages/ur/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/ur/developing/supported-networks.mdx b/website/pages/ur/developing/supported-networks.mdx index df6f6ce29831..dee72d2419e3 100644 --- a/website/pages/ur/developing/supported-networks.mdx +++ b/website/pages/ur/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: سپورٹڈ نیٹ ورکس --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 7ac4f6cf53a3d382c65d3e82d15e9fc27367626d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:16 -0400 Subject: [PATCH 032/924] New translations supported-networks.mdx (Vietnamese) --- website/pages/vi/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/vi/developing/supported-networks.mdx b/website/pages/vi/developing/supported-networks.mdx index e0a4131e98c2..8cc8159f29f4 100644 --- a/website/pages/vi/developing/supported-networks.mdx +++ b/website/pages/vi/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Các mạng được hỗ trợ --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From f387fec47465c1be39f7ef5da74e1f7567e49954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:17 -0400 Subject: [PATCH 033/924] New translations supported-networks.mdx (Marathi) --- website/pages/mr/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/mr/developing/supported-networks.mdx b/website/pages/mr/developing/supported-networks.mdx index 96e52c3e8c2c..d033eeecc766 100644 --- a/website/pages/mr/developing/supported-networks.mdx +++ b/website/pages/mr/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: समर्थित नेटवर्क --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 7834c3d2f04cd03ada76532c3618d28e592fec47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:18 -0400 Subject: [PATCH 034/924] New translations supported-networks.mdx (Hindi) --- website/pages/hi/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/hi/developing/supported-networks.mdx b/website/pages/hi/developing/supported-networks.mdx index 7fe452631e97..cf872395ac16 100644 --- a/website/pages/hi/developing/supported-networks.mdx +++ b/website/pages/hi/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: समर्थित नेटवर्क्स --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From d1855586b15d741887878d7707e3fbb234afefcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:18 -0400 Subject: [PATCH 035/924] New translations supported-networks.mdx (Yoruba) --- website/pages/yo/developing/supported-networks.mdx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/pages/yo/developing/supported-networks.mdx b/website/pages/yo/developing/supported-networks.mdx index 91fe34b967c4..cd82305bfce2 100644 --- a/website/pages/yo/developing/supported-networks.mdx +++ b/website/pages/yo/developing/supported-networks.mdx @@ -2,16 +2,11 @@ title: Supported Networks --- -import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' -export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) - -\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) -⁠ Supports Substreams - The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From de8d9781e3098d5177991d5ae7add2be42d7a085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:20 -0400 Subject: [PATCH 036/924] New translations managing-api-keys.mdx (French) --- .../pages/fr/querying/managing-api-keys.mdx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/fr/querying/managing-api-keys.mdx b/website/pages/fr/querying/managing-api-keys.mdx index c878d79d19c9..9c7513ba9dfb 100644 --- a/website/pages/fr/querying/managing-api-keys.mdx +++ b/website/pages/fr/querying/managing-api-keys.mdx @@ -7,20 +7,20 @@ Que vous soyez un développeur dapp ou un développeur de subgraphs, vous devrez Le Studio répertoriera les clés API existantes, ce qui vous donnera la possibilité de les gérer ou de les supprimer. 1. La section **Vue d'ensemble** vous permettra de : - - Edit your key name - - Regenerate API keys - - View the current usage of the API key with stats: - - Number of queries - - Amount of GRT spent -2. Under **Security**, you’ll be able to opt into security settings depending on the level of control you’d like to have over your API keys. In this section, you can: - - View and manage the domain names authorized to use your API key - - Assign subgraphs that can be queried with your API key -3. Under **Indexer Preference**, you’ll be able to set different preferences for Indexers who are indexing subgraphs that your API key is used for. You can assign up to 5 points for each of these: - - **Fastest Speed**: Time between the query and the response from an indexer. If you mark this as important we will optimize for fast indexers. - - **Lowest Price**: The amount paid per query. If you mark this as important we will optimize for the less expensive indexers. - - **Data Freshness**: How recent the latest block an indexer has processed for the subgraph you are querying. If you mark this as important we will optimize to find the indexers with the freshest data. - - **Economic Security**: The amount of GRT an indexer can lose if they respond incorrectly to your query. If you mark this as important we will optimize for indexers with a large stake. -4. Under **Budget**, you’ll be able to update the maximum price per query. Note that we have a dynamic setting for that that's based on a volume discounting algorithm. **We strongly recommend using the default settings unless you are experiencing a specific problem.** Otherwise, you can update it under "Set a custom maximum budget". On this page you can also view different KPIs (in GRT and USD): - - Average cost per query - - Failed queries over max price - - Most expensive query + - Modifiez le nom de votre clé + - Régénérer les clés API + - Affichez l'utilisation actuelle de la clé API avec les statistiques : + - Nombre de requêtes + - Montant de GRT dépensé +2. Sous **Sécurité**, vous pourrez activer les paramètres de sécurité en fonction du niveau de contrôle que vous souhaitez avoir sur vos clés API. Dans cette rubrique, vous pouvez : + - Visualisez et gérez les noms de domaine autorisés à utiliser votre clé API + - Attribuez des subgraphs qui peuvent être interrogés avec votre clé API +3. Sous **Préférences de l'indexeur**, vous pourrez définir différentes préférences pour les indexeurs qui indexent les subgraphs pour lesquels votre clé API est utilisée. Vous pouvez attribuer jusqu'à 5 points pour chacun d'eux: + - **Vitesse la plus rapide** : temps entre la requête et la réponse d'un indexeur. Si vous marquez cela comme important, nous optimiserons les indexeurs rapides. + - **Vitesse la plus rapide** : temps entre la requête et la réponse d'un indexeur. Si vous marquez cela comme important, nous optimiserons les indexeurs rapides. + - **Fraîcheur des données** : date à laquelle le dernier bloc traité par un indexeur pour le subgraph que vous interrogez est récent. Si vous marquez cela comme important, nous optimiserons pour trouver les indexeurs avec les données les plus récentes. + - **Sécurité économique** : quantité de GRT qu'un indexeur peut perdre s'il répond de manière incorrecte à votre requête. Si vous marquez cela comme important, nous optimiserons pour les indexeurs ayant un enjeu important. +4. Sous **Budget**, vous pourrez mettre à jour le prix maximum par requête. Notez que nous avons pour cela un paramètre dynamique basé sur un algorithme de remise sur volume. **Nous vous recommandons fortement d'utiliser les paramètres par défaut, sauf si vous rencontrez un problème spécifique.** Sinon, vous pouvez les mettre à jour sous "Définir un budget maximum personnalisé". Sur cette page, vous pouvez également visualiser différents KPI (en GRT et USD) : + - Coût moyen par requête + - Requêtes ayant échoué au-dessus du prix maximum + - Requête la plus chère From 00d15a928ea4af893ec92aafef44c2a00dbf5db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:23 -0400 Subject: [PATCH 037/924] New translations managing-api-keys.mdx (Czech) --- .../pages/cs/querying/managing-api-keys.mdx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/cs/querying/managing-api-keys.mdx b/website/pages/cs/querying/managing-api-keys.mdx index ee7c274bca10..2c81f1993a65 100644 --- a/website/pages/cs/querying/managing-api-keys.mdx +++ b/website/pages/cs/querying/managing-api-keys.mdx @@ -1,25 +1,25 @@ --- -title: Managing your API keys +title: Správa klíčů API --- -Regardless of whether you’re a dapp developer or a subgraph developer, you’ll need to manage your API keys. This is important for you to be able to query subgraphs because API keys make sure the connections between application services are valid and authorized. This includes authenticating the end user and the device using the application. +Bez ohledu na to, zda jste vývojář dapp nebo podgraf, budete muset spravovat klíče API. To je důležité pro to, abyste se mohli dotazovat na podgrafy, protože klíče API zajišťují, že spojení mezi službami aplikace jsou platná a autorizovaná. To zahrnuje ověřování koncového uživatele a zařízení, které aplikaci používá. -The Studio will list out existing API keys, which will give you the ability to manage or delete them. +Studio zobrazí seznam existujících klíčů API, které můžete spravovat nebo odstraňovat. -1. The **Overview** section will allow you to: - - Edit your key name - - Regenerate API keys - - View the current usage of the API key with stats: - - Number of queries - - Amount of GRT spent -2. Under **Security**, you’ll be able to opt into security settings depending on the level of control you’d like to have over your API keys. In this section, you can: - - View and manage the domain names authorized to use your API key - - Assign subgraphs that can be queried with your API key -3. Under **Indexer Preference**, you’ll be able to set different preferences for Indexers who are indexing subgraphs that your API key is used for. You can assign up to 5 points for each of these: - - **Fastest Speed**: Time between the query and the response from an indexer. If you mark this as important we will optimize for fast indexers. - - **Lowest Price**: The amount paid per query. If you mark this as important we will optimize for the less expensive indexers. - - **Data Freshness**: How recent the latest block an indexer has processed for the subgraph you are querying. If you mark this as important we will optimize to find the indexers with the freshest data. - - **Economic Security**: The amount of GRT an indexer can lose if they respond incorrectly to your query. If you mark this as important we will optimize for indexers with a large stake. +1. Sekce **Přehled** vám umožní: + - Úprava názvu klíče + - Regenerace klíčů API + - Zobrazení aktuálního využití klíče API se statsi: + - Počet dotazů + - Výše vynaložených GRT +2. V části **Zabezpečení** budete moci zvolit nastavení zabezpečení podle úrovně kontroly, kterou chcete mít nad klíči API. V této části můžete: + - Zobrazení a správa názvů domén oprávněných používat váš klíč API + - Přiřazení podgrafů, na které se lze dotazovat pomocí klíče API +3. V části **Předvolby indexátorů** můžete nastavit různé předvolby pro indexátory, které indexují podgrafy, pro něž se používá váš klíč API. Každému z nich můžete přiřadit až 5 bodů: + - **Nejvyšší rychlost**: Doba mezi dotazem a odpovědí indexeru. Pokud tuto hodnotu označíte jako důležitou, budeme optimalizovat pro rychlé indexery. + - **Nejnižší cena**: Částka zaplacená za dotaz. Pokud tuto hodnotu označíte jako důležitou, budeme optimalizovat pro levnější indexátory. + - **Čerstvost dat**: Jak čerstvý poslední blok indexátor zpracoval pro podgraf, na který se dotazujete. Pokud tuto hodnotu označíte jako důležitou, budeme optimalizovat tak, abychom našli indexery s nejčerstvějšími daty. + - **Ekonomická bezpečnost**: Množství GRT, o které může indexátor přijít, pokud na váš dotaz odpoví nesprávně. Pokud tuto hodnotu označíte jako důležitou, budeme optimalizovat pro indexátory s velkým podílem. 4. Under **Budget**, you’ll be able to update the maximum price per query. Note that we have a dynamic setting for that that's based on a volume discounting algorithm. **We strongly recommend using the default settings unless you are experiencing a specific problem.** Otherwise, you can update it under "Set a custom maximum budget". On this page you can also view different KPIs (in GRT and USD): - Average cost per query - Failed queries over max price From c4ebce21e237de70c075513640e0dcad1f087e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:37 -0400 Subject: [PATCH 038/924] New translations about.mdx (Czech) --- website/pages/cs/about.mdx | 48 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/website/pages/cs/about.mdx b/website/pages/cs/about.mdx index c1f7c886900f..3085000b67c4 100644 --- a/website/pages/cs/about.mdx +++ b/website/pages/cs/about.mdx @@ -1,47 +1,47 @@ --- -title: About The Graph +title: O Grafu --- -This page will explain what The Graph is and how you can get started. +Tato stránka vysvětlí, co je The Graph a jak můžete začít. -## What is The Graph? +## Co je Graf? -The Graph is a decentralized protocol for indexing and querying blockchain data. The Graph makes it possible to query data that is difficult to query directly. +Grafu je decentralizovaný protokol pro indexování a dotazování dat blockchainu. Graf umožňuje dotazovat se na data, která je obtížné dotazovat přímo. -Projects with complex smart contracts like [Uniswap](https://uniswap.org/) and NFTs initiatives like [Bored Ape Yacht Club](https://boredapeyachtclub.com/) store data on the Ethereum blockchain, making it really difficult to read anything other than basic data directly from the blockchain. +Projekty se složitými chytrými smlouvami, jako je [Uniswap](https://uniswap.org/), a iniciativy NFT, jako je [Bored Ape Yacht Club](https://boredapeyachtclub.com/), ukládají data do blockchainu Etherea, takže je opravdu obtížné číst cokoli jiného než základní data přímo z blockchainu. -In the case of Bored Ape Yacht Club, we can perform basic read operations on [the contract](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code) like getting the owner of a certain Ape, getting the content URI of an Ape based on their ID, or the total supply, as these read operations are programmed directly into the smart contract, but more advanced real-world queries and operations like aggregation, search, relationships, and non-trivial filtering are not possible. For example, if we wanted to query for apes that are owned by a certain address, and filter by one of its characteristics, we would not be able to get that information by interacting directly with the contract itself. +V případě Bored Ape Yacht Club můžeme provádět základní operace čtení [smlouvy](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code), jako je získání vlastníka určitého Ape, získání URI obsahu Ape na základě jeho ID nebo celkové zásoby, protože tyto operace čtení jsou naprogramovány přímo v chytré smlouvě, ale pokročilejší dotazy a operace v reálném světě, jako je agregace, vyhledávání, vztahy a netriviální filtrování, nejsou možné. Pokud bychom se například chtěli zeptat na opice, které vlastní určitá adresa, a filtrovat je podle jedné z jejich charakteristik, nebyli bychom schopni tuto informaci získat přímou interakcí se samotným kontraktem. -To get this data, you would have to process every single [`transfer`](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code#L1746) event ever emitted, read the metadata from IPFS using the Token ID and IPFS hash, and then aggregate it. Even for these types of relatively simple questions, it would take **hours or even days** for a decentralized application (dapp) running in a browser to get an answer. +Abyste tato data získali, museli byste zpracovat každou jednotlivou událost [`přenosu`](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code#L1746), kterou jste kdy odeslali, přečíst metadata ze systému IPFS pomocí ID tokenu a hashe IPFS a poté je agregovat. I u těchto typů relativně jednoduchých otázek by decentralizované aplikaci (dapp) běžící v prohlížeči trvalo **hodiny nebo dokonce dny**, než by získala odpověď. -You could also build out your own server, process the transactions there, save them to a database, and build an API endpoint on top of it all in order to query the data. However, this option is [resource intensive](/network/benefits/), needs maintenance, presents a single point of failure, and breaks important security properties required for decentralization. +Můžete si také vytvořit vlastní server, zpracovávat na něm transakce, ukládat je do databáze a nad tím vším vytvořit koncový bod API pro dotazování na data. Tato možnost je však [náročná na zdroje](/network/benefits/), vyžaduje údržbu, představuje jediný bod selhání a porušuje důležité bezpečnostní vlastnosti potřebné pro decentralizaci. -**Indexing blockchain data is really, really hard.** +**Indexování blockchainových dat je opravdu, ale opravdu těžké.** -Blockchain properties like finality, chain reorganizations, or uncled blocks complicate this process further, and make it not just time consuming but conceptually hard to retrieve correct query results from blockchain data. +Vlastnosti blockchainu, jako je konečnost, reorganizace řetězce nebo neuzavřené bloky, tento proces dále komplikují a způsobují nejen časovou náročnost, ale i koncepční obtížnost získání správných výsledků dotazů z dat blockchainu. -The Graph solves this with a decentralized protocol that indexes and enables the performant and efficient querying of blockchain data. These APIs (indexed "subgraphs") can then be queried with a standard GraphQL API. Today, there is a hosted service as well as a decentralized protocol with the same capabilities. Both are backed by the open source implementation of [Graph Node](https://github.com/graphprotocol/graph-node). +Graf to řeší decentralizovaným protokolem, který indexuje a umožňuje výkonné a efektivní dotazování na data blockchainu. Na tato data (indexované "podgrafy") se pak lze dotazovat pomocí standardního GraphQL API. Dnes existuje hostovaná služba i decentralizovaný protokol se stejnými možnostmi. Za oběma stojí open source implementace [Uzel grafu](https://github.com/graphprotocol/graph-node). -## How The Graph Works +## Jak funguje graf -The Graph learns what and how to index Ethereum data based on subgraph descriptions, known as the subgraph manifest. The subgraph description defines the smart contracts of interest for a subgraph, the events in those contracts to pay attention to, and how to map event data to data that The Graph will store in its database. +Grafu se učí, co a jak indexovat data Ethereu, m na základě popisů podgrafů, známých jako manifest podgrafu. Popis podgrafu definuje chytré smlouvy, které jsou pro podgraf zajímavé, události v těchto smlouvách, kterým je třeba věnovat pozornost, a způsob mapování dat událostí na data, která Grafu uloží do své databáze. -Once you have written a `subgraph manifest`, you use the Graph CLI to store the definition in IPFS and tell the indexer to start indexing data for that subgraph. +Jakmile napíšete `manifest podgrafu`, použijete Graph CLI k uložení definice do IPFS a řeknete indexeru, aby začal indexovat data pro tento podgraf. -This diagram gives more detail about the flow of data once a subgraph manifest has been deployed, dealing with Ethereum transactions: +Tento diagram podrobněji popisuje tok dat po nasazení podgraf manifestu, který se zabývá transakcemi Ethereum: -![A graphic explaining how The Graph uses Graph Node to serve queries to data consumers](/img/graph-dataflow.png) +![Grafu vysvětlující, jak Graf používá Uzel grafu k doručování dotazů konzumentům dat](/img/graph-dataflow.png) -The flow follows these steps: +Průběh se řídí těmito kroky: -1. A dapp adds data to Ethereum through a transaction on a smart contract. -2. The smart contract emits one or more events while processing the transaction. -3. Graph Node continually scans Ethereum for new blocks and the data for your subgraph they may contain. -4. Graph Node finds Ethereum events for your subgraph in these blocks and runs the mapping handlers you provided. The mapping is a WASM module that creates or updates the data entities that Graph Node stores in response to Ethereum events. -5. The dapp queries the Graph Node for data indexed from the blockchain, using the node's [GraphQL endpoint](https://graphql.org/learn/). The Graph Node in turn translates the GraphQL queries into queries for its underlying data store in order to fetch this data, making use of the store's indexing capabilities. The dapp displays this data in a rich UI for end-users, which they use to issue new transactions on Ethereum. The cycle repeats. +1. Dapp přidává data do Ethereum prostřednictvím transakce na chytrém kontraktu. +2. Chytrý smlouva vysílá při zpracování transakce jednu nebo více událostí. +3. Uzel grafu neustále vyhledává nové bloky Ethereum a data pro váš podgraf, která mohou obsahovat. +4. Uzel grafu v těchto blocích vyhledá události Etherea pro váš podgraf a spustí vámi zadané mapovací obsluhy. Mapování je modul WASM, který vytváří nebo aktualizuje datové entity, které Uzel grafu ukládá v reakci na události Ethereum. +5. Aplikace dapp se dotazuje grafického uzlu na data indexovaná z blockchainu pomocí [GraphQL endpoint](https://graphql.org/learn/). Uzel Grafu zase překládá dotazy GraphQL na dotazy pro své podkladové datové úložiště, aby tato data načetl, přičemž využívá indexovací schopnosti úložiště. Dapp tato data zobrazuje v bohatém UI pro koncové uživatele, kteří je používají k vydávání nových transakcí na platformě Ethereum. Cyklus se opakuje. -## Next Steps +## Další kroky -In the following sections we will go into more detail on how to define subgraphs, how to deploy them, and how to query data from the indexes that Graph Node builds. +V následujících částech se budeme podrobněji zabývat tím, jak definovat podgrafy, jak je nasadit a jak se dotazovat na data z indexů, které Uzel grafu vytváří. Before you start writing your own subgraph, you might want to have a look at the Graph Explorer and explore some of the subgraphs that have already been deployed. The page for each subgraph contains a playground that lets you query that subgraph's data with GraphQL. From 06bd38ac12033eabf83dbbdb055adc2c2f63b383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:38 -0400 Subject: [PATCH 039/924] New translations about.mdx (Italian) --- website/pages/it/about.mdx | 48 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/website/pages/it/about.mdx b/website/pages/it/about.mdx index d7ae599345a1..2eedb3e8b80a 100644 --- a/website/pages/it/about.mdx +++ b/website/pages/it/about.mdx @@ -2,46 +2,46 @@ title: Informazioni su The Graph --- -This page will explain what The Graph is and how you can get started. +Questa pagina spiega cos'è iThe Graph e come si può iniziare. -## What is The Graph? +## Che cos'è The Graph? -The Graph is a decentralized protocol for indexing and querying blockchain data. The Graph makes it possible to query data that is difficult to query directly. +Il Graph è un protocollo decentralizzato per l'indicizzazione e query delle dati della blockchain. Il Graph permette di effettuare query dei dati difficili da effettuare query direttamente. -Projects with complex smart contracts like [Uniswap](https://uniswap.org/) and NFTs initiatives like [Bored Ape Yacht Club](https://boredapeyachtclub.com/) store data on the Ethereum blockchain, making it really difficult to read anything other than basic data directly from the blockchain. +I progetti con smart contract complessi come [Uniswap](https://uniswap.org/) e le iniziative NFT come [Bored Ape Yacht Club](https://boredapeyachtclub.com/) memorizzano i dati sulla blockchain di Ethereum, rendendo davvero difficile leggere qualcosa di diverso dai dati di base direttamente dalla blockchain. -In the case of Bored Ape Yacht Club, we can perform basic read operations on [the contract](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code) like getting the owner of a certain Ape, getting the content URI of an Ape based on their ID, or the total supply, as these read operations are programmed directly into the smart contract, but more advanced real-world queries and operations like aggregation, search, relationships, and non-trivial filtering are not possible. For example, if we wanted to query for apes that are owned by a certain address, and filter by one of its characteristics, we would not be able to get that information by interacting directly with the contract itself. +Nel caso di Bored Ape Yacht Club, possiamo eseguire operazioni di lettura di base sul [contratto](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code), come ottenere il proprietario di una certa Ape, l'URI del contenuto di un'Ape in base al suo ID o la fornitura totale, poiché queste operazioni di lettura sono programmate direttamente nello smart contract, ma non sono possibili query e operazioni più avanzate del mondo reale, come l'aggregazione, la ricerca, le relazioni e il filtraggio non banale. Ad esempio, se volessimo effettuare query delle scimmie possedute da un certo indirizzo e filtrare in base a una delle sue caratteristiche, non saremmo in grado di ottenere queste informazioni interagendo direttamente con il contratto stesso. -To get this data, you would have to process every single [`transfer`](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code#L1746) event ever emitted, read the metadata from IPFS using the Token ID and IPFS hash, and then aggregate it. Even for these types of relatively simple questions, it would take **hours or even days** for a decentralized application (dapp) running in a browser to get an answer. +Per ottenere questi dati, si dovrebbe elaborare ogni singolo evento di [`transferimento`](https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code#L1746) mai emesso, leggere i metadati da IPFS utilizzando l'ID del token e l'hash di IPFS, e poi aggregarli. Anche per questo tipo di domande relativamente semplici, ci vorrebbero **ore o addirittura giorni** per un'applicazione decentralizzata (dapp) in esecuzione in un browser per ottenere una risposta. -You could also build out your own server, process the transactions there, save them to a database, and build an API endpoint on top of it all in order to query the data. However, this option is [resource intensive](/network/benefits/), needs maintenance, presents a single point of failure, and breaks important security properties required for decentralization. +Si potrebbe anche creare un proprio server, elaborare le transazioni, salvarle in un database e creare un endpoint API per effettuare query dai dati. Tuttavia, questa opzione richiede [molte risorse](/network/benefits/), necessita di manutenzione, presenta un singolo punto di guasto e infrange importanti proprietà di sicurezza necessarie per la decentralizzazione. -**Indexing blockchain data is really, really hard.** +**L'indicizzazione dei dati della blockchain è molto, molto difficile.** -Blockchain properties like finality, chain reorganizations, or uncled blocks complicate this process further, and make it not just time consuming but conceptually hard to retrieve correct query results from blockchain data. +Le proprietà della blockchain, come la finalità, le riorganizzazioni della chain o i blocchi non selezionati, complicano ulteriormente questo processo e rendono non solo dispendioso in termini di tempo, ma anche concettualmente difficile recuperare i risultati corretti delle query dai dati della blockchain. -The Graph solves this with a decentralized protocol that indexes and enables the performant and efficient querying of blockchain data. These APIs (indexed "subgraphs") can then be queried with a standard GraphQL API. Today, there is a hosted service as well as a decentralized protocol with the same capabilities. Both are backed by the open source implementation of [Graph Node](https://github.com/graphprotocol/graph-node). +Il Graph risolve questo problema con un protocollo decentralizzato che indicizza e consente di effettuare query in modo efficiente e performante i dati della blockchain. Queste API (i "subgraph" indicizzati) possono essere interrogate con un'API GraphQL standard. Oggi esiste un hosted service e un protocollo decentralizzato con le stesse funzionalità. Entrambi sono supportati dall'implementazione open source di [Graph Node](https://github.com/graphprotocol/graph-node). -## How The Graph Works +## Come funziona il Graph -The Graph learns what and how to index Ethereum data based on subgraph descriptions, known as the subgraph manifest. The subgraph description defines the smart contracts of interest for a subgraph, the events in those contracts to pay attention to, and how to map event data to data that The Graph will store in its database. +The Graph impara cosa e come indicizzare i dati di Ethereum in base alle descrizioni dei subgraph, note come manifesto del subgraph. La descrizione del subgraph definisce gli smart contract di interesse per un subgraph, gli eventi di quei contratti a cui prestare attenzione e come mappare i dati degli eventi ai dati che The Graph memorizzerà nel suo database. -Once you have written a `subgraph manifest`, you use the Graph CLI to store the definition in IPFS and tell the indexer to start indexing data for that subgraph. +Una volta scritto un `subgraph manifest`, si usa la Graph CLI per memorizzare la definizione in IPFS e dire all'Indexer di iniziare l'indicizzazione dei dati per quel subgraph. -This diagram gives more detail about the flow of data once a subgraph manifest has been deployed, dealing with Ethereum transactions: +Questo diagramma fornisce maggiori dettagli sul flusso di dati una volta che è stato distribuito un subgraph manifest, che tratta le transazioni Ethereum: -![A graphic explaining how The Graph uses Graph Node to serve queries to data consumers](/img/graph-dataflow.png) +![Un grafico che spiega come The Graph utilizza Graph Node per servire le query ai consumatori di dati](/img/graph-dataflow.png) -The flow follows these steps: +Il flusso segue questi passi: -1. A dapp adds data to Ethereum through a transaction on a smart contract. -2. The smart contract emits one or more events while processing the transaction. -3. Graph Node continually scans Ethereum for new blocks and the data for your subgraph they may contain. -4. Graph Node finds Ethereum events for your subgraph in these blocks and runs the mapping handlers you provided. The mapping is a WASM module that creates or updates the data entities that Graph Node stores in response to Ethereum events. -5. The dapp queries the Graph Node for data indexed from the blockchain, using the node's [GraphQL endpoint](https://graphql.org/learn/). The Graph Node in turn translates the GraphQL queries into queries for its underlying data store in order to fetch this data, making use of the store's indexing capabilities. The dapp displays this data in a rich UI for end-users, which they use to issue new transactions on Ethereum. The cycle repeats. +1. Una dapp aggiunge dati a Ethereum attraverso una transazione su uno smart contract. +2. Lo smart contract emette uno o più eventi durante l'elaborazione della transazione. +3. Graph Node scansiona continuamente Ethereum alla ricerca di nuovi blocchi e dei dati del vostro subgraph che possono contenere. +4. Graph Node trova gli eventi Ethereum per il vostro subgraph in questi blocchi ed esegue i gestori di mappatura che avete fornito. La mappatura è un modulo WASM che crea o aggiorna le entità di dati che Graph Node memorizza in risposta agli eventi Ethereum. +5. La dapp effettua query del Graph Node per ottenere dati indicizzati dalla blockchain, utilizzando il [ GraphQL endpoint del nodo](https://graphql.org/learn/). Il Graph Node a sua volta traduce le query GraphQL in query per il suo archivio dati sottostante, al fine di recuperare questi dati, sfruttando le capacità di indicizzazione dell'archivio. La dapp visualizza questi dati in una ricca interfaccia utente per gli utenti finali, che li utilizzano per emettere nuove transazioni su Ethereum. Il ciclo si ripete. -## Next Steps +## I prossimi passi -In the following sections we will go into more detail on how to define subgraphs, how to deploy them, and how to query data from the indexes that Graph Node builds. +Nelle sezioni che seguono si approfondirà come definire i subgraph, come distribuirli e come effettuare query dai dati dagli indici creati da Graph Node. -Before you start writing your own subgraph, you might want to have a look at the Graph Explorer and explore some of the subgraphs that have already been deployed. The page for each subgraph contains a playground that lets you query that subgraph's data with GraphQL. +Prima di iniziare a scrivere il proprio subgraph, si potrebbe dare un'occhiata al Graph Explorer ed esplorare alcuni dei subgraph già distribuiti. La pagina di ogni subgraph contiene un playground che consente di effettuare query dai dati di quel subgraph con GraphQL. From 576b546da491d87c87d4e770fd9eab42f976e900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:40 -0400 Subject: [PATCH 040/924] New translations about.mdx (Dutch) --- website/pages/nl/about.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/nl/about.mdx b/website/pages/nl/about.mdx index c1f7c886900f..910af7c90dfc 100644 --- a/website/pages/nl/about.mdx +++ b/website/pages/nl/about.mdx @@ -1,5 +1,5 @@ --- -title: About The Graph +title: Over The Graph --- This page will explain what The Graph is and how you can get started. From e0f94b3f597e43052cbcb5059c1488ebf5c03424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:49 -0400 Subject: [PATCH 041/924] New translations arweave.mdx (French) --- website/pages/fr/cookbook/arweave.mdx | 180 +++++++++++++------------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/website/pages/fr/cookbook/arweave.mdx b/website/pages/fr/cookbook/arweave.mdx index 86998f478c1e..deaa7a769ecd 100644 --- a/website/pages/fr/cookbook/arweave.mdx +++ b/website/pages/fr/cookbook/arweave.mdx @@ -2,7 +2,7 @@ title: Construction de subgraphs pour Arweave --- -> Arweave support in Graph Node and on the hosted service is in beta: please reach us on [Discord](https://discord.gg/graphprotocol) with any questions about building Arweave subgraphs! +> Le support d'Arweave dans Graph Node et sur le service hébergé est en version bêta : veuillez nous contacter sur [Discord](https://discord.gg/graphprotocol) pour toute question concernant la création de subgraphs sur Arweave ! Dans ce guide, vous apprendrez comment créer et déployer des subgraphs pour indexer la blockchain Arweave. @@ -58,28 +58,28 @@ $ graph build # génère le Web Assembly à partir des fichiers AssemblyScript, Le manifeste du subgraph `subgraph.yaml` identifie les sources de données pour le subgraph, les déclencheurs d'intérêt, et les fonctions qui doivent être exécutées en réponse à ces déclencheurs. Ci-dessous un exemple de manifeste pour un subgraph visant Arweave : ```yaml -version spec: 0.0.5 -description: Indexation des blocs Arweave -schéma: - fichier: ./schema.graphql # lien vers le fichier de schéma -les sources de données: - - genre: arweave - nom: arweave-blocks - réseau: arweave-mainnet # Le Graph prend uniquement en charge Arweave Mainnet +specVersion: 0.0.5 +description: Arweave Blocks Indexing +schema: + file: ./schema.graphql # lien vers le fichier de schéma +dataSources: + - kind: arweave + name: arweave-blocks + network: arweave-mainnet # The Graph ne supporte que le Arweave Mainnet source: - Owner: 'ID-OF-AN-OWNER' # La clé publique d'un portefeuille Arweave - startBlock: 0 # réglez-le sur 0 pour démarrer l'indexation à partir de la genèse de la chaîne - cartographie: - Version API: 0.0.5 - langage: wasm/assemblyscript - fichier: ./src/blocks.ts # lien vers le fichier avec les mappages Assemblyscript - entités: - - Bloc + owner: 'ID-OF-AN-OWNER' # La clé publique d'un porte-monnaie Arweave + startBlock: 0 # mettez cette valeur à 0 pour commencer l'indexation à partir de la genèse de la chaîne. + mapping: + apiVersion: 0.0.5 + language: wasm/assemblyscript + file: ./src/blocks.ts # lien vers le fichier contenant les mappages d'Assemblyscript + entities: + - Block - Transaction - gestionnaires de blocs: - - handler: handleBlock # le nom de la fonction dans le fichier de mappage - Gestionnaires de transactions: - - handler: handleTx # le nom de la fonction dans le fichier de mappage + blockHandlers: + - handler: handleBlock # le nom de la fonction dans le fichier de mapping + transactionHandlers: + - handler: handleTx # le nom de la fonction dans le fichier de mapping ``` - Les subgraphs Arweave introduisent un nouveau type de source de données (`arweave`) @@ -108,41 +108,41 @@ Les gestionnaires pour le traitement des événements sont écrits en [AssemblyS L'indexation Arweave introduit des types de données spécifiques à Arweave dans l'[API AssemblyScript](/developing/assemblyscript-api/). ```tsx -bloc de classe { - horodatage : u64 - dernière cible : u64 - taille : u64 - indepHash : octets - occasionnel : octets - bloc précédent : octets - diff : octets - hachage : octets - txRoot : octets - txs : octets[] - liste de portefeuilles : octets - récompenseAddr : octets - balises : Balise[] - pool de récompenses : octets - weaveSize : octets - taille du bloc : octets - cumulativeDiff : octets - hashListMerkle : octets - poa : Preuve d'accès +class Block { + timestamp: u64 + lastRetarget: u64 + height: u64 + indepHash: Bytes + nonce: Bytes + previousBlock: Bytes + diff: Bytes + hash: Bytes + txRoot: Bytes + txs: Bytes[] + walletList: Bytes + rewardAddr: Bytes + tags: Tag[] + rewardPool: Bytes + weaveSize: Bytes + blockSize: Bytes + cumulativeDiff: Bytes + hashListMerkle: Bytes + poa: ProofOfAccess } -classe Transaction { - format : u32 - identifiant : octets - lastTx : octets - propriétaire : octets - balises : Balise[] - cible : octets - quantité : octets - données : octets - taille des données : octets - dataRoot : octets - signature : octets - récompense : octets +class Transaction { + format: u32 + id: Bytes + lastTx: Bytes + owner: Bytes + tags: Tag[] + target: Bytes + quantity: Bytes + data: Bytes + dataSize: Bytes + dataRoot: Bytes + signature: Bytes + reward: Bytes } ``` @@ -194,46 +194,46 @@ La fonction d'assistance `bytesToBase64(bytes: Uint8Array, urlSafe: boolean): st ``` const base64Alphabet = [ - "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M ", - "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z". ", - "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m ", - "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z ", - "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/" + "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", + "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", + "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", + "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", + "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/" ]; const base64UrlAlphabet = [ - "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M ", - "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z". ", - "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m ", - "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z ", - "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", "_" + "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", + "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", + "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", + "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", + "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", "_" ]; -function bytesToBase64 (octets : Uint8Array, urlSafe : booléen) : chaîne { - laisser alphabet = urlSafe ? base64UrlAlphabet : base64Alphabet; - - soit result = '', i: i32, l = bytes.length; - pour (je = 2 ; je < l ; je += 3) { - résultat += alphabet[octets[i - 2] >> 2]; - résultat += alphabet[((octets[i - 2] & 0x03) << 4) | (octets[i - 1] >> 4)] ; - résultat += alphabet[((octets[i - 1] & 0x0F) << 2) | (octets[i] >> 6)] ; - résultat += alphabet[octets[i] & 0x3F] ; - } - if (i === l + 1) { // 1 octet restant à écrire - résultat += alphabet[octets[i - 2] >> 2]; - résultat += alphabet[(octets[i - 2] & 0x03) << 4]; - si (!urlSafe) { - résultat += "=="; - } - } - if (!urlSafe && i === l) { // Il reste encore 2 octets à écrire - résultat += alphabet[octets[i - 2] >> 2]; - résultat += alphabet[((octets[i - 2] & 0x03) << 4) | (octets[i - 1] >> 4)] ; - résultat += alphabet[(octets[i - 1] & 0x0F) << 2]; - si (!urlSafe) { - résultat += "="; - } - } - renvoyer le résultat ; +function bytesToBase64(bytes: Uint8Array, urlSafe: boolean): string { + let alphabet = urlSafe? base64UrlAlphabet : base64Alphabet; + + let result = '', i: i32, l = bytes.length; + for (i = 2; i < l; i += 3) { + result += alphabet[bytes[i - 2] >> 2]; + result += alphabet[((bytes[i - 2] & 0x03) << 4) | (bytes[i - 1] >> 4)]; + result += alphabet[((bytes[i - 1] & 0x0F) << 2) | (bytes[i] >> 6)]; + result += alphabet[bytes[i] & 0x3F]; + } + if (i === l + 1) { // 1 octet yet to write + result += alphabet[bytes[i - 2] >> 2]; + result += alphabet[(bytes[i - 2] & 0x03) << 4]; + if (!urlSafe) { + result += "=="; + } + } + if (!urlSafe && i === l) { // 2 octets yet to write + result += alphabet[bytes[i - 2] >> 2]; + result += alphabet[((bytes[i - 2] & 0x03) << 4) | (bytes[i - 1] >> 4)]; + result += alphabet[(bytes[i - 1] & 0x0F) << 2]; + if (!urlSafe) { + result += "="; + } + } + return result; } ``` From 7cda9d29d2631c8affad3c8e649654ab257c401a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:51 -0400 Subject: [PATCH 042/924] New translations arweave.mdx (Czech) --- website/pages/cs/cookbook/arweave.mdx | 116 +++++++++++++------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/website/pages/cs/cookbook/arweave.mdx b/website/pages/cs/cookbook/arweave.mdx index f6fb3a8b2ce3..d6592765d10e 100644 --- a/website/pages/cs/cookbook/arweave.mdx +++ b/website/pages/cs/cookbook/arweave.mdx @@ -1,61 +1,61 @@ --- -title: Building Subgraphs on Arweave +title: Vytváření podgrafů na Arweave --- -> Arweave support in Graph Node and on the hosted service is in beta: please reach us on [Discord](https://discord.gg/graphprotocol) with any questions about building Arweave subgraphs! +> Podpora Arweave v Graph Node a v hostované službě je ve fázi beta: s případnými dotazy ohledně vytváření podgrafů Arweave se na nás obraťte na [Discord](https://discord.gg/graphprotocol)! -In this guide, you will learn how to build and deploy Subgraphs to index the Arweave blockchain. +V této příručce se dozvíte, jak vytvořit a nasadit subgrafy pro indexování blockchainu Arweave. -## What is Arweave? +## Co je Arweave? -The Arweave protocol allows developers to store data permanently and that is the main difference between Arweave and IPFS, where IPFS lacks the feature; permanence, and files stored on Arweave can't be changed or deleted. +Protokol Arweave umožňuje vývojářům ukládat data trvale a to je hlavní rozdíl mezi Arweave a IPFS, kde IPFS tuto funkci postrádá; trvalé uložení a soubory uložené na Arweave nelze měnit ani mazat. -Arweave already has built numerous libraries for integrating the protocol in a number of different programming languages. For more information you can check: +Společnost Arweave již vytvořila řadu knihoven pro integraci protokolu do řady různých programovacích jazyků. Další informace naleznete zde: - [Arwiki](https://arwiki.wiki/#/en/main) -- [Arweave Resources](https://www.arweave.org/build) +- [Zdroje Arweave](https://www.arweave.org/build) -## What are Arweave Subgraphs? +## Co jsou podgrafy Arweave? -The Graph allows you to build custom open APIs called "Subgraphs". Subgraphs are used to tell indexers (server operators) which data to index on a blockchain and save on their servers in order for you to be able to query it at any time using [GraphQL](https://graphql.org/). +Graf umožňuje vytvářet vlastní otevřené rozhraní API zvané "podgrafy". Subgrafy slouží k tomu, aby indexerům (provozovatelům serverů) sdělily, která data mají indexovat v blockchainu a uložit na svých serverech, abyste se na ně mohli kdykoli dotazovat pomocí [GraphQL](https://graphql.org/). -[Graph Node](https://github.com/graphprotocol/graph-node) is now able to index data on Arweave protocol. The current integration is only indexing Arweave as a blockchain (blocks and transactions), it is not indexing the stored files yet. +[Graph Node](https://github.com/graphprotocol/graph-node) nyní umí indexovat data na protokolu Arweave. Současná integrace indexuje pouze Arweave jako blockchain (bloky a transakce), zatím neindexuje uložené soubory. -## Building an Arweave Subgraph +## Vytvoření podgrafu Arweave -To be able to build and deploy Arweave Subgraphs, you need two packages: +Abyste mohli sestavit a nasadit Arweave Subgraphs, potřebujete dva balíčky: -1. `@graphprotocol/graph-cli` above version 0.30.2 - This is a command-line tool for building and deploying subgraphs. [Click here](https://www.npmjs.com/package/@graphprotocol/graph-cli) to download using `npm`. -2. `@graphprotocol/graph-ts` above version 0.27.0 - This is library of subgraph-specific types. [Click here](https://www.npmjs.com/package/@graphprotocol/graph-ts) to download using `npm`. +1. `@graphprotocol/graph-cli` nad verzí 0.30.2 - Jedná se o nástroj příkazového řádku pro sestavování a nasazování subgrafů. [Klikněte sem](https://www.npmjs.com/package/@graphprotocol/graph-cli) a stáhněte si pomocí `npm`. +2. `@graphprotocol/graph-ts` nad verzí 0.27.0 – Toto je knihovna typů specifických pro podgrafy. [Klikněte sem](https://www.npmjs.com/package/@graphprotocol/graph-ts) a stáhněte si pomocí `npm`. -## Subgraph's components +## Komponenty podgrafu -There are three components of a subgraph: +Podgraf má tři Komponenty: ### 1. Manifest - `subgraph.yaml` -Defines the data sources of interest, and how they should be processed. Arweave is a new kind of data source. +Definuje zdroje dat, které jsou předmětem zájmu, a způsob jejich zpracování. Arweave je nový druh datového zdroje. ### 2. Schema - `schema.graphql` -Here you define which data you want to be able to query after indexing your Subgraph using GraphQL. This is actually similar to a model for an API, where the model defines the structure of a request body. +Zde definujete, na která data se chcete po indexování subgrafu pomocí jazyka GraphQL dotazovat. Je to vlastně podobné modelu pro API, kde model definuje strukturu těla požadavku. -The requirements for Arweave subgraphs are covered by the [existing documentation](/developing/creating-a-subgraph/#the-graphql-schema). +Požadavky na podgrafy Arweave jsou popsány v [existující dokumentaci](/vývoj/vytvoření-podgrafu/#the-graphql-schema). ### 3. AssemblyScript Mappings - `mapping.ts` -This is the logic that determines how data should be retrieved and stored when someone interacts with the data sources you are listening to. The data gets translated and is stored based off the schema you have listed. +Jedná se o logiku, která určuje, jak mají být data načtena a uložena, když někdo komunikuje se zdroji dat, kterým nasloucháte. Data se přeloží a uloží na základě schématu, které jste uvedli. -During subgraph development there are two key commands: +Při vývoji podgrafů existují dva klíčové příkazy: ``` -$ graph codegen # generates types from the schema file identified in the manifest -$ graph build # generates Web Assembly from the AssemblyScript files, and prepares all the subgraph files in a /build folder +$ graph codegen # generuje typy ze souboru se schématem identifikovaným v manifestu +$ graph build # vygeneruje webové sestavení ze souborů AssemblyScript a připraví všechny dílčí soubory do složky /build ``` -## Subgraph Manifest Definition +## Definice podgrafu Manifest -The subgraph manifest `subgraph.yaml` identifies the data sources for the subgraph, the triggers of interest, and the functions that should be run in response to those triggers. See below for an example subgraph manifest for an Arweave subgraph: +Manifest podgrafu `subgraph.yaml` identifikuje zdroje dat pro podgraf, zajímavé spouštěče a funkce, které by měly být spuštěny v reakci na tyto spouštěče. Příklad manifestu podgrafu pro podgraf Arweave naleznete níže: ```yaml specVersion: 0.0.5 @@ -82,30 +82,30 @@ dataSources: - handler: handleTx # the function name in the mapping file ``` -- Arweave subgraphs introduce a new kind of data source (`arweave`) -- The network should correspond to a network on the hosting Graph Node. On the hosted service, Arweave's mainnet is `arweave-mainnet` -- Arweave data sources introduce an optional source.owner field, which is the public key of an Arweave wallet +- Podgrafy Arweave zavádějí nový druh datového zdroje (`arweave`) +- Síť by měla odpovídat síti v hostitelském uzlu Graph Node. V hostované službě je hlavní síť Arweave `arweave-mainnet` +- Zdroje dat Arweave obsahují nepovinné pole source.owner, což je veřejný klíč peněženky Arweave -Arweave data sources support two types of handlers: +Datové zdroje Arweave podporují dva typy zpracovatelů: -- `blockHandlers` - Run on every new Arweave block. No source.owner is required. -- `transactionHandlers` - Run on every transaction where the data source's `source.owner` is the owner. Currently an owner is required for `transactionHandlers`, if users want to process all transactions they should provide "" as the `source.owner` +- `blockHandlers` - Spustí se při každém novém bloku Arweave. Není vyžadován source.owner. +- `transactionHandlers` - Spustí se u každé transakce, jejíž vlastníkem je `source.owner` zdroje dat. V současné době je pro `transactionHandlers` vyžadován vlastník, pokud uživatelé chtějí zpracovávat všechny transakce, měli by jako `source.owner` uvést "" -> The source.owner can be the owner's address, or their Public Key. +> Source.owner může být adresa vlastníka nebo jeho veřejný klíč. -> Transactions are the building blocks of the Arweave permaweb and they are objects created by end-users. +> Transakce jsou stavebními kameny permaweb Arweave a jsou to objekty vytvořené koncovými uživateli. -> Note: [Bundlr](https://bundlr.network/) transactions are not supported yet. +> Poznámka: [Bundlr](https://bundlr.network/) transakce zatím nejsou podporovány. -## Schema Definition +## Schema definice -Schema definition describes the structure of the resulting subgraph database and the relationships between entities. This is agnostic of the original data source. There are more details on the subgraph schema definition [here](/developing/creating-a-subgraph/#the-graphql-schema). +Definice schématu popisuje strukturu výsledné databáze podgrafu a vztahy mezi entitami. Toto je nezávislé na původním zdroji dat. Více podrobností o definici schématu podgrafu naleznete [zde](/developing/creating-a-subgraph/#the-graphql-schema). ## AssemblyScript Mappings -The handlers for processing events are written in [AssemblyScript](https://www.assemblyscript.org/). +Obslužné programy pro zpracování událostí jsou napsány v jazyce [AssemblyScript](https://www.assemblyscript.org/). -Arweave indexing introduces Arweave-specific data types to the [AssemblyScript API](/developing/assemblyscript-api/). +Indexování Arweave zavádí do [AssemblyScript API](/developing/assemblyscript-api/) datové typy specifické pro Arweave. ```tsx class Block { @@ -146,51 +146,51 @@ class Transaction { } ``` -Block handlers receive a `Block`, while transactions receive a `Transaction`. +Obsluhy bloků obdrží `Block`, zatímco transakce obdrží `Transaction`. -Writing the mappings of an Arweave Subgraph is very similar to writing the mappings of an Ethereum Subgraph. For more information, click [here](/developing/creating-a-subgraph/#writing-mappings). +Zápis mapování podgrafu Arweave je velmi podobný psaní mapování podgrafu Ethereum. Další informace získáte kliknutím [sem](/developing/creating-a-subgraph/#writing-mappings). -## Deploying an Arweave Subgraph on the hosted service +## Nasazení podgrafu Arweave v hostované službě -Once your subgraph has been created on the hosted service dashboard, you can deploy by using the `graph deploy` CLI command. +Jakmile je podgraf vytvořen na panelu hostované služby, můžete jej nasadit pomocí příkazu `graph deploy` CLI. ```bash graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token ``` -## Querying an Arweave Subgraph +## Dotazování podgrafu Arweave -The GraphQL endpoint for Arweave subgraphs is determined by the schema definition, with the existing API interface. Please visit the [GraphQL API documentation](/querying/graphql-api/) for more information. +Koncový bod GraphQL pro podgrafy Arweave je určen definicí schématu se stávajícím rozhraním API. Další informace naleznete v [dokumentaci rozhraní GraphQL API](/querying/graphql-api/). -## Example Subgraphs +## Příklad podgrafů -Here is an example subgraph for reference: +Zde je příklad podgrafu pro referenci: -- [Example subgraph for Arweave](https://github.com/graphprotocol/graph-tooling/tree/main/examples/arweave-blocks-transactions) +- [Příklad podgrafu pro Arweave](https://github.com/graphprotocol/graph-tooling/tree/main/examples/arweave-blocks-transactions) ## FAQ -### Can a subgraph index Arweave and other chains? +### Může podgraf indexovat Arweave a další řetězce? -No, a subgraph can only support data sources from one chain/network. +Ne, podgraf může podporovat zdroje dat pouze z jednoho řetězce/sítě. -### Can I index the stored files on Arweave? +### Mohu indexovat uložené soubory v Arweave? -Currently, The Graph is only indexing Arweave as a blockchain (its blocks and transactions). +V současné době The Graph indexuje pouze Arweave jako blockchain (jeho bloky a transakce). -### Can I identify Bundlr bundles in my subgraph? +### Mohu identifikovat svazky Bundlr ve svém podgrafu? -This is not currently supported. +Toto není aktuálně podporováno. -### How can I filter transactions to a specific account? +### Jak mohu filtrovat transakce na určitý účet? -The source.owner can be the user's public key or account address. +Source.owner může být veřejný klíč uživatele nebo adresa účtu. -### What is the current encryption format? +### Jaký je aktuální formát šifrování? -Data is generally passed into the mappings as Bytes, which if stored directly is returned in the subgraph in a `hex` format (ex. block and transaction hashes). You may want to convert to a `base64` or `base64 URL`-safe format in your mappings, in order to match what is displayed in block explorers like [Arweave Explorer](https://viewblock.io/arweave/). +Data jsou obvykle předávána do mapování jako byty (Bytes), které jsou, pokud jsou uloženy přímo, vráceny v podgrafu ve formátu `hex` (např. hashe bloků a transakcí). Mohlo by být vhodné převést je do formátu `base64` nebo `base64 URL`-safe ve vašich mapovacích funkcích, aby odpovídaly tomu, co je zobrazeno v prohlížečích bloků, například v [Arweave Explorer](https://viewblock.io/arweave/). -The following `bytesToBase64(bytes: Uint8Array, urlSafe: boolean): string` helper function can be used, and will be added to `graph-ts`: +Lze použít následující pomocnou funkci `bytesToBase64(bytes: Uint8Array, urlSafe: boolean): string`, která bude přidána do `graph-ts`: ``` const base64Alphabet = [ From b7f0163fd3f2f6485e2b6ee0bb5ff9fa61cec688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:54 -0400 Subject: [PATCH 043/924] New translations arweave.mdx (Japanese) --- website/pages/ja/cookbook/arweave.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/ja/cookbook/arweave.mdx b/website/pages/ja/cookbook/arweave.mdx index fda55c355fa8..a6b872c2bd06 100644 --- a/website/pages/ja/cookbook/arweave.mdx +++ b/website/pages/ja/cookbook/arweave.mdx @@ -2,7 +2,7 @@ title: Arweaveでのサブグラフ構築 --- -> Arweave support in Graph Node and on the hosted service is in beta: please reach us on [Discord](https://discord.gg/graphprotocol) with any questions about building Arweave subgraphs! +> Graph NodeとホスティングサービスでのArweaveサポートはベータ版です。Arweaveサブグラフの構築に関するご質問は[Discord](https://discord.gg/graphprotocol)までご連絡ください! このガイドでは、Arweaveブロックチェーンのインデックスを作成するためのサブグラフの構築とデプロイ方法について学びます。 @@ -83,7 +83,7 @@ dataSources: ``` - Arweave サブグラフは新しい種類のデータ ソースを導入します (`arweave`) -- The network should correspond to a network on the hosting Graph Node. On the hosted service, Arweave's mainnet is `arweave-mainnet` +- ネットワークはホスティングするグラフノード上のネットワークに対応する必要があります。ホストされているサービスでは、Arweaveのメインネットは`arweave-mainnet`です。 - Arweave データ ソースには、オプションの source.owner フィールドが導入されています。これは、Arweave ウォレットの公開鍵です。 Arweaveデータソースは 2 種類のハンドラーをサポートしています: @@ -150,9 +150,9 @@ class Transaction { Arweave サブグラフのマッピングの記述は、Ethereum サブグラフのマッピングの記述と非常に似ています。詳細については、[こちら](/developing/creating-a-subgraph/#writing-mappings)をクリックしてください。 -## Deploying an Arweave Subgraph on the hosted service +## Arweaveサブグラフをホストされたサービスにデプロイ -Once your subgraph has been created on the hosted service dashboard, you can deploy by using the `graph deploy` CLI command. +ホスティングサービス・ダッシュボード上にサブグラフが作成されると、`graph deploy` CLIコマンドを使用してデプロイすることができます。 ```bash graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token From e883d8b803de69e3168d5a567c56ca18bdec4f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:55 -0400 Subject: [PATCH 044/924] New translations arweave.mdx (Dutch) --- website/pages/nl/cookbook/arweave.mdx | 98 +++++++++++++-------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/website/pages/nl/cookbook/arweave.mdx b/website/pages/nl/cookbook/arweave.mdx index f6fb3a8b2ce3..8636cc9d4923 100644 --- a/website/pages/nl/cookbook/arweave.mdx +++ b/website/pages/nl/cookbook/arweave.mdx @@ -1,95 +1,95 @@ --- -title: Building Subgraphs on Arweave +title: Bouwen van Subgraphs op Arweave --- -> Arweave support in Graph Node and on the hosted service is in beta: please reach us on [Discord](https://discord.gg/graphprotocol) with any questions about building Arweave subgraphs! +> Arweave ondersteuning in Graph Node en op de hosted service is in beta: Je kunt ons vinden op [Discord](https://discord.gg/graphprotocol) met elke vraag over Arweave subgraphs! -In this guide, you will learn how to build and deploy Subgraphs to index the Arweave blockchain. +In deze gids, zul je leren hoe je Subgraphs bouwt en implementeer om de Arweave blockchain te indexeren. -## What is Arweave? +## Wat is Arweave? -The Arweave protocol allows developers to store data permanently and that is the main difference between Arweave and IPFS, where IPFS lacks the feature; permanence, and files stored on Arweave can't be changed or deleted. +Het Arweave protocol stelt ontwikkelaars in staat om gegevens permanent op te slaan, dat is het voornaamste verschil tussen Arweave en IPFS, waar IPFS deze functie mist, en bestanden die op Arweave zijn opgeslagen, kunnen niet worden gewijzigd of verwijderd. -Arweave already has built numerous libraries for integrating the protocol in a number of different programming languages. For more information you can check: +Arweave heeft al talloze bibliotheken gebouwd voor het integreren van het protocol in verschillende programmeertalen. Voor meer informatie kun je kijken op: - [Arwiki](https://arwiki.wiki/#/en/main) -- [Arweave Resources](https://www.arweave.org/build) +- [Arweave Bronnen](https://www.arweave.org/build) -## What are Arweave Subgraphs? +## Wat zijn Arweave Subgraphs? -The Graph allows you to build custom open APIs called "Subgraphs". Subgraphs are used to tell indexers (server operators) which data to index on a blockchain and save on their servers in order for you to be able to query it at any time using [GraphQL](https://graphql.org/). +The Graph stelt je in staat om aangepaste open API's genaamd "Subgraphs" te bouwen. Subgraphs worden gebruikt om indexers (serveroperators) te vertellen welke gegevens ze moeten indexeren op een blockchain en op hun servers moeten opslaan, zodat je deze op elk gewenst moment kunt opvragen met behulp van [GraphQL](https://graphql.org/). -[Graph Node](https://github.com/graphprotocol/graph-node) is now able to index data on Arweave protocol. The current integration is only indexing Arweave as a blockchain (blocks and transactions), it is not indexing the stored files yet. +[Graph Node](https://github.com/graphprotocol/graph-node) kan nu gegevens indexeren op het Arweave protocol. De huidige integratie indexeert alleen Arweave als een blockchain (blokken en transacties), het indexeert nog niet de opgeslagen bestanden. -## Building an Arweave Subgraph +## Bouwen van een Arweave Subgraph -To be able to build and deploy Arweave Subgraphs, you need two packages: +Voor het kunnen bouwen en implementeren van Arweave Subgraphs, heb je twee paketten nodig: -1. `@graphprotocol/graph-cli` above version 0.30.2 - This is a command-line tool for building and deploying subgraphs. [Click here](https://www.npmjs.com/package/@graphprotocol/graph-cli) to download using `npm`. -2. `@graphprotocol/graph-ts` above version 0.27.0 - This is library of subgraph-specific types. [Click here](https://www.npmjs.com/package/@graphprotocol/graph-ts) to download using `npm`. +1. `@graphprotocol/graph-cli` hierboven versie 0.30.2 - dit is een command-line tool voor het bouwen en implementeren van Subgraphs. The source.owner can be the owner's address, or their Public Key. From 6c7104f8a8d003cd315398c506337517a6baf4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:57 -0400 Subject: [PATCH 045/924] New translations arweave.mdx (Portuguese) --- website/pages/pt/cookbook/arweave.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/pages/pt/cookbook/arweave.mdx b/website/pages/pt/cookbook/arweave.mdx index 9e412c51fcb0..1799ed4b4819 100644 --- a/website/pages/pt/cookbook/arweave.mdx +++ b/website/pages/pt/cookbook/arweave.mdx @@ -2,7 +2,7 @@ title: Construindo Subgraphs no Arweave --- -> Arweave support in Graph Node and on the hosted service is in beta: please reach us on [Discord](https://discord.gg/graphprotocol) with any questions about building Arweave subgraphs! +> O apoio ao Arweave no Graph Node e no serviço hospedado está em beta: por favor nos contacte no [Discord](https://discord.gg/graphprotocol) se tiver alguma pergunta sobre a construção de subgraphs no Arweave! Neste guia, você aprenderá como construir e lançar Subgraphs para indexar a blockchain Arweave. @@ -83,10 +83,10 @@ dataSources: ``` - Subgraphs no Arweave introduzem uma nova categoria de fonte de dados (`arweave`) -- The network should correspond to a network on the hosting Graph Node. On the hosted service, Arweave's mainnet is `arweave-mainnet` +- A rede deve corresponder a uma rede no Graph Node que a hospeda. No serviço hospedado, a mainnet do Arweave é `arweave-mainnet` - Fontes de dados no Arweave introduzem um campo `source.owner` opcional, a chave pública de uma carteira no Arweave -Fontes de dados no Arweave apoiam duas categorias de _handlers_: +Fontes de dados no Arweave apoiam duas categorias de *handlers*: - `blockHandlers` - Executar em cada bloco novo no Arweave. Nenhum `source.owner` é exigido. - `transactionHandlers` — Executar em todas as transações onde o `source.owner` da fonte de dados é o dono. Atualmente, um dono é exigido para o `transactionHandlers`; caso utilizadores queiram processar todas as transações, eles devem providenciar "" como o `source.owner` @@ -97,15 +97,15 @@ Fontes de dados no Arweave apoiam duas categorias de _handlers_: > Nota: Transações no [Bundlr](https://bundlr.network/) não são apoiadas presentemente. -## Definição de _Schema_ +## Definição de *Schema* A definição de Schema descreve a estrutura do banco de dados resultado do subgraph, e os relacionamentos entre entidades. Isto é agnóstico da fonte de dados original. Há mais detalhes na definição de schema de subgraph [aqui](/developing/creating-a-subgraph/#the-graphql-schema). ## Mapeamentos de AssemblyScript -Os _handlers_ para eventos de processamento são escritos em [AssemblyScript](https://www.assemblyscript.org/). +Os *handlers* para eventos de processamento são escritos em [AssemblyScript](https://www.assemblyscript.org/). -O _indexing_ do Arweave introduz categorias de dados específicas ao Arweave ao [API do AssemblyScript](/developing/assemblyscript-api/). +O *indexing* do Arweave introduz categorias de dados específicas ao Arweave ao [API do AssemblyScript](/developing/assemblyscript-api/). ```tsx class Block { @@ -146,13 +146,13 @@ class Transaction { } ``` -_Handlers_ de bloco recebem um `Block`, enquanto transações recebem uma `Transaction`. +*Handlers* de bloco recebem um `Block`, enquanto transações recebem uma `Transaction`. Escrever os mapeamentos de um Subgraph no Arweave é muito similar à escrita dos mapeamentos de um Subgraph no Ethereum. Para mais informações, clique [aqui](/developing/creating-a-subgraph/#writing-mappings). -## Deploying an Arweave Subgraph on the hosted service +## Como lançar um subgraph do Arweave no serviço hospedado -Once your subgraph has been created on the hosted service dashboard, you can deploy by using the `graph deploy` CLI command. +Após criar o seu Subgraph no painel de controlo do serviço hospedado, você pode lançá-lo com o código de linha de comando `graph deploy`. ```bash graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --token-de-acesso From 5c8729cb6def510bc22e9a9bafe0d87145f7614a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:02:59 -0400 Subject: [PATCH 046/924] New translations arweave.mdx (Turkish) --- website/pages/tr/cookbook/arweave.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/tr/cookbook/arweave.mdx b/website/pages/tr/cookbook/arweave.mdx index 3dc882d5d44c..edb53c4e6f51 100644 --- a/website/pages/tr/cookbook/arweave.mdx +++ b/website/pages/tr/cookbook/arweave.mdx @@ -2,7 +2,7 @@ title: Arweave Üzerinde Subgraphlar Oluşturma --- -> Arweave support in Graph Node and on the hosted service is in beta: please reach us on [Discord](https://discord.gg/graphprotocol) with any questions about building Arweave subgraphs! +> Graph Node'da ve barındırılan hizmette Arweave desteği beta aşamasındadır: Arweave subgraph'leri oluşturma ile ilgili sorularınız için lütfen bize [Discord](https://discord.gg/graphprotocol) üzerinden ulaşın! Bu rehberde, Arweave blok zincirini indekslemek için nasıl Subgraphs oluşturacağınızı ve dağıtacağınızı öğreneceksiniz. @@ -83,7 +83,7 @@ dataSources: ``` - Arweave subgraphları yeni bir veri kaynağı türünü tanıtır (`arweave`) -- The network should correspond to a network on the hosting Graph Node. On the hosted service, Arweave's mainnet is `arweave-mainnet` +- Network, barındırılan Graph Node'u üzerindeki bir ağa karşılık gelmelidir. Barındırılan hizmette Arweave'in ana ağı `arweave-mainnet`'tir - Arweave veri kaynakları, bir Arweave cüzdanının genel anahtarı olan opsiyonel bir source.owner alanı sunar Arweave veri kaynakları iki tür işleyiciyi destekler: @@ -150,9 +150,9 @@ Blok işleyicileri bir `Block` alırken, işlemler bir `Transaction` alır. Bir Arweave Subgraph'ının eşleştirmelerini yazmak, bir Ethereum Subgraph'ının eşleştirmelerini yazmaya çok benzerdir. Daha fazla bilgi için [buraya](/developing/creating-a-subgraph/#writing-mappings) tıklayın. -## Deploying an Arweave Subgraph on the hosted service +## Barındırılan hizmet üzerinde bir Arweave Subgraph'i deploy etmek -Once your subgraph has been created on the hosted service dashboard, you can deploy by using the `graph deploy` CLI command. +Barındırılan hizmet panosunda subgraph'iniz oluşturulduktan sonra `graph deploy` CLI komutunu kullanarak deploy işlemini yapabilirsiniz. ```bash graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token From 638d2310070861ad020bbf06d6145167e22b409e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:03 -0400 Subject: [PATCH 047/924] New translations arweave.mdx (Marathi) --- website/pages/mr/cookbook/arweave.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/mr/cookbook/arweave.mdx b/website/pages/mr/cookbook/arweave.mdx index 0547a2aa5ce4..556eb3d6b80d 100644 --- a/website/pages/mr/cookbook/arweave.mdx +++ b/website/pages/mr/cookbook/arweave.mdx @@ -178,7 +178,7 @@ Arweave subgraphs साठी GraphQL एंडपॉइंट विद्य सध्या, ग्राफ फक्त ब्लॉकचेन (त्याचे ब्लॉक्स आणि व्यवहार) म्हणून Arweave अनुक्रमित करत आहे. -### मी माझ्या सबग्राफमध्ये Bundlr बंडल ओळखू शकतो? +### Currently, The Graph फक्त blockchain (त्याचे blocks आणि transactions) म्हणून Arweave अनुक्रमित करत आहे? हे सध्या समर्थित नाही. From d0ff78eb103d5008ddf5ed5231e5cf2af671e7c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:06 -0400 Subject: [PATCH 048/924] New translations near.mdx (French) --- website/pages/fr/cookbook/near.mdx | 62 +++++++++++++++--------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/fr/cookbook/near.mdx b/website/pages/fr/cookbook/near.mdx index a216b21b4fcf..938ad8a0922f 100644 --- a/website/pages/fr/cookbook/near.mdx +++ b/website/pages/fr/cookbook/near.mdx @@ -53,23 +53,23 @@ $ graph build # génère le Web Assembly à partir des fichiers AssemblyScript, Le manifeste de subgraph (`subgraph.yaml`) identifie les sources de données pour le subgraph, les déclencheurs d'intérêt et les fonctions qui doivent être exécutées en réponse à ces déclencheurs. Voici un exemple de manifeste de subgraph pour un subgraph NEAR: ```yaml -specVersion: 0.0.2 -schema: - file: ./src/schema.graphql # lien vers le fichier de schéma -dataSources: - - kind: near - network: near-mainnet - source: - account: app.good-morning.near # Cette source de données surveillera ce compte - startBlock: 10662188 # Requis pour NEAR - mapping: - apiVersion: 0.0.5 - language: wasm/assemblyscript - blockHandlers: - - handler: handleNewBlock # le nom de la fonction dans le fichier de mapping - receiptHandlers: - - handler: handleReceipt # le nom de la fonction dans le fichier de mappage - file: ./src/mapping.ts # lien vers le fichier contenant les mappings Assemblyscript +specVersion : 0.0.2 +schema : + file : ./src/schema.graphql # lien vers le fichier de schéma +dataSources : + - kind : near + network : near-mainnet + source : + account : app.good-morning.near # Cette source de données surveillera ce compte + startBlock : 10662188 # Requis pour NEAR + mapping : + apiVersion : 0.0.5 + language : wasm/assemblyscript + blockHandlers : + - handler : handleNewBlock # le nom de la fonction dans le fichier de mapping + receiptHandlers : + - handler : handleReceipt # le nom de la fonction dans le fichier de mappage + file : ./src/mapping.ts # lien vers le fichier contenant les mappings Assemblyscript ``` - Les subgraphs NEAR introduisent un nouveau `type` de source de données (`near`) @@ -79,12 +79,12 @@ dataSources: ```yaml comptes: - préfixes: - - application - - bien - suffixes: - - matin.près - - matin.testnet + préfixes : + - application + - bien + suffixes : + - matin.près + - matin.testnet ``` Les fichiers de données NEAR prennent en charge deux types de gestionnaires : @@ -98,7 +98,7 @@ La définition du schema décrit la structure de la base de données de subgraph ### Les Cartographies d'AssemblyScript -Les gestionnaires pour le traitement des événements sont écrits en [AssemblyScript](https://www.assemblyscript.org/). +Les gestionnaires de traitement des événements sont écrits dans l'[AssemblyScript](https://www.assemblyscript.org/). L'indexation NEAR introduit des types de données spécifiques à NEAR dans l'[API AssemblyScript](/developing/assemblyscript-api). @@ -202,22 +202,22 @@ graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph ### Nœud Graph local ( en fonction de la configuration par défaut) ```sh -graph déployer --node http://localhost:8020/ --ipfs http://localhost:5001 +graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 ``` Une fois que votre subgraph a été déployé, il sera indexé par le nœud The Graph. Vous pouvez vérifier sa progression en interrogeant le subgraph lui-même : ```graphql -_méta { - bloc { { + _meta { + block { number } } } ``` -### Indexation NEAR avec un nœud de Graph local +### Indexation de NEAR avec un nœud The graph local L'exécution d'un nœud de Graph qui indexe NEAR répond aux exigences opérationnelles suivantes : @@ -259,11 +259,11 @@ Si un `compte` est spécifié, il correspondra uniquement au nom exact du compte ```yaml comptes: - suffixes: - - mintbase1.near + suffixes : + - mintbase1.near ``` -### Can NEAR subgraphs make view calls to NEAR accounts during mappings? +### Les subgraphs NEAR peuvent-ils faire des appels de view aux comptes NEAR pendant les mappings? Cette fonction n'est pas prise en charge. Nous sommes en train d'évaluer si cette fonctionnalité est nécessaire pour l'indexation. From cd17caedb4f34f8b6a05124a2fe4ebd8f3528c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:07 -0400 Subject: [PATCH 049/924] New translations near.mdx (Arabic) --- website/pages/ar/cookbook/near.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/ar/cookbook/near.mdx b/website/pages/ar/cookbook/near.mdx index 40e13f93cbd1..3a453ab24c79 100644 --- a/website/pages/ar/cookbook/near.mdx +++ b/website/pages/ar/cookbook/near.mdx @@ -29,13 +29,13 @@ title: بناء Subgraphs على NEAR `graphprotocol/graph-ts@` هي مكتبة لأنواع خاصة بـ subgraph. -تطوير NEAR subgraph يتطلب `graph-cli` بإصدار أعلى من `0.23.0` و `graph-ts` بإصدار أعلى من `0.23.0`. +تطوير NEAR subgraph يتطلب `graph-cli` بإصدار أعلى من ` 0.23.0 ` و `graph-ts` بإصدار أعلى من ` 0.23.0 `. > Building a NEAR subgraph is very similar to building a subgraph that indexes Ethereum. هناك ثلاثة جوانب لتعريف الـ subgraph: -**subgraph.yaml:** الـ subgraph manifest ، وتحديد مصادر البيانات ذات الأهمية ، وكيف يجب أن تتم معالجتها.علما أن NEAR هو `نوع` جديد لمصدر البيانات. +**subgraph.yaml:** الـ subgraph manifest ، وتحديد مصادر البيانات ذات الأهمية ، وكيف يجب أن تتم معالجتها.علما أن NEAR هو ` نوع ` جديد لمصدر البيانات. **schema.graphql:** a schema file that defines what data is stored for your subgraph, and how to query it via GraphQL. The requirements for NEAR subgraphs are covered by [the existing documentation](/developing/creating-a-subgraph#the-graphql-schema). @@ -73,7 +73,7 @@ dataSources: ``` - NEAR subgraphs يقدم `نوعا ` جديدا من مصدر بيانات (`near`) -- يجب أن يتوافق الـ `network` مع شبكة على Graph Node المضيفة. في الخدمة المستضافة ، الشبكة الرئيسية لـ NEAR هي `near-mainnet` ، وشبكة NEAR's testnet هي `near-testnet` +- يجب أن يتوافق الـ `network` مع شبكة على Graph Node المضيفة. في الخدمة المستضافة ، الشبكة الرئيسية لـ NEAR هي ` near-mainnet ` ، وشبكة NEAR's testnet هي ` near-testnet ` - NEAR data sources introduce an optional `source.account` field, which is a human-readable ID corresponding to a [NEAR account](https://docs.near.org/docs/concepts/account). This can be an account or a sub-account. - NEAR data sources introduce an alternative optional `source.accounts` field, which contains optional suffixes and prefixes. At least prefix or suffix must be specified, they will match the any account starting or ending with the list of values respectively. The example below would match: `[app|good].*[morning.near|morning.testnet]`. If only a list of prefixes or suffixes is necessary the other field can be omitted. @@ -165,7 +165,7 @@ class ReceiptWithOutcome { These types are passed to block & receipt handlers: - معالجات الكتلة ستتلقى`Block` -- معالجات الاستلام ستتلقى`ReceiptWithOutcome` +- معالجات الاستلام ستتلقى` ReceiptWithOutcome ` Otherwise, the rest of the [AssemblyScript API](/developing/assemblyscript-api) is available to NEAR subgraph developers during mapping execution. From 2db0c7e8cd1f7589c3b5d247dca04bdd1012d7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:08 -0400 Subject: [PATCH 050/924] New translations near.mdx (Czech) --- website/pages/cs/cookbook/near.mdx | 166 +++++++++++++++-------------- 1 file changed, 84 insertions(+), 82 deletions(-) diff --git a/website/pages/cs/cookbook/near.mdx b/website/pages/cs/cookbook/near.mdx index 304e1202e278..7404c78ce863 100644 --- a/website/pages/cs/cookbook/near.mdx +++ b/website/pages/cs/cookbook/near.mdx @@ -1,56 +1,58 @@ --- -title: Building Subgraphs on NEAR +title: Vytváření podgrafů v NEAR --- -> NEAR support in Graph Node and on the Hosted Service is in beta: please contact near@thegraph.com with any questions about building NEAR subgraphs! +> Podpora NEAR v Graph Node a v hostované službě je ve fázi beta: s případnými dotazy ohledně vytváření podgrafů NEAR se obracejte na near@thegraph.com! -This guide is an introduction to building subgraphs indexing smart contracts on the [NEAR blockchain](https://docs.near.org/). +Tato příručka je úvodem do vytváření subgrafů indexujících chytré kontrakty na [NEAR blockchain](https://docs.near.org/). -## What is NEAR? +## Co je NEAR? -[NEAR](https://near.org/) is a smart contract platform for building decentralized applications. Visit the [official documentation](https://docs.near.org/docs/concepts/new-to-near) for more information. +"[NEAR](https://near.org/) je platforma pro chytré kontrakty určená pro vytváření decentralizovaných aplikací. Navštivte [oficiální dokumentaci](https://docs.near.org/docs/concepts/new-to-near) pro více informací." -## What are NEAR subgraphs? +## Co jsou podgrafy NEAR? -The Graph gives developers tools to process blockchain events and make the resulting data easily available via a GraphQL API, known individually as a subgraph. [Graph Node](https://github.com/graphprotocol/graph-node) is now able to process NEAR events, which means that NEAR developers can now build subgraphs to index their smart contracts. +"The Graph poskytuje vývojářům nástroje pro zpracování událostí na blockchainu a snadný přístup k výsledným datům prostřednictvím GraphQL API, známého individuálně jako podgraf. [Graph Node](https://github.com/graphprotocol/graph-node) je nyní schopen zpracovávat události na síti NEAR, což znamená, že vývojáři na NEAR mohou nyní vytvářet podgrafy pro indexaci svých chytrých kontraktů." -Subgraphs are event-based, which means that they listen for and then process on-chain events. There are currently two types of handlers supported for NEAR subgraphs: +Podgrafy jsou založeny na událostech, což znamená, že naslouchají událostem v řetězci a následně je zpracovávají. V současné době jsou pro podgrafy NEAR podporovány dva typy zpracovatelů: -- Block handlers: these are run on every new block -- Receipt handlers: run every time a message is executed at a specified account +- Obsluhy bloků: jsou spouštěny při každém novém bloku. +- Obsluhy příjmu: spouštějí se pokaždé, když je zpráva provedena na zadaném účtu. -[From the NEAR documentation](https://docs.near.org/docs/concepts/transaction#receipt): +[Z dokumentace NEAR](https://docs.near.org/docs/concepts/transaction#receipt): -> A Receipt is the only actionable object in the system. When we talk about "processing a transaction" on the NEAR platform, this eventually means "applying receipts" at some point. +> Příjemka je jediným objektem, který lze v systému použít. Když na platformě NEAR hovoříme o "zpracování transakce", znamená to v určitém okamžiku "použití účtenky". -## Building a NEAR Subgraph +## Sestavení podgrafu NEAR -`@graphprotocol/graph-cli` is a command-line tool for building and deploying subgraphs. +`@graphprotocol/graph-cli` je nástroj příkazového řádku pro vytváření a nasazování subgrafů. -`@graphprotocol/graph-ts` is a library of subgraph-specific types. +`@graphprotocol/graph-ts` je knihovna typů specifických pro podgrafy. -NEAR subgraph development requires `graph-cli` above version `0.23.0`, and `graph-ts` above version `0.23.0`. +Vývoj podgrafů NEAR vyžaduje `graph-cli` nad verzí `0.23.0` a `graph-ts` nad verzí `0.23.0 -> Building a NEAR subgraph is very similar to building a subgraph that indexes Ethereum. +
+

Vytváření subgrafu NEAR je velmi podobné vytváření subgrafu, který indexuje Ethereum.

+
-There are three aspects of subgraph definition: +

Definice podgrafů má tři aspekty:

-**subgraph.yaml:** the subgraph manifest, defining the data sources of interest, and how they should be processed. NEAR is a new `kind` of data source. +

subgraph.yaml: manifest podgrafu definující zdroje dat, které vás zajímají, a způsob jejich zpracování. NEAR je nový druh` zdroje dat. -**schema.graphql:** a schema file that defines what data is stored for your subgraph, and how to query it via GraphQL. The requirements for NEAR subgraphs are covered by [the existing documentation](/developing/creating-a-subgraph#the-graphql-schema). +**schema.graphql:** soubor se schématem, který definuje, jaká data jsou uložena pro váš podgraf, a jak je možné je dotazovat pomocí GraphQL. Požadavky na podgrafy NEAR jsou pokryty [existující dokumentací](/developing/creating-a-subgraph#the-graphql-schema). -**AssemblyScript Mappings:** [AssemblyScript code](/developing/assemblyscript-api) that translates from the event data to the entities defined in your schema. NEAR support introduces NEAR-specific data types and new JSON parsing functionality. +**Mapování v jazyce AssemblyScript:** [Kód jazyka AssemblyScript](/developing/assemblyscript-api), který převádí data událostí na entity definované ve vašem schématu. Podpora NEAR zavádí datové typy specifické pro NEAR a nové funkce pro parsování JSON. -During subgraph development there are two key commands: +Při vývoji podgrafů existují dva klíčové příkazy: ```bash -$ graph codegen # generates types from the schema file identified in the manifest -$ graph build # generates Web Assembly from the AssemblyScript files, and prepares all the subgraph files in a /build folder +$ graph codegen # generuje typy ze souboru se schématem identifikovaným v manifestu +$ graph build # vygeneruje webové sestavení ze souborů AssemblyScript a připraví všechny dílčí soubory do složky /build ``` -### Subgraph Manifest Definition +### Definice podgrafu Manifest -The subgraph manifest (`subgraph.yaml`) identifies the data sources for the subgraph, the triggers of interest, and the functions that should be run in response to those triggers. See below for an example subgraph manifest for a NEAR subgraph: +Manifest podgrafu (`subgraph.yaml`) identifikuje zdroje dat pro podgraf, spouštěče zájmu a funkce, které by měly být spuštěny v reakci na tyto spouštěče. Příklad manifestu podgrafu pro podgraf NEAR naleznete níže: ```yaml specVersion: 0.0.2 @@ -72,10 +74,10 @@ dataSources: file: ./src/mapping.ts # link to the file with the Assemblyscript mappings ``` -- NEAR subgraphs introduce a new `kind` of data source (`near`) -- The `network` should correspond to a network on the hosting Graph Node. On the Hosted Service, NEAR's mainnet is `near-mainnet`, and NEAR's testnet is `near-testnet` -- NEAR data sources introduce an optional `source.account` field, which is a human-readable ID corresponding to a [NEAR account](https://docs.near.org/docs/concepts/account). This can be an account or a sub-account. -- NEAR data sources introduce an alternative optional `source.accounts` field, which contains optional suffixes and prefixes. At least prefix or suffix must be specified, they will match the any account starting or ending with the list of values respectively. The example below would match: `[app|good].*[morning.near|morning.testnet]`. If only a list of prefixes or suffixes is necessary the other field can be omitted. +- Podgrafy NEAR představují nový `druh` zdroje dat (`near`) +- `síť` by měla odpovídat síti na hostitelském uzlu grafu. V hostované službě je hlavní síť NEAR `near-mainnet` a testovací síť NEAR je `near-testnet` +- `síť` by měla odpovídat síti na hostitelském uzlu grafu. V hostované službě je hlavní síť NEAR `near-mainnet` a testovací síť NEAR je `near-testnet` +- NEAR datové zdroje představují alternativní volitelné pole `source.accounts`, které obsahuje volitelné přípony a předpony. Musí být specifikována alespoň jedna z předpony nebo přípony, které odpovídají jakémukoli účtu začínajícímu nebo končícímu uvedenými hodnotami. Příklad níže by odpovídal: `[app|good].*[morning.near|morning.testnet]`. Pokud je potřeba pouze seznam předpon nebo přípon, druhé pole lze vynechat. ```yaml accounts: @@ -87,20 +89,20 @@ accounts: - morning.testnet ``` -NEAR data sources support two types of handlers: +Zdroje dat NEAR podporují dva typy zpracovatelů: -- `blockHandlers`: run on every new NEAR block. No `source.account` is required. -- `receiptHandlers`: run on every receipt where the data source's `source.account` is the recipient. Note that only exact matches are processed ([subaccounts](https://docs.near.org/docs/concepts/account#subaccounts) must be added as independent data sources). +- `blockHandlers`: spustí se na každém novém bloku NEAR. Není vyžadován žádný `source.account`. +- `receiptHandlers`: spustí se u každé účtenky, kde je příjemcem `source.account` zdroje dat. Upozorňujeme, že jsou zpracovávány pouze přesné shody ([podúčty](https://docs.near.org/docs/concepts/account#subaccounts) musí být přidány jako nezávislé zdroje dat). -### Schema Definition +### Definice schématu -Schema definition describes the structure of the resulting subgraph database and the relationships between entities. This is agnostic of the original data source. There are more details on subgraph schema definition [here](/developing/creating-a-subgraph#the-graphql-schema). +Definice schématu popisuje strukturu výsledné databáze podgrafů a vztahy mezi entitami. Toto je agnostika původního zdroje dat. Další podrobnosti o definici schématu podgrafu naleznete [zde](/developing/creating-a-subgraph#the-graphql-schema). -### AssemblyScript Mappings +### AssemblyScript Mapování -The handlers for processing events are written in [AssemblyScript](https://www.assemblyscript.org/). +Obslužné programy pro zpracování událostí jsou napsány v jazyce [AssemblyScript](https://www.assemblyscript.org/). -NEAR indexing introduces NEAR-specific data types to the [AssemblyScript API](/developing/assemblyscript-api). +Indexování NEAR zavádí do rozhraní [AssemblyScript API](/developing/assemblyscript-api) datové typy specifické pro NEAR. ```typescript @@ -162,50 +164,50 @@ class ReceiptWithOutcome { } ``` -These types are passed to block & receipt handlers: +Tyto typy jsou předány do block & obsluha účtenek: -- Block handlers will receive a `Block` -- Receipt handlers will receive a `ReceiptWithOutcome` +- Obsluhy bloků obdrží `Block` +- Obsluhy příjmu obdrží `ReceiptWithOutcome` -Otherwise, the rest of the [AssemblyScript API](/developing/assemblyscript-api) is available to NEAR subgraph developers during mapping execution. +Jinak je zbytek [AssemblyScript API](/developing/assemblyscript-api) dostupný vývojářům podgrafů NEAR během provádění mapování. -This includes a new JSON parsing function - logs on NEAR are frequently emitted as stringified JSONs. A new `json.fromString(...)` function is available as part of the [JSON API](/developing/assemblyscript-api#json-api) to allow developers to easily process these logs. +To zahrnuje novou funkci parsování JSON - záznamy na NEAR jsou často vysílány ve formě zřetězených JSON. Nová funkce `json.fromString(...)` je k dispozici jako součást [JSON API](/developing/assemblyscript-api#json-api), které umožňuje vývojářům snadno zpracovávat tyto záznamy. -## Deploying a NEAR Subgraph +## Nasazení podgrafu NEAR -Once you have a built subgraph, it is time to deploy it to Graph Node for indexing. NEAR subgraphs can be deployed to any Graph Node `>=v0.26.x` (this version has not yet been tagged & released). +Jakmile máte sestavený podgraf, je čas jej nasadit do Graph Node k indexování. Podgrafy NEAR lze nasadit do libovolného Graph Node `>=v0.26.x` (tato verze ještě nebyla označena & vydána). -The Graph's Hosted Service currently supports indexing NEAR mainnet and testnet in beta, with the following network names: +Hostovaná služba Graph's Hosted Service v současné době podporuje indexování NEAR mainnet a testnet v beta verzi s následujícími názvy sítí: - `near-mainnet` - `near-testnet` -More information on creating and deploying subgraphs on the Hosted Service can be found [here](/deploying/deploying-a-subgraph-to-hosted). +Další informace o vytváření a nasazování subgrafů v hostované službě najdete [zde](/deploying/deploying-a-subgraph-to-hosted). -As a quick primer - the first step is to "create" your subgraph - this only needs to be done once. On the Hosted Service, this can be done from [your Dashboard](https://thegraph.com/hosted-service/dashboard): "Add Subgraph". +Pro rychlou představu - prvním krokem je "vytvoření" podgrafu - to je třeba provést pouze jednou. V hostované službě to lze provést z [vého ovládacího panelu](https://thegraph.com/hosted-service/dashboard): "Přidat podgraf". -Once your subgraph has been created, you can deploy your subgraph by using the `graph deploy` CLI command: +Po vytvoření podgrafu můžete podgraf nasadit pomocí příkazu `graph deploy` CLI: ```sh $ graph create --node subgraph/name # creates a subgraph on a local Graph Node (on the Hosted Service, this is done via the UI) $ graph deploy --node --ipfs https://api.thegraph.com/ipfs/ # uploads the build files to a specified IPFS endpoint, and then deploys the subgraph to a specified Graph Node based on the manifest IPFS hash ``` -The node configuration will depend on where the subgraph is being deployed. +Konfigurace uzlů závisí na tom, kde je podgraf nasazen. -### Hosted Service +### Hostovaná služba ```sh graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token ``` -### Local Graph Node (based on default configuration) +### Místní uzel grafu (na základě výchozí konfigurace) ```sh graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 ``` -Once your subgraph has been deployed, it will be indexed by Graph Node. You can check its progress by querying the subgraph itself: +Jakmile je podgraf nasazen, bude indexován pomocí Graph Node. Jeho průběh můžete zkontrolovat dotazem na samotný podgraf: ```graphql { @@ -217,45 +219,45 @@ Once your subgraph has been deployed, it will be indexed by Graph Node. You can } ``` -### Indexing NEAR with a Local Graph Node +### Indexování NEAR pomocí místního uzlu grafu -Running a Graph Node that indexes NEAR has the following operational requirements: +Spuštění grafu uzlu, který indexuje NEAR, má následující provozní požadavky: -- NEAR Indexer Framework with Firehose instrumentation -- NEAR Firehose Component(s) -- Graph Node with Firehose endpoint configured +- Framework NEAR Indexer s instrumentací Firehose +- Komponenta(y) NEAR Firehose +- Uzel Graph s nakonfigurovaným koncovým bodem Firehose -We will provide more information on running the above components soon. +Brzy vám poskytneme další informace o provozu výše uvedených komponent. -## Querying a NEAR Subgraph +## Dotazování podgrafu NEAR -The GraphQL endpoint for NEAR subgraphs is determined by the schema definition, with the existing API interface. Please visit the [GraphQL API documentation](/querying/graphql-api) for more information. +Koncový bod GraphQL pro podgrafy NEAR je určen definicí schématu se stávajícím rozhraním API. Další informace naleznete v [dokumentaci GraphQL API](/querying/graphql-api). -## Example Subgraphs +## Příklady podgrafů -Here are some example subgraphs for reference: +Zde je několik příkladů podgrafů: -[NEAR Blocks](https://github.com/graphprotocol/graph-tooling/tree/main/examples/near-blocks) +[NEAR bloky](https://github.com/graphprotocol/graph-tooling/tree/main/examples/near-blocks) [NEAR Receipts](https://github.com/graphprotocol/graph-tooling/tree/main/examples/near-receipts) ## FAQ -### How does the beta work? +### Jak funguje beta verze? -NEAR support is in beta, which means that there may be changes to the API as we continue to work on improving the integration. Please email near@thegraph.com so that we can support you in building NEAR subgraphs, and keep you up to date on the latest developments! +Podpora NEAR je ve fázi beta, což znamená, že v API může dojít ke změnám, protože budeme pokračovat ve zdokonalování integrace. Napište nám prosím na adresu near@thegraph.com, abychom vás mohli podpořit při vytváření podgrafů NEAR a informovat vás o nejnovějším vývoji! -### Can a subgraph index both NEAR and EVM chains? +### Může podgraf indexovat řetězce NEAR i EVM? -No, a subgraph can only support data sources from one chain/network. +Ne, podgraf může podporovat zdroje dat pouze z jednoho řetězce/sítě. -### Can subgraphs react to more specific triggers? +### Mohou podgrafy reagovat na specifičtější spouštěče? -Currently, only Block and Receipt triggers are supported. We are investigating triggers for function calls to a specified account. We are also interested in supporting event triggers, once NEAR has native event support. +V současné době jsou podporovány pouze spouštěče Blok a Příjem. Zkoumáme spouštěče pro volání funkcí na zadaném účtu. Máme také zájem o podporu spouštěčů událostí, jakmile bude mít NEAR nativní podporu událostí. -### Will receipt handlers trigger for accounts and their sub-accounts? +### Budou se obsluhy příjmu spouštět pro účty a jejich podúčty? -If an `account` is specified, that will only match the exact account name. It is possible to match sub-accounts by specifying an `accounts` field, with `suffixes` and `prefixes` specified to match accounts and sub-accounts, for example the following would match all `mintbase1.near` sub-accounts: +Pokud je zadán `účet`, bude odpovídat pouze přesnému názvu účtu. Je možné spárovat podúčty zadáním pole `účty` s `příponami` a `předponami`, aby odpovídaly například účtům a podúčtům následující by odpovídalo všem podúčtům `mintbase1.near`: ```yaml accounts: @@ -263,22 +265,22 @@ accounts: - mintbase1.near ``` -### Can NEAR subgraphs make view calls to NEAR accounts during mappings? +### Mohou podgrafy NEAR během mapování volat zobrazení na účty NEAR? -This is not supported. We are evaluating whether this functionality is required for indexing. +To není podporováno. Vyhodnocujeme, zda je tato funkce pro indexování nutná. -### Can I use data source templates in my NEAR subgraph? +### Mohu v podgrafu NEAR používat šablony zdrojů dat? -This is not currently supported. We are evaluating whether this functionality is required for indexing. +Tato funkce není v současné době podporována. Vyhodnocujeme, zda je tato funkce pro indexování nutná. -### Ethereum subgraphs support "pending" and "current" versions, how can I deploy a "pending" version of a NEAR subgraph? +### Podgrafy Ethereum podporují verze "pending" a "current", jak mohu nasadit verzi "pending" podgrafu NEAR? -Pending functionality is not yet supported for NEAR subgraphs. In the interim, you can deploy a new version to a different "named" subgraph, and then when that is synced with the chain head, you can redeploy to your primary "named" subgraph, which will use the same underlying deployment ID, so the main subgraph will be instantly synced. +Pro podgrafy NEAR zatím nejsou podporovány čekající funkce. V mezidobí můžete novou verzi nasadit do jiného "pojmenovaného" podgrafu a po jeho synchronizaci s hlavou řetězce ji můžete znovu nasadit do svého hlavního "pojmenovaného" podgrafu, který bude používat stejné ID nasazení, takže hlavní podgraf bude okamžitě synchronizován. -### My question hasn't been answered, where can I get more help building NEAR subgraphs? +### Moje otázka nebyla zodpovězena, kde mohu získat další pomoc při vytváření podgrafů NEAR? -If it is a general question about subgraph development, there is a lot more information in the rest of the [Developer documentation](/quick-start). Otherwise please join [The Graph Protocol Discord](https://discord.gg/graphprotocol) and ask in the #near channel or email near@thegraph.com. +Pokud se jedná o obecnou otázku týkající se vývoje podgrafů, je zde mnohem více informací ve zbytku [dokumentace pro vývojáře](/quick-start). Jinak se prosím připojte k [The Graph Protocol Discord](https://discord.gg/graphprotocol) a zeptejte se na #near kanálu nebo e-mailem near@thegraph.com. -## References +## Odkazy: -- [NEAR developer documentation](https://docs.near.org/docs/develop/basics/getting-started) +- [ Dokumentace pro vývojáře NEAR](https://docs.near.org/docs/develop/basics/getting-started) From 631548129c44074e83216043ad1d8cb6b6441c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:10 -0400 Subject: [PATCH 051/924] New translations near.mdx (Italian) --- website/pages/it/cookbook/near.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/it/cookbook/near.mdx b/website/pages/it/cookbook/near.mdx index 395c5f4dae12..d76d97022e69 100644 --- a/website/pages/it/cookbook/near.mdx +++ b/website/pages/it/cookbook/near.mdx @@ -279,6 +279,6 @@ Pending functionality is not yet supported for NEAR subgraphs. In the interim, y If it is a general question about subgraph development, there is a lot more information in the rest of the [Developer documentation](/quick-start). Otherwise please join [The Graph Protocol Discord](https://discord.gg/graphprotocol) and ask in the #near channel or email near@thegraph.com. -## References +## Riferimenti - [NEAR developer documentation](https://docs.near.org/docs/develop/basics/getting-started) From 6839c5d76a52987d5aa75da7d4605be792bc3d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:11 -0400 Subject: [PATCH 052/924] New translations near.mdx (Japanese) --- website/pages/ja/cookbook/near.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ja/cookbook/near.mdx b/website/pages/ja/cookbook/near.mdx index 1a055327d9c4..926e1d9fa362 100644 --- a/website/pages/ja/cookbook/near.mdx +++ b/website/pages/ja/cookbook/near.mdx @@ -277,7 +277,7 @@ accounts: ### 私の質問に対する回答がありません。NEAR サブグラフの作成に関するヘルプはどこで入手できますか? -If it is a general question about subgraph development, there is a lot more information in the rest of the [Developer documentation](/quick-start). Otherwise please join [The Graph Protocol Discord](https://discord.gg/graphprotocol) and ask in the #near channel or email near@thegraph.com. +もし、サブグラフ開発に関する一般的な質問であれば、[開発者ドキュメント](/quick-start)に多くの情報があります。それ以外の場合は、[The Graph Protocol Discord](https://discord.gg/graphprotocol)に参加し、#nearチャンネルで質問するか、near@thegraph.comまでお寄せください。 ## 参考文献 From 3a91c87a27a5cbc7e0fc56ec4e4faa3bd6848977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:13 -0400 Subject: [PATCH 053/924] New translations near.mdx (Dutch) --- website/pages/nl/cookbook/near.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/nl/cookbook/near.mdx b/website/pages/nl/cookbook/near.mdx index 304e1202e278..fed1e365a337 100644 --- a/website/pages/nl/cookbook/near.mdx +++ b/website/pages/nl/cookbook/near.mdx @@ -41,11 +41,11 @@ There are three aspects of subgraph definition: **AssemblyScript Mappings:** [AssemblyScript code](/developing/assemblyscript-api) that translates from the event data to the entities defined in your schema. NEAR support introduces NEAR-specific data types and new JSON parsing functionality. -During subgraph development there are two key commands: +Tijdens subgraph ontwikkeling zijn er twee belangrijke commando's: ```bash -$ graph codegen # generates types from the schema file identified in the manifest -$ graph build # generates Web Assembly from the AssemblyScript files, and prepares all the subgraph files in a /build folder +$ graph codegen # genereert types van het schema bestand die geïdentificeerd is in het manifest +$ graph build # genereert Web Assembly vanuit de AssemblyScript-bestanden, en bereidt alle Subgraph-bestanden voor in een /build map ``` ### Subgraph Manifest Definition @@ -193,7 +193,7 @@ $ graph deploy --node --ipfs https://api.thegraph.com/ipfs/ # u The node configuration will depend on where the subgraph is being deployed. -### Hosted Service +### Gehoste Dienst ```sh graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token From 6797a5ca37c1cae112785eca0e3d93fbf65f3209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:18 -0400 Subject: [PATCH 054/924] New translations near.mdx (Chinese Simplified) --- website/pages/zh/cookbook/near.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/zh/cookbook/near.mdx b/website/pages/zh/cookbook/near.mdx index b09482f12fb8..09037254b5ec 100644 --- a/website/pages/zh/cookbook/near.mdx +++ b/website/pages/zh/cookbook/near.mdx @@ -229,7 +229,7 @@ graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 ## 查询 NEAR 子图 -The GraphQL endpoint for NEAR subgraphs is determined by the schema definition, with the existing API interface. Please visit the [GraphQL API documentation](/querying/graphql-api) for more information. +NEAR 子图的 GraphQL 端点由模式定义和现有的 API 接口决定。更多信息,请访问 <0 href="/querying/graphql-api">GraphQLAPI文档。 ## 示例子图 From da9884e97e52165ace84aae41dc8414af3120de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:19 -0400 Subject: [PATCH 055/924] New translations near.mdx (Urdu (Pakistan)) --- website/pages/ur/cookbook/near.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ur/cookbook/near.mdx b/website/pages/ur/cookbook/near.mdx index 5fe26e7fa413..875a1ca0f300 100644 --- a/website/pages/ur/cookbook/near.mdx +++ b/website/pages/ur/cookbook/near.mdx @@ -72,7 +72,7 @@ dataSources: file: ./src/mapping.ts # link to the file with the Assemblyscript mappings ``` -- NEAR سب گراف ڈیٹا ماخذ کا ایک نیا `kind` متعارف کراتے ہیں (`near`) +- NEAR سب گراف ڈیٹا ماخذ کا ایک نیا ` kind ` متعارف کراتے ہیں (`near`) - `network` ہوسٹنگ گراف نوڈ پر موجود نیٹ ورک کے مطابق ہونا چاہیے۔ ہوسٹڈ سروس پر، NEAR کا مین نیٹ `near-mainnet` ہے، اور NEAR کا ٹیسٹ نیٹ ہے `near-testnet` - NEAR ڈیٹا کے ذرائع ایک اختیاری `source.account` فیلڈ متعارف کراتے ہیں، جو کہ ایک [ سے متعلق انسانی پڑھنے کے قابل ID ہے۔ اکاؤنٹ کے قریب](https://docs.near.org/docs/concepts/account)۔ یہ ایک اکاؤنٹ یا سب اکاؤنٹ ہو سکتا ہے. - NEAR ڈیٹا کے ذرائع ایک متبادل اختیاری `source.accounts` فیلڈ متعارف کراتے ہیں، جس میں اختیاری لاحقے اور سابقے ہوتے ہیں۔ کم از کم سابقہ ​​یا لاحقہ متعین ہونا ضروری ہے، وہ بالترتیب اقدار کی فہرست کے ساتھ شروع یا ختم ہونے والے کسی بھی اکاؤنٹ سے مماثل ہوں گے۔ نیچے دی گئی مثال مماثل ہوگی: `[app|good].*[morning.near|morning.testnet]`۔ اگر صرف سابقوں یا لاحقوں کی فہرست ضروری ہو تو دوسری فیلڈ کو چھوڑا جا سکتا ہے. @@ -255,7 +255,7 @@ NEAR سپورٹ بیٹا میں ہے، جس کا مطلب ہے کہ API میں ### کیا رسید ہینڈلرز اکاؤنٹس اور ان کے سب اکاؤنٹس کو متحرک کریں گے؟ -اگر ایک `account` متعین کیا گیا ہے، تو وہ صرف صحیح اکاؤنٹ کے نام سے مماثل ہوگا۔ مثال کے طور پر، اکاؤنٹس اور سب اکاؤنٹس سے ملنے کے لیے مخصوص `prefixes` اور ` suffixes` کے ساتھ، `accounts` فیلڈ کی وضاحت کرکے سب اکاؤنٹس کو ملانا ممکن ہے۔ درج ذیل تمام `mintbase1.near` سب اکاؤنٹس سے مماثل ہوں گے: +اگر ایک ` account ` متعین کیا گیا ہے، تو وہ صرف صحیح اکاؤنٹ کے نام سے مماثل ہوگا۔ مثال کے طور پر، اکاؤنٹس اور سب اکاؤنٹس سے ملنے کے لیے مخصوص ` prefixes ` اور ` suffixes` کے ساتھ، `accounts` فیلڈ کی وضاحت کرکے سب اکاؤنٹس کو ملانا ممکن ہے۔ درج ذیل تمام `mintbase1.near` سب اکاؤنٹس سے مماثل ہوں گے: ```yaml accounts: From ce4c4dd4e8253f357350e7d8e53fcc5344499355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:20 -0400 Subject: [PATCH 056/924] New translations near.mdx (Marathi) --- website/pages/mr/cookbook/near.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/mr/cookbook/near.mdx b/website/pages/mr/cookbook/near.mdx index f8aa501820bb..8d64528f6fe0 100644 --- a/website/pages/mr/cookbook/near.mdx +++ b/website/pages/mr/cookbook/near.mdx @@ -2,9 +2,9 @@ title: NEAR वर सबग्राफ तयार करणे --- -> ग्राफ नोडमध्ये आणि होस्ट केलेल्या सेवेवर निअर सपोर्ट बीटामध्ये आहे: जवळचे सबग्राफ बनवण्याबाबत कोणतेही प्रश्न असल्यास कृपया near@thegraph.com शी संपर्क साधा! +> NEAR support in Graph Node and on the Hosted Service is in beta: please contact near@thegraph.com with any questions about building NEAR subgraphs! -हे मार्गदर्शक [जवळच्या ब्लॉकचेन](https://docs.near.org/) वर स्मार्ट कॉन्ट्रॅक्ट्स अनुक्रमित करणारे सबग्राफ तयार करण्यासाठी एक परिचय आहे. +This guide is an introduction to building subgraphs indexing smart contracts on the [NEAR blockchain](https://docs.near.org/). ## जवळ म्हणजे काय? From b0d02e1ad97767dde3b400d4b5df13855dc54ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:24 -0400 Subject: [PATCH 057/924] New translations subgraph-debug-forking.mdx (French) --- .../fr/cookbook/subgraph-debug-forking.mdx | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/fr/cookbook/subgraph-debug-forking.mdx b/website/pages/fr/cookbook/subgraph-debug-forking.mdx index 51212f065b61..cc0020c8cb50 100644 --- a/website/pages/fr/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/fr/cookbook/subgraph-debug-forking.mdx @@ -18,33 +18,33 @@ En bref, nous allons _fork le subgraph défaillant_ à partir d'un nœud The Gra ## S'il vous plaît, montrez-moi du code ! -To stay focused on subgraph debugging, let's keep things simple and run along with the [example-subgraph](https://github.com/graphprotocol/graph-tooling/tree/main/examples/ethereum-gravatar) indexing the Ethereum Gravity smart contract. +Pour rester concentré sur le débogage des subgraphs, gardons les choses simples et exécutons le [exemple-subgraph](https://github.com/graphprotocol/graph-tooling/tree/main/examples/ethereum-gravatar) indexant le contrat intelligent Ethereum Gravity. Voici les gestionnaires définis pour l'indexation des `Gravatar`s, exempts de tout bogue : ```tsx -fonction d'exportation handleNewGravatar (événement : NewGravatar) : void { - laissez gravatar = new Gravatar(event.params.id.toHex().toString()) - gravatar.owner = event.params.owner - gravatar.displayName = event.params.displayName - gravatar.imageUrl = event.params.imageUrl - gravatar.save() +export function handleNewGravatar(event: NewGravatar): void { + let gravatar = new Gravatar(event.params.id.toHex().toString()) + gravatar.owner = event.params.owner + gravatar.displayName = event.params.displayName + gravatar.imageUrl = event.params.imageUrl + gravatar.save() } -fonction d'exportation handleUpdatedGravatar (événement : UpdatedGravatar) : void { - laissez gravatar = Gravatar.load(event.params.id.toI32().toString()) - si (gravatar == null) { - log.critical('Gravatar introuvable !', []) - retour - } - gravatar.owner = event.params.owner - gravatar.displayName = event.params.displayName - gravatar.imageUrl = event.params.imageUrl - gravatar.save() +export function handleUpdatedGravatar(event: UpdatedGravatar): void { + let gravatar = Gravatar.load(event.params.id.toI32().toString()) + if (gravatar == null) { + log.critical('Gravatar introuvable!', []) + return + } + gravatar.owner = event.params.owner + gravatar.displayName = event.params.displayName + gravatar.imageUrl = event.params.imageUrl + gravatar.save() } ``` -Oops, how unfortunate, when I deploy my perfect looking subgraph to the [Hosted Service](https://thegraph.com/hosted-service/) it fails with the _"Gravatar not found!"_ error. +Oups, malheureusement, lorsque je déploie mon subgraph parfait vers le [Service Hébergé](https://thegraph.com/hosted-service/), il échoue avec l'erreur _"Gravatar not found_. La méthode habituelle pour tenter de résoudre le problème est la suivante : @@ -99,4 +99,4 @@ $ graph deploy gravity --debug-fork QmNp169tKvomnH3cPXTfGg4ZEhAHA6kEq5oy1XDqAxqH 3. Je vérifie les journaux produits par le nœud local The Graph et, hourra, tout semble fonctionner. 4. Je déploie mon subgraph maintenant sans bogue sur un nœud The Graph distant et je vis heureux pour toujours ! (pas de pommes de terre cependant) -5. The end... +5. La fin... From 1468bb3d092558a04d834549674d7f1147da9d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:25 -0400 Subject: [PATCH 058/924] New translations subgraph-debug-forking.mdx (Spanish) --- website/pages/es/cookbook/subgraph-debug-forking.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/es/cookbook/subgraph-debug-forking.mdx b/website/pages/es/cookbook/subgraph-debug-forking.mdx index 1e2d42925fad..60d186925d16 100644 --- a/website/pages/es/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/es/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ En el contexto de la depuración, **subgraph forking** te permite depurar tu sub Cuando implementas un subgrafo en un nodo Graph remoto para la indexación y falla en el bloque _X_, la buena noticia es que el nodo Graph seguirá atendiendo consultas de GraphQL usando su tienda, que está sincronizado para bloquear _X_. ¡Genial! Esto significa que podemos aprovechar esta tienda "actualizada" para corregir los errores que surgen al indexar el bloque _X_. -En pocas palabras, vamos a _bifurcar el subgrafo fallido_ desde un nodo de Graph remoto que garantiza que el subgrafo se indexe para bloquear _X_ para proporcionar al subgrafo implementado localmente que se está depurando en el bloque _X_ una vista actualizada del estado de indexación. +En pocas palabras, vamos a _bifurcar el subgrafo fallido_ desde un nodo de Graph remoto que garantiza que el subgrafo se indexe para bloquear *X* para proporcionar al subgrafo implementado localmente que se está depurando en el bloque _X_ una vista actualizada del estado de indexación. ## ¡Por favor, muéstrame algo de código! From fbfd12adb65cac95ffbd23e1ff0ed0d12f4310e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:26 -0400 Subject: [PATCH 059/924] New translations subgraph-debug-forking.mdx (Arabic) --- website/pages/ar/cookbook/subgraph-debug-forking.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/ar/cookbook/subgraph-debug-forking.mdx b/website/pages/ar/cookbook/subgraph-debug-forking.mdx index 0d331deab109..202b13a497c6 100644 --- a/website/pages/ar/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ar/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ title: Quick and Easy Subgraph Debugging Using Forks عندما تنشر subgraph إلى Graph node بعيدة للقيام بالفهرسة ويفشل عند الكتلة _ X _ ، فإن الخبر الجيد هو أن Graph node ستظل تقدم استعلامات GraphQL باستخدام مخزنها(store)، والذي تمت مزامنته للكتلة(block) _ X _. هذا عظيم! هذا يعني أنه يمكننا الاستفادة من هذا المخزن "المحدث" لإصلاح الأخطاء التي تظهر عند فهرسة الكتلة _ X _. -باختصار ، سنقوم _ بتفريع (fork) الـ subgraph الفاشل _ من Graph node بعيدة والتي تضمن فهرسة الـ subgraph للكتلة _ X _ وذلك من أجل توفير الـ subgraph المنشور محليًا والذي يتم تصحيحه عندالكتلة*X* مع عرض محدث لحالة الفهرسة. +باختصار ، سنقوم _ بتفريع (fork) الـ subgraph الفاشل _ من Graph node بعيدة والتي تضمن فهرسة الـ subgraph للكتلة * X * وذلك من أجل توفير الـ subgraph المنشور محليًا والذي يتم تصحيحه عندالكتلة_X_ مع عرض محدث لحالة الفهرسة. ## من فضلك ، أرني بعض الأكواد! @@ -69,14 +69,14 @@ Oops, how unfortunate, when I deploy my perfect looking subgraph to the [Hosted وأنا أجيب: -1. `fork-base` هو عنوان URL "الأساسي" ،فمثلا عند إلحاق _subgraph id_ ، يكون عنوان URL الناتج (`/`) هو GraphQL endpoint صالح لمخزن الـ subgraph. +1. ` fork-base ` هو عنوان URL "الأساسي" ،فمثلا عند إلحاق _subgraph id_ ، يكون عنوان URL الناتج (`/`) هو GraphQL endpoint صالح لمخزن الـ subgraph. 2. الـتفريع سهل ، فلا داعي للقلق: ```bash $ graph deploy --debug-fork --ipfs http://localhost:5001 --node http://localhost:8020 ``` -أيضًا ، لا تنس تعيين حقل `dataSources.source.startBlock` في subgraph manifest لرقم الكتلة(block) التي بها المشكلة، حتى تتمكن من تخطي فهرسة الكتل الغير ضرورية والاستفادة من التفريع! +أيضًا ، لا تنس تعيين حقل ` dataSources.source.startBlock ` في subgraph manifest لرقم الكتلة(block) التي بها المشكلة، حتى تتمكن من تخطي فهرسة الكتل الغير ضرورية والاستفادة من التفريع! لذلك ، هذا ما أفعله: @@ -90,7 +90,7 @@ $ cargo run -p graph-node --release -- \ --fork-base https://api.thegraph.com/subgraphs/id/ ``` -1. بعد فحص دقيق ، لاحظت أن هناك عدم تطابق في تمثيلات الـ `id` المستخدمة عند فهرسة `Gravatar` في المعالجين الخاصين بي. بينما `handleNewGravatar` يحول (`event.params.id.toHex()`) إلى سداسي ، `handleUpdatedGravatar` يستخدم int32 (`event.params.id.toI32()`) مما يجعل `handleUpdatedGravatar` قلقا من "Gravatar not found!". أنا أجعلهم كلاهما يحولان `id` إلى سداسي. +1. بعد فحص دقيق ، لاحظت أن هناك عدم تطابق في تمثيلات الـ ` id ` المستخدمة عند فهرسة ` Gravatar ` في المعالجين الخاصين بي. بينما ` handleNewGravatar ` يحول (`event.params.id.toHex()`) إلى سداسي ، `handleUpdatedGravatar` يستخدم int32 (`event.params.id.toI32()`) مما يجعل ` handleUpdatedGravatar ` قلقا من "Gravatar not found!". أنا أجعلهم كلاهما يحولان ` id ` إلى سداسي. 2. بعد إجراء التغييرات ، قمت بنشر الـ subgraph الخاص بي على Graph node المحلية **_وتفريع الـsubgraph الفاشل_** وضبط `dataSources.source.startBlock` إلى `6190343` في `subgraph.yaml`: ```bash From d5276d1fb38febaef5668420cafa62ad60c53058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:27 -0400 Subject: [PATCH 060/924] New translations subgraph-debug-forking.mdx (Czech) --- .../cs/cookbook/subgraph-debug-forking.mdx | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/website/pages/cs/cookbook/subgraph-debug-forking.mdx b/website/pages/cs/cookbook/subgraph-debug-forking.mdx index 7ac3bf96ca10..24fbcc650686 100644 --- a/website/pages/cs/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/cs/cookbook/subgraph-debug-forking.mdx @@ -1,26 +1,26 @@ --- -title: Quick and Easy Subgraph Debugging Using Forks +title: Rychlé a snadné ladění podgrafů pomocí vidliček --- -As with many systems processing large amounts of data, The Graph's Indexers (Graph nodes) may take quite some time to sync-up your subgraph with the target blockchain. The discrepancy between quick changes with the purpose of debugging and long wait times needed for indexing is extremely counterproductive and we are well aware of that. This is why we are introducing **subgraph forking**, developed by [LimeChain](https://limechain.tech/), and in this article I will show you how this feature can be used to substantially speed-up subgraph debugging! +Stejně jako u mnoha systémů zpracovávajících velké množství dat může indexerům grafu (Graph nodes) chvíli trvat, než synchronizují váš podgraf s cílovým blockchainem. Nesoulad mezi rychlými změnami za účelem ladění a dlouhými čekacími dobami potřebnými pro indexaci je extrémně kontraproduktivní a jsme si toho dobře vědomi. To je důvod, proč představujeme **rozvětvení podgrafů**, vyvinutý společností [LimeChain](https://limechain.tech/), a v tomto článku Ukážu vám, jak lze tuto funkci použít k podstatnému zrychlení ladění podgrafů! -## Ok, what is it? +## Ok, co to je? -**Subgraph forking** is the process of lazily fetching entities from _another_ subgraph's store (usually a remote one). +**podgraf vidličkování** je proces líného načítání entit z _úložiště jiného_ subgrafu (obvykle vzdáleného). -In the context of debugging, **subgraph forking** allows you to debug your failed subgraph at block _X_ without needing to wait to sync-up to block _X_. +V kontextu ladění vám ** vidličkování podgrafů** umožňuje ladit neúspěšný podgraf v bloku _X_, aniž byste museli čekat k synchronizaci zablokovat _X_. -## What?! How? +## Co?! Jak? -When you deploy a subgraph to a remote Graph node for indexing and it fails at block _X_, the good news is that the Graph node will still serve GraphQL queries using its store, which is synced-up to block _X_. That's great! This means we can take advantage of this "up-to-date" store to fix the bugs arising when indexing block _X_. +Pokud nasadíte podgraf do vzdáleného uzlu Graph pro indexování a dojde k selhání bloku_X_, dobrou zprávou je, že uzel Graph bude stále obsluhovat dotazy GraphQL pomocí svého úložiště, které je synchronizováno s blokem_X_. skvělé! To znamená, že můžeme využít tohoto "aktuálního" úložiště k odstranění chyb vznikajících při indexování bloku _X_. -In a nutshell, we are going to _fork the failing subgraph_ from a remote Graph node that is guaranteed to have the subgraph indexed up to block _X_ in order to provide the locally deployed subgraph being debugged at block _X_ an up-to-date view of the indexing state. +V kostce budeme _vidličkovat chybový podgraf_ z vzdáleného uzlu grafu, který je zaručeně indexován až do bloku _X_, aby poskytl lokálně nasazenému podgrafu, který je laděn v bloku _X_, aktuální pohled na stav indexace. -## Please, show me some code! +## Ukažte mi prosím nějaký kód! -To stay focused on subgraph debugging, let's keep things simple and run along with the [example-subgraph](https://github.com/graphprotocol/graph-tooling/tree/main/examples/ethereum-gravatar) indexing the Ethereum Gravity smart contract. +Abychom se soustředili na ladění podgrafů, zůstaňme u jednoduchých věcí a projděme si [příkladový podgraf](https://github.com/graphprotocol/graph-tooling/tree/main/examples/ethereum-gravatar) indexující inteligentní kontrakt Ethereum Gravity. -Here are the handlers defined for indexing `Gravatar`s, with no bugs whatsoever: +Zde jsou definovány obslužné programy pro indexování `Gravatarů` bez jakýchkoli chyb: ```tsx export function handleNewGravatar(event: NewGravatar): void { @@ -44,43 +44,43 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -Oops, how unfortunate, when I deploy my perfect looking subgraph to the [Hosted Service](https://thegraph.com/hosted-service/) it fails with the _"Gravatar not found!"_ error. +Ups, jak nešťastné, když jsem nasadil můj perfektně vypadající subgraf do [Hostované služby](https://thegraph.com/hosted-service/), selhalo to s chybou _"Gravatar nenalezen!"_. -The usual way to attempt a fix is: +Obvyklý způsob, jak se pokusit o opravu, je: -1. Make a change in the mappings source, which you believe will solve the issue (while I know it won't). -2. Re-deploy the subgraph to the [Hosted Service](https://thegraph.com/hosted-service/) (or another remote Graph node). -3. Wait for it to sync-up. -4. If it breaks again go back to 1, otherwise: Hooray! +1. Proveďte změnu ve zdroji mapování, která podle vás problém vyřeší (zatímco já vím, že ne). +2. Znovu nasaďte podgraf do [Hostované služby](https://thegraph.com/hosted-service/) (nebo jiného vzdáleného uzlu Graph). +3. Počkejte na synchronizaci. +4. Pokud se opět rozbije, vraťte se na 1, jinak: Hurá! -It is indeed pretty familiar to an ordinary debug process, but there is one step that horribly slows down the process: _3. Wait for it to sync-up._ +Je to skutečně docela podobné běžnému procesu ladění, ale existuje jedna fáze, která ho strašně zpomaluje: _3. Počkejte, až se synchronizuje._ -Using **subgraph forking** we can essentially eliminate this step. Here is how it looks: +Pomocí **vidličkování podgrafů** můžeme tento krok v podstatě eliminovat. Takto to vypadá: -0. Spin-up a local Graph node with the **_appropriate fork-base_** set. -1. Make a change in the mappings source, which you believe will solve the issue. -2. Deploy to the local Graph node, **_forking the failing subgraph_** and **_starting from the problematic block_**. -3. If it breaks again, go back to 1, otherwise: Hooray! +0. Vytvoření místního uzlu Graph s **_vhodnou sadou fork-base_**. +1. Proveďte změnu ve zdroji mapování, která podle vás problém vyřeší. +2. Nasaďte na lokální uzel grafu, **_vidličkující chybový podgraf_** a **_začínající od problémového bloku_**. +3. Pokud se opět rozbije, vraťte se na 1, jinak: Hurá! -Now, you may have 2 questions: +Nyní můžete mít 2 otázky: -1. fork-base what??? -2. Forking who?! +1. fork-base co??? +2. Vidličkování kdo?! -And I answer: +A já odpovídám: -1. `fork-base` is the "base" URL, such that when the _subgraph id_ is appended the resulting URL (`/`) is a valid GraphQL endpoint for the subgraph's store. -2. Forking is easy, no need to sweat: +1. `fork-base` je "base" adresa URL, takže když je připojeno _identifikátor podgrafu_, výsledná adresa URL (`/`) je platným koncovým bodem GraphQL pro úložiště podgrafu. +2. Vidličkování je snadné, není třeba se potit: ```bash $ graph deploy --debug-fork --ipfs http://localhost:5001 --node http://localhost:8020 ``` -Also, don't forget to set the `dataSources.source.startBlock` field in the subgraph manifest to the number of the problematic block, so you can skip indexing unnecessary blocks and take advantage of the fork! +Nezapomeňte také nastavit pole `dataSources.source.startBlock` v manifestu podgrafu na číslo problematického bloku, abyste mohli vynechat indexování nepotřebných bloků a využít výhod vidličkování! -So, here is what I do: +Takže to dělám takhle: -0. I spin-up a local graph node ([here is how to do it](https://github.com/graphprotocol/graph-node#running-a-local-graph-node)) with the `fork-base` option set to: `https://api.thegraph.com/subgraphs/id/`, since I will fork a subgraph, the buggy one I deployed earlier, from the [HostedService](https://thegraph.com/hosted-service/). +0. Nasaďte lokální uzel grafu ([zde je, jak na to](https://github.com/graphprotocol/graph-node#running-a-local-graph-node)) s možností `fork-base` nastavenou na: `https://api.thegraph.com/subgraphs/id/`, protože budu provádět vidličkování podgrafu, toho chybového, který jsem dříve nasadil ze služby [HostedService](https://thegraph.com/hosted-service/). ``` $ cargo run -p graph-node --release -- \ @@ -90,13 +90,13 @@ $ cargo run -p graph-node --release -- \ --fork-base https://api.thegraph.com/subgraphs/id/ ``` -1. After careful inspection I notice that there is a mismatch in the `id` representations used when indexing `Gravatar`s in my two handlers. While `handleNewGravatar` converts it to a hex (`event.params.id.toHex()`), `handleUpdatedGravatar` uses an int32 (`event.params.id.toI32()`) which causes the `handleUpdatedGravatar` to panic with "Gravatar not found!". I make them both convert the `id` to a hex. -2. After I made the changes I deploy my subgraph to the local Graph node, **_forking the failing subgraph_** and setting `dataSources.source.startBlock` to `6190343` in `subgraph.yaml`: +1. Po pečlivém prozkoumání si všímám, že existuje nesoulad v reprezentacích `id`, které se používají při indexaci `Gravatar` v mých dvou obslužných funkcích. Zatímco `handleNewGravatar` ho převede na hex (`event.params.id.toHex()`), `handleUpdatedGravatar` používá int32 (`event.params.id.toI32()`), což způsobuje, že `handleUpdatedGravatar` selže s chybou "Gravatar nenalezen!". Udělám, aby obě převedly `id` na hex. +2. Po provedení změn nasadím svůj podgraf na lokální uzel grafu, **_vidličkování chybového podgrafu_** a nastavení `dataSources.source.startBlock` na `6190343` v souboru `subgraph.yaml`: ```bash $ graph deploy gravity --debug-fork QmNp169tKvomnH3cPXTfGg4ZEhAHA6kEq5oy1XDqAxqHmW --ipfs http://localhost:5001 --node http://localhost:8020 ``` -3. I inspect the logs produced by the local Graph node and, Hooray!, everything seems to be working. -4. I deploy my now bug-free subgraph to a remote Graph node and live happily ever after! (no potatoes tho) -5. The end... +3. Zkontroluji protokoly vytvořené místním uzel Graph a hurá, zdá se, že vše funguje. +4. Nasadím svůj nyní již bezchybný podgraf do vzdáleného uzlu Graph a žiji šťastně! (žádné brambory) +5. Konec... From 3d2e8b77a40394103f60783496cdd95cf3b132ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:29 -0400 Subject: [PATCH 061/924] New translations subgraph-debug-forking.mdx (Japanese) --- website/pages/ja/cookbook/subgraph-debug-forking.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/ja/cookbook/subgraph-debug-forking.mdx b/website/pages/ja/cookbook/subgraph-debug-forking.mdx index 134e7b12cc1a..c186dbdf805c 100644 --- a/website/pages/ja/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ja/cookbook/subgraph-debug-forking.mdx @@ -6,15 +6,15 @@ title: フォークを用いた迅速かつ容易なサブグラフのデバッ ## さて、それは何でしょうか? -**サブグラフのフォーク**とは、*他*のサブグラフのストア(通常はリモート) からエンティティをフェッチするプロセスです。 +**サブグラフのフォーク**とは、_他_のサブグラフのストア(通常はリモート) からエンティティをフェッチするプロセスです。 -デバッグの文脈では、**サブグラフのフォーク**により、ブロック*X*への同期を待つことなく、ブロック*X*で失敗したサブグラフのデバッグを行うことができます。 +デバッグの文脈では、**サブグラフのフォーク**により、ブロック_X_への同期を待つことなく、ブロック_X_で失敗したサブグラフのデバッグを行うことができます。 ## その方法は? -インデックス作成のためにリモートのGraphノードにサブグラフをデプロイし、ブロック*X*で失敗した場合でも、ブロック*X*と同期しているストアを使用して GraphQL クエリを提供することができます。つまり、ブロック _X_ のインデックス作成時に発生するバグを修正するために、この最新のストアを利用できるのです。 +インデックス作成のためにリモートのGraphノードにサブグラフをデプロイし、ブロック_X_で失敗した場合でも、ブロック_X_と同期しているストアを使用して GraphQL クエリを提供することができます。つまり、ブロック _X_ のインデックス作成時に発生するバグを修正するために、この最新のストアを利用できるのです。 -簡単に言うと、ブロック*X*でデバッグされているローカルにデプロイされたサブグラフにインデックス状態の最新のビューを提供するために、ブロック*X*までインデックスされたサブグラフを持つことが保証されているリモートGraphノードから *失敗したサブグラフをフォーク*しようとしているのです。 +簡単に言うと、ブロック_X_でデバッグされているローカルにデプロイされたサブグラフにインデックス状態の最新のビューを提供するために、ブロック_X_までインデックスされたサブグラフを持つことが保証されているリモートGraphノードから _失敗したサブグラフをフォーク_しようとしているのです。 ## コードを見てみましょう @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -この場合、残念なことに、この完璧に見えるサブグラフを[HostedService](https://thegraph.com/hosted-service/) にデプロイすると、*"Gravatar not found!"*というエラーで失敗してしまいます。 +この場合、残念なことに、この完璧に見えるサブグラフを[HostedService](https://thegraph.com/hosted-service/) にデプロイすると、_"Gravatar not found!"_というエラーで失敗してしまいます。 通常の試すであろう修正方法: @@ -69,7 +69,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { 回答: -1. `fork-base`は「ベース」URLで、*subgraph id*が追加されたときのURL (`/`) はサブグラフのストアに対する有効な GraphQL endpoint であることを示します。 +1. `fork-base`は「ベース」URLで、_subgraph id_が追加されたときのURL (`/`) はサブグラフのストアに対する有効な GraphQL endpoint であることを示します。 2. フォーキングは簡単であり煩雑な手間はありません ```bash From ea9c7dcba33ffd450059b23351ad76920ff62963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:33 -0400 Subject: [PATCH 062/924] New translations subgraph-debug-forking.mdx (Swedish) --- website/pages/sv/cookbook/subgraph-debug-forking.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/cookbook/subgraph-debug-forking.mdx b/website/pages/sv/cookbook/subgraph-debug-forking.mdx index 0fdaaf7411c0..0478b8509e8d 100644 --- a/website/pages/sv/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/sv/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ I samband med felsökning låter **subgraf forking** dig felsöka din misslyckad När du distribuerar en subgraf till en avlägsen Graph-nod för indexering och den misslyckas vid block _X_, är den goda nyheten att Graph-noden fortfarande kommer att betjäna GraphQL-frågor med hjälp av sitt lager, som synkroniseras för att blockera _X_. Toppen! Det betyder att vi kan dra nytta av denna "up-to-date" butik för att fixa de buggar som uppstår vid indexering av block _X_. -I ett nötskal, vi ska _gaffla den misslyckade subgrafen_ från en avlägsen Graph-nod som garanterat har subgrafen indexerad upp till blocket _X_ för att ge den lokalt distribuerade subgrafen som felsöks i blocket _X_ en uppdaterad vy av indexeringstillståndet. +I ett nötskal, vi ska _gaffla den misslyckade subgrafen_ från en avlägsen Graph-nod som garanterat har subgrafen indexerad upp till blocket *X* för att ge den lokalt distribuerade subgrafen som felsöks i blocket _X_ en uppdaterad vy av indexeringstillståndet. ## Snälla, visa mig lite kod! From ee2f1ccbfe3186a26fb37d9cdf0f2a153d795496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:35 -0400 Subject: [PATCH 063/924] New translations subgraph-debug-forking.mdx (Chinese Simplified) --- website/pages/zh/cookbook/subgraph-debug-forking.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/zh/cookbook/subgraph-debug-forking.mdx b/website/pages/zh/cookbook/subgraph-debug-forking.mdx index 9df8b35a7650..efcc65b2e0d4 100644 --- a/website/pages/zh/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/zh/cookbook/subgraph-debug-forking.mdx @@ -6,13 +6,13 @@ title: 使用分叉快速轻松地调试子图 ## 首先,让我们来看什么是子图分叉 -**子图分叉** 是从*另一个* 子图的存储(通常是远程存储)中缓慢获取实体的过程。 +**子图分叉** 是从_另一个_ 子图的存储(通常是远程存储)中缓慢获取实体的过程。 在调试时,**subgraph forking** 允许您在固定的区块 _X_ 中调试失败的子图,而无需等待区块同步 _X_。 ## 让我们看看这是如何做到的? -当您将子图部署到远程 Graph 节点进行索引而它在区块 *X*上失败时,好消息是Graph 节点仍能以同步至区块 *X*的数据响应GraphQL 查询。这意味着我们可以基于区块 _X_ 最新的数据来修复索引时出现的错误。 +当您将子图部署到远程 Graph 节点进行索引而它在区块 _X_上失败时,好消息是Graph 节点仍能以同步至区块 _X_的数据响应GraphQL 查询。这意味着我们可以基于区块 _X_ 最新的数据来修复索引时出现的错误。 简而言之,我们将从远程 Graph 节点 _分叉失败的子图_,保证子图索引更新至区块 *X*的数据, 以便基于更新至区块 _X_ 的数据在本地部署的子图进行调试,以反映索引数据的最新状态。 @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -糟糕,不幸的是,当我将完美的子图部署到 [托管服务](https://thegraph.com/hosted-service/) 时,它会报*“未找到 Gravatar!”* 的错误。 +糟糕,不幸的是,当我将完美的子图部署到 [托管服务](https://thegraph.com/hosted-service/) 时,它会报_“未找到 Gravatar!”_ 的错误。 尝试修复的常用方法是: From 258fded94154a18a05f2092efcfe888ff4903163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:36 -0400 Subject: [PATCH 064/924] New translations subgraph-debug-forking.mdx (Urdu (Pakistan)) --- website/pages/ur/cookbook/subgraph-debug-forking.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ur/cookbook/subgraph-debug-forking.mdx b/website/pages/ur/cookbook/subgraph-debug-forking.mdx index 764a7294c0d6..0f1fb3a56d32 100644 --- a/website/pages/ur/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ur/cookbook/subgraph-debug-forking.mdx @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -افوہ، کتنی بدقسمتی کی بات ہے، جب میں اپنے بہترین نظر آنے والے سب گراف کو [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) میں تعینات کرتا ہوں تو یہ _"گراوتار نہیں ملا!"_ خرابی. +افوہ، کتنی بدقسمتی کی بات ہے، جب میں اپنے بہترین نظر آنے والے سب گراف کو [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) میں تعینات کرتا ہوں تو یہ *"گراوتار نہیں ملا!"* خرابی. درست کرنے کی کوشش کرنے کا معمول کا طریقہ یہ ہے: From 8f66fbf1d6b6591bbcb3a47367f527cb505a04ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:37 -0400 Subject: [PATCH 065/924] New translations subgraph-debug-forking.mdx (Marathi) --- website/pages/mr/cookbook/subgraph-debug-forking.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/mr/cookbook/subgraph-debug-forking.mdx b/website/pages/mr/cookbook/subgraph-debug-forking.mdx index ae08df06ed38..06ceb8df1ce1 100644 --- a/website/pages/mr/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/mr/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ title: फॉर्क्स वापरून जलद आणि सुलभ जेव्हा तुम्ही इंडेक्सिंगसाठी रिमोट ग्राफ नोडवर सबग्राफ उपयोजित करता आणि तो ब्लॉक _X_ वर अयशस्वी होतो, तेव्हा चांगली बातमी अशी आहे की आलेख नोड अजूनही त्याचे स्टोअर वापरून GraphQL क्वेरी सर्व्ह करेल, जे _X_ अवरोधित करण्यासाठी समक्रमित केले आहे. खूप छान आहे! याचा अर्थ ब्लॉक _X_ अनुक्रमित करताना उद्भवणाऱ्या बगचे निराकरण करण्यासाठी आम्ही या "अप-टू-डेट" स्टोअरचा लाभ घेऊ शकतो. -थोडक्यात, आम्ही एका रिमोट ग्राफ नोडवरून _अयशस्वी सबग्राफ फोर्क करणार आहोत_ ज्याला _X_ ब्लॉक _X_ वर डीबग केलेला स्थानिकरित्या उपयोजित सबग्राफ प्रदान करण्यासाठी अनुक्रमणिका स्थितीचे अद्ययावत दृश्य. +थोडक्यात, आम्ही एका रिमोट ग्राफ नोडवरून _अयशस्वी सबग्राफ फोर्क करणार आहोत_ ज्याला *X* ब्लॉक _X_ वर डीबग केलेला स्थानिकरित्या उपयोजित सबग्राफ प्रदान करण्यासाठी अनुक्रमणिका स्थितीचे अद्ययावत दृश्य. ## कृपया, मला काही कोड दाखवा! @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -अरेरे, किती दुर्दैवी आहे, जेव्हा मी माझा परिपूर्ण दिसणारा सबग्राफ [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर तैनात करतो तेव्हा तो _"Gravatar आढळले नाही!"_ त्रुटी. +अरेरे, किती दुर्दैवी आहे, जेव्हा मी माझा परिपूर्ण दिसणारा सबग्राफ [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर तैनात करतो तेव्हा तो *"Gravatar आढळले नाही!"* त्रुटी. निराकरण करण्याचा प्रयत्न करण्याचा नेहमीचा मार्ग आहे: From 63a1d00b601a9a0d2959f00e6a82de5a884086d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:38 -0400 Subject: [PATCH 066/924] New translations subgraph-debug-forking.mdx (Hindi) --- website/pages/hi/cookbook/subgraph-debug-forking.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/hi/cookbook/subgraph-debug-forking.mdx b/website/pages/hi/cookbook/subgraph-debug-forking.mdx index 60d88d3f07c9..32e1df5a58dd 100644 --- a/website/pages/hi/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/hi/cookbook/subgraph-debug-forking.mdx @@ -8,11 +8,11 @@ title: फोर्क्स का उपयोग करके त्वरि **सबग्राफ फोर्किंग** आलसी ढंग से _दूसरे_ सबग्राफ के स्टोर (आमतौर पर एक परोक्ष सबग्राफ) से इकाइयां को लाने की प्रक्रिया है। -डिबगिंग के संदर्भ में, **सबग्राफ फोर्किंग** आपको ब्लॉक*X* को सिंक-अप करने के लिए बिना प्रतीक्षा किए ब्लॉक _X_ पर अपने विफल सबग्राफ को डीबग करने की अनुमति देता है । +डिबगिंग के संदर्भ में, **सबग्राफ फोर्किंग** आपको ब्लॉक_X_ को सिंक-अप करने के लिए बिना प्रतीक्षा किए ब्लॉक _X_ पर अपने विफल सबग्राफ को डीबग करने की अनुमति देता है । ## क्या?! कैसे? -जब आप अनुक्रमण के लिए एक दूरस्थ ग्राफ़ नोड पर एक सबग्राफ तैनात करते हैं और यह ब्लॉक _X_ करने में विफल रहता है, तो अच्छी खबर यह है कि ग्राफ़ नोड अभी भी अपने स्टोर का उपयोग करके ग्राफ़क्यूएल क्वेरी को सर्व करेगा, जो ब्लॉक*X* में सिंक-अप है। एक दम बढ़िया! इसका मतलब यह है कि ब्लॉक _X_ को अनुक्रमित करते समय उत्पन्न होने वाली बग को ठीक करने के लिए हम इस "अप-टू-डेट" स्टोर का लाभ उठा सकते हैं। +जब आप अनुक्रमण के लिए एक दूरस्थ ग्राफ़ नोड पर एक सबग्राफ तैनात करते हैं और यह ब्लॉक _X_ करने में विफल रहता है, तो अच्छी खबर यह है कि ग्राफ़ नोड अभी भी अपने स्टोर का उपयोग करके ग्राफ़क्यूएल क्वेरी को सर्व करेगा, जो ब्लॉक_X_ में सिंक-अप है। एक दम बढ़िया! इसका मतलब यह है कि ब्लॉक _X_ को अनुक्रमित करते समय उत्पन्न होने वाली बग को ठीक करने के लिए हम इस "अप-टू-डेट" स्टोर का लाभ उठा सकते हैं। संक्षेप में, हम एक दूरस्थ ग्राफ नोड से _असफल सबग्राफ को फोर्क करने जा रहे हैं_ जो सबग्राफ को ब्लॉक _X_ तक अनुक्रमित होने की गारंटी देता है ताकि ब्लॉक _X_ पर डिबग किए जा रहे स्थानीय रूप से तैनात सबग्राफ को इंडेक्सिंग स्थिति का एक अप-टू-डेट दृश्य प्रदान हो सकें। From 6f94fbc1db70bc0fa453bbe803a1067f0805f0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:41 -0400 Subject: [PATCH 067/924] New translations deploying-a-subgraph-to-hosted.mdx (French) --- .../deploying-a-subgraph-to-hosted.mdx | 122 +++++++++--------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx index 185e3e522d3d..e4e1379c8942 100644 --- a/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx @@ -56,7 +56,7 @@ Dans certains cas, vous souhaiterez déployer le même subgraph sur plusieurs r ### Utiliser graph-cli -Le `graph build` (depuis `v0.29.0`) et le `graph déployer` (depuis `v0.32.0`) acceptent deux nouvelles options : +Le `graph build` (depuis `v0.29.0`) et le `graph deploy` (depuis `v0.32.0`) acceptent deux nouvelles options : ```sh Options: @@ -74,10 +74,10 @@ Si vous n'avez pas de fichier `networks.json`, vous devrez en créer un manuelle ```json { - "network1": { // the network name - "dataSource1": { // the dataSource name - "address": "0xabc...", // the contract address (optional) - "startBlock": 123456 // the startBlock (optional) + "network1": { // le nom du réseau + "dataSource1": { // le nom de la source de données + "address": "0xabc...", // l'adresse du contrat (facultatif) + "startBlock": 123456 // le bloc de départ (facultatif) }, "dataSource2": { "address": "0x123...", @@ -98,7 +98,7 @@ Si vous n'avez pas de fichier `networks.json`, vous devrez en créer un manuelle } ``` -**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. +**Note:** Vous n'avez pas à spécifier les `modèles` (si vous en avez) dans le fichier de configuration, seulement les `dataSources`. S'il existe des `modèles` déclarés dans le fichier `subgraph.yaml`, leur réseau sera automatiquement mis à jour avec celui spécifié avec l'option `--network`. Supposons maintenant que vous souhaitiez pouvoir déployer votre subgraph sur les réseaux `mainnet` et `goerli`, et voici votre `subgraph.yaml` : @@ -147,19 +147,19 @@ La commande `build` mettra à jour votre `subgraph.yaml` avec la configuration ` ```yaml # ... dataSources: - - type: ethereum/contrat - nom: Gravity - réseau: goerli + - kind: ethereum/contract + name: Gravity + network: goerli source: - adresse: '0xabc...' - abi: Gravité + address: '0xabc...' + abi: Gravity mapping: kind: ethereum/events ``` Vous êtes maintenant prêt à `yarn deploy`. -**Note:** As mentioned earlier, since `graph-cli 0.32.0` you can directly run `yarn deploy` with the `--network` option: +**Remarque :** Comme mentionné précédemment, depuis `graph-cli 0.32.0` vous pouvez exécuter directement `yarn deploy` avec le `--network` option : ```sh # Utilisation du fichier networks.json par défaut @@ -171,27 +171,27 @@ yarn deploy --network goerli --network-file path/to/config ### Utilisation du modèle subgraph.yaml -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/). +Une solution pour les anciennes versions de graph-cli qui permet de paramétrer des aspects tels que les adresses de contrat consiste à en générer des parties à l'aide d'un système de modèles comme [Mustache](https://mustache.github.io/) ou [Handlebars](https://handlebarsjs.com/). -To illustrate this approach, let's assume a subgraph should be deployed to mainnet and Goerli using different contract addresses. You could then define two config files providing the addresses for each network: +Pour illustrer cette approche, supposons qu'un subgraph doive être déployé sur mainnet et Goerli en utilisant des adresses contractuelles différentes. Vous pourriez alors définir deux fichiers de configuration fournissant les adresses pour chaque réseau : ```json { - "network": "réseau principal", - "adresse": "0x123..." + "network": "mainnet", + "address": "0x123..." } ``` -and +et ```json { - "réseau": "goerli", - "adresse": "0xabc..." + "réseau": "goerli", + "adresse": "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`: +Parallèlement à cela, vous remplaceriez le nom et les adresses du réseau dans le manifeste par des espaces réservés variables `{{network}}` et `{{address}}` et renommez le manifeste par exemple. `subgraph.template.yaml` : ```yaml # ... @@ -205,76 +205,76 @@ dataSources: address: '{{address}}' abi: Gravity mapping: - kind: ethereum/événements + kind: ethereum/events ``` Afin de générer un manifeste sur l'un ou l'autre des réseaux, vous pouvez ajouter deux commandes supplémentaires à `package.json` ainsi qu'une dépendance sur `mustache` : ```json { - ... - "scripts": { - ... - "prepare:mainnet": "moustache config/mainnet.json subgraph.template.yaml > subgraph.yaml", - "prepare:goerli": "mustache config/goerli.json subgraph.template.yaml > subgraph.yaml" - }, - "dépendances dev": { - ... - "moustache": "^3.1.0" - } + ... + "scripts": { + ... + "prepare:mainnet": "mustache config/mainnet.json subgraph.template.yaml > subgraph.yaml", + "prepare:goerli": "mustache config/goerli.json subgraph.template.yaml > subgraph.yaml" + }, + "devDependencies": { + ... + "mustache": "^3.1.0" + } } ``` -To deploy this subgraph for mainnet or Goerli you would now simply run one of the two following commands: +Pour déployer ce subgraph pour le réseau principal ou Goerli, vous devez maintenant simplement exécuter l'une des deux commandes suivantes : ```sh # Mainnet: -fil préparer:mainnet && déploiement de fil +yarn prepare:mainnet && yarn deploy -# Goerli : -fil préparer:goerli && déploiement de fil +# Goerli: +yarn prepare:goerli && yarn deploy ``` Un exemple concret de ce type d'action peut être trouvé [ici](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. +**Note:** Cette approche peut également être appliquée à des situations plus complexes, lorsqu'il est nécessaire de substituer plus que des adresses contractuelles et des noms de réseau ou de générer des mappings ou des ABI à partir de modèles. ## Vérification de l'état des subgraphs -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. +Si un subgraph se synchronise avec succès, c'est un bon signe qu'il continuera à bien fonctionner pour toujours. Cependant, de nouveaux déclencheurs sur le réseau peuvent amener votre subgraph à rencontrer une condition d'erreur non testée ou il peut commencer à prendre du retard en raison de problèmes de performances ou de problèmes avec les opérateurs de nœuds. -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: +Graph Node expose un point de terminaison graphql que vous pouvez interroger pour vérifier l'état de votre subgraph. Sur le service hébergé, il est disponible sur `https://api.thegraph.com/index-node/graphql`. Sur un nœud local, il est disponible sur le port `8030/graphql` par défaut. Le schéma complet de ce point de terminaison peut être trouvé [ici](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql) . Voici un exemple de requête qui vérifie l'état de la version actuelle d'un subgraph : ```graphql { - indexingStatusForCurrentVersion(subgraphName : "org/subgraph") { - synchronisé - santé - erreur fatale { - message - bloc "{ nombre - hacher - } - gestionnaire - } - Chaînes { - chaîneHeadBlock "{ - nombre - } - dernierBloc -"{ - nombre - } - } - } + 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. +Cela vous donnera le `chainHeadBlock` que vous pouvez comparer avec le `latestBlock` de votre subgraph pour vérifier s'il est en retard. `synced` indique si le subgraph a déjà rattrapé la chaîne. `health` peut actuellement prendre les valeurs `healthy` si aucune erreur ne s'est produite, ou `failed` si une erreur a interrompu la progression du subgraph. Dans ce cas, vous pouvez consulter le champ `fatalError` pour obtenir des détails sur cette erreur. ## Politique d'archivage des subgraphs des services hébergés -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. +Le service hébergé est un indexeur de Graph Node gratuit. Les développeurs peuvent déployer des subgraphs indexant une gamme de réseaux, qui seront indexés et mis à disposition pour interrogation via graphQL. Afin d'améliorer les performances du service pour les subgraphs actifs, le service hébergé archivera les subgraphs inactifs. @@ -286,6 +286,6 @@ Les développeurs seront avertis par courriel si l'un de leurs subgraphs a été Lorsqu'une nouvelle version d'un subgraph est déployée, la version précédente est archivée (supprimée de la base de données du graph-node). Cela ne se produit que si la version précédente n'est pas publiée sur le réseau décentralisé du Graph. -When a subgraph version isn’t queried for over 45 days, that version is archived. +Lorsqu'une version d'un subgraph n'est pas interrogée pendant plus de 45 jours, cette version est archivée. Chaque subgraph concerné par cette politique dispose d'une option de restauration de la version en question. From ceb847604ba164813a57660c06bf28ec3ed406bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:42 -0400 Subject: [PATCH 068/924] New translations deploying-a-subgraph-to-hosted.mdx (Spanish) --- website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx index 70c75d3049ef..4c769e143bdb 100644 --- a/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx @@ -157,7 +157,7 @@ dataSources: kind: ethereum/events ``` -Ahora está listo para `yarn deploy`. +Ahora está listo para ` yarn deploy `. **Nota:** como se mencionó anteriormente, desde `graph-cli 0.32.0` puedes ejecutar directamente `yarn deploy` con la opción`--network`: From e174989aa2ec67e427100228ba05619a0651ce11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:43 -0400 Subject: [PATCH 069/924] New translations deploying-a-subgraph-to-hosted.mdx (Arabic) --- .../deploying-a-subgraph-to-hosted.mdx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/website/pages/ar/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/ar/deploying/deploying-a-subgraph-to-hosted.mdx index fbadfa128b57..d73262114e2e 100644 --- a/website/pages/ar/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/ar/deploying/deploying-a-subgraph-to-hosted.mdx @@ -6,49 +6,49 @@ title: Deploying a Subgraph to the Hosted Service 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). -## إنشاء حساب Hosted Service +## 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 -بعد إنشاء حساب ، انتقل إلى [لوحة القيادة](https://thegraph.com/hosted-service/dashboard). وانسخ رمز وصول المعروض على لوحة المعلومات وقم بتنفيذ `graph auth --product hosted-service `. سيؤدي هذا إلى تخزين رمز وصول على جهاز الكمبيوتر الخاص بك. تحتاج للقيام بذلك مرة واحدة ، أو إذا قمت بإعادة توليد رمز وصول. +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. -## إنشاء Subgraph على الخدمة المستضافة (Hosted Service) +## Create a Subgraph on the Hosted Service قبل نشر الـ subgraph ، تحتاج إلى إنشائه في Graph Explorer. انتقل إلى [لوحة القيادة](https://thegraph.com/hosted-service/dashboard) وانقر على _'Add Subgraph'_ واملأ المعلومات أدناه حسب الحاجة: -**Image** - اختر صورة لاستخدامها كصورة عرض وصورة مصغرة للـ subgraph. +**Image** - Select an image to be used as a preview image and thumbnail for the subgraph. **Subgraph اسم** - بالاضافة لاسم الحساب الذي تم إنشاء الـ subgraph ضمنه، سيؤدي هذا أيضا إلى تعريف اسم النمط `account-name/subgraph-name` - المستخدم لعمليات النشر و GraphQL endpoints. _لا يمكن تغيير هذا الحقل لاحقا._ -**Account** - الحساب الذي تم إنشاء الـ subgraph ضمنه. يمكن أن يكون هذا حساب فرد أو منظمة. _لا يمكن نقل الـ Subgraphs بين الحسابات لاحقا._ +**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** - النص الذي سيظهر في بطاقات الـ subgraph. +**Subtitle** - Text that will appear in subgraph cards. -**Description** - وصف الـ subgraph ، ويكون مرئيا في صفحة تفاصيل الـ subgraph. +**Description** - Description of the subgraph, visible on the subgraph details page. -**GitHub URL** - رابط لمستودع(repository) الـ subgraph على GitHub. +**GitHub URL** - Link to the subgraph repository on GitHub. -**Hide** - يؤدي تشغيل هذا إلى إخفاء الـ subgraph في Graph Explorer. +**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). -## نشر Subgraph على الخدمة المستضافة (Hosted Service) +## Deploy a Subgraph on the Hosted Service -سيؤدي نشر الـ subgraph الخاص بك إلى رفع ملفاته والتي قمت بإنشائها باستخدام `yarn build` إلى IPFS وإخبار Graph Explorer ببدء فهرسة الـ subgraph باستخدام هذه الملفات. +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. -يمكنك نشر الـ subgraph عن طريق تنفيذ `yarn deploy` +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. -## إعادة نشر الـ Subgraph +## 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. -إذا كان الـ subgraph المنشور سابقا لا يزال في حالة`Syncing` ، فسيتم استبداله على الفور بالإصدار المنشور حديثا. وإذا كان الـ subgraph المنشور سابقا متزامنا بالكامل بالفعل ، فسيقوم Graph Node بوضع علامة على الإصدار المنشور حديثا على أنه `Pending Version` ، ويتم مزامنته في الخلفية ، ويستبدل الإصدار المنشور حاليا بالإصدار الجديد بمجرد الانتهاء من مزامنة الإصدار الجديد. هذا يضمن أن لديك subgraph تعمل به أثناء مزامنة الإصدار الجديد. +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 From b877b8ef5bb37ab3d80816ce528b3d6a3768902c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:44 -0400 Subject: [PATCH 070/924] New translations deploying-a-subgraph-to-hosted.mdx (Czech) --- .../deploying-a-subgraph-to-hosted.mdx | 110 +++++++++--------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/website/pages/cs/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/cs/deploying/deploying-a-subgraph-to-hosted.mdx index 621f6321a0d4..3a3288005c46 100644 --- a/website/pages/cs/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/cs/deploying/deploying-a-subgraph-to-hosted.mdx @@ -1,62 +1,62 @@ --- -title: Deploying a Subgraph to the Hosted Service +title: Nasazení podgrafu do hostované služby --- -> 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. +> Pokud síť není v hostované službě podporována, můžete pro její indexování spustit vlastní [grafů-uzel](https://github.com/graphprotocol/graph-node). -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). +Tato stránka vysvětluje, jak nasadit podgraf do hostované služby. Chcete-li nasadit podgraf, musíte nejprve nainstalovat [Graph CLI](https://github.com/graphprotocol/graph-cli). Pokud jste ještě nevytvořili podgraf, přečtěte si část [vytvoření podgrafu](/developing/creating-a-subgraph). -## Create a Hosted Service account +## Vytvoření účtu hostované služby -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. +Před použitím hostované služby si vytvořte účet v naší hostované službě. K tomu budete potřebovat účet [Github](https://github.com/); pokud žádný nemáte, musíte jej nejprve vytvořit. Poté přejděte na [Hostovanou službu](https://thegraph.com/hosted-service/) a klikněte na _Zaregistrovat se pomocí Githubu _ a dokončete autorizační proces Github. -## Store the Access Token +## Uložení přístupového tokenu -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. +Po vytvoření účtu přejděte do svého [nástěnky](https://thegraph.com/hosted-service/dashboard). Zkopírujte přístupový token zobrazený na nástěnce a spusťte příkaz `graph auth --product hosted-service `. Tím se přístupový token uloží na váš počítač. Toto je třeba udělat pouze jednou, nebo pokud někdy obnovíte přístupový token. -## Create a Subgraph on the Hosted Service +## Vytvoření podgrafu v hostované službě -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: +Před nasazením podgrafu jej musíte vytvořit v Průzkumníku grafů. Přejděte na [hlavní panel](https://thegraph.com/hosted-service/dashboard) a klikněte na _'Add Subgraph'_ a podle potřeby vyplňte níže uvedené informace: -**Image** - Select an image to be used as a preview image and thumbnail for the subgraph. +**Obrázek** - Vyberte obrázek, který se použije jako náhledový obrázek a miniatura podgrafu. -**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._ +**Název podgrafu** – Spolu s názvem účtu, pod kterým je podgraf vytvořen, bude také definovat styl `název-účtu/název-podgrafu` název používaný pro nasazení a koncové body GraphQL. _Toto pole nelze později změnit._ -**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._ +**Účet** – Účet, pod kterým je podgraf vytvořen. Může se jednat o účet jednotlivce nebo organizace. _Podgrafy nelze později přesouvat mezi účty._ -**Subtitle** - Text that will appear in subgraph cards. +**Název podgrafu** - Text, který se zobrazí na kartách podgrafů. -**Description** - Description of the subgraph, visible on the subgraph details page. +**Popis** - Popis podgrafu, viditelný na stránce s podrobnostmi podgrafu. -**GitHub URL** - Link to the subgraph repository on GitHub. +**GitHub URL** - Odkaz na repozitář subgrafu na GitHubu. -**Hide** - Switching this on hides the subgraph in the Graph Explorer. +**Skrýt** - Zapnutím této funkce se podgraf v Průzkumníku grafu skryje. -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). +Po uložení nového podgrafu se zobrazí obrazovka s nápovědou, jak nainstalovat Graf CLI, jak vygenerovat lešení pro nový podgraf a jak podgraf nasadit. První dva kroky byly popsány v části [Definování podgrafu](/developing/defining-a-subgraph). -## Deploy a Subgraph on the Hosted Service +## Nasazení podgrafu v hostované službě -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. +Nasazení vašeho podgrafu nahraje soubory podgrafu, které jste vytvořili pomocí `yarn build`, do systému IPFS a řekne Průzkumníku grafů, aby začal indexovat váš podgraf pomocí těchto souborů. -You deploy the subgraph by running `yarn deploy` +Podgraf nasadíte příkazem `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. +Po nasazení podgrafu se Průzkumník grafu přepne na zobrazení stavu synchronizace podgrafu. V závislosti na množství dat a počtu událostí, které je třeba extrahovat z historických bloků, počínaje blokem geneze, může synchronizace trvat od několika minut až po několik hodin. -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. +Stav podgrafu se přepne na `Synchronizováno`, jakmile uzel grafu extrahuje všechna data z historických bloků. Uzel Graph Node bude pokračovat v kontrole bloků pro váš podgraf, jakmile budou tyto bloky vytěženy. -## Redeploying a Subgraph +## Přerozdělení podgrafu -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. +Pokud provedete změny v definici podgrafu, například opravíte problém v mapování entit, spusťte znovu výše uvedený příkaz `yarn deploy` a nasaďte aktualizovanou verzi podgrafu. Jakákoli aktualizace podgrafu vyžaduje, aby uzel Graph Node znovu zaindexoval celý váš podgraf, opět počínaje blokem genesis. -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. +Pokud je váš dříve nasazený podgraf stále ve stavu `Synchronizuje se`, bude okamžitě nahrazen nově nasazenou verzí. Pokud je dříve nasazený podgraf již plně synchronizován, Graph Node označí nově nasazenou verzi jako `Pending Version`, synchronizuje ji na pozadí a pouze po synchronizaci nahradí aktuálně nasazenou verzi novou verzí. nová verze skončila. To zajistí, že budete mít podgraf, se kterým můžete pracovat, zatímco se synchronizuje nová verze. -## Deploying the subgraph to multiple networks +## Nasazení podgrafu do více sítí -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. +V některých případech budete chtít nasadit stejný podgraf do více sítí, aniž byste museli duplikovat celý jeho kód. Hlavním problémem, který s tím souvisí, je skutečnost, že smluvní adresy v těchto sítích jsou různé. ### Using graph-cli -Both `graph build` (since `v0.29.0`) and `graph deploy` (since `v0.32.0`) accept two new options: +`sestavení grafu` (od `v0.29.0`) i `nasazení grafu` (od `v0.32.0`) přijímají dvě nové možnosti : ```sh Options: @@ -66,11 +66,11 @@ Options: --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. +Pomocí volby `--network` můžete zadat konfiguraci sítě ze standardního souboru `json` (výchozí hodnota je `networks.json`) a snadno aktualizovat podgraf během vývoje. -**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. +**Poznámka:** Příkaz `init` nyní na základě poskytnutých informací automaticky vygeneruje `networks.json`. Poté budete moci aktualizovat stávající sítě nebo přidat další sítě. -If you don't have a `networks.json` file, you'll need to manually create one with the following structure: +Pokud nemáte soubor `networks.json`, musíte jej vytvořit ručně s následující strukturou: ```json { @@ -98,9 +98,9 @@ If you don't have a `networks.json` file, you'll need to manually create one wit } ``` -**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. +**Poznámka:** V konfiguračním souboru nemusíte zadávat žádné `šablony` (pokud nějaké máte), pouze ` dataSources`. Pokud jsou v souboru `subgraph.yaml` deklarovány nějaké `šablony`, jejich síť bude automaticky aktualizována na síť zadanou pomocí možnosti `--network`. -Now, let's assume you want to be able to deploy your subgraph to the `mainnet` and `goerli` networks, and this is your `subgraph.yaml`: +Nyní předpokládejme, že chcete být schopni nasadit svůj podgraf do sítí `mainnet` a `goerli`, a to je váš soubor `subgraph.yaml`: ```yaml # ... @@ -115,7 +115,7 @@ dataSources: kind: ethereum/events ``` -This is what your networks config file should look like: +Takto by měl vypadat konfigurační soubor sítě: ```json { @@ -132,7 +132,7 @@ This is what your networks config file should look like: } ``` -Now we can run one of the following commands: +Nyní můžeme spustit jeden z následujících příkazů: ```sh # Using default networks.json file @@ -142,7 +142,7 @@ yarn build --network goerli yarn build --network goerli --network-file path/to/config ``` -The `build` command will update your `subgraph.yaml` with the `goerli` configuration and then re-compile the subgraph. Your `subgraph.yaml` file now should look like this: +Příkaz `build` aktualizuje váš `subgraph.yaml` pomocí konfigurace `goerli` a poté znovu zkompiluje podgraf. Váš soubor `subgraph.yaml` by nyní měl vypadat takto: ```yaml # ... @@ -157,9 +157,9 @@ dataSources: kind: ethereum/events ``` -Now you are ready to `yarn deploy`. +Nyní jste připraveni na `yarn deploy`. -**Note:** As mentioned earlier, since `graph-cli 0.32.0` you can directly run `yarn deploy` with the `--network` option: +**Poznámka:** Jak již bylo zmíněno dříve, od `graph-cli 0.32.0` můžete přímo spustit `yarn deploy` pomocí `--network` možnost: ```sh # Using default networks.json file @@ -169,11 +169,11 @@ yarn deploy --network goerli yarn deploy --network goerli --network-file path/to/config ``` -### Using subgraph.yaml template +### Použití šablony subgraph.yaml -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/). +Jedním z řešení pro starší verze graph-cli, které umožňují parametrizovat aspekty, jako jsou adresy smluv, je generování jeho částí pomocí šablonovacího systému, jako je [Mustache](https://mustache.github.io/) nebo [Handlebars](https://handlebarsjs.com/). -To illustrate this approach, let's assume a subgraph should be deployed to mainnet and Goerli using different contract addresses. You could then define two config files providing the addresses for each network: +Pro ilustraci tohoto přístupu předpokládejme, že podgraf by měl být nasazen do mainnet a Goerli s použitím různých smluvních adres. Pak byste mohli definovat dva konfigurační soubory poskytující adresy pro každou síť: ```json { @@ -182,7 +182,7 @@ To illustrate this approach, let's assume a subgraph should be deployed to mainn } ``` -and +a ```json { @@ -191,7 +191,7 @@ and } ``` -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`: +Spolu s tím byste v manifestu nahradili název sítě a adresy zástupnými proměnnými `{{network}}` a `{{address}}` a přejmenovali manifest např. na `subgraph.template.yaml`: ```yaml # ... @@ -208,7 +208,7 @@ dataSources: 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`: +Abychom vygenerovali manifest pro libovolnou síť, můžete přidat k souboru `package.json` dvě další příkazy spolu s závislostí na `mustache`: ```json { @@ -225,7 +225,7 @@ In order to generate a manifest to either network, you could add two additional } ``` -To deploy this subgraph for mainnet or Goerli you would now simply run one of the two following commands: +Pro nasazení tohoto podgrafu pro mainnet nebo Goerli nyní stačí spustit jeden z následujících dvou příkazů: ```sh # Mainnet: @@ -235,15 +235,15 @@ yarn prepare:mainnet && yarn deploy yarn prepare:goerli && yarn deploy ``` -A working example of this can be found [here](https://github.com/graphprotocol/example-subgraph/tree/371232cf68e6d814facf5e5413ad0fef65144759). +Funkční příklad najdete [zde](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. +**Poznámka:** Tento přístup lze použít i ve složitějších situacích, kdy je třeba nahradit více než jen smluvní adresy a názvy sítí nebo kdy je třeba generovat mapování nebo ABI také ze šablon. -## Checking subgraph health +## Kontrola stavu podgrafů -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. +Pokud se podgraf úspěšně synchronizuje, je to dobré znamení, že bude dobře fungovat navždy. Nové spouštěče v síti však mohou způsobit, že se podgraf dostane do neověřeného chybového stavu, nebo může začít zaostávat kvůli problémům s výkonem či operátory uzlů. -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: +Graph Node vystavuje koncový bod GraphQL, který můžete dotazovat, abyste zkontrolovali stav svého podgrafu. Na hostované službě je k dispozici na adrese `https://api.thegraph.com/index-node/graphql`. Na lokálním uzlu je obvykle dostupný na výchozím portu `8030/graphql`. Úplný schéma pro tento koncový bod najdete [zde](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Zde je příklad dotazu, který zkontroluje stav aktuální verze podgrafu: ```graphql { @@ -270,15 +270,15 @@ Graph Node exposes a graphql endpoint which you can query to check the status of } ``` -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. +Toto vám poskytne hodnotu `chainHeadBlock`, kterou můžete porovnat s `latestBlock` na vašem podgrafu, abyste zjistili, zda zaostává. Pole `synced` informuje, zda se podgraf kdy dostal na aktuální blok v blockchainu. Pole `health` může aktuálně nabývat hodnoty `healthy`, pokud nedošlo k žádným chybám, nebo `failed`, pokud došlo k chybě, která zastavila postup podgrafu. V takovém případě můžete zkontrolovat pole `fatalError` pro podrobnosti o této chybě. -## Hosted service subgraph archive policy +## Zásady archivace podgrafů hostovaných služeb -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. +Hostovaná služba je bezplatný indexer grafických uzlů. Vývojáři mohou nasadit subgrafy indexující řadu sítí, které budou indexovány a zpřístupněny pro dotazování prostřednictvím jazyka graphQL. -To improve the performance of the service for active subgraphs, the Hosted Service will archive subgraphs that are inactive. +Pro zlepšení výkonu služby pro aktivní podgrafy bude hostovaná služba archivovat podgrafy, které jsou neaktivní. -**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.** +**Podgraf je definován jako "neaktivní", pokud byl do hostované služby nasazen před více než 45 dny a pokud za posledních 45 dní obdržel 0 dotazů.** 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. From 70aba56d8c17aafa51b4a3e50411aaf07baa16d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:45 -0400 Subject: [PATCH 071/924] New translations deploying-a-subgraph-to-hosted.mdx (Italian) --- .../deploying-a-subgraph-to-hosted.mdx | 144 +++++++++--------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx index 621f6321a0d4..af34304a72ee 100644 --- a/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx @@ -1,83 +1,83 @@ --- -title: Deploying a Subgraph to the Hosted Service +title: Distribuzione di un subgraph al 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. +> Se una rete non è supportata dal Hosted Service, è possibile eseguire il proprio [graph-node](https://github.com/graphprotocol/graph-node) per indicizzarlo. -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). +Questa pagina spiega come distribuire un subgraph al Hosted Service. Per distribuire un subgraph è necessario installare prima il programma [Graph CLI](https://github.com/graphprotocol/graph-cli). Se non si è già creato un subgraph, si veda la sezione [creating a subgraph](/developing/creating-a-subgraph). -## Create a Hosted Service account +## Creare un account del Hosted Service -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. +Prima di utilizzare il Hosted Service, creare un account nel nostro Hosted Service. Per questo è necessario un account [Github](https://github.com/); se non ne avete uno, dovete prima crearlo. Quindi, navigare nella sezione [Hosted Service](https://thegraph.com/hosted-service/), cliccare sul pulsante _'Iscriviti con Github'_ e completare il flusso di autorizzazione di Github. -## Store the Access Token +## Memorizzare il token di accesso -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. +Dopo aver creato un account, accedere alla propria [dashboard](https://thegraph.com/hosted-service/dashboard). Copiare il token di accesso visualizzato nella dashboard ed eseguire `graph auth --product hosted-service `. In questo modo il token di accesso verrà memorizzato sul computer. È necessario farlo solo una volta, o se si rigenera il token di accesso. -## Create a Subgraph on the Hosted Service +## Creare un subgraph sul 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: +Prima di distribuire il subgraph, è necessario crearlo in Graph Explorer. Andare alla pagina [dashboard](https://thegraph.com/hosted-service/dashboard) e fare clic sul pulsante _'Aggiungi subgraph_ e compilare le informazioni sottostanti in base alle esigenze: -**Image** - Select an image to be used as a preview image and thumbnail for the subgraph. +**Image** - Selezionare un'immagine da utilizzare come anteprima e miniatura per il 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._ +**Subgraph Name** - Insieme al nome dell'account con cui viene creato il subgraph, questo definirà anche il nome in stile `name-account/name-subgraph` usato per le distribuzioni e gli endpoint GraphQL. _Questo campo non può essere modificato in seguito._ -**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._ +**Account** - Il account sotto il quale è stato creato il subgraph. Può essere l'account di un individuo o di un'organizzazione. _I subgraph non possono essere spostati da un account all'altro in seguito._ -**Subtitle** - Text that will appear in subgraph cards. +**Subtitle** - Il testo che apparirà nelle schede dei subgraph. -**Description** - Description of the subgraph, visible on the subgraph details page. +**Description** - Descrizione del subgraph, visibile nella pagina dei dettagli del subgraph. -**GitHub URL** - Link to the subgraph repository on GitHub. +**GitHub URL** - Link al repository del subgraph su GitHub. -**Hide** - Switching this on hides the subgraph in the Graph Explorer. +**Hide** - L'attivazione di questa opzione nasconde il subgraph nel 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). +Dopo aver salvato il nuovo subgraph, viene visualizzata una schermata di aiuto su come installare la Graph CLI, come generare lo scaffolding per un nuovo subgraph e come distribuire il subgraph. I primi due passi sono stati coperti nella sezione [Definizione di un subgraph](/sviluppo/definizione di un subgraph). -## Deploy a Subgraph on the Hosted Service +## Distribuire un subgraph sul 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. +Il deploy del subgraph caricherà i file del subgraph costruiti con `yarn build` su IPFS e dirà a Graph Explorer di iniziare l'indicizzazione del subgraph usando questi file. -You deploy the subgraph by running `yarn deploy` +Si distribuisce il subgraph eseguendo `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. +Dopo aver distribuito il subgraph, the Graph Explorer mostrerà lo stato di sincronizzazione del subgraph. A seconda della quantità di dati e del numero di eventi da estrarre dai blocchi storici, a partire dal blocco genesi, la sincronizzazione può richiedere da pochi minuti a diverse ore. -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. +Lo stato del subgraph passa a `Synced` una volta che il Graph Node ha estratto tutti i dati dai blocchi storici. Il Graph Node continuerà a ispezionare i blocchi del subgraph mentre questi blocchi vengono estratti. -## Redeploying a Subgraph +## Ridistribuzione di un 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. +Quando si apportano modifiche alla definizione del subgraph, ad esempio per risolvere un problema nelle mappature delle entità, eseguire nuovamente il comando `yarn deploy` di cui sopra per distribuire la versione aggiornata del subgraph. Ogni aggiornamento di un subgraph richiede che il Graph Node reindicizzi l'intero subgraph, sempre a partire dal blocco genesis. -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. +Se il subgraph distribuito in precedenza è ancora in stato `Syncing`, verrà immediatamente sostituito con la nuova versione distribuita. Se il subgraph distribuito in precedenza è già completamente sincronizzato, Graph Node segnerà la nuova versione distribuita come `Pending Version`, sincronizzarla in background e sostituire la versione attualmente distribuita con quella nuova solo al termine della sincronizzazione della nuova versione. In questo modo si ha a disposizione un subgraph su cui lavorare durante la sincronizzazione della nuova versione. -## Deploying the subgraph to multiple networks +## Distribuzione del subgraph su più reti -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. +In alcuni casi, si desidera distribuire lo stesso subgraph su più reti senza duplicare tutto il suo codice. Il problema principale è che gli indirizzi dei contratti su queste reti sono diversi. -### Using graph-cli +### Utilizzo di graph-cli -Both `graph build` (since `v0.29.0`) and `graph deploy` (since `v0.32.0`) accept two new options: +Entrambi `graph build` (da `v0.29.0`) e `graph deploy` (da `v0.32.0`) accettano due nuove opzioni: ```sh -Options: +Opzioni: ... - --network Network configuration to use from the networks config file - --network-file Networks config file path (default: "./networks.json") + --network Configurazione di rete da utilizzare dal file di configurazione delle reti + --network-file Percorso del file di configurazione della rete (predefinito: "./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. +È possibile usare l'opzione `--network` per specificare una configurazione di rete da un file standard `json` (predefinito a `networks.json`) per aggiornare facilmente il subgraph durante lo sviluppo. -**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. +**Nota:** Il comando `init` ora genera automaticamente un `networks.json` basato sulle informazioni fornite. Sarà quindi possibile aggiornare le reti esistenti o aggiungerne altre. -If you don't have a `networks.json` file, you'll need to manually create one with the following structure: +Se non si dispone di un file `networks.json`, è necessario crearne uno manualmente con la seguente struttura: ```json { - "network1": { // the network name - "dataSource1": { // the dataSource name - "address": "0xabc...", // the contract address (optional) - "startBlock": 123456 // the startBlock (optional) + "network1": { // il nome della rete + "dataSource1": { // il nome del dataSource + "address": "0xabc...", // l'indirizzo del contratto (opzionale) + "startBlock": 123456 // il startBlock (opzionale) }, "dataSource2": { "address": "0x123...", @@ -98,9 +98,9 @@ If you don't have a `networks.json` file, you'll need to manually create one wit } ``` -**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. +**Nota:** Non è necessario specificare alcuno dei `template` (se ne esistono) nel file di configurazione, ma solo i `dataSource`. Se ci sono `templates` dichiarati nel file `subgraph.yaml`, la loro rete sarà automaticamente aggiornata a quella specificata con l'opzione `--network`. -Now, let's assume you want to be able to deploy your subgraph to the `mainnet` and `goerli` networks, and this is your `subgraph.yaml`: +Ora, supponiamo che si voglia essere in grado di distribuire il proprio subgraph nelle rete `mainnet` e `goerli`, e questo è il `subgraph.yaml`: ```yaml # ... @@ -115,7 +115,7 @@ dataSources: kind: ethereum/events ``` -This is what your networks config file should look like: +Questo è l'aspetto del file di configurazione delle reti: ```json { @@ -132,17 +132,17 @@ This is what your networks config file should look like: } ``` -Now we can run one of the following commands: +Ora possiamo eseguire uno dei seguenti comandi: ```sh -# Using default networks.json file +# Utilizzo di un file predefinito networks.json yarn build --network goerli -# Using custom named file +# Utilizzo di un file con nome personalizzato yarn build --network goerli --network-file path/to/config ``` -The `build` command will update your `subgraph.yaml` with the `goerli` configuration and then re-compile the subgraph. Your `subgraph.yaml` file now should look like this: +Il comando `build` aggiornerà il `subgraph.yaml` con la configurazione di `goerli` e poi ricompilerà il subgraph. Il file `subgraph.yaml` dovrebbe ora avere questo aspetto: ```yaml # ... @@ -157,23 +157,23 @@ dataSources: kind: ethereum/events ``` -Now you are ready to `yarn deploy`. +Ora si è pronti per `yarn deploy`. -**Note:** As mentioned earlier, since `graph-cli 0.32.0` you can directly run `yarn deploy` with the `--network` option: +**Nota:** Come già menzionato, da `graph-cli 0.32.0` è possibile eseguire direttamente `yarn deploy` con l'opzione `--network`: ```sh -# Using default networks.json file +# Utilizzo di un file predefinito networks.json yarn deploy --network goerli -# Using custom named file +# Utilizzo di un file con nome personalizzato yarn deploy --network goerli --network-file path/to/config ``` -### Using subgraph.yaml template +### Utilizzo del template subgraph.yaml -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/). +Una soluzione per le vecchie versioni di graph-cli che permettono di parametrizzare aspetti come gli indirizzi dei contratti è quella di generare parti di esso utilizzando un sistema di template come [Mustache](https://mustache.github.io/) oppure [Handlebars](https://handlebarsjs.com/). -To illustrate this approach, let's assume a subgraph should be deployed to mainnet and Goerli using different contract addresses. You could then define two config files providing the addresses for each network: +Per illustrare questo approccio, supponiamo che un subgraph debba essere distribuito su mainnet e Goerli utilizzando indirizzi di contratto diversi. Si potrebbero definire due file di configurazione che forniscono gli indirizzi per ciascuna rete: ```json { @@ -182,7 +182,7 @@ To illustrate this approach, let's assume a subgraph should be deployed to mainn } ``` -and +e ```json { @@ -191,7 +191,7 @@ and } ``` -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`: +Inoltre, si dovrebbero sostituire il nome della rete e gli indirizzi nel manifest con i segnaposto variabili `{{network}}` e `{{address}}` e rinominare il manifest, ad esempio, in `subgraph.template.yaml`^: ```yaml # ... @@ -208,7 +208,7 @@ dataSources: 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`: +Per generare un manifest per entrambe le reti, si possono aggiungere due comandi supplementari a `package.json` insieme a una dipendenza da `mustache`: ```json { @@ -225,7 +225,7 @@ In order to generate a manifest to either network, you could add two additional } ``` -To deploy this subgraph for mainnet or Goerli you would now simply run one of the two following commands: +Per distribuire questo subgraph per mainnet o Goerli è sufficiente eseguire uno dei due comandi seguenti: ```sh # Mainnet: @@ -235,15 +235,15 @@ yarn prepare:mainnet && yarn deploy yarn prepare:goerli && yarn deploy ``` -A working example of this can be found [here](https://github.com/graphprotocol/example-subgraph/tree/371232cf68e6d814facf5e5413ad0fef65144759). +Un esempio funzionante di questo può essere trovato [qui](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. +**Nota:** Questo approccio può essere applicato anche a situazioni più complesse, in cui è necessario sostituire più indirizzi e nomi di rete del contratto o in cui si generano mappature o ABI anche da modelli. -## Checking subgraph health +## Verifica dello stato di salute del subgraph -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. +Se un subgraph si sincronizza con successo, è un buon segno che continuerà a funzionare bene per sempre. Tuttavia, nuovi trigger sulla rete potrebbero far sì che il subgraph si trovi in una condizione di errore non testata o che inizi a rimanere indietro a causa di problemi di prestazioni o di problemi con gli operatori dei nodi. -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: +Graph Node espone un endpoint graphql che può essere interrogato per controllare lo stato del subgraph. Sul Hosted Service, è disponibile all'indirizzo `https://api.thegraph.com/index-node/graphql`. Su un nodo locale, è disponibile sul porto `8030/graphql` per impostazione predefinita. Lo schema completo di questo endpoint è disponibile [qui](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Ecco un esempio di query che controlla lo stato della versione corrente di un subgraph: ```graphql { @@ -270,22 +270,22 @@ Graph Node exposes a graphql endpoint which you can query to check the status of } ``` -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. +In questo modo si ottiene il `chainHeadBlock` che può essere confrontato con il `latestBlock` del subgraph per verificare se è in ritardo. `synced` informa se il subgraph ha mai raggiunto la chain. `health` può attualmente assumere i valori di `healthy` se non si sono verificati errori, o `failed` se si è verificato un errore che ha bloccato l'avanzamento del subgraph. In questo caso, è possibile controllare il campo `fatalError` per i dettagli dell'errore. -## Hosted service subgraph archive policy +## Politica di archiviazione dei subgraph dei hosted service -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. +Il Hosted Service è un Indexer gratuito di Graph Node. Gli sviluppatori possono distribuire subgraph che indicizzano una serie di reti, che saranno indicizzati e resi disponibili per query tramite graphQL. -To improve the performance of the service for active subgraphs, the Hosted Service will archive subgraphs that are inactive. +Per migliorare le prestazioni del servizio per i subgraph attivi, il Hosted Service archivia i subgraph inattivi. -**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.** +**Un subgraph è definito "inattivo" se è stato distribuito al Hosted Service più di 45 giorni fa e se ha ricevuto 0 query negli ultimi 45 giorni.** -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. +Gli sviluppatori riceveranno una notifica via e-mail se uno dei loro subgraph è stato contrassegnato come inattivo 7 giorni prima della sua rimozione. Se desiderano "attivare" il loro subgraph, possono farlo effettuando una query nel playground graphQL del loro Hosted Service. Gli sviluppatori possono sempre distribuire nuovamente un subgraph archiviato se è necessario. -## Subgraph Studio subgraph archive policy +## Politica di archiviazione dei subgraph di Subgraph Studio -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. +Quando viene distribuita una nuova versione di un subgraph, la versione precedente viene archiviata (cancellata dal DB del graph-node). Questo avviene solo se la versione precedente non è stata pubblicata sulla rete decentralizzata di The Graph. -When a subgraph version isn’t queried for over 45 days, that version is archived. +Quando una versione del subgraph non viene interrogata per oltre 45 giorni, viene archiviata. -Every subgraph affected with this policy has an option to bring the version in question back. +Ogni subgraph colpito da questa politica ha un'opzione per recuperare la versione in questione. From 7036cc4551b30394b2ec38a6bf36c3c5e823ed8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:51 -0400 Subject: [PATCH 072/924] New translations deploying-a-subgraph-to-hosted.mdx (Swedish) --- website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx index 07d5bc4775ec..9e47b0462385 100644 --- a/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx @@ -42,7 +42,7 @@ Du distribuerar subgrafen genom att köra `yarn deploy` Efter att ha distribuerat subgrafen kommer Graph Explorer att växla till att visa synkroniseringsstatusen för din subgraf. Beroende på mängden data och antalet händelser som måste extraheras från historiska block, från och med genesisblocket, kan synkronisering ta från några minuter till flera timmar. -Undergrafens status växlar till `Synced` när Graph Node har extraherat alla data från historiska block. Graph Node fortsätter att inspektera block för din undergraf när dessa block minas. +Undergrafens status växlar till ` Synced ` när Graph Node har extraherat alla data från historiska block. Graph Node fortsätter att inspektera block för din undergraf när dessa block minas. ## Omdistribuera en subgraf @@ -270,7 +270,7 @@ Graf Nod visar en graphql-slutpunkt som du kan fråga för att kontrollera statu } ``` -Detta kommer att ge dig `chainHeadBlock` som du kan jämföra med `latestBlock` på din subgraf för att kontrollera om den körs efter. `synced` informerar om subgrafen någonsin har kommit ikapp kedjan. `health` kan för närvarande ta värdena `healthy` om inga fel inträffade, eller `failed` om det fanns ett fel som stoppade subgrafens framsteg. I det här fallet kan du kontrollera fältet `fatalError` för detaljer om detta fel. +Detta kommer att ge dig `chainHeadBlock` som du kan jämföra med `latestBlock` på din subgraf för att kontrollera om den körs efter. ` synced ` informerar om subgrafen någonsin har kommit ikapp kedjan. `health` kan för närvarande ta värdena `healthy` om inga fel inträffade, eller `failed` om det fanns ett fel som stoppade subgrafens framsteg. I det här fallet kan du kontrollera fältet `fatalError` för detaljer om detta fel. ## Policy för arkivering av undergrafer för värdtjänster From 0f98db77d54fb9b866d7873c6e4e3d22f8ae3f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:53 -0400 Subject: [PATCH 073/924] New translations deploying-a-subgraph-to-hosted.mdx (Chinese Simplified) --- website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx index ba8ae0f97b38..48a779ee5571 100644 --- a/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: 将子图部署到托管服务上 ## 创建托管服务账户 -在使用托管服务之前,在我们的托管服务中创建一个账户。您将需要一个 [Github 账户](https://github.com/); 如果您没有账户,则需要首先创建该账户。然后,导航到 [托管服务](https://thegraph.com/hosted-service/),单击*“ 注册Github”*按钮,完成 Github 的授权流程。 +在使用托管服务之前,在我们的托管服务中创建一个账户。您将需要一个 [Github 账户](https://github.com/); 如果您没有账户,则需要首先创建该账户。然后,导航到 [托管服务](https://thegraph.com/hosted-service/),单击_“ 注册Github”_按钮,完成 Github 的授权流程。 ## 存储访问令牌 @@ -42,7 +42,7 @@ title: 将子图部署到托管服务上 部署子图后,Graph浏览器将切换到显示子图的同步状态。根据需要从历史区块中提取的数据量和事件数量,从genesis区块开始,同步可能需要几分钟到几个小时。 -一旦Graph节点从历史区块中提取了所有数据,子图状态就会切换到`Synced`。在挖掘这些区块时,Graph节点将继续检查子图的区块。 +一旦Graph节点从历史区块中提取了所有数据,子图状态就会切换到` Synced `。在挖掘这些区块时,Graph节点将继续检查子图的区块。 ## 重新部署子图 From cf8247c96dcd97b3db77ce36861065e27a786022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:54 -0400 Subject: [PATCH 074/924] New translations deploying-a-subgraph-to-hosted.mdx (Urdu (Pakistan)) --- .../ur/deploying/deploying-a-subgraph-to-hosted.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx index e4b3f587760d..0e84d4713cbd 100644 --- a/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا ## ہوسٹڈ سروس اکاؤنٹ بنائیں -ہوسٹڈ سروس استعمال کرنے سے پہلے، ہماری ہوسٹڈ سروس میں ایک اکاؤنٹ بنائیں۔ اس کے لیے آپ کو ایک [گٹ ہب](https://github.com/) اکاؤنٹ کی ضرورت ہوگی۔ اگر آپ کے پاس نہیں ہے تو آپ کو پہلے اسے بنانے کی ضرورت ہے۔ پھر، [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) پر جائیں، *'گٹ ہب کے ساتھ سائن اپ کریں' پر کلک کریں۔ *بٹن، اور گٹ ہب کی اجازت کے بہاؤ کو مکمل کریں. +ہوسٹڈ سروس استعمال کرنے سے پہلے، ہماری ہوسٹڈ سروس میں ایک اکاؤنٹ بنائیں۔ اس کے لیے آپ کو ایک [گٹ ہب](https://github.com/) اکاؤنٹ کی ضرورت ہوگی۔ اگر آپ کے پاس نہیں ہے تو آپ کو پہلے اسے بنانے کی ضرورت ہے۔ پھر، [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) پر جائیں، _'گٹ ہب کے ساتھ سائن اپ کریں' پر کلک کریں۔ _بٹن، اور گٹ ہب کی اجازت کے بہاؤ کو مکمل کریں. ## ایکسیس ٹوکن سٹور کریں @@ -20,7 +20,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا **تصویر** - سب گراف کے لیے پیش نظارہ تصویر اور تھمب نیل کے طور پر استعمال کرنے کے لیے ایک تصویر منتخب کریں. -**سب گراف کا نام** - اکاؤنٹ کے نام کے ساتھ جس کے تحت سب گراف بنایا گیا ہے، یہ `account-name/subgraph-name`-سٹائل نام کی بھی وضاحت کرے گا جو تعیناتیوں اور گراف کیو ایل اینڈ پوائنٹس کے لیے استعمال ہوتا ہے۔ _اس فیلڈ کو بعد میں تبدیل نہیں کیا جاسکتا۔_ +**سب گراف کا نام** - اکاؤنٹ کے نام کے ساتھ جس کے تحت سب گراف بنایا گیا ہے، یہ `account-name/subgraph-name`-سٹائل نام کی بھی وضاحت کرے گا جو تعیناتیوں اور گراف کیو ایل اینڈ پوائنٹس کے لیے استعمال ہوتا ہے۔ _اس فیلڈ کو بعد میں تبدیل نہیں کیا جاسکتا۔_ **اکاونٹ** - وہ اکاؤنٹ جس کے تحت سب گراف بنایا گیا ہے۔ یہ کسی فرد یا تنظیم کا اکاؤنٹ ہو سکتا ہے۔ _سب گرافس کو بعد میں اکاؤنٹس کے درمیان منتقل نہیں کیا جا سکتا۔_ @@ -48,7 +48,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا اپنے سب گراف کی تعریف میں تبدیلی کرتے وقت، مثال کے طور پر، ہستی میپنگ میں کسی مسئلے کو حل کرنے کے لیے، اپنے سب گراف کے اپ ڈیٹ شدہ ورژن کو تعینات کرنے کے لیے اوپر `yarn deploy` کمانڈ دوبارہ چلائیں۔ سب گراف کی کسی بھی اپڈیٹ کے لیے ضروری ہے کہ گراف نوڈ آپ کے پورے سب گراف کو دوبارہ ترتیب دے، دوبارہ جینیسس بلاک سے شروع ہو. -اگر آپ کا پہلے سے تعینات کردہ سب گراف اب بھی حالت میں ہے `Syncing`، تو اسے فوری طور پر نئے تعینات کردہ ورژن سے بدل دیا جائے گا۔ اگر پہلے سے تعینات کیا گیا سب گراف پہلے سے ہی مکمل طور پر مطابقت پذیر ہے، تو گراف نوڈ نئے تعینات شدہ ورژن کو `Pending Version` کے بطور نشان زد کرے گا، اسے بیک گراؤنڈ میں ہم آہنگ کرے گا، اور ایک بار مطابقت پذیر ہونے کے بعد صرف موجودہ تعینات کردہ ورژن کو نئے سے بدل دے گا۔ نیا ورژن ختم ہو گیا ہے. یہ یقینی بناتا ہے کہ نیا ورژن مطابقت پذیر ہونے کے دوران آپ کے پاس کام کرنے کے لیے ایک سب گراف موجود ہے. +اگر آپ کا پہلے سے تعینات کردہ سب گراف اب بھی حالت میں ہے ` Syncing `، تو اسے فوری طور پر نئے تعینات کردہ ورژن سے بدل دیا جائے گا۔ اگر پہلے سے تعینات کیا گیا سب گراف پہلے سے ہی مکمل طور پر مطابقت پذیر ہے، تو گراف نوڈ نئے تعینات شدہ ورژن کو ` Pending Version ` کے بطور نشان زد کرے گا، اسے بیک گراؤنڈ میں ہم آہنگ کرے گا، اور ایک بار مطابقت پذیر ہونے کے بعد صرف موجودہ تعینات کردہ ورژن کو نئے سے بدل دے گا۔ نیا ورژن ختم ہو گیا ہے. یہ یقینی بناتا ہے کہ نیا ورژن مطابقت پذیر ہونے کے دوران آپ کے پاس کام کرنے کے لیے ایک سب گراف موجود ہے. ## سب گراف کو متعدد نیٹ ورکس پر تعینات کرنا @@ -98,7 +98,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا } ``` -**نوٹ:** آپ کو تشکیل فائل میں کسی بھی `templates` (اگر آپ کے پاس کوئی ہے) کی وضاحت کرنے کی ضرورت نہیں ہے، صرف `dataSources`۔ اگر `subgraph.yaml` فائل میں کوئی بھی `templates` کا اعلان کیا گیا ہے، تو ان کا نیٹ ورک خود بخود `--network` اختیار کے ساتھ مخصوص کردہ سے اپ ڈیٹ ہوجائے گا. +**نوٹ:** آپ کو تشکیل فائل میں کسی بھی `templates` (اگر آپ کے پاس کوئی ہے) کی وضاحت کرنے کی ضرورت نہیں ہے، صرف ` dataSources `۔ اگر `subgraph.yaml` فائل میں کوئی بھی `templates` کا اعلان کیا گیا ہے، تو ان کا نیٹ ورک خود بخود `--network` اختیار کے ساتھ مخصوص کردہ سے اپ ڈیٹ ہوجائے گا. اب، فرض کریں کہ آپ اپنے سب گراف کو `mainnet` اور `goerli` نیٹ ورکس پر تعینات کرنے کے قابل ہونا چاہتے ہیں، اور یہ آپ کا `subgraph.yaml` ہے: @@ -208,7 +208,7 @@ dataSources: kind: ethereum/events ``` -کسی بھی نیٹ ورک پر مینی فیسٹ بنانے کے لیے، آپ `package.json` میں دو اضافی کمانڈز شامل کر سکتے ہیں اور ساتھ ہی `mustache` پر انحصار: +کسی بھی نیٹ ورک پر مینی فیسٹ بنانے کے لیے، آپ `package.json` میں دو اضافی کمانڈز شامل کر سکتے ہیں اور ساتھ ہی ` mustache ` پر انحصار: ```json { From 16df7cb8760a481d1f7fb1fe2082bf5e4d1cab68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:55 -0400 Subject: [PATCH 075/924] New translations deploying-a-subgraph-to-hosted.mdx (Marathi) --- website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx index ef5d4a07489c..3f0b45cc25a7 100644 --- a/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: होस्ट केलेल्या सेवेसाठी सब ## होस्ट केलेले सेवा खाते तयार करा -होस्ट केलेली सेवा वापरण्यापूर्वी, आमच्या होस्ट केलेल्या सेवेमध्ये खाते तयार करा. त्यासाठी तुम्हाला [Github](https://github.com/) खात्याची आवश्यकता असेल; जर तुमच्याकडे नसेल, तर तुम्हाला ते प्रथम तयार करावे लागेल. त्यानंतर, [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर नेव्हिगेट करा, *'Github सह साइन अप करा' वर क्लिक करा *बटण, आणि Github चा अधिकृतता प्रवाह पूर्ण करा. +होस्ट केलेली सेवा वापरण्यापूर्वी, आमच्या होस्ट केलेल्या सेवेमध्ये खाते तयार करा. त्यासाठी तुम्हाला [Github](https://github.com/) खात्याची आवश्यकता असेल; जर तुमच्याकडे नसेल, तर तुम्हाला ते प्रथम तयार करावे लागेल. त्यानंतर, [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर नेव्हिगेट करा, _'Github सह साइन अप करा' वर क्लिक करा _बटण, आणि Github चा अधिकृतता प्रवाह पूर्ण करा. ## प्रवेश टोकन साठवा From fbe7f3f0bfa70c4d99baae03dbacb317bc66a0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:56 -0400 Subject: [PATCH 076/924] New translations deploying-a-subgraph-to-hosted.mdx (Hindi) --- .../pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx index 6d3eca9af3bf..c0066e9fdc84 100644 --- a/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx @@ -98,9 +98,9 @@ Options: } ``` -**ध्यान दें:** कॉन्फ़िग फ़ाइल में आपको कोई `टेम्प्लेट` (यदि आपके पास है) निर्दिष्ट करने की आवश्यकता नहीं है, केवल `डेटा सोर्स`। यदि `subgraph.yaml` फ़ाइल में कोई `टेम्प्लेट` घोषित है, तो उनका नेटवर्क स्वचालित रूप से `--network` विकल्प के साथ निर्दिष्ट एक में अपडेट हो जाएगा. +**ध्यान दें:** कॉन्फ़िग फ़ाइल में आपको कोई `टेम्प्लेट` (यदि आपके पास है) निर्दिष्ट करने की आवश्यकता नहीं है, केवल ` डेटा सोर्स `। यदि `subgraph.yaml` फ़ाइल में कोई `टेम्प्लेट` घोषित है, तो उनका नेटवर्क स्वचालित रूप से `--network` विकल्प के साथ निर्दिष्ट एक में अपडेट हो जाएगा. -अब, मान लें कि आप अपने सबग्राफ को `mainnet` और `goerli` नेटवर्क पर तैनात करना चाहते हैं, और यह आपका `subgraph.yaml` है: +अब, मान लें कि आप अपने सबग्राफ को ` mainnet ` और `goerli` नेटवर्क पर तैनात करना चाहते हैं, और यह आपका `subgraph.yaml` है: ```yaml # ... @@ -159,7 +159,7 @@ dataSources: अब आप `yarn deploy` करने के लिए तैयार हैं| -**ध्यान दें:** जैसा कि पहले उल्लेख किया गया है, `graph-cli 0.32.0` के बाद से आप सीधे `yarn deploy` चला सकते हैं `--नेटवर्क` विकल्प के साथ: +**ध्यान दें:** जैसा कि पहले उल्लेख किया गया है, `graph-cli 0.32.0` के बाद से आप सीधे `yarn deploy` चला सकते हैं ` --नेटवर्क ` विकल्प के साथ: ```sh # Using default networks.json file From 6f65d5ff877b3a25f4d216244d71758ad90392c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:03:58 -0400 Subject: [PATCH 077/924] New translations deploying-a-subgraph-to-studio.mdx (French) --- .../deploying-a-subgraph-to-studio.mdx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/fr/deploying/deploying-a-subgraph-to-studio.mdx b/website/pages/fr/deploying/deploying-a-subgraph-to-studio.mdx index 0766cc93bb8b..cbd0370b3e08 100644 --- a/website/pages/fr/deploying/deploying-a-subgraph-to-studio.mdx +++ b/website/pages/fr/deploying/deploying-a-subgraph-to-studio.mdx @@ -2,18 +2,18 @@ title: Déploiement d'un subgraphe dans le Studio Subgraph --- -> 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). +> Découvrez comment vous pouvez déployer des subgraphs à taux non limité dans Subgraph Studio [ici](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: +Voici les étapes à suivre pour déployer votre subgraph dans le Subgraph Studio : -- Install The Graph CLI (with either yarn or npm) +- Faire l'installation de The Graph CLI (avec yarn ou npm) - Créer votre sous-graphe dans le Subgraph Studio - Authentifier votre compte à partir de l'interface CLI -- Déploiement d'un subgraphe dans le Studio Subgraph +- Déploiement d'un subgraph dans le Studio Subgraph ## Installation de Graph CLI -Nous utilisons la même CLI pour déployer des subgraphes vers notre [Service Hébergé](https://thegraph.com/hosted-service/) et le [Subgraph Studio](https://thegraph.com/studio/). Voici les commandes pour installer graph-cli. Ceci peut être fait en utilisant npm ou yarn. +Nous utilisons la même CLI pour déployer des subgraphs vers notre [Service Hébergé](https://thegraph.com/hosted-service/) et le [Subgraph Studio](https://thegraph.com/studio/). Voici les commandes pour installer graph-cli. Ceci peut être fait en utilisant npm ou yarn. **Installer avec yarn :** @@ -27,27 +27,27 @@ yarn global add @graphprotocol/graph-cli npm install -g @graphprotocol/graph-cli ``` -## Créez votre subgraphe dans Subgraph Studio +## Créez votre subgraph dans Subgraph Studio -Avant de déployer votre sous-graphe réel, vous devez créer un sous-graphe dans [Subgraph Studio](https://thegraph.com/studio/). Nous vous recommandons de lire notre [documentation sur le sujet](/deploying/subgraph-studio) pour en savoir plus. +Avant de déployer votre subgraph, vous devez créer un subgraph dans [Subgraph Studio](https://thegraph.com/studio/). Nous vous recommandons de lire notre [documentation sur le sujet](/deploying/subgraph-studio) pour en savoir plus. -## Initialize your Subgraph +## Initialisation de votre subgraph -Une fois que votre subgraphe a été créé dans Subgraph Studio, vous pouvez initialiser le code du subgraphe en utilisant cette commande : +Une fois que votre subgraph a été créé dans Subgraph Studio, vous pouvez initialiser le code du subgraph en utilisant cette commande : ```bash graph init --studio ``` -La valeur `` se trouve sur la page de détails de votre subgraphe dans Subgraph Studio : +La valeur `` se trouve sur la page de détails de votre subgraph dans Subgraph Studio : ![Subgraph Studio - Identifiant](/img/doc-subgraph-slug.png) -Après avoir exécuté `graph init`, il vous sera demandé de saisir l'adresse du contrat, le réseau et l'ABI que vous souhaitez interroger. Cette opération générera un nouveau dossier sur votre machine locale avec un code de base pour commencer à travailler sur votre subgraphe. Vous pouvez ensuite finaliser votre subgraphe pour vous assurer qu'il fonctionne comme prévu. +Après avoir exécuté `graph init`, il vous sera demandé de saisir l'adresse du contrat, le réseau et l'ABI que vous souhaitez interroger. Cette opération générera un nouveau dossier sur votre machine locale avec un code de base pour commencer à travailler sur votre subgraph. Vous pouvez ensuite finaliser votre subgraph pour vous assurer qu'il fonctionne comme prévu. ## Authentification The Graph -Avant de pouvoir déployer votre subgraphe dans Subgraph Studio, vous devez vous connecter à votre compte dans le CLI. Pour ce faire, vous aurez besoin de votre clé de déploiement que vous pouvez trouver sur votre page "Mes subgraphe" ou sur la page de détails de votre subgraphe. +Avant de pouvoir déployer votre subgraph dans Subgraph Studio, vous devez vous connecter à votre compte dans le CLI. Pour ce faire, vous aurez besoin de votre clé de déploiement que vous pouvez trouver sur votre page "Mes subgraphs" ou sur la page de détails de votre subgraphs. Voici la commande que vous devez utiliser pour vous authentifier depuis le CLI : @@ -55,16 +55,16 @@ Voici la commande que vous devez utiliser pour vous authentifier depuis le CLI : graph auth --studio ``` -## Déploiement d'un subgraphe dans Subgraph Studio +## Déploiement d'un subgraph dans Subgraph Studio -Une fois que vous êtes prêt, vous pouvez déployer votre subgraphe dans Subgraph Studio. Cette opération ne publiera pas votre subgraphe sur le réseau décentralisé, elle le déploiera uniquement sur votre compte Studio, où vous pourrez le tester et mettre à jour les métadonnées. +Une fois que vous êtes prêt, vous pouvez déployer votre subgraph dans Subgraph Studio. Cette opération ne publiera pas votre subgraph sur le réseau décentralisé, elle le déploiera uniquement sur votre compte Studio, où vous pourrez le tester et mettre à jour les métadonnées. -Voici la commande CLI que vous devez utiliser pour déployer votre subgraphe. +Voici la commande CLI que vous devez utiliser pour déployer votre 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. +Après avoir exécuté cette commande, le CLI vous demandera un label de version, vous pouvez le nommer comme vous le souhaitez, vous pouvez utiliser des labels tels que `0.1` et `0.2` ou utiliser également des lettres telles que `uniswap-v2-0.1`. Ces étiquettes seront visibles dans Graph Explorer et peuvent être utilisées par les curateurs pour décider s'ils veulent signaler cette version ou non, alors choisissez-les judicieusement. -Une fois déployé, vous pouvez tester votre subgraphe dans Subgraph Studio en utilisant le terrain de jeu, déployer une autre version si nécessaire, mettre à jour les métadonnées, et quand vous êtes prêt, publier votre subgraphe dans Graph Explorer. +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. From cc5fe9f3079cd398299f93223ab7dc537690c295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:00 -0400 Subject: [PATCH 078/924] New translations deploying-a-subgraph-to-studio.mdx (Arabic) --- .../deploying-a-subgraph-to-studio.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/ar/deploying/deploying-a-subgraph-to-studio.mdx b/website/pages/ar/deploying/deploying-a-subgraph-to-studio.mdx index d0b78a80f940..f8771a01ea33 100644 --- a/website/pages/ar/deploying/deploying-a-subgraph-to-studio.mdx +++ b/website/pages/ar/deploying/deploying-a-subgraph-to-studio.mdx @@ -1,5 +1,5 @@ --- -title: نشر Subgraph في Subgraph Studio +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). @@ -7,13 +7,13 @@ title: نشر Subgraph في Subgraph Studio These are the steps to deploy your subgraph to the Subgraph Studio: - Install The Graph CLI (with either yarn or npm) -- إنشاء الـ Subgraph الخاص بك في Subgraph Studio -- مصادقة حسابك من CLI -- نشر Subgraph في Subgraph Studio +- Create your Subgraph in the Subgraph Studio +- Authenticate your account from the CLI +- Deploying a Subgraph to the Subgraph Studio -## تثبيت Graph CLI +## Installing Graph CLI -نحن نستخدم نفس CLI لنشر الـ subgraphs على [hosted service](https://thegraph.com/hosted-service/) الخاصة بنا وعلى [Subgraph Studio](https://thegraph.com/studio/). وفيما يلي أوامر تثبيت graph-cli. يمكن القيام بذلك باستخدام npm أو yarn. +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. **التثبيت بواسطة yarn:** @@ -27,39 +27,39 @@ yarn global add @graphprotocol/graph-cli npm install -g @graphprotocol/graph-cli ``` -## إنشاء الـ Subgraph الخاص بك في Subgraph Studio +## 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. -## تهيئة Subgraph الخاص بك +## Initialize your Subgraph -بمجرد إنشاء الـ subgraph الخاص بك في Subgraph Studio ، يمكنك بدء كود الـ subgraph باستخدام هذا الأمر: +Once your subgraph has been created in Subgraph Studio you can initialize the subgraph code using this command: ```bash graph init --studio ``` -يمكن العثور على قيمة `` في صفحة تفاصيل الـ subgraph الخاص بك في Subgraph Studio: +The `` value can be found on your subgraph details page in Subgraph Studio: ![Subgraph Studio - Slug](/img/doc-subgraph-slug.png) 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(مصادقة Graph) +## 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. -إليك الأمر الذي تحتاج إلى استخدامه للمصادقة من CLI: +Here is the command that you need to use to authenticate from the CLI: ```bash graph auth --studio ``` -## نشر Subgraph في Subgraph Studio +## Deploying a Subgraph to Subgraph Studio -بمجرد أن تصبح جاهزًا ، يمكنك نشر الـ subgraph الخاص بك في Subgraph Studio. لن يؤدي القيام بذلك إلى نشر الـ subgraph الخاص بك إلى الشبكة اللامركزية ، بل سيتم نشره فقط في حساب Studio الخاص بك حيث ستتمكن من اختباره وتحديث البيانات الوصفية (metadata). +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. -إليك أمر CLI والذي تحتاج إلى استخدامه لنشر الـ subgraph الخاص بك. +Here is the CLI command that you need to use to deploy your subgraph. ```bash graph deploy --studio @@ -67,4 +67,4 @@ 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. -بمجرد النشر(deploy) ، يمكنك اختبار الـ subgraph الخاص بك في Subgraph Studio باستخدام playground، ونشر(deploy) إصدار آخر إذا لزم الأمر ، وتحديث البيانات الوصفية ، وعندما تكون جاهزًا ، قم بنشر(publish) الـ subgraph الخاص بك إلى Graph Explorer. +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. From d94b812b06f441ee8afa99098b7b78d23a3e36d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:01 -0400 Subject: [PATCH 079/924] New translations deploying-a-subgraph-to-studio.mdx (Czech) --- .../deploying-a-subgraph-to-studio.mdx | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/website/pages/cs/deploying/deploying-a-subgraph-to-studio.mdx b/website/pages/cs/deploying/deploying-a-subgraph-to-studio.mdx index d6f0f891c6cc..9471b236e54c 100644 --- a/website/pages/cs/deploying/deploying-a-subgraph-to-studio.mdx +++ b/website/pages/cs/deploying/deploying-a-subgraph-to-studio.mdx @@ -1,70 +1,70 @@ --- -title: Deploying a Subgraph to the Subgraph Studio +title: Nasazení podgrafu do Studio podgrafů --- -> 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). +> Zjistěte, jak můžete nasadit subgrafy bez omezení rychlosti podgraf Studia [zde](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: +Následující kroky slouží k nasazení podfrafu do aplikace podgraf 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 +- Instalace Graph CLI (pomocí yarn nebo npm) +- Vytvoření subgrafu ve Studio podgraf +- Ověření účtu pomocí CLI +- Nasazení podgrafu do Studio podgrafů -## Installing Graph CLI +## Instalace 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. +Stejné CLI používáme k nasazení subgrafů do naší [hostované služby](https://thegraph.com/hosted-service/) a do [Subgraph Studia](https://thegraph.com/studio/). Zde jsou příkazy pro instalaci graph-cli. To lze provést pomocí npm nebo yarn. -**Install with yarn:** +**Instalace pomocí yarn:** ```bash yarn global add @graphprotocol/graph-cli ``` -**Install with npm:** +**Instalace pomocí npm:** ```bash npm install -g @graphprotocol/graph-cli ``` -## Create your Subgraph in Subgraph Studio +## Vytvoření podgrafu v aplikaci podgraf 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. +Před nasazením skutečného podgrafu musíte vytvořit podgraf v [Subgraph Studiu](https://thegraph.com/studio/). Doporučujeme vám přečíst naši [dokumentaci k Studio](/deploying/subgraph-studio), abyste se dozvěděli více o této proceduře. -## Initialize your Subgraph +## Inicializace podgrafu -Once your subgraph has been created in Subgraph Studio you can initialize the subgraph code using this command: +Po vytvoření podgrafu ve Studio podgrafu můžete inicializovat kód podgrafu pomocí tohoto příkazu: ```bash graph init --studio ``` -The `` value can be found on your subgraph details page in Subgraph Studio: +Hodnotu `` naleznete na stránce s podrobnostmi o podgrafu v pograf Studio: ![Subgraph Studio - Slug](/img/doc-subgraph-slug.png) -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. +Po spuštění `graph init` budete vyzváni k zadání adresy smlouvy, sítě a ABI, na které se chcete dotazovat. Po provedení tohoto úkonu se na vašem místním počítači vygeneruje nová složka se základním kódem, který vám umožní začít pracovat s vaším podgraf. Poté můžete svůj podgraf dokončit a ujistit se, že funguje podle očekávání. -## Graph Auth +## Autorizace grafu -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. +Před nasazením subgrafu do aplikace Subgraph Studio se musíte přihlásit ke svému účtu v rozhraní CLI. K tomu budete potřebovat svůj deploy klíč, který najdete na stránce "My Subgraphs" nebo na stránce s podrobnostmi o podgrafu. -Here is the command that you need to use to authenticate from the CLI: +Zde je příkaz, který je třeba použít k ověření z CLI: ```bash graph auth --studio ``` -## Deploying a Subgraph to Subgraph Studio +## Nasazení podgraf do podgraf 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. +Jakmile jste připraveni, můžete podgraf nasadit do podgraf Studio. Tímto krokem nezveřejníte svůj subgraf v decentralizované síti, ale pouze jej nasadíte do svého účtu ve Studiu, kde jej budete moci testovat a aktualizovat metadata. -Here is the CLI command that you need to use to deploy your subgraph. +Zde je příkaz CLI, který je třeba použít k nasazení podgrafu. ```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. +Po spuštění tohoto příkazu se CLI zeptá na označení verze, můžete jej pojmenovat, jak chcete, můžete použít štítky jako `0.1` a `0.2` nebo také písmena například `uniswap-v2-0.1`. Tyto štítky budou viditelné v Průzkumníku Graf a mohou je použít kurátoři k rozhodnutí, zda chtějí v této verzi signalizovat, nebo ne, takže je vybírejte moudře. -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. +Po nasazení můžete subgraf otestovat v podgraf Studio pomocí hřiště, v případě potřeby nasadit další verzi, aktualizovat metadata, a až budete připraveni, publikovat subgraf v Graf Explorer. From bd61ddeb785c6e9a35330d36e4c432933e6664d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:03 -0400 Subject: [PATCH 080/924] New translations deploying-a-subgraph-to-studio.mdx (Italian) --- .../deploying-a-subgraph-to-studio.mdx | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/website/pages/it/deploying/deploying-a-subgraph-to-studio.mdx b/website/pages/it/deploying/deploying-a-subgraph-to-studio.mdx index d6f0f891c6cc..75bc63a0bfc5 100644 --- a/website/pages/it/deploying/deploying-a-subgraph-to-studio.mdx +++ b/website/pages/it/deploying/deploying-a-subgraph-to-studio.mdx @@ -1,70 +1,70 @@ --- -title: Deploying a Subgraph to the Subgraph Studio +title: Distribuzione di un subgraph nel 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). +> Imparare a distribuire subgraph senza limiti di velocità nel Subgraph Studio [qui](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: +Questi sono i passi per distribuire il subgraph nel 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 +- Installare il Graph CLI (con yarn oppure npm) +- Creare il subgraph nel Subgraph Studio +- Autenticare il proprio account dalla CLI +- Distribuzione di un subgraph nel Subgraph Studio -## Installing Graph CLI +## Installazione di 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. +Stiamo usando la stessa CLI per distribuire i subgraph al nostro [hosted service](https://thegraph.com/hosted-service/) e nel [Subgraph Studio](https://thegraph.com/studio/). Ecco i comandi per installare graph-cli. Questa operazione può essere eseguita con npm oppure yarn. -**Install with yarn:** +**Installare con yarn:** ```bash yarn global add @graphprotocol/graph-cli ``` -**Install with npm:** +**Installare con npm:** ```bash npm install -g @graphprotocol/graph-cli ``` -## Create your Subgraph in Subgraph Studio +## Creare il subgraph nel 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. +Prima di distribuire il subgraph attuale, è necessario creare un subgraph nel [Subgraph Studio](https://thegraph.com/studio/). Si consiglia di leggere [ la documentazione di Studio](/deploying/subgraph-studio) per saperne di più. -## Initialize your Subgraph +## Inizializzare il subgraph -Once your subgraph has been created in Subgraph Studio you can initialize the subgraph code using this command: +Una volta creato il subgraph nel Subgraph Studio, è possibile inizializzare il codice del subgraph utilizzando questo comando: ```bash graph init --studio ``` -The `` value can be found on your subgraph details page in Subgraph Studio: +Il valore `` si trova nella pagina dei dettagli del subgraph nel Subgraph Studio: ![Subgraph Studio - Slug](/img/doc-subgraph-slug.png) -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. +Dopo aver eseguito `graph init`, verrà chiesto di inserire l'indirizzo del contratto, la rete e l'ABI che si desidera interrogare. In questo modo si genera una nuova cartella sulla macchina locale con del codice di base per iniziare a lavorare sul subgraph. È quindi possibile finalizzare il subgraph per assicurarsi che funzioni come previsto. ## 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. +Prima di poter distribuire il proprio subgraph nel Subgraph Studio, è necessario accedere al proprio account nella CLI. Per fare ciò, è necessaria la chiave di distribuzione che si trova nella pagina "My Subgraphs" o nella pagina dei dettagli del subgraph. -Here is the command that you need to use to authenticate from the CLI: +Ecco il comando da usare per autenticarsi dalla CLI: ```bash graph auth --studio ``` -## Deploying a Subgraph to Subgraph Studio +## Distribuzione di un subgraph nel 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. +Una volta pronti, è possibile distribuire il subgraph nel Subgraph Studio. Questa operazione non pubblicherà il subgraph sulla rete decentralizzata, ma lo distribuirà solo sul vostro account di Studio, dove potrete testarlo e aggiornare i metadati. -Here is the CLI command that you need to use to deploy your subgraph. +Ecco il comando CLI da utilizzare per distribuire il 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. +Dopo aver eseguito questo comando, la CLI chiederà un'etichetta di versione, che può essere nominata come si vuole, usando etichette come `0.1` e `0.2` oppure usando anche lettere come `uniswap-v2-0.1`. Queste etichette saranno visibili in Graph Explorer e potranno essere usate dai Curator per decidere se segnalare o meno questa versione, quindi sceglieteli con saggezza. -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. +Una volta distribuito, è possibile testare il subgraph nel Subgraph Studio utilizzando il playground, distribuire un'altra versione se necessario, aggiornare i metadati e, quando si è pronti, pubblicare il subgraph su Graph Explorer. From 0b70f8ed2ba26db18e64c9af6549d54f2597e9f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:03 -0400 Subject: [PATCH 081/924] New translations deploying-a-subgraph-to-studio.mdx (Japanese) --- website/pages/ja/deploying/deploying-a-subgraph-to-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ja/deploying/deploying-a-subgraph-to-studio.mdx b/website/pages/ja/deploying/deploying-a-subgraph-to-studio.mdx index 21e8dee194a2..1ef47fab06d0 100644 --- a/website/pages/ja/deploying/deploying-a-subgraph-to-studio.mdx +++ b/website/pages/ja/deploying/deploying-a-subgraph-to-studio.mdx @@ -2,7 +2,7 @@ title: 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). +> レート制限のないサブグラフを Subgraph Studio にデプロイする方法を学習します [ ここ](https://www.notion.so/edgeandnode/The-Graph-Subgraph-Studio-Non-Rate-Limited-Chain-Integration-889fe061ee6b4423a7f8e2c8070b9294)にあります。 こちらがSubgraph Studioにサブグラフをデプロイする手順です: From 1c25321055cac1b2ae86e3366a3d0ba475e3e16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:13 -0400 Subject: [PATCH 082/924] New translations hosted-service.mdx (French) --- website/pages/fr/deploying/hosted-service.mdx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/pages/fr/deploying/hosted-service.mdx b/website/pages/fr/deploying/hosted-service.mdx index 40d0a6cd52e7..1cdaafd2258a 100644 --- a/website/pages/fr/deploying/hosted-service.mdx +++ b/website/pages/fr/deploying/hosted-service.mdx @@ -14,7 +14,7 @@ Pour une liste complète, voir [Réseaux pris en charge](/developing/supported-n Suivez d'abord les instructions [ici](/developing/defining-a-subgraph) pour installer la CLI Graph. Créez un subraph en passant `graph init --product hosted-service` -### From an Existing Contract +### À partir d'un contrat existant Si vous disposez déjà d'un contrat intelligent déployé sur le réseau de votre choix, l'amorçage d'un nouveau subgraph à partir de ce contrat peut être un bon moyen de commencer à utiliser le service hébergé. @@ -22,23 +22,23 @@ Utilisez cette commande pour créer un subgraph qui indexe tous les événements ```sh graph init \ ---produit-service hébergé ---À partir - d'un contrat \ - / [] + --product hosted-service + --from-contract \ + / [] ``` En outre, vous pouvez utiliser les arguments optionnels suivants. Si l'ABI ne peut pas être extrait d'Etherscan, il revient à demander un chemin de fichier local. S'il manque des arguments facultatifs dans la commande, celle-ci vous guide dans un formulaire interactif. ```sh ---réseaux ---abi +--network \ +--abi \ ``` Le `` dans ce cas est le nom de votre utilisateur ou de votre organisation GitHub, `` est le nom de votre subgraph et `<DIRECTORY>< /code> est le nom facultatif du répertoire dans lequel 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 -The second mode `graph init` supports is creating a new project from an example subgraph. The following command does this: +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é / [] @@ -46,15 +46,15 @@ graph init --par-exemple --produit-service hébergé / \ - / [] +graph init \ + --product hosted-service + --from-contract \ + / [] ``` ## Réseaux pris en charge par le service hébergé From 757a3834a01f2e35203f2cd98a89f9496c23f3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:15 -0400 Subject: [PATCH 083/924] New translations hosted-service.mdx (Czech) --- website/pages/cs/deploying/hosted-service.mdx | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/cs/deploying/hosted-service.mdx b/website/pages/cs/deploying/hosted-service.mdx index 3b65cfbccdf0..a2a588561745 100644 --- a/website/pages/cs/deploying/hosted-service.mdx +++ b/website/pages/cs/deploying/hosted-service.mdx @@ -1,24 +1,24 @@ --- -title: What is the Hosted Service? +title: Co je hostovaná služba? --- -> 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). +> Vezměte prosím na vědomí, že hostovaná služba začne zanikat v roce 2023, ale bude i nadále k dispozici pro sítě, které nejsou podporovány v decentralizované síti. Vývojářům doporučujeme, aby [upgradovali své subgrafy na The Graph Network](/cookbook/upgrading-a-subgraph), jakmile bude podporováno více sítí. Jednotlivé sítě budou mít své ekvivalenty hostovaných služeb postupně ukončovány, aby měli vývojáři dostatek času na aktualizaci podgrafů na decentralizovanou síť. Více informací o zániku hostované služby se dozvíte [zde](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/). +Tato část vás provede nasazením podgrafu do [hostované služby](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. +Pokud nemáte účet v hostované službě, můžete se zaregistrovat pomocí účtu GitHub. Jakmile se ověříte, můžete začít vytvářet dílčí grafy prostřednictvím uživatelského rozhraní a nasazovat je z terminálu. Hostovaná služba podporuje řadu sítí, například Polygon, Gnosis Chain, BNB Chain, Optimism, Arbitrum a další. -For a comprehensive list, see [Supported Networks](/developing/supported-networks/#hosted-service). +Úplný seznam naleznete v části [Podporované sítě](/developing/supported-networks/#hosted-service). -## Create a Subgraph +## Vytvoření podgrafu -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` +Nejprve podle pokynů [zde](/developing/defining-a-subgraph) nainstalujte Graf CLI. Vytvořte podgraf předáním příkazu `graph init --produkt hostovaná služba`. -### From an Existing Contract +### Ze stávající smlouvy -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. +Pokud již máte na vybrané síti nasazený inteligentní smlouva, může být bootstrapování nového podgrafu z tohoto kontraktu dobrým způsobem, jak začít využívat hostovanou službu. -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/). +Pomocí tohoto příkazu můžete vytvořit podgraf, který indexuje všechny události z existující smlouvy. Pokusí se načíst ABI smlouvy z [Etherscan](https://etherscan.io/). ```sh graph init \ @@ -27,28 +27,28 @@ graph init \ / [] ``` -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. +Kromě toho můžete použít následující nepovinné argumenty. Pokud nelze ABI načíst z aplikace Etherscan, vrátí se k požadavku na cestu k místnímu souboru. Pokud v příkazu chybí některý z nepovinných argumentů, projde příkaz interaktivním formulářem. ```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.** +`` je v tomto případě jméno vašeho uživatele nebo organizace GitHub, `` je název vašeho subgrafu a `` je volitelný název adresáře, do kterého `graph init` umístí ukázkový manifest subgrafu. `` je adresa vaší existující smlouvy. `` je název sítě, v níž se smlouva nachází. `` je lokální cesta k souboru ABI smlouva. **Obě položky `--síť` a `--abi` jsou nepovinné.** -### From an Example Subgraph +### Z příkladu podgrafu -The second mode `graph init` supports is creating a new project from an example subgraph. The following command does this: +Druhý režim `graf init` podporuje vytvoření nového projektu z příkladového podgrafu. To provede následující příkaz: ``` 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. +Ukázkový podgraf je založen na smlouvě Gravity od Dani Grant, která spravuje uživatelské avatary a vysílá události `NewGravatar` nebo `UpdateGravatar`, kdykoli jsou avatary vytvořeny nebo aktualizovány. Podgraf tyto události zpracovává tak, že zapisuje entity `Gravatar` do úložiště Uzel Graf a zajišťuje jejich aktualizaci podle událostí. Pokračujte na [subgraf manifest](/developing/creating-a-subgraph#the-subgraph-manifest), abyste lépe pochopili, kterým událostem z vašich chytrých kontraktů je třeba věnovat pozornost, mapování a další. -### From a Proxy Contract +### Ze smlouvy o Proxy -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. +Chcete-li sestavit podgraf přizpůsobený pro monitorování smlouvy Proxy, inicializujte podgraf zadáním adresy prováděcí smlouvy. Po dokončení procesu inicializace je posledním krokem aktualizace názvu sítě v souboru subgraph.yaml na adresu smlouvy Proxy. Můžete použít níže uvedený příkaz. ```sh graph init \ @@ -57,6 +57,6 @@ graph init \ / [] ``` -## Supported Networks on the hosted service +## Podporované sítě v hostované službě -You can find the list of the supported networks [Here](/developing/supported-networks). +Seznam podporovaných sítí najdete [Zde](/developing/supported-networks). From dd06b1761b9be790a9665672d678a5a694ef8f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:17 -0400 Subject: [PATCH 084/924] New translations hosted-service.mdx (Italian) --- website/pages/it/deploying/hosted-service.mdx | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/it/deploying/hosted-service.mdx b/website/pages/it/deploying/hosted-service.mdx index 3b65cfbccdf0..c5e1452d698d 100644 --- a/website/pages/it/deploying/hosted-service.mdx +++ b/website/pages/it/deploying/hosted-service.mdx @@ -1,24 +1,24 @@ --- -title: What is the Hosted Service? +title: Che cos'è il 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). +> Si noti che il hosted service inizierà a scomparire nel 2023, ma rimarrà disponibile per le reti che non sono supportate dalla rete decentralizzata. Gli sviluppatori sono incoraggiati ad [aggiornare i loro subgraph al Graph Network](/cookbook/upgrading-a-subgraph) con il supporto di un maggior numero di reti. Ogni rete avrà gli equivalenti hosted service che tramonteranno gradualmente per garantire agli sviluppatori il tempo sufficiente per aggiornare i subgraph alla rete decentralizzata. Per saperne di più sul tramonto del hosted service leggere [qui](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/). +Questa sezione illustra come distribuire un subgraph nel [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. +Se non si dispone di un account sul hosted service, è possibile registrarsi con il proprio account GitHub. Una volta effettuata l'autenticazione, si può iniziare a creare subgraph attraverso UI e a distribuirli dal proprio terminale. Il hosted service supporta una serie di reti, come Polygon, Gnosis Chain, BNB Chain, Optimism, Arbitrum e altre ancora. -For a comprehensive list, see [Supported Networks](/developing/supported-networks/#hosted-service). +Per un elenco completo, vedere [Reti supportate](/developing/supported-networks/#hosted-service). -## Create a Subgraph +## Crea un 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` +Per prima cosa seguire le istruzioni [qui](/developing/defining-a-subgraph) per installare la Graph CLI. Creare un subgraph passando sul `graph init --product hosted-service` -### From an Existing Contract +### Da un contratto esistente -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. +Se si dispone già di uno smart contract distribuito sulla rete scelta, l'avvio di un nuovo subgraph da questo contratto può essere un buon modo per iniziare a utilizzare l'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/). +Si può usare questo comando per creare un subgraph che indicizzi tutti gli eventi di un contratto esistente. Si cercherà di recuperare l'ABI del contratto da [Etherscan](https://etherscan.io/). ```sh graph init \ @@ -27,28 +27,28 @@ graph init \ / [] ``` -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. +Inoltre, è possibile utilizzare i seguenti argomenti opzionali. Se l'ABI non può essere recuperato da Etherscan, viene richiesto un percorso di file locale. Se il comando non contiene alcun argomento opzionale, viene visualizzato un modulo interattivo. ```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.** +Il `` in questo caso è il nome dell'utente GitHub oppure dell'organizzazione, `` è il nome del subgraph, e `` è il nome opzionale della directory in cui `graph init` metterà il manifest del subgraph di esempio. Il `` è l'indirizzo del contratto esistente. `` è il nome della rete su cui risiede il contratto. `` è un percorso locale a un file ABI del contratto. **Entrambi `--network` e `--abi` sono opzionali.** -### From an Example Subgraph +### Da un subgraph di esempio -The second mode `graph init` supports is creating a new project from an example subgraph. The following command does this: +La seconda modalità supportata da `graph init` è la creazione di un nuovo progetto a partire da un subgraph di esempio. Il comando seguente esegue questa operazione: ``` 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. +Il subgraph di esempio si basa sul contratto Gravity di Dani Grant, che gestisce gli avatar degli utenti ed emette eventi `NewGravatar` oppure `UpdateGravatar` ogni volta che gli avatar vengono creati o aggiornati. Il subgraph gestisce questi eventi scrivendo entità `Gravatar` nel negozio Graph Node e assicurandosi che vengano aggiornate in base agli eventi. Continuate con il [subgraph manifest](/developing/creating-a-subgraph#the-subgraph-manifest) per capire meglio a quali eventi dei vostri smart contract prestare attenzione, mappature e altro ancora. -### From a Proxy Contract +### Da un Contratto Proxy -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. +Per costruire un subgraph su misura per il monitoraggio di un contratto Proxy, inizializzare il subgraph specificando l'indirizzo del contratto di implementazione. Una volta concluso il processo di inizializzazione, l'ultimo passo consiste nell'aggiornare il nome della rete nel file subgraph.yaml con l'indirizzo del contratto Proxy. Si può usare il comando seguente. ```sh graph init \ @@ -57,6 +57,6 @@ graph init \ / [] ``` -## Supported Networks on the hosted service +## Reti supportate sul hosted service -You can find the list of the supported networks [Here](/developing/supported-networks). +È possibile trovare l'elenco delle reti supportate [qui](/developing/supported-networks). From 49771b52a192de7e389142251c11f4ddbf471a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:18 -0400 Subject: [PATCH 085/924] New translations hosted-service.mdx (Japanese) --- website/pages/ja/deploying/hosted-service.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ja/deploying/hosted-service.mdx b/website/pages/ja/deploying/hosted-service.mdx index 00d8b06cbfb6..4fb7cc718838 100644 --- a/website/pages/ja/deploying/hosted-service.mdx +++ b/website/pages/ja/deploying/hosted-service.mdx @@ -46,9 +46,9 @@ graph init --from-example --product hosted-service / サンプルのサブグラフは、Dani Grant による Gravity コントラクトをベースにしています。このコントラクトは、ユーザーのアバターを管理し、アバターが作成または更新されるたびに`NewGravatar`または`UpdateGravatar`イベントを発行します。サブグラフは、`Gravatar`エンティティをグラフノードストアに書き込み、イベントに応じてこれらが更新されるようにすることで、これらのイベントを処理します。[subgraph manifest](/developer/create-subgraph-hosted#the-subgraph-manifest)を見ると、スマートコントラクトからどのイベントに注意を払うべきか、マッピングなどがよくわかります。 -### From a Proxy Contract +### 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. +Proxyコントラクトを監視するためのサブグラフを作成するには、実装コントラクトのアドレスを指定してサブグラフを初期化します。初期化プロセスが完了したら、最後のステップとして、subgraph.yamlファイルのネットワーク名をProxyコントラクトのアドレスに更新します。以下のコマンドを使用します。 ```sh graph init \ From 597a81605a5b0f9592306c37c59668ba08524ba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:20 -0400 Subject: [PATCH 086/924] New translations hosted-service.mdx (Dutch) --- website/pages/nl/deploying/hosted-service.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/nl/deploying/hosted-service.mdx b/website/pages/nl/deploying/hosted-service.mdx index 3b65cfbccdf0..4b939303d796 100644 --- a/website/pages/nl/deploying/hosted-service.mdx +++ b/website/pages/nl/deploying/hosted-service.mdx @@ -10,7 +10,7 @@ If you don't have an account on the hosted service, you can sign up with your Gi For a comprehensive list, see [Supported Networks](/developing/supported-networks/#hosted-service). -## Create a Subgraph +## Creëer een 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 3724bce9f4ba59c1b91ce38197f9806a21c49e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:21 -0400 Subject: [PATCH 087/924] New translations hosted-service.mdx (Portuguese) --- website/pages/pt/deploying/hosted-service.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/pt/deploying/hosted-service.mdx b/website/pages/pt/deploying/hosted-service.mdx index 5d60dfbddf26..3710576c9136 100644 --- a/website/pages/pt/deploying/hosted-service.mdx +++ b/website/pages/pt/deploying/hosted-service.mdx @@ -46,9 +46,9 @@ graph init --from-example --product hosted-service / O subgraph de exemplo é baseado no contrato Gravity por Dani Grant, que gesta avatares de usuários e emite eventos `NewGravatar` ou `UpdateGravatar` sempre que são criados ou atualizados avatares. O subgraph lida com estes eventos ao escrever entidades `Gravatar` ao armazenamento do Graph Node e garantir que estes são atualizados de acordo com os eventos. Continue até o [manifest do subgraph](/developing/creating-a-subgraph#the-subgraph-manifest) para entender melhor ao que você deve prestar atenção, como eventos dos seus contratos inteligentes, mapeamentos, e mais. -### From a Proxy Contract +### De um Contrato de Proxy -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. +Para construir um subgraph personalizado para o propósito de monitorar um contrato de Proxy, inicialize o subgraph com a especificação do endereço do contrato de implementação. Quando o processo de inicialização for concluído, o último passo envolverá a atualização do nome da rede no arquivo subgraph.yaml ao endereço do contrato de Proxy. Você pode usar o comando abaixo. ```sh graph init \ From 0ae709e54d9c84ce50772eabb556f1506da26efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:28 -0400 Subject: [PATCH 088/924] New translations subgraph-studio-faqs.mdx (French) --- .../fr/deploying/subgraph-studio-faqs.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/pages/fr/deploying/subgraph-studio-faqs.mdx b/website/pages/fr/deploying/subgraph-studio-faqs.mdx index aafc961eef75..7c64254635a2 100644 --- a/website/pages/fr/deploying/subgraph-studio-faqs.mdx +++ b/website/pages/fr/deploying/subgraph-studio-faqs.mdx @@ -2,30 +2,30 @@ title: Subgraph Studio FAQ --- -## 1. What is Subgraph Studio? +## 1. Qu'est-ce que Subgraph Studio ? -[Subgraph Studio](https://thegraph.com/studio/) is a dapp for creating, managing, and publishing subgraphs and API keys. +[Subgraph Studio](https://thegraph.com/studio/) est une application pour créer, gérer et publier des subgraphs et des clés API. -## 2. How do I create an API Key? +## 2. Comment créer une clé API ? -To create an API, navigate to the Subgraph Studio and connect your wallet. You will be able to click the API keys tab at the top. There, you will be able to create an API key. +Pour créer une API, naviguez vers Subgraph Studio et connectez votre portefeuille. Vous pourrez cliquer sur l'onglet clés API en haut. Là, vous pourrez créer une clé API. -## 3. Can I create multiple API Keys? +## 3. Puis-je créer plusieurs clés API ? Oui ! Vous pouvez créer plusieurs clés API pour les utiliser dans différents projets. Consultez le lien [ici](https://thegraph.com/studio/apikeys/). -## 4. How do I restrict a domain for an API Key? +## 4. Comment limiter un domaine pour une clé API ? ? Après avoir créé une clé API, dans la section Sécurité, vous pouvez définir les domaines qui peuvent interroger une clé API spécifique. -## 5. Can I transfer my subgraph to another owner? +## Puis-je transférer mon subgraph à un autre propriétaire ? Oui, les subgraphes qui ont été publiés sur le réseau principal peuvent être transférés vers un nouveau portefeuille ou un Multisig. Vous pouvez le faire en cliquant sur les trois points à côté du bouton "Publier" sur la page de détails du subgraphe et en sélectionnant "Transférer la propriété". Notez que vous ne pourrez plus voir ou modifier le subgraph dans Studio une fois qu'il aura été transféré. -## 6. How do I find query URLs for subgraphs if I’m not the developer of the subgraph I want to use? +## Comment trouver les URL de requête pour les sugraphs si je ne suis pas le développeur du subgraph que je veux utiliser ? -You can find the query URL of each subgraph in the Subgraph Details section of The Graph Explorer. When you click on the “Query” button, you will be directed to a pane wherein you can view the query URL of the subgraph you’re interested in. You can then replace the `` placeholder with the API key you wish to leverage in the Subgraph Studio. +Vous pouvez trouver l'URL de requête de chaque subgraph dans la section Détails du subgraph de the Graph Explorer. Lorsque vous cliquez sur le bouton « Requête », vous serez dirigé vers un volet dans lequel vous pourrez visualiser l'URL de requête du subgraph qui vous intéresse. Vous pouvez ensuite remplacer l'espace réservé ``. avec la clé API que vous souhaitez exploiter dans Subgraph Studio. N'oubliez pas que vous pouvez créer une clé API et interroger n'importe quel subgraph publié sur le réseau, même si vous créez vous-même un subgraph. Ces requêtes via la nouvelle clé API, sont des requêtes payantes comme n'importe quelle autre sur le réseau. From 31459296c1f72194b877d5b0bb631326b9c91e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:30 -0400 Subject: [PATCH 089/924] New translations subgraph-studio-faqs.mdx (Czech) --- .../cs/deploying/subgraph-studio-faqs.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/cs/deploying/subgraph-studio-faqs.mdx b/website/pages/cs/deploying/subgraph-studio-faqs.mdx index 65217d4b7741..5f88c8afc148 100644 --- a/website/pages/cs/deploying/subgraph-studio-faqs.mdx +++ b/website/pages/cs/deploying/subgraph-studio-faqs.mdx @@ -1,31 +1,31 @@ --- -title: Subgraph Studio FAQs +title: FAQs Podgraf Studio --- -## 1. What is Subgraph Studio? +## 1. Co je Podgraf Studio? -[Subgraph Studio](https://thegraph.com/studio/) is a dapp for creating, managing, and publishing subgraphs and API keys. +[Podgraf Studio](https://thegraph.com/studio/) je aplikace pro vytváření, správu a publikování podgrafů a klíčů API. -## 2. How do I create an API Key? +## 2. Jak vytvořím klíč API? -To create an API, navigate to the Subgraph Studio and connect your wallet. You will be able to click the API keys tab at the top. There, you will be able to create an API key. +Chcete-li vytvořit rozhraní API, přejděte do Podgraf Studio a připojte peněženku. V horní části budete moci kliknout na kartu Klíče API. Tam budete moci vytvořit klíč API. -## 3. Can I create multiple API Keys? +## 3. Mohu vytvořit více klíčů API? -Yes! You can create multiple API Keys to use in different projects. Check out the link [here](https://thegraph.com/studio/apikeys/). +Ano! Můžete si vytvořit více klíčů API a používat je v různých projektech. Podívejte se na odkaz [zde](https://thegraph.com/studio/apikeys/). -## 4. How do I restrict a domain for an API Key? +## 4. Jak omezím doménu pro klíč API? -After creating an API Key, in the Security section, you can define the domains that can query a specific API Key. +Po vytvoření klíče API můžete v části Zabezpečení definovat domény, které se mohou dotazovat na konkrétní klíč API. -## 5. Can I transfer my subgraph to another owner? +## 5. Mohu svůj podgraf převést na jiného vlastníka? -Yes, subgraphs that have been published to Mainnet can be transferred to a new wallet or a Multisig. You can do so by clicking the three dots next to the 'Publish' button on the subgraph's details page and selecting 'Transfer ownership'. +Ano, dílčí grafy, které byly zveřejněny v Mainnetu, lze přenést do nové peněženky nebo Multisig. Můžete tak učinit kliknutím na tři tečky vedle tlačítka "Publikovat" na stránce s podrobnostmi podgrafu a výběrem možnosti "Převést vlastnictví". -Note that you will no longer be able to see or edit the subgraph in Studio once it has been transferred. +Všimněte si, že po přenesení podgrafu jej již nebudete moci ve Studio zobrazit ani upravovat. -## 6. How do I find query URLs for subgraphs if I’m not the developer of the subgraph I want to use? +## 6. Jak najdu adresy URL dotazů pro podgrafy, pokud nejsem Vývojář podgrafu, který chci použít? -You can find the query URL of each subgraph in the Subgraph Details section of The Graph Explorer. When you click on the “Query” button, you will be directed to a pane wherein you can view the query URL of the subgraph you’re interested in. You can then replace the `` placeholder with the API key you wish to leverage in the Subgraph Studio. +Adresu URL dotazu každého podgrafu najdete v části Podrobnosti o podgrafu v Průzkumníku grafů. Po kliknutí na tlačítko "Query" (Dotaz) budete přesměrováni na panel, ve kterém si můžete zobrazit URL adresu dotazu podgrafu, který vás zajímá. Poté můžete nahradit zástupný znak `` klíčem API, který chcete využít ve Studio podgrafu. -Remember that you can create an API key and query any subgraph published to the network, even if you build a subgraph yourself. These queries via the new API key, are paid queries as any other on the network. +Nezapomeňte, že si můžete vytvořit klíč API a dotazovat se na libovolný podgraf zveřejněný v síti, i když si podgraf vytvoříte sami. Tyto dotazy prostřednictvím nového klíče API jsou placené dotazy jako jakékoli jiné v síti. From 3427f4b95fea5dbf065837440d18879632e0d1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:32 -0400 Subject: [PATCH 090/924] New translations subgraph-studio-faqs.mdx (Italian) --- .../it/deploying/subgraph-studio-faqs.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/it/deploying/subgraph-studio-faqs.mdx b/website/pages/it/deploying/subgraph-studio-faqs.mdx index 65217d4b7741..431f5d6f52f0 100644 --- a/website/pages/it/deploying/subgraph-studio-faqs.mdx +++ b/website/pages/it/deploying/subgraph-studio-faqs.mdx @@ -1,31 +1,31 @@ --- -title: Subgraph Studio FAQs +title: FAQ di Subgraph Studio --- -## 1. What is Subgraph Studio? +## 1. Che cos'è Subgraph Studio? -[Subgraph Studio](https://thegraph.com/studio/) is a dapp for creating, managing, and publishing subgraphs and API keys. +[Subgraph Studio](https://thegraph.com/studio/) è una dapp per creare, gestire e pubblicare subgraph e chiavi API. -## 2. How do I create an API Key? +## 2. Come si crea una chiave API? -To create an API, navigate to the Subgraph Studio and connect your wallet. You will be able to click the API keys tab at the top. There, you will be able to create an API key. +Per creare un'API, accedere a Subgraph Studio e collegare il portafoglio. Sarà possibile fare clic sulla scheda Chiavi API in alto. Lì sarà possibile creare una chiave API. -## 3. Can I create multiple API Keys? +## 3. Posso creare più chiavi API? -Yes! You can create multiple API Keys to use in different projects. Check out the link [here](https://thegraph.com/studio/apikeys/). +Sì, è possibile creare più chiavi API da utilizzare in diversi progetti. Scoprire sul link [qui](https://thegraph.com/studio/apikeys/). -## 4. How do I restrict a domain for an API Key? +## 4. Come si limita un dominio per una chiave API? -After creating an API Key, in the Security section, you can define the domains that can query a specific API Key. +Dopo aver creato una chiave API, nella sezione Sicurezza è possibile definire i domini che possono eseguire query di una specifica chiave API. -## 5. Can I transfer my subgraph to another owner? +## 5. Posso trasferire il mio subgraph a un altro proprietario? -Yes, subgraphs that have been published to Mainnet can be transferred to a new wallet or a Multisig. You can do so by clicking the three dots next to the 'Publish' button on the subgraph's details page and selecting 'Transfer ownership'. +Sì, i subgraph che sono stati pubblicati su Mainnet possono essere trasferiti a un nuovo wallet o a un Multisig. È possibile farlo facendo clic sui tre punti accanto al pulsante 'Publish' nella pagina dei dettagli del subgraph e selezionando 'Transfer ownership'. -Note that you will no longer be able to see or edit the subgraph in Studio once it has been transferred. +Si noti che non sarà più possibile vedere o modificare il subgraph nel Studio una volta trasferito. -## 6. How do I find query URLs for subgraphs if I’m not the developer of the subgraph I want to use? +## 6. Come posso trovare gli URL di query per i subgraph se non sono lo sviluppatore del subgraph che voglio usare? -You can find the query URL of each subgraph in the Subgraph Details section of The Graph Explorer. When you click on the “Query” button, you will be directed to a pane wherein you can view the query URL of the subgraph you’re interested in. You can then replace the `` placeholder with the API key you wish to leverage in the Subgraph Studio. +L'URL di query di ogni subgraph si trova nella sezione Subgraph Details di Graph Explorer. Facendo clic sul pulsante "Query", si accede a un riquadro in cui è possibile visualizzare l'URL della query del subgraph a cui si è interessati. È quindi possibile sostituire il segnaposto `` con la chiave API che si desidera sfruttare nel Subgraph Studio. -Remember that you can create an API key and query any subgraph published to the network, even if you build a subgraph yourself. These queries via the new API key, are paid queries as any other on the network. +Si ricorda che è possibile creare una chiave API ed eseguire query del qualsiasi subgraph pubblicato sulla rete, anche se si costruisce un subgraph da soli. Queste query tramite la nuova chiave API sono a pagamento, come tutte le altre sulla rete. From 68382bdfd55ed2fdc2373439bffd75b4d135a1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:41 -0400 Subject: [PATCH 091/924] New translations subgraph-studio.mdx (Romanian) --- website/pages/ro/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ro/deploying/subgraph-studio.mdx b/website/pages/ro/deploying/subgraph-studio.mdx index 5ea55a9be2ef..a6ff02e41188 100644 --- a/website/pages/ro/deploying/subgraph-studio.mdx +++ b/website/pages/ro/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ In order to publish your subgraph successfully, you’ll need to go through the 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 Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. From 729b123bbd9acbff43adf7add12b706c49182964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:42 -0400 Subject: [PATCH 092/924] New translations subgraph-studio.mdx (French) --- website/pages/fr/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/fr/deploying/subgraph-studio.mdx b/website/pages/fr/deploying/subgraph-studio.mdx index 443e962decd3..f02382247e5f 100644 --- a/website/pages/fr/deploying/subgraph-studio.mdx +++ b/website/pages/fr/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ Pour publier votre subgraph avec succès, vous devrez suivre les étapes décrit Jetez un œil à l'aperçu vidéo ci-dessous également : - + Rappelez-vous, pendant que vous suivez le processus de publication, vous pourrez publier soit sur mainnet, soit sur Goerli. Si vous êtes un développeur de subgraphs débutant, nous vous recommandons vivement de commencer par publier sur Goerli, qui est gratuit. Cela vous permettra de voir comment le subgraph fonctionnera dans The Graph Explorer et vous permettra de tester les éléments de curation. From d6fe569570411b4acbfed256998a2ef884dcd2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:43 -0400 Subject: [PATCH 093/924] New translations subgraph-studio.mdx (Spanish) --- website/pages/es/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/es/deploying/subgraph-studio.mdx b/website/pages/es/deploying/subgraph-studio.mdx index fcef4322b835..2c69ba9a1d20 100644 --- a/website/pages/es/deploying/subgraph-studio.mdx +++ b/website/pages/es/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ Para publicar correctamente tu subgrafo, deberás seguir los siguientes pasos de También puedes ver el resumen en video a continuación: - + Recuerda que, mientras sigues los pasos de publicación, podrás publicar en la red principal (mainnet) o en Goerli. Si eres un desarrollador de subgrafos por primera vez, te recomendamos encarecidamente que comiences publicando en Goerli, lo cual es gratis. Esto te permitirá ver cómo funcionará el subgrafo en The Graph Explorer y te permitirá probar elementos de curación. From 099b95f4d72bcf68f7a6732a4da9646d8f4f2622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:44 -0400 Subject: [PATCH 094/924] New translations subgraph-studio.mdx (Arabic) --- website/pages/ar/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ar/deploying/subgraph-studio.mdx b/website/pages/ar/deploying/subgraph-studio.mdx index 4b26bfe7f28a..020b33dfeb62 100644 --- a/website/pages/ar/deploying/subgraph-studio.mdx +++ b/website/pages/ar/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ In order to publish your subgraph successfully, you’ll need to go through the 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 Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. From 5a77af793909703af161342eaf3d7ab03cfb6b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:45 -0400 Subject: [PATCH 095/924] New translations subgraph-studio.mdx (Czech) --- .../pages/cs/deploying/subgraph-studio.mdx | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/website/pages/cs/deploying/subgraph-studio.mdx b/website/pages/cs/deploying/subgraph-studio.mdx index 5ea55a9be2ef..6c26d6c74715 100644 --- a/website/pages/cs/deploying/subgraph-studio.mdx +++ b/website/pages/cs/deploying/subgraph-studio.mdx @@ -1,82 +1,82 @@ --- -title: How to Use the Subgraph Studio +title: Jak používat podgraf Studio --- -Welcome to your new launchpad 👩🏽‍🚀 +Vítejte na svém novém odpalovacím zařízení 👩🏽‍🚀 -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)). +Studio podgrafů je místem, kde můžete sestavovat a vytvářet podgrafy, přidávat k nim metadata a publikovat je v novém decentralizovaném Průzkumníku (více o tom [zde](/network/explorer)). -What you can do in the Subgraph Studio: +Co můžete dělat ve Studio podgraf: -- 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 +- Vytvoření podgrafu prostřednictvím UI Studio +- Nasazení podgrafu pomocí CLI +- Publikování podgrafu pomocí UI Studio +- Vyzkoušejte ji na hřišti +- Integrujte jej do staging pomocí dotazu URL +- Vytváření a správa klíčů API pro konkrétní podgrafy -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. +Ve Studio podgrafů máte nad svými podgrafy plnou kontrolu. Nejenže můžete své podgrafy před zveřejněním otestovat, ale můžete také omezit klíče API na konkrétní domény a povolit dotazování z jejich klíčů API pouze určitým indexerům. -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: +Dotazování podgrafů generuje poplatky za dotazy, které se používají k odměňování [Indexerů](/network/indexing) v síti Graf. Pokud jste vývojářem aplikací nebo podgrafů, Studio vám umožní vytvářet lepší subgrafy, které budou sloužit k dotazování vašemu nebo vaší komunity. Studio se skládá z 5 hlavních částí: -- 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 +- Správa uživatelského účtu +- Seznam podgrafů, které jste vytvořili +- Sekce pro správu, zobrazení podrobností a vizualizaci stavu konkrétního podgrafu +- Sekce pro správu klíčů API, které budete potřebovat k dotazování podgrafu +- Sekce pro správu vyúčtování -## How to Create Your Account +## Jak si vytvořit účet -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. +1. Přihlaste se pomocí své peněženky - můžete tak učinit prostřednictvím MetaMask nebo WalletConnect +1. Po přihlášení se na domovské stránce účtu zobrazí váš jedinečný klíč pro nasazení. Ten vám umožní buď publikovat vaše podgrafy, nebo spravovat vaše klíče API + fakturaci. Budete mít jedinečný deploy klíč, který lze znovu vygenerovat, pokud se domníváte, že byl ohrožen. -## How to Create a Subgraph in Subgraph Studio +## Jak vytvořit podgraf v Podgraf Studio -## Subgraph Compatibility with The Graph Network +## Kompatibilita podgrafů se sítí grafů -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: +Síť Graf zatím není schopna podporovat všechny zdroje dat & funkce dostupné v hostované službě. Aby mohly být indexery v síti podporovány, musí podgrafy: -- Index a [supported network](/developing/supported-networks) -- Must not use any of the following features: +- Index [podporované sítě](/developing/supported-networks) +- Nesmí používat žádnou z následujících funkcí: - ipfs.cat & ipfs.map - - Non-fatal errors - - Grafting + - Nefatální + - Roubování -More features & networks will be added to The Graph Network incrementally. +Další funkce & sítě budou do síť grafů přidávány postupně. -### Subgraph lifecycle flow +### Tok životního cyklu podgrafu -![Subgraph Lifecycle](/img/subgraph-lifecycle.png) +![Životní cyklus podgrafů](/img/subgraph-lifecycle.png) -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. +Po vytvoření podgrafu jej budete moci nasadit pomocí [CLI](https://github.com/graphprotocol/graph-cli) neboli příkazového řádku. Nasazení podgrafu pomocí CLI přesune podgraf do Studio, kde budete moci testovat podgrafy pomocí hřiště. To vám nakonec umožní publikovat do sítě Graf. Další informace o nastavení CLI najdete [na tomto místě](/developing/defining-a-subgraph#install-the-graph-cli) (pst, ujistěte se, že máte po ruce klíč k nasazení). Nezapomeňte, že nasazení **není totéž jako** publikování. Při nasazení dílčího grafu jej pouze odešlete do Studio, kde jej můžete otestovat. Oproti tomu, když publikujete podgraf, publikujete jej v řetězci. -## Testing your Subgraph in Subgraph Studio +## Testování Podgrafu v Podgraf 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. +Pokud chcete subgraf otestovat před jeho publikováním v síti, můžete tak učinit v podgrafu **Playground** nebo se podívat do protokolů. Záznamy podgraphu vám řeknou **kde** váš podgraf selhal v případě, že se tak stane. -## Publish your Subgraph in Subgraph Studio +## Publikování podgrafu v Podgraf Studio -You’ve made it this far - congrats! +Dostali jste se až sem - gratulujeme! -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). +Abyste mohli úspěšně publikovat svůj podgraf, musíte provést následující kroky popsané v tomto [blogu](https://thegraph.com/blog/building-with-subgraph-studio). -Check out the video overview below as well: +Podívejte se také na níže uvedený videopřehled: - + -Remember, while you’re going through your publishing flow, you’ll be able to push to either mainnet or Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. +Nezapomeňte, že během publikačního toku budete moci odesílat buď do mainnetu, nebo do Goerli. Pokud vyvíjíte podgrafy poprvé, doporučujeme vám začít s publikováním na Goerli, které je zdarma. To vám umožní zjistit, jak bude podgraf fungovat v Průzkumníku grafů, a umožní vám to otestovat prvky kurátorství. -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! +Indexátoři musí předkládat povinné záznamy Proof of Indexing od určitého bloku hash. Protože zveřejnění podgrafu je akce prováděná v řetězci, nezapomeňte, že provedení transakce může trvat až několik minut. Jakákoli adresa, kterou použijete k publikování kontraktu, bude jediná, která bude moci publikovat budoucí verze. Vybírejte proto moudře! -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. +Podgrafy s kurátorským signál jsou zobrazeny indexátorům, aby mohly být indexovány v decentralizované síti. Podgrafy a signál můžete publikovat v jedné transakci, což umožňuje mincovat první kurátorský signál na podgrafu a šetří náklady na plyn. Přidáním vašeho signálu k signálu, který později poskytnou kurátoři, bude mít váš podgraf také větší šanci, že nakonec obslouží dotazy. -**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! +**Teď, když jste publikovali svůj podgraf, se podíváme na to, jak je budete pravidelně spravovat.** Všimněte si, že podgraf nemůžete publikovat do sítě, pokud se nepodařila jeho synchronizace. Obvykle je to proto, že podgraf má chyby - protokoly vám prozradí, kde se tyto problémy vyskytují! -## Versioning your Subgraph with the CLI +## Verzování podgrafu pomocí 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. +Vývojáři mohou chtít aktualizovat svůj podgraf z různých důvodů. V takovém případě můžete pomocí CLI nasadit novou verzi podgrafu do Studia (v tomto okamžiku bude pouze soukromá), a pokud jste s ní spokojeni, můžete toto nové nasazení publikovat v Průzkumníku grafů. Tím se vytvoří nová verze vašeho podgrafu, kterou mohou kurátoři začít signalizovat, a indexátory budou moci tuto novou verzi indexovat. 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. From b8cbbd20c8a5963cb3d547446798cd98b685b392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:46 -0400 Subject: [PATCH 096/924] New translations subgraph-studio.mdx (German) --- website/pages/de/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/de/deploying/subgraph-studio.mdx b/website/pages/de/deploying/subgraph-studio.mdx index 5ea55a9be2ef..a6ff02e41188 100644 --- a/website/pages/de/deploying/subgraph-studio.mdx +++ b/website/pages/de/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ In order to publish your subgraph successfully, you’ll need to go through the 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 Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. From 641e61116dfb6df20e2ea15925d482b4af7b150d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:47 -0400 Subject: [PATCH 097/924] New translations subgraph-studio.mdx (Italian) --- .../pages/it/deploying/subgraph-studio.mdx | 98 +++++++++---------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/website/pages/it/deploying/subgraph-studio.mdx b/website/pages/it/deploying/subgraph-studio.mdx index 5ea55a9be2ef..76fc668523d1 100644 --- a/website/pages/it/deploying/subgraph-studio.mdx +++ b/website/pages/it/deploying/subgraph-studio.mdx @@ -1,89 +1,89 @@ --- -title: How to Use the Subgraph Studio +title: Come usare Subgraph Studio --- -Welcome to your new launchpad 👩🏽‍🚀 +Benvenuti nel vostro nuovo 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)). +Il Subgraph Studio è il luogo in cui costruire e creare subgraph, aggiungere metadati e pubblicarli sul nuovo Explorer decentralizzato (clicca [qui](/network/explorer) per saperne di più). -What you can do in the Subgraph Studio: +Cosa si può fare nel 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 +- Creare un subgraph attraverso UI di Studio +- Distribuire un subgraph usando la CLI +- Pubblicare un subgraph con UI di Studio +- Testarlo nel playground +- Integrarlo in staging utilizzando la query URL +- Creare e gestire le chiavi API per specifici subgraph -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. +In Subgraph Studio si ha il pieno controllo dei subgraph. Non solo potete testare i vostri subgraph prima di pubblicarli, ma potete anche limitare le chiavi API a domini specifici e consentire solo a determinati Indexer di eseguire query dalle loro chiavi API. -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: +Eseguire query dei subgraph genera tariffe di query, utilizzate per ricompensare gli [Indexer](/network/indexing) del Graph Network. Se siete sviluppatori di dapp o di subgraph, lo Studio vi consentirà di costruire subgraph migliori per alimentare le query della vostra comunità. Lo Studio è composto da 5 parti principali: -- 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 +- Il controllo dell'account utente +- Un elenco di subgraph creati dall'utente +- Una sezione per gestire, visualizzare i dettagli e lo stato di uno specifico subgraph +- Una sezione per gestire le chiavi API di cui si ha bisogno per eseguire query di un subgraph +- Una sezione per gestire la fatturazione -## How to Create Your Account +## Come creare il proprio 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. +1. Accedere con il proprio wallet - è possibile farlo tramite MetaMask o WalletConnect +1. Una volta effettuato l'accesso, nella pagina iniziale del vostro account vedrete la vostra chiave di distribuzione unica. Questo vi permetterà di pubblicare i vostri subgraph o di gestire le chiavi API e la fatturazione. Avrete una chiave di distribuzione unica che può essere rigenerata se pensate che sia stata compromessa. -## How to Create a Subgraph in Subgraph Studio +## Come creare un subgraph nel Subgraph Studio -## Subgraph Compatibility with The Graph Network +## Compatibilità del subgraph con 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: +The Graph Network non è ancora in grado di supportare tutte le fonti di dati e le funzionalità disponibili sull'Hosted Service. Per essere supportati dagli Indexer della rete, i subgraph devono: -- Index a [supported network](/developing/supported-networks) -- Must not use any of the following features: - - ipfs.cat & ipfs.map - - Non-fatal errors +- Indicizzare [una rete supportata](/developing/supported-networks) +- Non deve utilizzare nessuna delle seguenti funzioni: + - ipfs.cat e ipfs.map + - Errori non fatali - Grafting -More features & networks will be added to The Graph Network incrementally. +Altre funzionalità e reti saranno aggiunte gradualmente a The Graph Network. -### Subgraph lifecycle flow +### Flusso del ciclo di vita del subgraph -![Subgraph Lifecycle](/img/subgraph-lifecycle.png) +![Ciclo di vita del subgraph](/img/subgraph-lifecycle.png) -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. +Dopo aver creato il subgraph, sarà possibile distribuirlo utilizzando la [CLI](https://github.com/graphprotocol/graph-cli), oppure interfaccia a riga di comando. Distribuendo un subgraph con la CLI, il subgraph verrà inviato a Studio, dove sarà possibile testare i subgraph utilizzando il playground. Ciò consentirà infine di pubblicare nel Graph Network. Per ulteriori informazioni sull'impostazione della CLI, [controllare qui](/developing/defining-a-subgraph#install-the-graph-cli) (pst, assicurarsi di avere a portata di mano la chiave di deploy). Ricordate che la distribuzione **non è la stessa cosa** della pubblicazione. Quando si distribuisce un subgraph, lo si invia semplicemente allo Studio, dove è possibile testarlo. Quando si pubblica un subgraph, invece, lo si pubblica on-chain. -## Testing your Subgraph in Subgraph Studio +## Testare il subgraph nel 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. +Se si desidera testare il proprio subgraph prima di pubblicarlo nella rete, è possibile farlo nel Subgraph Playground o guardare i log. I log di Subgraph vi diranno **dove** il vostro subgraph fallisce nel caso in cui lo faccia. -## Publish your Subgraph in Subgraph Studio +## Pubblicare il proprio subgraph nel Subgraph Studio -You’ve made it this far - congrats! +Siete arrivati fin qui - complimenti! -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). +Per pubblicare con successo il subgraph, è necessario eseguire i passaggi descritti in questo [blog](https://thegraph.com/blog/building-with-subgraph-studio). -Check out the video overview below as well: +Date un'occhiata anche al video qui sotto: - + -Remember, while you’re going through your publishing flow, you’ll be able to push to either mainnet or Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. +Ricordate che, durante il flusso di pubblicazione, sarete in grado di effettuare il push su mainnet o su Goerli. Se siete alle prime armi con lo sviluppo di un subgraph, vi suggeriamo di iniziare con la pubblicazione su Goerli, che è gratuita. Questo vi permetterà di vedere come funzionerà il subgraph nel The Graph Explorer e di testare gli elementi di curation. -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! +Gli Indexer devono inviare i record obbligatori di Proof of Indexing a partire da uno specifico hash del blocco. Poiché la pubblicazione di un subgraph è un'azione eseguita on-chain, ricordate che la transazione può richiedere fino a qualche minuto. L'indirizzo utilizzato per pubblicare il contratto sarà l'unico in grado di pubblicare versioni future. Scegliete con attenzione! -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. +I subgraph con segnale di curation vengono mostrati agli Indexer in modo che possano essere indicizzati sulla rete decentralizzata. È possibile pubblicare i subgraph e il segnale in un'unica transazione, il che consente di coniare il primo segnale di curation sul subgraph e di risparmiare sui costi del gas. Aggiungendo il proprio segnale a quelli forniti successivamente dai curatori, il subgraph avrà anche maggiori possibilità di servire le query. -**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! +**Ora che il subgraph è stato pubblicato, vediamo come gestirlo regolarmente.** Si noti che non è possibile pubblicare il subgraph sulla rete se la sincronizzazione non è riuscita. Questo di solito è dovuto alla presenza di bug nel subgraph - i log vi diranno dove si trovano questi problemi! -## Versioning your Subgraph with the CLI +## Versionamento del subgraph con 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 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. +Gli sviluppatori potrebbero voler aggiornare il proprio subgraph per una serie di motivi. In questo caso, è possibile distribuire una nuova versione del subgraph nello Studio utilizzando la CLI (a questo punto sarà solo privato) e, se si è soddisfatti, si può pubblicare questa nuova distribuzione su The Graph Explorer. In questo modo si creerà una nuova versione del subgraph su cui i curators potranno iniziare a segnalare e gli Indexer saranno in grado di indicizzare questa nuova versione. -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. +Fino a poco tempo fa, gli sviluppatori erano costretti a distribuire e pubblicare una nuova versione del loro subgraph su Explorer per aggiornare i metadati dei loro subgraph. Ora gli sviluppatori possono aggiornare i metadati dei loro subgraph **senza dover pubblicare una nuova versione**. Gli sviluppatori possono aggiornare i dettagli dei loro subgraph nello Studio (sotto l'immagine del profilo, il nome, la descrizione, ecc.) selezionando un'opzione chiamata **Update Details** nel Graph Explorer. Se questa opzione è selezionata, verrà generata una transazione sulla chain che aggiorna i dettagli del subgraph nell'Explorer senza dover pubblicare una nuova versione con un nuovo deploy. -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). +Si noti che la pubblicazione di una nuova versione di un subgraph nella rete comporta dei costi. Oltre alle commissioni di transazione, gli sviluppatori devono anche finanziare una parte della tassa di curation sul segnale di auto-migrazione. Non è possibile pubblicare una nuova versione del proprio subgraph se i curator non l'hanno segnalata. Per ulteriori informazioni sui rischi della curation, si legga [qui](/network/curating). -### Automatic Archiving of Subgraph Versions +### Archiviazione automatica delle versioni del subgraph -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. +Ogni volta che si distribuisce una nuova versione del subgraph nel Subgraph Studio, la versione precedente viene archiviata. Le versioni archiviate non vengono indicizzate/sincronizzate e quindi non possono essere interrogate. È possibile disarchiviare una versione archiviata del subgraph nel UI dello Studio. Si noti che le versioni precedenti dei subgraph non pubblicati distribuiti nel Studio vengono archiviate automaticamente. -![Subgraph Studio - Unarchive](/img/Unarchive.png) +![Subgraph Studio - Disarchiviazione](/img/Unarchive.png) From f722ac9c40b72f0409abc3d048ef31577bfa3e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:47 -0400 Subject: [PATCH 098/924] New translations subgraph-studio.mdx (Japanese) --- website/pages/ja/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ja/deploying/subgraph-studio.mdx b/website/pages/ja/deploying/subgraph-studio.mdx index e4930db13581..786ca5e9f854 100644 --- a/website/pages/ja/deploying/subgraph-studio.mdx +++ b/website/pages/ja/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ The Graph Network の機能やネットワークは順次追加されていき 以下のビデオの概要もご覧ください: - + パブリッシュ フローを実行している間、メインネットまたは Goerli にプッシュできることを忘れないでください。初めてサブグラフを開発する場合は、無料で Goerli に公開することから始めることを強くお勧めします。これにより、グラフ エクスプローラーでサブグラフがどのように機能するかを確認し、キュレーション要素をテストできます。 From de3d4d23e50a25b6449c02607534ddf9ce0ae11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:48 -0400 Subject: [PATCH 099/924] New translations subgraph-studio.mdx (Korean) --- website/pages/ko/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ko/deploying/subgraph-studio.mdx b/website/pages/ko/deploying/subgraph-studio.mdx index 5ea55a9be2ef..a6ff02e41188 100644 --- a/website/pages/ko/deploying/subgraph-studio.mdx +++ b/website/pages/ko/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ In order to publish your subgraph successfully, you’ll need to go through the 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 Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. From f961031bbbf20273e0e8991fb5cf248f338c9acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:49 -0400 Subject: [PATCH 100/924] New translations subgraph-studio.mdx (Dutch) --- website/pages/nl/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/nl/deploying/subgraph-studio.mdx b/website/pages/nl/deploying/subgraph-studio.mdx index 5ea55a9be2ef..a6ff02e41188 100644 --- a/website/pages/nl/deploying/subgraph-studio.mdx +++ b/website/pages/nl/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ In order to publish your subgraph successfully, you’ll need to go through the 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 Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. From 306121ed1acb824f9a9489debb7c0b21bc891add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:50 -0400 Subject: [PATCH 101/924] New translations subgraph-studio.mdx (Polish) --- website/pages/pl/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pl/deploying/subgraph-studio.mdx b/website/pages/pl/deploying/subgraph-studio.mdx index 5ea55a9be2ef..a6ff02e41188 100644 --- a/website/pages/pl/deploying/subgraph-studio.mdx +++ b/website/pages/pl/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ In order to publish your subgraph successfully, you’ll need to go through the 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 Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. From 2e839d493a80fa62d2571fd75863b9d259cec4a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:51 -0400 Subject: [PATCH 102/924] New translations subgraph-studio.mdx (Portuguese) --- website/pages/pt/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pt/deploying/subgraph-studio.mdx b/website/pages/pt/deploying/subgraph-studio.mdx index 8e954b2e6ec7..f4c4d1c699d4 100644 --- a/website/pages/pt/deploying/subgraph-studio.mdx +++ b/website/pages/pt/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ Para poder editar o seu subgraph com êxito, passe pelos passos detalhados [nest Confira o vídeo abaixo também: - + Lembre-se, enquanto passas pelo seu fluxo de publicação, poderá enviar pushes para a mainnet ou o Goerli. Se for um programador noviço de subgraph, recomendamos que comece a editar na Goerli, que é gratuita. Isto lhe permite ver como o subgraph funcionará no The Graph Explorer e testar elementos de curadoria. From 2262d239ad6f6b76ca42198b2a3611573716276a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:52 -0400 Subject: [PATCH 103/924] New translations subgraph-studio.mdx (Russian) --- website/pages/ru/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ru/deploying/subgraph-studio.mdx b/website/pages/ru/deploying/subgraph-studio.mdx index f76dffe75912..92ba439dd2e4 100644 --- a/website/pages/ru/deploying/subgraph-studio.mdx +++ b/website/pages/ru/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ Subgraph Studio - это ваше место для создания подгр Ознакомьтесь также с видео обзором ниже: - + Помните, что в процессе публикации вы сможете публиковать свои данные либо в основной сети, либо в сети Goerli. Если вы впервые разрабатываете подграф, мы настоятельно рекомендуем вам начать с публикации в сети Goerli, которая является бесплатной. Это позволит вам увидеть, как подграф будет работать в The Graph Explorer, и даст возможность протестировать элементы кураторства. From 35b1f592f95956a03357361eae1ac521544481f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:53 -0400 Subject: [PATCH 104/924] New translations subgraph-studio.mdx (Swedish) --- website/pages/sv/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/deploying/subgraph-studio.mdx b/website/pages/sv/deploying/subgraph-studio.mdx index 1438f45ffe47..f2b421b9abce 100644 --- a/website/pages/sv/deploying/subgraph-studio.mdx +++ b/website/pages/sv/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ För att kunna publicera din subgraf framgångsrikt måste du gå igenom följan Kolla också in videoöversikten nedan: - + Kom ihåg att när du går igenom ditt publiceringsflöde kan du välja att publicera till antingen mainnet eller Goerli. Om du är en förstagångsutvecklare av undergrafer rekommenderar vi starkt att du börjar med att publicera till Goerli, vilket är gratis. På så sätt kan du se hur subgrafen fungerar i The Graf Explorer och testa av kurationselement. From d28f02bcb7ce4b5975b5e643d9856d9888709950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:54 -0400 Subject: [PATCH 105/924] New translations subgraph-studio.mdx (Turkish) --- website/pages/tr/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/tr/deploying/subgraph-studio.mdx b/website/pages/tr/deploying/subgraph-studio.mdx index 8ad3008fd099..f761ac447878 100644 --- a/website/pages/tr/deploying/subgraph-studio.mdx +++ b/website/pages/tr/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ Subgraph'inizi başarılı bir şekilde yayınlamak için, bu [blog](https://the Aşağıdaki video genel bakışına da göz atın: - + Yayın akışınızı gerçekleştirirken ana ağa veya Goerli'ye gönderebileceğinizi unutmayın. İlk kez bir subgraph geliştiricisiyseniz, ücretsiz olarak Goerli'de yayınlayarak başlamanızı önemle tavsiye ederiz. Bu, subgraph'in Graph Gezgini'nde nasıl çalışacağını görmenize ve iyileştirme öğelerini test etmenize olanak tanır. From 0db59e73a6a83f5c8379acd41beb7fa45f0b1797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:55 -0400 Subject: [PATCH 106/924] New translations subgraph-studio.mdx (Ukrainian) --- website/pages/uk/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/uk/deploying/subgraph-studio.mdx b/website/pages/uk/deploying/subgraph-studio.mdx index 5ea55a9be2ef..a6ff02e41188 100644 --- a/website/pages/uk/deploying/subgraph-studio.mdx +++ b/website/pages/uk/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ In order to publish your subgraph successfully, you’ll need to go through the 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 Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. From 66791dccc0fddd31a1d4755a97395d8b4912c9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:56 -0400 Subject: [PATCH 107/924] New translations subgraph-studio.mdx (Chinese Simplified) --- website/pages/zh/deploying/subgraph-studio.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/zh/deploying/subgraph-studio.mdx b/website/pages/zh/deploying/subgraph-studio.mdx index 81784ef6fea3..51a44b0e0823 100644 --- a/website/pages/zh/deploying/subgraph-studio.mdx +++ b/website/pages/zh/deploying/subgraph-studio.mdx @@ -30,7 +30,7 @@ title: 如何使用子图工作室 1. 使用您的钱包登录 - 您可以通过 MetaMask 或 WalletConnect 进行此操作 1. 一旦您登录,您将在您的账户主页上看到您唯一的部署密钥。这将允许您发布您的子图或管理您的 API 密钥 + 计费。您将拥有一个惟一的部署密钥,如果您认为该密钥已被破坏,则可以重新生成该密钥。 -## How to Create a Subgraph in Subgraph Studio +## 如何在子图工作室中创建子图 @@ -64,7 +64,7 @@ Graph网络还不能支持所有的数据源和托管服务上可用的功能。 还可以查看下面的视频概述: - + 请记住,当您处理发布流程时,您可以推送到主网或 Goerli。如果你是一个子图开发者,我们强烈建议你从 Goerli 开始,这是免费的。这将允许您查看子图在 Graph浏览器中的工作方式,并允许您测试策展元素。 From adba82cd1a514c988fa63b60eba12a6ef51c610a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:57 -0400 Subject: [PATCH 108/924] New translations subgraph-studio.mdx (Urdu (Pakistan)) --- website/pages/ur/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ur/deploying/subgraph-studio.mdx b/website/pages/ur/deploying/subgraph-studio.mdx index 04d8f2bf0a82..74215597a62c 100644 --- a/website/pages/ur/deploying/subgraph-studio.mdx +++ b/website/pages/ur/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ title: سب گراف سٹوڈیو کیسے استعمال کرتے ہیں ذیل میں ویڈیو کا جائزہ بھی دیکھیں: - + یاد رکھیں، جب آپ اپنے پبلشنگ فلو سے گزر رہے ہوں گے، تو آپ مین نیٹ یا Goerli میں سے کسی ایک کی طرف دھکیل سکیں گے۔ اگر آپ پہلی بار سب گراف ڈویلپر ہیں، تو ہم آپ کو بہت زیادہ مشورہ دیتے ہیں کہ آپ Goerli پر اشاعت شروع کریں، جو کہ مفت ہے۔ یہ آپ کو دیکھنے کی اجازت دے گا کہ گراف ایکسپلورر میں سب گراف کس طرح کام کرے گا اور آپ کو کیوریشن عناصر کی جانچ کرنے کی اجازت دے گا. From d9fd6828e5c93f7c49d3db0a90ddb1995f5762d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:58 -0400 Subject: [PATCH 109/924] New translations subgraph-studio.mdx (Vietnamese) --- website/pages/vi/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/vi/deploying/subgraph-studio.mdx b/website/pages/vi/deploying/subgraph-studio.mdx index 50b074db9faa..2434e731d2cc 100644 --- a/website/pages/vi/deploying/subgraph-studio.mdx +++ b/website/pages/vi/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ In order to publish your subgraph successfully, you’ll need to go through the 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 Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. From 9e83bbbeae66649dfaad5b835b6cda5d943ba732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:58 -0400 Subject: [PATCH 110/924] New translations subgraph-studio.mdx (Marathi) --- website/pages/mr/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/mr/deploying/subgraph-studio.mdx b/website/pages/mr/deploying/subgraph-studio.mdx index dc3cb1623746..a6f3467d1128 100644 --- a/website/pages/mr/deploying/subgraph-studio.mdx +++ b/website/pages/mr/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ title: सबग्राफ स्टुडिओ कसा वापराय खालील व्हिडिओ विहंगावलोकन देखील पहा: - + लक्षात ठेवा, तुम्ही तुमच्या प्रकाशन प्रवाहातून जात असताना, तुम्ही मेननेट किंवा गोएर्ली यापैकी एकाकडे ढकलण्यात सक्षम असाल. तुम्ही प्रथमच सबग्राफ डेव्हलपर असाल तर, आम्ही तुम्हाला गोअरलीवर प्रकाशित करण्यास सुरुवात करण्यास सुचवतो, जे विनामूल्य आहे. हे तुम्हाला ग्राफ एक्सप्लोररमध्ये सबग्राफ कसे कार्य करेल हे पाहण्यास अनुमती देईल आणि क्युरेशन घटकांची चाचणी घेण्यास अनुमती देईल. From 5e8114419936d3d58898bab891fde1cded728e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:04:59 -0400 Subject: [PATCH 111/924] New translations subgraph-studio.mdx (Hindi) --- website/pages/hi/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/hi/deploying/subgraph-studio.mdx b/website/pages/hi/deploying/subgraph-studio.mdx index 7cbc8179842e..c1971237858a 100644 --- a/website/pages/hi/deploying/subgraph-studio.mdx +++ b/website/pages/hi/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ title: सबग्राफ स्टूडियो का उपयोग क नीचे दिए गए वीडियो अवलोकन को भी देखें: - + याद रखें, जब आप अपने प्रकाशन प्रवाह से गुजर रहे हों, तो आप मेननेट या गोएर्ली में से किसी एक पर पुश करने में सक्षम होंगे। यदि आप पहली बार सबग्राफ डेवलपर हैं, तो हम अत्यधिक सुझाव देते हैं कि आप गोएर्ली को प्रकाशित करना शुरू करें, जो करने के लिए स्वतंत्र है। यह आपको यह देखने की अनुमति देगा कि द ग्राफ एक्सप्लोरर में सबग्राफ कैसे काम करेगा और आपको क्यूरेशन तत्वों का परीक्षण करने की अनुमति देगा। From fc95d35f7201724bedaac653dabb7a0813aea3f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:00 -0400 Subject: [PATCH 112/924] New translations subgraph-studio.mdx (Yoruba) --- website/pages/yo/deploying/subgraph-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/yo/deploying/subgraph-studio.mdx b/website/pages/yo/deploying/subgraph-studio.mdx index 5ea55a9be2ef..a6ff02e41188 100644 --- a/website/pages/yo/deploying/subgraph-studio.mdx +++ b/website/pages/yo/deploying/subgraph-studio.mdx @@ -64,7 +64,7 @@ In order to publish your subgraph successfully, you’ll need to go through the 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 Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, 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. From 1a2eb9356f3fc60c89be0ddc58fbeb6cf3320ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:02 -0400 Subject: [PATCH 113/924] New translations creating-a-subgraph.mdx (Romanian) --- .../ro/developing/creating-a-subgraph.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/ro/developing/creating-a-subgraph.mdx b/website/pages/ro/developing/creating-a-subgraph.mdx index ace69dd1ac7d..db9e8a024571 100644 --- a/website/pages/ro/developing/creating-a-subgraph.mdx +++ b/website/pages/ro/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -531,7 +531,7 @@ Every entity has to have an `id` that is unique among all entities of the same t - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## Code Generation @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From 74b56ed135b2cadd36de9ba03fb7bcb59c3e632f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:03 -0400 Subject: [PATCH 114/924] New translations creating-a-subgraph.mdx (French) --- .../fr/developing/creating-a-subgraph.mdx | 678 +++++++++--------- 1 file changed, 342 insertions(+), 336 deletions(-) diff --git a/website/pages/fr/developing/creating-a-subgraph.mdx b/website/pages/fr/developing/creating-a-subgraph.mdx index 6dd9f640df22..73db1fe19107 100644 --- a/website/pages/fr/developing/creating-a-subgraph.mdx +++ b/website/pages/fr/developing/creating-a-subgraph.mdx @@ -4,7 +4,7 @@ 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. -![Defining a Subgraph](/img/defining-a-subgraph.png) +![Définition d'un subgraph](/img/defining-a-subgraph.png) Un subgraph se constitue des fichiers suivants : @@ -14,7 +14,7 @@ Un subgraph se constitue des fichiers suivants : - `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 [10,000 GRT](/network-transition-faq/#how-can-i-ensure-that-my-subgraph-will-be-picked-up-by-indexer-on-the-graph-network). +> Pour pouvoir utiliser votre subgraph sur le réseau décentralisé de The Graph, vous aurez besoin de [créer une clé API](/deploying/subgraph-studio-faqs/#2-how-do-i-create-an-api-key). Il est recommandé d'[ajouter un signal](/network/curating/#how-to-signal) à votre subgraph avec au moins [10,000 GRT](/network-transition-faq/#how-can-i-ensure-that-my-subgraph-will-be-picked-up-by-indexer-on-the-graph-network). Avant d'aller en détail à propos du contenu du manifeste, installons l'[interface de ligne de commande de TheGraph](https://github.com/graphprotocol/graph-cli). Nous en aurons besoin pour la création et le déploiement du subgraph. @@ -45,7 +45,7 @@ La commande suivante crée un subgraph qui indexe tous les événements d'un con ```sh graph init \ --product subgraph-studio - --du-contract \ + --from-contract \ [--network ] \ [--abi ] \ [] @@ -58,7 +58,7 @@ The `` est l'ID de votre subgraph dans Subgraph Studio, il peut 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 -studio graph init -- +graph init --studio ``` 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 subgraphe 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. Les sections suivantes décrivent les fichiers qui composent le manifeste de subgraph pour cet exemple. @@ -146,11 +146,11 @@ Les entrées importantes à mettre à jour pour le manifeste sont : - `description`: a human-readable description of what the subgraph is. This description is displayed by the Graph Explorer when the subgraph is deployed to the hosted service. -- `repository`: the URL of the repository where the subgraph manifest can be found. This is also displayed by The Graph Explorer. +- `dépôt` : l'URL du référentiel où le manifeste du subgraph peut être trouvé. Ceci est également affiché par The Graph Explorer. - `fonctionnalités` : une liste de tous les noms de [fonctionnalités](#experimental-features) utilisés. -- `dataSources.source`: the address of the smart contract the subgraph sources, and the ABI of the smart contract to use. The address is optional; omitting it allows to index matching events from all contracts. +- `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. @@ -164,9 +164,9 @@ Les entrées importantes à mettre à jour pour le manifeste sont : - `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`: lists the smart contract functions this subgraph reacts to and handlers in the mapping that transform the inputs and outputs to function calls into entities in the store. +- `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`: lists the blocks this subgraph reacts to and handlers in the mapping to run when a block is appended to the chain. Without a filter, the block handler will be run every block. An optional call-filter can be provided by adding a `filter` field with `kind: call` to the handler. This will only run the handler if the block contains at least one call to the data source contract. +- `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`. @@ -174,11 +174,11 @@ Les déclencheurs d'une source de données au sein d'un bloc sont classés à l' 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. Block triggers are run after event and call triggers, in the order they are defined in the manifest. +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. -### Getting The ABIs +### Obtenir les ABI Le(s) fichier(s) ABI doivent correspondre à votre(vos) contrat(s). Il existe plusieurs façons d'obtenir des fichiers ABI : @@ -201,32 +201,32 @@ Avec The Graph, vous définissez simplement les types d'entités dans `schema.gr 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 -tapez Gravatar @entity(immuable : true) { - identifiant : octets ! - propriétaire : octets - displayName : chaîne - imageUrl : chaîne - accepté : booléen +type Gravatar @entity(immutable: true) { + id: Bytes! + owner: Bytes + displayName: String + imageUrl: String + accepted: Boolean } ``` -### Bad Example +### 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 -tapez GravatarAccepted @entity { - identifiant : octets ! - propriétaire : octets - displayName : chaîne - imageUrl : chaîne +type GravatarAccepted @entity { + id: Bytes! + owner: Bytes + displayName: String + imageUrl: String } -tapez GravatarDeclined @entity { - identifiant : octets ! - propriétaire : octets - displayName : chaîne - imageUrl : chaîne +type GravatarDeclined @entity { + id: Bytes! + owner: Bytes + displayName: String + imageUrl: String } ``` @@ -238,9 +238,9 @@ Les champs d'entité peuvent être définis comme obligatoires ou facultatifs. L Null value resolved for non-null field 'name' ``` -Each entity must have an `id` field, which must be of type `Bytes!` or `String!`. It is generally recommended to use `Bytes!`, unless the `id` contains human-readable text, since entities with `Bytes!` id's will be faster to write and query as those with a `String!` `id`. The `id` field serves as the primary key, and needs to be unique among all entities of the same type. For historical reasons, the type `ID!` is also accepted and is a synonym for `String!`. +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!`. -For some entity types the `id` is constructed from the id's of two other entities; that is possible using `concat`, e.g., `let id = left.id.concat(right.id)` to form the id from the id's of `left` and `right`. Similarly, to construct an id from the id of an existing entity and a counter `count`, `let id = left.id.concatI32(count)` can be used. The concatenation is guaranteed to produce unique id's as long as the length of `left` is the same for all such entities, for example, because `left.id` is an `Address`. +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 `gauche 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 @@ -248,19 +248,19 @@ For some entity types the `id` is constructed from the id's of two other entitie Nous prenons en charge les scalaires suivants dans notre API GraphQL : -| Type | Description | -| --- | --- | -| `Octets` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `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` | La spécification GraphQL définit `Int` pour avoir une taille de 32 octets. | -| `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 -requête { - bandSearch(texte : "breaks & électro & detroit") { - identifiant - nom - description - portefeuille - } +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. -### Languages supported +### Langues prises en charge -Choosing a different language will have a definitive, though sometimes subtle, effect on the fulltext search API. Fields covered by a fulltext query field are examined in the context of the chosen language, so the lexemes produced by analysis and search queries vary from language to language. For example: when using the supported Turkish dictionary "token" is stemmed to "toke" while, of course, the English dictionary will stem it to "token". +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 : @@ -462,7 +462,7 @@ Dictionnaires de langues pris en charge : | ------ | ------------ | | simple | Général | | da | Danois | -| nl | Dutch | +| nl | Néerlandais | | en | Anglais | | fi | Finlandais | | fr | Français | @@ -481,10 +481,10 @@ Dictionnaires de langues pris en charge : Algorithmes de classement: -| Algorithm | 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. | +| 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 @@ -525,25 +525,25 @@ Le deuxième gestionnaire essaie de charger le `Gravatar` existant à partir du ### ID recommandés pour la création de nouvelles entités -Every entity has to have an `id` that is unique among all entities of the same type. An entity's `id` value is set when the entity is created. Below are some recommended `id` values to consider when creating new entities. NOTE: The value of `id` must be a `string`. +Chaque entité doit avoir un `id` unique parmi toutes les entités du même type. La valeur `id` d'une entité est définie lors de la création de l'entité. Vous trouverez ci-dessous quelques valeurs `id` recommandées à prendre en compte lors de la création de nouvelles entités. REMARQUE : La valeur de `id` doit être une `chaîne`. - `event.params.id.toHex()` - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. -## Code Generation +## Génération de code -In order to make it easy and type-safe to work with smart contracts, events and entities, the Graph CLI can generate AssemblyScript types from the subgraph's GraphQL schema and the contract ABIs included in the data sources. +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. -This is done with +Cela se fait avec ```sh graph codegen [--output-dir ] [] ``` -but in most cases, subgraphs are already preconfigured via `package.json` to allow you to simply run one of the following to achieve the same: +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 @@ -553,13 +553,13 @@ yarn codegen npm run codegen ``` -This will generate an AssemblyScript class for every smart contract in the ABI files mentioned in `subgraph.yaml`, allowing you to bind these contracts to specific addresses in the mappings and call read-only contract methods against the block being processed. It will also generate a class for every contract event to provide easy access to event parameters, as well as the block and transaction the event originated from. All of these types are written to `//.ts`. In the example subgraph, this would be `generated/Gravity/Gravity.ts`, allowing mappings to import these types with. +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 { - // The contract class: + // La classe de contrat : Gravity, - // The events classes: + // Les classes d'événements : NewGravatar, UpdatedGravatar, } from '../generated/Gravity/Gravity' @@ -568,12 +568,12 @@ import { 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 -importer { Gravatar } du '../generated/schema' +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 the Graph Explorer, you can run `yarn build` and fix any syntax errors that the TypeScript compiler might find. +La génération de code ne vérifie pas votre code de mappage dans `src/mapping.ts`. Si vous souhaitez vérifier cela avant d'essayer de déployer votre subgraph sur Graph Explorer, vous pouvez exécuter `yarn build` et corriger toutes les erreurs de syntaxe que le compilateur TypeScript pourrait trouver. ## Modèles de sources de données @@ -608,40 +608,40 @@ dataSources: handler: handleNewExchange ``` -### Data Source Templates for Dynamically Created Contracts +### Modèles de source de données pour les contrats créés dynamiquement -Then, you add _data source templates_ to the manifest. These are identical to regular data sources, except that they lack a pre-defined contract address under `source`. Typically, you would define one template for each type of sub-contract managed or referenced by the parent contract. +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 -les sources de données: - - genre: ethereum/contrat - nom: Usine - # ... autres champs sources du contrat principal ... -modèles: - - nom: Bourse - genre: ethereum/contrat - réseau: réseau principal +dataSources: + - kind: ethereum/contract + name: Factory + # ... other source fields for the main contract ... +templates: + - name: Exchange + kind: ethereum/contract + network: mainnet source: - abi: Échange - cartographie: - genre: ethereum/événements - Version api: 0.0.6 - langage: wasm/assemblyscript - fichier: ./src/mappings/exchange.ts - entités: - - Échange + abi: Exchange + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ./src/mappings/exchange.ts + entities: + - Exchange abis: - - nom: Bourse - fichier: ./abis/exchange.json - Gestionnaires d'événements: - - événement: TokenPurchase (adresse, uint256, uint256) - gestionnaire: handleTokenPurchase - - événement: EthPurchase (adresse, uint256, uint256) - gestionnaire: handleEthPurchase - - événement: AddLiquidity (adresse, uint256, uint256) - gestionnaire: handleAddLiquidity - - événement: RemoveLiquidity (adresse, uint256, uint256) - gestionnaire: handleRemoveLiquidity + - 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 @@ -649,17 +649,17 @@ modèles: 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 -importer { Exchange } depuis '../generated/templates' +import { Exchange } from '../generated/templates' -fonction d'exportation handleNewExchange (événement : NewExchange) : void { - // Commence à indexer l'échange ; `event.params.exchange` est le - // adresse du nouveau contrat d'échange - Exchange.create(event.params.exchange) +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 @@ -676,13 +676,13 @@ export function handleNewExchange(event: NewExchange): void { } ``` -Inside a mapping of the `Exchange` template, the context can then be accessed: +A l'intérieur d'un mappage du modèle `Exchange`, le contexte est alors accessible : ```typescript -importer { dataSource } depuis '@graphprotocol/graph-ts' +import { dataSource } from '@graphprotocol/graph-ts' -laissez contexte = dataSource.context() -laissez tradingPair = context.getString('tradingPair') +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. @@ -692,38 +692,38 @@ Il existe des setters et des getters comme `setString` et `getString` pour tous 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 -les sources de données: - - genre : ethereum/contrat - nom : ExempleSource - réseau : réseau principal - source: - adresse : '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' - abi : Exemple de contrat - bloc de démarrage : 6627917 - cartographie : - genre : ethereum/événements - Version api : 0.0.6 - langage : wasm/assemblyscript - fichier : ./src/mappings/factory.ts - entités : - - Utilisateur - abis : - - nom : ExempleContrat - fichier : ./abis/ExampleContract.json - Gestionnaires d'événements : - - événement : NewEvent(adresse,adresse) - gestionnaire : handleNewEvent +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. Load the transaction details page where you'll find the start block for that contract. +> 3. Chargez la page des détails de la transaction où vous trouverez le bloc de départ de ce contrat. -## Call Handlers +## Gestionnaires d'appels -While events provide an effective way to collect relevant changes to the state of a contract, many contracts avoid generating logs to optimize gas costs. In these cases, a subgraph can subscribe to calls made to the data source contract. This is achieved by defining call handlers referencing the function signature and the mapping handler that will process calls to this function. To process these calls, the mapping handler will receive an `ethereum.Call` as an argument with the typed inputs to and outputs from the call. Calls made at any depth in a transaction's call chain will trigger the mapping, allowing activity with the data source contract through proxy contracts to be captured. +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. @@ -734,24 +734,26 @@ Les gestionnaires d'appels ne se déclencheront que dans l'un des deux cas suiva 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 -les sources de données: - - genre: ethereum/contrat - nom: Gravité - réseau: réseau principal +dataSources: + - kind: ethereum/contract + name: Gravity + network: mainnet source: - adresse: '0x731a10897d267e19b34503ad902d0a29173ba4b1' - abi: Gravité - cartographie: - genre: ethereum/événements - Version api: 0.0.6 - langage: wasm/assemblyscript - entités: -Gravatar - Transaction + address: '0x731a10897d267e19b34503ad902d0a29173ba4b1' + abi: Gravity + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Gravatar + - Transaction abis: - - nom: Gravité - fichier: ./abis/Gravity.json - Gestionnaires d'appels: - - fonction: createGravatar(string,string) - gestionnaire: handleCreateGravatar + - 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. @@ -761,15 +763,15 @@ La `fonction` est la signature de fonction normalisée permettant de filtrer les 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 -importer { CreateGravatarCall } depuis '../generated/Gravity/Gravity' -importer { Transaction } depuis '../generated/schema' - -fonction d'exportation handleCreateGravatar (appel : CreateGravatarCall) : void { - laissez id = call.transaction.hash - let transaction = nouvelle transaction (id) - transaction.displayName = call.inputs._displayName - transaction.imageUrl = call.inputs._imageUrl - transaction.save() +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() } ``` @@ -779,13 +781,13 @@ La fonction `handleCreateGravatar` prend un nouveau `CreateGravatarCall` qui est 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. -### Supported Filters +### Filtres pris en charge -#### Call Filter +#### Filtre d'appel ```yaml -filtre: - genre: appeler +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._ @@ -795,28 +797,28 @@ _Le gestionnaire défini sera appelé une fois pour chaque bloc contenant un app 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 -les sources de données: - - genre : ethereum/contrat - nom: Gravité - réseau : développeur - source: - adresse : '0x731a10897d267e19b34503ad902d0a29173ba4b1' - abi : Gravité - cartographie : - genre : ethereum/événements - Version api : 0.0.6 - langage : wasm/assemblyscript - entités : - -Gravatar - - Transaction - abis : - - nom : Gravité - fichier : ./abis/Gravity.json - gestionnaires de blocs : - - gestionnaire : handleBlock - - gestionnaire : handleBlockWithCallToContract - filtre: - genre : appele +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 @@ -835,7 +837,7 @@ blockHandlers: 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. -#### Once Filter +#### Le filtre Once > **Nécessite `specVersion` >= 0.0.8** @@ -848,13 +850,13 @@ blockHandlers: kind: once ``` -The defined handler with the once filter will be called only once before all other handlers run. This configuration allows the subgraph to use the handler as an initialization handler, performing specific tasks at the start of indexing. +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 -fonction d'exportation handleOnce (bloc : ethereum.Block) : void { - laissez data = new InitialData(Bytes.fromUTF8('initial')) - data.data = 'Configurer les données ici' - data.save() +export function handleOnce(block: ethereum.Block): void { + let data = new InitialData(Bytes.fromUTF8('initial')) + data.data = 'Setup data here' + data.save() } ``` @@ -863,12 +865,12 @@ fonction d'exportation handleOnce (bloc : ethereum.Block) : void { 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 -importer { ethereum } depuis '@graphprotocol/graph-ts' +import { ethereum } from '@graphprotocol/graph-ts' -fonction d'exportation handleBlock (bloc : ethereum.Block) : void { - laissez l'identifiant = block.hash - laisser l'entité = nouveau bloc (id) - entité.save() +export function handleBlock(block: ethereum.Block): void { + let id = block.hash + let entity = new Block(id) + entity.save() } ``` @@ -892,10 +894,10 @@ Un événement ne sera déclenché que lorsque la signature et le sujet 0 corres 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 -gestionnaires d'événements: - - événement: NewGravatar(uint256,adresse,chaîne,chaîne) - gestionnaire: handleNewGravatar - reçu: vrai +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. @@ -904,12 +906,12 @@ Dans la fonction de gestionnaire, le reçu est accessible dans le champ `Event.r À 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é | Name | -| --- | --- | -| [Erreurs non fatales](#non-fatal-errors) | `erreursnonfatales` | -| [Recherche en texte intégral](#defining-fulltext-search-fields) | `recherche en texte intégral` | -| [La greffe](#grafting-onto-existing-subgraphs) | `greffage` | -| [IPFS sur les contrats Ethereum](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | +| Fonctionnalité | Nom | +| --------------------------------------------------------------- | --------------------------------------------------- | +| [Erreurs non fatales](#non-fatal-errors) | `nonFatalErrors` | +| [Recherche en texte intégral](#defining-fulltext-search-fields) | `fullTextSearch` | +| [La greffe](#grafting-onto-existing-subgraphs) | `grafting` | +| [IPFS sur les contrats Ethereum](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` ou `nonDeterministicIpfs` | 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 : @@ -940,12 +942,16 @@ When running a local Graph Node, the `GRAPH_ALLOW_NON_DETERMINISTIC_IPFS` enviro 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. -> **Note:** The Graph Network does not yet support non-fatal errors, and developers should not deploy subgraphs using that functionality to the network via the Studio. +> **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 -l'activation des erreurs non fatales nécessite la définition de l'indicateur de fonctionnalité suivant sur le manifeste du subgraph ... +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 : @@ -963,20 +969,20 @@ _meta { 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 -"données": { - "foos": [ - { - "identifiant": "0xdead" - } - ], - "_meta": { - "hasIndexingErrors": vrai - } +"data": { + "foos": [ + { + "id": "0xdead" + } + ], + "_meta": { + "hasIndexingErrors": true + } }, -"les erreurs": [ - { - "message": "erreur_indexation" - } +"errors": [ + { + "message": "indexing_error" + } ] ``` @@ -990,9 +996,9 @@ Un subgraph est greffé sur un subgraph de base lorsque le manifeste du soubgrap ```yaml description: ... -greffer: - base: Qm... # ID de subgraph du subgraph de base - bloc: 7345624 # Numéro de bloc +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é. @@ -1002,26 +1008,26 @@ Lorsqu'un subgraph dont le manifeste contient un bloc `graft` est déployé, Gra 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 -- It removes attributes from entity types +- 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 -- It adds or removes interfaces +- 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. ## Sources de données de fichiers -File data sources are a new subgraph functionality for accessing off-chain data during indexing in a robust, extendable way. File data sources support fetching files from IPFS and from Arweave. +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. -> This also lays the groundwork for deterministic indexing of off-chain data, as well as the potential introduction of arbitrary HTTP-sourced data. +> 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 Plutôt que de récupérer les fichiers "en ligne" pendant l'exécution du gestionnaire, cela introduit des modèles qui peuvent être générés en tant que nouvelles sources de données pour un identifiant de fichier donné. Ces nouvelles sources de données récupèrent les fichiers, réessayent en cas d'échec et exécutent un gestionnaire dédié lorsque le fichier est trouvé. -This is similar to the [existing data source templates](https://thegraph.com/docs/en/developing/creating-a-subgraph/#data-source-templates), which are used to dynamically create new chain-based data sources. +Ceci est similaire aux [modèles de source de données existants](https://thegraph.com/docs/en/developing/creating-a-subgraph/#data-source-templates), qui sont utilisés pour créer dynamiquement de nouvelles sources de données basées sur une chaîne. > Cela remplace l'API `ipfs.cat` existante @@ -1033,46 +1039,46 @@ Les sources de données de fichiers nécessitent graph-ts >=0.29.0 et graph-cli #### Ajouter un nouveau type d'entité qui sera mis à jour lorsque des fichiers seront trouvés -File data sources cannot access or update chain-based entities, but must update file specific entities. +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 -tapez Jeton @entité { - je l'ai fait! - ID de jeton : BigInt ! - tokenURI : chaîne ! - externalURL : chaîne ! - ipfsURI : chaîne ! - image : Ficelle ! - nom : Chaîne ! - description : Ficelle ! - tapez : chaîne ! - updateAtTimestamp : BigInt - propriétaire : Utilisateur ! +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 -tapez Jeton @entité { - je l'ai fait! - ID de jeton : BigInt ! - tokenURI : chaîne ! - ipfsURI : TokenMetadata - updateAtTimestamp : BigInt - propriétaire : Chaîne ! +type Token @entity { + id: ID! + tokenID: BigInt! + tokenURI: String! + ipfsURI: TokenMetadata + updatedAtTimestamp: BigInt + owner: String! } -tapez TokenMetadata @entity { - je l'ai fait! - image : Ficelle ! - externalURL : chaîne ! - nom : Chaîne ! - description : Ficelle ! +type TokenMetadata @entity { + id: ID! + image: String! + externalURL: String! + name: String! + description: String! } ``` @@ -1085,36 +1091,36 @@ Si la relation est 1:1 entre l'entité parent et l'entité de source de données 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 -modèles: - - nom: TokenMetadata - genre: fichier/ipfs - cartographie: - Version api: 0.0.7 - langage: wasm/assemblyscript - fichier: ./src/mapping.ts - gestionnaire: handleMetadata - entités: - - TokenMétadonnées +templates: + - name: TokenMetadata + kind: file/ipfs + mapping: + apiVersion: 0.0.7 + language: wasm/assemblyscript + file: ./src/mapping.ts + handler: handleMetadata + entities: + - TokenMetadata abis: - - nom: Jeton - fichier: ./abis/Token.json + - 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. +La source de données du fichier doit spécifiquement mentionner tous les types d'entités avec lesquels elle interagira sous `entités`. Voir les [limitations](#Limitations) pour plus de détails. #### Créer un nouveau gestionnaire pour traiter les fichiers Ce gestionnaire doit accepter un paramètre `Bytes`, qui sera le contenu du fichier, lorsqu'il sera trouvé, qui pourra ensuite être traité. Il s'agira souvent d'un fichier JSON, qui peut être traité avec les assistants `graph-ts` ([documentation](https://thegraph.com/docs/en/developing/assemblyscript-api/#json -api)). -The CID of the file as a readable string can be accessed via the `dataSource` as follows: +Le CID du fichier sous forme de chaîne lisible est accessible via `dataSource` comme suit : ```typescript const cid = dataSource.stringParam() ``` -Example handler: +Exemple de gestionnaire : ```typescript import { json, Bytes, dataSource } from '@graphprotocol/graph-ts' @@ -1148,7 +1154,7 @@ Vous pouvez désormais créer des sources de données de fichiers lors de l'exé - 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 -For IPFS, Graph Node supports [v0 and v1 content identifiers](https://docs.ipfs.tech/concepts/content-addressing/), and content identifers with directories (e.g. `bafyreighykzv2we26wfrbzkcdw37sbrby4upq7ae3aqobbq7i4er3tnxci/metadata.json`). +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`). Pour Arweave, à partir de la version 0.33.0, Graph Node peut récupérer des fichiers stockés sur Arweave en fonction de leur [transaction ID](https://docs.arweave.org/developers/server/http-api#transactions) à partir d'une passerelle Arweave ([fichier exemple](https://bdxujjl5ev5eerd5ouhhs6o4kjrs4g6hqstzlci5pf6vhxezkgaa.arweave.net/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA)). Arweave prend en charge les transactions téléchargées via Bundlr, et Graph Node peut également récupérer des fichiers sur la base des [manifestes Bundlr](https://docs.bundlr.network/learn/gateways#indexing). @@ -1160,7 +1166,7 @@ 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 { +export function handleTransfer(event : TransferEvent) : void { let token = Token.load(event.params.tokenId.toString()) if (!token) { token = new Token(event.params.tokenId.toString()) @@ -1189,7 +1195,7 @@ Cet exemple utilise le CID comme recherche entre l'entité `Token` parent et l'e Félicitations, vous utilisez des sources de données de fichiers ! -#### Deploying your subgraphs +#### 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. @@ -1205,7 +1211,7 @@ Les entités et les gestionnaires de sources de données de fichiers sont isolé 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. -#### Best practices +#### 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. From ac28742656f8892f79759551c4c6bbe33c65bc1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:04 -0400 Subject: [PATCH 115/924] New translations creating-a-subgraph.mdx (Spanish) --- .../es/developing/creating-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/es/developing/creating-a-subgraph.mdx b/website/pages/es/developing/creating-a-subgraph.mdx index 887345ba27a4..6cf6502bd6e0 100644 --- a/website/pages/es/developing/creating-a-subgraph.mdx +++ b/website/pages/es/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Para algunos tipos de entidad, el `id` se construye a partir de los id de otras Admitimos los siguientes escalares en nuestra API GraphQL: -| Tipo | Descripción | -| --- | --- | -| `Bytes` | Byte array, representado como un string hexadecimal. Comúnmente utilizado para los hashes y direcciones de Ethereum. | -| `String` | Escalar para valores `string`. Los caracteres nulos no son compatibles y se eliminan automáticamente. | -| `Boolean` | Escalar para valores `boolean`. | -| `Int` | La especificación GraphQL define `Int` con un tamaño de 32 bytes. | -| `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` | Números enteros grandes. Se utiliza para los tipos `uint32`, `int64`, `uint64`, ..., `uint256` de Ethereum. Nota: Todo por debajo de `uint32`, como `int32`, `uint24` o `int8` se representa como `i32`. | -| `BigDecimal` | `BigDecimal` Decimales de alta precisión representados como un signo y un exponente. El rango de exponentes va de -6143 a +6144. Redondeado a 34 dígitos significativos. | +| Tipo | Descripción | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, representado como un string hexadecimal. Comúnmente utilizado para los hashes y direcciones de Ethereum. | +| `String` | Escalar para valores `string`. Los caracteres nulos no son compatibles y se eliminan automáticamente. | +| `Boolean` | Escalar para valores `boolean`. | +| `Int` | La especificación GraphQL define `Int` con un tamaño de 32 bytes. | +| `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` | Números enteros grandes. Se utiliza para los tipos `uint32`, `int64`, `uint64`, ..., `uint256` de Ethereum. Nota: Todo por debajo de `uint32`, como `int32`, `uint24` o `int8` se representa como `i32`. | +| `BigDecimal` | `BigDecimal` Decimales de alta precisión representados como un signo y un exponente. El rango de exponentes va de -6143 a +6144. Redondeado a 34 dígitos significativos. | #### Enums @@ -481,10 +481,10 @@ Diccionarios de idiomas admitidos: Algoritmos admitidos para ordenar los resultados: -| Algoritmos | Descripción | -| --- | --- | -| rango | Usa la calidad de coincidencia (0-1) de la consulta de texto completo para ordenar los resultados. | -| rango de proximidad | Similar al rango, pero también incluye la proximidad de los matches. | +| Algoritmos | Descripción | +| ------------------- | -------------------------------------------------------------------------------------------------- | +| rango | Usa la calidad de coincidencia (0-1) de la consulta de texto completo para ordenar los resultados. | +| rango de proximidad | Similar al rango, pero también incluye la proximidad de los matches. | ## Escribir Mappings @@ -531,7 +531,7 @@ Cada entidad tiene que tener un `id` que es único entre todas las entidades del - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -Proporcionamos la [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) que contiene utilidades para interactuar con el depósito Graph Node y conveniencias para manejar datos y entidades de contratos inteligentes. Puedes usar esta librería en tus mappings importando `@graphprotocol/graph-ts` en `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## Generación de código @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Un nuevo origen de datos sólo procesará las llamadas y los eventos del bloque en el que fue creado y todos los bloques siguientes, pero no procesará los datos históricos, es decir, los datos que están contenidos en bloques anteriores. -> +> > Si los bloques anteriores contienen datos relevantes para la nueva fuente de datos, lo mejor es indexar esos datos leyendo el estado actual del contrato y creando entidades que representen ese estado en el momento de crear la nueva fuente de datos. ### Contexto de la fuente de datos @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** El bloque de creación del contrato se puede buscar rápidamente en Etherscan: -> +> > 1. Busca el contrato introduciendo su dirección en la barra de búsqueda. > 2. Haz clic en el hash de la transacción de creación en la sección `Contract Creator`. > 3. Carga la página de detalles de la transacción, donde encontrarás el bloque inicial de ese contrato. From d7b6c51f9604f530cdef3599b834f3007b2be742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:05 -0400 Subject: [PATCH 116/924] New translations creating-a-subgraph.mdx (Arabic) --- .../ar/developing/creating-a-subgraph.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/ar/developing/creating-a-subgraph.mdx b/website/pages/ar/developing/creating-a-subgraph.mdx index 464e74166db3..b74a65ae3e64 100644 --- a/website/pages/ar/developing/creating-a-subgraph.mdx +++ b/website/pages/ar/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| النوع | الوصف | -| --- | --- | -| `Bytes` | مصفوفة Byte ، ممثلة كسلسلة سداسية عشرية. يشيع استخدامها في Ethereum hashes وعناوينه. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| النوع | الوصف | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | مصفوفة Byte ، ممثلة كسلسلة سداسية عشرية. يشيع استخدامها في Ethereum hashes وعناوينه. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -531,7 +531,7 @@ Every entity has to have an `id` that is unique among all entities of the same t - `()event.transaction.from.toHex` - `()event.transaction.hash.toHex() + "-" + event.logIndex.toString` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## توليد الكود @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **ملاحظة:** مصدر البيانات الجديد سيعالج فقط الاستدعاءات والأحداث للكتلة التي تم إنشاؤها فيه وجميع الكتل التالية ، ولكنه لن يعالج البيانات التاريخية ، أي البيانات الموجودة في الكتل السابقة. -> +> > إذا كانت الكتل السابقة تحتوي على بيانات ذات صلة بمصدر البيانات الجديد ، فمن الأفضل فهرسة تلك البيانات من خلال قراءة الحالة الحالية للعقد وإنشاء كيانات تمثل تلك الحالة في وقت إنشاء مصدر البيانات الجديد. ### سياق مصدر البيانات @@ -716,7 +716,7 @@ dataSources: ``` > **ملاحظة:** يمكن البحث عن كتلة إنشاء العقد بسرعة على Etherscan: -> +> > 1. ابحث عن العقد بإدخال عنوانه في شريط البحث. > 2. انقر فوق hash إجراء الإنشاء في قسم `Contract Creator`. > 3. قم بتحميل صفحة تفاصيل الإجراء(transaction) حيث ستجد كتلة البدء لذلك العقد. From c29d74e626e046a87ad72de3cbe8369c0462c89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:07 -0400 Subject: [PATCH 117/924] New translations creating-a-subgraph.mdx (Czech) --- .../cs/developing/creating-a-subgraph.mdx | 446 +++++++++--------- 1 file changed, 223 insertions(+), 223 deletions(-) diff --git a/website/pages/cs/developing/creating-a-subgraph.mdx b/website/pages/cs/developing/creating-a-subgraph.mdx index ace69dd1ac7d..dd60bb2cc10d 100644 --- a/website/pages/cs/developing/creating-a-subgraph.mdx +++ b/website/pages/cs/developing/creating-a-subgraph.mdx @@ -1,46 +1,46 @@ --- -title: Creating a Subgraph +title: Vytvoření podgraf --- -A subgraph extracts data from a blockchain, processing it and storing it so that it can be easily queried via GraphQL. +Podgraf získává data z blockchain, zpracovává je a ukládá tak, aby se na ně dalo snadno dotazovat prostřednictvím jazyka GraphQL. -![Defining a Subgraph](/img/defining-a-subgraph.png) +![Definování podgrafu](/img/defining-a-subgraph.png) -The subgraph definition consists of a few files: +Definice podgraf se skládá z několika souborů: -- `subgraph.yaml`: a YAML file containing the subgraph manifest +- `subgraph.yaml`: soubor YAML obsahující manifest podgraf -- `schema.graphql`: a GraphQL schema that defines what data is stored for your subgraph, and how to query it via GraphQL +- `schema.graphql`: schéma GraphQL, které definuje, jaká data jsou uložena pro váš podgraf a jak se na ně dotazovat prostřednictvím jazyka 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) +- `Mapování skriptů sestavy`: [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) kód, který převádí data událostí na entity definované ve vašem schématu (např. `mapping.ts` v tomto tutoriálu) -> 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). +> Abyste mohli svůj podgraf používat v decentralizované síti The Graph, musíte si [vytvořit klíč API](/deploying/subgraph-studio-faqs/#2-how-do-i-create-an-api-key). Doporučujeme, abyste [přidali signál](/network/curating/#how-to-signal) do svého podgraf s minimálně [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. +Než se podrobněji seznámíte s obsahem souboru manifest, je třeba nainstalovat [Graph CLI](https://github.com/graphprotocol/graph-cli), které budete potřebovat k sestavení a nasazení podgraf. -## Install the Graph CLI +## Instalace Graf 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. +Graf CLI je napsáno v jazyce JavaScript a k jeho použití je třeba nainstalovat buď `yarn`, nebo `npm`; v následujícím se předpokládá, že máte yarn. Once you have `yarn`, install the Graph CLI by running -**Install with yarn:** +**Instalace pomocí yarn:** ```bash yarn global add @graphprotocol/graph-cli ``` -**Install with npm:** +**Instalace pomocí 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. +Po instalaci lze příkazem `graph init` nastavit nový projekt podgraf, a to buď z existující smlouvy, nebo z příkladu podgraf. Tento příkaz lze použít k vytvoření subgrafu v podgraf Studio předáním příkazu `graph init --product subgraph-studio`. Pokud již máte inteligentní kontrakt nasazený v preferované síti, může být zavedení nového podgraf z tohoto kontraktu dobrým způsobem, jak začít. -## From An Existing Contract +## Ze stávající smlouvy -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. +Následující příkaz vytvoří podgraf, který indexuje všechny události existující smlouvy. Pokusí se načíst ABI smlouvy z Etherscan a vrátí se k požadavku na cestu k místnímu souboru. Pokud některý z nepovinných argumentů chybí, projde příkaz interaktivním formulářem. ```sh graph init \ @@ -51,49 +51,49 @@ graph init \ [] ``` -The `` is the ID of your subgraph in Subgraph Studio, it can be found on your subgraph details page. +`` je ID vašeho podgraf ve Studio podgraph, najdete ho na stránce s podrobnostmi o podgrafu. -## From An Example Subgraph +## Z příkladu podgraf -The second mode `graph init` supports is creating a new project from an example subgraph. The following command does this: +Druhý režim `graf init` podporuje vytvoření nového projektu z příkladového podgraf. To provede následující příkaz: ```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. +Ukázkový podgraf je založen na smlouvě Gravity od Daniho Granta, která spravuje uživatelské avatary a vysílá události `NewGravatar` nebo `UpdateGravatar`, kdykoli jsou avatary vytvořeny nebo aktualizovány. Podgraf tyto události zpracovává tak, že zapisuje entity `Gravatar` do úložiště Graf Uzel a zajišťuje jejich aktualizaci podle událostí. V následujících částech budou rozebrány soubory, které tvoří manifest podgrafu pro tento příklad. -## Add New dataSources To An Existing Subgraph +## Přidání nových zdrojů dat do existujícího podgraf -Since `v0.31.0` the `graph-cli` supports adding new dataSources to an existing subgraph through the `graph add` command. +Od verze `v0.31.0` podporuje `graf-cli` přidávání nových zdrojů dat do existujícího podgrafu pomocí příkazu `graf add`. ```sh graph add

[] -Options: +Možnosti: - --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") + --abi Cesta k ABI smlouvy (výchozí: stažení z Etherscan) + --contract-name Název kontraktu (výchozí: Contract) + --merge-entities Zda sloučit entity se stejným názvem (výchozí: false) + --network-file Cesta ke konfiguračnímu souboru sítě (výchozí: "./networks.json") ``` -The `add` command will fetch the ABI from Etherscan (unless an ABI path is specified with the `--abi` option), and will create a new `dataSource` in the same way that `graph init` command creates a `dataSource` `--from-contract`, updating the schema and mappings accordingly. +Příkaz `add` načte ABI z Etherscan (pokud není zadána cesta k ABI pomocí volby `--abi`) a vytvoří nový `dataSource` stejným způsobem jako příkaz `graph init` vytvoří `dataSource` `--from-contract`, přičemž odpovídajícím způsobem aktualizuje schéma a mapování. -The `--merge-entities` option identifies how the developer would like to handle `entity` and `event` name conflicts: +Volba `--merge-entities` určuje, jak chce vývojář řešit konflikty názvů `entity` a `event`: -- If `true`: the new `dataSource` should use existing `eventHandlers` & `entities`. -- If `false`: a new entity & event handler should be created with `${dataSourceName}{EventName}`. +- Pokud `true`: nový `dataSource` by měl používat stávající `eventHandlers` & `entity`. +- Pokud `false`: měla by být vytvořena nová entita & obsluha události s `${dataSourceName}{EventName}`. -The contract `address` will be written to the `networks.json` for the relevant network. +Smlouva `adresa` bude zapsána do souboru `networks.json` pro příslušnou síť. -> **Note:** When using the interactive cli, after successfully running `graph init`, you'll be prompted to add a new `dataSource`. +> **Poznámka:** Při použití interaktivního klienta budete po úspěšném spuštění `graf init` vyzváni k přidání nového `dataSource`. -## The Subgraph Manifest +## Manifest podgrafu -The subgraph manifest `subgraph.yaml` defines the smart contracts your subgraph indexes, which events from these contracts to pay attention to, and how to map event data to entities that Graph Node stores and allows to query. The full specification for subgraph manifests can be found [here](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md). +Manifest podgrafu `subgraph.yaml` definuje inteligentní smlouvy, které váš podgraf indexuje, kterým událostem z těchto smluv má věnovat pozornost a jak mapovat data událostí na entity, které Graf uzel ukládá a umožňuje dotazovat. Úplnou specifikaci manifestů podgrafu naleznete [zde](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md). -For the example subgraph, `subgraph.yaml` is: +Pro příklad podgraf `subgraph.yaml` je: ```yaml specVersion: 0.0.4 @@ -142,63 +142,63 @@ dataSources: file: ./src/mapping.ts ``` -The important entries to update for the manifest are: +Důležité položky, které je třeba v manifestu aktualizovat, jsou: -- `description`: a human-readable description of what the subgraph is. This description is displayed by the Graph Explorer when the subgraph is deployed to the hosted service. +- `popis`: lidsky čitelný popis toho, co je podgraf. Tento popis zobrazí Průzkumník grafů při nasazení podgrafu do hostované služby. -- `repository`: the URL of the repository where the subgraph manifest can be found. This is also displayed by The Graph Explorer. +- `úložiště`: adresa URL úložiště, kde lze manifest podgrafů nalézt. Tento údaj zobrazuje také Průzkumník graf. -- `features`: a list of all used [feature](#experimental-features) names. +- `features`: seznam všech použitých názvů [feature](#experimental-features). -- `dataSources.source`: the address of the smart contract the subgraph sources, and the ABI of the smart contract to use. The address is optional; omitting it allows to index matching events from all contracts. +- `dataSources.source`: adresa inteligentní smlouvy, ze které podgraf pochází, a ABI inteligentní smlouvy, která se má použít. Adresa je nepovinná; její vynechání umožňuje indexovat odpovídající události ze všech smluv. -- `dataSources.source.startBlock`: the optional number of the block that the data source starts indexing from. In most cases, we suggest using the block in which the contract was created. +- `dataSources.source.startBlock`: nepovinné číslo bloku, od kterého zdroj dat začíná indexovat. Ve většině případů doporučujeme použít blok, ve kterém byl kontrakt vytvořen. -- `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.source.endBlock`: Nepovinné číslo bloku, ve kterém zdroj dat přestane indexovat, včetně tohoto bloku. Minimální požadovaná verze specifikace: `0.0.9`. -- `dataSources.context`: key-value pairs that can be used within subgraph mappings. Supports various data types like `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, and `BigInt`. Each variable needs to specify its `type` and `data`. These context variables are then accessible in the mapping files, offering more configurable options for subgraph development. +- `dataSources.context`: páry klíč-hodnota, které lze použít v rámci mapování podgrafů. Podporuje různé datové typy, například `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List` a `BigInt`. U každé proměnné je třeba uvést její `typ` a `údaj`. Tyto kontextové proměnné jsou pak přístupné v mapovacích souborech a nabízejí více konfigurovatelných možností pro vývoj podgrafů. -- `dataSources.mapping.entities`: the entities that the data source writes to the store. The schema for each entity is defined in the schema.graphql file. +- `dataSources.mapping.entities`: entity, které zdroj dat zapisuje do úložiště. Schéma pro každou entita je definováno v souboru schema.graphql. -- `dataSources.mapping.abis`: one or more named ABI files for the source contract as well as any other smart contracts that you interact with from within the mappings. +- `dataSources.mapping.abis`: jeden nebo více pojmenovaných souborů ABI pro zdrojový kontrakt a všechny ostatní chytré kontrakty, se kterými se pracuje v rámci mapování. -- `dataSources.mapping.eventHandlers`: lists the smart contract events this subgraph reacts to and the handlers in the mapping—./src/mapping.ts in the example—that transform these events into entities in the store. +- `dataSources.mapping.eventHandlers`: uvádí seznam událostí inteligentních smluv, na které tento podgraf reaguje, a obslužných programů v mapování - v příkladu./src/mapping.ts - které tyto události transformují na entity v úložišti. -- `dataSources.mapping.callHandlers`: lists the smart contract functions this subgraph reacts to and handlers in the mapping that transform the inputs and outputs to function calls into entities in the store. +- `dataSources.mapping.callHandlers`: obsahuje seznam funkcí inteligentních smluv, na které tento podgraf reaguje, a obsluhovače v mapování, které transformují vstupy a výstupy volání funkcí na entity v úložišti. - `dataSources.mapping.blockHandlers`: lists the blocks this subgraph reacts to and handlers in the mapping to run when a block is appended to the chain. Without a filter, the block handler will be run every block. An optional call-filter can be provided by adding a `filter` field with `kind: call` to the handler. This will only run the handler if the block contains at least one call to the data source contract. -A single subgraph can index data from multiple smart contracts. Add an entry for each contract from which data needs to be indexed to the `dataSources` array. +Jeden subgraf může indexovat data z více inteligentní smluv. Do pole `dataSources` přidejte položku pro každou smlouvu, ze které je třeba indexovat data. -The triggers for a data source within a block are ordered using the following process: +Spouštěče pro zdroj dat v rámci bloku jsou seřazeny podle následujícího postupu: -1. Event and call triggers are first ordered by transaction index within the block. -2. Event and call triggers within the same transaction are ordered using a convention: event triggers first then call triggers, each type respecting the order they are defined in the manifest. -3. Block triggers are run after event and call triggers, in the order they are defined in the manifest. +1. Spouštěče událostí a volání jsou nejprve seřazeny podle indexu transakce v rámci bloku. +2. Spouštěče událostí a volání v rámci jedné transakce jsou seřazeny podle konvence: nejprve spouštěče událostí a poté spouštěče volání, přičemž každý typ dodržuje pořadí, v jakém jsou definovány v manifestu. +3. Spouštěče bloků jsou spuštěny po spouštěčích událostí a volání, v pořadí, v jakém jsou definovány v manifestu. -These ordering rules are subject to change. +Tato pravidla objednávání se mohou změnit. -### Getting The ABIs +### Získání ABI -The ABI file(s) must match your contract(s). There are a few ways to obtain ABI files: +Soubor(y) ABI se musí shodovat s vaší smlouvou. Soubory ABI lze získat několika způsoby: -- If you are building your own project, you will likely have access to your most current ABIs. -- If you are building a subgraph for a public project, you can download that project to your computer and get the ABI by using [`truffle compile`](https://truffleframework.com/docs/truffle/overview) or using solc to compile. -- You can also find the ABI on [Etherscan](https://etherscan.io/), but this isn't always reliable, as the ABI that is uploaded there may be out of date. Make sure you have the right ABI, otherwise running your subgraph will fail. +- Pokud vytváříte vlastní projekt, budete mít pravděpodobně přístup k nejaktuálnějším ABI. +- Pokud vytváříte podgraf pro veřejný projekt, můžete si tento projekt stáhnout do počítače a získat ABI pomocí [`truffle compile`](https://truffleframework.com/docs/truffle/overview) nebo pomocí solc pro kompilaci. +- ABI můžete také najít na stránce [Etherscan](https://etherscan.io/), ale ta není vždy spolehlivá, protože ABI, které je tam nahráno, může být zastaralé. Ujistěte se, že máte správné ABI, jinak spuštění podgrafu selže. -## The GraphQL Schema +## Schéma GraphQL -The schema for your subgraph is in the file `schema.graphql`. GraphQL schemas are defined using the GraphQL interface definition language. If you've never written a GraphQL schema, it is recommended that you check out this primer on the GraphQL type system. Reference documentation for GraphQL schemas can be found in the [GraphQL API](/querying/graphql-api) section. +Schéma vašeho podgrafu je v souboru `schema.graphql`. Schémata GraphQL se definují pomocí jazyka pro definici rozhraní GraphQL. Pokud jste ještě nikdy schéma GraphQL nepsali, doporučujeme vám přečíst si tento úvodní článek o systému typů GraphQL. Referenční dokumentaci ke schématům GraphQL naleznete v části [GraphQL API](/querying/graphql-api). -## Defining Entities +## Definice entit -Before defining entities, it is important to take a step back and think about how your data is structured and linked. All queries will be made against the data model defined in the subgraph schema and the entities indexed by the subgraph. Because of this, it is good to define the subgraph schema in a way that matches the needs of your dapp. It may be useful to imagine entities as "objects containing data", rather than as events or functions. +Před definováním entit je důležité udělat krok zpět a zamyslet se nad tím, jak jsou vaše data strukturována a propojena. Všechny dotazy budou prováděny proti datovému modelu definovanému ve schématu podgrafu a entitám indexovaným podgrafem. Z tohoto důvodu je dobré definovat schéma podgrafu způsobem, který odpovídá potřebám vaší dapp. Může být užitečné představit si entity spíše jako "objekty obsahující data" než jako události nebo funkce. -With The Graph, you simply define entity types in `schema.graphql`, and Graph Node will generate top level fields for querying single instances and collections of that entity type. Each type that should be an entity is required to be annotated with an `@entity` directive. By default, entities are mutable, meaning that mappings can load existing entities, modify them and store a new version of that entity. Mutability comes at a price, and for entity types for which it is known that they will never be modified, for example, because they simply contain data extracted verbatim from the chain, it is recommended to mark them as immutable with `@entity(immutable: true)`. Mappings can make changes to immutable entities as long as those changes happen in the same block in which the entity was created. Immutable entities are much faster to write and to query, and should therefore be used whenever possible. +V nástroji The Graf stačí definovat typy entit v `schema.graphql` a Graf Uzel vygeneruje pole nejvyšší úrovně pro dotazování jednotlivých instancí a kolekcí daného typu entit. Každý typ, který má být entitou, je nutné anotovat direktivou `@entity`. Ve výchozím nastavení jsou entity mutovatelné, což znamená, že mapování může načíst existující entity, upravit je a uložit novou verzi dané entity. Mutabilita má svou cenu a u typů entit, u nichž je známo, že nebudou nikdy modifikovány, například proto, že jednoduše obsahují data doslovně extrahovaná z řetězce, se doporučuje označit je jako neměnné pomocí `@entity(immutable: true)`. Mapování může provádět změny v neměnných entitách, pokud k nim dojde ve stejném bloku, ve kterém byla entita vytvořena. Neměnné entity se mnohem rychleji zapisují a dotazují, a proto by se měly používat, kdykoli je to možné. -### Good Example +### Dobrý příklad -The `Gravatar` entity below is structured around a Gravatar object and is a good example of how an entity could be defined. +Níže uvedená entita `Gravatar` je strukturována kolem objektu Gravatar a je dobrým příkladem toho, jak lze entitu definovat. ```graphql type Gravatar @entity(immutable: true) { @@ -210,9 +210,9 @@ type Gravatar @entity(immutable: true) { } ``` -### Bad Example +### Špatný příklad -The example `GravatarAccepted` and `GravatarDeclined` entities below are based around events. It is not recommended to map events or function calls to entities 1:1. +Níže uvedené příklady entit `GravatarAccepted` a `GravatarDeclined` jsou založeny na událostech. Nedoporučuje se mapovat události nebo volání funkcí na entity 1:1. ```graphql type GravatarAccepted @entity { @@ -230,37 +230,37 @@ type GravatarDeclined @entity { } ``` -### Optional and Required Fields +### Nepovinná a povinná pole -Entity fields can be defined as required or optional. Required fields are indicated by the `!` in the schema. If a required field is not set in the mapping, you will receive this error when querying the field: +Pole entit lze definovat jako povinná nebo nepovinná. Povinná pole jsou ve schématu označena `!`. Pokud není povinné pole v mapování nastaveno, zobrazí se při dotazu na toto pole tato chyba: ``` -Null value resolved for non-null field 'name' +Vyřešení nulové hodnoty pro pole 'name', které není nulové ``` -Each entity must have an `id` field, which must be of type `Bytes!` or `String!`. It is generally recommended to use `Bytes!`, unless the `id` contains human-readable text, since entities with `Bytes!` id's will be faster to write and query as those with a `String!` `id`. The `id` field serves as the primary key, and needs to be unique among all entities of the same type. For historical reasons, the type `ID!` is also accepted and is a synonym for `String!`. +Každá entita musí mít pole `id`, které musí být typu `Bajty!` nebo `Řetězec!`. Obecně se doporučuje používat `Bytes!`, pokud `id` neobsahuje lidsky čitelný text, protože entity s `Bytes!` id se zapisují a dotazují rychleji než entity s `String!` `id`. Pole `id` slouží jako primární klíč a musí být jedinečné mezi všemi entitami stejného typu. Z historických důvodů je akceptován také typ `ID!`, který je synonymem pro `String!`. -For some entity types the `id` is constructed from the id's of two other entities; that is possible using `concat`, e.g., `let id = left.id.concat(right.id)` to form the id from the id's of `left` and `right`. Similarly, to construct an id from the id of an existing entity and a counter `count`, `let id = left.id.concatI32(count)` can be used. The concatenation is guaranteed to produce unique id's as long as the length of `left` is the same for all such entities, for example, because `left.id` is an `Address`. +U některých typů entit je `id` vytvořeno z id dvou jiných entit; to je možné pomocí `concat`, např. `let id = left.id.concat(right.id)` pro vytvoření id z id `left` a `right`. Podobně lze použít `let id = left.id.concatI32(count)` pro vytvoření id z id existující entity a čítače `count`. Konkatenace zaručeně vytvoří jedinečné id, pokud je délka `left` pro všechny takové entity stejná, například proto, že `left.id` je `Adresa`. -### Built-In Scalar Types +### Vestavěné typy skalárů -#### GraphQL Supported Scalars +#### Podporované skaláry GraphQL -We support the following scalars in our GraphQL API: +V našem GraphQL API podporujeme následující skaláry: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Typ | Popis | +| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bajtů` | Pole bajtů reprezentované jako hexadecimální řetězec. Běžně se používá pro hashe a adresy Ethereum. | +| `Řetězec` | Skalár pro hodnoty `řetězce`. Nulové znaky nejsou podporovány a jsou automaticky odstraněny. | +| `Boolean` | Skalár pro hodnoty `boolean`. | +| `Int` | Specifikace GraphQL definuje `Int` na velikost 32 bajtů. | +| `Int8` | Celé číslo se znaménkem o velikosti 8 bajtů, známé také jako 64bitové celé číslo se znaménkem, může uchovávat hodnoty v rozsahu od -9 223 372 036 854 775 808 do 9 223 372 036 854 775 807. Přednostně se používá k reprezentaci `i64` z ethereum. | +| `BigInt` | Velká celá čísla. Používá se pro typy `uint32`, `int64`, `uint64`, ..., `uint256` společnosti Ethereum. Poznámka: Vše pod `uint32`, jako například `int32`, `uint24` nebo `int8`, je reprezentováno jako `i32`. | +| `BigDecimal` | `BigDecimal` Desetinná čísla s vysokou přesností reprezentovaná jako signifikand a exponent. Rozsah exponentu je od -6143 do +6144. Zaokrouhleno na 34 významných číslic. | #### Enums -You can also create enums within a schema. Enums have the following syntax: +Výčty můžete vytvářet také v rámci schématu. Syntaxe enumů je následující: ```graphql enum TokenStatus { @@ -270,19 +270,19 @@ enum TokenStatus { } ``` -Once the enum is defined in the schema, you can use the string representation of the enum value to set an enum field on an entity. For example, you can set the `tokenStatus` to `SecondOwner` by first defining your entity and subsequently setting the field with `entity.tokenStatus = "SecondOwner"`. The example below demonstrates what the Token entity would look like with an enum field: +Jakmile je enum definován ve schématu, můžete použít řetězcovou reprezentaci hodnoty výčtu k nastavení pole výčtu u entity. Například můžete nastavit `tokenStatus` na `SecondOwner` tak, že nejprve definujete svou entitu a následně nastavíte pole pomocí `entity.tokenStatus = "SecondOwner"`. Níže uvedený příklad ukazuje, jak by vypadala entita Token s výčtovým polem: -More detail on writing enums can be found in the [GraphQL documentation](https://graphql.org/learn/schema/). +Podrobnější informace o zápisu enum najdete v dokumentaci [GraphQL](https://graphql.org/learn/schema/). -#### Entity Relationships +#### Vztahy entit -An entity may have a relationship to one or more other entities in your schema. These relationships may be traversed in your queries. Relationships in The Graph are unidirectional. It is possible to simulate bidirectional relationships by defining a unidirectional relationship on either "end" of the relationship. +Entita může mít vztah k jedné nebo více jiným entitám ve vašem schématu. Tyto vztahy lze procházet v dotazech. Vztahy v Graf jsou jednosměrné. Obousměrné vztahy je možné simulovat definováním jednosměrného vztahu na obou "koncích" vztahu. -Relationships are defined on entities just like any other field except that the type specified is that of another entity. +Vztahy se definují u entit stejně jako u jiných polí s tím rozdílem, že zadaný typ je typ jiné entity. -#### One-To-One Relationships +#### Vztahy jeden na jednoho -Define a `Transaction` entity type with an optional one-to-one relationship with a `TransactionReceipt` entity type: +Definujte typ entity `Transaction` s volitelným vztahem jedna ku jedné s typemem entity `TransactionReceipt`: ```graphql type Transaction @entity(immutable: true) { @@ -296,9 +296,9 @@ type TransactionReceipt @entity(immutable: true) { } ``` -#### One-To-Many Relationships +#### Vztahy jeden k mnoha -Define a `TokenBalance` entity type with a required one-to-many relationship with a Token entity type: +Definujte typ entity `TokenBalance` s požadovaným vztahem one-to-many s typem entity Token: ```graphql type Token @entity(immutable: true) { @@ -312,15 +312,15 @@ type TokenBalance @entity { } ``` -#### Reverse Lookups +#### Zpětné vyhledávání -Reverse lookups can be defined on an entity through the `@derivedFrom` field. This creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. Rather, it is derived from the relationship defined on the other entity. For such relationships, it rarely makes sense to store both sides of the relationship, and both indexing and query performance will be better when only one side is stored and the other is derived. +Reverzní vyhledávání lze u entity definovat prostřednictvím pole `@derivedFrom`. Tím se na entitě vytvoří virtuální pole, na které se lze dotazovat, ale které nelze nastavit ručně prostřednictvím API mapování. Spíše je odvozeno ze vztahu definovaného na jiné entitě. U takových vztahů má zřídkakdy smysl ukládat obě strany vztahu a indexace i výkonnost dotazů budou lepší, když bude uložena pouze jedna strana a druhá bude odvozená. -For one-to-many relationships, the relationship should always be stored on the 'one' side, and the 'many' side should always be derived. Storing the relationship this way, rather than storing an array of entities on the 'many' side, will result in dramatically better performance for both indexing and querying the subgraph. In general, storing arrays of entities should be avoided as much as is practical. +U vztahů typu "jeden k mnoha" by měl být vztah vždy uložen na straně "jeden" a strana "mnoho" by měla být vždy odvozena. Uložení vztahu tímto způsobem namísto uložení pole entit na straně "mnoho" povede k výrazně lepšímu výkonu jak při indexování, tak při dotazování na podgraf. Obecně platí, že ukládání polí entit je třeba se vyhnout, pokud je to praktické. -#### Example +#### Příklad -We can make the balances for a token accessible from the token by deriving a `tokenBalances` field: +Zůstatky token můžeme zpřístupnit z token odvozením pole `tokenBalances`: ```graphql type Token @entity(immutable: true) { @@ -335,13 +335,13 @@ type TokenBalance @entity { } ``` -#### Many-To-Many Relationships +#### Vztahy mnoho k mnoha -For many-to-many relationships, such as users that each may belong to any number of organizations, the most straightforward, but generally not the most performant, way to model the relationship is as an array in each of the two entities involved. If the relationship is symmetric, only one side of the relationship needs to be stored and the other side can be derived. +Pro vztahy mnoho-více, jako jsou uživatelé, z nichž každý může patřit do libovolného počtu organizací, je nejjednodušší, ale obecně ne nejvýkonnější, modelovat vztah jako pole v každé z obou zúčastněných entit. Pokud je vztah symetrický, je třeba uložit pouze jednu stranu vztahu a druhou stranu lze odvodit. -#### Example +#### Příklad -Define a reverse lookup from a `User` entity type to an `Organization` entity type. In the example below, this is achieved by looking up the `members` attribute from within the `Organization` entity. In queries, the `organizations` field on `User` will be resolved by finding all `Organization` entities that include the user's ID. +Definujte zpětné vyhledávání z typu entity `User` na typ entity `Organization`. V příkladu níže je toho dosaženo vyhledáním atributu `members` z entity `Organization`. V dotazech bude pole `organizations` na `User` vyřešeno vyhledáním všech entit `Organization`, které obsahují ID uživatele. ```graphql type Organization @entity { @@ -357,7 +357,7 @@ type User @entity { } ``` -A more performant way to store this relationship is through a mapping table that has one entry for each `User` / `Organization` pair with a schema like +Výkonnějším způsobem uložení tohoto vztahu je mapovací tabulka, která má pro každou dvojici `Uživatel` / `Organizace` jeden záznam se schématem, jako je např ```graphql type Organization @entity { @@ -379,7 +379,7 @@ type UserOrganization @entity { } ``` -This approach requires that queries descend into one additional level to retrieve, for example, the organizations for users: +Tento přístup vyžaduje, aby dotazy sestupovaly do další úrovně, aby bylo možné získat například organizace pro uživatele: ```graphql query usersWithOrganizations { @@ -394,11 +394,11 @@ query usersWithOrganizations { } ``` -This more elaborate way of storing many-to-many relationships will result in less data stored for the subgraph, and therefore to a subgraph that is often dramatically faster to index and to query. +Tento propracovanější způsob ukládání vztahů mnoho-více vede k menšímu množství dat uložených pro podgraf, a tedy k podgrafu, který je často výrazně rychlejší při indexování a dotazování. -#### Adding comments to the schema +#### Přidání komentářů do schématu -As per GraphQL spec, comments can be added above schema entity attributes using double quotations `""`. This is illustrated in the example below: +Podle specifikace GraphQL lze komentáře přidávat nad atributy entit schématu pomocí dvojitých uvozovek `""`. To je znázorněno v příkladu níže: ```graphql type MyFirstEntity @entity { @@ -408,13 +408,13 @@ type MyFirstEntity @entity { } ``` -## Defining Fulltext Search Fields +## Definování polí fulltextového vyhledávání -Fulltext search queries filter and rank entities based on a text search input. Fulltext queries are able to return matches for similar words by processing the query text input into stems before comparing them to the indexed text data. +Fulltextové vyhledávací dotazy filtrují a řadí entity na základě textového vyhledávacího vstupu. Fulltextové dotazy jsou schopny vracet shody podobných slov tím, že zpracovávají vstupní text dotazu do kmenů před jejich porovnáním s indexovanými textovými daty. -A fulltext query definition includes the query name, the language dictionary used to process the text fields, the ranking algorithm used to order the results, and the fields included in the search. Each fulltext query may span multiple fields, but all included fields must be from a single entity type. +Definice fulltextového dotazu obsahuje název dotazu, jazykový slovník použitý ke zpracování textových polí, algoritmus řazení použitý k seřazení výsledků a pole zahrnutá do vyhledávání. Každý fulltextový dotaz může zahrnovat více polí, ale všechna zahrnutá pole musí být z jednoho typu entity. -To add a fulltext query, include a `_Schema_` type with a fulltext directive in the GraphQL schema. +Chcete-li přidat fulltextový dotaz, zahrňte do schématu GraphQL typ `_Schema_` s direktivou fulltext. ```graphql type _Schema_ @@ -437,7 +437,7 @@ type Band @entity { } ``` -The example `bandSearch` field can be used in queries to filter `Band` entities based on the text documents in the `name`, `description`, and `bio` fields. Jump to [GraphQL API - Queries](/querying/graphql-api#queries) for a description of the fulltext search API and more example usage. +Příklad pole `bandSearch` lze použít v dotazech k filtrování entit `Band` na základě textových dokumentů v polích `name`, `description` a `bio`. Přejděte na [GraphQL API - dotazy](/querying/graphql-api#queries), kde najdete popis API pro fulltextové vyhledávání a další příklady použití. ```graphql query { @@ -450,49 +450,49 @@ query { } ``` -> **[Feature Management](#experimental-features):** From `specVersion` `0.0.4` and onwards, `fullTextSearch` must be declared under the `features` section in the subgraph manifest. +> **[Správa funkcí](#experimental-features):** Od `specVersion` `0.0.4` musí být `fullTextSearch` deklarováno v sekci `features` v manifestu podgrafů. -### Languages supported +### Podporované jazyky -Choosing a different language will have a definitive, though sometimes subtle, effect on the fulltext search API. Fields covered by a fulltext query field are examined in the context of the chosen language, so the lexemes produced by analysis and search queries vary from language to language. For example: when using the supported Turkish dictionary "token" is stemmed to "toke" while, of course, the English dictionary will stem it to "token". +Výběr jiného jazyka bude mít na rozhraní API fulltextového vyhledávání rozhodující, i když někdy nenápadný vliv. Pole zahrnutá do pole fulltextového dotazu jsou zkoumána v kontextu zvoleného jazyka, takže lexémy vytvořené analýzou a vyhledávacími dotazy se v jednotlivých jazycích liší. Například: při použití podporovaného tureckého slovníku je "token" odvozeno od "toke", zatímco anglický slovník jej samozřejmě odvozuje od "token". -Supported language dictionaries: +Podporované jazykové slovníky: -| Code | Dictionary | -| ------ | ---------- | -| simple | General | -| da | Danish | -| nl | Dutch | -| en | English | -| fi | Finnish | -| fr | French | -| de | German | -| hu | Hungarian | -| it | Italian | -| no | Norwegian | -| pt | Portuguese | -| ro | Romanian | -| ru | Russian | -| es | Spanish | -| sv | Swedish | -| tr | Turkish | +| Kód | Slovník | +| ---------- | ---------- | +| jednoduchý | Obecné | +| da | Danish | +| nl | Dutch | +| en | English | +| fi | Finnish | +| fr | French | +| de | German | +| hu | Hungarian | +| it | Italian | +| no | Norwegian | +| pt | Portuguese | +| ro | Romanian | +| ru | Russian | +| es | Spanish | +| sv | Swedish | +| tr | Turkish | -### Ranking Algorithms +### Algoritmy řazení -Supported algorithms for ordering results: +Podporované algoritmy pro řazení výsledků: -| Algorithm | Description | -| ------------- | ----------------------------------------------------------------------- | -| rank | Use the match quality (0-1) of the fulltext query to order the results. | -| proximityRank | Similar to rank but also includes the proximity of the matches. | +| Algoritmus | Popis | +| ------------- | ------------------------------------------------------------------------ | +| hodnost | Pro seřazení výsledků použijte kvalitu shody (0-1) fulltextového dotazu. | +| proximityRank | Podobně jako pořadí, ale zahrnuje také blízkost zápasů. | -## Writing Mappings +## Psát mapování -The mappings take data from a particular source and transform it into entities that are defined within your schema. Mappings are written in a subset of [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) called [AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki) which can be compiled to WASM ([WebAssembly](https://webassembly.org/)). AssemblyScript is stricter than normal TypeScript, yet provides a familiar syntax. +Mapování přebírá data z určitého zdroje a transformuje je na entity definované ve vašem schématu. Mapování jsou zapsána v podmnožině jazyka [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) nazvané [AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki), kterou lze zkompilovat do jazyka WASM ([WebAssembly](https://webassembly.org/)). AssemblyScript je přísnější než běžný TypeScript, přesto poskytuje známou syntaxi. -For each event handler that is defined in `subgraph.yaml` under `mapping.eventHandlers`, create an exported function of the same name. Each handler must accept a single parameter called `event` with a type corresponding to the name of the event which is being handled. +Pro každou obsluhu události definovanou v souboru `subgraph.yaml` v části `mapping.eventHandlers` vytvořte exportovanou funkci stejného jména. Každá obslužná funkce musí přijímat jeden parametr nazvaný `událost` s typem odpovídajícím názvu události, která je obsluhována. -In the example subgraph, `src/mapping.ts` contains handlers for the `NewGravatar` and `UpdatedGravatar` events: +V příkladovém podgrafu `src/mapping.ts` obsahuje obsluhy událostí `NewGravatar` a `UpdatedGravatar`: ```javascript import { NewGravatar, UpdatedGravatar } from '../generated/Gravity/Gravity' @@ -519,31 +519,31 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -The first handler takes a `NewGravatar` event and creates a new `Gravatar` entity with `new Gravatar(event.params.id.toHex())`, populating the entity fields using the corresponding event parameters. This entity instance is represented by the variable `gravatar`, with an id value of `event.params.id.toHex()`. +První obslužný program přijme událost `NewGravatar` a vytvoří novou entitu `Gravatar` s `new Gravatar(event.params.id.toHex())`, přičemž pole entity vyplní pomocí odpovídajících parametrů události. Tato instance entity je reprezentována proměnnou `gravatar` s hodnotou id `event.params.id.toHex()`. -The second handler tries to load the existing `Gravatar` from the Graph Node store. If it does not exist yet, it is created on-demand. The entity is then updated to match the new event parameters before it is saved back to the store using `gravatar.save()`. +Druhá obslužná rutina se pokusí načíst existující `Gravatar` z úložiště Graf Uzel. Pokud ještě neexistuje, je vytvořen na vyžádání. Entita je poté aktualizována tak, aby odpovídala novým parametrům události, a poté je uložena zpět do úložiště pomocí `gravatar.save()`. -### Recommended IDs for Creating New Entities +### Doporučené IDa pro vytváření nových Entity -Every entity has to have an `id` that is unique among all entities of the same type. An entity's `id` value is set when the entity is created. Below are some recommended `id` values to consider when creating new entities. NOTE: The value of `id` must be a `string`. +Každá entita musí mít `id`, které je jedinečné mezi všemi entitami stejného typu. Hodnota `id` entity je nastavena při jejím vytvoření. Níže jsou uvedeny některé doporučené hodnoty `id`, které je třeba vzít v úvahu při vytváření nových entit. POZNÁMKA: Hodnota `id` musí být `řetězec`. - `event.params.id.toHex()` - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +Poskytujeme knihovnu [Graf Typescript Library](https://github.com/graphprotocol/graph-ts), která obsahuje nástroje pro interakci s úložištěm Graf Uzel a usnadnění pro práci s daty a entitami chytrých smluv. Tuto knihovnu můžete používat ve svých mapováních importem `@graphprotocol/graph-ts` v souboru `mapping.ts`. -## Code Generation +## Generování kódu -In order to make it easy and type-safe to work with smart contracts, events and entities, the Graph CLI can generate AssemblyScript types from the subgraph's GraphQL schema and the contract ABIs included in the data sources. +Aby byla práce s inteligentními smlouvami, událostmi a entitami snadná a typově bezpečná, může Graf CLI generovat typy AssemblyScript ze schématu GraphQL podgrafu a ABI smluv obsažených ve zdrojích dat. -This is done with +To se provádí pomocí ```sh graph codegen [--output-dir ] [] ``` -but in most cases, subgraphs are already preconfigured via `package.json` to allow you to simply run one of the following to achieve the same: +ale ve většině případů jsou podgrafy již předkonfigurovány prostřednictvím souboru `package.json`, takže pro dosažení téhož stačí spustit jeden z následujících příkazů: ```sh # Yarn @@ -553,7 +553,7 @@ yarn codegen npm run codegen ``` -This will generate an AssemblyScript class for every smart contract in the ABI files mentioned in `subgraph.yaml`, allowing you to bind these contracts to specific addresses in the mappings and call read-only contract methods against the block being processed. It will also generate a class for every contract event to provide easy access to event parameters, as well as the block and transaction the event originated from. All of these types are written to `//.ts`. In the example subgraph, this would be `generated/Gravity/Gravity.ts`, allowing mappings to import these types with. +Tím se vygeneruje třída AssemblyScript pro každou chytrou smlouvu v souborech ABI uvedených v `subgraph.yaml`, což vám umožní svázat tyto smlouvy s konkrétními adresami v mapování a volat metody smlouvy pouze pro čtení proti zpracovávanému bloku. Pro každou událost kontraktu také vygeneruje třídu, která umožní snadný přístup k parametrům události a také k bloku a transakci, ze které událost pochází. Všechny tyto typy se zapisují do souboru `//.ts`. V příkladovém podgrafu by to bylo `generated/Gravity/Gravity.ts`, což umožňuje mapování, kterým lze tyto typy importovat. ```javascript import { @@ -565,25 +565,25 @@ import { } from '../generated/Gravity/Gravity' ``` -In addition to this, one class is generated for each entity type in the subgraph's GraphQL schema. These classes provide type-safe entity loading, read and write access to entity fields as well as a `save()` method to write entities to store. All entity classes are written to `/schema.ts`, allowing mappings to import them with +Kromě toho je pro každý typ entity ve schématu GraphQL podgrafu vygenerována jedna třída. Tyto třídy zajišťují typově bezpečné načítání entit, přístup k polím entit pro čtení a zápis a také metodu `save()` pro zápis entit do úložiště. Všechny třídy entit jsou zapsány do souboru `/schema.ts`, což umožňuje mapování importovat je pomocí funkce ```javascript import { Gravatar } from '../generated/schema' ``` -> **Note:** The code generation must be performed again after every change to the GraphQL schema or the ABIs included in the manifest. It must also be performed at least once before building or deploying the subgraph. +> **Poznámka:** Po každé změně schématu jazyka GraphQL nebo ABI obsažených v manifestu je nutné provést generování kódu znovu. Musí být také provedeno alespoň jednou před sestavením nebo nasazením podgrafu. -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 the Graph Explorer, you can run `yarn build` and fix any syntax errors that the TypeScript compiler might find. +Generování kódu nekontroluje váš mapovací kód v souboru `src/mapping.ts`. Pokud jej chcete zkontrolovat před pokusem o nasazení podgrafu do Graf Explorer, můžete spustit `yarn build` a opravit případné syntaktické chyby, které by kompilátor jazyka TypeScript mohl najít. -## Data Source Templates +## Šablony zdrojů dat -A common pattern in EVM-compatible smart contracts is the use of registry or factory contracts, where one contract creates, manages, or references an arbitrary number of other contracts that each have their own state and events. +Běžným vzorem v inteligentních smlouvách kompatibilních s EVM je používání registrů nebo továrních smluv, kdy jedna smlouva vytváří, spravuje nebo odkazuje na libovolný počet dalších smluv, z nichž každá má svůj vlastní stav a události. -The addresses of these sub-contracts may or may not be known upfront and many of these contracts may be created and/or added over time. This is why, in such cases, defining a single data source or a fixed number of data sources is impossible and a more dynamic approach is needed: _data source templates_. +Adresy těchto dílčích smluv mohou, ale nemusí být známy předem a mnoho z těchto smluv může být vytvořeno a/nebo přidáno v průběhu času. Proto v takových případech není možné definovat jediný zdroj dat nebo pevný počet zdrojů dat a je zapotřebí dynamičtější přístup: _šablony zdrojů dat_. -### Data Source for the Main Contract +### Zdroj dat pro hlavní smlouvu -First, you define a regular data source for the main contract. The snippet below shows a simplified example data source for the [Uniswap](https://uniswap.org) exchange factory contract. Note the `NewExchange(address,address)` event handler. This is emitted when a new exchange contract is created on-chain by the factory contract. +Nejprve definujete běžný zdroj dat pro hlavní smlouvu. Níže uvedený úryvek ukazuje zjednodušený příklad zdroje dat pro smlouvu [Uniswap](https://uniswap.org) exchange factory. Všimněte si obsluhy události `NewExchange(address,address)`. Ta je emitována, když je v řetězci vytvořena nová směnná smlouva tovární smlouvou. ```yaml dataSources: @@ -608,9 +608,9 @@ dataSources: handler: handleNewExchange ``` -### Data Source Templates for Dynamically Created Contracts +### Šablony zdrojů dat pro dynamicky vytvářené smlouvy -Then, you add _data source templates_ to the manifest. These are identical to regular data sources, except that they lack a pre-defined contract address under `source`. Typically, you would define one template for each type of sub-contract managed or referenced by the parent contract. +Poté do manifestu přidáte _šablony datových zdrojů_. Ty jsou totožné s běžnými zdroji dat, pouze postrádají předdefinovanou adresu smlouvy v položce `zdroj`. Obvykle byste definovali jednu šablonu pro každý typ dílčí smlouvy spravované nebo odkazované nadřazenou smlouvou. ```yaml dataSources: @@ -644,9 +644,9 @@ templates: handler: handleRemoveLiquidity ``` -### Instantiating a Data Source Template +### Instancování šablony zdroje dat -In the final step, you update your main contract mapping to create a dynamic data source instance from one of the templates. In this example, you would change the main contract mapping to import the `Exchange` template and call the `Exchange.create(address)` method on it to start indexing the new exchange contract. +V posledním kroku aktualizujete mapování hlavní smlouvy a vytvoříte dynamickou instanci zdroje dat z jedné ze šablon. V tomto příkladu byste změnili mapování hlavní smlouvy tak, abyste importovali šablonu `Exchange` a zavolali na ní metodu `Exchange.create(address)`, abyste zahájili indexování nové smlouvy exchange. ```typescript import { Exchange } from '../generated/templates' @@ -658,13 +658,13 @@ export function handleNewExchange(event: NewExchange): void { } ``` -> **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> -> If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. +> **Poznámka:** Nový zdroj dat bude zpracovávat pouze volání a události pro blok, ve kterém byl vytvořen, a všechny následující bloky, ale nebude zpracovávat historická data, tj. data obsažená v předchozích blocích. +> +> Pokud předchozí bloky obsahují data relevantní pro nový zdroj dat, je nejlepší tato data indexovat načtením aktuálního stavu smlouvy a vytvořením entit reprezentujících tento stav v době vytvoření nového zdroje dat. -### Data Source Context +### Kontext zdroje dat -Data source contexts allow passing extra configuration when instantiating a template. In our example, let's say exchanges are associated with a particular trading pair, which is included in the `NewExchange` event. That information can be passed into the instantiated data source, like so: +Kontexty zdrojů dat umožňují předávat další konfiguraci při instanci šablony. V našem příkladu řekněme, že burzy jsou spojeny s konkrétním obchodním párem, který je obsažen v události `NewExchange`. Tuto informaci lze předat do instancovaného zdroje dat takto: ```typescript import { Exchange } from '../generated/templates' @@ -676,7 +676,7 @@ export function handleNewExchange(event: NewExchange): void { } ``` -Inside a mapping of the `Exchange` template, the context can then be accessed: +Uvnitř mapování šablony `výměna` lze pak přistupovat ke kontextu: ```typescript import { dataSource } from '@graphprotocol/graph-ts' @@ -685,11 +685,11 @@ let context = dataSource.context() let tradingPair = context.getString('tradingPair') ``` -There are setters and getters like `setString` and `getString` for all value types. +Pro všechny typy hodnot existují setter a getter jako `setString` a `getString`. -## Start Blocks +## Výchozí bloky -The `startBlock` is an optional setting that allows you to define from which block in the chain the data source will start indexing. Setting the start block allows the data source to skip potentially millions of blocks that are irrelevant. Typically, a subgraph developer will set `startBlock` to the block in which the smart contract of the data source was created. +`startBlock` je volitelné nastavení, které umožňuje určit, od kterého bloku v řetězci začne zdroj dat indexovat. Nastavení počátečního bloku umožňuje zdroji dat přeskočit potenciálně miliony bloků, které jsou irelevantní. Typicky vývojář podgrafu nastaví `startBlock` na blok, ve kterém byl vytvořen inteligentní kontrakt zdroje dat. ```yaml dataSources: @@ -715,23 +715,23 @@ dataSources: handler: handleNewEvent ``` -> **Note:** The contract creation block can be quickly looked up on Etherscan: -> -> 1. Search for the contract by entering its address in the search bar. -> 2. Click on the creation transaction hash in the `Contract Creator` section. -> 3. Load the transaction details page where you'll find the start block for that contract. +> **Poznámka:** Blok pro vytvoření smlouvy lze rychle vyhledat v Etherscan: +> +> 1. Vyhledejte smlouvu zadáním její adresy do vyhledávacího řádku. +> 2. Klikněte na hash transakce vytvoření v sekci `Tvůrce smlouvy`. +> 3. Načtěte stránku s podrobnostmi o transakci, kde najdete počáteční blok pro danou smlouvu. -## Call Handlers +## Zpracovatelé hovorů -While events provide an effective way to collect relevant changes to the state of a contract, many contracts avoid generating logs to optimize gas costs. In these cases, a subgraph can subscribe to calls made to the data source contract. This is achieved by defining call handlers referencing the function signature and the mapping handler that will process calls to this function. To process these calls, the mapping handler will receive an `ethereum.Call` as an argument with the typed inputs to and outputs from the call. Calls made at any depth in a transaction's call chain will trigger the mapping, allowing activity with the data source contract through proxy contracts to be captured. +Události sice představují účinný způsob, jak shromažďovat relevantní změny stavu smlouvy, ale mnoho smluv se vyhýbá generování protokolů, aby se optimalizovaly náklady na plyn. V těchto případech se dílčí graf může přihlásit k odběru volání provedených na smlouvu se zdrojem dat. Toho lze dosáhnout definováním obsluhy volání odkazující na signaturu funkce a obsluhu mapování, která bude zpracovávat volání této funkce. Pro zpracování těchto volání obdrží mapovací obsluha jako argument `ethereum.Call` s typizovanými vstupy do volání a výstupy z volání. Volání uskutečněná v libovolné hloubce řetězce volání transakce spustí mapování, což umožní zachytit aktivitu se smlouvou zdroje dat prostřednictvím proxy smluv. -Call handlers will only trigger in one of two cases: when the function specified is called by an account other than the contract itself or when it is marked as external in Solidity and called as part of another function in the same contract. +Obsluhy volání se spustí pouze v jednom ze dvou případů: když je zadaná funkce volána jiným účtem než samotnou smlouvou nebo když je v Solidity označena jako externí a volána jako součást jiné funkce ve stejné smlouvě. -> **Note:** Call handlers currently depend on the Parity tracing API. Certain networks, such as BNB chain and Arbitrum, does not support this API. If a subgraph indexing one of these networks contain one or more call handlers, it will not start syncing. Subgraph developers should instead use event handlers. These are far more performant than call handlers, and are supported on every evm network. +> **Poznámka:** Zpracovatelé volání jsou v současné době závislí na API pro sledování parity. Některé sítě, například řetězec BNB a Arbitrum, toto API nepodporují. Pokud podgraf indexující některou z těchto sítí obsahuje jeden nebo více zpracovatelů volání, nezačne se synchronizovat. Vývojáři podgrafů by místo toho měli používat obsluhy událostí. Ty jsou mnohem výkonnější než obsluhy volání a jsou podporovány v každé síti evm. -### Defining a Call Handler +### Definice obsluhy volání -To define a call handler in your manifest, simply add a `callHandlers` array under the data source you would like to subscribe to. +Chcete-li v manifestu definovat obsluhu volání, jednoduše přidejte pole `callHandlers` pod zdroj dat, ke kterému se chcete přihlásit. ```yaml dataSources: @@ -756,11 +756,11 @@ dataSources: handler: handleCreateGravatar ``` -The `function` is the normalized function signature to filter calls by. The `handler` property is the name of the function in your mapping you would like to execute when the target function is called in the data source contract. +`funkce` je normalizovaná signatura funkce, podle které se filtrují volání. Vlastnost `handler` je název funkce ve vašem mapování, kterou chcete spustit při volání cílové funkce v kontraktu zdroje dat. -### Mapping Function +### Funkce mapování -Each call handler takes a single parameter that has a type corresponding to the name of the called function. In the example subgraph above, the mapping contains a handler for when the `createGravatar` function is called and receives a `CreateGravatarCall` parameter as an argument: +Každá obslužná funkce volání přijímá jeden parametr, který má typ odpovídající názvu volané funkce. Ve výše uvedeném příkladu podgraf obsahuje mapování obslužnou rutinu pro případ, kdy je volána funkce `createGravatar` a jako argument přijímá parametr `CreateGravatarCall`: ```typescript import { CreateGravatarCall } from '../generated/Gravity/Gravity' @@ -775,26 +775,26 @@ export function handleCreateGravatar(call: CreateGravatarCall): void { } ``` -The `handleCreateGravatar` function takes a new `CreateGravatarCall` which is a subclass of `ethereum.Call`, provided by `@graphprotocol/graph-ts`, that includes the typed inputs and outputs of the call. The `CreateGravatarCall` type is generated for you when you run `graph codegen`. +Funkce `handleCreateGravatar` přebírá novou `CreateGravatarCall`, což je podtřída `ethereum.Call`, kterou poskytuje `@graphprotocol/graph-ts`, která obsahuje typizované vstupy a výstupy volání. Typ `CreateGravatarCall` je pro vás vygenerován při spuštění `graph codegen`. -## Block Handlers +## Obsluha bloků -In addition to subscribing to contract events or function calls, a subgraph may want to update its data as new blocks are appended to the chain. To achieve this a subgraph can run a function after every block or after blocks that match a pre-defined filter. +Kromě přihlášení k událostem smlouvy nebo volání funkcí může podgraf chtít aktualizovat svá data, když jsou do řetězce přidány nové bloky. Za tímto účelem může podgraf spustit funkci po každém bloku nebo po blocích, které odpovídají předem definovanému filtru. -### Supported Filters +### Podporované filtry -#### Call Filter +#### Filtr volání ```yaml filter: kind: call ``` -_The defined handler will be called once for every block which contains a call to the contract (data source) the handler is defined under._ +_Definovat obslužná rutina bude zavolána jednou pro každý blok, který obsahuje volání smlouvy (zdroje dat), pod kterou je rutina definovát._ -> **Note:** The `call` filter currently depend on the Parity tracing API. Certain networks, such as BNB chain and Arbitrum, does not support this API. If a subgraph indexing one of these networks contain one or more block handlers with a `call` filter, it will not start syncing. +> **Poznámka:** Filtr `call` v současné době závisí na API pro sledování parity. Některé sítě, například řetězec BNB a Arbitrum, toto API nepodporují. Pokud podgraf indexující jednu z těchto sítí obsahuje jeden nebo více blokových manipulátorů s filtrem `call`, nezačne se synchronizovat. -The absence of a filter for a block handler will ensure that the handler is called every block. A data source can only contain one block handler for each filter type. +Protože pro obsluhu bloku neexistuje žádný filtr, zajistí, že obsluha bude volána každý blok. Zdroj dat může obsahovat pouze jednu blokovou obsluhu pro každý typ filtru. ```yaml dataSources: @@ -821,11 +821,11 @@ dataSources: kind: call ``` -#### Polling Filter +#### Filtr dotazování -> **Requires `specVersion` >= 0.0.8** +> **Vyžaduje `specVersion`> >= 0.0.8** -> **Note:** Polling filters are only available on dataSources of `kind: ethereum`. +> **Poznámka:** Filtry zdroj dat jsou k dispozici pouze pro zdroje dat `druhu: ethereum`. ```yaml blockHandlers: @@ -835,13 +835,13 @@ blockHandlers: every: 10 ``` -The defined handler will be called once for every `n` blocks, where `n` is the value provided in the `every` field. This configuration allows the subgraph to perform specific operations at regular block intervals. +Definovaný obslužná rutina bude zavolána jednou pro každých `n` bloků, kde `n` je hodnota uvedená v poli `every`. Tato konfigurace umožňuje dílčímu graf provádět specifické operace v pravidelných intervalech bloků. -#### Once Filter +#### Jednou Filtr -> **Requires `specVersion` >= 0.0.8** +> **Vyžaduje `specVersion`> >= 0.0.8** -> **Note:** Once filters are only available on dataSources of `kind: ethereum`. +> **Poznámka:** Jednou použité filtry jsou dostupné pouze pro zdroje dat `druhu: ethereum`. ```yaml blockHandlers: @@ -850,7 +850,7 @@ blockHandlers: kind: once ``` -The defined handler with the once filter will be called only once before all other handlers run. This configuration allows the subgraph to use the handler as an initialization handler, performing specific tasks at the start of indexing. +Definovaný obslužná rutina s filtrem once bude zavolána pouze jednou před spuštěním všech ostatních rutin. Tato konfigurace umožňuje, aby podgraf používal obslužný program jako inicializační obslužný, který provádí specifické úlohy na začátku indexování. ```ts export function handleOnce(block: ethereum.Block): void { @@ -860,9 +860,9 @@ export function handleOnce(block: ethereum.Block): void { } ``` -### Mapping Function +### Funkce mapování -The mapping function will receive an `ethereum.Block` as its only argument. Like mapping functions for events, this function can access existing subgraph entities in the store, call smart contracts and create or update entities. +Funkce mapování obdrží jako jediný argument `ethereum.Block`. Stejně jako mapovací funkce pro události může tato funkce přistupovat k existujícím entitám subgrafu v úložišti, volat chytré kontrakty a vytvářet nebo aktualizovat entity. ```typescript import { ethereum } from '@graphprotocol/graph-ts' @@ -874,9 +874,9 @@ export function handleBlock(block: ethereum.Block): void { } ``` -## Anonymous Events +## Anonymní události -If you need to process anonymous events in Solidity, that can be achieved by providing the topic 0 of the event, as in the example: +Pokud potřebujete v Solidity zpracovávat anonymní události, lze toho dosáhnout zadáním tématu 0 události, jak je uvedeno v příkladu: ```yaml eventHandlers: @@ -885,13 +885,13 @@ eventHandlers: handler: handleGive ``` -An event will only be triggered when both the signature and topic 0 match. By default, `topic0` is equal to the hash of the event signature. +Událost se spustí pouze tehdy, když se shoduje signatura i téma 0. Ve výchozím nastavení se `téma0` rovná hash signatury události. -## Transaction Receipts in Event Handlers +## Potvrzení transakcí v obslužných rutinách událostí -Starting from `specVersion` `0.0.5` and `apiVersion` `0.0.7`, event handlers can have access to the receipt for the transaction which emitted them. +Počínaje `specVersion` `0.0.5` a `apiVersion` `0.0.7` mohou mít obsluhy událostí přístup k potvrzení transakce, která je vyvolala. -To do so, event handlers must be declared in the subgraph manifest with the new `receipt: true` key, which is optional and defaults to false. +Za tímto účelem musí být obsluhy událostí deklarovány v manifestu podgrafů pomocí nového klíče `receipt: true`, který je nepovinný a výchozí hodnota je není pravda. ```yaml eventHandlers: @@ -900,17 +900,17 @@ eventHandlers: receipt: true ``` -Inside the handler function, the receipt can be accessed in the `Event.receipt` field. When the `receipt` key is set to `false` or omitted in the manifest, a `null` value will be returned instead. +Uvnitř obslužné funkce je příjem přístupný v poli `Event.receipt`. Pokud je klíč `receipt` nastaven na `false` nebo je v manifestu vynechán, bude místo něj vrácena hodnota `null`. -## Experimental features +## Experimentální funkce Starting from `specVersion` `0.0.4`, subgraph features must be explicitly declared in the `features` section at the top level of the manifest file, using their `camelCase` name, as listed in the table below: | Feature | Name | | --------------------------------------------------------- | --------------------------------------------------- | -| [Non-fatal errors](#non-fatal-errors) | `nonFatalErrors` | +| [Nefatální](#non-fatal-errors) | `nonFatalErrors` | | [Full-text Search](#defining-fulltext-search-fields) | `fullTextSearch` | -| [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | +| [Roubování](#grafting-onto-existing-subgraphs) | `grafting` | | [IPFS on Ethereum Contracts](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | For instance, if a subgraph uses the **Full-Text Search** and the **Non-fatal Errors** features, the `features` field in the manifest should be: @@ -938,7 +938,7 @@ Given such IPFS hashes, subgraphs can read the corresponding files from IPFS usi When running a local Graph Node, the `GRAPH_ALLOW_NON_DETERMINISTIC_IPFS` environment variable must be set in order to index subgraphs using this experimental functionality. -### Non-fatal errors +### Nefatální Indexing errors on already synced subgraphs will, by default, cause the subgraph to fail and stop syncing. Subgraphs can alternatively be configured to continue syncing in the presence of errors, by ignoring the changes made by the handler which provoked the error. This gives subgraph authors time to correct their subgraphs while queries continue to be served against the latest block, though the results might be inconsistent due to the bug that caused the error. Note that some errors are still always fatal. To be non-fatal, the error must be known to be deterministic. @@ -1023,7 +1023,7 @@ File data sources are a new subgraph functionality for accessing off-chain data > This also lays the groundwork for deterministic indexing of off-chain data, as well as the potential introduction of arbitrary HTTP-sourced data. -### Overview +### Přehled Rather than fetching files "in line" during handler exectuion, 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. @@ -1158,7 +1158,7 @@ For IPFS, Graph Node supports [v0 and v1 content identifiers](https://docs.ipfs. 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/server/http-api#transactions) from an Arweave gateway ([example file](https://bdxujjl5ev5eerd5ouhhs6o4kjrs4g6hqstzlci5pf6vhxezkgaa.arweave.net/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA)). Arweave supports transactions uploaded via Bundlr, and Graph Node can also fetch files based on [Bundlr manifests](https://docs.bundlr.network/learn/gateways#indexing). -Example: +Příklad: ```typescript import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates' @@ -1231,6 +1231,6 @@ Handlers for File Data Sources cannot be in files which import `eth_call` contra [Crypto Coven Subgraph migration](https://github.com/azf20/cryptocoven-api/tree/file-data-sources-refactor) -#### References +#### Odkazy: [GIP File Data Sources](https://forum.thegraph.com/t/gip-file-data-sources/2721) From 392fa3a302215ce7b7f5df12c33c2b18da6ec2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:08 -0400 Subject: [PATCH 118/924] New translations creating-a-subgraph.mdx (German) --- .../de/developing/creating-a-subgraph.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/de/developing/creating-a-subgraph.mdx b/website/pages/de/developing/creating-a-subgraph.mdx index 9211e777b458..8945579b5b92 100644 --- a/website/pages/de/developing/creating-a-subgraph.mdx +++ b/website/pages/de/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -531,7 +531,7 @@ Every entity has to have an `id` that is unique among all entities of the same t - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## Code Generation @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From f6b78f92c123da05225aae00fc5c507bbec815e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:09 -0400 Subject: [PATCH 119/924] New translations creating-a-subgraph.mdx (Italian) --- .../it/developing/creating-a-subgraph.mdx | 636 +++++++++--------- 1 file changed, 318 insertions(+), 318 deletions(-) diff --git a/website/pages/it/developing/creating-a-subgraph.mdx b/website/pages/it/developing/creating-a-subgraph.mdx index ef17c8f98d49..fb645f168931 100644 --- a/website/pages/it/developing/creating-a-subgraph.mdx +++ b/website/pages/it/developing/creating-a-subgraph.mdx @@ -1,46 +1,46 @@ --- -title: Creating a Subgraph +title: Creare un subgraph --- -A subgraph extracts data from a blockchain, processing it and storing it so that it can be easily queried via GraphQL. +Un subgraph estrae i dati da una blockchain, li elabora e li memorizza in modo che possano essere facilmente interrogati tramite GraphQL. -![Defining a Subgraph](/img/defining-a-subgraph.png) +![Definizione di un Subgraph](/img/defining-a-subgraph.png) -The subgraph definition consists of a few files: +La definizione del subgraph consiste in alcuni file: -- `subgraph.yaml`: a YAML file containing the subgraph manifest +- `subgraph.yaml`: un file YAML contenente il manifesto del subgraph -- `schema.graphql`: a GraphQL schema that defines what data is stored for your subgraph, and how to query it via GraphQL +- `schema.graphql`: uno schema GraphQL che definisce quali dati sono memorizzati per il subgraph e come interrogarli 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) +- `AssemblyScript Mappings`: [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) codice che traduce i dati dell'evento nelle entità definite nello schema (ad esempio `mapping.ts` in questo 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). +> Per poter utilizzare il proprio subgraph sulla rete decentralizzata di The Graph, è necessario [creare una chiave API](/deploying/subgraph-studio-faqs/#2-how-do-i-create-an-api-key). Si consiglia di [aggiungere il segnale](/network/curating/#how-to-signal) al subgraph con almeno [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. +Prima di entrare nel dettaglio dei contenuti del file manifest, è necessario installare la [Graph CLI](https://github.com/graphprotocol/graph-cli), che servirà per costruire e distribuire un subgraph. -## Install the Graph CLI +## Installare 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. +The Graph CLI è scritta in JavaScript e per utilizzarla è necessario installare `yarn` oppure `npm`; in quanto segue si presume che si disponga di yarn. -Once you have `yarn`, install the Graph CLI by running +Una volta che si dispone di `yarn`, installare the Graph CLI eseguendo -**Install with yarn:** +**Installare con yarn:** ```bash yarn global add @graphprotocol/graph-cli ``` -**Install with npm:** +**Installare con 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. +Una volta installato, il comando `graph init` può essere usato per impostare un nuovo progetto di subgraph, sia da un contratto esistente che da un subgraph di esempio. Questo comando può essere usato per creare un subgraph nel Subgraph Studio passando `graph init --product subgraph-studio`. Se si dispone già di uno smart contract distribuito sulla rete preferita, l'avvio di un nuovo subgraph da quel contratto può essere un buon modo per iniziare. -## From An Existing Contract +## Da un contratto esistente -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. +Il comando seguente crea un subgraph che indicizza tutti gli eventi di un contratto esistente. Tenta di recuperare l'ABI del contratto da Etherscan e torna a richiedere il percorso di un file locale. Se manca uno qualsiasi degli argomenti opzionali, il comando viene eseguito attraverso un modulo interattivo. ```sh graph init \ @@ -51,49 +51,49 @@ graph init \ [] ``` -The `` is the ID of your subgraph in Subgraph Studio, it can be found on your subgraph details page. +Il `` è l'ID del subgraph in Subgraph Studio, che si trova nella pagina dei dettagli del subgraph. -## From An Example Subgraph +## Da un subgraph di esempio -The second mode `graph init` supports is creating a new project from an example subgraph. The following command does this: +La seconda modalità supportata da `graph init` è la creazione di un nuovo progetto a partire da un subgraph di esempio. Il comando seguente esegue questa operazione: ```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. +Il subgraph di esempio è basato sul contratto Gravity di Dani Grant, che gestisce gli avatar degli utenti ed emette gli eventi `NewGravatar` oppure `UpdateGravatar` ogni volta che gli avatar vengono creati o aggiornati. Il subgraph gestisce questi eventi scrivendo `Gravatar` entities nel Graph Node store e assicurandosi che questi vengano aggiornati in base agli eventi. Le sezioni seguenti analizzeranno i file che compongono il manifesto del subgraph per questo esempio. -## Add New dataSources To An Existing Subgraph +## Aggiungere nuove data sources a un subgraph esistente -Since `v0.31.0` the `graph-cli` supports adding new dataSources to an existing subgraph through the `graph add` command. +Dalla `v0.31.0` il `graph-cli` supporta l'aggiunta di nuove sorgenti di dati a un subgraph esistente tramite il comando `graph add`. ```sh graph add
[] -Options: +Opzioni: - --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") + --abi Percorso dell'ABI del contratto (predefinito: download from Etherscan) + --contract-name Nome del contratto (predefinito: Contract) + --merge-entities Se unire entità con lo stesso nome (predefinito: false) + --network-file Percorso del file di configurazione della rete (predefinito: "./networks.json") ``` -The `add` command will fetch the ABI from Etherscan (unless an ABI path is specified with the `--abi` option), and will create a new `dataSource` in the same way that `graph init` command creates a `dataSource` `--from-contract`, updating the schema and mappings accordingly. +Il comando `add` recupera l'ABI da Etherscan (a meno che non sia specificato un percorso ABI con l'opzione `--abi`) e crea una nuova `dataSource` nello stesso modo in cui il comando `graph init` crea una `dataSource` `-from-contract`, aggiornando di conseguenza lo schema e le mappature. -The `--merge-entities` option identifies how the developer would like to handle `entity` and `event` name conflicts: +L'opzione `--merge-entities` identifica il modo in cui lo sviluppatore desidera gestire i conflitti tra i nomi di `entità` e `evento`: -- If `true`: the new `dataSource` should use existing `eventHandlers` & `entities`. -- If `false`: a new entity & event handler should be created with `${dataSourceName}{EventName}`. +- If `true`: il nuovo `dataSource` dovrebbe utilizzare gli `eventHandler` & `entità` esistenti. +- If `false`: una nuova entità & il gestore dell'evento deve essere creato con `${dataSourceName}{EventName}`. -The contract `address` will be written to the `networks.json` for the relevant network. +Il contratto `address` sarà scritto in `networks.json` per la rete rilevante. -> **Note:** When using the interactive cli, after successfully running `graph init`, you'll be prompted to add a new `dataSource`. +> **Nota:** Quando si utilizza il cli interattivo, dopo aver eseguito con successo `graph init`, verrà richiesto di aggiungere un nuovo `dataSource`. -## The Subgraph Manifest +## Manifesto di Subgraph -The subgraph manifest `subgraph.yaml` defines the smart contracts your subgraph indexes, which events from these contracts to pay attention to, and how to map event data to entities that Graph Node stores and allows to query. The full specification for subgraph manifests can be found [here](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md). +Il manifesto del subgraph `subgraph.yaml` definisce gli smart contract che il subgraph indicizza, a quali eventi di questi contratti prestare attenzione e come mappare i dati degli eventi alle entità che Graph Node memorizza e permette di effettuare query. Le specifiche complete dei manifesti dei subgraph sono disponibili [qui](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md). -For the example subgraph, `subgraph.yaml` is: +Per il subgraph di esempio, `subgraph.yaml` è: ```yaml specVersion: 0.0.4 @@ -142,63 +142,63 @@ dataSources: file: ./src/mapping.ts ``` -The important entries to update for the manifest are: +Le voci importanti da aggiornare per il manifesto sono: -- `description`: a human-readable description of what the subgraph is. This description is displayed by the Graph Explorer when the subgraph is deployed to the hosted service. +- `description`: una descrizione leggibile dell'aspetto del subgraph. Questa descrizione viene visualizzata da Graph Explorer quando il subgraph viene distribuito al hosted service. -- `repository`: the URL of the repository where the subgraph manifest can be found. This is also displayed by The Graph Explorer. +- `repository`: l'URL del repository in cui è possibile trovare il manifesto del subgraph. Questo viene visualizzato anche da Graph Explorer. -- `features`: a list of all used [feature](#experimental-features) names. +- `features`: un elenco di tutti i nomi delle [caratteristiche](#experimental-features) utilizzati. -- `dataSources.source`: the address of the smart contract the subgraph sources, and the ABI of the smart contract to use. The address is optional; omitting it allows to index matching events from all contracts. +- `dataSources.source`: l'indirizzo dello smart contract di cui il subgraph è fonte e l'ABI dello smart contract da utilizzare. L'indirizzo è facoltativo; omettendolo, si possono indicizzare gli eventi corrispondenti di tutti i contratti. -- `dataSources.source.startBlock`: the optional number of the block that the data source starts indexing from. In most cases, we suggest using the block in which the contract was created. +- `dataSources.source.startBlock`: il numero opzionale del blocco da cui l'origine dati inizia l'indicizzazione. Nella maggior parte dei casi, si consiglia di utilizzare il blocco in cui è stato creato il contratto. -- `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.source.endBlock`: Il numero opzionale del blocco a cui il data source interrompe l'indicizzazione, incluso quel blocco. È richiesta la versione minima delle specifiche: `0.0.9`. -- `dataSources.context`: key-value pairs that can be used within subgraph mappings. Supports various data types like `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, and `BigInt`. Each variable needs to specify its `type` and `data`. These context variables are then accessible in the mapping files, offering more configurable options for subgraph development. +- `dataSources.context`: coppie del valore chiave che possono essere usate nelle mappature dei subgraph. Supporta vari tipi di dati come `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, e `BigInt`. Ogni variabile deve specificare il suo `tipo` e `dati`. Queste variabili di contesto sono poi accessibili nei file di mappatura, offrendo più opzioni configurabili per lo sviluppo del subgraph. -- `dataSources.mapping.entities`: the entities that the data source writes to the store. The schema for each entity is defined in the schema.graphql file. +- `dataSources.mapping.entities`: le entità che l'origine dati scrive nell'archivio. Lo schema di ciascuna entità è definito nel file schema.graphql. -- `dataSources.mapping.abis`: one or more named ABI files for the source contract as well as any other smart contracts that you interact with from within the mappings. +- `dataSources.mapping.abis`: uno o più file ABI denominati per il contratto sorgente e per tutti gli altri smart contract con cui si interagisce all'interno delle mappature. -- `dataSources.mapping.eventHandlers`: lists the smart contract events this subgraph reacts to and the handlers in the mapping—./src/mapping.ts in the example—that transform these events into entities in the store. +- `dataSources.mapping.eventHandlers`: elenca gli eventi dello smart contract a cui questo subgraph reagisce e i gestori nella mappatura -./src/mapping.ts nell'esempio - che trasformano questi eventi in entità dell'archivio. -- `dataSources.mapping.callHandlers`: lists the smart contract functions this subgraph reacts to and handlers in the mapping that transform the inputs and outputs to function calls into entities in the store. +- `dataSources.mapping.callHandlers`: elenca le funzioni dello smart contract a cui questo subgraph reagisce e i gestori della mappatura che trasformano gli input e gli output delle chiamate di funzione in entità dell'archivio. -- `dataSources.mapping.blockHandlers`: lists the blocks this subgraph reacts to and handlers in the mapping to run when a block is appended to the chain. Without a filter, the block handler will be run every block. An optional call-filter can be provided by adding a `filter` field with `kind: call` to the handler. This will only run the handler if the block contains at least one call to the data source contract. +- `dataSources.mapping.blockHandlers`: elenca i blocchi a cui questo subgraph reagisce e i gestori nella mappatura da eseguire quando un blocco viene aggiunto alla chain. Senza un filtro, il gestore del blocco verrà eseguito ogni blocco. È possibile fornire un filtro di chiamata opzionale aggiungendo al gestore un campo `filter` con `kind: call`. Questo eseguirà il gestore solo se il blocco contiene almeno una chiamata al contratto sorgente. -A single subgraph can index data from multiple smart contracts. Add an entry for each contract from which data needs to be indexed to the `dataSources` array. +Un singolo subgraph può indicizzare i dati di più smart contract. Aggiungere all'array `dataSources` una voce per ogni contratto da cui devono essere indicizzati i dati. -The triggers for a data source within a block are ordered using the following process: +I trigger per una data source all'interno di un blocco sono ordinati secondo il seguente processo: -1. Event and call triggers are first ordered by transaction index within the block. -2. Event and call triggers within the same transaction are ordered using a convention: event triggers first then call triggers, each type respecting the order they are defined in the manifest. -3. Block triggers are run after event and call triggers, in the order they are defined in the manifest. +1. I trigger di eventi e chiamate sono ordinati prima per indice di transazione all'interno del blocco. +2. I trigger di eventi e chiamate all'interno della stessa transazione sono ordinati secondo una convenzione: prima i trigger di eventi e poi quelli di chiamate, rispettando l'ordine in cui sono definiti nel manifesto. +3. I trigger di blocco vengono eseguiti dopo i trigger di evento e di chiamata, nell'ordine in cui sono definiti nel manifesto. -These ordering rules are subject to change. +Queste regole di ordinazione sono soggette a modifiche. -### Getting The ABIs +### Ottenere gli ABI -The ABI file(s) must match your contract(s). There are a few ways to obtain ABI files: +I file ABI devono corrispondere al vostro contratto. Esistono diversi modi per ottenere i file ABI: -- If you are building your own project, you will likely have access to your most current ABIs. -- If you are building a subgraph for a public project, you can download that project to your computer and get the ABI by using [`truffle compile`](https://truffleframework.com/docs/truffle/overview) or using solc to compile. -- You can also find the ABI on [Etherscan](https://etherscan.io/), but this isn't always reliable, as the ABI that is uploaded there may be out of date. Make sure you have the right ABI, otherwise running your subgraph will fail. +- Se state costruendo il vostro progetto, probabilmente avrete accesso alle ABI più recenti. +- Se state costruendo un subgraph per un progetto pubblico, potete scaricare il progetto sul vostro computer e ottenere l'ABI usando [`truffle compile`](https://truffleframework.com/docs/truffle/overview) o usando solc per compilare. +- È possibile trovare l'ABI anche su [Etherscan](https://etherscan.io/), ma non è sempre affidabile, in quanto l'ABI caricato su questo sito potrebbe non essere aggiornato. Assicuratevi di avere l'ABI corretto, altrimenti l'esecuzione del subgraph fallirà. -## The GraphQL Schema +## Schema GraphQL -The schema for your subgraph is in the file `schema.graphql`. GraphQL schemas are defined using the GraphQL interface definition language. If you've never written a GraphQL schema, it is recommended that you check out this primer on the GraphQL type system. Reference documentation for GraphQL schemas can be found in the [GraphQL API](/querying/graphql-api) section. +Lo schema del subgraph si trova nel file `schema.graphql`. Gli schemi GraphQL sono definiti utilizzando il linguaggio di definizione dell'interfaccia GraphQL. Se non hai mai scritto uno schema GraphQL, si consiglia di dare un'occhiata a questa guida sul sistema di tipi GraphQL. La documentazione di riferimento per gli schemi GraphQL si trova nella sezione [GraphQL API](/querying/graphql-api). -## Defining Entities +## Definire le entità -Before defining entities, it is important to take a step back and think about how your data is structured and linked. All queries will be made against the data model defined in the subgraph schema and the entities indexed by the subgraph. Because of this, it is good to define the subgraph schema in a way that matches the needs of your dapp. It may be useful to imagine entities as "objects containing data", rather than as events or functions. +Prima di definire le entità, è importante fare un passo indietro e pensare a come i dati sono strutturati e collegati. Tutte le query saranno fatte sul modello di dati definito nello schema del subgraph e sulle entità indicizzate dal subgraph. Per questo motivo, è bene definire lo schema del subgraph in modo che corrisponda alle esigenze della propria applicazione. Può essere utile immaginare le entità come "oggetti contenenti dati", piuttosto che come eventi o funzioni. -With The Graph, you simply define entity types in `schema.graphql`, and Graph Node will generate top level fields for querying single instances and collections of that entity type. Each type that should be an entity is required to be annotated with an `@entity` directive. By default, entities are mutable, meaning that mappings can load existing entities, modify them and store a new version of that entity. Mutability comes at a price, and for entity types for which it is known that they will never be modified, for example, because they simply contain data extracted verbatim from the chain, it is recommended to mark them as immutable with `@entity(immutable: true)`. Mappings can make changes to immutable entities as long as those changes happen in the same block in which the entity was created. Immutable entities are much faster to write and to query, and should therefore be used whenever possible. +Con The Graph, è sufficiente definire i tipi di entità in `schema.graphql` e Graph Node genererà campi di primo livello per interrogare singole istanze e collezioni di quel tipo di entità. Ogni tipo che dovrebbe essere un'entità deve essere annotato con una direttiva `@entity`. Per impostazione predefinita, le entità sono mutabili, il che significa che le mappature possono caricare entità esistenti, modificarle e memorizzare una nuova versione di quell'entità. La mutabilità ha un prezzo e per i tipi di entità per i quali si sa che non saranno mai modificati, ad esempio perché contengono semplicemente dati estratti alla lettera dalla chain, si raccomanda di contrassegnarli come immutabili con `@entity(immutable: true)`. I mapping possono apportare modifiche alle entità immutabili, purché tali modifiche avvengano nello stesso blocco in cui l'entità è stata creata. Le entità immutabili sono molto più veloci da scrivere e da effettuare query e quindi dovrebbero essere utilizzate ogni volta che è possibile. -### Good Example +### Buon esempio -The `Gravatar` entity below is structured around a Gravatar object and is a good example of how an entity could be defined. +L'entità `Gravatar` qui sotto è strutturata intorno a un oggetto Gravatar ed è un buon esempio di come potrebbe essere definita un'entità. ```graphql type Gravatar @entity(immutable: true) { @@ -210,9 +210,9 @@ type Gravatar @entity(immutable: true) { } ``` -### Bad Example +### Cattivo esempio -The example `GravatarAccepted` and `GravatarDeclined` entities below are based around events. It is not recommended to map events or function calls to entities 1:1. +Gli esempi di entità `GravatarAccepted` e `GravatarDeclined` che seguono sono basati su eventi. Non è consigliabile mappare gli eventi o le chiamate di funzione alle entità 1:1. ```graphql type GravatarAccepted @entity { @@ -230,37 +230,37 @@ type GravatarDeclined @entity { } ``` -### Optional and Required Fields +### Campi opzionali e obbligatori -Entity fields can be defined as required or optional. Required fields are indicated by the `!` in the schema. If a required field is not set in the mapping, you will receive this error when querying the field: +I campi delle entità possono essere definiti come obbligatori o opzionali. I campi obbligatori sono indicati da `!` nello schema. Se un campo obbligatorio non è impostato nella mappatura, si riceverà questo errore quando si interroga il campo: ``` Null value resolved for non-null field 'name' ``` -Each entity must have an `id` field, which must be of type `Bytes!` or `String!`. It is generally recommended to use `Bytes!`, unless the `id` contains human-readable text, since entities with `Bytes!` id's will be faster to write and query as those with a `String!` `id`. The `id` field serves as the primary key, and needs to be unique among all entities of the same type. For historical reasons, the type `ID!` is also accepted and is a synonym for `String!`. +Ogni entità deve avere un campo `id`, che deve essere di tipo `Bytes!` oppure `String!`. In genere si raccomanda di usare `Bytes!`, a meno che il `id` non contenga testo leggibile dall'umano, poiché le entità con id `Bytes!` saranno più veloci da scrivere e da effettuare query rispetto a quelle con `String!` `id`. Il campo `id` serve come chiave primaria e deve essere unico per tutte le entità dello stesso tipo. Per ragioni storiche, è accettato anche il tipo `ID!`, sinonimo di `String!`. -For some entity types the `id` is constructed from the id's of two other entities; that is possible using `concat`, e.g., `let id = left.id.concat(right.id)` to form the id from the id's of `left` and `right`. Similarly, to construct an id from the id of an existing entity and a counter `count`, `let id = left.id.concatI32(count)` can be used. The concatenation is guaranteed to produce unique id's as long as the length of `left` is the same for all such entities, for example, because `left.id` is an `Address`. +Per alcuni tipi di entità, l'`id` è costruito a partire dagli id di altre due entità; ciò è possibile usando `concat`, ad esempio, `let id = left.id.concat(right.id)` per formare l'id dagli id di `left` e `right`. Allo stesso modo, per costruire un id a partire dall'id di un'entità esistente e da un contatore `count`, si può usare `let id = left.id.concatI32(count)`. La concatenazione è garantita per produrre id unici, purché la lunghezza di `left` sia la stessa per tutte queste entità, ad esempio perché `left.id` è un `Adress`. -### Built-In Scalar Types +### Tipi scalari integrati -#### GraphQL Supported Scalars +#### Scalari supportati da GraphQL -We support the following scalars in our GraphQL API: +Nella nostra API GraphQL supportiamo i seguenti scalari: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Tipo | Descrizione | +| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, rappresentato come una stringa esadecimale. Comunemente utilizzato per gli hash e gli indirizzi di Ethereum. | +| `String` | Scalare per valori `string`. I caratteri nulli non sono supportati e vengono rimossi automaticamente. | +| `Boolean` | Scalare per valori `boolean`. | +| `Int` | Le specifiche di GraphQL definiscono che `Int` ha una dimensione di 32 byte. | +| `Int8` | Un intero firmato a 8 byte, noto anche come intero firmato a 64 bit, può memorizzare valori nell'intervallo da -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. È preferibile utilizzare questo per rappresentare `i64` da ethereum. | +| `BigInt` | Numeri interi grandi. Utilizzati per i tipi `uint32`, `int64`, `uint64`, ..., `uint256` di Ethereum. Nota: Tutto ciò che è inferiore a `uint32` come `int32`, `uint24` oppure `int8` è rappresentato come `i32`. | +| `BigDecimal` | `BigDecimal` Decimali ad alta precisione rappresentati come un significante e un esponente. L'intervallo degli esponenti va da -6143 a +6144. Arrotondato a 34 cifre significative. | -#### Enums +#### Enum -You can also create enums within a schema. Enums have the following syntax: +È possibile creare enum anche all'interno di uno schema. Gli enum hanno la seguente sintassi: ```graphql enum TokenStatus { @@ -270,19 +270,19 @@ enum TokenStatus { } ``` -Once the enum is defined in the schema, you can use the string representation of the enum value to set an enum field on an entity. For example, you can set the `tokenStatus` to `SecondOwner` by first defining your entity and subsequently setting the field with `entity.tokenStatus = "SecondOwner"`. The example below demonstrates what the Token entity would look like with an enum field: +Una volta che l'enum è definito nello schema, si può usare la rappresentazione in stringa del valore dell'enum per impostare un campo enum su un'entità. Ad esempio, si può impostare il `tokenStatus` su `SecondOwner` definendo prima l'entità e poi impostando il campo con `entity.tokenStatus = "SecondOwner"`. L'esempio seguente mostra l'aspetto dell'entità Token con un campo enum: -More detail on writing enums can be found in the [GraphQL documentation](https://graphql.org/learn/schema/). +Maggiori dettagli sulla scrittura degli enum si trovano nella [documentazione di GraphQL](https://graphql.org/learn/schema/). -#### Entity Relationships +#### Relazioni tra entità -An entity may have a relationship to one or more other entities in your schema. These relationships may be traversed in your queries. Relationships in The Graph are unidirectional. It is possible to simulate bidirectional relationships by defining a unidirectional relationship on either "end" of the relationship. +Un'entità può avere una relazione con una o più altre entità dello schema. Queste relazioni possono essere attraversate nelle query. Le relazioni in The Graph sono unidirezionali. È possibile simulare relazioni bidirezionali definendo una relazione unidirezionale su entrambe le "estremità" della relazione. -Relationships are defined on entities just like any other field except that the type specified is that of another entity. +Le relazioni sono definite sulle entità come qualsiasi altro campo, tranne per il fatto che il tipo specificato è quello di un'altra entità. -#### One-To-One Relationships +#### Rapporti uno-a-uno -Define a `Transaction` entity type with an optional one-to-one relationship with a `TransactionReceipt` entity type: +Definire un tipo di entità `Transaction` con una relazione opzionale uno-a-uno con un tipo di entità `TransactionReceipt`: ```graphql type Transaction @entity(immutable: true) { @@ -296,9 +296,9 @@ type TransactionReceipt @entity(immutable: true) { } ``` -#### One-To-Many Relationships +#### Relazioni uno-a-molti -Define a `TokenBalance` entity type with a required one-to-many relationship with a Token entity type: +Definire un tipo di entità `TokenBalance` con una relazione obbligatoria uno-a-molti con un tipo di entità Token: ```graphql type Token @entity(immutable: true) { @@ -312,15 +312,15 @@ type TokenBalance @entity { } ``` -#### Reverse Lookups +#### Ricerche inverse -Reverse lookups can be defined on an entity through the `@derivedFrom` field. This creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. Rather, it is derived from the relationship defined on the other entity. For such relationships, it rarely makes sense to store both sides of the relationship, and both indexing and query performance will be better when only one side is stored and the other is derived. +Le ricerche inverse possono essere definite su un'entità attraverso il campo `@derivedFrom`. Questo crea un campo virtuale sull'entità che può essere interrogato, ma non può essere impostato manualmente attraverso l'API dei mapping. Piuttosto, è derivato dalla relazione definita sull'altra entità. Per tali relazioni, raramente ha senso memorizzare entrambi i lati della relazione e sia l'indicizzazione che le prestazioni delle query saranno migliori quando solo un lato è memorizzato e l'altro è derivato. -For one-to-many relationships, the relationship should always be stored on the 'one' side, and the 'many' side should always be derived. Storing the relationship this way, rather than storing an array of entities on the 'many' side, will result in dramatically better performance for both indexing and querying the subgraph. In general, storing arrays of entities should be avoided as much as is practical. +Per le relazioni uno-a-molti, la relazione deve sempre essere memorizzata sul lato "uno" e il lato "molti" deve sempre essere derivato. Memorizzare la relazione in questo modo, piuttosto che memorizzare un array di entità sul lato "molti", migliorerà notevolmente le prestazioni sia per l'indicizzazione che per l'interrogazione del subgraph. In generale, la memorizzazione di array di entità dovrebbe essere evitata per quanto possibile. -#### Example +#### Esempio -We can make the balances for a token accessible from the token by deriving a `tokenBalances` field: +Possiamo rendere accessibili i saldi di un token dal token stesso, derivando un campo `tokenBalances`: ```graphql type Token @entity(immutable: true) { @@ -335,13 +335,13 @@ type TokenBalance @entity { } ``` -#### Many-To-Many Relationships +#### Relazioni molti-a-molti -For many-to-many relationships, such as users that each may belong to any number of organizations, the most straightforward, but generally not the most performant, way to model the relationship is as an array in each of the two entities involved. If the relationship is symmetric, only one side of the relationship needs to be stored and the other side can be derived. +Per le relazioni molti-a-molti, come ad esempio gli utenti che possono appartenere a un numero qualsiasi di organizzazioni, il modo più semplice, ma generalmente non il più performante, di modellare la relazione è come un array in ciascuna delle due entità coinvolte. Se la relazione è simmetrica, è necessario memorizzare solo un lato della relazione e l'altro lato può essere derivato. -#### Example +#### Esempio -Define a reverse lookup from a `User` entity type to an `Organization` entity type. In the example below, this is achieved by looking up the `members` attribute from within the `Organization` entity. In queries, the `organizations` field on `User` will be resolved by finding all `Organization` entities that include the user's ID. +Definire una ricerca inversa da un tipo di entità `User` a un tipo di entità `Organization`. Nell'esempio seguente, questo si ottiene cercando l'attributo `members` dall'entità `Organization`. Nelle query, il campo `organizations` su `User` verrà risolto trovando tutte le entità `Organization` che includono l'ID dell'utente. ```graphql type Organization @entity { @@ -357,7 +357,7 @@ type User @entity { } ``` -A more performant way to store this relationship is through a mapping table that has one entry for each `User` / `Organization` pair with a schema like +Un modo più performante per memorizzare questa relazione è una tabella di mappatura che ha una voce per ogni coppia `User` / `Organization` con uno schema come ```graphql type Organization @entity { @@ -379,7 +379,7 @@ type UserOrganization @entity { } ``` -This approach requires that queries descend into one additional level to retrieve, for example, the organizations for users: +Questo approccio richiede che le query scendano di un ulteriore livello per recuperare, ad esempio, le organizzazioni degli utenti: ```graphql query usersWithOrganizations { @@ -394,11 +394,11 @@ query usersWithOrganizations { } ``` -This more elaborate way of storing many-to-many relationships will result in less data stored for the subgraph, and therefore to a subgraph that is often dramatically faster to index and to query. +Questo modo più elaborato di memorizzare le relazioni molti-a-molti si traduce in una minore quantità di dati memorizzati per il subgraph e quindi in un subgraph che spesso è molto più veloce da indicizzare e da effettuare query. -#### Adding comments to the schema +#### Aggiungere commenti allo schema -As per GraphQL spec, comments can be added above schema entity attributes using double quotations `""`. This is illustrated in the example below: +Secondo le specifiche GraphQL, i commenti possono essere aggiunti sopra gli attributi delle entità dello schema usando le doppie virgolette `""`. Questo è illustrato nell'esempio seguente: ```graphql type MyFirstEntity @entity { @@ -408,13 +408,13 @@ type MyFirstEntity @entity { } ``` -## Defining Fulltext Search Fields +## Definizione dei campi di ricerca fulltext -Fulltext search queries filter and rank entities based on a text search input. Fulltext queries are able to return matches for similar words by processing the query text input into stems before comparing them to the indexed text data. +Le query di ricerca fulltext filtrano e classificano le entità in base a un input di ricerca testuale. Le query full-text sono in grado di restituire corrispondenze per parole simili, elaborando il testo della query in gambi prima di confrontarli con i dati di testo indicizzati. -A fulltext query definition includes the query name, the language dictionary used to process the text fields, the ranking algorithm used to order the results, and the fields included in the search. Each fulltext query may span multiple fields, but all included fields must be from a single entity type. +La definizione di una query fulltext include il nome della query, il dizionario linguistico utilizzato per elaborare i campi di testo, l'algoritmo di classificazione utilizzato per ordinare i risultati e i campi inclusi nella ricerca. Ogni query fulltext può comprendere più campi, ma tutti i campi inclusi devono appartenere a un unico tipo di entità. -To add a fulltext query, include a `_Schema_` type with a fulltext directive in the GraphQL schema. +Per aggiungere una query fulltext, includere un tipo `_Schema_` con una direttiva fulltext nello schema GraphQL. ```graphql type _Schema_ @@ -437,7 +437,7 @@ type Band @entity { } ``` -The example `bandSearch` field can be used in queries to filter `Band` entities based on the text documents in the `name`, `description`, and `bio` fields. Jump to [GraphQL API - Queries](/querying/graphql-api#queries) for a description of the fulltext search API and more example usage. +Il campo di esempio `bandSearch` può essere utilizzato nelle query per filtrare le entità `Band` in base ai documenti di testo nei campi `name`, `description`, e `bio`. Passare a [GraphQL API - Queries](/querying/graphql-api#queries) per una descrizione dell'API di ricerca fulltext e per altri esempi di utilizzo. ```graphql query { @@ -450,49 +450,49 @@ query { } ``` -> **[Feature Management](#experimental-features):** From `specVersion` `0.0.4` and onwards, `fullTextSearch` must be declared under the `features` section in the subgraph manifest. +> **[Feature Management](#experimental-features): **A partire dalla `specVersion` `0.0.4`, `fullTextSearch` deve essere dichiarato nella sezione `features` del manifesto del subgraph. -### Languages supported +### Lingue supportate -Choosing a different language will have a definitive, though sometimes subtle, effect on the fulltext search API. Fields covered by a fulltext query field are examined in the context of the chosen language, so the lexemes produced by analysis and search queries vary from language to language. For example: when using the supported Turkish dictionary "token" is stemmed to "toke" while, of course, the English dictionary will stem it to "token". +La scelta di una lingua diversa avrà un effetto definitivo, anche se talvolta sottile, sull'API di ricerca fulltext. I campi coperti da una query fulltext vengono esaminati nel contesto della lingua scelta, quindi i lessemi prodotti dall'analisi e dalle query di ricerca variano da lingua a lingua. Ad esempio, quando si utilizza il dizionario turco supportato, "token" viene ridotto a "toke", mentre il dizionario inglese lo riduce a "token". -Supported language dictionaries: +Dizionari linguistici supportati: -| Code | Dictionary | -| ------ | ---------- | -| simple | General | -| da | Danish | -| nl | Dutch | -| en | English | -| fi | Finnish | -| fr | French | -| de | German | -| hu | Hungarian | -| it | Italian | -| no | Norwegian | -| pt | Portuguese | -| ro | Romanian | -| ru | Russian | -| es | Spanish | -| sv | Swedish | -| tr | Turkish | +| Codice | Dizionario | +| -------- | ---------- | +| semplice | Generale | +| da | Danese | +| nl | Olandese | +| en | Inglese | +| fi | Finlandese | +| fr | Francese | +| de | Tedesco | +| hu | Ungherese | +| it | Italiano | +| no | Norvegese | +| pt | Portoghese | +| ro | Rumeno | +| ru | Russo | +| es | Spagnolo | +| sv | Svedese | +| tr | Turco | -### Ranking Algorithms +### Algoritmi di classificazione -Supported algorithms for ordering results: +Algoritmi supportati per ordinare i risultati: -| Algorithm | Description | -| ------------- | ----------------------------------------------------------------------- | -| rank | Use the match quality (0-1) of the fulltext query to order the results. | -| proximityRank | Similar to rank but also includes the proximity of the matches. | +| Algoritmo | Descrizione | +| ------------- | --------------------------------------------------------------------------------------------- | +| rank | Utilizza la qualità della corrispondenza (0-1) della query fulltext per ordinare i risultati. | +| proximityRank | Simile a rank, ma include anche la vicinanza degli incontri. | -## Writing Mappings +## Scrivere le mappature -The mappings take data from a particular source and transform it into entities that are defined within your schema. Mappings are written in a subset of [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) called [AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki) which can be compiled to WASM ([WebAssembly](https://webassembly.org/)). AssemblyScript is stricter than normal TypeScript, yet provides a familiar syntax. +Le mappature prendono i dati da una particolare fonte e li trasformano in entità definite nello schema. Le mappature sono scritte in un sottoinsieme di [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) chiamato [AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki) che può essere compilato in WASM ([WebAssembly](https://webassembly.org/)). AssemblyScript è più rigoroso del normale TypeScript, ma offre una sintassi familiare. -For each event handler that is defined in `subgraph.yaml` under `mapping.eventHandlers`, create an exported function of the same name. Each handler must accept a single parameter called `event` with a type corresponding to the name of the event which is being handled. +Per ogni gestore di eventi definito in `subgraph.yaml` sotto `mapping.eventHandlers`, creare una funzione esportata con lo stesso nome. Ogni gestore deve accettare un singolo parametro, chiamato `event`, con un tipo corrispondente al nome dell'evento da gestire. -In the example subgraph, `src/mapping.ts` contains handlers for the `NewGravatar` and `UpdatedGravatar` events: +Nel subgraph di esempio, `src/mapping.ts` contiene gestori per gli eventi `NewGravatar` e `UpdatedGravatar`: ```javascript import { NewGravatar, UpdatedGravatar } from '../generated/Gravity/Gravity' @@ -519,31 +519,31 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -The first handler takes a `NewGravatar` event and creates a new `Gravatar` entity with `new Gravatar(event.params.id.toHex())`, populating the entity fields using the corresponding event parameters. This entity instance is represented by the variable `gravatar`, with an id value of `event.params.id.toHex()`. +Il primo gestore prende un evento `NewGravatar` e crea una nuova entità `Gravatar` con `new Gravatar(event.params.id.toHex())`, popolando i campi dell'entità usando i parametri corrispondenti dell'evento. Questa istanza di entità è rappresentata dalla variabile `gravatar`, con un valore id di `event.params.id.toHex()`. -The second handler tries to load the existing `Gravatar` from the Graph Node store. If it does not exist yet, it is created on-demand. The entity is then updated to match the new event parameters before it is saved back to the store using `gravatar.save()`. +Il secondo gestore cerca di caricare il `Gravatar` esistente dal negozio dei Graph Node.Se non esiste ancora, viene creato su richiesta. L'entità viene quindi aggiornata in base ai nuovi parametri dell'evento, prima di essere salvata nel negozio con `gravatar.save()`. -### Recommended IDs for Creating New Entities +### ID consigliati per la creazione di nuove entità -Every entity has to have an `id` that is unique among all entities of the same type. An entity's `id` value is set when the entity is created. Below are some recommended `id` values to consider when creating new entities. NOTE: The value of `id` must be a `string`. +Ogni entità deve avere un `id` che sia unico tra tutte le entità dello stesso tipo. Il valore `id` di un'entità viene impostato quando l'entità viene creata. Di seguito sono riportati alcuni valori `id` consigliati da considerare quando si creano nuove entità. NOTA: Il valore di `id` deve essere una `string`. - `event.params.id.toHex()` - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. -## Code Generation +## Generazione del codice -In order to make it easy and type-safe to work with smart contracts, events and entities, the Graph CLI can generate AssemblyScript types from the subgraph's GraphQL schema and the contract ABIs included in the data sources. +Per rendere semplice e sicuro il lavoro con gli smart contract, gli eventi e le entità, la Graph CLI può generare tipi AssemblyScript dallo schema GraphQL del subgraph e dagli ABI dei contratti inclusi nelle data source. -This is done with +Questo viene fatto con ```sh graph codegen [--output-dir ] [] ``` -but in most cases, subgraphs are already preconfigured via `package.json` to allow you to simply run one of the following to achieve the same: +ma nella maggior parte dei casi, i subgraph sono già preconfigurati tramite `package.json` per consentire di eseguire semplicemente uno dei seguenti comandi per ottenere lo stesso risultato: ```sh # Yarn @@ -553,7 +553,7 @@ yarn codegen npm run codegen ``` -This will generate an AssemblyScript class for every smart contract in the ABI files mentioned in `subgraph.yaml`, allowing you to bind these contracts to specific addresses in the mappings and call read-only contract methods against the block being processed. It will also generate a class for every contract event to provide easy access to event parameters, as well as the block and transaction the event originated from. All of these types are written to `//.ts`. In the example subgraph, this would be `generated/Gravity/Gravity.ts`, allowing mappings to import these types with. +Questo genera una classe AssemblyScript per ogni smart contract nei file ABI menzionati in `subgraph.yaml`, consentendo di legare questi contratti a indirizzi specifici nelle mappature e di chiamare i metodi del contratto in sola lettura contro il blocco in elaborazione. Verrà inoltre generata una classe per ogni evento contrattuale, per fornire un facile accesso ai parametri dell'evento, nonché al blocco e alla transazione da cui l'evento ha avuto origine. Tutti questi tipi sono scritti in `//.ts`. Nel subgraph di esempio, questo sarebbe `generated/Gravity/Gravity.ts`, consentendo ai mapping di importare questi tipi con. ```javascript import { @@ -565,25 +565,25 @@ import { } from '../generated/Gravity/Gravity' ``` -In addition to this, one class is generated for each entity type in the subgraph's GraphQL schema. These classes provide type-safe entity loading, read and write access to entity fields as well as a `save()` method to write entities to store. All entity classes are written to `/schema.ts`, allowing mappings to import them with +Inoltre, viene generata una classe per ogni tipo di entità nello schema GraphQL del subgraph. Queste classi forniscono il caricamento sicuro del tipo di entità, l'accesso in lettura e scrittura ai campi dell'entità e un metodo `save()` per scrivere le entità nella memoria. Tutte le classi di entità sono scritte in `/schema.ts`, consentendo alle mappature di importarle con ```javascript import { Gravatar } from '../generated/schema' ``` -> **Note:** The code generation must be performed again after every change to the GraphQL schema or the ABIs included in the manifest. It must also be performed at least once before building or deploying the subgraph. +> **Nota:** La generazione del codice deve essere eseguita nuovamente dopo ogni modifica allo schema GraphQL o alle ABI incluse nel manifesto. Inoltre, deve essere eseguita almeno una volta prima di costruire o distribuire il 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 the Graph Explorer, you can run `yarn build` and fix any syntax errors that the TypeScript compiler might find. +La generazione del codice non controlla il codice di mappatura in `src/mapping.ts`. Se si vuole controllare prima di provare a distribuire il subgraph in Graph Explorer, si può eseguire `yarn build` e correggere eventuali errori di sintassi che il compilatore TypeScript potrebbe trovare. -## Data Source Templates +## Modelli di Data Source -A common pattern in EVM-compatible smart contracts is the use of registry or factory contracts, where one contract creates, manages, or references an arbitrary number of other contracts that each have their own state and events. +Un modello comune negli smart contract compatibili con EVM è l'uso di contratti di registro o di fabbrica, in cui un contratto crea, gestisce o fa riferimento a un numero arbitrario di altri contratti che hanno ciascuno il proprio stato e i propri eventi. -The addresses of these sub-contracts may or may not be known upfront and many of these contracts may be created and/or added over time. This is why, in such cases, defining a single data source or a fixed number of data sources is impossible and a more dynamic approach is needed: _data source templates_. +Gli indirizzi di questi subcontratti possono o meno essere noti in anticipo e molti di questi contratti possono essere creati e/o aggiunti nel tempo. Per questo motivo, in questi casi, la definizione di una singola data source o di un numero fisso di data source è impossibile e occorre un approccio più dinamico: i _modelli di data source_. -### Data Source for the Main Contract +### Data Source per il contratto principale -First, you define a regular data source for the main contract. The snippet below shows a simplified example data source for the [Uniswap](https://uniswap.org) exchange factory contract. Note the `NewExchange(address,address)` event handler. This is emitted when a new exchange contract is created on-chain by the factory contract. +Per prima cosa, si definisce un data source regolare per il contratto principale. Lo snippet seguente mostra un esempio semplificato di data source per il contratto [Uniswap](https://uniswap.org) exchange factory. Si noti il gestore di eventi `NewExchange(address,address)`. Questo viene emesso quando un nuovo contratto di scambio viene creato sulla chain dal contratto di fabbrica. ```yaml dataSources: @@ -608,9 +608,9 @@ dataSources: handler: handleNewExchange ``` -### Data Source Templates for Dynamically Created Contracts +### Modelli di data source per contratti creati dinamicamente -Then, you add _data source templates_ to the manifest. These are identical to regular data sources, except that they lack a pre-defined contract address under `source`. Typically, you would define one template for each type of sub-contract managed or referenced by the parent contract. +Quindi, si aggiungono _modelli di data source_ al manifesto. Questi sono identici alle normali data source, tranne per il fatto che non hanno un indirizzo di contratto predefinito sotto `source`. In genere, si definisce un modello per ogni tipo di subcontratto gestito o referenziato dal contratto principale. ```yaml dataSources: @@ -644,9 +644,9 @@ templates: handler: handleRemoveLiquidity ``` -### Instantiating a Data Source Template +### Istanziare un modello di data source -In the final step, you update your main contract mapping to create a dynamic data source instance from one of the templates. In this example, you would change the main contract mapping to import the `Exchange` template and call the `Exchange.create(address)` method on it to start indexing the new exchange contract. +Nella fase finale, si aggiorna la mappatura del contratto principale per creare un'istanza di origine dati dinamica da uno dei modelli. In questo esempio, si modificherà la mappatura del contratto principale per importare il modello `Exchange` e richiamare il metodo `Exchange.create(address)` per avviare l'indicizzazione del nuovo contratto exchange. ```typescript import { Exchange } from '../generated/templates' @@ -658,13 +658,13 @@ export function handleNewExchange(event: NewExchange): void { } ``` -> **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> -> If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. +> **Nota:** Una nuova data source elaborerà solo le chiamate e gli eventi del blocco in cui è stata creata e di tutti i blocchi successivi, ma non elaborerà i dati storici, cioè quelli contenuti nei blocchi precedenti. +> +> Se i blocchi precedenti contengono dati rilevanti per la nuova data source, è meglio indicizzare tali dati leggendo lo stato attuale del contratto e creando entità che rappresentino tale stato al momento della creazione della nuova data source. -### Data Source Context +### Contesto del Data Source -Data source contexts allow passing extra configuration when instantiating a template. In our example, let's say exchanges are associated with a particular trading pair, which is included in the `NewExchange` event. That information can be passed into the instantiated data source, like so: +I contesti delle data source consentono di passare una configurazione aggiuntiva quando si istanzia un modello. Nel nostro esempio, diciamo che gli scambi sono associati a una particolare coppia di trading, che è inclusa nell'evento `NewExchange`. Queste informazioni possono essere passate nell'origine dati istanziata, in questo modo: ```typescript import { Exchange } from '../generated/templates' @@ -676,7 +676,7 @@ export function handleNewExchange(event: NewExchange): void { } ``` -Inside a mapping of the `Exchange` template, the context can then be accessed: +All'interno di una mappatura del modello `Exchange`, è possibile accedere al contesto: ```typescript import { dataSource } from '@graphprotocol/graph-ts' @@ -685,11 +685,11 @@ let context = dataSource.context() let tradingPair = context.getString('tradingPair') ``` -There are setters and getters like `setString` and `getString` for all value types. +Esistono setter e getter come `setString` e `getString` per tutti i tipi di valore. -## Start Blocks +## Blocchi di partenza -The `startBlock` is an optional setting that allows you to define from which block in the chain the data source will start indexing. Setting the start block allows the data source to skip potentially millions of blocks that are irrelevant. Typically, a subgraph developer will set `startBlock` to the block in which the smart contract of the data source was created. +L'opzione `startBlock` è un'impostazione opzionale che consente di definire da quale blocco della chain l'origine dati inizierà l'indicizzazione. L'impostazione del blocco iniziale consente al data source di saltare potenzialmente milioni di blocchi irrilevanti. In genere, lo sviluppatore di un subgraph imposta `startBlock` sul blocco in cui è stato creato lo smart contract del data source. ```yaml dataSources: @@ -715,52 +715,52 @@ dataSources: handler: handleNewEvent ``` -> **Note:** The contract creation block can be quickly looked up on Etherscan: -> -> 1. Search for the contract by entering its address in the search bar. -> 2. Click on the creation transaction hash in the `Contract Creator` section. -> 3. Load the transaction details page where you'll find the start block for that contract. +> **Nota:** Il blocco di creazione del contratto può essere rapidamente consultato su Etherscan: +> +> 1. Cercare il contratto inserendo l'indirizzo nella barra di ricerca. +> 2. Fare clic sull'hash della transazione di creazione nella sezione `Contract Creator`. +> 3. Caricare la pagina dei dettagli della transazione, dove si trova il blocco iniziale per quel contratto. -## Call Handlers +## Gestori di chiamate -While events provide an effective way to collect relevant changes to the state of a contract, many contracts avoid generating logs to optimize gas costs. In these cases, a subgraph can subscribe to calls made to the data source contract. This is achieved by defining call handlers referencing the function signature and the mapping handler that will process calls to this function. To process these calls, the mapping handler will receive an `ethereum.Call` as an argument with the typed inputs to and outputs from the call. Calls made at any depth in a transaction's call chain will trigger the mapping, allowing activity with the data source contract through proxy contracts to be captured. +Sebbene gli eventi rappresentino un modo efficace per raccogliere le modifiche rilevanti allo stato di un contratto, molti contratti evitano di generare log per ottimizzare i costi del gas. In questi casi, un subgraph può sottoscrivere le chiamate fatte al contratto dell'origine dati. Ciò si ottiene definendo gestori di chiamate che fanno riferimento alla firma della funzione e al gestore di mappatura che elaborerà le chiamate a questa funzione. Per elaborare queste chiamate, il gestore della mappatura riceverà un `ethereum.Call` come argomento con gli input e gli output digitati della chiamata. Le chiamate effettuate a qualsiasi profondità nella chain di chiamate di una transazione attiveranno la mappatura, consentendo di catturare l'attività con il contratto della data source attraverso i contratti proxy. -Call handlers will only trigger in one of two cases: when the function specified is called by an account other than the contract itself or when it is marked as external in Solidity and called as part of another function in the same contract. +I gestori di chiamate si attivano solo in uno dei due casi: quando la funzione specificata viene chiamata da un conto diverso dal contratto stesso o quando è contrassegnata come esterna in Solidity e chiamata come parte di un'altra funzione nello stesso contratto. -> **Note:** Call handlers currently depend on the Parity tracing API. Certain networks, such as BNB chain and Arbitrum, does not support this API. If a subgraph indexing one of these networks contain one or more call handlers, it will not start syncing. Subgraph developers should instead use event handlers. These are far more performant than call handlers, and are supported on every evm network. +> **Nota:** I gestori delle chiamate dipendono attualmente dall'API di tracciamento Parity. Alcune reti, come la chain BNB e Arbitrum, non supportano questa API. Se un subgraph che indicizza una di queste reti contiene uno o più gestori di chiamate, non inizierà la sincronizzazione. Gli sviluppatori di subgraph dovrebbero invece utilizzare i gestori di eventi. Questi sono molto più performanti dei gestori di chiamate e sono supportati da tutte le reti evm. -### Defining a Call Handler +### Definire un gestore di chiamate -To define a call handler in your manifest, simply add a `callHandlers` array under the data source you would like to subscribe to. +Per definire un gestore di chiamate nel manifesto, basta aggiungere un array `callHandlers` sotto la data source che si desidera sottoscrivere. ```yaml dataSources: - kind: ethereum/contract - name: Gravity + name: Factory network: mainnet source: - address: '0x731a10897d267e19b34503ad902d0a29173ba4b1' - abi: Gravity + address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' + abi: Factory mapping: kind: ethereum/events apiVersion: 0.0.6 language: wasm/assemblyscript + file: ./src/mappings/factory.ts entities: - - Gravatar - - Transaction + - Directory abis: - - name: Gravity - file: ./abis/Gravity.json - callHandlers: - - function: createGravatar(string,string) - handler: handleCreateGravatar + - name: Factory + file: ./abis/factory.json + eventHandlers: + - event: NewExchange(address,address) + handler: handleNewExchange ``` -The `function` is the normalized function signature to filter calls by. The `handler` property is the name of the function in your mapping you would like to execute when the target function is called in the data source contract. +La `function` è la firma della funzione normalizzata per filtrare le chiamate. La proprietà `handler` è il nome della funzione della mappatura che si desidera eseguire quando la funzione di destinazione viene chiamata nel contratto del data source. -### Mapping Function +### Funzione di mappatura -Each call handler takes a single parameter that has a type corresponding to the name of the called function. In the example subgraph above, the mapping contains a handler for when the `createGravatar` function is called and receives a `CreateGravatarCall` parameter as an argument: +Ogni gestore di chiamate accetta un singolo parametro di tipo corrispondente al nome della funzione chiamata. Nel subgraph di esempio sopra, la mappatura contiene un gestore per quando la funzione `createGravatar` viene chiamata e riceve un parametro `CreateGravatarCall` come argomento: ```typescript import { CreateGravatarCall } from '../generated/Gravity/Gravity' @@ -775,26 +775,26 @@ export function handleCreateGravatar(call: CreateGravatarCall): void { } ``` -The `handleCreateGravatar` function takes a new `CreateGravatarCall` which is a subclass of `ethereum.Call`, provided by `@graphprotocol/graph-ts`, that includes the typed inputs and outputs of the call. The `CreateGravatarCall` type is generated for you when you run `graph codegen`. +La funzione `handleCreateGravatar` prende una nuova `CreateGravatarCall` che è una subclasse di `ethereum.Call`, fornita da `@graphprotocol/graph-ts`, che include gli input e gli output tipizzati della chiamata. Il tipo `CreateGravatarCall` viene generato quando si esegue `graph codegen`. -## Block Handlers +## Gestori di blocchi -In addition to subscribing to contract events or function calls, a subgraph may want to update its data as new blocks are appended to the chain. To achieve this a subgraph can run a function after every block or after blocks that match a pre-defined filter. +Oltre a sottoscrivere eventi di contratto o chiamate di funzione, un subgraph può voler aggiornare i propri dati quando nuovi blocchi vengono aggiunti alla chain. A tale scopo, un subgraph può eseguire una funzione dopo ogni blocco o dopo i blocchi che corrispondono a un filtro predefinito. -### Supported Filters +### Filtri supportati -#### Call Filter +#### Filtro di chiamata ```yaml filter: kind: call ``` -_The defined handler will be called once for every block which contains a call to the contract (data source) the handler is defined under._ +_Il gestore definito sarà richiamato una volta per ogni blocco che contiene una chiamata al contratto (data source) sotto il quale il gestore è definito._ -> **Note:** The `call` filter currently depend on the Parity tracing API. Certain networks, such as BNB chain and Arbitrum, does not support this API. If a subgraph indexing one of these networks contain one or more block handlers with a `call` filter, it will not start syncing. +> **Nota:** Il filtro `call` dipende attualmente dall'API di tracciamento Parity. Alcune reti, come la chain BNB e Arbitrum, non supportano questa API. Se un subgraph che indicizza una di queste reti contiene uno o più gestori di blocchi con un filtro `call`, non inizierà la sincronizzazione. -The absence of a filter for a block handler will ensure that the handler is called every block. A data source can only contain one block handler for each filter type. +L'assenza di un filtro per un gestore di blocchi garantisce che il gestore venga chiamato a ogni blocco. Una data source può contenere un solo gestore di blocchi per ogni tipo di filtro. ```yaml dataSources: @@ -821,11 +821,11 @@ dataSources: kind: call ``` -#### Polling Filter +#### Filtro di polling -> **Requires `specVersion` >= 0.0.8** +> **Richiede `specVersion` >= 0.0.8** -> **Note:** Polling filters are only available on dataSources of `kind: ethereum`. +> **Nota:** I filtri di polling sono disponibili solo su dataSources di `kind: ethereum`. ```yaml blockHandlers: @@ -835,13 +835,13 @@ blockHandlers: every: 10 ``` -The defined handler will be called once for every `n` blocks, where `n` is the value provided in the `every` field. This configuration allows the subgraph to perform specific operations at regular block intervals. +Il gestore definito sarà chiamato una volta ogni `n` blocchi, dove `n` è il valore fornito nel campo `every`. Questa configurazione consente al subgraph di eseguire operazioni specifiche a intervalli regolari di blocco. -#### Once Filter +#### Filtro once -> **Requires `specVersion` >= 0.0.8** +> **Richiede `specVersion` >= 0.0.8** -> **Note:** Once filters are only available on dataSources of `kind: ethereum`. +> **Nota:** I filtri once sono disponibili solo su dataSources di `kind: ethereum`. ```yaml blockHandlers: @@ -850,7 +850,7 @@ blockHandlers: kind: once ``` -The defined handler with the once filter will be called only once before all other handlers run. This configuration allows the subgraph to use the handler as an initialization handler, performing specific tasks at the start of indexing. +Il gestore definito con il filtro once sarà chiamato una sola volta prima dell'esecuzione di tutti gli altri gestori. Questa configurazione consente al subgraph di utilizzare il gestore come gestore di inizializzazione, eseguendo compiti specifici all'inizio dell'indicizzazione. ```ts export function handleOnce(block: ethereum.Block): void { @@ -860,9 +860,9 @@ export function handleOnce(block: ethereum.Block): void { } ``` -### Mapping Function +### Funzione di mappatura -The mapping function will receive an `ethereum.Block` as its only argument. Like mapping functions for events, this function can access existing subgraph entities in the store, call smart contracts and create or update entities. +La funzione di mappatura riceverà un `Blocco Etereo` come unico argomento. Come le funzioni di mappatura per gli eventi, questa funzione può accedere alle entità del subgraph esistenti nell'archivio, chiamare smart contract e creare o aggiornare entità. ```typescript import { ethereum } from '@graphprotocol/graph-ts' @@ -874,9 +874,9 @@ export function handleBlock(block: ethereum.Block): void { } ``` -## Anonymous Events +## Eventi anonimi -If you need to process anonymous events in Solidity, that can be achieved by providing the topic 0 of the event, as in the example: +Se è necessario elaborare eventi anonimi in Solidity, è possibile farlo fornendo l'argomento 0 dell'evento, come nell'esempio: ```yaml eventHandlers: @@ -885,13 +885,13 @@ eventHandlers: handler: handleGive ``` -An event will only be triggered when both the signature and topic 0 match. By default, `topic0` is equal to the hash of the event signature. +Un evento viene attivato solo se la firma e l'argomento 0 corrispondono. Per impostazione predefinita, `topic0` è uguale all'hash della firma dell'evento. -## Transaction Receipts in Event Handlers +## Ricevute di transazione nei gestori di eventi -Starting from `specVersion` `0.0.5` and `apiVersion` `0.0.7`, event handlers can have access to the receipt for the transaction which emitted them. +A partire da `specVersion` `0.0.5` e `apiVersion` `0.0.7`, i gestori di eventi possono avere accesso alla ricevuta della transazione che li ha emessi. -To do so, event handlers must be declared in the subgraph manifest with the new `receipt: true` key, which is optional and defaults to false. +Per fare ciò, i gestori di eventi devono essere dichiarati nel manifesto del subgraph con la nuova chiave `receipt: true`, che è opzionale e ha come valore predefinito false. ```yaml eventHandlers: @@ -900,20 +900,20 @@ eventHandlers: receipt: true ``` -Inside the handler function, the receipt can be accessed in the `Event.receipt` field. When the `receipt` key is set to `false` or omitted in the manifest, a `null` value will be returned instead. +All'interno della funzione handler, è possibile accedere alla ricevuta nel campo `Event.receipt`. Se la chiave `receipt` è impostata su `false` oppure omessa nel manifesto, verrà restituito un valore `null`. -## Experimental features +## Caratteristiche sperimentali -Starting from `specVersion` `0.0.4`, subgraph features must be explicitly declared in the `features` section at the top level of the manifest file, using their `camelCase` name, as listed in the table below: +A partire da `specVersion` `0.0.4`, le caratteristiche del subgraph devono essere dichiarate esplicitamente nella sezione `features` al livello superiore del file del manifesto, utilizzando il loro nome `camelCase`, come elencato nella tabella seguente: -| Feature | Name | +| Caratteristica | Nome | | --------------------------------------------------------- | --------------------------------------------------- | -| [Non-fatal errors](#non-fatal-errors) | `nonFatalErrors` | -| [Full-text Search](#defining-fulltext-search-fields) | `fullTextSearch` | +| [Errori non fatali](#non-fatal-errors) | `nonFatalErrors` | +| [Ricerca full-text](#defining-fulltext-search-fields) | `fullTextSearch` | | [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | -| [IPFS on Ethereum Contracts](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | +| [IPFS su contratti Ethereum](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | -For instance, if a subgraph uses the **Full-Text Search** and the **Non-fatal Errors** features, the `features` field in the manifest should be: +Ad esempio, se un subgraph utilizza le funzionalità **Full-Text Search** e **Non-fatal Errors**, il campo `features` del manifesto dovrebbe essere: ```yaml specVersion: 0.0.4 @@ -924,27 +924,27 @@ features: dataSources: ... ``` -Note that using a feature without declaring it will incur a **validation error** during subgraph deployment, but no errors will occur if a feature is declared but not used. +Si noti che l'uso di una caratteristica senza dichiararla incorrerà in un **errore di validazione** durante la distribuzione del subgraph, mentre non si verificherà alcun errore se una caratteristica viene dichiarata ma non utilizzata. -### IPFS on Ethereum Contracts +### IPFS su contratti Ethereum -A common use case for combining IPFS with Ethereum is to store data on IPFS that would be too expensive to maintain on-chain, and reference the IPFS hash in Ethereum contracts. +Un caso d'uso comune per combinare IPFS con Ethereum è quello di memorizzare su IPFS i dati che sarebbero troppo costosi da mantenere sulla chain e fare riferimento all'hash di IPFS nei contratti Ethereum. -Given such IPFS hashes, subgraphs can read the corresponding files from IPFS using `ipfs.cat` and `ipfs.map`. To do this reliably, it is required that these files are pinned to an IPFS node with high availability, so that the [hosted service](https://thegraph.com/hosted-service) IPFS node can find them during indexing. +Dati tali hash IPFS, i subgraph possono leggere i file corrispondenti da IPFS utilizzando `ipfs.cat` and `ipfs.map`. Per farlo in modo affidabile, è necessario che questi file siano appuntati su un nodo IPFS ad alta disponibilità, in modo che il nodo IPFS del [hosted service](https://thegraph.com/hosted-service) possa trovarli durante l'indicizzazione. -> **Note:** The Graph Network does not yet support `ipfs.cat` and `ipfs.map`, and developers should not deploy subgraphs using that functionality to the network via the Studio. +> **Nota:** Il Graph Network non supporta ancora `ipfs.cat` and `ipfs.map`, e gli sviluppatori non dovrebbero distribuire alla rete, tramite Studio, i subgraph che utilizzano tale funzionalità. -> **[Feature Management](#experimental-features):** `ipfsOnEthereumContracts` must be declared under `features` in the subgraph manifest. For non EVM chains, the `nonDeterministicIpfs` alias can also be used for the same purpose. +> **[Gestione delle caratteristiche](#experimental-features): **`ipfsOnEthereumContracts` deve essere dichiarato tra le `caratteristiche` nel manifesto del subgraph. Per le chain non EVM, è possibile utilizzare anche l'alias `nonDeterministicIpfs` per lo stesso scopo. -When running a local Graph Node, the `GRAPH_ALLOW_NON_DETERMINISTIC_IPFS` environment variable must be set in order to index subgraphs using this experimental functionality. +Quando si esegue un Graph Node locale, la variabile d'ambiente `GRAPH_ALLOW_NON_DETERMINISTIC_IPFS` deve essere impostata per poter indicizzare i subgraph utilizzando questa funzionalità sperimentale. -### Non-fatal errors +### Errori non fatali -Indexing errors on already synced subgraphs will, by default, cause the subgraph to fail and stop syncing. Subgraphs can alternatively be configured to continue syncing in the presence of errors, by ignoring the changes made by the handler which provoked the error. This gives subgraph authors time to correct their subgraphs while queries continue to be served against the latest block, though the results might be inconsistent due to the bug that caused the error. Note that some errors are still always fatal. To be non-fatal, the error must be known to be deterministic. +Gli errori di indicizzazione su subgraph già sincronizzati causano, per impostazione predefinita, il fallimento del subgraph e l'interruzione della sincronizzazione. In alternativa, i subgraph possono essere configurati per continuare la sincronizzazione in presenza di errori, ignorando le modifiche apportate dal gestore che ha provocato l'errore. In questo modo gli autori dei subgraph hanno il tempo di correggere i loro subgraph mentre le query continuano a essere servite rispetto al blocco più recente, anche se i risultati potrebbero essere incoerenti a causa del bug che ha causato l'errore. Si noti che alcuni errori sono sempre fatali. Per essere non fatale, l'errore deve essere noto come deterministico. -> **Note:** The Graph Network does not yet support non-fatal errors, and developers should not deploy subgraphs using that functionality to the network via the Studio. +> **Nota:** Il Graph Network non supporta ancora gli errori non fatali e gli sviluppatori non dovrebbero distribuire i subgraph che utilizzano questa funzionalità alla rete tramite Studio. -Enabling non-fatal errors requires setting the following feature flag on the subgraph manifest: +Per abilitare gli errori non fatali è necessario impostare il seguente flag di caratteristica nel manifesto del subgraph: ```yaml specVersion: 0.0.4 @@ -954,7 +954,7 @@ features: ... ``` -The query must also opt-in to querying data with potential inconsistencies through the `subgraphError` argument. It is also recommended to query `_meta` to check if the subgraph has skipped over errors, as in the example: +La query deve anche scegliere di effettuare query dei dati con potenziali incongruenze attraverso l'argomento `subgraphError`. Si raccomanda anche di effettuare query di `_meta` per verificare se il subgraph ha saltato gli errori, come nell'esempio: ```graphql foos(first: 100, subgraphError: allow) { @@ -966,7 +966,7 @@ _meta { } ``` -If the subgraph encounters an error, that query will return both the data and a graphql error with the message `"indexing_error"`, as in this example response: +Se il subgrapg incontra un errore, la query restituirà sia i dati sia un errore graphql con il messaggio `"indexing_error"`, come in questo esempio di risposta: ```graphql "data": { @@ -986,13 +986,13 @@ If the subgraph encounters an error, that query will return both the data and a ] ``` -### Grafting onto Existing Subgraphs +### Grafting su subgraph esistenti -> **Note:** it is not recommended to use grafting when initially upgrading to The Graph Network. Learn more [here](/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network). +> **Nota:** non è consigliabile utilizzare il grafting quando si effettua l'aggiornamento iniziale a The Graph Network. Per saperne di più, leggi [qui](/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network). -When a subgraph is first deployed, it starts indexing events at the genesis block of the corresponding chain (or at the `startBlock` defined with each data source) In some circumstances; it is beneficial to reuse the data from an existing subgraph and start indexing at a much later block. This mode of indexing is called _Grafting_. Grafting is, for example, useful during development to get past simple errors in the mappings quickly or to temporarily get an existing subgraph working again after it has failed. +Quando un subgraph viene distribuito per la prima volta, inizia l'indicizzazione degli eventi al blocco genesi della chain corrispondente (o al blocco `startBlock` definito con ciascuna data source). In alcune circostanze, è vantaggioso riutilizzare i dati di un subgraph esistente e iniziare l'indicizzazione in un blocco successivo. Questa modalità di indicizzazione è chiamata _Grafting_. Il grafting è utile, ad esempio, durante lo sviluppo per superare rapidamente semplici errori nelle mappature o per far funzionare di nuovo temporaneamente un subgraph esistente dopo che è fallito. -A subgraph is grafted onto a base subgraph when the subgraph manifest in `subgraph.yaml` contains a `graft` block at the top-level: +Un subgraph viene innestato su un subgraph di base quando il manifesto del subgraph in `subgraph.yaml` contiene un blocco `graft` al livello superiore: ```yaml description: ... @@ -1001,49 +1001,49 @@ graft: block: 7345624 # Block number ``` -When a subgraph whose manifest contains a `graft` block is deployed, Graph Node will copy the data of the `base` subgraph up to and including the given `block` and then continue indexing the new subgraph from that block on. The base subgraph must exist on the target Graph Node instance and must have indexed up to at least the given block. Because of this restriction, grafting should only be used during development or during an emergency to speed up producing an equivalent non-grafted subgraph. +Quando viene distribuito un subgraph il cui manifesto contiene un blocco di `graft`, Graph Node copierà i dati del subgraph di `base` fino al `blocco` indicato e compreso e continuerà a indicizzare il nuovo subgraph da quel blocco in poi. Il subgraph di base deve esistere sull'istanza del Graph Node di destinazione e deve essere indicizzato almeno fino al blocco dato. A causa di questa restrizione, il grafring dovrebbe essere usato solo durante lo sviluppo o in caso di emergenza per accelerare la produzione di un subgraph equivalente non grafted. -Because grafting copies rather than indexes base data, it is much quicker to get the subgraph to the desired block than indexing from scratch, though the initial data copy can still take several hours for very large subgraphs. While the grafted subgraph is being initialized, the Graph Node will log information about the entity types that have already been copied. +Poiché l'innesto copia piuttosto che indicizzare i dati di base, è molto più veloce portare il subgraph al blocco desiderato rispetto all'indicizzazione da zero, anche se la copia iniziale dei dati può richiedere diverse ore per subgraph molto grandi. Mentre il subgraph innestato viene inizializzato, il Graph Node registra le informazioni sui tipi di entità già copiati. -The grafted subgraph can use a GraphQL schema that is not identical to the one of the base subgraph, but merely compatible with it. It has to be a valid subgraph schema in its own right, but may deviate from the base subgraph's schema in the following ways: +Il grafted subgraph può utilizzare uno schema GraphQL non identico a quello del subgraph di base, ma semplicemente compatibile con esso. Deve essere uno schema di subgraph valido di per sé, ma può discostarsi dallo schema del subgraph di base nei seguenti modi: -- It adds or removes entity types -- It removes attributes from entity types -- It adds nullable attributes to entity types -- It turns non-nullable attributes into nullable attributes -- It adds values to enums -- It adds or removes interfaces -- It changes for which entity types an interface is implemented +- Aggiunge o rimuove i tipi di entità +- Rimuove gli attributi dai tipi di entità +- Aggiunge attributi annullabili ai tipi di entità +- Trasforma gli attributi non nulli in attributi nulli +- Aggiunge valori agli enum +- Aggiunge o rimuove le interfacce +- Cambia per quali tipi di entità viene implementata un'interfaccia -> **[Feature Management](#experimental-features):** `grafting` must be declared under `features` in the subgraph manifest. +> **[Gestione delle caratteristiche](#experimental-features): **`grafting` deve essere dichiarato tra le `caratteristiche` nel manifesto del subgraph. -## File Data Sources +## I Data Source file -File data sources are a new subgraph functionality for accessing off-chain data during indexing in a robust, extendable way. File data sources support fetching files from IPFS and from Arweave. +I data source file sono una nuova funzionalità del subgraph per accedere ai dati fuori chain durante l'indicizzazione in modo robusto ed estendibile. I data source file supportano il recupero di file da IPFS e da Arweave. -> This also lays the groundwork for deterministic indexing of off-chain data, as well as the potential introduction of arbitrary HTTP-sourced data. +> Questo pone anche le basi per l'indicizzazione deterministica dei dati fuori chain e per la potenziale introduzione di dati arbitrari provenienti da HTTP. ### Panoramica -Rather than fetching files "in line" during handler exectuion, 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. +Invece di recuperare i file "in linea" durante l'esecuzione del gestore, si introducono modelli che possono essere generati come nuove data source per un determinato identificatore di file. Queste nuove data source recuperano i file, ritentando se non hanno successo ed eseguendo un gestore dedicato quando il file viene trovato. -This is similar to the [existing data source templates](https://thegraph.com/docs/en/developing/creating-a-subgraph/#data-source-templates), which are used to dynamically create new chain-based data sources. +È simile ai [modelli di origine dati esistenti](https://thegraph.com/docs/en/developing/creating-a-subgraph/#data-source-templates), che vengono usati per creare dinamicamente nuove origini dati basate su chain. -> This replaces the existing `ipfs.cat` API +> Questo sostituisce l'API esistente `ipfs.cat` -### Upgrade guide +### Guida all'aggiornamento -#### Update `graph-ts` and `graph-cli` +#### Aggiornare `graph-ts` e `graph-cli` -File data sources requires graph-ts >=0.29.0 and graph-cli >=0.33.1 +Le data source file richiedono l'uso di graph-ts >=0.29.0 and graph-cli >=0.33.1 -#### Add a new entity type which will be updated when files are found +#### Aggiungere un nuovo tipo di entità che verrà aggiornato quando verranno trovati dei file -File data sources cannot access or update chain-based entities, but must update file specific entities. +I data sources file non possono accedere o aggiornare le entità basate sulla chain, ma devono aggiornare le entità specifiche del file. -This may mean splitting out fields from existing entities into separate entities, linked together. +Ciò può significare dividere i campi delle entità esistenti in entità separate, collegate tra loro. -Original combined entity: +Entità combinata originale: ```graphql type Token @entity { @@ -1061,7 +1061,7 @@ type Token @entity { } ``` -New, split entity: +Entità nuova, divisa: ```graphql type Token @entity { @@ -1082,13 +1082,13 @@ type TokenMetadata @entity { } ``` -If the relationship is 1:1 between the parent entity and the resulting file data source entity, the simplest pattern is to link the parent entity to a resulting file entity by using the IPFS CID as the lookup. Get in touch on Discord if you are having difficulty modelling your new file-based entities! +Se la relazione è 1:1 tra l'entità genitore e l'entità data source file risultante, il modello più semplice è quello di collegare l'entità genitore a un'entità file risultante utilizzando il CID IPFS come lookup. Contattateci su Discord se avete difficoltà a modellare le vostre nuove entità basate su file! -> You can use [nested filters](https://thegraph.com/docs/en/querying/graphql-api/#example-for-nested-entity-filtering) to filter parent entities on the basis of these nested entities. +> È possibile utilizzare [filtri annidati](https://thegraph.com/docs/en/querying/graphql-api/#example-for-nested-entity-filtering) per filtrare le entità genitore sulla base di queste entità annidate. -#### Add a new templated data source with `kind: file/ipfs` or `kind: file/arweave` +#### Aggiungere una nuova data source templata con `kind: file/ipfs` oppure `kind: file/arweave` -This is the data source which will be spawned when a file of interest is identified. +È l'origine dati che verrà generata quando viene identificato un file di interesse. ```yaml templates: @@ -1106,21 +1106,21 @@ templates: file: ./abis/Token.json ``` -> Currently `abis` are required, though it is not possible to call contracts from within file data sources +> Attualmente sono richiesti `abis`, anche se non è possibile richiamare i contratti dall'interno del data source file -The file data source must specifically mention all the entity types which it will interact with under `entities`. See [limitations](#Limitations) for more details. +Il data source file deve indicare specificamente tutti i tipi di entità con cui interagirà tra le `entità`. Vedere [limitazioni](#Limitations) per maggiori dettagli. -#### Create a new handler to process files +#### Creare un nuovo gestore per elaborare i file -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](https://thegraph.com/docs/en/developing/assemblyscript-api/#json-api)). +Questo gestore deve accettare un parametro `Bytes`, che sarà il contenuto del file, una volta trovato, che potrà essere elaborato. Spesso si tratta di un file JSON, che può essere elaborato con gli helper `graph-ts` ([documentazione](https://thegraph.com/docs/en/developing/assemblyscript-api/#json-api)). -The CID of the file as a readable string can be accessed via the `dataSource` as follows: +Il CID del file, come stringa leggibile, è accessibile tramite `dataSource` come segue: ```typescript const cid = dataSource.stringParam() ``` -Example handler: +Esempio di gestore: ```typescript import { json, Bytes, dataSource } from '@graphprotocol/graph-ts' @@ -1147,18 +1147,18 @@ export function handleMetadata(content: Bytes): void { } ``` -#### Spawn file data sources when required +#### Creare i data source file quando necessario -You can now create file data sources during execution of chain-based handlers: +È ora possibile creare i data sources file durante l'esecuzione di gestori a chain: -- Import the template from the auto-generated `templates` -- call `TemplateName.create(cid: string)` from within a mapping, where the cid is a valid content identifier for IPFS or Arweave +- Importare il modello dal `templates` generato automaticamente +- chiamare `TemplateName.create(cid: string)` da una mappatura, dove il cid è un identificatore di contenuto valido per IPFS o Arweave -For IPFS, Graph Node supports [v0 and v1 content identifiers](https://docs.ipfs.tech/concepts/content-addressing/), and content identifers with directories (e.g. `bafyreighykzv2we26wfrbzkcdw37sbrby4upq7ae3aqobbq7i4er3tnxci/metadata.json`). +Per IPFS, Graph Node supporta [identificatori di contenuto v0 e v1](https://docs.ipfs.tech/concepts/content-addressing/) e identificatori di contenuto con directory (ad esempio `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/server/http-api#transactions) from an Arweave gateway ([example file](https://bdxujjl5ev5eerd5ouhhs6o4kjrs4g6hqstzlci5pf6vhxezkgaa.arweave.net/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA)). Arweave supports transactions uploaded via Bundlr, and Graph Node can also fetch files based on [Bundlr manifests](https://docs.bundlr.network/learn/gateways#indexing). +Per Arweave, a partire dalla versione 0.33.0 Graph Node può recuperare i file memorizzati su Arweave in base al loro [ID di transazione](https://docs.arweave.org/developers/server/http-api#transactions) da un gateway Arweave ([file di esempio](https://bdxujjl5ev5eerd5ouhhs6o4kjrs4g6hqstzlci5pf6vhxezkgaa.arweave.net/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA)). Arweave supporta le transazioni caricate tramite Bundlr e Graph Node può anche recuperare i file in base ai [manifesti Bundlr](https://docs.bundlr.network/learn/gateways#indexing). -Example: +Esempio: ```typescript import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates' @@ -1187,50 +1187,50 @@ export function handleTransfer(event: TransferEvent): void { } ``` -This will create a new file data source, which will poll Graph Node's configured IPFS or Arweave endpoint, retrying if it is not found. When the file is found, the file data source handler will be executed. +Questo creerà una nuova data source file, che interrogherà l'endpoint IPFS o Arweave configurato del Graph Node, ritentando se non viene trovato. Quando il file viene trovato, viene eseguito il gestore del data source file. -This example is using the CID as the lookup between the parent `Token` entity and the resulting `TokenMetadata` entity. +Questo esempio utilizza il CID come ricerca tra l'entità genitore `Token` e l'entità risultante `TokenMetadata`. -> Previously, this is the point at which a subgraph developer would have called `ipfs.cat(CID)` to fetch the file +> In precedenza, questo è il punto in cui uno sviluppatore di subgraph avrebbe chiamato `ipfs.cat(CID)` per recuperare il file -Congratulations, you are using file data sources! +Congratulazioni, state usando i data source file! -#### Deploying your subgraphs +#### Distribuire i subgraph -You can now `build` and `deploy` your subgraph to any Graph Node >=v0.30.0-rc.0. +È ora possibile `build` e `deploy` il proprio subgraph su qualsiasi Graph Node >=v0.30.0-rc.0. -#### Limitations +#### Limitazioni -File data source handlers and entities are isolated from other subgraph entities, ensuring that they are deterministic when executed, and ensuring no contamination of chain-based data sources. To be specific: +I gestori e le entità di data source file sono isolati dalle altre entità del subgraph, assicurando che siano deterministici quando vengono eseguiti e garantendo che non ci sia contaminazione di data source basate sulla chain. Per essere precisi: -- Entities created by File Data Sources are immutable, and cannot be updated -- File Data Source handlers cannot access entities from other file data sources -- Entities associated with File Data Sources cannot be accessed by chain-based handlers +- Le entità create di Data Source file sono immutabili e non possono essere aggiornate +- I gestori di Data Source file non possono accedere alle entità di altre data source file +- Le entità associate al Data Source file non sono accessibili ai gestori alla chain -> While this constraint should not be problematic for most use-cases, it may introduce complexity for some. Please get in touch via Discord if you are having issues modelling your file-based data in a subgraph! +> Sebbene questo vincolo non dovrebbe essere problematico per la maggior parte dei casi d'uso, potrebbe introdurre complessità per alcuni. Contattate via Discord se avete problemi a modellare i vostri dati basati su file in un subgraph! -Additionally, it is not possible to create data sources from a file data source, be it an onchain data source or another file data source. This restriction may be lifted in the future. +Inoltre, non è possibile creare data source da una data source file, sia essa una data source onchain o un'altra data source file. Questa restrizione potrebbe essere eliminata in futuro. -#### Best practices +#### Migliori pratiche -If you are linking NFT metadata to corresponding tokens, use the metadata's IPFS hash to reference a Metadata entity from the Token entity. Save the Metadata entity using the IPFS hash as an ID. +Se si collegano i metadati NFT ai token corrispondenti, utilizzare l'hash IPFS dei metadati per fare riferimento a un'entità Metadata dall'entità Token. Salvare l'entità Metadata usando l'hash IPFS come ID. -You can use [DataSource context](https://thegraph.com/docs/en/developing/assemblyscript-api/#entity-and-data-source-context) when creating File Data Sources to pass extra information which will be available to the File Data Source handler. +È possibile utilizzare [contesto DataSource](https://thegraph.com/docs/en/developing/assemblyscript-api/#entity-and-data-source-context) quando si creano data source file per passare informazioni aggiuntive che saranno disponibili al gestore della data source file. -If you have entities which are refreshed multiple times, create unique file-based entities using the IPFS hash & the entity ID, and reference them using a derived field in the chain-based entity. +Se si dispone di entità che vengono aggiornate più volte, creare entità univoche basate su file utilizzando l'hash IPFS & l'ID dell'entità e fare riferimento a queste entità utilizzando un campo derivato nell'entità basata sulla chain. -> We are working to improve the above recommendation, so queries only return the "most recent" version +> Stiamo lavorando per migliorare la raccomandazione di cui sopra, in modo che le query restituiscano solo la versione "più recente" -#### Known issues +#### Problemi conosciuti -File data sources currently require ABIs, even though ABIs are not used ([issue](https://github.com/graphprotocol/graph-cli/issues/961)). Workaround is to add any ABI. +I data source dei file attualmente richiedono le ABI, anche se le ABI non sono utilizzate ([problema](https://github.com/graphprotocol/graph-cli/issues/961)). La soluzione è aggiungere qualsiasi 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-cli/issues/4309)). Workaround is to create file data source handlers in a dedicated file. +I gestori per i Data Source file non possono trovarsi in file che importano i binding dei contratti `eth_call`, fallendo con "importazione sconosciuta: `ethereum::ethereum.call` non è stato definito" ([problema](https://github.com/graphprotocol/graph-cli/issues/4309)). La soluzione consiste nel creare gestori di data source in un file dedicato. #### Esempi -[Crypto Coven Subgraph migration](https://github.com/azf20/cryptocoven-api/tree/file-data-sources-refactor) +[Migrazione del Subgraph di Crypto Coven](https://github.com/azf20/cryptocoven-api/tree/file-data-sources-refactor) -#### References +#### Riferimenti -[GIP File Data Sources](https://forum.thegraph.com/t/gip-file-data-sources/2721) +[Data Sources del file GIP](https://forum.thegraph.com/t/gip-file-data-sources/2721) From 4e61d968aa2c45aa1bd71a2a5c291ce90d044c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:10 -0400 Subject: [PATCH 120/924] New translations creating-a-subgraph.mdx (Japanese) --- .../ja/developing/creating-a-subgraph.mdx | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/website/pages/ja/developing/creating-a-subgraph.mdx b/website/pages/ja/developing/creating-a-subgraph.mdx index c663a87c721b..60c6a37bde89 100644 --- a/website/pages/ja/developing/creating-a-subgraph.mdx +++ b/website/pages/ja/developing/creating-a-subgraph.mdx @@ -144,7 +144,7 @@ dataSources: マニフェストを更新する重要な項目は以下の通りです: -- `description`: a human-readable description of what the subgraph is. This description is displayed by the Graph Explorer when the subgraph is deployed to the hosted service. +- `description`:サブグラフが何であるかの人間が読める説明。この説明は、サブグラフがホストされたサービスにデプロイされると、グラフ・エクスプローラによって表示されます。 - `repository`: サブグラフのマニフェストが存在するリポジトリの URL です。これは、グラフエクスプローラでも表示されます。 @@ -154,9 +154,9 @@ dataSources: - `dataSources.source.startBlock`: データソースがインデックス作成を開始するブロックの番号(オプション)です。ほとんどの場合、コントラクトが作成されたブロックの使用をお勧めします。 -- `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.source.endBlock`:データ ソースがインデックス作成を停止するブロックのオプション番号 (そのブロックを含む)。必要な最小仕様バージョン: `0.0.9` -- `dataSources.context`: key-value pairs that can be used within subgraph mappings. Supports various data types like `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, and `BigInt`. Each variable needs to specify its `type` and `data`. These context variables are then accessible in the mapping files, offering more configurable options for subgraph development. +- `dataSources.context`:サブグラフマッピング内で使用できるキーと値のペア。`Bool`、`String`、`Int`、`Int8`、`BigDecimal`、`Bytes`、`List`、`BigInt`のような様々なデータ型をサポートしています。各変数は`type`と`data`を指定する必要がある。これらのコンテキスト変数は、マッピング・ファイルからアクセスすることができ、サブグラフ開発のためのより多くの設定可能なオプションを提供します。 - `dataSources.mapping.entities`: データソースがストアに書き込むエンティティです。各エンティティのスキーマは、schema.graphql ファイルで定義されます。 @@ -248,15 +248,15 @@ Null 以外のフィールド 'name' の null 値が解決されました GraphQL API では、以下の Scalar をサポートしています: -| タイプ | 説明書き | -| --- | --- | -| `Bytes` | Byte 配列で、16 進数の文字列で表されます。Ethereum のハッシュやアドレスによく使われます。 | -| `String` | `string`値の Scalar であり、Null 文字はサポートされておらず、自動的に削除されます。 | -| `Boolean` | `boolean`値を表す Scalar。 | -| `Int` | Int GraphQL の仕様では、`Int`のサイズは 32 バイトと定義されています。 | -| `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` | 大きな整数。Ethereum の`uint32`, `int64`, `uint64`, ..., `uint256` タイプに使用されます。注: `int32`, `uint24` `int8`など`uint32`以下のものは`i32`として表現されます。 | -| `BigDecimal` | `BigDecimal`は、高精度の 10 進数を記号と指数で表します。指数の範囲は -6143 ~ +6144 です。有効数字 34 桁にまとめられます。 | +| タイプ | 説明書き | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte 配列で、16 進数の文字列で表されます。Ethereum のハッシュやアドレスによく使われます。 | +| `String` | `string`値の Scalar であり、Null 文字はサポートされておらず、自動的に削除されます。 | +| `Boolean` | `boolean`値を表す Scalar。 | +| `Int` | Int GraphQL の仕様では、`Int`のサイズは 32 バイトと定義されています。 | +| `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` | 大きな整数。Ethereum の`uint32`, `int64`, `uint64`, ..., `uint256` タイプに使用されます。注: `int32`, `uint24` `int8`など`uint32`以下のものは`i32`として表現されます。 | +| `BigDecimal` | `BigDecimal`は、高精度の 10 進数を記号と指数で表します。指数の範囲は -6143 ~ +6144 です。有効数字 34 桁にまとめられます。 | #### Enums @@ -458,33 +458,33 @@ query { サポートされている言語の辞書: -| コード | 辞書 | -| ------ | ------------ | -| simple | General | -| da | Danish | -| nl | Dutch | -| en | English | -| fi | Finnish | -| fr | French | -| de | German | -| hu | Hungarian | -| it | Italian | -| no | Norwegian | -| pt | ポルトガル語 | -| ro | Romanian | -| ru | Russian | -| es | Spanish | -| sv | Swedish | -| tr | Turkish | +| コード | 辞書 | +| ------ | --------- | +| simple | General | +| da | Danish | +| nl | Dutch | +| en | English | +| fi | Finnish | +| fr | French | +| de | German | +| hu | Hungarian | +| it | Italian | +| no | Norwegian | +| pt | ポルトガル語 | +| ro | Romanian | +| ru | Russian | +| es | Spanish | +| sv | Swedish | +| tr | Turkish | ### ランキングアルゴリズム サポートされている結果の順序付けのアルゴリズム: -| アルゴリズム | 説明書き | -| ------------- | ------------------------------------------------------------------- | -| rank | フルテキストクエリのマッチ品質 (0-1) を使用して結果を並べ替えます。 | -| proximityRank | ProximityRank rank に似ていますが、マッチの近接性も含みます。 | +| アルゴリズム | 説明書き | +| ------------- | ---------------------------------------- | +| rank | フルテキストクエリのマッチ品質 (0-1) を使用して結果を並べ替えます。 | +| proximityRank | ProximityRank rank に似ていますが、マッチの近接性も含みます。 | ## マッピングの記述 @@ -531,7 +531,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -[Graph Typescript Library](https://github.com/graphprotocol/graph-ts)は、Graph Node Store とのやりとりや、スマートコントラクトのデータやエンティティを扱うための便利な機能を備えています。`mapping.ts`で`@graphprotocol/graph-ts` をインポートすることで、マッピングでこのライブラリを使用することができます。 +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## コード生成 @@ -580,7 +580,7 @@ import { Gravatar } from '../generated/schema' EVM 互換のスマート コントラクトの一般的なパターンは、レジストリ コントラクトまたはファクトリ コントラクトの使用です。1 つのコントラクトが、それぞれ独自の状態とイベントを持つ任意の数の他のコントラクトを作成、管理、または参照します。 -これらのサブコントラクトのアドレスは、事前にわかっている場合とわかっていない場合があり、これらのコントラクトの多くは、時間の経過とともに作成および/または追加される可能性があります。このような場合、単一のデータ ソースまたは固定数のデータ ソースを定義することは不可能であり、より動的なアプローチ、つまり *データ ソース テンプレート*が必要とされるのはこのためです。 +これらのサブコントラクトのアドレスは、事前にわかっている場合とわかっていない場合があり、これらのコントラクトの多くは、時間の経過とともに作成および/または追加される可能性があります。このような場合、単一のデータ ソースまたは固定数のデータ ソースを定義することは不可能であり、より動的なアプローチ、つまり _データ ソース テンプレート_が必要とされるのはこのためです。 ### メインコントラクトのデータソース @@ -660,7 +660,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **注:** 新しいデータ ソースは、それが作成されたブロックとそれに続くすべてのブロックの呼び出しとイベントのみを処理しますが、履歴データ (データなど) は処理しません。それは前のブロックに含まれています。 -> +> > 以前のブロックに新しいデータソースに関連するデータが含まれている場合は、コントラクトの現在の状態を読み取り、新しいデータソースが作成された時点でその状態を表すエンティティを作成することで、そのデータにインデックスを付けることが最善です。 ### データソースコンテクスト @@ -717,7 +717,7 @@ dataSources: ``` > **注:** コントラクト作成ブロックは、Etherscan ですばやく検索できます。 -> +> > 1. 検索バーにアドレスを入力してコントラクトを検索します。 > 2. `Contract Creator` セクションの作成トランザクションハッシュをクリックします。 > 3. トランザクションの詳細ページを読み込んで、そのコントラクトの開始ブロックを見つけます。 @@ -784,7 +784,7 @@ export function handleCreateGravatar(call: CreateGravatarCall): void { ### 対応フィルター -#### Call Filter +#### 通話フィルター ```yaml filter: @@ -822,11 +822,11 @@ dataSources: kind: call ``` -#### Polling Filter +#### ポーリングフィルター -> **Requires `specVersion` >= 0.0.8** +> **`specVersion` >= 0.0.8 が必要です。** -> **Note:** Polling filters are only available on dataSources of `kind: ethereum`. +> **注:** ポーリング フィルタは、`kind: ethereum` の dataSource でのみ使用できます。 ```yaml blockHandlers: @@ -836,13 +836,13 @@ blockHandlers: every: 10 ``` -The defined handler will be called once for every `n` blocks, where `n` is the value provided in the `every` field. This configuration allows the subgraph to perform specific operations at regular block intervals. +定義されたハンドラーは、`n` ブロックごとに 1 回呼び出されます。`n` は、`every` フィールドで指定された値です。 この構成により、サブグラフが定期的なブロック間隔で特定の操作を実行できるようになります。 -#### Once Filter +#### ワンスフィルター -> **Requires `specVersion` >= 0.0.8** +> **`specVersion` >= 0.0.8 が必要です。** -> **Note:** Once filters are only available on dataSources of `kind: ethereum`. +> **注:** Once フィルタは、`kind: ethereum` の dataSource でのみ使用できます。 ```yaml blockHandlers: @@ -851,7 +851,7 @@ blockHandlers: kind: once ``` -The defined handler with the once filter will be called only once before all other handlers run. This configuration allows the subgraph to use the handler as an initialization handler, performing specific tasks at the start of indexing. +Once フィルターを使用して定義されたハンドラーは、他のすべてのハンドラーが実行される前に 1 回だけ呼び出されます。 この構成により、サブグラフはハンドラーを初期化ハンドラーとして使用し、インデックス作成の開始時に特定のタスクを実行できるようになります。 ```ts export function handleOnce(block: ethereum.Block): void { @@ -907,9 +907,9 @@ eventHandlers: `specVersion` `0.0.4`以降、サブグラフ機能はマニフェストファイルのトップレベルにある`features`セクションで、以下の表のように`camelCase` の名前を使って明示的に宣言する必要があります: -| 特徴 | 名前 | +| 特徴 | 名前 | | --------------------------------------------------------- | --------------------------------------------------- | -| [致命的でないエラー](#non-fatal-errors) | `nonFatalErrors` | +| [致命的でないエラー](#non-fatal-errors) | `nonFatalErrors` | | [Full-text Search](#defining-fulltext-search-fields) | `fullTextSearch` | | [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | | [IPFS on Ethereum Contracts](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | @@ -989,7 +989,7 @@ _meta { ### 既存のサブグラフへのグラフト -> **Note:** it is not recommended to use grafting when initially upgrading to The Graph Network. Learn more [here](/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network). +> **注:** 最初に Graph Network にアップグレードするときにグラフティングを使用することはお勧めしません。 詳細については[こちら](/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network)をご覧ください。 サブグラフが最初にデプロイされると、対応するチェーンのジェネシス ブロック (または各データ ソースで定義された `startBlock`) でイベントのインデックス作成が開始されます。既存のサブグラフのデータを再利用し、かなり後のブロックからインデックス作成を開始することは有益です。このインデックス作成モードは _グラフティング_ と呼ばれます。失敗した既存のサブグラフを迅速に、または一時的に再び機能させることができます。 @@ -1157,7 +1157,7 @@ export function handleMetadata(content: Bytes): void { IPFS の場合、グラフノードは [v0 および v1 コンテンツ識別子、および](https://docs.ipfs.tech/concepts/content-addressing/)ディレクトリを持つコンテンツ識別子 (例: `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/server/http-api#transactions) from an Arweave gateway ([example file](https://bdxujjl5ev5eerd5ouhhs6o4kjrs4g6hqstzlci5pf6vhxezkgaa.arweave.net/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA)). Arweave supports transactions uploaded via Bundlr, and Graph Node can also fetch files based on [Bundlr manifests](https://docs.bundlr.network/learn/gateways#indexing). +Arweave の場合、バージョン 0.33.0 以降、グラフ ノードは Arweave ゲートウェイからの[transaction ID](https://docs.arweave.org/developers/server/http-api#transactions) に基づいて Arweave に保存されているファイルをフェッチできます ([example file](https://bdxujjl5ev5eerd5ouhhs6o4kjrs4g6hqstzlci5pf6vhxezkgaa.arweave.net/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA)). Arweave は Bundlr 経由でアップロードされたトランザクションをサポートしており、Graph Node は[Bundlr manifests](https://docs.bundlr.network/learn/gateways#indexing)に基づいてファイルをフェッチすることもできます。 例: From 56c1896b11d644fdef2d19a4be7debffcb0e292f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:11 -0400 Subject: [PATCH 121/924] New translations creating-a-subgraph.mdx (Korean) --- .../ko/developing/creating-a-subgraph.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/ko/developing/creating-a-subgraph.mdx b/website/pages/ko/developing/creating-a-subgraph.mdx index ace69dd1ac7d..db9e8a024571 100644 --- a/website/pages/ko/developing/creating-a-subgraph.mdx +++ b/website/pages/ko/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -531,7 +531,7 @@ Every entity has to have an `id` that is unique among all entities of the same t - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## Code Generation @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From 39fe8448e1f374739b431e96329a2d610927311f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:13 -0400 Subject: [PATCH 122/924] New translations creating-a-subgraph.mdx (Dutch) --- .../nl/developing/creating-a-subgraph.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/nl/developing/creating-a-subgraph.mdx b/website/pages/nl/developing/creating-a-subgraph.mdx index ace69dd1ac7d..db9e8a024571 100644 --- a/website/pages/nl/developing/creating-a-subgraph.mdx +++ b/website/pages/nl/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -531,7 +531,7 @@ Every entity has to have an `id` that is unique among all entities of the same t - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## Code Generation @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From 49ce1180f981adbbce24c9d474037244a300fca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:14 -0400 Subject: [PATCH 123/924] New translations creating-a-subgraph.mdx (Polish) --- .../pl/developing/creating-a-subgraph.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/pl/developing/creating-a-subgraph.mdx b/website/pages/pl/developing/creating-a-subgraph.mdx index ace69dd1ac7d..db9e8a024571 100644 --- a/website/pages/pl/developing/creating-a-subgraph.mdx +++ b/website/pages/pl/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -531,7 +531,7 @@ Every entity has to have an `id` that is unique among all entities of the same t - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## Code Generation @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From 1df38f75284e2d199b3cbf4110562d2b1cc2e1d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:15 -0400 Subject: [PATCH 124/924] New translations creating-a-subgraph.mdx (Portuguese) --- .../pt/developing/creating-a-subgraph.mdx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/website/pages/pt/developing/creating-a-subgraph.mdx b/website/pages/pt/developing/creating-a-subgraph.mdx index 87cac406608b..8b8b9b90cb3b 100644 --- a/website/pages/pt/developing/creating-a-subgraph.mdx +++ b/website/pages/pt/developing/creating-a-subgraph.mdx @@ -144,7 +144,7 @@ dataSources: As entradas importantes para atualizar para o manifest são: -- `description`: a human-readable description of what the subgraph is. This description is displayed by the Graph Explorer when the subgraph is deployed to the hosted service. +- `description`: uma descrição legível a humanos do que é o subgraph. Esta descrição é exibida pelo Graph Explorer quando o subgraph é lançado ao serviço hospedado. - `repository`: a URL do repositório onde está o manifest do subgraph. Isto também é exibido pelo Graph Explorer. @@ -154,7 +154,7 @@ As entradas importantes para atualizar para o manifest são: - `dataSources.source.startBlock`: o número opcional do bloco de onde a fonte de dados começa a indexar. Em muitos casos, sugerimos usar o bloco em que o contrato foi criado. -- `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.source.endBlock`: O número opcional do bloco onde a fonte de dados pára de indexar, o que inclui aquele bloco. Versão de spec mínima requerida: `0.0.9`. - `dataSources.context`: pares de key-value que podem ser usados dentro de mapeamentos de subgraph. Apoia vários tipos de dados como `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, e `BigInt`. Cada variável deve especificar o seu `type` e `data`. Estas variáveis de contexto são então acessíveis nos arquivos de mapeamento, a fim de oferecer opções mais configuráveis para o desenvolvimento de subgraphs. @@ -248,15 +248,15 @@ Para alguns tipos de entidade, o `id` é construído das id's de duas outras ent Nós apoiamos os seguintes escalares na nossa API do GraphQL: -| Tipo | Descrição | -| --- | --- | -| `Bytes` | Arranjo de bytes, representado como string hexadecimal. Usado frequentemente por hashes e endereços no Ethereum. | -| `String` | Escalar para valores `string`. Caracteres nulos são removidos automaticamente. | -| `Boolean` | Escalar para valores `boolean`. | -| `Int` | A especificação do GraphQL define que o `Int` tem um tamanho de 32 bytes. | -| `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` | Números inteiros grandes. Usados para os tipos `uint32`, `int64`, `uint64`, ..., `uint256` do Ethereum. Nota: Tudo abaixo de `uint32`, como `int32`, `uint24` ou `int8` é representado como `i32`. | -| `BigDecimal` | `BigDecimal` Decimais de alta precisão representados como um significando e um exponente. O alcance de exponentes é de -6143 até +6144. Arredondado para 34 dígitos significantes. | +| Tipo | Descrição | +| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Arranjo de bytes, representado como string hexadecimal. Usado frequentemente por hashes e endereços no Ethereum. | +| `String` | Escalar para valores `string`. Caracteres nulos são removidos automaticamente. | +| `Boolean` | Escalar para valores `boolean`. | +| `Int` | A especificação do GraphQL define que o `Int` tem um tamanho de 32 bytes. | +| `Int8` | Um número inteiro assinado em 8 bits, também conhecido como um número inteiro assinado em 64 bits, pode armazenar valores de -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. Prefira usar isto para representar o `i64` do ethereum. | +| `BigInt` | Números inteiros grandes. Usados para os tipos `uint32`, `int64`, `uint64`, ..., `uint256` do Ethereum. Nota: Tudo abaixo de `uint32`, como `int32`, `uint24` ou `int8` é representado como `i32`. | +| `BigDecimal` | `BigDecimal` Decimais de alta precisão representados como um significando e um exponente. O alcance de exponentes é de -6143 até +6144. Arredondado para 34 dígitos significantes. | #### Enums @@ -531,7 +531,7 @@ Toda entidade deve ter uma `id` original entre todas as entidades do mesmo tipo. - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -Nós fornecemos a [Biblioteca do Graph Typescript](https://github.com/graphprotocol/graph-ts), que contém utilidades para interagir com o armazenamento do Graph Node e conveniências para gerir entidades e dados de contratos inteligentes. Pode usar esta biblioteca nos seus mapeamentos importando o `@graphprotocol/graph-ts` no `mapping.ts`. +Nós fornecemos a [Biblioteca do Graph Typescript](https://github.com/graphprotocol/graph-ts), que contém utilidades para interagir com o armazenamento do Graph Node e conveniências para gerir entidades e dados de contratos inteligentes. Esta biblioteca pode ser usada nos seus mapeamentos importando o `@graphprotocol/graph-ts` no `mapping.ts`. ## Geração de Código @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Uma nova fonte de dados só processará as chamadas e eventos para o bloco onde ele foi criado e todos os blocos a seguir. Porém, não serão processados dados históricos, por ex, contidos em blocos anteriores. -> +> > Se blocos anteriores conterem dados relevantes à nova fonte, é melhor indexá-los ao ler o estado atual do contrato e criar entidades que representem aquele estado na hora que a nova fonte de dados for criada. ### Contextos de Fontes de Dados @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** O bloco da criação do contrato pode ser buscado rapidamente no Etherscan: -> +> > 1. Procure pelo contrato ao inserir o seu endereço na barra de busca. > 2. Clique no hash da transação da criação na seção `Contract Creator`. > 3. Carregue a página dos detalhes da transação, onde encontrará o bloco inicial para aquele contrato. From 08f747de6fac7735c86481df761d766341027409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:16 -0400 Subject: [PATCH 125/924] New translations creating-a-subgraph.mdx (Russian) --- .../ru/developing/creating-a-subgraph.mdx | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/website/pages/ru/developing/creating-a-subgraph.mdx b/website/pages/ru/developing/creating-a-subgraph.mdx index cd93eaa17e95..5829d571fedb 100644 --- a/website/pages/ru/developing/creating-a-subgraph.mdx +++ b/website/pages/ru/developing/creating-a-subgraph.mdx @@ -82,7 +82,7 @@ graph add
[] Параметр `--merge-entities` определяет, как разработчик хотел бы обрабатывать конфликты имен `entity` и `event`: -- Если `true`: новый `dataSource` должен использовать существующие ` eventHandlers` & `entities`. +- Если `true`: новый ` dataSource ` должен использовать существующие ` eventHandlers` & `entities`. - Если `false`: следует создать новую сущность и обработчик событий с помощью `${dataSourceName}{EventName}`. Контракт `address` будет записан в `networks.json` для соответствующей сети. @@ -146,7 +146,7 @@ dataSources: - `description`: понятное описание того, что представляет собой субграф. Это описание отображается в Graph Explorer при развертывании субграфа в хостинговом сервисе. -- `repository`: URL-адрес репозитория, в котором можно найти манифест субграфа. Это также отображается в The Graph Explorer. +- ` repository `: URL-адрес репозитория, в котором можно найти манифест субграфа. Это также отображается в The Graph Explorer. - `features`: список всех используемых имен [функций](#experimental-features). @@ -154,7 +154,7 @@ dataSources: - `dataSources.source.startBlock`: необязательный номер блока, с которого источник данных начинает индексацию. В большинстве случаев мы предлагаем использовать блок, в котором был создан контракт. -- `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.source.endBlock`: необязательный номер блока, индексирование которого прекращается источником данных, включая этот блок. Минимальная требуемая версия спецификации: `0.0.9`. - `dataSources.context`: пары «ключ-значение», которые можно использовать внутри мэппингов субграфов. Поддерживает различные типы данных, такие как `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List` и `BigInt`. Для каждой переменной нужно указать ее `type` и `data`. Эти контекстные переменные затем становятся доступными в файлах мэппинга, предлагая больше настраиваемых параметров для разработки субграфов. @@ -248,15 +248,15 @@ Null value resolved for non-null field 'name' Мы поддерживаем следующие скаляры в нашем GraphQL API: -| Тип | Описание | -| --- | --- | -| `Bytes` | Массив байтов, представленный в виде шестнадцатеричной строки. Обычно используется для хэшей и адресов Ethereum. | -| `String` | Скаляр для значений `string`. Нулевые символы не поддерживаются и автоматически удаляются. | -| `Boolean` | Скаляр для значений `boolean`. | -| `Int` | Спецификация GraphQL определяет `Int` как имеющий размер 32 байта. | -| `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` | Большие целые числа. Используется для типов Ethereum `uint32`, `int64`, `uint64`, ..., `uint256`. Примечание: Все, что указано ниже `uint32`, например `int32`, `uint24` или `int8`, представлено как `i32`. | -| `BigDecimal` | `BigDecimal` Десятичные дроби высокой точности, представленные в виде значащего числа и экспоненты. Диапазон значений экспонент находится в диапазоне от -6143 до +6144. Округление до 34 значащих цифр. | +| Тип | Описание | +| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Массив байтов, представленный в виде шестнадцатеричной строки. Обычно используется для хэшей и адресов Ethereum. | +| `String` | Скаляр для значений `string`. Нулевые символы не поддерживаются и автоматически удаляются. | +| `Boolean` | Скаляр для значений `boolean`. | +| `Int` | Спецификация GraphQL определяет `Int` как имеющий размер 32 байта. | +| `Int8` | 8-байтовое целое число со знаком, также называемое 64-битным целым числом со знаком, может хранить значения в диапазоне от -9 223 372 036 854 775 808 до 9 223 372 036 854 775 807. Предпочтительно использовать это для представления `i64` из Ethereum. | +| `BigInt` | Большие целые числа. Используются для типов Ethereum `uint32`, `int64`, `uint64`, ..., `uint256`. Примечание: Все, что находится ниже `uint32`, например, `int32`, `uint24` или `int8`, представлено как `i32`. | +| `BigDecimal` | `BigDecimal` Десятичные дроби высокой точности, представленные в виде значащего числа и экспоненты. Диапазон значений экспоненты от -6143 до +6144. Округляется до 34 значащих цифр. | #### Перечисления @@ -270,19 +270,19 @@ enum TokenStatus { } ``` -Как только перечисление определено в схеме, вы можете использовать строковое представление значения перечисления, чтобы задать поле перечисления для сущности. Например, вы можете установить для `tokenStatus` значение `SecondOwner`, сначала определив свою сущность, а затем установив в поле `entity.tokenStatus = "SecondOwner"`. Приведенный ниже пример демонстрирует, как будет выглядеть сущность токена с полем enum: +Как только перечисление определено в схеме, Вы можете использовать строковое представление значения перечисления, чтобы задать поле перечисления для объекта. Например, Вы можете установить для `tokenStatus` значение `SecondOwner`, сначала определив свой объект, а затем установив в поле `entity.tokenStatus = "SecondOwner"`. Приведенный ниже пример демонстрирует, как будет выглядеть объект Token с полем enum: Более подробную информацию о написании перечислений можно найти в [Документации по GraphQL](https://graphql.org/learn/schema/). -#### Связи сущностей +#### Связи объектов -Сущность может иметь связь с одной или несколькими другими сущностям в вашей схеме. Эти связи могут быть использованы в ваших запросах. Связи в The Graph являются однонаправленными. Можно смоделировать двунаправленные связи, определив однонаправленную связь на любом "конце" связи. +Объект может иметь связь с одним или несколькими другими объектами в Вашей схеме. Эти связи могут быть использованы в Ваших запросах. Связи в The Graph являются однонаправленными. Можно смоделировать двунаправленные связи, определив однонаправленную связь на любом "конце" связи. -Связи определяются для сущностей точно так же, как и для любого другого поля, за исключением того, что в качестве типа указывается тип другой сущности. +Связи определяются для объектов точно так же, как и для любого другого поля, за исключением того, что в качестве типа указывается тип другого объекта. #### Связи "Один к одному" -Определите тип сущности `Transaction` с необязательной взаимосвязью "один к одному" с типом сущности `transactionReceipt`: +Определите тип объекта `Transaction` с необязательной связью "один к одному" с типом объекта `transactionReceipt`: ```graphql type Transaction @entity(immutable: true) { @@ -298,7 +298,7 @@ type TransactionReceipt @entity(immutable: true) { #### Связи "Один ко многим" -Определите тип сущности `TokenBalance` с обязательной взаимосвязью "один ко многим" с типом сущности токена: +Определите тип объекта `TokenBalance` с обязательной связью "один ко многим" с типом объекта Token: ```graphql type Token @entity(immutable: true) { @@ -312,11 +312,11 @@ type TokenBalance @entity { } ``` -#### Обратный поиск +#### Обратные запросы -Обратный поиск может быть определен для сущности с помощью поля `@derivedFrom`. Это создает виртуальное поле в сущности, которое может быть запрошено, но не может быть задано вручную через API сопоставлений. Скорее, оно является производным от связи, определенной для другой сущности. Для таких связей редко имеет смысл сохранять обе стороны связи, и и производительность индексирования и запросов будет выше, когда сохраняется только одна сторона, а другая является производной. +Обратные зпросы могут быть определены для объекта с помощью поля `@derivedFrom`. При этом в объекте создается виртуальное поле, которое можно запрашивать, но нельзя задать вручную через API мэппингов. Скорее, оно вытекает из отношений, определенных для другого объекта. Для таких отношений редко имеет смысл сохранять обе стороны связи, а производительность как индексирования, так и запросов будет выше, когда сохраняется только одна сторона, а другая является производной. -Для связей "один ко многим" связь всегда должна храниться на стороне "один", а сторона "много" всегда должна быть производной. Такое хранение связи, вместо хранения массива сущностей на стороне "многие", приведет к значительно более высокой производительности как при индексации, так и при запросах к субграфам. В общем, следует избегать хранения массивов сущностей настолько, насколько это практически возможно. +Для связей "один ко многим" связь всегда должна храниться на стороне "один", а сторона "многие" всегда должна быть производной. Такое сохранение связи, вместо хранения массива объектов на стороне "многие", приведет к значительному повышению производительности как при индексации, так и при запросах к субграфам. В общем, следует избегать хранения массивов объектов настолько, насколько это возможно. #### Пример @@ -337,11 +337,11 @@ type TokenBalance @entity { #### Связи "Многие ко многим" -Для связей "многие ко многим", таких как пользователи, каждый из которых может принадлежать к любому числу организаций, наиболее простым, но, как правило, не самым производительным способом моделирования связей является создание массива в каждой из двух задействованных сущностей. Если связь симметрична, то необходимо сохранить только одну сторону связи, а другая сторона может быть получена. +Для связей "многие ко многим", таких, например, как пользователи, каждый из которых может принадлежать к любому числу организаций, наиболее простым, но, как правило, не самым производительным способом моделирования связей является создание массива в каждом из двух задействованных объектов. Если связь симметрична, то необходимо сохранить только одну сторону связи, а другая сторона может быть выведена. #### Пример -Определите обратный поиск от типа сущности `User` к типу сущности `Organization`. В приведенном ниже примере это достигается путем поиска атрибута `members` внутри сущности `Organization`. В запросах поле `organizations` в `User` будет разрешено путем поиска всех объектов `Organization`, которые включают идентификатор пользователя. +Определите обратный запрос от типа объекта `User` к типу объекта `Organization`. В приведенном ниже примере это достигается путем поиска атрибута `members` внутри объекта `Organization`. В запросах поле `organizations` в `User` будет разрешено путем поиска всех объектов `Organization`, включающих идентификатор пользователя. ```graphql type Organization @entity { @@ -394,11 +394,11 @@ query usersWithOrganizations { } ``` -Такой более сложный способ хранения связей "многие ко многим" приведет к уменьшению объема хранимых данных для субграфа и, следовательно, к тому, что субграф зачастую значительно быстрее индексируется и запрашивается. +Такой более сложный способ хранения связей "многие ко многим" приведет к уменьшению объема хранимых данных для субграфа и, следовательно, к тому, что субграф будет значительно быстрее индексироваться и запрашиваться. #### Добавление комментариев к схеме -Согласно спецификации GraphQL, комментарии могут быть добавлены над атрибутами сущностей схемы с использованием двойных кавычек `""`. Это проиллюстрировано в примере ниже: +Согласно спецификации GraphQL, комментарии можно добавлять над атрибутами объекта схемы с использованием двойных кавычек `""`. Это проиллюстрировано в примере ниже: ```graphql type MyFirstEntity @entity { @@ -412,7 +412,7 @@ type MyFirstEntity @entity { Полнотекстовые поисковые запросы фильтруют и ранжируют объекты на основе введенных данных текстового запроса. Полнотекстовые запросы способны возвращать совпадения по схожим словам путем обработки текста запроса в виде строк перед сравнением с индексированными текстовыми данными. -Определение полнотекстового запроса включает в себя название запроса, словарь языка, используемый для обработки текстовых полей, алгоритм ранжирования, используемый для упорядочивания результатов, и поля, включенные в поиск. Каждый полнотекстовый запрос может охватывать несколько полей, но все включенные поля должны относиться к одному типу сущности. +Определение полнотекстового запроса включает в себя название запроса, словарь языка, используемый для обработки текстовых полей, алгоритм ранжирования, используемый для упорядочивания результатов, и поля, включенные в поиск. Каждый полнотекстовый запрос может охватывать несколько полей, но все включенные поля должны относиться к одному типу объекта. Чтобы добавить полнотекстовый запрос, включите тип `_Schema_` с полнотекстовой директивой в схему GraphQL. @@ -437,7 +437,7 @@ type Band @entity { } ``` -Пример поля `bandSearch` можно использовать в запросах для фильтрации сущностей `Band` на основе текстовых документов в полях `name`, `description` и `bio`.>. Перейдите к [GraphQL API - запросы](/querying/graphql-api#queries) для описания API полнотекстового поиска и дополнительных примеров использования. +Поле example `bandSearch` можно использовать в запросах для фильтрации объектов `Band` на основе текстовых документов в `name`, `description` и `bio`.> поля. Перейдите к [GraphQL API - запросы](/querying/graphql-api#queries) для описания API полнотекстового поиска и дополнительных примеров использования. ```graphql query { @@ -450,7 +450,7 @@ query { } ``` -> **[Управление функциями](#experimental-features):** Начиная с `specVersion` `0.0.4` и далее, `fullTextSearch` должно быть объявлено в разделе `features` в манифесте субграфа. +> **[Управление функциями](#experimental-features):** Начиная с `specVersion` `0.0.4` и далее, ` fullTextSearch ` должно быть объявлено в разделе `features` в манифесте субграфа. ### Поддерживаемые языки @@ -460,7 +460,7 @@ query { | Код | Словарь | | ------- | ------------- | -| простой | General | +| простой | Общий | | da | Датский | | nl | Голландский | | en | Английский | @@ -488,7 +488,7 @@ query { ## Написание мэппингов -Мэппинги берут данные из определенного источника и преобразуют их в сущности, которые определены в вашей схеме. Мэппинги записываются в подмножестве [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html), который называется [AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki), и который может быть скомпилирован в WASM ([ WebAssembly ](https://webassembly.org/)). AssemblyScript более строг, чем обычный TypeScript, но при этом предоставляет знакомый синтаксис. +Мэппинги берут данные из определенного источника и преобразуют их в объекты, которые определены в Вашей схеме. Мэппинги записываются в подмножестве [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html), которое называется [AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki), и которое может быть скомпилировано в WASM ([ WebAssembly ](https://webassembly.org/)). AssemblyScript более строг, чем обычный TypeScript, но при этом предоставляет знакомый синтаксис. Для каждого обработчика событий, определенного в `subgraph.yaml` в разделе `mapping.EventHandlers`, создайте экспортируемую функцию с тем же именем. Каждый обработчик должен принимать один параметр с именем `event` с типом, соответствующим имени обрабатываемого события. @@ -519,19 +519,19 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -Первый обработчик принимает событие `NewGravatar` и создает новую сущность `Gravatar` с помощью `new Gravatar(event.params.id.toHex())`, заполняя поля сущности, используя соответствующие параметры события. Этот экземпляр сущности представлен переменной `gravatar` со значением идентификатора `event.params.id.toHex()`. +Первый обработчик принимает событие `NewGravatar` и создает новый объект `Gravatar` с помощью `new Gravatar(event.params.id.toHex())`, заполняя поля объекта, используя соответствующие параметры события. Этот экземпляр объекта представлен переменной `gravatar` со значением идентификатора `event.params.id.toHex()`. -Второй обработчик пытается загрузить существующий `Gravatar` из хранилища узлов The Graph. Если он еще не существует, он создается по требованию. Затем сущность обновляется в соответствии с новыми параметрами события, прежде чем он будет сохранен обратно в хранилище с помощью `gravatar.save()`. +Второй обработчик пытается загрузить существующий `Gravatar` из хранилища узлов The Graph. Если его еще нет, он создается по требованию. Затем объект обновляется в соответствии с новыми параметрами события, прежде чем он будет сохранен обратно в хранилище с помощью `gravatar.save()`. -### Рекомендуемые идентификаторы для создания новых сущностей +### Рекомендуемые идентификаторы для создания новых объектов -Каждая сущность должна иметь `id`, который является уникальным среди всех сущностей одного типа. Значение сущности `id` устанавливается при создании этой сущности. Ниже приведены некоторые рекомендуемые значения `id`, которые следует учитывать при создании новых сущностей. ПРИМЕЧАНИЕ: Значение `id` должно быть `string`. +Каждый объект должен иметь `id`, который является уникальным среди всех объектов одного типа. Значение объекта `id` устанавливается при создании этого объекта. Ниже приведены некоторые рекомендуемые значения `id`, которые следует учитывать при создании новых объектов. ПРИМЕЧАНИЕ: Значение `id` должно быть `string`. - `event.params.id.toHex()` - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -Мы предоставляем [Библиотеку Graph Typescript](https://github.com/graphprotocol/graph-ts), которая содержит утилиты для взаимодействия с хранилищем узлов The Graph и удобства для обработки данных смарт-контрактов и сущностей. Вы можете использовать эту библиотеку в своих мэппингах, импортировав `@graphprotocol/graph-ts` в `mapping.ts`. +Мы предоставляем [Библиотеку Graph Typescript](https://github.com/graphprotocol/graph-ts), которая содержит утилиты для взаимодействия с хранилищем узлов The Graph и удобства для обработки данных смарт-контрактов и объектов. Вы можете использовать эту библиотеку в своих мэппингах, импортировав `@graphprotocol/graph-ts` в `mapping.ts`. ## Генерация кода @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Примечание:** Новый источник данных будет обрабатывать только вызовы и события для блока, в котором он был создан, и всех последующих блоков, но не будет обрабатывать исторические данные, т.е. данные, которые содержатся в предыдущих блоках. -> +> > Если предыдущие блоки содержат данные, относящиеся к новому источнику данных, лучше всего проиндексировать эти данные, считывая текущее состояние контракта и создавая сущности, представляющие это состояние на момент создания нового источника данных. ### Контекст источника данных @@ -716,7 +716,7 @@ dataSources: ``` > **Примечание:** Блок создания контракта можно быстро найти в Etherscan: -> +> > 1. Найдите контракт, введя его адрес в строке поиска. > 2. Нажмите на хэш транзакции создания в разделе `Contract Creator`. > 3. Загрузите страницу сведений о транзакции, где вы найдете начальный блок для этого контракта. @@ -756,7 +756,7 @@ dataSources: handler: handleCreateGravatar ``` -`function` - это нормализованная сигнатура функции, по которой можно фильтровать вызовы. Свойство `handler` - это имя функции в вашем мэппинге, которую вы хотели бы выполнить при вызове целевой функции в контракте источника данных. +` function ` - это нормализованная сигнатура функции, по которой можно фильтровать вызовы. Свойство `handler` - это имя функции в вашем мэппинге, которую вы хотели бы выполнить при вызове целевой функции в контракте источника данных. ### Функция мэппинга @@ -792,7 +792,7 @@ filter: _Определенный обработчик будет вызван один раз для каждого блока, содержащего обращение к контракту (источнику данных), в соответствии с которым определен обработчик._ -> **Примечание:** Фильтр `call` в настоящее время зависит от Parity tracing API. Некоторые сети, такие как BNB chain и Arbitrium, не поддерживают этот API. Если субграф, индексирующий одну из этих сетей, содержит один или несколько обработчиков блоков с фильтром `call`, синхронизация не начнется. +> **Примечание:** Фильтр ` call ` в настоящее время зависит от Parity tracing API. Некоторые сети, такие как BNB chain и Arbitrium, не поддерживают этот API. Если субграф, индексирующий одну из этих сетей, содержит один или несколько обработчиков блоков с фильтром `call`, синхронизация не начнется. Отсутствие фильтра для обработчика блоков гарантирует, что обработчик вызывается для каждого блока. Источник данных может содержать только один обработчик блоков для каждого типа фильтра. From ef72783b787cdebe6c0e3ba76f0f218fee406926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:17 -0400 Subject: [PATCH 126/924] New translations creating-a-subgraph.mdx (Swedish) --- .../sv/developing/creating-a-subgraph.mdx | 139 +++++++++--------- 1 file changed, 72 insertions(+), 67 deletions(-) diff --git a/website/pages/sv/developing/creating-a-subgraph.mdx b/website/pages/sv/developing/creating-a-subgraph.mdx index a0ea1f3d0fdc..d6bb42a330e7 100644 --- a/website/pages/sv/developing/creating-a-subgraph.mdx +++ b/website/pages/sv/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ För vissa entitetstyper konstrueras `id` från id:erna hos två andra entiteter Vi stödjer följande skalartyper i vår GraphQL API: -| Typ | Beskrivning | -| --- | --- | -| `Bytes` | Bytematris, representerad som en hexadecimal sträng. Vanligt används för Ethereum-hashar och adresser. | -| `String` | Skalär för `string`-värden. Nolltecken stöds inte och tas automatiskt bort. | -| `Boolean` | Skalär för `boolean`-värden. | -| `Int` | Enligt GraphQL specifikationen har `Int` en storlek på 32 byte. | -| `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` | Stora heltal. Används för Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` typer. Observera: Allt under `uint32`, som `int32`, `uint24` eller `int8` representeras som `i32`. | -| `BigDecimal` | `BigDecimal` Högprecisionsdecimaler representerade som en signifikant och en exponent. Exponentområdet är från −6143 till +6144. Avrundat till 34 signifikanta siffror. | +| Typ | Beskrivning | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Bytematris, representerad som en hexadecimal sträng. Vanligt används för Ethereum-hashar och adresser. | +| `String` | Skalär för `string`-värden. Nolltecken stöds inte och tas automatiskt bort. | +| `Boolean` | Skalär för `boolean`-värden. | +| `Int` | Enligt GraphQL specifikationen har `Int` en storlek på 32 byte. | +| `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` | Stora heltal. Används för Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` typer. Observera: Allt under `uint32`, som `int32`, `uint24` eller `int8` representeras som `i32`. | +| `BigDecimal` | `BigDecimal` Högprecisionsdecimaler representerade som en signifikant och en exponent. Exponentområdet är från −6143 till +6144. Avrundat till 34 signifikanta siffror. | #### Enums @@ -422,7 +422,12 @@ type _Schema_ name: "bandSearch" language: en algorithm: rank - include: [{ entity: "Band", fields: [{ name: "name" }, { name: "description" }, { name: "bio" }] }] + include: [ + { + entity: "Band" + fields: [{ name: "name" }, { name: "description" }, { name: "bio" }] + } + ] ) type Band @entity { @@ -531,7 +536,7 @@ Varje entitet måste ha ett `id` som är unikt bland alla entiteter av samma typ - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -Vi tillhandahåller [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) som innehåller verktyg för att interagera med Graph Node-lagringen och bekvämligheter för att hantera smart kontraktsdata och entiteter. Du kan använda denna bibliotek i dina mappningar genom att importera `@graphprotocol/graph-ts` i `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## Kodgenerering @@ -562,13 +567,13 @@ import { // The events classes: NewGravatar, UpdatedGravatar, -} from '../generated/Gravity/Gravity' +} from "../generated/Gravity/Gravity"; ``` Utöver detta genereras en klass för varje entitetstyp i subgrafens GraphQL-schema. Dessa klasser tillhandahåller typsäker entitetsladdning, läs- och skrivåtkomst till entitetsfält samt en `save()`-metod för att skriva entiteter till lagret. Alla entitetsklasser skrivs till `/schema.ts`, vilket gör att mappningar kan importera dem med ```javascript -import { Gravatar } from '../generated/schema' +import { Gravatar } from "../generated/schema" ``` > **Observera:** Kodgenerering måste utföras igen efter varje ändring av GraphQL-schemat eller ABIn som ingår i manifestet. Det måste också utföras minst en gång innan du bygger eller distribuerar subgrafet. @@ -591,7 +596,7 @@ dataSources: name: Factory network: mainnet source: - address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' + address: "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95" abi: Factory mapping: kind: ethereum/events @@ -649,17 +654,17 @@ templates: I det sista steget uppdaterar du mappningen av huvudkontraktet för att skapa en dynamisk datakällinstans från en av mallarna. I det här exemplet ändrar du mappningen av huvudkontraktet för att importera mallen `Exchange` och anropar metoden `Exchange.create(address)` för att börja indexera det nya växlingskontraktet. ```typescript -import { Exchange } from '../generated/templates' +import { Exchange } from "../generated/templates"; export function handleNewExchange(event: NewExchange): void { // Start indexing the exchange; `event.params.exchange` is the // address of the new exchange contract - Exchange.create(event.params.exchange) + Exchange.create(event.params.exchange); } ``` > ** Notera:** En ny datakälla bearbetar endast anrop och händelser för det block där den skapades och alla efterföljande block, men bearbetar inte historiska data, dvs. data som finns i tidigare block. -> +> > Om tidigare block innehåller data som är relevanta för den nya datakällan, är det bäst att indexera dessa data genom att läsa kontraktets aktuella status och skapa enheter som representerar denna status vid den tidpunkt då den nya datakällan skapas. ### Kontext för datakälla @@ -667,22 +672,22 @@ export function handleNewExchange(event: NewExchange): void { Datakällans kontext gör det möjligt att skicka extra konfiguration när en mall instansieras. I vårt exempel kan vi säga att börser är associerade med ett visst handelspar, vilket ingår i händelsen `NewExchange`. Den informationen kan skickas till den instansierade datakällan, så här: ```typescript -import { Exchange } from '../generated/templates' +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) + let context = new DataSourceContext(); + context.setString("tradingPair", event.params.tradingPair); + Exchange.createWithContext(event.params.exchange, context); } ``` Inuti en mappning av mallen `Exchange` kan kontexten sedan nås: ```typescript -import { dataSource } from '@graphprotocol/graph-ts' +import { dataSource } from "@graphprotocol/graph-ts"; -let context = dataSource.context() -let tradingPair = context.getString('tradingPair') +let context = dataSource.context(); +let tradingPair = context.getString("tradingPair") ``` Det finns sättare och hämtare som `setString` och `getString` för alla värdestyper. @@ -697,7 +702,7 @@ dataSources: name: ExampleSource network: mainnet source: - address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' + address: "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95" abi: ExampleContract startBlock: 6627917 mapping: @@ -716,7 +721,7 @@ dataSources: ``` > **Observera:** Blocket där kontraktet skapades kan snabbt sökas upp på Etherscan: -> +> > 1. Sök efter kontraktet genom att ange dess adress i sökfältet. > 2. Klicka på transaktionshashen för skapandet i avsnittet `Kontraktsskapare`. > 3. Ladda sidan med transaktionsdetaljer där du hittar startblocket för det kontraktet. @@ -739,7 +744,7 @@ dataSources: name: Gravity network: mainnet source: - address: '0x731a10897d267e19b34503ad902d0a29173ba4b1' + address: "0x731a10897d267e19b34503ad902d0a29173ba4b1" abi: Gravity mapping: kind: ethereum/events @@ -763,15 +768,15 @@ dataSources: Varje anropsbehandlare tar en enda parameter med en typ som motsvarar namnet på den kallade funktionen. I det ovanstående exempelsubgrafet innehåller kartläggningen en hanterare för när funktionen `createGravatar` anropas och tar emot en `CreateGravatarCall`-parameter som ett argument: ```typescript -import { CreateGravatarCall } from '../generated/Gravity/Gravity' -import { Transaction } from '../generated/schema' +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() + let id = call.transaction.hash; + let transaction = new Transaction(id); + transaction.displayName = call.inputs._displayName; + transaction.imageUrl = call.inputs._imageUrl; + transaction.save(); } ``` @@ -802,7 +807,7 @@ dataSources: name: Gravity network: dev source: - address: '0x731a10897d267e19b34503ad902d0a29173ba4b1' + address: "0x731a10897d267e19b34503ad902d0a29173ba4b1" abi: Gravity mapping: kind: ethereum/events @@ -854,9 +859,9 @@ Den definierade hanteraren med filtret once kommer att anropas endast en gång i ```ts export function handleOnce(block: ethereum.Block): void { - let data = new InitialData(Bytes.fromUTF8('initial')) - data.data = 'Setup data here' - data.save() + let data = new InitialData(Bytes.fromUTF8("initial")); + data.data = "Setup data here"; + data.save(); } ``` @@ -865,12 +870,12 @@ export function handleOnce(block: ethereum.Block): void { Mappningsfunktionen tar emot ett `ethereum.Block` som sitt enda argument. Liksom mappningsfunktioner för händelser kan denna funktion komma åt befintliga subgrafiska enheter i lagret, anropa smarta kontrakt och skapa eller uppdatera enheter. ```typescript -import { ethereum } from '@graphprotocol/graph-ts' +import { ethereum } from "@graphprotocol/graph-ts"; export function handleBlock(block: ethereum.Block): void { - let id = block.hash - let entity = new Block(id) - entity.save() + let id = block.hash; + let entity = new Block(id); + entity.save(); } ``` @@ -1123,26 +1128,26 @@ const cid = dataSource.stringParam() Exempel på hanterare: ```typescript -import { json, Bytes, dataSource } from '@graphprotocol/graph-ts' -import { TokenMetadata } from '../generated/schema' +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() + 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') + 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.name = name.toString(); + tokenMetadata.image = image.toString(); + tokenMetadata.externalURL = externalURL.toString(); + tokenMetadata.description = description.toString(); } - tokenMetadata.save() + tokenMetadata.save(); } } ``` @@ -1161,29 +1166,29 @@ För Arweave, från och med version 0.33.0 kan Graph Node hämta filer som är l Exempel: ```typescript -import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates' +import { TokenMetadata as TokenMetadataTemplate } from "../generated/templates"; -const ipfshash = 'QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm' +const ipfshash = "QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm"; //Denna exempelkod är för en undergraf för kryptosamverkan. Ovanstående ipfs-hash är en katalog med tokenmetadata för alla kryptosamverkande NFT:er. export function handleTransfer(event: TransferEvent): void { - let token = Token.load(event.params.tokenId.toString()) + let token = Token.load(event.params.tokenId.toString()); if (!token) { - token = new Token(event.params.tokenId.toString()) - token.tokenID = event.params.tokenId + token = new Token(event.params.tokenId.toString()); + token.tokenID = event.params.tokenId; - token.tokenURI = '/' + event.params.tokenId.toString() + '.json' - const tokenIpfsHash = ipfshash + token.tokenURI + token.tokenURI = "/" + event.params.tokenId.toString() + ".json"; + const tokenIpfsHash = ipfshash + token.tokenURI; //Detta skapar en sökväg till metadata för en enskild Crypto coven NFT. Den konkaterar katalogen med "/" + filnamn + ".json" - token.ipfsURI = tokenIpfsHash + token.ipfsURI = tokenIpfsHash; - TokenMetadataTemplate.create(tokenIpfsHash) + TokenMetadataTemplate.create(tokenIpfsHash); } - token.updatedAtTimestamp = event.block.timestamp - token.owner = event.params.to.toHexString() - token.save() + token.updatedAtTimestamp = event.block.timestamp; + token.owner = event.params.to.toHexString(); + token.save(); } ``` From 80a57fb0cda7fddef936ac1bbc1dfceea51287d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:18 -0400 Subject: [PATCH 127/924] New translations creating-a-subgraph.mdx (Turkish) --- .../tr/developing/creating-a-subgraph.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/tr/developing/creating-a-subgraph.mdx b/website/pages/tr/developing/creating-a-subgraph.mdx index e8b21ade1d7e..4cc6f0946d55 100644 --- a/website/pages/tr/developing/creating-a-subgraph.mdx +++ b/website/pages/tr/developing/creating-a-subgraph.mdx @@ -144,7 +144,7 @@ dataSources: Manifest için güncellenmesi gereken önemli girdiler şunlardır: -- `description`: a human-readable description of what the subgraph is. This description is displayed by the Graph Explorer when the subgraph is deployed to the hosted service. +- `description`: Subgraph'in ne olduğuna dair insan tarafından okunabilen bir açıklama. Bu açıklama, subgraph barındırılan hizmete deploy edildiğinde Graph Gezgini tarafından görüntülenir. - `repository`: Subgraph manifest'inin bulunabileceği havuz URL'si. Ayrıca Graph Gezgini tarafından da görüntülenir. @@ -154,7 +154,7 @@ Manifest için güncellenmesi gereken önemli girdiler şunlardır: - `dataSources.source.startBlock`: veri kaynağının indekslemeye başladığı isteğe bağlı blok numarası. Çoğu durumda, sözleşmenin oluşturulduğu bloğun kullanılmasını öneririz. -- `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.source.endBlock`: Veri kaynağının indekslemeyi durdurduğu bloğun isteğe bağlı numarası (bu blok da dahil). Gereken minimum spesifikasyon sürümü: `0.0.9`. - `dataSources.context`: subgraph eşleştirmelerinde kullanılabilen anahtar-değer çiftleridir. `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List` ve `BigInt` gibi çeşitli veri tipleri desteklenir. Her değişkenin `type` ve `data` özelliklerinin belirtilmesi gerekir. Bu bağlam değişkenlerine daha sonra eşleştirme dosyalarından erişilebilir ve böylece subgraph geliştirme için daha yapılandırılabilir seçenekler sunulmuş olur. @@ -248,15 +248,15 @@ Bazı varlık türleri için `id`, iki diğer varlığın id'lerinden oluşturul GraphQL API'mizde aşağıdaki skalerleri destekliyoruz: -| Tür | Tanım | -| --- | --- | -| `Baytlar` | Byte dizisi, onaltılık bir dizgi olarak temsil edilir. Ethereum hash değerleri ve adresleri için yaygın olarak kullanılır. | -| `Dizgi(String)` | `string` değerleri için skaler. Null karakterleri desteklenmez ve otomatik olarak kaldırılır. | -| `Boolean` | `boolean` değerleri için skaler. | -| `Int` | GraphQL özellikleri, `Int`'in 32 bayt boyutunda olduğunu tanımlar. | -| `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` | Büyük tamsayılar. Ethereum'un `uint32`, `int64`, `uint64`, ..., `uint256` türleri için kullanılır. Not: `int32`, `uint24` veya `int8` gibi `uint32`'nin altındaki her şey `i32`olarak temsil edilir. | -| `BigDecimal` | `BigDecimal` Yüksek hassasiyetli ondalık sayılar, bir anlamlı ve bir üsle temsil edilir. Üs aralığı -6143 ila +6144 arasındadır. 34 anlamlı rakama yuvarlanır. | +| Tür | Tanım | +| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Baytlar` | Byte dizisi, onaltılık bir dizgi olarak temsil edilir. Ethereum hash değerleri ve adresleri için yaygın olarak kullanılır. | +| `Dizgi(String)` | `string` değerleri için skaler. Null karakterleri desteklenmez ve otomatik olarak kaldırılır. | +| `Boolean` | `boolean` değerleri için skaler. | +| `Int` | GraphQL özellikleri, `Int`'in 32 bayt boyutunda olduğunu tanımlar. | +| `Int8` | 64 bitlik işaretli tam sayı olarak da bilinen 8 baytlık işaretli tam sayı, -9,223,372,036,854,775,808 ila 9,223,372,036,854,775,807 aralığındaki değerleri depolayabilir. Ethereum'dan `i64`'ü temsil etmek için bunu kullanmayı tercih edin. | +| `BigInt` | Büyük tamsayılar. Ethereum'un `uint32`, `int64`, `uint64`, ..., `uint256` türleri için kullanılır. Not: `int32`, `uint24` veya `int8` gibi `uint32`'nin altındaki her şey `i32`olarak temsil edilir. | +| `BigDecimal` | `BigDecimal` Yüksek hassasiyetli ondalık sayılar, bir anlamlı ve bir üsle temsil edilir. Üs aralığı -6143 ila +6144 arasındadır. 34 anlamlı rakama yuvarlanır. | #### Numaralandırmalar @@ -531,7 +531,7 @@ Her varlığın aynı türdeki tüm varlıklar arasında benzersiz olan bir `id` - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -Graph Düğümü deposuyla etkileşim için yardımcı programlar, akıllı sözleşme verileri ve varlıklarını işlemek için kolaylık sağlaması açısından [Graph Typescript Kütüphanesi](https://github.com/graphprotocol/graph-ts)'ni sunuyoruz. `mapping.ts`'de `@graphprotocol/graph-ts` 'yi içe aktararak bu kitaplığı eşleştirmelerinizde kullanabilirsiniz. +Graph Node'u mağazasıyla etkileşim kurmaya yönelik yardımcı programları ve akıllı sözleşme verilerini ve varlıklarını yönetmeye yönelik kolaylıkları içeren [Graph Yazı Tipi Kitaplığı](https://github.com/graphprotocol/graph-ts)'nı sağlıyoruz. `@graphprotocol/graph-ts`'i `mapping.ts`'ye aktararak bu kütüphaneyi eşlemelerinizde kullanabilirsiniz. ## Kod Oluşturma @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Not:** Yeni bir veri kaynağı, oluşturulduğu blok ve tüm takip eden bloklar için yalnızca çağrıları ve olayları işleyecektir, ancak önceki bloklarda bulunan geçmiş verileri işlemeyecektir. -> +> > Eğer önceki bloklar, yeni veri kaynağı için ilgili veri içeriyorsa, o veriyi indekslemek için sözleşmenin mevcut durumunu okuyarak ve yeni veri kaynağı oluşturulurken o zaman dilimindeki durumu temsil eden varlıklar oluşturarak yapmak en iyisidir. ### Veri Kaynağı Bağlamı @@ -716,7 +716,7 @@ dataSources: ``` > **Not:** Sözleşme oluşturma bloğu hızlı bir şekilde Etherscan'da aranabilir: -> +> > 1. Arama çubuğuna adresini girerek sözleşmeyi arayın. > 2. `Contract Creator` bölümünde oluşturma işlemi hash'ına tıklayın. > 3. İşlem detayları sayfasını yükleyin ve bu sözleşme için başlangıç bloğunu bulacaksınız. @@ -783,7 +783,7 @@ Bir subgraph, sözleşme olaylarına veya işlev çağrılarına abone olmanın ### Desteklenen Filtreler -#### Call Filter +#### Arama Filtresi ```yaml filter: From d7da048ab1673470823e43df961d3833ef2039d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:19 -0400 Subject: [PATCH 128/924] New translations creating-a-subgraph.mdx (Ukrainian) --- .../uk/developing/creating-a-subgraph.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/uk/developing/creating-a-subgraph.mdx b/website/pages/uk/developing/creating-a-subgraph.mdx index 68f00c22f6e2..e557d92701e6 100644 --- a/website/pages/uk/developing/creating-a-subgraph.mdx +++ b/website/pages/uk/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -531,7 +531,7 @@ Every entity has to have an `id` that is unique among all entities of the same t - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## Code Generation @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From fa667266520411d31982a4bcf96d63dbecb52762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:21 -0400 Subject: [PATCH 129/924] New translations creating-a-subgraph.mdx (Chinese Simplified) --- .../zh/developing/creating-a-subgraph.mdx | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/website/pages/zh/developing/creating-a-subgraph.mdx b/website/pages/zh/developing/creating-a-subgraph.mdx index 7f005360b4d2..4b422cf814e9 100644 --- a/website/pages/zh/developing/creating-a-subgraph.mdx +++ b/website/pages/zh/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Null value resolved for non-null field 'name' 我们在 GraphQL API 中支持以下标量: -| 类型 | 描述 | -| --- | --- | -| `字节` | 字节数组,表示为十六进制字符串。 通常用于以太坊hash和地址。 | -| `字符串` | `string` 值的标量。 不支持空字符,并会自动进行删除。 | -| `Boolean` | `boolean` 值的标量。 | -| `Int` | GraphQL 规范将 `Int` 定义为 32 字节的大小。 | -| `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` | 大整数。 用于以太坊的 `uint32`、`int64`、`uint64`、...、`uint256` 类型。 注意:`uint32`以下的所有类型,例如`int32`、`uint24`或`int8`都表示为`i32`。 | -| `BigDecimal` | `BigDecimal` 表示为有效数字和指数的高精度小数。 指数范围是 -6143 到 +6144。 四舍五入到 34 位有效数字。 | +| 类型 | 描述 | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `字节` | 字节数组,表示为十六进制字符串。 通常用于以太坊hash和地址。 | +| `字符串` | `string` 值的标量。 不支持空字符,并会自动进行删除。 | +| `Boolean` | `boolean` 值的标量。 | +| `Int` | GraphQL 规范将 `Int` 定义为 32 字节的大小。 | +| `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` | 大整数。 用于以太坊的 `uint32`、`int64`、`uint64`、...、`uint256` 类型。 注意:`uint32`以下的所有类型,例如`int32`、`uint24`或`int8`都表示为`i32`。 | +| `BigDecimal` | `BigDecimal` 表示为有效数字和指数的高精度小数。 指数范围是 -6143 到 +6144。 四舍五入到 34 位有效数字。 | #### 枚举类型 @@ -458,33 +458,33 @@ query { 支持的语言词典: -| 代码 | 词典 | -| ------ | ---------- | -| simple | 通用 | -| da | 丹麦语 | -| nl | 荷兰语 | -| en | 英语 | -| fi | 芬兰语 | -| fr | 法语 | -| de | 德语 | -| hu | 匈牙利语 | -| it | 意大利语 | -| no | 挪威语 | -| pt | 葡萄牙语 | +| 代码 | 词典 | +| ------ | ----- | +| simple | 通用 | +| da | 丹麦语 | +| nl | 荷兰语 | +| en | 英语 | +| fi | 芬兰语 | +| fr | 法语 | +| de | 德语 | +| hu | 匈牙利语 | +| it | 意大利语 | +| no | 挪威语 | +| pt | 葡萄牙语 | | ro | 罗马尼亚语 | -| ru | 俄语 | -| es | 西班牙语 | -| sv | 瑞典语 | -| tr | 土耳其语 | +| ru | 俄语 | +| es | 西班牙语 | +| sv | 瑞典语 | +| tr | 土耳其语 | ### 排序算法 支持的排序结果算法: -| 算法 | 描述 | -| ------------- | --------------------------------------------- | +| 算法 | 描述 | +| ------------- | -------------------------- | | rank | 使用全文查询的匹配质量 (0-1) 对结果进行排序。 | -| proximityRank | 与 rank 类似,但也包括匹配的接近程度。 | +| proximityRank | 与 rank 类似,但也包括匹配的接近程度。 | ## 编写映射 @@ -531,7 +531,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -我们提供 [Graph Typescript 库](https://github.com/graphprotocol/graph-ts),其中包含与 Graph 节点存储交互的实用程序以及处理智能合约数据和实体的便利。 您可以通过在 `mapping.ts` 中导入 `@graphprotocol/graph-ts` ,从而在映射中使用此库。 +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## 代码生成 @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **注意:** 新的数据源只会处理创建它的区块和所有后续区块的调用和事件,而不会处理历史数据,也就是包含在先前区块中的数据。 -> +> > 如果先前的区块包含与新数据源相关的数据,最好通过读取合约的当前状态,并在创建新数据源时创建表示该状态的实体来索引该数据。 ### 数据源背景 @@ -716,7 +716,7 @@ dataSources: ``` > **注意:** 合约创建区块可以在 Etherscan 上快速查找: -> +> > 1. 通过在搜索栏中输入合约地址来搜索合约。 > 2. 单击 `Contract Creator` 部分中的创建交易hash。 > 3. 加载交易详情页面,您将在其中找到该合约的起始区块。 @@ -783,7 +783,7 @@ export function handleCreateGravatar(call: CreateGravatarCall): void { ### 支持的过滤器 -#### Call Filter +#### 调用筛选器 ```yaml filter: @@ -821,11 +821,11 @@ dataSources: kind: call ``` -#### Polling Filter +#### 投票筛选器 > **Requires `specVersion` >= 0.0.8** -> **Note:** Polling filters are only available on dataSources of `kind: ethereum`. +> **注意:** 投票筛选器仅适用于`kind: ethereum`的数据源。 ```yaml blockHandlers: @@ -835,13 +835,13 @@ blockHandlers: every: 10 ``` -The defined handler will be called once for every `n` blocks, where `n` is the value provided in the `every` field. This configuration allows the subgraph to perform specific operations at regular block intervals. +所定义的处理程序将在每`n`个块上被调用一次,其中`n`的值由`every`字段提供。这种配置允许子图以固定的区块间隔执行特定的操作。 -#### Once Filter +#### 一次性筛选器 > **Requires `specVersion` >= 0.0.8** -> **Note:** Once filters are only available on dataSources of `kind: ethereum`. +> **注意:** 一次性筛选器仅适用于`kind: ethereum`的数据源。 ```yaml blockHandlers: @@ -850,7 +850,7 @@ blockHandlers: kind: once ``` -The defined handler with the once filter will be called only once before all other handlers run. This configuration allows the subgraph to use the handler as an initialization handler, performing specific tasks at the start of indexing. +带有 "once filter" 的所定义处理程序将在所有其他处理程序运行之前仅被调用一次。这种配置允许子图将该处理程序用作初始化处理程序,在索引开始时执行特定任务。 ```ts export function handleOnce(block: ethereum.Block): void { @@ -906,12 +906,12 @@ eventHandlers: 从 `specVersion` `0.0.4` 开始,子图特征必须使用它们的 `camelCase` 名称,在清单文件顶层的 `features` 部分中显式声明,如下表所列: -| 特征 | 名称 | -| ------------------------------------------------- | --------------------------------------------------- | -| [非致命错误](#non-fatal-errors) | `nonFatalErrors` | -| [全文搜索](#defining-fulltext-search-fields) | `fullTextSearch` | -| [嫁接](#grafting-onto-existing-subgraphs) | `grafting` | -| [以太坊合约上的IPFS](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | +| 特征 | 名称 | +| --------------------------- | --------------------------------------------------- | +| [非致命错误](#非致命错误) | `nonFatalErrors` | +| [全文搜索](#定义全文搜索字段) | `fullTextSearch` | +| [嫁接](#嫁接到现有子图) | `grafting` | +| [以太坊合约上的IPFS](#以太坊合约上的IPFS) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | 例如,如果子图使用 **Full-Text Search** 和 **Non-fatal Errors** 功能,则清单中的 `features` 字段应为: @@ -988,9 +988,9 @@ _meta { ### 嫁接到现有子图 -> **Note:** it is not recommended to use grafting when initially upgrading to The Graph Network. Learn more [here](/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network). +> **注意:** 在初次升级到The Graph Network时,不建议使用grafting。可以在[这里](/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network)了解更多信息。 -首次部署子图时,它会在相应链的启动区块(或每个数据源定义的 `startBlock` 处)开始索引事件。在某些情况下,可以使用现有子图已经索引的数据并在更晚的区块上开始索引。 这种索引模式称为*Grafting*。 例如,嫁接在开发过程中非常有用,可以快速克服映射中的简单错误,或者在现有子图失败后暂时恢复工作。 +首次部署子图时,它会在相应链的启动区块(或每个数据源定义的 `startBlock` 处)开始索引事件。在某些情况下,可以使用现有子图已经索引的数据并在更晚的区块上开始索引。 这种索引模式称为_Grafting_。 例如,嫁接在开发过程中非常有用,可以快速克服映射中的简单错误,或者在现有子图失败后暂时恢复工作。 当 `subgraph.yaml` 中的子图清单在顶层包含 `graft` 区块时,子图被嫁接到基础子图: @@ -1019,7 +1019,7 @@ graft: ## 文件数据源 -File data sources are a new subgraph functionality for accessing off-chain data during indexing in a robust, extendable way. File data sources support fetching files from IPFS and from Arweave. +文件数据源是一种新的子图功能,用于以稳健、可扩展的方式在索引期间访问链下数据。文件数据源支持从IPFS和Arweave获取文件。 > 这也为链外数据的确定性索引以及引入任意HTTP源数据奠定了基础。 @@ -1086,7 +1086,7 @@ type TokenMetadata @entity { > 可以使用[嵌套](https://thegraph.com/docs/en/querying/graphql-api/#example-for-nested-entity-filtering)过滤器根据这些嵌套实体过滤母实体。 -#### Add a new templated data source with `kind: file/ipfs` or `kind: file/arweave` +#### 添加一个新的模板数据源,使用`kind: file/ipfs`或`kind: file/arweave`。 这是在识别出感兴趣的文件时生成的数据源。 @@ -1152,9 +1152,9 @@ export function handleMetadata(content: Bytes): void { 现在,您可以在执行基于链的处理程序期间创建文件数据源: - 从自动生成的`模板`导入模板 -- call `TemplateName.create(cid: string)` from within a mapping, where the cid is a valid content identifier for IPFS or Arweave +- 从映射中调用`TemplateName.create(cid:string)`,其中cid是有效的IPFS或Arweave内容标识符 -For IPFS, Graph Node supports [v0 and v1 content identifiers](https://docs.ipfs.tech/concepts/content-addressing/), and content identifers with directories (e.g. `bafyreighykzv2we26wfrbzkcdw37sbrby4upq7ae3aqobbq7i4er3tnxci/metadata.json`). +对于IPFS,Graph Node支持[v0和v1内容标识符](https://docs.ipfs.tech/concepts/content-addressing/),以及带有目录的内容标识符(例如`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/server/http-api#transactions) from an Arweave gateway ([example file](https://bdxujjl5ev5eerd5ouhhs6o4kjrs4g6hqstzlci5pf6vhxezkgaa.arweave.net/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA)). Arweave supports transactions uploaded via Bundlr, and Graph Node can also fetch files based on [Bundlr manifests](https://docs.bundlr.network/learn/gateways#indexing). @@ -1163,7 +1163,7 @@ For Arweave, as of version 0.33.0 Graph Node can fetch files stored on Arweave b ```typescript import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates' -const ipfshash = 'QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm' +const ipfshash = "QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm" //This example code is for a Crypto coven subgraph. The above ipfs hash is a directory with token metadata for all crypto coven NFTs. export function handleTransfer(event: TransferEvent): void { @@ -1187,7 +1187,7 @@ export function handleTransfer(event: TransferEvent): void { } ``` -This will create a new file data source, which will poll Graph Node's configured IPFS or Arweave endpoint, retrying if it is not found. When the file is found, the file data source handler will be executed. +这将创建一个新的文件数据源,该数据源将轮询Graph Node配置的IPFS或Arweave端点,如果未找到文件,则进行重试。当找到文件时,文件数据源处理程序将被执行。 此示例使用 CID 作为母 `Token` 实体和生成的 `TokenMetadata` 实体之间的查找。 From d66ee30ac17eb0a476359ba02bc9b8f9c3819a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:22 -0400 Subject: [PATCH 130/924] New translations creating-a-subgraph.mdx (Urdu (Pakistan)) --- .../ur/developing/creating-a-subgraph.mdx | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/ur/developing/creating-a-subgraph.mdx b/website/pages/ur/developing/creating-a-subgraph.mdx index 4db28da404c5..ca124aa9a714 100644 --- a/website/pages/ur/developing/creating-a-subgraph.mdx +++ b/website/pages/ur/developing/creating-a-subgraph.mdx @@ -144,7 +144,7 @@ dataSources: مینی فیسٹ کے لیے اپ ڈیٹ کرنے کے لیے اہم اندراجات یہ ہیں: -- `description`: a human-readable description of what the subgraph is. This description is displayed by the Graph Explorer when the subgraph is deployed to the hosted service. +- `تفصیل`: سب گراف کیا ہے اس کی انسانی پڑھنے کے قابل وضاحت۔ یہ تفصیل گراف ایکسپلورر کے ذریعہ اس وقت ظاہر ہوتی ہے جب سب گراف کو ہوسٹڈ سروس میں تعینات کیا جاتا ہے۔ - `repository`: ریپوزٹری کا URL جہاں سب گراف مینی فیسٹ پایا جا سکتا ہے. یہ گراف ایکسپلورر کے ذریعہ بھی ظاہر ہوتا ہے. @@ -154,9 +154,9 @@ dataSources: - `dataSources.source.startBlock`: بلاک کا اختیاری نمبر جس سے ڈیٹا سورس انڈیکس کرنا شروع کرتا ہے. زیادہ تر معاملات میں، ہم اس بلاک کو استعمال کرنے کا مشورہ دیتے ہیں جس میں کنٹریکٹ بنایا گیا تھا. -- `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.source.endBlock`: بلاک کا اختیاری نمبر جس پر ڈیٹا سورس انڈیکس کرنا روکتا ہے، اس بلاک سمیت۔ کم از کم مخصوص ورژن درکار ہے: `0.0.9`۔ -- `dataSources.context`: key-value pairs that can be used within subgraph mappings. Supports various data types like `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, and `BigInt`. Each variable needs to specify its `type` and `data`. These context variables are then accessible in the mapping files, offering more configurable options for subgraph development. +- `dataSources.context`: کلیدی ویلیو کے جوڑے جو سب گراف میپنگ میں استعمال کیے جاسکتے ہیں۔ مختلف قسم کے ڈیٹا کو سپورٹ کرتا ہے جیسے `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, ` Bytes `، ` List `، اور `BigInt`۔ ہر متغیر کو اپنی ` type ` اور ` data ` کی وضاحت کرنے کی ضرورت ہے۔ یہ سیاق و سباق کے متغیرات پھر میپنگ فائلوں میں قابل رسائی ہوتے ہیں، جو سب گراف کی ترقی کے لیے مزید قابل ترتیب اختیارات پیش کرتے ہیں۔ - `dataSources.mapping.entities`: وہ اینٹیٹیز جنہیں ڈیٹا سورس اسٹور کو لکھتا ہے۔ schema.graphql فائل میں ہر اینٹیٹی کے لیے اسکیما کی وضاحت کی گئی ہے. @@ -248,15 +248,15 @@ type GravatarDeclined @entity { ہم اپنے GraphQL API میں درج ذیل اسکیلرز کی حمایت کرتے ہیں: -| قسم | تفصیل | -| --- | --- | -| `Bytes` | Byte array، ایک ہیکساڈیسیمل سٹرنگ کے طور پر پیش کیا جاتا ہے. عام طور پر Ethereum hashes اور ایڈریسیس کے لیے استعمال ہوتا ہے. | -| `String` | `string` ویلیوز کے لیے اسکیلر. خالی حروف تعاون یافتہ نہیں ہیں اور خود بخود ہٹا دیے جاتے ہیں. | -| `Boolean` | `Boolean` ویلیوز کے لیے اسکیلر. | -| `Int` | GraphQL spec `Int` کی وضاحت کرتا ہے جس کا سائز 32 bytes ہے. | -| `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` | بڑے integers۔ Ethereum کی `uint32`، `int64`، `uint64`، ..., `uint256` اقسام کے لیے استعمال کیا جاتا ہے. نوٹ: `uint32` کے نیچے ہر چیز، جیسے `int32`، `uint24` یا `int8` کو `i32` کے طور پر دکھایا گیا ہے. | -| `BigDecimal` | `BigDecimal` اعلی درستگی والے اعشاریہ ایک significand اور ایک exponent کے طور پر پیش کیا جاتے ہہیں. Exponent رینج −6143 سے +6144 تک ہے۔ 34 سگنیفیکینڈ ہندسوں پر rounded کیا گیا۔. | +| قسم | تفصیل | +| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Bytes` | Byte array، ایک ہیکساڈیسیمل سٹرنگ کے طور پر پیش کیا جاتا ہے. عام طور پر Ethereum hashes اور ایڈریسیس کے لیے استعمال ہوتا ہے. | +| `String` | `string` ویلیوز کے لیے اسکیلر. خالی حروف تعاون یافتہ نہیں ہیں اور خود بخود ہٹا دیے جاتے ہیں. | +| `Boolean` | `Boolean` ویلیوز کے لیے اسکیلر. | +| `Int` | GraphQL spec `Int` کی وضاحت کرتا ہے جس کا سائز 32 bytes ہے. | +| `Int8` | ایک 8-بائٹ دستخط شدہ عدد، جسے 64-بٹ دستخط شدہ عدد بھی کہا جاتا ہے، -9,223,372,036,854,775,808 سے لے کر 9,223,372,036,854,775,807 تک کی ویلیوز کو ذخیرہ کرسکتا ہے۔ ایتھیریم سے `i64` کی نمائندگی کرنے کے لیے اسے استعمال کرنے کو ترجیح دیں۔ | +| `BigInt` | بڑے integers۔ Ethereum کی `uint32`، `int64`، `uint64`، ..., `uint256` اقسام کے لیے استعمال کیا جاتا ہے. نوٹ: `uint32` کے نیچے ہر چیز، جیسے `int32`، `uint24` یا `int8` کو `i32` کے طور پر دکھایا گیا ہے. | +| `BigDecimal` | `BigDecimal` اعلی درستگی والے اعشاریہ ایک significand اور ایک exponent کے طور پر پیش کیا جاتے ہہیں. Exponent رینج −6143 سے +6144 تک ہے۔ 34 سگنیفیکینڈ ہندسوں پر rounded کیا گیا۔. | #### Enums @@ -488,7 +488,7 @@ query { ## میپنگ لکھنا -میپنگز کسی خاص ذریعہ سے ڈیٹا لیتی ہے اور اسے ایسی ہستیوں میں تبدیل کرتی ہے جو آپ کے اسکیما میں بیان کی گئی ہیں۔ میپنگز کو [ TypeScript ](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) کے سب سیٹ میں لکھا جاتا ہے جسے [اسمبلی اسکرپٹ](https://github.com/AssemblyScript/assemblyscript/wiki) کہا جاتا ہے جسے WASM ([ویب اسمبلی](https://webassembly.org/)) میں مرتب کیا جاسکتا ہے۔ اسمبلی اسکرپٹ عام TypeScript سے زیادہ سخت ہے، پھر بھی ایک مانوس نحو فراہم کرتا ہے. +میپنگز کسی خاص ذریعہ سے ڈیٹا لیتی ہے اور اسے ایسی ہستیوں میں تبدیل کرتی ہے جو آپ کے اسکیما میں بیان کی گئی ہیں۔ میپنگز کو [ ٹائپ سکرپٹ ](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) کے سب سیٹ میں لکھا جاتا ہے جسے [اسمبلی اسکرپٹ](https://github.com/AssemblyScript/assemblyscript/wiki) کہا جاتا ہے جسے WASM ([ویب اسمبلی](https://webassembly.org/)) میں مرتب کیا جاسکتا ہے۔ اسمبلی اسکرپٹ عام ٹائپ سکرپٹ سے زیادہ سخت ہے، پھر بھی ایک مانوس نحو فراہم کرتا ہے. ہر ایونٹ ہینڈلر کے لیے جس کی وضاحت `subgraph.yaml` میں `mapping.eventHandlers` کے نیچے کی گئی ہے، اسی نام کا ایک برآمد شدہ فنکشن بنائیں. ہر ہینڈلر کو `event` نامی ایک پیرامیٹر کو قبول کرنا چاہیے جو اس ایونٹ کے نام سے مطابقت رکھتا ہو جس کو ہینڈل کیا جا رہا ہے. @@ -531,7 +531,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -ہم [گراف کی Typescript لائبریری](https://github.com/graphprotocol/graph-ts) فراہم کرتے ہیں جس میں گراف نوڈ اسٹور کے ساتھ تعامل کے لیے یوٹیلیز اور سمارٹ کنٹریکٹ ڈیٹا اور اینٹیٹیز کو سنبھالنے کے لیے سہولتیں شامل ہیں. آپ `mapping.ts` میں `@graphprotocol/graph-ts` درآمد کرکے اس لائبریری کو اپنی میپنگ میں استعمال کرسکتے ہیں. +ہم [گراف ٹائپ سکرپٹ لائبریری](https://github.com/graphprotocol/graph-ts) فراہم کرتے ہیں جس میں گراف نوڈ سٹور کے ساتھ تعامل کے لیے افادیت اور سمارٹ کنٹریکٹ ڈیٹا اور اداروں کو سنبھالنے کے لیے سہولتیں شامل ہیں۔ آپ `mapping.ts` میں `@graphprotocol/graph-ts` درآمد کرکے اس لائبریری کو اپنی میپنگ میں استعمال کرسکتے ہیں۔ ## کوڈ تخلیق کرنا @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **نوٹ:** ایک نیا ڈیٹا سورس صرف اس بلاک کے لیے کالز اور ایونٹس پر کارروائی کرے گا جس میں اسے بنایا گیا تھا اور تمام مندرجہ ذیل بلاکس، لیکن تاریخی ڈیٹا، یعنی ڈیٹا پر کارروائی نہیں کرے گا جو پہلے سے بلاکس میں موجود ہے. -> +> > اگر پہلے والے بلاکس میں نئے ڈیٹا سورس سے متعلقہ ڈیٹا ہوتا ہے، تو یہ بہترین ہے کہ کنٹریکٹ کی موجودہ حالت کو پڑھ کر اور ڈیٹا کا نیا سورس بننے کے وقت اس سٹیٹ کی نمائندگی کرنے والی اینٹیٹیز بنا کر اس ڈیٹا کو انڈیکس کریں. ### ڈیٹا سورس سیاق و سباق @@ -716,7 +716,7 @@ dataSources: ``` > **نوٹ:** کنٹریکٹ تخلیق والے بلاک کو ایتھر سکین پر تیزی سے دیکھا جا سکتا ہے: -> +> > 1. سرچ بار میں اس کا ایڈریس درج کرکے کنٹریکٹ کو تلاش کریں. > 2. `Contract Creator` سیکشن میں تخلیق ٹرانزیکشن ہیش پر کلک کریں. > 3. ٹرانزیکشن کی تفصیلات کا صفحہ لوڈ کریں جہاں آپ کو اس کنٹریکٹ کے لیے اسٹارٹ بلاک ملے گا. @@ -823,7 +823,7 @@ dataSources: #### پولنگ فلٹر -> **Requires `specVersion` >= 0.0.8** +> **`specVersion` کی ضرورت ہے >= 0.8.0** > **نوٹ:** پولنگ فلٹرز صرف ڈیٹا سورس آف `kind: ethereum` پر دستیاب ہیں. @@ -839,7 +839,7 @@ blockHandlers: #### ونس فلٹر -> **Requires `specVersion` >= 0.0.8** +> **`specVersion` کی ضرورت ہے >= 0.8.0** > **نوٹ:** ایک بار جب فلٹرز صرف ڈیٹا سورس آف `kind: ethereum` پر دستیاب ہوتے ہیں. @@ -1156,7 +1156,7 @@ export function handleMetadata(content: Bytes): void { IPFS کے لیے، گراف نوڈ [v0 اور v1 مواد کے شناخت کنندگان](https://docs.ipfs.tech/concepts/content-addressing/) کو سپورٹ کرتا ہے، اور ڈائرکٹریز کے ساتھ مواد کی شناخت کرنے والوں کو سپورٹ کرتا ہے (e.g. `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/server/http-api#transactions) from an Arweave gateway ([example file](https://bdxujjl5ev5eerd5ouhhs6o4kjrs4g6hqstzlci5pf6vhxezkgaa.arweave.net/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA)). Arweave supports transactions uploaded via Bundlr, and Graph Node can also fetch files based on [Bundlr manifests](https://docs.bundlr.network/learn/gateways#indexing). +Arweave کے لیے، ورژن 0.33.0 کے مطابق گراف نوڈ Arweave پر اسٹور کردہ فائلوں کو Arweave گیٹ وے ([مثال کی فائل](https://bdxujjl5ev5eerd5ouhhs6o4kjrs4g6hqstzlci5pf6vhxezkgaa.arweave.net/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA)) سے ان کی [ٹرانزیکشن ID](https://docs.arweave.org/developers/server/http-api#transactions) کی بنیاد پر بازیافت کرسکتا ہے۔ Arweave Bundlr کے ذریعے اپ لوڈ کردہٹرانزیکشن کو سپورٹ کرتا ہے، اور گراف نوڈ [Bundlr مینی فیسٹس](https://docs.bundlr.network/learn/gateways#indexing) کی بنیاد پر فائلیں بھی حاصل کر سکتا ہے. مثال: From 8928803165604ceccd6f8c634ca5f098e9dab15e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:23 -0400 Subject: [PATCH 131/924] New translations creating-a-subgraph.mdx (Vietnamese) --- .../vi/developing/creating-a-subgraph.mdx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/pages/vi/developing/creating-a-subgraph.mdx b/website/pages/vi/developing/creating-a-subgraph.mdx index 3169fec69eb8..9e9c276d60e4 100644 --- a/website/pages/vi/developing/creating-a-subgraph.mdx +++ b/website/pages/vi/developing/creating-a-subgraph.mdx @@ -168,7 +168,7 @@ Các mục nhập quan trọng cần cập nhật cho tệp kê khai là: - `dataSources.mapping.blockHandlers`: lists the blocks this subgraph reacts to and handlers in the mapping to run when a block is appended to the chain. Without a filter, the block handler will be run every block. An optional call-filter can be provided by adding a `filter` field with `kind: call` to the handler. This will only run the handler if the block contains at least one call to the data source contract. -Một subgraph n có thể lập chỉ mục dữ liệu từ nhiều hợp đồng thông minh. Thêm mục nhập cho mỗi hợp đồng mà từ đó dữ liệu cần được lập chỉ mục vào mảng `dataSources`. +A single subgraph can index data from multiple smart contracts. Add an entry for each contract from which data needs to be indexed to the `dataSources` array. Các trình kích hoạt cho nguồn dữ liệu trong một khối được sắp xếp theo quy trình sau: @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Loại | Miêu tả | -| --- | --- | -| `Bytes` | Mảng byte, được biểu diễn dưới dạng chuỗi thập lục phân. Thường được sử dụng cho các mã băm và địa chỉ Ethereum. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Loại | Miêu tả | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Mảng byte, được biểu diễn dưới dạng chuỗi thập lục phân. Thường được sử dụng cho các mã băm và địa chỉ Ethereum. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -531,7 +531,7 @@ Every entity has to have an `id` that is unique among all entities of the same t - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## Tạo mã @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Lưu ý:** Nguồn dữ liệu mới sẽ chỉ xử lý các lệnh gọi và sự kiện cho khối mà nó được tạo và tất cả các khối tiếp theo, nhưng sẽ không xử lý dữ liệu lịch sử, tức là dữ liệu được chứa trong các khối trước đó. -> +> > Nếu các khối trước đó chứa dữ liệu có liên quan đến nguồn dữ liệu mới, tốt nhất là lập chỉ mục dữ liệu đó bằng cách đọc trạng thái hiện tại của hợp đồng và tạo các thực thể đại diện cho trạng thái đó tại thời điểm nguồn dữ liệu mới được tạo. ### Bối cảnh Nguồn Dữ liệu @@ -716,7 +716,7 @@ dataSources: ``` > **Lưu ý:** Khối tạo hợp đồng có thể được nhanh chóng tra cứu trên Etherscan: -> +> > 1. Tìm kiếm hợp đồng bằng cách nhập địa chỉ của nó vào thanh tìm kiếm. > 2. Nhấp vào băm giao dịch tạo trong phần `Contract Creator`. > 3. Tải trang chi tiết giao dịch nơi bạn sẽ tìm thấy khối bắt đầu cho hợp đồng đó. From 952061796384722408715ae8e3eac330841694f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:24 -0400 Subject: [PATCH 132/924] New translations creating-a-subgraph.mdx (Marathi) --- .../mr/developing/creating-a-subgraph.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/mr/developing/creating-a-subgraph.mdx b/website/pages/mr/developing/creating-a-subgraph.mdx index 2b0aa0251ccc..5b2aa532c95d 100644 --- a/website/pages/mr/developing/creating-a-subgraph.mdx +++ b/website/pages/mr/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ type GravatarDeclined @entity { We support the following scalars in our GraphQL API: -| प्रकार | वर्णन | -| --- | --- | -| `बाइट्स` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `स्ट्रिंग` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `बुलियन` | `बूलियन` मूल्यांसाठी स्केलर. | -| `इंट` | GraphQL spec `Int` ला ३२ बाइट्सचा आकार ठरवतो. | -| `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` | मोठे पूर्णांक. इथरियमच्या `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारांसाठी वापरले जाते. टीप: `uint32` खाली सर्व काही, जसे की `int32`, `uint24` किंवा `int8` `i32` म्हणून प्रस्तुत केले जाते 0>. | -| `बिग डेसिमल` | `BigDecimal` उच्च सुस्पष्टता दशांश एक महत्त्वपूर्ण आणि घातांक म्हणून प्रस्तुत केले जाते. घातांक श्रेणी −6143 ते +6144 पर्यंत आहे. 34 लक्षणीय अंकांपर्यंत पूर्णांक. | +| प्रकार | वर्णन | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `बाइट्स` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `स्ट्रिंग` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `बुलियन` | `बूलियन` मूल्यांसाठी स्केलर. | +| `इंट` | GraphQL spec `Int` ला ३२ बाइट्सचा आकार ठरवतो. | +| `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` | मोठे पूर्णांक. इथरियमच्या `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारांसाठी वापरले जाते. टीप: `uint32` खाली सर्व काही, जसे की `int32`, `uint24` किंवा `int8` `i32` म्हणून प्रस्तुत केले जाते 0>. | +| `बिग डेसिमल` | `BigDecimal` उच्च सुस्पष्टता दशांश एक महत्त्वपूर्ण आणि घातांक म्हणून प्रस्तुत केले जाते. घातांक श्रेणी −6143 ते +6144 पर्यंत आहे. 34 लक्षणीय अंकांपर्यंत पूर्णांक. | #### एनम्स @@ -531,7 +531,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -आम्ही [ग्राफ टाइपस्क्रिप्ट लायब्ररी](https://github.com/graphprotocol/graph-ts) प्रदान करतो ज्यामध्ये ग्राफ नोड स्टोअरशी संवाद साधण्यासाठी उपयुक्तता आणि स्मार्ट कॉन्ट्रॅक्ट डेटा आणि संस्था हाताळण्यासाठी सोयी असतात. तुम्ही `mapping.ts` मध्ये `@graphprotocol/graph-ts` आयात करून ही लायब्ररी तुमच्या मॅपिंगमध्ये वापरू शकता. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## कोड जनरेशन @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **टीप:** नवीन डेटा स्रोत केवळ तो ज्या ब्लॉकमध्ये तयार केला गेला होता आणि पुढील सर्व ब्लॉकसाठी कॉल्स आणि इव्हेंटवर प्रक्रिया करेल, परंतु ऐतिहासिक डेटावर प्रक्रिया करणार नाही, म्हणजे, डेटावर प्रक्रिया करणार नाही. जे आधीच्या ब्लॉक्समध्ये समाविष्ट आहे. -> +> > पूर्वीच्या ब्लॉक्समध्ये नवीन डेटा स्रोताशी संबंधित डेटा असल्यास, कराराची वर्तमान स्थिती वाचून आणि नवीन डेटा स्रोत तयार करताना त्या स्थितीचे प्रतिनिधित्व करणारी संस्था तयार करून तो डेटा अनुक्रमित करणे सर्वोत्तम आहे. ### डेटा स्रोत संदर्भ @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From 5ac906908accc7a2906fb396809d56691e63b1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:25 -0400 Subject: [PATCH 133/924] New translations creating-a-subgraph.mdx (Hindi) --- .../hi/developing/creating-a-subgraph.mdx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/pages/hi/developing/creating-a-subgraph.mdx b/website/pages/hi/developing/creating-a-subgraph.mdx index 24cb6fd82442..50f6bf0e7492 100644 --- a/website/pages/hi/developing/creating-a-subgraph.mdx +++ b/website/pages/hi/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ type GravatarDeclined @entity { हम अपने ग्राफक्यूएल एपीआई में निम्नलिखित स्केलर्स का समर्थन करते हैं: -| प्रकार | विवरण | -| --- | --- | -| `Bytes` | बाइट सरणी, एक हेक्साडेसिमल स्ट्रिंग के रूप में दर्शाया गया है। आमतौर पर एथेरियम हैश और पतों के लिए उपयोग किया जाता है। | -| `String` | `स्ट्रिंग` मानों के लिए स्केलर। अशक्त वर्ण समर्थित नहीं हैं और स्वचालित रूप से हटा दिए जाते हैं। | -| `Boolean` | `boolean` मानों के लिए स्केलर। | -| `Int` | ग्राफक्लाइन स्पेक `Int` को 32 बाइट्स के आकार के रूप में परिभाषित करता है। | -| `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` | बड़े पूर्णांक। एथेरियम के `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारों के लिए उपयोग किया जाता है। नोट: `uint32` के नीचे सब कुछ, जैसे `int32`, `uint24` या `int8` को `i32` के रूप में दर्शाया गया है। | -| `BigDecimal` | `BigDecimal` उच्च परिशुद्धता दशमलव एक महत्व और एक प्रतिपादक के रूप में दर्शाया गया है। एक्सपोनेंट रेंज -6143 से +6144 तक है। 34 महत्वपूर्ण अंकों तक गोल। | +| प्रकार | विवरण | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | बाइट सरणी, एक हेक्साडेसिमल स्ट्रिंग के रूप में दर्शाया गया है। आमतौर पर एथेरियम हैश और पतों के लिए उपयोग किया जाता है। | +| `String` | `स्ट्रिंग` मानों के लिए स्केलर। अशक्त वर्ण समर्थित नहीं हैं और स्वचालित रूप से हटा दिए जाते हैं। | +| `Boolean` | `boolean` मानों के लिए स्केलर। | +| `Int` | ग्राफक्लाइन स्पेक `Int` को 32 बाइट्स के आकार के रूप में परिभाषित करता है। | +| `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` | बड़े पूर्णांक। एथेरियम के `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारों के लिए उपयोग किया जाता है। नोट: `uint32` के नीचे सब कुछ, जैसे `int32`, `uint24` या `int8` को `i32` के रूप में दर्शाया गया है। | +| `BigDecimal` | `BigDecimal` उच्च परिशुद्धता दशमलव एक महत्व और एक प्रतिपादक के रूप में दर्शाया गया है। एक्सपोनेंट रेंज -6143 से +6144 तक है। 34 महत्वपूर्ण अंकों तक गोल। | #### Enums @@ -531,7 +531,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -हम [ग्राफ़ टाइपस्क्रिप्ट लाइब्रेरी](https://github.com/graphprotocol/graph-ts) प्रदान करते हैं जिसमें ग्राफ़ नोड स्टोर के साथ सहभागिता करने के लिए उपयोगिताएँ और स्मार्ट अनुबंध डेटा और संस्थाओं को संभालने की सुविधा शामिल है। आप `mapping.ts` में `@graphprotocol/graph-ts` आयात करके अपने मैपिंग में इस लाइब्रेरी का उपयोग कर सकते हैं। +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## कोड जनरेशन @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **ध्यान दें:** एक नया डेटा स्रोत केवल उस ब्लॉक के लिए कॉल और ईवेंट को प्रोसेस करेगा जिसमें इसे बनाया गया था और सभी बाद के ब्लॉक, लेकिन ऐतिहासिक डेटा, यानी डेटा को प्रोसेस नहीं करेगा जो पिछले ब्लॉकों में निहित है। -> +> > यदि पिछले ब्लॉक में नए डेटा स्रोत के लिए प्रासंगिक डेटा है, तो उस डेटा को अनुबंध की वर्तमान स्थिति को पढ़कर और नए डेटा स्रोत के निर्माण के समय उस स्थिति का प्रतिनिधित्व करने वाली संस्थाओं का निर्माण करना सबसे अच्छा है। ### डेटा स्रोत प्रसंग @@ -716,7 +716,7 @@ dataSources: ``` > **ध्यान दें:** इथरस्कैन पर अनुबंध निर्माण ब्लॉक को जल्दी से देखा जा सकता है: -> +> > 1. खोज बार में उसका पता दर्ज करके अनुबंध की खोज करें। > 2. `अनुबंध निर्माता` अनुभाग में निर्माण लेनदेन हैश पर क्लिक करें। > 3. लेन-देन विवरण पृष्ठ लोड करें जहां आपको उस अनुबंध के लिए प्रारंभ ब्लॉक मिलेगा। @@ -779,7 +779,7 @@ The `handleCreateGravatar` function takes a new `CreateGravatarCall` which is a ## ब्लॉक हैंडलर -अनुबंध की घटनाओं या फ़ंक्शन कॉल की सदस्यता लेने के अलावा, एक सबग्राफ अपने डेटा को अपडेट करना चाह सकता है क्योंकि श्रृंखला में नए ब्लॉक जोड़े जाते हैं। इसे प्राप्त करने के लिए एक सबग्राफ प्रत्येक ब्लॉक के बाद या पूर्व-निर्धारित फ़िल्टर से मेल खाने वाले ब्लॉक के बाद एक फ़ंक्शन चला सकता है। +Contract events या function calls की सदस्यता लेने के अलावा, एक subgraph अपने data को update करना चाह सकता है क्योंकि chain में नए blocks जोड़े जाते हैं। इसे प्राप्त करने के लिए एक subgraph every block के बाद या pre-defined filter से match होन वाले block के बाद एक function चला सकता है। ### समर्थित फ़िल्टर From 3550093cbdf02c949768158b43605a0687c986b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:26 -0400 Subject: [PATCH 134/924] New translations creating-a-subgraph.mdx (Yoruba) --- .../yo/developing/creating-a-subgraph.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/yo/developing/creating-a-subgraph.mdx b/website/pages/yo/developing/creating-a-subgraph.mdx index ace69dd1ac7d..db9e8a024571 100644 --- a/website/pages/yo/developing/creating-a-subgraph.mdx +++ b/website/pages/yo/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -531,7 +531,7 @@ Every entity has to have an `id` that is unique among all entities of the same t - `event.transaction.from.toHex()` - `event.transaction.hash.toHex() + "-" + event.logIndex.toString()` -We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilies for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. +We provide the [Graph Typescript Library](https://github.com/graphprotocol/graph-ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. You can use this library in your mappings by importing `@graphprotocol/graph-ts` in `mapping.ts`. ## Code Generation @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From 61193ef43a86ddad0befd1e734a04d2ceeb2f657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:30 -0400 Subject: [PATCH 135/924] New translations developer-faqs.mdx (Czech) --- .../pages/cs/developing/developer-faqs.mdx | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/website/pages/cs/developing/developer-faqs.mdx b/website/pages/cs/developing/developer-faqs.mdx index 053853897a41..5d38f0298ee5 100644 --- a/website/pages/cs/developing/developer-faqs.mdx +++ b/website/pages/cs/developing/developer-faqs.mdx @@ -1,74 +1,74 @@ --- -title: Developer FAQs +title: FAQs pro vývojáře --- -## 1. What is a subgraph? +## 1. Co je to podgraf? -A subgraph is a custom API built on blockchain data. Subgraphs are queried using the GraphQL query language and are deployed to a Graph Node using the Graph CLI. Once deployed and published to The Graph's decentralized network, Indexers process subgraphs and make them available to be queried by subgraph consumers. +Podgraf je vlastní API postavené na datech blockchainu. Podgrafy jsou dotazovány pomocí dotazovacího jazyka GraphQL a jsou nasazeny do uzlu Graf pomocí Graf CLI. Po nasazení a zveřejnění v decentralizované síti Graf zpracovávají indexery podgrafy a zpřístupňují je k dotazování konzumentům podgrafů. -## 2. Can I delete my subgraph? +## 2. Mohu svůj podgraf smazat? -It is not possible to delete subgraphs once they are created. +Jednou vytvořené podgrafy není možné odstranit. -## 3. Can I change my subgraph name? +## 3. Mohu změnit název podgrafu? -No. Once a subgraph is created, the name cannot be changed. Make sure to think of this carefully before you create your subgraph so it is easily searchable and identifiable by other dapps. +Ne. Jakmile je podgraf vytvořen, nelze jeho název změnit. Před vytvořením podgrafu si to důkladně promyslete, aby byl snadno vyhledatelný a identifikovatelný ostatními dapps. -## 4. Can I change the GitHub account associated with my subgraph? +## 4. Mohu změnit účet GitHub přidružený k mému podgrafu? -No. Once a subgraph is created, the associated GitHub account cannot be changed. Make sure to think of this carefully before you create your subgraph. +Ne. Jakmile je podgraf vytvořen, nelze přidružený účet GitHub změnit. Než vytvoříte podgraf, důkladně si to promyslete. -## 5. Am I still able to create a subgraph if my smart contracts don't have events? +## 5. Mohu vytvořit podgraf i v případě, že moje chytré smlouvy nemají události? -It is highly recommended that you structure your smart contracts to have events associated with data you are interested in querying. Event handlers in the subgraph are triggered by contract events and are by far the fastest way to retrieve useful data. +Důrazně doporučujeme, abyste své chytré kontrakty strukturovali tak, aby měly události spojené s daty, na která se chcete dotazovat. Obsluhy událostí v podgrafu jsou spouštěny událostmi smlouva a jsou zdaleka nejrychlejším způsobem, jak získat užitečná data. -If the contracts you are working with do not contain events, your subgraph can use call and block handlers to trigger indexing. Although this is not recommended, as performance will be significantly slower. +Pokud smlouva, se kterými pracujete, neobsahují události, můžete ke spuštění indexování použít obsluhy volání a bloků. To se však nedoporučuje, protože výkon bude výrazně nižší. -## 6. Is it possible to deploy one subgraph with the same name for multiple networks? +## 6. Je možné nasadit jeden podgraf se stejným názvem pro více sítí? -You will need separate names for multiple networks. While you can't have different subgraphs under the same name, there are convenient ways of having a single codebase for multiple networks. Find more on this in our documentation: [Redeploying a Subgraph](/deploying/deploying-a-subgraph-to-hosted#redeploying-a-subgraph) +Pro více sítí budete potřebovat samostatné názvy. I když nemůžete mít různé podgrafy pod stejným názvem, existují pohodlné způsoby, jak mít jednu kódovou základnu pro více sítí. Více informací o tom najdete v naší dokumentaci: [přemístění podgrafu](/deploying/deploying-a-subgraph-to-hosted#redeploying-a-subgraph) -## 7. How are templates different from data sources? +## 7. Jak se liší šablony od zdrojů dat? -Templates allow you to create data sources on the fly, while your subgraph is indexing. It might be the case that your contract will spawn new contracts as people interact with it, and since you know the shape of those contracts (ABI, events, etc) upfront you can define how you want to index them in a template and when they are spawned your subgraph will create a dynamic data source by supplying the contract address. +Šablony umožňují vytvářet zdroje dat za běhu, zatímco se podgraf indexuje. Může se stát, že vaše smlouva bude vytvářet nové smlouvy, jak s ní budou lidé interagovat, a protože znáte tvar těchto smluv (ABI, události atd.) předem, můžete definovat, jak je chcete indexovat v šabloně, a když se vytvoří, váš podgraf vytvoří dynamický zdroj dat dodáním adresy smlouvy. -Check out the "Instantiating a data source template" section on: [Data Source Templates](/developing/creating-a-subgraph#data-source-templates). +Podívejte se do části "Instancování šablony zdroje dat" na: [Šablony datových zdrojů](/developing/creating-a-subgraph#data-source-templates). -## 8. How do I make sure I'm using the latest version of graph-node for my local deployments? +## 8. Jak se ujistím, že pro místní nasazení používám nejnovější verzi graph-node? -You can run the following command: +Můžete spustit následující příkaz: ```sh docker pull graphprotocol/graph-node:latest ``` -**NOTE:** docker / docker-compose will always use whatever graph-node version was pulled the first time you ran it, so it is important to do this to make sure you are up to date with the latest version of graph-node. +**POZNÁMKA:** docker / docker-compose vždy použije tu verzi graf uzlu, která byla stažena při prvním spuštění, takže je důležité to udělat, abyste se ujistili, že máte nejnovější verzi graf uzlu. -## 9. How do I call a contract function or access a public state variable from my subgraph mappings? +## 9. Jak mohu z mapování podgrafů zavolat smluvní funkci nebo přistupovat k veřejné stavové proměnné? -Take a look at `Access to smart contract` state inside the section [AssemblyScript API](/developing/assemblyscript-api). +Podívejte se na stav `Přístup k chytrá smlouva` v části [AssemblyScript API](/developing/assemblyscript-api). -## 10. Is it possible to set up a subgraph using `graph init` from `graph-cli` with two contracts? Or should I manually add another datasource in `subgraph.yaml` after running `graph init`? +## 10. Je možné vytvořit podgraf pomocí `graph init` z `graph-cli` se dvěma smlouvami? Nebo mám po spuštění `graph init` ručně přidat další datový zdroj v `subgraph.yaml`? -Unfortunately, this is currently not possible. `graph init` is intended as a basic starting point, from which you can then add more data sources manually. +V současné době to bohužel není možné. `graph init` je určen jako základní výchozí bod, ze kterého pak můžete ručně přidávat další zdroje dat. -## 11. I want to contribute or add a GitHub issue. Where can I find the open source repositories? +## 11. Chci přispět nebo přidat problém na GitHub. Kde najdu repozitáře s otevřeným zdrojovým kódem? - [graph-node](https://github.com/graphprotocol/graph-node) - [graph-cli](https://github.com/graphprotocol/graph-cli) - [graph-ts](https://github.com/graphprotocol/graph-ts) -## 12. What is the recommended way to build "autogenerated" ids for an entity when handling events? +## 12. Jaký je doporučený způsob vytváření "automaticky generovaných" ids pro entity při zpracování událostí? -If only one entity is created during the event and if there's nothing better available, then the transaction hash + log index would be unique. You can obfuscate these by converting that to Bytes and then piping it through `crypto.keccak256` but this won't make it more unique. +Pokud je během události vytvořena pouze jedna entita a pokud není k dispozici nic lepšího, pak by hash transakce + index protokolu byly jedinečné. Můžete je obfuskovat tak, že je převedete na bajty a pak je proženete přes `crypto.keccak256`, ale tím se jejich jedinečnost nezvýší. -## 13. When listening to multiple contracts, is it possible to select the contract order to listen to events? +## 13. Je možné při poslechu více smluv zvolit pořadí smlouvy, ve kterém se mají události poslouchat? -Within a subgraph, the events are always processed in the order they appear in the blocks, regardless of whether that is across multiple contracts or not. +V rámci podgrafu se události zpracovávají vždy v pořadí, v jakém se objevují v blocích, bez ohledu na to, zda se jedná o více smluv. -## 14. Is it possible to differentiate between networks (mainnet, Goerli, local) from within event handlers? +## 14. Je možné v rámci obsluhy událostí rozlišovat mezi síti (mainnet, Goerli, local)? -Yes. You can do this by importing `graph-ts` as per the example below: +Ano, můžete to provést importováním `graph-ts` podle níže uvedeného příkladu: ```javascript import { dataSource } from '@graphprotocol/graph-ts' @@ -77,57 +77,57 @@ dataSource.network() dataSource.address() ``` -## 15. Do you support block and call handlers on Goerli? +## 15. Podporujete na Goerli obsluhu bloků a volání? -Yes. Goerli supports block handlers, call handlers and event handlers. It should be noted that event handlers are far more performant than the other two handlers, and they are supported on every EVM-compatible network. +Ano. Goerli podporuje obsluhy bloků, obsluhy volání a obsluhy událostí. Je třeba poznamenat, že obsluhy událostí jsou mnohem výkonnější než ostatní dvě obsluhy a jsou podporovány v každé síti kompatibilní s EVM. -## 16. Can I import ethers.js or other JS libraries into my subgraph mappings? +## 16. Mohu do mapování podgrafů importovat ethers.js nebo jiné JS knihovny? -Not currently, as mappings are written in AssemblyScript. One possible alternative solution to this is to store raw data in entities and perform logic that requires JS libraries on the client. +V současné době ne, protože mapování jsou zapsána v AssemblyScript. Jedním z možných alternativních řešení je ukládat surová data do entit a logiku, která vyžaduje knihovny JS, provádět na klientovi. -## 17. Is it possible to specify what block to start indexing on? +## 17. Je možné určit, od kterého bloku se má indexování spustit? -Yes. `dataSources.source.startBlock` in the `subgraph.yaml` file specifies the number of the block that the data source starts indexing from. In most cases, we suggest using the block in which the contract was created: Start blocks +Ano. `dataSources.source.startBlock` v souboru `subgraph.yaml` určuje číslo bloku, od kterého zdroj dat začíná indexovat. Ve většině případů doporučujeme použít blok, ve kterém byl kontrakt vytvořen: Start bloky -## 18. Are there some tips to increase the performance of indexing? My subgraph is taking a very long time to sync +## 18. Existují nějaké tipy, jak zvýšit výkon indexování? Synchronizace mého podgrafu trvá velmi dlouho -Yes, you should take a look at the optional start block feature to start indexing from the block that the contract was deployed: [Start blocks](/developing/creating-a-subgraph#start-blocks) +Ano, měli byste se podívat na volitelnou funkci start bloku, která umožňuje zahájit indexování od bloku, ve kterém byla smlouva nasazena: [Start bloky](/developing/creating-a-subgraph#start-blocks) -## 19. Is there a way to query the subgraph directly to determine the latest block number it has indexed? +## 19. Existuje způsob, jak se přímo zeptat podgrafu a zjistit poslední číslo bloku, který indexoval? -Yes! Try the following command, substituting "organization/subgraphName" with the organization under it is published and the name of your subgraph: +Ano! Vyzkoušejte následující příkaz, přičemž "organization/subgraphName" nahraďte názvem organizace, pod kterou je publikován, a názvem vašeho podgrafu: ```sh curl -X POST -d '{ "query": "{indexingStatusForCurrentVersion(subgraphName: \"organization/subgraphName\") { chains { latestBlock { hash number }}}}"}' https://api.thegraph.com/index-node/graphql ``` -## 20. What networks are supported by The Graph? +## 20. Jaké sítě podporuje Graf? -You can find the list of the supported networks [here](/developing/supported-networks). +Seznam podporovaných sítí najdete [zde](/developing/supported-networks). -## 21. Is it possible to duplicate a subgraph to another account or endpoint without redeploying? +## 21. Je možné duplikovat podgraf do jiného účtu nebo koncového bodu, aniž by bylo nutné provést nové nasazení? -You have to redeploy the subgraph, but if the subgraph ID (IPFS hash) doesn't change, it won't have to sync from the beginning. +Podgraf musíte znovu nasadit, ale pokud se ID podgrafu (hash IPFS) nezmění, nebude se muset synchronizovat od začátku. -## 22. Is this possible to use Apollo Federation on top of graph-node? +## 22. Je možné použít Apollo Federation nad graph-node? -Federation is not supported yet, although we do want to support it in the future. At the moment, something you can do is use schema stitching, either on the client or via a proxy service. +Federace zatím není podporována, i když ji chceme v budoucnu podporovat. V současné době můžete použít sešívání schémat, a to buď na klientovi, nebo prostřednictvím služby proxy. -## 23. Is there a limit to how many objects The Graph can return per query? +## 23. Je nějak omezeno, kolik objektů může Graf vrátit na jeden dotaz? -By default, query responses are limited to 100 items per collection. If you want to receive more, you can go up to 1000 items per collection and beyond that, you can paginate with: +Ve výchozím nastavení jsou odpovědi na dotazy omezeny na 100 položek na kolekci. Pokud chcete získat více, můžete jít až na 1000 položek na kolekci a nad tuto hranici můžete stránkovat pomocí: ```graphql someCollection(first: 1000, skip: ) { ... } ``` -## 24. If my dapp frontend uses The Graph for querying, do I need to write my query key into the frontend directly? What if we pay query fees for users – will malicious users cause our query fees to be very high? +## 24. Pokud můj frontend dapp používá pro dotazování The Graph, musím svůj dotazovací klíč zapsat přímo do frontend? Co když budeme za uživatele platit poplatky za dotazování - způsobí zlomyslní uživatelé, že naše poplatky za dotazování budou velmi vysoké? -Currently, the recommended approach for a dapp is to add the key to the frontend and expose it to end users. That said, you can limit that key to a hostname, like _yourdapp.io_ and subgraph. The gateway is currently being run by Edge & Node. Part of the responsibility of a gateway is to monitor for abusive behavior and block traffic from malicious clients. +V současné době je doporučeným přístupem pro dapp přidání klíče do frontendu a jeho zpřístupnění koncovým uživatelům. Přitom můžete tento klíč omezit na název hostitele, například _yourdapp.io_ a podgraf. Bránu v současné době provozuje Edge & Node. Součástí odpovědnosti brány je monitorování zneužití a blokování provozu od škodlivých klientů. -## 25. Where do I go to find my current subgraph on the hosted service? +## 25. Kde najdu svůj aktuální podgraf v hostované službě? -Head over to the hosted service in order to find subgraphs that you or others deployed to the hosted service. You can find it [here](https://thegraph.com/hosted-service). +Přejděte do hostované služby, abyste našli podgrafy, které jste vy nebo jiní uživatelé nasadili do hostované služby. Najdete ji [zde](https://thegraph.com/hosted-service). ## 26. Will the hosted service start charging query fees? From cf79c0b011548ad5003b6471caea8441974ecefa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:32 -0400 Subject: [PATCH 136/924] New translations developer-faqs.mdx (Japanese) --- website/pages/ja/developing/developer-faqs.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/ja/developing/developer-faqs.mdx b/website/pages/ja/developing/developer-faqs.mdx index 1f3a6413f5d8..af307e407535 100644 --- a/website/pages/ja/developing/developer-faqs.mdx +++ b/website/pages/ja/developing/developer-faqs.mdx @@ -125,14 +125,14 @@ someCollection(first: 1000, skip: ) { ... } 現在、dapp の推奨されるアプローチは、キーをフロントエンドに追加し、それをエンド ユーザーに公開することです。とはいえ、そのキーを _yourdapp.io_ や subgraph.ゲートウェイは現在 Edge & によって実行されています。ノード。ゲートウェイの責任の一部は、不正行為を監視し、悪意のあるクライアントからのトラフィックをブロックすることです。 -## 25. Where do I go to find my current subgraph on the hosted service? +## 25. ホスティングサービス上の現在のサブグラフはどこで見ることができますか? 自分または他の人がホストされたサービスにデプロイしたサブグラフを見つけるには、ホストされたサービスに移動します。 [こちら](https://thegraph.com/hosted-service)でご覧いただけます。 -## 26. Will the hosted service start charging query fees? +## 26. ホスティングサービスはクエリ料金を請求するようになりますか? Graph は、ホストされるサービスに対して料金を請求することはありません。 Graph は分散型プロトコルであり、集中型サービスに対する課金は The Graph の価値観と一致していません。ホスト型サービスは常に、分散型ネットワークにアクセスするための一時的なステップでした。開発者には、快適に分散ネットワークにアップグレードするのに十分な時間があります。 -## 27. How do I update a subgraph on mainnet? +## 27. メインネットのサブグラフを更新するには? サブグラフ開発者の場合は、CLI を使用して新しいバージョンのサブグラフを Subgraph Studio にデプロイできます。この時点では非公開になりますが、問題がなければ、分散型の Graph Explorer に公開できます。これにより、キュレーターがシグナリングを開始できるサブグラフの新しいバージョンが作成されます。 From aaf23fa6cd72ee49a43f340eec5f2c60edbd78f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:34 -0400 Subject: [PATCH 137/924] New translations developer-faqs.mdx (Dutch) --- website/pages/nl/developing/developer-faqs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/nl/developing/developer-faqs.mdx b/website/pages/nl/developing/developer-faqs.mdx index 053853897a41..3bd97d49dc35 100644 --- a/website/pages/nl/developing/developer-faqs.mdx +++ b/website/pages/nl/developing/developer-faqs.mdx @@ -1,5 +1,5 @@ --- -title: Developer FAQs +title: Ontwikkelaar FAQs --- ## 1. What is a subgraph? From c723a30a572fb821846184683dec2c05876a3c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:35 -0400 Subject: [PATCH 138/924] New translations developer-faqs.mdx (Portuguese) --- website/pages/pt/developing/developer-faqs.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/pt/developing/developer-faqs.mdx b/website/pages/pt/developing/developer-faqs.mdx index 4812d007f9ff..a582f673c640 100644 --- a/website/pages/pt/developing/developer-faqs.mdx +++ b/website/pages/pt/developing/developer-faqs.mdx @@ -125,14 +125,14 @@ someCollection(first: 1000, skip: ) { ... } Atualmente, a abordagem recomendada para um dApp é adicionar a chave ao frontend e expô-la para utilizadores finais. Dito isto, pode limitar aquela chave a um hostname, como _seudapp.io_ e um subgraph. A gateway está atualmente a ser executada pelo Edge & Node. Parte da responsabilidade de uma gateway é monitorar comportamentos abusivos e bloquear tráfego de clientes maliciosos. -## 25. Where do I go to find my current subgraph on the hosted service? +## 25. Onde encontro o meu subgraph atual no serviço hospedado? Vá para o Serviço Hospedado para achar subgraphs lançados por você ou outros ao Serviço Hospedado. Veja [aqui](https://thegraph.com/hosted-service). -## 26. Will the hosted service start charging query fees? +## 26. O serviço hospedado começará a cobrar taxas de query? The Graph nunca cobrará pelo Serviço Hospedado. Este é um protocolo descentralizado, e cobrar por um serviço centralizado não condiz com os valores do Graph. O Serviço Hospedado sempre foi um degrau temporário para chegar à rede descentralizada; os programadores terão tempo suficiente para migrar à rede descentralizada quando estiverem preparados. -## 27. How do I update a subgraph on mainnet? +## 27. Como atualizar um subgraph na mainnet? Se for um programador de subgraph, podes atualizar para uma versão nova do seu subgraph no Studio com a CLI. Ela será privada por enquanto, mas se estiver contente, pode editá-la no Graph Explorer descentralizado. Isto criará uma nova versão do seu subgraph sobre a qual Curadores podem começar a sinalizar. From 72b6c8af3ce453837145ca1bf6a378f5661b38bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:37 -0400 Subject: [PATCH 139/924] New translations developer-faqs.mdx (Swedish) --- website/pages/sv/developing/developer-faqs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/developing/developer-faqs.mdx b/website/pages/sv/developing/developer-faqs.mdx index 85dc3131826b..11d0890e4d60 100644 --- a/website/pages/sv/developing/developer-faqs.mdx +++ b/website/pages/sv/developing/developer-faqs.mdx @@ -71,7 +71,7 @@ Inom en subgraf behandlas händelser alltid i den ordning de visas i blocken, oa Ja, du kan göra detta genom att importera `graph-ts` enligt exemplet nedan: ```javascript -import { dataSource } from '@graphprotocol/graph-ts' +import { dataSource } from "@graphprotocol/graph-ts" dataSource.network() dataSource.address() From 1576bea2891440315f6023514ce0ed21c3618e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:38 -0400 Subject: [PATCH 140/924] New translations developer-faqs.mdx (Turkish) --- website/pages/tr/developing/developer-faqs.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/tr/developing/developer-faqs.mdx b/website/pages/tr/developing/developer-faqs.mdx index be1af1d3fb83..1d0a2a0f1cbb 100644 --- a/website/pages/tr/developing/developer-faqs.mdx +++ b/website/pages/tr/developing/developer-faqs.mdx @@ -125,14 +125,14 @@ someCollection(first: 1000, skip: ) { ... } Şu anda, bir merkeziyetsiz uygulama için önerilen yaklaşım, anahtarı ön uca eklemek ve son kullanıcılara göstermektir. Bununla birlikte, bu anahtarı _yourdapp.io_ ve subgraph gibi bir ana bilgisayar adıyla sınırlayabilirsiniz. Ağ geçidi şu anda Edge & Node tarafından çalıştırılıyor. Bir ağ geçidinin sorumluluğunun bir kısmı, kötü amaçlı davranışları izlemek ve kötü niyetli istemcilerden gelen trafiği engellemektir. -## 25. Where do I go to find my current subgraph on the hosted service? +## 25. Barındırılan hizmetteki mevcut subgraph'imi nerede bulabilirim? Sizin veya başkalarının barındırılan hizmete dağıttığı subgraphları bulmak için barındırılan hizmete gidin. [Burada](https://thegraph.com/hosted-service) bulabilirsiniz. -## 26. Will the hosted service start charging query fees? +## 26. Barındırılan hizmet sorgu ücreti almaya başlayacak mı? Graph, barındırılan hizmet için asla ücret talep etmeyecektir. Graph merkeziyetsiz bir protokoldür ve merkezi bir hizmet için ücret almak Graph'in değerleriyle uyuşmamaktadır. Barındırılan hizmet, merkeziyetsiz ağa ulaşmaya yardımcı olmak için her zaman geçici bir adım olmuştur. Geliştiriciler, merkeziyetsiz ağa rahatça yükseltebilmek için yeterli süreye sahip olacaklardır. -## 27. How do I update a subgraph on mainnet? +## 27. Mainnet üzerinde bir subgraph'i nasıl güncellerim? Bir subgraph geliştiricisiyseniz, CLI'yi kullanarak subgraph'ınızın yeni bir sürümünü Subgraph Stüdyo'ya dağıtabilirsiniz. Bu noktada gizli olarak kalacaktır, ancak isterseniz, merkeziyetsiz Graph Gezgini'nde yayınlayabilirsiniz. Bu, subgraph'ınızın Küratörlerin üzerinde sinyal iletmeye başlayabileceği yeni bir sürümünü oluşturacaktır. From e582f2f07e259e0bd48b148390a1f80caac80b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:44 -0400 Subject: [PATCH 141/924] New translations unit-testing-framework.mdx (Romanian) --- website/pages/ro/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ro/developing/unit-testing-framework.mdx b/website/pages/ro/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/ro/developing/unit-testing-framework.mdx +++ b/website/pages/ro/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 63455cbe474d96485b3af697da1d004e9ef4e3f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:45 -0400 Subject: [PATCH 142/924] New translations unit-testing-framework.mdx (French) --- .../fr/developing/unit-testing-framework.mdx | 449 +++++++++--------- 1 file changed, 224 insertions(+), 225 deletions(-) diff --git a/website/pages/fr/developing/unit-testing-framework.mdx b/website/pages/fr/developing/unit-testing-framework.mdx index 4cdbb7245322..51a8a15d219e 100644 --- a/website/pages/fr/developing/unit-testing-framework.mdx +++ b/website/pages/fr/developing/unit-testing-framework.mdx @@ -21,7 +21,7 @@ yarn add --dev matchstick-as Commande d'installation Postgres : ```sh -préparer l'installation de postgresql +brew install postgresql ``` Créez un lien symbolique vers la dernière libpq.5.lib _Vous devrez peut-être d'abord créer ce répertoire_ `/usr/local/opt/postgresql/lib/` @@ -43,13 +43,13 @@ sudo apt installer postgresql Vous pouvez utiliser Matchstick sur WSL en utilisant à la fois l'approche Docker et l'approche binaire. Comme WSL peut être un peu délicat, voici quelques conseils au cas où vous rencontreriez des problèmes tels que ``` -static BYTES = Symbol("Bytes") SyntaxError: Jeton inattendu = +static BYTES = Symbol("Bytes") SyntaxError: Unexpected token = ``` ou bien ``` -/node_modules/gluegun/build/index.js:13 lancer ; +/node_modules/gluegun/build/index.js:13 throw up; ``` Veuillez vous assurer que vous utilisez une version plus récente de Node.js graph-cli qui ne prend plus en charge la **v10.19.0**, et qu'il s'agit toujours de la version par défaut pour le nouvel Ubuntu. images sur WSL. Par exemple, il est confirmé que Matchstick fonctionne sur WSL avec **v18.1.0**, vous pouvez y accéder soit via **nvm** ou si vous mettez à jour votre Node.js global. N'oubliez pas de supprimer `node_modules` et d'exécuter à nouveau `npm install` après avoir mis à jour votre nodejs ! Ensuite, assurez-vous que **libpq** est installé, vous pouvez le faire en exécutant @@ -62,17 +62,17 @@ Et en conclussion, n'utilisez pas `graph test` (qui utilise votre installation g ```json { - "name": "subgraph de démonstration", - "version": "0.1.0", - "scripts": { - "test": "test graphique", - ... - }, - "dépendances": { - "@graphprotocol/graph-cli": "^0.30.0", - "@graphprotocol/graph-ts": "^0.27.0", - "matchstick-as": "^0.5.0" - } + "name": "demo-subgraph", + "version": "0.1.0", + "scripts": { + "test": "graph test", + ... + }, + "dependencies": { + "@graphprotocol/graph-cli": "^0.30.0", + "@graphprotocol/graph-ts": "^0.27.0", + "matchstick-as": "^0.5.0" + } } ``` @@ -97,7 +97,7 @@ gravity graph test Ce fichier de test sera le seul à être exécuté : ```sh -chemin de test graph/vers/fichier.test.ts +graph test path/to/file.test.ts ``` **Les Options :** @@ -119,7 +119,7 @@ chemin de test graph/vers/fichier.test.ts ❗ En cas d'exécution préalable de `graph test`, vous risquez de rencontrer l'erreur suivante lors de la construction de docker : ```sh - erreur de l'expéditeur : failed to xattr node_modules/binary-install-raw/bin/binary- : permission denied + error from sender: failed to xattr node_modules/binary-install-raw/bin/binary-: permission denied ``` Dans ce cas, il faut créer un `.dockerignore` dans le dossier racine et ajoutez `node_modules/binary-install-raw/bin` @@ -148,7 +148,7 @@ _**IMPORTANT : Requiert matchstick-as >=0.5.0**_ ### décrivez() -`décrivez(name: String , () => {})` - Définit un groupe de test. +`describe(name: String , () => {})` - Définit un groupe de test. **_Notez :_** @@ -157,10 +157,10 @@ _**IMPORTANT : Requiert matchstick-as >=0.5.0**_ L'exemple: ```typescript -importer { describe, test } du "matchstick-as/assembly/index" -import { handleNewGravatar } du "../../src/gravity" +import { describe, test } from "matchstick-as/assembly/index" +import { handleNewGravatar } from "../../src/gravity" -décrire ("handleNewGravatar()", () => { +describe("handleNewGravatar()", () => { test("Devrait créer une nouvelle entité Gravatar", () => { ... }) @@ -174,14 +174,14 @@ import { describe, test } from "matchstick-as/assembly/index" import { handleUpdatedGravatar } from "../../src/gravity" describe("handleUpdatedGravatar()", () => { - describe("When entity exists", () => { - test("updates the entity", () => { + describe("Lorsque l'entité existe", () => { + test("met à jour l'entité", () => { ... }) }) - describe("When entity does not exists", () => { - test("it creates a new entity", () => { + describe("Lorsque l'entité n'existe pas", () => { + test("il crée une nouvelle entitéy", () => { ... }) }) @@ -197,11 +197,11 @@ describe("handleUpdatedGravatar()", () => { L'exemple: ```typescript -importez { describe, test } from "matchstick-as/assembly/index" -importez { handleNewGravatar } from "../../src/gravity" +import { describe, test } from "matchstick-as/assembly/index" +import { handleNewGravatar } from "../../src/gravity" -décrivez ("handleNewGravatar()", () => { - testez ("Devrait créer une nouvelle entité", () => { +describe("handleNewGravatar()", () => { + test("Devrait créer une nouvelle entité", () => { ... }) }) @@ -228,9 +228,9 @@ Les Exemples: Le code contenu dans `beforeAll` sera exécuté une fois avant les tests _all_ du fichier. ```typescript -import { describe, test, beforeAll } du "matchstick-as/assembly/index" -import { handleUpdatedGravatar, handleNewGravatar } du "../../src/gravity" -import { Gravatar } du "../../generated/schema" +import { describe, test, beforeAll } from "matchstick-as/assembly/index" +import { handleUpdatedGravatar, handleNewGravatar } from "../../src/gravity" +import { Gravatar } from "../../generated/schema" beforeAll(() => { let gravatar = new Gravatar("0x0") @@ -288,34 +288,33 @@ L'exemple: Le code situé dans `afterAll` sera exécuté une fois après _all_ tests dans le fichier. ```typescript -importer { describe, test, afterAll } depuis "matchstick-as/assembly/index" -importer { handleUpdatedGravatar, handleNewGravatar } depuis "../../src/gravity" -importer { store } depuis "@graphprotocol/graph-ts" +import { describe, test, afterAll } from "matchstick-as/assembly/index" +import { handleUpdatedGravatar, handleNewGravatar } from "../../src/gravity" +import { store } from "@graphprotocol/graph-ts" -aprèsTout(() => { - store.remove("Gravatar", "0x0") - ... +afterAll(() => { + store.remove("Gravatar", "0x0") + ... }) -décrire("handleNewGravatar, () => { - test("crée un Gravatar avec l'identifiant 0x0", () => { +describe("handleNewGravatar, () => { + test("crée un Gravatar avec l'identifiant 0x0", () => { ... }) }) -décrire("handleUpdatedGravatar", () => { - test("met à jour Gravatar avec l'identifiant 0x0", () => { +describe("handleUpdatedGravatar", () => { + test("met à jour Gravatar avec l'identifiant 0x0", () => { ... - } ... - }) + }) }) ``` Le code à l'intérieur de `afterAll` s'exécute une fois après tous les tests du premier bloc de description ```typescript -importez { describe, test, afterAll, clearStore } du "matchstick-as/assembly/index" -importez { handleUpdatedGravatar, handleNewGravatar } du "../../src/gravity" +import { describe, test, afterAll, clearStore } from "matchstick-as/assembly/index" +import { handleUpdatedGravatar, handleNewGravatar } from "../../src/gravity" describe("handleNewGravatar", () => { afterAll(() => { @@ -323,17 +322,17 @@ describe("handleNewGravatar", () => { ... }) - test("It creates a new entity with Id 0x0", () => { + test("Crée une nouvelle entité avec l'identifiant 0x0", () => { ... }) - test("It creates a new entity with Id 0x1", () => { + test("Crée une nouvelle entité avec l'identifiant 0x1", () => { ... }) }) describe("handleUpdatedGravatar", () => { - test("updates Gravatar with id 0x0", () => { + test("Met à jour le Gravatar avec l'identifiant 0x0", () => { ... }) }) @@ -371,8 +370,8 @@ describe("handleNewGravatars, () => { Exécutez un bloc de code avant chaque test. Si `beforeEach` est déclaré à l'intérieur d'un bloc describe, il s'exécute avant chaque test de ce bloc describe ```typescript -importez { describe, test, beforeEach } from 'matchstick-as/assembly/index' -importez { handleUpdatedGravatar, handleNewGravatar } from '../../src/gravity' +import { describe, test, beforeEach } from 'matchstick-as/assembly/index' +import { handleUpdatedGravatar, handleNewGravatar } from '../../src/gravity' describe('handleUpdatedGravatars', () => { beforeEach(() => { @@ -410,10 +409,10 @@ Lance un bloc de code après chaque test. Si `afterEach` est déclaré à l'int Les Exemples: -Code inside `afterEach` will execute after every test. +Le code dans `afterEach` sera exécuté après chaque test. ```typescript -importez { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" +import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" import { handleUpdatedGravatar, handleNewGravatar } from "../../src/gravity" beforeEach(() => { @@ -452,8 +451,8 @@ describe("handleUpdatedGravatar", () => { Le code contenu dans `afterEach` exécutera après chaque test dans cette description ```typescript -importez { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" -importez { handleUpdatedGravatar, handleNewGravatar } from "../../src/gravity" +import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" +import { handleUpdatedGravatar, handleNewGravatar } from "../../src/gravity" describe("handleNewGravatar", () => { ... @@ -489,126 +488,126 @@ describe("handleUpdatedGravatar", () => { }) ``` -## Asserts +## Assertions ```typescript -fieldEquals (entityType : chaîne, identifiant : chaîne, fieldName : chaîne, ExpectVal : chaîne) +fieldEquals(entityType: string, id: string, fieldName: string, expectedVal: string) -est égal (attendu : ethereum.Value, réel : ethereum.Value) +equals(expected: ethereum.Value, actual: ethereum.Value) -notInStore (entityType : chaîne, identifiant : chaîne) +notInStore(entityType: string, id: string) -adresseEquals (adresse1 : adresse, adresse2 : adresse) +addressEquals(address1: Address, address2: Address) -bytesEquals (octets1 : octets, octets2 : octets) +bytesEquals(bytes1: Bytes, bytes2: Bytes) -i32Equals(numéro1 : i32, numéro2 : i32) +i32Equals(number1: i32, number2: i32) -bigIntEquals (bigInt1 : BigInt, bigInt2 : BigInt) +bigIntEquals(bigInt1: BigInt, bigInt2: BigInt) -booleanEquals(bool1 : booléen, bool2 : booléen) +booleanEquals(bool1: boolean, bool2: boolean) -stringEquals(string1 : chaîne, string2 : chaîne) +stringEquals(string1: string, string2: string) -arrayEquals (tableau1 : tableau, tableau2 : tableau) +arrayEquals(array1: Array, array2: Array) -tupleEquals (tuple1 : ethereum.Tuple, tuple2 : ethereum.Tuple) +tupleEquals(tuple1: ethereum.Tuple, tuple2: ethereum.Tuple) -assertTrue(valeur : booléenne) +assertTrue(value: boolean) -assertNull(valeur : T) +assertNull(value: T) -assertNotNull(valeur : T) +assertNotNull(value: T) -EntityCount (EntityType : chaîne, ExpectedCount : i32) +entityCount(entityType: string, expectedCount: i32) ``` -## Écrivez un test unitaire +## Écrire un test unitaire Voyons à quoi ressemblerait un test unitaire simple en utilisant les exemples Gravatar dans le [subgraph de démonstration](https://github.com/LimeChain/demo-subgraph/blob/main/src/gravity.ts). En supposant que nous disposions de la fonction de traitement suivante (ainsi que de deux fonctions d'aide pour nous faciliter la vie) : ```typescript -fonction d'exportation handleNewGravatar (événement : NewGravatar) : void { - laissez gravatar = new Gravatar(event.params.id.toHex()) - gravatar.owner = event.params.owner - gravatar.displayName = event.params.displayName - gravatar.imageUrl = event.params.imageUrl - gravatar.save() +export function handleNewGravatar(event: NewGravatar): void { + let gravatar = new Gravatar(event.params.id.toHex()) + gravatar.owner = event.params.owner + gravatar.displayName = event.params.displayName + gravatar.imageUrl = event.params.imageUrl + gravatar.save() } -fonction d'exportation handleNewGravatars(events: NewGravatar[]): void { - events.forEach((event) => { - handleNewGravatar (événement) - }) +export function handleNewGravatars(events: NewGravatar[]): void { + events.forEach((event) => { + handleNewGravatar(event) + }) } -fonction d'exportation createNewGravatarEvent( - identifiant : i32, - OwnerAddress : chaîne, - displayName : chaîne, - imageUrl : chaîne, -): NouveauGravatar { - laissez mockEvent = newMockEvent() - laissez newGravatarEvent = new NewGravatar( - mockEvent.adresse, - mockEvent.logIndex, - mockEvent.transactionLogIndex, - mockEvent.logType, - mockEvent.block, - mockEvent.transaction, - mockEvent.paramètres, - ) - newGravatarEvent.parameters = nouveau tableau() - laissez idParam = new ethereum.EventParam('id', ethereum.Value.fromI32(id)) - laissez adresseParam = new ethereum.EventParam ( - 'adresse du propriétaire', - ethereum.Value.fromAddress(Address.fromString(ownerAddress)), - ) - laissez displayNameParam = new ethereum.EventParam('displayName', ethereum.Value.fromString(displayName)) - laissez imageUrlParam = new ethereum.EventParam('imageUrl', ethereum.Value.fromString(imageUrl)) - - newGravatarEvent.parameters.push(idParam) - newGravatarEvent.parameters.push(addressParam) - newGravatarEvent.parameters.push(displayNameParam) - newGravatarEvent.parameters.push(imageUrlParam) - - retourner newGravatarEvent +export function createNewGravatarEvent( + id: i32, + ownerAddress: string, + displayName: string, + imageUrl: string, +): NewGravatar { + let mockEvent = newMockEvent() + let newGravatarEvent = new NewGravatar( + mockEvent.address, + mockEvent.logIndex, + mockEvent.transactionLogIndex, + mockEvent.logType, + mockEvent.block, + mockEvent.transaction, + mockEvent.parameters, + ) + newGravatarEvent.parameters = new Array() + let idParam = new ethereum.EventParam('id', ethereum.Value.fromI32(id)) + let addressParam = new ethereum.EventParam( + 'ownderAddress', + ethereum.Value.fromAddress(Address.fromString(ownerAddress)), + ) + let displayNameParam = new ethereum.EventParam('displayName', ethereum.Value.fromString(displayName)) + let imageUrlParam = new ethereum.EventParam('imageUrl', ethereum.Value.fromString(imageUrl)) + + newGravatarEvent.parameters.push(idParam) + newGravatarEvent.parameters.push(addressParam) + newGravatarEvent.parameters.push(displayNameParam) + newGravatarEvent.parameters.push(imageUrlParam) + + return newGravatarEvent } ``` Nous devons tout d'abord créer un fichier de test dans notre projet. Voici un exemple de ce à quoi cela pourrait ressembler : ```typescript -importer { clearStore, test, assert } depuis 'matchstick-as/assembly/index' -importer { Gravatar } depuis '../../generated/schema' -importer { NewGravatar } depuis '../../generated/Gravity/Gravity' -importer { createNewGravatarEvent, handleNewGravatars } depuis '../mappings/gravity' - -test('Peut appeler des mappages avec des événements personnalisés', () => { - // Créez une entité de test et enregistrez-la dans le magasin comme état initial (facultatif) - laissez gravatar = new Gravatar('gravatarId0') - gravatar.save() +import { clearStore, test, assert } from 'matchstick-as/assembly/index' +import { Gravatar } from '../../generated/schema' +import { NewGravatar } from '../../generated/Gravity/Gravity' +import { createNewGravatarEvent, handleNewGravatars } from '../mappings/gravity' + +test('Can call mappings with custom events', () => { + // Create a test entity and save it in the store as initial state (optional) + let gravatar = new Gravatar('gravatarId0') + gravatar.save() - // Créer des événements fictifs - laissez newGravatarEvent = createNewGravatarEvent(12345, '0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7', 'cap', 'pac') - laissez anotherGravatarEvent = createNewGravatarEvent(3546, '0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7', 'cap', 'pac') + // Create mock events + let newGravatarEvent = createNewGravatarEvent(12345, '0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7', 'cap', 'pac') + let anotherGravatarEvent = createNewGravatarEvent(3546, '0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7', 'cap', 'pac') - // Appelez les fonctions de mappage en passant les événements que nous venons de créer - handleNewGravatars([newGravatarEvent, anotherGravatarEvent]) + // Call mapping functions passing the events we just created + handleNewGravatars([newGravatarEvent, anotherGravatarEvent]) - // Affirmer l'état du magasin - assert.fieldEquals('Gravatar', 'gravatarId0', 'id', 'gravatarId0') - assert.fieldEquals('Gravatar', '12345', 'propriétaire', '0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7') - assert.fieldEquals('Gravatar', '3546', 'displayName', 'cap') + // Assert the state of the store + assert.fieldEquals('Gravatar', 'gravatarId0', 'id', 'gravatarId0') + assert.fieldEquals('Gravatar', '12345', 'owner', '0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7') + assert.fieldEquals('Gravatar', '3546', 'displayName', 'cap') - // Vider le magasin afin de démarrer le prochain test sur une table rase - clearStore() + // Clear the store in order to start the next test off on a clean slate + clearStore() }) -test('Test suivant', () => { - //... +test('Next test', () => { + //... }) ``` @@ -622,13 +621,13 @@ Cela fait beaucoup à décortiquer ! Tout d'abord, une chose importante à noter Et voilà, nous avons formulé notre premier test ! 👏 -Now in order to run our tests you simply need to run the following in your subgraph root folder: +Maintenant, afin d'exécuter nos tests, il suffit d'exécuter ce qui suit dans le dossier racine de votre subgraph : `gravity graph test` Et si tout se passe bien, vous devriez être accueilli par ce qui suit : -![Matchstick saying “All tests passed!”](/img/matchstick-tests-passed.png) +![Matchstick indiquant « Tous les tests sont réussis ! »](/img/matchstick-tests-passed.png) ## Scénarios de tests actuels @@ -646,8 +645,8 @@ gravatar.save() Un utilisateur peut créer un événement personnalisé et le transmettre à une fonction de cartographie liée au magasin : ```typescript -importez { store } du 'matchstick-as/assembly/store' -importez { NewGravatar } du '../../generated/Gravity/Gravity' +import { store } from 'matchstick-as/assembly/store' +import { NewGravatar } from '../../generated/Gravity/Gravity' import { handleNewGravatars, createNewGravatarEvent } from './mapping' let newGravatarEvent = createNewGravatarEvent(12345, '0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7', 'cap', 'pac') @@ -660,9 +659,9 @@ handleNewGravatar(newGravatarEvent) Les utilisateurs peuvent appeler les mappages avec des dispositifs de test. ```typescript -importez { NewGravatar } from '../../generated/Gravity/Gravity' -importez { store } from 'matchstick-as/assembly/store' -importez { handleNewGravatars, createNewGravatarEvent } from './mapping' +import { NewGravatar } from '../../generated/Gravity/Gravity' +import { store } from 'matchstick-as/assembly/store' +import { handleNewGravatars, createNewGravatarEvent } from './mapping' let newGravatarEvent = createNewGravatarEvent(12345, '0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7', 'cap', 'pac') @@ -672,10 +671,10 @@ handleNewGravatars([newGravatarEvent, anotherGravatarEvent]) ``` ``` -fonction d'exportation handleNewGravatars(events: NewGravatar[]): void { - events.forEach(event => { - handleNewGravatar(événement); - }); +export function handleNewGravatars(events: NewGravatar[]): void { + events.forEach(event => { + handleNewGravatar(event); + }); } ``` @@ -684,9 +683,9 @@ fonction d'exportation handleNewGravatars(events: NewGravatar[]): void { Les utilisateurs peuvent simuler des appels de contrat : ```typescript -importez { addMetadata, assert, createMockedFunction, clearStore, test } from 'matchstick-as/assembly/index' -importez { Gravity } from '../../generated/Gravity/Gravity' -importez { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' +import { addMetadata, assert, createMockedFunction, clearStore, test } from 'matchstick-as/assembly/index' +import { Gravity } from '../../generated/Gravity/Gravity' +import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' let contractAddress = Address.fromString('0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7') let expectedResult = Address.fromString('0x90cBa2Bbb19ecc291A12066Fd8329D65FA1f1947') @@ -721,37 +720,37 @@ NOTEZ : Lorsque vous testez `ipfs.map/ipfs.mapJSON`, la fonction de rappel doit Fichier `.test.ts` : ```typescript -importer { assert, test, mockIpfsFile } depuis 'matchstick-as/assembly/index' -importer { ipfs } depuis '@graphprotocol/graph-ts' -importer { gravatarFromIpfs } depuis './utils' +import { assert, test, mockIpfsFile } from 'matchstick-as/assembly/index' +import { ipfs } from '@graphprotocol/graph-ts' +import { gravatarFromIpfs } from './utils' -// Exportation du callback ipfs.map() pour que matchtck le détecte. -exporter { processGravatar } depuis './utils' +// Export ipfs.map() callback in order for matchstck to detect it +export { processGravatar } from './utils' test('ipfs.cat', () => { - mockIpfsFile('ipfsCatfileHash', 'tests/ipfs/cat.json') + mockIpfsFile('ipfsCatfileHash', 'tests/ipfs/cat.json') - assert.entityCount(GRAVATAR_ENTITY_TYPE, 0) + assert.entityCount(GRAVATAR_ENTITY_TYPE, 0) - gravatarFromIpfs() + gravatarFromIpfs() - assert.entityCount(GRAVATAR_ENTITY_TYPE, 1) - assert.fieldEquals(GRAVATAR_ENTITY_TYPE, '1', 'imageUrl', 'https://i.ytimg.com/vi/MELP46s8Cic/maxresdefault.jpg') + assert.entityCount(GRAVATAR_ENTITY_TYPE, 1) + assert.fieldEquals(GRAVATAR_ENTITY_TYPE, '1', 'imageUrl', 'https://i.ytimg.com/vi/MELP46s8Cic/maxresdefault.jpg') - clearStore() + clearStore() }) test('ipfs.map', () => { - mockIpfsFile('ipfsMapfileHash', 'tests/ipfs/map.json') + mockIpfsFile('ipfsMapfileHash', 'tests/ipfs/map.json') - assert.entityCount(GRAVATAR_ENTITY_TYPE, 0) + assert.entityCount(GRAVATAR_ENTITY_TYPE, 0) - ipfs.map('ipfsMapfileHash', 'processGravatar', Value.fromString('Gravatar'), ['json']) + ipfs.map('ipfsMapfileHash', 'processGravatar', Value.fromString('Gravatar'), ['json']) - assert.entityCount(GRAVATAR_ENTITY_TYPE, 3) - assert.fieldEquals(GRAVATAR_ENTITY_TYPE, '1', 'displayName', 'Gravatar1') - assert.fieldEquals(GRAVATAR_ENTITY_TYPE, '2', 'displayName', 'Gravatar2') - assert.fieldEquals(GRAVATAR_ENTITY_TYPE, '3', 'displayName', 'Gravatar3') + assert.entityCount(GRAVATAR_ENTITY_TYPE, 3) + assert.fieldEquals(GRAVATAR_ENTITY_TYPE, '1', 'displayName', 'Gravatar1') + assert.fieldEquals(GRAVATAR_ENTITY_TYPE, '2', 'displayName', 'Gravatar2') + assert.fieldEquals(GRAVATAR_ENTITY_TYPE, '3', 'displayName', 'Gravatar3') }) ``` @@ -809,8 +808,8 @@ fonction d'exportation gravatarFromIpfs() : void { Les utilisateurs sont en mesure d'affirmer l'état final (ou intermédiaire) du magasin via des entités d'affirmation. Pour ce faire, l'utilisateur doit fournir un type d'entité, l'ID spécifique d'une entité, le nom d'un champ sur cette entité et la valeur attendue du champ. Voici un exemple rapide: ```typescript -importez { assert } du 'matchstick-as/assembly/index' -importez { Gravatar } du '../generated/schema' +import { assert } from 'matchstick-as/assembly/index' +import { Gravatar } from '../generated/schema' let gravatar = new Gravatar('gravatarId0') gravatar.save() @@ -852,7 +851,7 @@ assert.notInStore('Gravatar', '23') Vous pouvez imprimer l'intégralité du magasin sur la console à l'aide de cette fonction d'assistance: ```typescript -importez { logStore } du 'matchstick-as/assembly/store' +import { logStore } from 'matchstick-as/assembly/store' logStore() ``` @@ -873,13 +872,13 @@ test( Si le test est marqué avec ShouldFail = true mais n'échoue PAS, cela apparaîtra comme une erreur dans les journaux et le bloc de test échouera. De plus, s'il est marqué avec ShouldFail = false (l'état par défaut), l'exécuteur de test plantera. -### Logging +### Journal de bord Avoir des journaux personnalisés dans les tests unitaires équivaut exactement à la journalisation des mappages. La différence est que l'objet journal doit être importé depuis matchstick-as plutôt que graph-ts. Voici un exemple simple avec tous les types de journaux non critiques : ```typescript -importez { test } from "matchstick-as/assembly/index"; -importez { log } from "matchstick-as/assembly/log"; +import { test } from "matchstick-as/assembly/index"; +import { log } from "matchstick-as/assembly/log"; test("Success", () => { log.success("Success!". []); @@ -902,7 +901,7 @@ Les utilisateurs peuvent également simuler une panne critique, comme ceci : ```typescript test('Tout faire exploser', () => { - log.critical('Boom!') + log.critical('Boom!') }) ``` @@ -913,23 +912,23 @@ La journalisation des erreurs critiques arrêtera l’exécution des tests et fe Le test des champs dérivés est une fonctionnalité qui (comme le montre l'exemple ci-dessous) permet à l'utilisateur de définir un champ dans une certaine entité et de mettre à jour automatiquement une autre entité si elle dérive l'un de ses champs de la première entité. La chose importante à noter est que la première entité doit être rechargée car la mise à jour automatique se produit dans le magasin Rust dont le code AS est indépendant. ```typescript -test('Exemple de test de champs dérivés', () => { - laissez mainAccount = new GraphAccount('12') - mainAccount.save() - laissez exploitéAccount = new GraphAccount ('1') - OperatorAccount.operators = ['12'] - exploitéAccount.save() - laissez nst = nouveau NameSignalTransaction('1234') - nst.signer = '12' - nst.save() - - assert.assertNull(mainAccount.get('nameSignalTransactions')) - assert.assertNull(mainAccount.get('operatorOf')) - - mainAccount = GraphAccount.load('12') ! - - assert.i32Equals(1, mainAccount.nameSignalTransactions.length) - assert.stringEquals('1', mainAccount.operatorOf[0]) +test('Derived fields example test', () => { + let mainAccount = new GraphAccount('12') + mainAccount.save() + let operatedAccount = new GraphAccount('1') + operatedAccount.operators = ['12'] + operatedAccount.save() + let nst = new NameSignalTransaction('1234') + nst.signer = '12' + nst.save() + + assert.assertNull(mainAccount.get('nameSignalTransactions')) + assert.assertNull(mainAccount.get('operatorOf')) + + mainAccount = GraphAccount.load('12')! + + assert.i32Equals(1, mainAccount.nameSignalTransactions.length) + assert.stringEquals('1', mainAccount.operatorOf[0]) }) ``` @@ -937,9 +936,9 @@ test('Exemple de test de champs dérivés', () => { Le test des sources de données dynamiques peut être effectué en simulant la valeur de retour des fonctions `context()`, `address()` et `network()` du Espace de noms dataSource. Ces fonctions renvoient actuellement les éléments suivants : `context()` - renvoie une entité vide (DataSourceContext), `address()` - renvoie `0x000000000000000000000000000000000000000000`, ` network()` - renvoie `mainnet`. Les fonctions `create(...)` et `createWithContext(...)` sont simulées pour ne rien faire, elles n'ont donc pas du tout besoin d'être appelées dans les tests. Les modifications des valeurs de retour peuvent être effectuées via les fonctions de l'espace de noms `dataSourceMock` dans `matchstick-as` (version 0.3.0+). -Example below: +L'exemple ci-dessous : -First we have the following event handler (which has been intentionally repurposed to showcase datasource mocking): +Nous avons d’abord le gestionnaire d’événements suivant (qui a été intentionnellement réutilisé pour présenter la moquerie de la source de données) : ```typescript fonction d'exportation handleApproveTokenDestinations (événement : ApproveTokenDestinations) : void { @@ -958,33 +957,33 @@ fonction d'exportation handleApproveTokenDestinations (événement : ApproveTok Et puis nous avons le test utilisant l'une des méthodes de l'espace de noms dataSourceMock pour définir une nouvelle valeur de retour pour toutes les fonctions dataSource : ```typescript -import { assert, test, newMockEvent, dataSourceMock } from 'matchstick-as/assembly/index' -import { BigInt, DataSourceContext, Value } from '@graphprotocol/graph-ts' +importer { assert, test, newMockEvent, dataSourceMock } depuis 'matchstick-as/assembly/index' +importer { BigInt, DataSourceContext, Value } depuis '@graphprotocol/graph-ts' -import { handleApproveTokenDestinations } from '../../src/token-lock-wallet' -import { ApproveTokenDestinations } from '../../generated/templates/GraphTokenLockWallet/GraphTokenLockWallet' -import { TokenLockWallet } from '../../generated/schema' +importer { handleApproveTokenDestinations } depuis '../../src/token-lock-wallet' +importer { ApproveTokenDestinations } depuis '../../generated/templates/GraphTokenLockWallet/GraphTokenLockWallet' +importer { TokenLockWallet } depuis '../../generated/schema' -test('Data source simple mocking example', () => { - let addressString = '0xA16081F360e3847006dB660bae1c6d1b2e17eC2A' - let address = Address.fromString(addressString) +test('Exemple moqueur simple de source de données', () => { + laissez adresseString = '0xA16081F360e3847006dB660bae1c6d1b2e17eC2A' + let adresse = Adresse.fromString(addressString) - let wallet = new TokenLockWallet(address.toHexString()) - wallet.save() - let context = new DataSourceContext() - context.set('contextVal', Value.fromI32(325)) - dataSourceMock.setReturnValues(addressString, 'rinkeby', context) - let event = changetype(newMockEvent()) + laissez wallet = new TokenLockWallet (address.toHexString()) + portefeuille.save() + laisser contexte = new DataSourceContext() + contexte.set('contextVal', Value.fromI32(325)) + dataSourceMock.setReturnValues(addressString, 'rinkeby', contexte) + let event = changetype(newMockEvent()) - assert.assertTrue(!wallet.tokenDestinationsApproved) + assert.assertTrue(!wallet.tokenDestinationsApproved) - handleApproveTokenDestinations(event) + handleApproveTokenDestinations (événement) - wallet = TokenLockWallet.load(address.toHexString())! - assert.assertTrue(wallet.tokenDestinationsApproved) - assert.bigIntEquals(wallet.tokensReleased, BigInt.fromI32(325)) + portefeuille = TokenLockWallet.load(address.toHexString()) ! + assert.assertTrue(wallet.tokenDestinationsApproved) + assert.bigIntEquals(wallet.tokensReleased, BigInt.fromI32(325)) - dataSourceMock.resetValues() + dataSourceMock.resetValues() }) ``` @@ -1035,7 +1034,7 @@ Cela exécutera l'outil de couverture et vous devriez voir quelque chose comme c ```sh $ graph test -c -Skipping download/install step because binary already exists at /Users/petko/work/demo-subgraph/node_modules/binary-install-raw/bin/0.4.0 +Sauter l'étape de téléchargement/installation car le binaire existe déjà à l'adresse suivante : /Users/petko/work/demo-subgraph/node_modules/binary-install-raw/bin/0.4.0 ___ ___ _ _ _ _ _ | \/ | | | | | | | (_) | | @@ -1044,13 +1043,13 @@ ___ ___ _ _ _ _ _ | | | | (_| | || (__| | | \__ \ |_| | (__| < \_| |_/\__,_|\__\___|_| |_|___/\__|_|\___|_|\_\ -Compiling... +Compilation... -Running in coverage report mode. +Exécution en mode rapport de couverture. ️ -Reading generated test modules... 🔎️ +Lecture des modules de test générés... 🔎️ -Generating coverage report 📝 +Génération du rapport de couverture 📝 Handlers for source 'Gravity': Handler 'handleNewGravatar' is tested. @@ -1076,26 +1075,26 @@ La sortie du journal inclut la durée de l’exécution du test. Voici un exempl `[Jeudi 31 mars 2022 13:54:54 +0300] Programme exécuté en : 42,270 ms.` -## Common compiler errors +## Erreurs de compilation courantes > Critique : impossible de créer WasmInstance à partir d'un module valide avec un contexte : importation inconnue : wasi_snapshot_preview1::fd_write n'a pas été défini Cela signifie que vous avez utilisé `console.log` dans votre code, ce qui n'est pas pris en charge par AssemblyScript. Veuillez envisager d'utiliser l'[API Logging](/developing/assemblyscript-api/#logging-api) > ERREUR TS2554 : attendu ? arguments, mais j'ai eu ?. -> +> > renvoyer le nouveau ethereum.Block (defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt) ; -> -> in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> +> dans ~lib/matchstick-as/assembly/defaults.ts(18,12) +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > renvoyer un nouveau ethereum.Transaction (defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt) ; -> +> > dans ~lib/matchstick-as/assembly/defaults.ts(24,12) L'inadéquation des arguments est causée par une inadéquation entre `graph-ts` et `matchstick-as`. La meilleure façon de résoudre des problèmes comme celui-ci est de tout mettre à jour vers la dernière version publiée. -## Feedback +## Réaction Si vous avez des questions, des commentaires, des demandes de fonctionnalités ou si vous souhaitez simplement nous contacter, le meilleur endroit serait The Graph Discord où nous avons une chaîne dédiée à Matchstick, appelée 🔥| tests unitaires. From 845d1414e67e6229eeda47766bfa779e1f83f9d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:46 -0400 Subject: [PATCH 143/924] New translations unit-testing-framework.mdx (Spanish) --- website/pages/es/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/es/developing/unit-testing-framework.mdx b/website/pages/es/developing/unit-testing-framework.mdx index 514f692ac6e9..84f9bd46d732 100644 --- a/website/pages/es/developing/unit-testing-framework.mdx +++ b/website/pages/es/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ La salida del log incluye la duración de la ejecución de la prueba. Aquí hay Esto significa que has utilizado `console.log` en tu código, que no es compatible con AssemblyScript. Considera usar la [API de registro](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) La falta de coincidencia en los argumentos se debe a la falta de coincidencia en `graph-ts` y `matchstick-as`. La mejor manera de solucionar problemas como este es actualizar todo a la última versión publicada. From f41267badf9a8ee7d5cf1bef84e3b86fa3acefeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:47 -0400 Subject: [PATCH 144/924] New translations unit-testing-framework.mdx (Arabic) --- website/pages/ar/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ar/developing/unit-testing-framework.mdx b/website/pages/ar/developing/unit-testing-framework.mdx index 54b83b009125..395932bc4b99 100644 --- a/website/pages/ar/developing/unit-testing-framework.mdx +++ b/website/pages/ar/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From da56294d43961503646eaace3c33a11cd9934cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:48 -0400 Subject: [PATCH 145/924] New translations unit-testing-framework.mdx (Czech) --- .../cs/developing/unit-testing-framework.mdx | 264 +++++++++--------- 1 file changed, 132 insertions(+), 132 deletions(-) diff --git a/website/pages/cs/developing/unit-testing-framework.mdx b/website/pages/cs/developing/unit-testing-framework.mdx index 8ffc66465e3a..81ae89accd3f 100644 --- a/website/pages/cs/developing/unit-testing-framework.mdx +++ b/website/pages/cs/developing/unit-testing-framework.mdx @@ -1,30 +1,30 @@ --- -title: Unit Testing Framework +title: Rámec pro testování jednotek --- -Matchstick is a unit testing framework, developed by [LimeChain](https://limechain.tech/), that enables subgraph developers to test their mapping logic in a sandboxed environment and deploy their subgraphs with confidence! +Matchstick je framework pro jednotkové testování vyvinutý společností [LimeChain](https://limechain.tech/), který umožňuje vývojářům podgrafu testovat logika mapování v prostředí sandbox a spolehlivě nasazovat své podgraf! -## Getting Started +## Začínáme -### Install dependencies +### Instalace závislostí -In order to use the test helper methods and run the tests, you will need to install the following dependencies: +Abyste mohli používat pomocné metody testy a spouštět testy, je třeba nainstalovat následující závislosti: ```sh yarn add --dev matchstick-as ``` -❗ `graph-node` depends on PostgreSQL, so if you don't already have it, you will need to install it. We highly advise using the commands below as adding it in any other way may cause unexpected errors! +❗ `graph-node` závisí na PostgreSQL, takže pokud jej ještě nemáte, musíte si jej nainstalovat. Důrazně doporučujeme použít níže uvedené příkazy, protože jeho přidání jiným způsobem může způsobit neočekávané chyby! #### MacOS -Postgres installation command: +Instalační příkaz Postgres: ```sh -brew install postgresql +brew instalovat postgresql ``` -Create a symlink to the latest libpq.5.lib _You may need to create this dir first_ `/usr/local/opt/postgresql/lib/` +Vytvoření symlinku na nejnovější verzi libpq.5.lib _Musíte nejprve vytvořit tento adresář_ `/usr/local/opt/postgresql/lib/` ```sh ln -sf /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib /usr/local/opt/postgresql/lib/libpq.5.dylib @@ -32,33 +32,33 @@ ln -sf /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib /usr/local/o #### Linux -Postgres installation command (depends on your distro): +Instalační příkaz Postgres (závisí na distribuci): ```sh sudo apt install postgresql ``` -### WSL (Windows Subsystem for Linux) +### WSL (Subsystém Windows pro Linux) -You can use Matchstick on WSL both using the Docker approach and the binary approach. As WSL can be a bit tricky, here's a few tips in case you encounter issues like +Matchstick můžete na WSL používat jak pomocí přístupu Docker, tak pomocí binárního přístupu. Protože WSL může být trochu složitější, přinášíme několik tipů pro případ, že narazíte na problémy, jako např ``` static BYTES = Symbol("Bytes") SyntaxError: Unexpected token = ``` -or +nebo ``` /node_modules/gluegun/build/index.js:13 throw up; ``` -Please make sure you're on a newer version of Node.js graph-cli doesn't support **v10.19.0** anymore, and that is still the default version for new Ubuntu images on WSL. For instance Matchstick is confirmed to be working on WSL with **v18.1.0**, you can switch to it either via **nvm** or if you update your global Node.js. Don't forget to delete `node_modules` and to run `npm install` again after updating you nodejs! Then, make sure you have **libpq** installed, you can do that by running +Ujistěte se, že používáte novější verzi Node.js graph-cli již nepodporuje **v10.19.0** a tato verze je stále výchozí pro nové obrazy Ubuntu na WSL. Například je potvrzeno, že Matchstick funguje na WSL s **v18.1.0**, můžete na něj přepnout buď přes **nvm**, nebo pokud aktualizujete globální Node.js. Nezapomeňte smazat `node_modules` a po aktualizaci nodejs znovu spustit `npm install`! Poté se ujistěte, že máte nainstalovaný **libpq**, což můžete provést spuštěním příkazu ``` sudo apt-get install libpq-dev ``` -And finally, do not use `graph test` (which uses your global installation of graph-cli and for some reason that looks like it's broken on WSL currently), instead use `yarn test` or `npm run test` (that will use the local, project-level instance of graph-cli, which works like a charm). For that you would of course need to have a `"test"` script in your `package.json` file which can be something as simple as +A konečně, nepoužívejte `graph test` (který používá globální instalaci graph-cli a z nějakého důvodu to vypadá, že je na WSL momentálně nefunkční), místo toho použijte `yarn test` nebo `npm run test` (které použijí lokální instanci graph-cli na úrovni projektu, což funguje jako kouzlo). K tomu byste samozřejmě potřebovali mít v souboru `package.json` skript `"test"`, což může být něco tak jednoduchého, jako např ```json { @@ -76,57 +76,57 @@ And finally, do not use `graph test` (which uses your global installation of gra } ``` -### Usage +### Použití -To use **Matchstick** in your subgraph project just open up a terminal, navigate to the root folder of your project and simply run `graph test [options] ` - it downloads the latest **Matchstick** binary and runs the specified test or all tests in a test folder (or all existing tests if no datasource flag is specified). +Pro použití **Matchsticku** v projektu subgrafu stačí otevřít terminál, přejít do kořenové složky projektu a jednoduše spustit `graph test [options] ` - stáhne se nejnovější binární soubor **Matchsticku** a spustí se zadaný test nebo všechny testy ve složce testů (nebo všechny existující testy, pokud není zadán příznak datasource). -### CLI options +### Možnosti CLI -This will run all tests in the test folder: +Tím se spustí všechny testy ve složce testů: ```sh -graph test +test graf ``` -This will run a test named gravity.test.ts and/or all test inside of a folder named gravity: +Spustí se test s názvem gravity.test.ts a/nebo všechny testy uvnitř složky s názvem gravity: ```sh -graph test gravity +testovací gravitace graf ``` -This will run only that specific test file: +Spustí se pouze tento konkrétní testovací soubor: ```sh graph test path/to/file.test.ts ``` -**Options:** +**Možnosti:** ```sh --c, --coverage Run the tests in coverage mode --d, --docker Run the tests in a docker container (Note: Please execute from the root folder of the subgraph) --f, --force Binary: Redownloads the binary. Docker: Redownloads the Dockerfile and rebuilds the docker image. --h, --help Show usage information --l, --logs Logs to the console information about the OS, CPU model and download url (debugging purposes) --r, --recompile Forces tests to be recompiled --v, --version Choose the version of the rust binary that you want to be downloaded/used +-c, --coverage Spustit testy v režimu pokrytí +-d, --docker Spustit testy v kontejneru docker (Poznámka: Spusťte z kořenové složky podgrafu). +-f, --force Binární: Znovu stáhne binární soubor. Docker: Znovu stáhne soubor dockeru a obnoví obraz dockeru. +-h, --help Zobrazí informace o použití +-l, --logs Zaznamená do konzole informace o operačním systému, modelu procesoru a url adrese pro stahování (pro účely ladění). +-r, --recompile Vynutí překompilování testů. +-v, --version Zvolte verzi binárního souboru rust, která se má stáhnout/použít ``` ### Docker -From `graph-cli 0.25.2`, the `graph test` command supports running `matchstick` in a docker container with the `-d` flag. The docker implementation uses [bind mount](https://docs.docker.com/storage/bind-mounts/) so it does not have to rebuild the docker image every time the `graph test -d` command is executed. Alternatively you can follow the instructions from the [matchstick](https://github.com/LimeChain/matchstick#docker-) repository to run docker manually. +Od verze `graph-cli 0.25.2` podporuje příkaz `graph test` spuštění `matchstick` v kontejneru docker s příznakem `-d`. Implementace dockeru používá příkaz [bind mount](https://docs.docker.com/storage/bind-mounts/), takže nemusí při každém spuštění příkazu `graph test -d` obnovovat obraz dockeru. Případně můžete postupovat podle pokynů z repozitáře [matchstick](https://github.com/LimeChain/matchstick#docker-) a spustit docker ručně. -❗ If you have previously ran `graph test` you may encounter the following error during docker build: +❗ Pokud jste dříve spustili `graph test`, můžete se při sestavování dockeru setkat s následující chybou: ```sh - error from sender: failed to xattr node_modules/binary-install-raw/bin/binary-: permission denied + chyba odesílatele: nepodařilo se provést xattr node_modules/binary-install-raw/binary/binary-: oprávnění odepřeno ``` -In this case create a `.dockerignore` in the root folder and add `node_modules/binary-install-raw/bin` +V tomto případě vytvořte v kořenové složce `.dockerignore` a přidejte `node_modules/binary-install-raw/bin` -### Configuration +### Konfigurace -Matchstick can be configured to use a custom tests, libs and manifest path via `matchstick.yaml` config file: +Matchstick lze nakonfigurovat tak, aby používal vlastní testy, knihovny a cestu k manifestu prostřednictvím konfiguračního souboru `matchstick.yaml`: ```yaml testsFolder: path/to/tests @@ -134,27 +134,27 @@ libsFolder: path/to/libs manifestPath: path/to/subgraph.yaml ``` -### Demo subgraph +### Ukázkový podgraf -You can try out and play around with the examples from this guide by cloning the [Demo Subgraph repo](https://github.com/LimeChain/demo-subgraph) +Příklady z této příručky si můžete vyzkoušet a pohrát si s nimi naklonováním repozitáře [Ukázkový podgraf](https://github.com/LimeChain/demo-subgraph) -### Video tutorials +### Videonávody -Also you can check out the video series on ["How to use Matchstick to write unit tests for your subgraphs"](https://www.youtube.com/playlist?list=PLTqyKgxaGF3SNakGQwczpSGVjS_xvOv3h) +Můžete se také podívat na sérii videí ["Jak používat Matchstick k psaní unit test pro vaše podgrafy"](https://www.youtube.com/playlist?list=PLTqyKgxaGF3SNakGQwczpSGVjS_xvOv3h) -## Tests structure (>=0.5.0) +## Struktura testů (>=0.5.0) -_**IMPORTANT: Requires matchstick-as >=0.5.0**_ +_**DŮLEŽITÉ: Vyžaduje matchstick-as >=0.5.0**_ ### describe() -`describe(name: String , () => {})` - Defines a test group. +`describe(name: String , () => {})` - Definuje skupinu test. -**_Notes:_** +**_Poznámky:_** -- _Describes are not mandatory. You can still use test() the old way, outside of the describe() blocks_ +- _Popisy nejsou povinné. Test() můžete stále používat starým způsobem, mimo bloky describe()_ -Example: +Příklad: ```typescript import { describe, test } from "matchstick-as/assembly/index" @@ -167,7 +167,7 @@ describe("handleNewGravatar()", () => { }) ``` -Nested `describe()` example: +Vnořený příklad `describe()`: ```typescript import { describe, test } from "matchstick-as/assembly/index" @@ -192,9 +192,9 @@ describe("handleUpdatedGravatar()", () => { ### test() -`test(name: String, () =>, should_fail: bool)` - Defines a test case. You can use test() inside of describe() blocks or independently. +`test(name: String, () =>, should_fail: bool)` - Definuje případ test. Funkci test() můžete použít uvnitř bloků describe() nebo samostatně. -Example: +Příklad: ```typescript import { describe, test } from "matchstick-as/assembly/index" @@ -207,7 +207,7 @@ describe("handleNewGravatar()", () => { }) ``` -or +nebo ```typescript test("handleNewGravatar() should create a new entity", () => { @@ -221,11 +221,11 @@ test("handleNewGravatar() should create a new entity", () => { ### beforeAll() -Runs a code block before any of the tests in the file. If `beforeAll` is declared inside of a `describe` block, it runs at the beginning of that `describe` block. +Spustí blok kódu před kterýmkoli testem v souboru. Pokud je `beforeAll` deklarováno uvnitř bloku `describe`, spustí se na začátku tohoto bloku `describe`. -Examples: +Příklady: -Code inside `beforeAll` will execute once before _all_ tests in the file. +Kód uvnitř `beforeAll` se provede jednou před _všemi_ testy v souboru. ```typescript import { describe, test, beforeAll } from "matchstick-as/assembly/index" @@ -252,7 +252,7 @@ describe("When entity already exists", () => { }) ``` -Code inside `beforeAll` will execute once before all tests in the first describe block +Kód uvnitř `beforeAll` se provede jednou před všemi testy v prvním bloku popisu ```typescript import { describe, test, beforeAll } from "matchstick-as/assembly/index" @@ -281,11 +281,11 @@ describe("handleUpdatedGravatar()", () => { ### afterAll() -Runs a code block after all of the tests in the file. If `afterAll` is declared inside of a `describe` block, it runs at the end of that `describe` block. +Spustí blok kódu po všech test v souboru. Pokud je `afterAll` deklarováno uvnitř bloku `describe`, spustí se na konci tohoto bloku `describe`. -Example: +Příklad: -Code inside `afterAll` will execute once after _all_ tests in the file. +Kód uvnitř `afterAll` se provede jednou po _všech_ testech v souboru. ```typescript import { describe, test, afterAll } from "matchstick-as/assembly/index" @@ -310,7 +310,7 @@ describe("handleUpdatedGravatar", () => { }) ``` -Code inside `afterAll` will execute once after all tests in the first describe block +Kód uvnitř `afterAll` se provede jednou po všech test v prvním bloku popisu ```typescript import { describe, test, afterAll, clearStore } from "matchstick-as/assembly/index" @@ -342,9 +342,9 @@ describe("handleUpdatedGravatar", () => { ### beforeEach() -Runs a code block before every test. If `beforeEach` is declared inside of a `describe` block, it runs before each test in that `describe` block. +Před každým test spustí blok kódu. Pokud je `beforeEach` deklarován uvnitř bloku `describe`, spustí se před každým test v tomto bloku `describe`. -Examples: Code inside `beforeEach` will execute before each tests. +Příklady: Příklady: Kód uvnitř `beforeEach` se provede před každým test. ```typescript import { describe, test, beforeEach, clearStore } from "matchstick-as/assembly/index" @@ -367,7 +367,7 @@ describe("handleNewGravatars, () => { ... ``` -Code inside `beforeEach` will execute only before each test in the that describe +Kód uvnitř `beforeEach` se provede pouze před každým test v tomto popisu ```typescript import { describe, test, beforeEach } from 'matchstick-as/assembly/index' @@ -405,11 +405,11 @@ describe('handleUpdatedGravatars', () => { ### afterEach() -Runs a code block after every test. If `afterEach` is declared inside of a `describe` block, it runs after each test in that `describe` block. +Po každém test spustí blok kódu. Pokud je `afterEach` deklarován uvnitř bloku `describe`, spustí se po každém test v tomto bloku `describe`. -Examples: +Příklady: -Code inside `afterEach` will execute after every test. +Kód uvnitř `afterEach` se provede po každém test. ```typescript import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" @@ -448,7 +448,7 @@ describe("handleUpdatedGravatar", () => { }) ``` -Code inside `afterEach` will execute after each test in that describe +Kód uvnitř `afterEach` se provede po každém test v tomto popisu ```typescript import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" @@ -488,7 +488,7 @@ describe("handleUpdatedGravatar", () => { }) ``` -## Asserts +## Tvrdí ```typescript fieldEquals(entityType: string, id: string, fieldName: string, expectedVal: string) @@ -522,11 +522,11 @@ assertNotNull(value: T) entityCount(entityType: string, expectedCount: i32) ``` -## Write a Unit Test +## Napsat jednotkový test -Let's see how a simple unit test would look like using the Gravatar examples in the [Demo Subgraph](https://github.com/LimeChain/demo-subgraph/blob/main/src/gravity.ts). +Podívejme se, jak by vypadal jednoduchý jednotkový test s použitím příkladů Gravatar v [Demo Subgraph](https://github.com/LimeChain/demo-subgraph/blob/main/src/gravity.ts). -Assuming we have the following handler function (along with two helper functions to make our life easier): +Předpokládejme, že máme následující obslužnou funkci (spolu se dvěma pomocnými funkcemi, které nám usnadní život): ```typescript export function handleNewGravatar(event: NewGravatar): void { @@ -577,7 +577,7 @@ export function createNewGravatarEvent( } ``` -We first have to create a test file in our project. This is an example of how that might look like: +Nejprve musíme v projektu vytvořit testovací soubor. Toto je příklad, jak by to mohlo vypadat: ```typescript import { clearStore, test, assert } from 'matchstick-as/assembly/index' @@ -611,38 +611,38 @@ test('Next test', () => { }) ``` -That's a lot to unpack! First off, an important thing to notice is that we're importing things from `matchstick-as`, our AssemblyScript helper library (distributed as an npm module). You can find the repository [here](https://github.com/LimeChain/matchstick-as). `matchstick-as` provides us with useful testing methods and also defines the `test()` function which we will use to build our test blocks. The rest of it is pretty straightforward - here's what happens: +To je spousta věcí, které je třeba vybalit! Nejprve je důležité si všimnout, že importovat věci z `matchstick-as`, naší pomocné knihovny AssemblyScript (distribuované jako modul npm). Repozitář najdete [zde](https://github.com/LimeChain/matchstick-as). Knihovna `matchstick-as` nám poskytuje užitečné testovací metody a také definuje funkci `test()`, kterou budeme používat k sestavování našich testovacích bloků. Zbytek je poměrně jednoduchý - zde je uvedeno, co se stane: -- We're setting up our initial state and adding one custom Gravatar entity; -- We define two `NewGravatar` event objects along with their data, using the `createNewGravatarEvent()` function; -- We're calling out handler methods for those events - `handleNewGravatars()` and passing in the list of our custom events; -- We assert the state of the store. How does that work? - We're passing a unique combination of Entity type and id. Then we check a specific field on that Entity and assert that it has the value we expect it to have. We're doing this both for the initial Gravatar Entity we added to the store, as well as the two Gravatar entities that gets added when the handler function is called; -- And lastly - we're cleaning the store using `clearStore()` so that our next test can start with a fresh and empty store object. We can define as many test blocks as we want. +- Nastavujeme počáteční stav a přidáváme jednu vlastní entita Gravatar; +- Pomocí funkce `createNewGravatarEvent()` definujeme dva objekty událostí `NewGravatar` a jejich data; +- Voláme metody obsluhy těchto událostí - `handleNewGravatars()` a předáváme seznam našich vlastních událostí; +- Ujišťujeme se o stavu obchodu. Jak to funguje? - Předáváme jedinečnou kombinaci typu Entity a id. Pak zkontrolujeme konkrétní pole této entity a potvrdíme, že má hodnotu, kterou očekáváme. Toto provádíme jak pro počáteční Entitu Gravatar, kterou jsme přidali do úložiště, tak pro dvě entity Gravatar, které se přidají při volání funkce obsluhy; +- A nakonec - vyčistíme úložiště pomocí `clearStore()`, aby náš další test mohl začít s novým a prázdným objektem úložiště. Můžeme definovat libovolný počet testovacích bloků. -There we go - we've created our first test! 👏 +A je to tady - vytvořili jsme první test! 👏 -Now in order to run our tests you simply need to run the following in your subgraph root folder: +Pro spuštění našich testů nyní stačí v kořenové složce podgrafu spustit následující příkaz: -`graph test Gravity` +`test graf gravitace` -And if all goes well you should be greeted with the following: +A pokud vše proběhne v pořádku, měli byste se setkat s následujícím: -![Matchstick saying “All tests passed!”](/img/matchstick-tests-passed.png) +![Matchstick říká: "Všechny testy splněny!"](/img/matchstick-tests-passed.png) -## Common test scenarios +## Běžné testovací scénáře -### Hydrating the store with a certain state +### Hydratace obchodu s určitým stavem -Users are able to hydrate the store with a known set of entities. Here's an example to initialise the store with a Gravatar entity: +Uživatelé mohou hydratovat sklad známou sadou entit. Zde je příklad inicializace úložiště pomocí entity Gravatar: ```typescript let gravatar = new Gravatar('entryId') gravatar.save() ``` -### Calling a mapping function with an event +### Volání funkce mapování pomocí události -A user can create a custom event and pass it to a mapping function that is bound to the store: +Uživatel může vytvořit vlastní událost a předat ji funkci mapování, která je svázána s úložištěm: ```typescript import { store } from 'matchstick-as/assembly/store' @@ -654,9 +654,9 @@ let newGravatarEvent = createNewGravatarEvent(12345, '0x89205A3A3b2A69De6Dbf7f01 handleNewGravatar(newGravatarEvent) ``` -### Calling all of the mappings with event fixtures +### Volání všech mapování pomocí příslušenství událostí -Users can call the mappings with test fixtures. +Uživatelé mohou mapování vyvolat pomocí testovacích přípravků. ```typescript import { NewGravatar } from '../../generated/Gravity/Gravity' @@ -678,9 +678,9 @@ export function handleNewGravatars(events: NewGravatar[]): void { } ``` -### Mocking contract calls +### Zesměšňování smluvních volání -Users can mock contract calls: +Uživatelé mohou zesměšňovat smluvní hovory: ```typescript import { addMetadata, assert, createMockedFunction, clearStore, test } from 'matchstick-as/assembly/index' @@ -700,9 +700,9 @@ let result = gravity.gravatarToOwner(bigIntParam) assert.equals(ethereum.Value.fromAddress(expectedResult), ethereum.Value.fromAddress(result)) ``` -As demonstrated, in order to mock a contract call and hardcore a return value, the user must provide a contract address, function name, function signature, an array of arguments, and of course - the return value. +Jak bylo ukázáno, aby bylo možné zesměšnit volání smlouvy a hardcore návratovou hodnotu, musí uživatel zadat adresu smlouvy, název funkce, signaturu funkce, pole argumentů a samozřejmě návratovou hodnotu. -Users can also mock function reverts: +Uživatelé mohou také zesměšňovat vracení funkcí: ```typescript let contractAddress = Address.fromString('0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7') @@ -711,13 +711,13 @@ createMockedFunction(contractAddress, 'getGravatar', 'getGravatar(address):(stri .reverts() ``` -### Mocking IPFS files (from matchstick 0.4.1) +### Zesměšňování souborů IPFS (od matchstick 0.4.1) -Users can mock IPFS files by using `mockIpfsFile(hash, filePath)` function. The function accepts two arguments, the first one is the IPFS file hash/path and the second one is the path to a local file. +Uživatelé mohou soubory IPFS napodobovat pomocí funkce `mockIpfsFile(hash, filePath)`. Funkce přijímá dva argumenty, prvním je hash/cesta k souboru IPFS a druhým je cesta k místnímu souboru. -NOTE: When testing `ipfs.map/ipfs.mapJSON`, the callback function must be exported from the test file in order for matchstck to detect it, like the `processGravatar()` function in the test example bellow: +POZNÁMKA: Při testování `ipfs.map/ipfs.mapJSON` musí být funkce zpětného volání exportována z testovacího souboru, aby ji matchstck detekoval, jako například funkci `processGravatar()` v testovacím příkladu níže: -`.test.ts` file: +`.test.ts` soubor ```typescript import { assert, test, mockIpfsFile } from 'matchstick-as/assembly/index' @@ -754,7 +754,7 @@ test('ipfs.map', () => { }) ``` -`utils.ts` file: +`utils.ts` soubor ```typescript import { Address, ethereum, JSONValue, Value, ipfs, json, Bytes } from "@graphprotocol/graph-ts" @@ -802,9 +802,9 @@ export function gravatarFromIpfs(): void { } ``` -### Asserting the state of the store +### Zjištění stavu skladu -Users are able to assert the final (or midway) state of the store through asserting entities. In order to do this, the user has to supply an Entity type, the specific ID of an Entity, a name of a field on that Entity, and the expected value of the field. Here's a quick example: +Uživatelé mohou potvrdit konečný (nebo střední) stav úložiště prostřednictvím potvrzujících entit. K tomu musí uživatel zadat typ entity, konkrétní ID entity, název pole této entity a očekávanou hodnotu pole. Zde je rychlý příklad: ```typescript import { assert } from 'matchstick-as/assembly/index' @@ -816,11 +816,11 @@ gravatar.save() assert.fieldEquals('Gravatar', 'gravatarId0', 'id', 'gravatarId0') ``` -Running the assert.fieldEquals() function will check for equality of the given field against the given expected value. The test will fail and an error message will be outputted if the values are **NOT** equal. Otherwise the test will pass successfully. +Spuštěním funkce assert.fieldEquals() se zkontroluje rovnost zadaného pole se zadanou očekávanou hodnotou. Pokud se hodnoty **NENÍ** rovnají, test selže a vypíše se chybové hlášení. V opačném případě test úspěšně projde. -### Interacting with Event metadata +### Interakce s metadaty událostí -Users can use default transaction metadata, which could be returned as an ethereum.Event by using the `newMockEvent()` function. The following example shows how you can read/write to those fields on the Event object: +Uživatelé mohou použít výchozí metadata transakce, která mohou být vrácena jako ethereum.Event pomocí funkce `newMockEvent()`. Následující příklad ukazuje, jak lze číst/zapisovat do těchto polí na objektu Event: ```typescript // Read @@ -831,23 +831,23 @@ let UPDATED_ADDRESS = '0xB16081F360e3847006dB660bae1c6d1b2e17eC2A' newGravatarEvent.address = Address.fromString(UPDATED_ADDRESS) ``` -### Asserting variable equality +### Potvrzení rovnosti proměnných ```typescript assert.equals(ethereum.Value.fromString("hello"); ethereum.Value.fromString("hello")); ``` -### Asserting that an Entity is **not** in the store +### Tvrzení, že entita **není** v úložišti -Users can assert that an entity does not exist in the store. The function takes an entity type and an id. If the entity is in fact in the store, the test will fail with a relevant error message. Here's a quick example of how to use this functionality: +Uživatelé mohou tvrdit, že entita v úložišti neexistuje. Funkce přebírá typ entity a id. Pokud se entita v úložišti skutečně nachází, test selže s příslušným chybovým hlášením. Zde je rychlý příklad použití této funkce: ```typescript assert.notInStore('Gravatar', '23') ``` -### Printing the whole store (for debug purposes) +### Tisk celého úložiště (pro účely ladění) -You can print the whole store to the console using this helper function: +Pomocí této pomocné funkce můžete vypsat celý obchod na konzolu: ```typescript import { logStore } from 'matchstick-as/assembly/store' @@ -855,9 +855,9 @@ import { logStore } from 'matchstick-as/assembly/store' logStore() ``` -### Expected failure +### Očekávané selhání -Users can have expected test failures, using the shouldFail flag on the test() functions: +Uživatelé mohou očekávat selhání test pomocí příznaku shouldFail ve funkcích test(): ```typescript test( @@ -869,11 +869,11 @@ test( ) ``` -If the test is marked with shouldFail = true but DOES NOT fail, that will show up as an error in the logs and the test block will fail. Also, if it's marked with shouldFail = false (the default state), the test executor will crash. +Pokud je test označen hodnotou shouldFail = true, ale NESPADNE, zobrazí se to v protokolech jako chyba a blok test selže. Pokud je také označen shouldFail = false (výchozí stav), dojde k pádu spouštěče test. -### Logging +### Protokolování -Having custom logs in the unit tests is exactly the same as logging in the mappings. The difference is that the log object needs to be imported from matchstick-as rather than graph-ts. Here's a simple example with all non-critical log types: +Vlastní protokoly v jednotkových test jsou úplně stejné jako protokoly v mapování. Rozdíl je v tom, že objekt logu je třeba importovat z matchstick-as, nikoli z graph-ts. Zde je jednoduchý příklad se všemi nekritickými typy log: ```typescript import { test } from "matchstick-as/assembly/index"; @@ -896,7 +896,7 @@ test("Warning", () => { }); ``` -Users can also simulate a critical failure, like so: +Uživatelé mohou také simulovat kritickou poruchu, například takto: ```typescript test('Blow everything up', () => { @@ -904,11 +904,11 @@ test('Blow everything up', () => { }) ``` -Logging critical errors will stop the execution of the tests and blow everything up. After all - we want to make sure you're code doesn't have critical logs in deployment, and you should notice right away if that were to happen. +Zaznamenáním kritických chyb se provádění testů zastaví a vše se pokazí. Koneckonců - chceme mít jistotu, že váš kód nemá při nasazení kritické log, a pokud by se tak stalo, měli byste si toho okamžitě všimnout. -### Testing derived fields +### Testování odvozených polí -Testing derived fields is a feature which (as the example below shows) allows the user to set a field in a certain entity and have another entity be updated automatically if it derives one of its fields from the first entity. Important thing to note is that the first entity needs to be reloaded as the automatic update happens in the store in rust of which the AS code is agnostic. +Testování odvozených polí je funkce, která (jak ukazuje příklad níže) umožňuje uživateli nastavit pole v určité entit a nechat automaticky aktualizovat jinou entita, pokud je jedno z jejích polí odvozeno od první entity. Důležité je si uvědomit, že první entita musí být znovu načtena, protože automatická aktualizace probíhá v úložišti v rustu, jehož kód AS je agnostický. ```typescript test('Derived fields example test', () => { @@ -931,13 +931,13 @@ test('Derived fields example test', () => { }) ``` -### Testing dynamic data sources +### Testování dynamických zdrojů dat -Testing dynamic data sources can be be done by mocking the return value of the `context()`, `address()` and `network()` functions of the dataSource namespace. These functions currently return the following: `context()` - returns an empty entity (DataSourceContext), `address()` - returns `0x0000000000000000000000000000000000000000`, `network()` - returns `mainnet`. The `create(...)` and `createWithContext(...)` functions are mocked to do nothing so they don't need to be called in the tests at all. Changes to the return values can be done through the functions of the `dataSourceMock` namespace in `matchstick-as` (version 0.3.0+). +Testování dynamických zdrojů dat lze provést pomocí posměchu návratové hodnoty funkcí `context()`, `address()` a `network()` oboru názvů dataSource. Tyto funkce v současné době vracejí následující hodnoty: `context()` - vrací prázdnou entitu (DataSourceContext), `address()` - vrací `0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000`, `network()` - vrací `mainnet`. a `createWithContext(...)` jsou zesměšněny tak, že nic nedělají, takže je v testech vůbec není třeba volat. Změny návratových hodnot lze provádět prostřednictvím funkcí jmenného prostoru `dataSourceMock` v `matchstick-as` (verze 0.3.0+). -Example below: +Příklad níže: -First we have the following event handler (which has been intentionally repurposed to showcase datasource mocking): +Nejprve máme následující obsluhu události (která byla záměrně přepracována za účelem předvedení posměchu datovému zdroji): ```typescript export function handleApproveTokenDestinations(event: ApproveTokenDestinations): void { @@ -953,7 +953,7 @@ export function handleApproveTokenDestinations(event: ApproveTokenDestinations): } ``` -And then we have the test using one of the methods in the dataSourceMock namespace to set a new return value for all of the dataSource functions: +A pak máme test, který používá jednu z metod v oboru názvů dataSourceMock k nastavení nové návratové hodnoty pro všechny funkce dataSource: ```typescript import { assert, test, newMockEvent, dataSourceMock } from 'matchstick-as/assembly/index' @@ -986,15 +986,15 @@ test('Data source simple mocking example', () => { }) ``` -Notice that dataSourceMock.resetValues() is called at the end. That's because the values are remembered when they are changed and need to be reset if you want to go back to the default values. +Všimněte si, že na konci je volána funkce dataSourceMock.resetValues(). To proto, že hodnoty se při změně pamatují a je třeba je resetovat, pokud se chcete vrátit k výchozím hodnotám. -## Test Coverage +## Pokrytí test -Using **Matchstick**, subgraph developers are able to run a script that will calculate the test coverage of the written unit tests. +Pomocí nástroje **Matchstick** mohou vývojáři podgrafů spustit skript, který vypočítá pokrytí testů napsaných jednotkových test. The test coverage tool takes the compiled test `wasm` binaries and converts them to `wat` files, which can then be easily inspected to see whether or not the handlers defined in `subgraph.yaml` have been called. Since code coverage (and testing as whole) is in very early stages in AssemblyScript and WebAssembly, **Matchstick** cannot check for branch coverage. Instead we rely on the assertion that if a given handler has been called, the event/function for it have been properly mocked. -### Prerequisites +### Požadavky To run the test coverage functionality provided in **Matchstick**, there are a few things you need to prepare beforehand: @@ -1012,7 +1012,7 @@ In order for that function to be visible (for it to be included in the `wat` fil export { handleNewGravatar } ``` -### Usage +### Použití Once that's all set up, to run the test coverage tool, simply run: @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From f92421db12cb0db9dc1e30713ee341e7f32514fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:49 -0400 Subject: [PATCH 146/924] New translations unit-testing-framework.mdx (German) --- website/pages/de/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/de/developing/unit-testing-framework.mdx b/website/pages/de/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/de/developing/unit-testing-framework.mdx +++ b/website/pages/de/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From b564428c71697b656b3c3a9439b83df505aeebd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:50 -0400 Subject: [PATCH 147/924] New translations unit-testing-framework.mdx (Italian) --- website/pages/it/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/it/developing/unit-testing-framework.mdx b/website/pages/it/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/it/developing/unit-testing-framework.mdx +++ b/website/pages/it/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From dfa372112e9b9a34cf8fa95452ca5d6be6b109f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:51 -0400 Subject: [PATCH 148/924] New translations unit-testing-framework.mdx (Japanese) --- website/pages/ja/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ja/developing/unit-testing-framework.mdx b/website/pages/ja/developing/unit-testing-framework.mdx index 49601a107de7..9d74495ab2bd 100644 --- a/website/pages/ja/developing/unit-testing-framework.mdx +++ b/website/pages/ja/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). これは、コード内で`console.log`を使用していることを意味し、AssemblyScriptではサポートされていません。[Logging API](/developing/assemblyscript-api/#logging-api) の利用をご検討ください。 > ERROR TS2554: 期待された引数は? -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: 期待された引数は? -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) 引数の不一致は、`graph-ts`と`matchstick-as`の不一致によって起こります。このような問題を解決する最善の方法は、すべてを最新のリリース版にアップデートすることです。 From 5bb1fb32039cbd0c0c0a9f2ab8cdb520a5ebfaf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:52 -0400 Subject: [PATCH 149/924] New translations unit-testing-framework.mdx (Korean) --- website/pages/ko/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ko/developing/unit-testing-framework.mdx b/website/pages/ko/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/ko/developing/unit-testing-framework.mdx +++ b/website/pages/ko/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 46396cf992b4a1b34723255bb1657a33163c1c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:53 -0400 Subject: [PATCH 150/924] New translations unit-testing-framework.mdx (Dutch) --- website/pages/nl/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/nl/developing/unit-testing-framework.mdx b/website/pages/nl/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/nl/developing/unit-testing-framework.mdx +++ b/website/pages/nl/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From b10d9fd17564918a0ef709f6c8802db84f9ebd07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:54 -0400 Subject: [PATCH 151/924] New translations unit-testing-framework.mdx (Polish) --- website/pages/pl/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/pl/developing/unit-testing-framework.mdx b/website/pages/pl/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/pl/developing/unit-testing-framework.mdx +++ b/website/pages/pl/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From cbefdcf20361608da3c5726ede24a7445a464531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:55 -0400 Subject: [PATCH 152/924] New translations unit-testing-framework.mdx (Portuguese) --- website/pages/pt/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/pt/developing/unit-testing-framework.mdx b/website/pages/pt/developing/unit-testing-framework.mdx index 9acb78b6abde..d6357b02f6d8 100644 --- a/website/pages/pt/developing/unit-testing-framework.mdx +++ b/website/pages/pt/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ A saída do log inclui a duração do teste. Veja um exemplo: Isto significa que usou o `console.log` no seu código, que não é apoiado pelo AssemblyScript. Considere usar a [API de Logging](/developing/assemblyscript-api/#logging-api) > `ERROR TS2554: Expected ? arguments, but got ?.` -> +> > `return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt);` -> +> > `in ~lib/matchstick-as/assembly/defaults.ts(18,12)` -> +> > `ERROR TS2554: Expected ? arguments, but got ?.` -> +> > `return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt);` -> +> > `in ~lib/matchstick-as/assembly/defaults.ts(24,12)` A diferença nos argumentos é causada pela diferença no `graph-ts` e no `matchstick-as`. Problemas como este são melhor resolvidos ao atualizar tudo para a versão mais recente. From 8f091ce8ce47c5004c7a3d4f6381f70513241197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:56 -0400 Subject: [PATCH 153/924] New translations unit-testing-framework.mdx (Russian) --- .../pages/ru/developing/unit-testing-framework.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/ru/developing/unit-testing-framework.mdx b/website/pages/ru/developing/unit-testing-framework.mdx index c1b2101a874b..7e7e69bc9b0e 100644 --- a/website/pages/ru/developing/unit-testing-framework.mdx +++ b/website/pages/ru/developing/unit-testing-framework.mdx @@ -371,7 +371,7 @@ describe("handleNewGravatars, () => { ```typescript import { describe, test, beforeEach } from 'matchstick-as/assembly/index' -import { handleUpdatedGravatar, handleNewGravatar } from '../../src/gravity' +import { handleUpdatedGravatar, handleNewGravatar } from "../../src/gravity" describe('handleUpdatedGravatars', () => { beforeEach(() => { @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). Это означает, что Вы использовали в своем коде `console.log`, который не поддерживается AssemblyScript. Пожалуйста, рассмотрите возможность использования [API логирования](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Несовпадение в аргументах вызвано несоответствием в `graph-ts` и `matchstick-as`. Лучший способ устранить проблемы, подобные этой, - обновить всё до последней выпущенной версии. From 63a2e6016f3ab1592df03b34802406f568faeb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:58 -0400 Subject: [PATCH 154/924] New translations unit-testing-framework.mdx (Swedish) --- .../pages/sv/developing/unit-testing-framework.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/sv/developing/unit-testing-framework.mdx b/website/pages/sv/developing/unit-testing-framework.mdx index 1496196edc7a..769e00134d83 100644 --- a/website/pages/sv/developing/unit-testing-framework.mdx +++ b/website/pages/sv/developing/unit-testing-framework.mdx @@ -52,7 +52,7 @@ eller /node_modules/gluegun/build/index.js:13 throw up; ``` -Se till att du använder en nyare version av Node.js eftersom graph-cli inte längre stöder **v10.19.0**, och det är fortfarande standardversionen för nya Ubuntu-bilder på WSL. Till exempel är Matchstick bekräftat fungerande på WSL med **v18.1.0**. Du kan byta till den antingen via** nvm ** eller genom att uppdatera din globala Node.js. Glöm inte att ta bort `node_modules` och köra `npm install`igen efter att du har uppdaterat Node.js! Sedan, se till att du har **libpq** installerat, du kan göra det genom att köra +Se till att du använder en nyare version av Node.js eftersom graph-cli inte längre stöder **v10.19.0**, och det är fortfarande standardversionen för nya Ubuntu-bilder på WSL. Till exempel är Matchstick bekräftat fungerande på WSL med **v18.1.0**. Du kan byta till den antingen via** nvm ** eller genom att uppdatera din globala Node.js. Glöm inte att ta bort `node_modules` och köra ` npm install `igen efter att du har uppdaterat Node.js! Sedan, se till att du har **libpq** installerat, du kan göra det genom att köra ``` sudo apt-get install libpq-dev @@ -1081,15 +1081,15 @@ Loggutmatningen innehåller testkörningens varaktighet. Här är ett exempel: Det betyder att du har använt `console.log` i din kod, som inte stöds av AssemblyScript. Överväg att använda [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Motsägelsen i argumenten beror på en motsägelse i `graph-ts` och `matchstick-as`. Det bästa sättet att åtgärda problem som detta är att uppdatera allt till den senaste utgivna versionen. From 091c68502d832b00b19ecf6d6c1cf53058303d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:05:59 -0400 Subject: [PATCH 155/924] New translations unit-testing-framework.mdx (Turkish) --- website/pages/tr/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/tr/developing/unit-testing-framework.mdx b/website/pages/tr/developing/unit-testing-framework.mdx index b6229c498b5c..c5e1bf917439 100644 --- a/website/pages/tr/developing/unit-testing-framework.mdx +++ b/website/pages/tr/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Tutulan kayıt çıktısı test çalışma süresini içerir. İşte buna bir ö Bu, AssemblyScript tarafından desteklenmeyen `console.log`'u kullandığınız anlamına gelmektedir. Lütfen [Logging API](/developing/assemblyscript-api/#logging-api) kullanmayı düşünün > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Argümanlardaki uyumsuzluk, `graph-ts` ve `matchstick-as` arasındaki uyumsuzluktan kaynaklanır. Bu gibi sorunları düzeltmenin en iyi yolu her şeyi en son yayınlanan sürüme güncellemektir. From fa250f4b346a09a7803130af89fa2f976c547132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:00 -0400 Subject: [PATCH 156/924] New translations unit-testing-framework.mdx (Ukrainian) --- website/pages/uk/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/uk/developing/unit-testing-framework.mdx b/website/pages/uk/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/uk/developing/unit-testing-framework.mdx +++ b/website/pages/uk/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From c555dc160643159c7eb5701a5c25f4c261c54c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:01 -0400 Subject: [PATCH 157/924] New translations unit-testing-framework.mdx (Chinese Simplified) --- .../zh/developing/unit-testing-framework.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/zh/developing/unit-testing-framework.mdx b/website/pages/zh/developing/unit-testing-framework.mdx index 4af36839c168..f62996008c36 100644 --- a/website/pages/zh/developing/unit-testing-framework.mdx +++ b/website/pages/zh/developing/unit-testing-framework.mdx @@ -24,7 +24,7 @@ Postgres 安装命令: brew install postgresql ``` -创建到最新 libpq.5. lib* 的符号链接,可能需要首先创建这个目录*`/usr/local/opt/postgreql/lib/` +创建到最新 libpq.5. lib_ 的符号链接,可能需要首先创建这个目录_`/usr/local/opt/postgreql/lib/` ```sh ln -sf /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib /usr/local/opt/postgresql/lib/libpq.5.dylib @@ -225,7 +225,7 @@ test("handleNewGravatar() should create a new entity", () => { 例子: -`beforeAll`中的代码将在文件中的*all*测试之前执行一次。 +`beforeAll`中的代码将在文件中的_all_测试之前执行一次。 ```typescript import { describe, test, beforeAll } from "matchstick-as/assembly/index" @@ -285,7 +285,7 @@ describe("handleUpdatedGravatar()", () => { 例子: -`afterAll`中的代码将在文件中的*all*测试之后执行一次。 +`afterAll`中的代码将在文件中的_all_测试之后执行一次。 ```typescript import { describe, test, afterAll } from "matchstick-as/assembly/index" @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). 这意味着您在代码中使用了`console.log`,而AssemblyScript不支持此选项。请考虑使用[日志API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > 返回ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > 返回新ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) 参数不匹配是由`graph-ts` and `matchstick-as`不匹配造成的。解决此类问题的最佳方法是将所有内容更新到最新发布的版本。 From b40457346cfc51d70ca7485fde939d62b7ef19bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:02 -0400 Subject: [PATCH 158/924] New translations unit-testing-framework.mdx (Urdu (Pakistan)) --- website/pages/ur/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ur/developing/unit-testing-framework.mdx b/website/pages/ur/developing/unit-testing-framework.mdx index 2f7372190bac..c0d6ab8ea200 100644 --- a/website/pages/ur/developing/unit-testing-framework.mdx +++ b/website/pages/ur/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). اس کا مطلب ہے کہ آپ نے اپنے کوڈ میں `console.log` استعمال کیا ہے، جو اسمبلی اسکرپٹ سے تعاون یافتہ نہیں ہے۔ براہ کرم [لاگنگ API](/developing/assemblyscript-api/#logging-api) استعمال کرنے پر غور کریں > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) دلائل میں عدم مماثلت `graph-ts` اور `matchstick-as` میں عدم مماثلت کی وجہ سے ہوتی ہے۔ اس طرح کے مسائل کو حل کرنے کا بہترین طریقہ یہ ہے کہ ہر چیز کو تازہ ترین جاری کردہ ورژن میں اپ ڈیٹ کیا جائے. From 44a3b0fc2c2df795d7230488c29f9b7f780a260a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:03 -0400 Subject: [PATCH 159/924] New translations unit-testing-framework.mdx (Vietnamese) --- website/pages/vi/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/vi/developing/unit-testing-framework.mdx b/website/pages/vi/developing/unit-testing-framework.mdx index e0a3390bbb25..b67edbb28b97 100644 --- a/website/pages/vi/developing/unit-testing-framework.mdx +++ b/website/pages/vi/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 81c8746656e729515ff78847d901bfe976722b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:04 -0400 Subject: [PATCH 160/924] New translations unit-testing-framework.mdx (Marathi) --- website/pages/mr/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/mr/developing/unit-testing-framework.mdx b/website/pages/mr/developing/unit-testing-framework.mdx index 85fdc6571ca1..6910325a0758 100644 --- a/website/pages/mr/developing/unit-testing-framework.mdx +++ b/website/pages/mr/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ ___ ___ _ _ _ _ _ याचा अर्थ तुम्ही तुमच्या कोडमध्ये `console.log` वापरले आहे, जे असेंबलीस्क्रिप्टद्वारे समर्थित नाही. कृपया [लॉगिंग API](/developing/assemblyscript-api/#logging-api) वापरण्याचा विचार करा > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > त्रुटी TS2554: अपेक्षित आहे? युक्तिवाद, पण मिळाले?. -> +> > नवीन ethereum.Transaction परत करा(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) `graph-ts` आणि `matchstick-as` मधील जुळत नसल्यामुळे वितर्कांमधील जुळत नाही. यासारख्या समस्यांचे निराकरण करण्याचा सर्वोत्तम मार्ग म्हणजे नवीनतम रिलीझ केलेल्या आवृत्तीवर सर्वकाही अद्यतनित करणे. From f9f230f8bf73a902556e48db97f037498a931ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:05 -0400 Subject: [PATCH 161/924] New translations unit-testing-framework.mdx (Hindi) --- .../hi/developing/unit-testing-framework.mdx | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/website/pages/hi/developing/unit-testing-framework.mdx b/website/pages/hi/developing/unit-testing-framework.mdx index 0d0605eab6fe..099384d0267b 100644 --- a/website/pages/hi/developing/unit-testing-framework.mdx +++ b/website/pages/hi/developing/unit-testing-framework.mdx @@ -2,7 +2,7 @@ title: "Unit परीक्षण फ्रेमवर्क प्राप्त करना\nकला" --- -माचिस एक इकाई परीक्षण ढांचा है, जिसे [LimeChain](https://limechain.tech/) द्वारा विकसित किया गया है, जो सबग्राफ डेवलपर्स को सैंडबॉक्स वाले वातावरण में अपने मैपिंग तर्क का परीक्षण करने और आत्मविश्वास के साथ अपने सबग्राफ तैनात करने में सक्षम बनाता है! +माचिस एक इकाई परीक्षण ढांचा है, जिसे [LimeChain](https://limechain.tech/) द्वारा विकसित किया गया है, जो subgraph developers को sandboxed वाले वातावरण में अपने mapping तर्क का परीक्षण करने और आत्मविश्वास के साथ अपने subgraph तैनात करने में सक्षम बनाता है! ## शुरू करना @@ -14,7 +14,7 @@ title: "Unit परीक्षण फ्रेमवर्क प्राप yarn add --dev matchstick-as ``` -❗ `ग्राफ़-नोड` PostgreSQL पर निर्भर करता है, इसलिए यदि आपके पास पहले से यह नहीं है, तो आपको इसे इंस्टॉल करना होगा। हम अत्यधिक सलाह देते हैं कि नीचे दिए गए आदेशों का उपयोग करें क्योंकि इसे किसी अन्य तरीके से जोड़ने से अनपेक्षित त्रुटियां हो सकती हैं! +❗ `graph-node` PostgreSQL पर निर्भर करता है, इसलिए यदि आपके पास पहले से यह नहीं है, तो आपको इसे install करना होगा। हम अत्यधिक सलाह देते हैं कि नीचे दिए गए आदेशों का उपयोग करें क्योंकि इसे किसी अन्य तरीके से जोड़ने से अनपेक्षित त्रुटियां हो सकती हैं! #### MacOS @@ -24,7 +24,7 @@ yarn add --dev matchstick-as brew install postgresql ``` -नवीनतम libpq.5.lib के लिए एक सिमलिंक बनाएं _आपको पहले यह dir बनाने की आवश्यकता हो सकती है_ `/usr/local/opt/postgresql/lib/` +नवीनतम libpq.5.lib के लिए एक symlink बनाएं _आपको पहले यह dir बनाने की आवश्यकता हो सकती है_ `/usr/local/opt/postgresql/lib/` ```sh ln -sf /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib /usr/local/opt/postgresql/lib/libpq.5.dylib @@ -73,6 +73,7 @@ sudo apt-get install libpq-dev "@graphprotocol/graph-ts": "^0.27.0", "matchstick-as": "^0.5.0" } +} ``` ### प्रयोग @@ -408,7 +409,7 @@ describe('handleUpdatedGravatars', () => { उदाहरण: -प्रत्येक परीक्षण के बाद `afterEach` के अंदर का कोड निष्पादित होगा। +प्रत्येक परीक्षण के बाद ` afterEach ` के अंदर का कोड निष्पादित होगा। ```typescript import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" @@ -447,7 +448,7 @@ describe("handleUpdatedGravatar", () => { }) ``` -उस वर्णन में प्रत्येक परीक्षण के बाद `afterEach` के अंदर का कोड निष्पादित होगा +उस वर्णन में प्रत्येक परीक्षण के बाद ` afterEach ` के अंदर का कोड निष्पादित होगा ```typescript import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" @@ -1080,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). इसका अर्थ है कि आपने अपने कोड में `console.log` का उपयोग किया है, जो कि असेंबलीस्क्रिप्ट द्वारा समर्थित नहीं है। कृपया [लॉगिंग API](/Developing/assemblyscript-api/#logging-api) का उपयोग करने पर विचार करें > त्रुटि TS2554: अपेक्षित? तर्क, लेकिन मिला ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > त्रुटि TS2554: अपेक्षित? तर्क, लेकिन मिला ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) तर्कों में बेमेल `ग्राफ़-टीएस` और `मैचस्टिक-एज़` में बेमेल होने के कारण होता है। इस तरह की समस्याओं को ठीक करने का सबसे अच्छा तरीका है कि सभी चीज़ों को नवीनतम रिलीज़ किए गए संस्करण में अपडेट कर दिया जाए. From e66be90f95dd87a8845cca50e54a6ed129af723e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:06 -0400 Subject: [PATCH 162/924] New translations unit-testing-framework.mdx (Yoruba) --- website/pages/yo/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/yo/developing/unit-testing-framework.mdx b/website/pages/yo/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/yo/developing/unit-testing-framework.mdx +++ b/website/pages/yo/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From e3507d41eb57678820067492f1028fe08f85a691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:07 -0400 Subject: [PATCH 163/924] New translations deprecating-a-subgraph.mdx (French) --- website/pages/fr/managing/deprecating-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/fr/managing/deprecating-a-subgraph.mdx b/website/pages/fr/managing/deprecating-a-subgraph.mdx index 3507c618d81a..4c78afda835a 100644 --- a/website/pages/fr/managing/deprecating-a-subgraph.mdx +++ b/website/pages/fr/managing/deprecating-a-subgraph.mdx @@ -4,7 +4,7 @@ title: Suppression d'un subgraph Vous souhaitez donc supprimer votre subgraph sur The Graph Explorer. Vous êtes au bon endroit ! Suivez les étapes ci-dessous : -1. Visit the contract address [here](https://etherscan.io/address/0xadca0dd4729c8ba3acf3e99f3a9f471ef37b6825#writeProxyContract) +1. Visitez l'adresse du contrat [ici](https://etherscan.io/address/0xadca0dd4729c8ba3acf3e99f3a9f471ef37b6825#writeProxyContract) 2. Call `deprecateSubgraph` with your `SubgraphID` comme argument. 3. Voilà ! Votre subgraph n'apparaîtra plus dans les recherches sur The Graph Explorer. From 9204a323fa5f31440e3ecffa5213772e0f1f3d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:09 -0400 Subject: [PATCH 164/924] New translations deprecating-a-subgraph.mdx (Czech) --- .../cs/managing/deprecating-a-subgraph.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/pages/cs/managing/deprecating-a-subgraph.mdx b/website/pages/cs/managing/deprecating-a-subgraph.mdx index e6adfccad368..b30fe61a647a 100644 --- a/website/pages/cs/managing/deprecating-a-subgraph.mdx +++ b/website/pages/cs/managing/deprecating-a-subgraph.mdx @@ -1,18 +1,18 @@ --- -title: Deprecating a Subgraph +title: Znehodnocení podgrafu --- -So you'd like to deprecate your subgraph on The Graph Explorer. You've come to the right place! Follow the steps below: +Rádi byste tedy svůj podgraf v Průzkumníku grafů znehodnotili. Jste na správném místě! Postupujte podle následujících kroků: -1. Visit the contract address [here](https://etherscan.io/address/0xadca0dd4729c8ba3acf3e99f3a9f471ef37b6825#writeProxyContract) -2. Call `deprecateSubgraph` with your `SubgraphID` as your argument. -3. Voilà! Your subgraph will no longer show up on searches on The Graph Explorer. +1. Navštivte adresu smlouvy [zde](https://etherscan.io/address/0xadca0dd4729c8ba3acf3e99f3a9f471ef37b6825#writeProxyContract) +2. Volejte `deprecateSubgraph` s `SubgraphID` jako argumentem. +3. Voilà! Váš podgraf se již nebude zobrazovat při vyhledávání v Průzkumníku grafů. -Please note the following: +Vezměte prosím na vědomí následující: -- The `deprecateSubgraph` function should be called by the owner's wallet. -- Curators will not be able to signal on the subgraph anymore. -- Curators that already signaled on the subgraph will be able to withdraw their signal at an average share price. +- Funkci `deprecateSubgraph` by měla volat peněženka vlastníka. +- Kurátoři již nebudou moci signalizovat na podgrafu. +- Kurátoři, kteří již signalizovali na subgrafu, budou moci stáhnout svůj signál za průměrnou cenu akcie. - Deprecated subgraphs will be indicated with an error message. If you interacted with the deprecated subgraph, you'll be able to find it in your user profile under the "Subgraphs", "Indexing", or "Curating" tab, respectively. From 22f82ce18b5735410b17b932b8fe9c8aed6394d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:11 -0400 Subject: [PATCH 165/924] New translations deprecating-a-subgraph.mdx (Italian) --- .../it/managing/deprecating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/it/managing/deprecating-a-subgraph.mdx b/website/pages/it/managing/deprecating-a-subgraph.mdx index e6adfccad368..8a8dd264d7b8 100644 --- a/website/pages/it/managing/deprecating-a-subgraph.mdx +++ b/website/pages/it/managing/deprecating-a-subgraph.mdx @@ -1,18 +1,18 @@ --- -title: Deprecating a Subgraph +title: Deprecazione di un subgraph --- -So you'd like to deprecate your subgraph on The Graph Explorer. You've come to the right place! Follow the steps below: +Si desidera deprecare il proprio subgraph su The Graph Explorer. Siete nel posto giusto! Seguite i passi indicati di seguito: -1. Visit the contract address [here](https://etherscan.io/address/0xadca0dd4729c8ba3acf3e99f3a9f471ef37b6825#writeProxyContract) -2. Call `deprecateSubgraph` with your `SubgraphID` as your argument. -3. Voilà! Your subgraph will no longer show up on searches on The Graph Explorer. +1. Visitare l'indirizzo del contratto [qui](https://etherscan.io/address/0xadca0dd4729c8ba3acf3e99f3a9f471ef37b6825#writeProxyContract) +2. Chiamare `deprecateSubgraph` con il proprio `SubgraphID` come argomento. +3. Voilà! Il proprio subgraph non verrà più visualizzato nelle ricerche su The Graph Explorer. -Please note the following: +Si prega di notare quanto segue: -- The `deprecateSubgraph` function should be called by the owner's wallet. -- Curators will not be able to signal on the subgraph anymore. -- Curators that already signaled on the subgraph will be able to withdraw their signal at an average share price. -- Deprecated subgraphs will be indicated with an error message. +- La funzione `deprecateSubgraph` deve essere chiamata dal wallet del proprietario. +- I Curator non potranno più segnalare il subgraph. +- I Curator che hanno già segnalato sul subgraph potranno ritirare il loro segnale a un prezzo medio di quote di partecipazione. +- I subgraph deprecati saranno indicati con un messaggio di errore. -If you interacted with the deprecated subgraph, you'll be able to find it in your user profile under the "Subgraphs", "Indexing", or "Curating" tab, respectively. +Se avete interagito con il subgraph deprecato, potrete trovarlo nel vostro profilo utente, rispettivamente nella scheda "Subgraphs", "Indexing" o "Curation". From 87b0a7867142cac82097e6e19a7e1d1cdd6d69c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:17 -0400 Subject: [PATCH 166/924] New translations deprecating-a-subgraph.mdx (Chinese Simplified) --- website/pages/zh/managing/deprecating-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/zh/managing/deprecating-a-subgraph.mdx b/website/pages/zh/managing/deprecating-a-subgraph.mdx index ed9e25949fc9..375761f56bcd 100644 --- a/website/pages/zh/managing/deprecating-a-subgraph.mdx +++ b/website/pages/zh/managing/deprecating-a-subgraph.mdx @@ -5,7 +5,7 @@ title: 弃用子图 如果您想在 Graph浏览器上弃用您的子图,您来对地方了! 请按照以下步骤操作: 1. 在[这里](https://etherscan.io/address/0xadca0dd4729c8ba3acf3e99f3a9f471ef37b6825#writeProxyContract)访问合约地址。 -2. 使用`SubgraphID`作为参数调用`deprecateSubgraph`。 +2. 使用`SubgraphID`作为参数调用` deprecateSubgraph `。 3. 瞧! 您的子图将不再显示在Graph浏览器上的搜索中。 请注意以下事项: From 04c40d7c11f0c805a024e027d5c1aa5e39e196fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:21 -0400 Subject: [PATCH 167/924] New translations transferring-subgraph-ownership.mdx (French) --- website/pages/fr/managing/transferring-subgraph-ownership.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/fr/managing/transferring-subgraph-ownership.mdx b/website/pages/fr/managing/transferring-subgraph-ownership.mdx index d83e6c7f8966..864890a465e4 100644 --- a/website/pages/fr/managing/transferring-subgraph-ownership.mdx +++ b/website/pages/fr/managing/transferring-subgraph-ownership.mdx @@ -10,7 +10,7 @@ La personne qui possède le NFT contrôle le subgraph. Si le propriétaire déci En plus d'ajouter plus de flexibilité au cycle de vie de développement, cette fonctionnalité rend certains cas d'utilisation plus pratiques, tels que le déplacement de votre contrôle vers un multisig ou la création d'un membre de la communauté au nom d'un DAO. -## Viewing your subgraph as an NFT +## Voir votre subgraph en tant que NFT Pour visualiser votre subgraph en tant que NFT, vous pouvez visiter une place de marché NFT comme OpenSea : @@ -24,7 +24,7 @@ Ou un explorateur de portefeuille tel que **Rainbow.me** : https://rainbow.me/adresse-de-votre-portefeuille ``` -## Transferring ownership of a subgraph +## Transférer la propriété d'un subgraph Pour transférer la propriété d'un subgraph, vous pouvez utiliser l'interface utilisateur intégrée à Subgraph Studio : From f034bac6c328226dd531beae87023368fd333b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:23 -0400 Subject: [PATCH 168/924] New translations transferring-subgraph-ownership.mdx (Czech) --- .../transferring-subgraph-ownership.mdx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/website/pages/cs/managing/transferring-subgraph-ownership.mdx b/website/pages/cs/managing/transferring-subgraph-ownership.mdx index 1ca1c621a9c9..ba199364daae 100644 --- a/website/pages/cs/managing/transferring-subgraph-ownership.mdx +++ b/website/pages/cs/managing/transferring-subgraph-ownership.mdx @@ -1,32 +1,32 @@ --- -title: Transferring Subgraph Ownership +title: Přenos vlastnictví podgrafů --- -The Graph supports the transfer of the ownership of a subgraph. +Graf podporuje přenos vlastnictví podgrafu. -When you deploy a subgraph to mainnet, an NFT will be minted to the address that deployed the subgraph. The NFT is based on a standard ERC721, so it can be easily transferred to different accounts. +Při nasazení podgrafu do mainnetu bude na adresu, ze které byl podgraf nasazen, vyražen NFT. NFT je založena na standardním ERC721, takže ji lze snadno přenášet na různé účty. -Whoever owns the NFT controls the subgraph. If the owner decides to sell the NFT, or transfer it, they will no longer be able to make edits or updates to that subgraph on the network. +Kdo vlastní NFT, ovládá podgraf. Pokud se vlastník rozhodne NFT prodat nebo převést, nebude již moci provádět úpravy nebo aktualizace tohoto podgrafu v síti. -In addition to adding more flexibility to the development lifecycle, this functionality makes certain use cases more convenient, such as moving your control to a multisig or a community member creating it on behalf of a DAO. +Kromě toho, že tato funkce zvyšuje flexibilitu životního cyklu vývoje, usnadňuje také některé případy použití, například přesunutí kontroly do multisignu nebo její vytvoření členem komunity jménem DAO. -## Viewing your subgraph as an NFT +## Zobrazení podgrafu jako NFT -To view your subgraph as an NFT, you can visit an NFT marketplace like OpenSea: +Chcete-li zobrazit svůj podgraf jako NFT, můžete navštívit tržiště NFT, například OpenSea: ``` https://opensea.io/your-wallet-address ``` -Or a wallet explorer like **Rainbow.me**: +Nebo průzkumník peněženek, jako je **Rainbow.me**: ``` https://rainbow.me/your-wallet-addres ``` -## Transferring ownership of a subgraph +## Převod vlastnictví podgrafu -To transfer ownership of a subgraph, you can use the UI built into Subgraph Studio: +Chcete-li převést vlastnictví podgrafu, můžete použít UI integrované do Studio podgraf: ![Subgraph Ownership Transfer](/img/subgraph-ownership-transfer-1.png) From 49687daa334b8159124e89591f555e9ad5e0c23f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:35 -0400 Subject: [PATCH 169/924] New translations curating.mdx (French) --- website/pages/fr/network/curating.mdx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/pages/fr/network/curating.mdx b/website/pages/fr/network/curating.mdx index b9e5181537d4..776c6800d86c 100644 --- a/website/pages/fr/network/curating.mdx +++ b/website/pages/fr/network/curating.mdx @@ -4,11 +4,11 @@ title: Curation Les curateurs sont essentiels à l'économie décentralisée de The Graph. Ils utilisent leurs connaissances de l'écosystème web3 pour évaluer et signaler les subgraphs d'intérêt pour le réseau The Graph. Grâce à l'explorateur, les curateurs sont en mesure de visualiser les données du réseau afin de signaler un subgraph d'intérêt. Le réseau The Graph récompense les curateurs qui signalent des subgraphs de bonne qualité en leur versant une partie des frais de recherche que ces subgraphs génèrent. Les curateurs sont économiquement incités à signaler le plus tôt possible. Les signaux des curateurs sont importants pour les indexeurs, qui peuvent ensuite traiter ou indexer les données de ces subgraphs signalés. -When signaling, curators can decide to signal on a specific version of the subgraph or to signal using auto-migrate. When signaling using auto-migrate, a Curator’s shares will always be migrated to the latest version published by the developer. If you decide to signal on a specific version instead, shares will always stay on this specific version. +Lors de la signalisation, les curateurs peuvent décider de signaler sur une version spécifique du subgraph ou de signaler en utilisant l'auto-migration. Lors d'une signalisation utilisant la migration automatique, les partages d'un curateur seront toujours migrés vers la dernière version publiée par le développeur. Si vous décidez plutôt de signaler une version spécifique, les actions resteront toujours sur cette version spécifique. N'oubliez pas que ce rôle est risqué. Assurez-vous de signaler des subgraphs auxquels vous faites confiance. La création d'un subgraph n'est pas soumise à autorisation. Les gens peuvent donc créer des subgraphs et leur donner le nom qu'ils veulent. Pour avoir de plus amples informations sur les risques des curateurs, consultez [le guide des curateurs de l'académie Graph.](https://thegraph.academy/curators/) -## Courbe d'adhérence 101 +## Courbe de liaison 101 Tout d'abord, nous prenons du recul. Chaque subgraph a une courbe de liaison sur laquelle des actions de curation sont générées lorsqu'un utilisateur ajoute un signal **dans** la courbe. La courbe de liaison de chaque subgraph est unique. Les courbes de liaison sont conçues de manière à ce que le prix de la production d'une action de curation sur un subgraph augmente linéairement, en fonction du nombre d'actions frappées. @@ -20,10 +20,10 @@ Par conséquent, le prix augmente de façon linéaire, ce qui signifie qu'il est Considérons que nous avons deux curateurs qui monnayent des actions pour un subgraph : -- Le curateur A est le premier à se signaler sur le subgraph. En ajoutant 120 000 TJB à la courbe, il est en mesure de monnayer 2000 actions. +- Curator A is the first to signal on the subgraph. By adding 120,000 GRT into the curve, they are able to mint 2000 shares. - Le signal du curateur B se trouve sur le subgraph à un moment ultérieur. Pour recevoir le même nombre d'actions que le curateur A, il devra ajouter 360 000 GRT à la courbe. -- Étant donné que les deux conservateurs détiennent la moitié du total des parts de conservation, ils recevraient un montant égal de redevances de conservation. -- Si l’un des conservateurs brûlait maintenant ses 2 000 actions de conservation, il recevrait 360 000 GRT. +- Comme les deux curateurs détiennent la moitié du total des parts de curation, ils recevraient un montant égal de redevances de curateur. +- Si l'un des curateurs brûlait maintenant ses 2000 parts de curation, il recevrait 360 000 GRT. - Le curateur restant recevrait alors toutes les redevances de curateur pour ce subgraph. S'il brûlait ses pièces pour retirer la GRT, il recevrait 120 000 GRT. - **TLDR** : La valeur en GRT des parts de curation est déterminée par la courbe de liaison et peut-être volatile. Il est possible de subir de grosses pertes. Signer tôt signifie que vous investissez moins de GRT pour chaque action. Par extension, cela signifie que vous gagnez plus de redevances de curation par GRT que les curateurs ultérieurs pour le même subgraph. @@ -53,11 +53,11 @@ Curators make The Graph network efficient and signaling is the process that cura ![Diagramme de la signalisation](/img/curator-signaling.png) -Indexers can find subgraphs to index based on curation signals they see in The Graph Explorer (screenshot below). +Les indexeurs peuvent trouver des subgraphs à indexer en fonction des signaux de curation qu'ils voient dans The Graph Explorer (capture d'écran ci-dessous). ![Les subgraphs d'exploration](/img/explorer-subgraphs.png) -## Des risques +## Risques 1. Le marché des requêtes est intrinsèquement jeune chez The Graph et il y a un risque que votre %APY soit inférieur à vos attentes en raison de la dynamique naissante du marché. 2. Curation Fee - when a Curator signals GRT on a subgraph, they incur a 1% curation tax. This fee is burned and the rest is deposited into the reserve supply of the bonding curve. @@ -66,9 +66,9 @@ Indexers can find subgraphs to index based on curation signals they see in The G - Si vous êtes abonné à la version la plus récente d'un subgraph, vos parts migreront automatiquement vers cette nouvelle version. Cela entraînera une taxe de curation de 0,5 %. - Si vous avez signalé sur une version spécifique du subgraph et que cela échoue, vous devrez brûler manuellement vos parts de curation. Notez que vous pouvez recevoir plus ou moins de GRT que ce que vous avez initialement déposé dans la courbe de curation, ce qui est un risque associé au statut de curateur. Vous pouvez alors signaler la nouvelle version du subgraph, ce qui entraîne une taxe de curation de 1%. -## FAQ sur la conservation +## Curation FAQs -### 1. Quel pourcentage des frais de requête les conservateurs perçoivent-ils ? +### 1. Quel pourcentage des frais de requête les Curateurs perçoivent-ils? En vous signalant sur un subgraph, vous gagnerez une part de tous les frais de requête que ce subgraph génère. 10% de tous les frais d'interrogation vont aux curateurs au prorata de leurs parts de curation. Ces 10% sont soumis à la gouvernance. @@ -79,17 +79,17 @@ Finding high-quality subgraphs is a complex task, but it can be approached in ma - Les curateurs peuvent utiliser leur compréhension d'un réseau pour essayer de prédire comment un subgraph individuel peut générer un volume de requêtes plus ou moins élevé à l'avenir - Les curateurs doivent également comprendre les mesures disponibles dans l'Explorateur The Graph. Des mesures telles que le volume de requêtes passées et l'identité du développeur du subgraph peuvent aider à déterminer si un subgraph mérite ou non d'être signalé. -### 3. What’s the cost of updating a subgraph? +### 3. Quel est le coût de la mise à jour d'un subgraph ? Migrating your curation shares to a new subgraph version incurs a curation tax of 1%. Curators can choose to subscribe to the newest version of a subgraph. When curation shares get auto-migrated to a new version, Curators will also pay half curation tax, ie. 0.5%, because updating subgraphs is an on-chain action that costs gas. -### 4. How often can I update my subgraph? +### 4. À quelle fréquence puis-je mettre à jour mon subgraph ? -It’s suggested that you don’t update your subgraphs too frequently. See the question above for more details. +Il est conseillé de ne pas mettre à jour vos subgraphs trop fréquemment. Voir la question ci-dessus pour plus de détails. ### 5. Puis-je vendre mes parts de curateurs ? -Curation shares cannot be "bought" or "sold" like other ERC20 tokens that you may be familiar with. They can only be minted (created) or burned (destroyed) along the bonding curve for a particular subgraph. The amount of GRT needed to mint a new signal, and the amount of GRT you receive when you burn your existing signal are determined by that bonding curve. As a Curator, you need to know that when you burn your curation shares to withdraw GRT, you can end up with more or less GRT than you initially deposited. +Les parts de curation ne peuvent pas être "achetées" ou "vendues" comme les autres jetons ERC20 que vous connaissez peut-être. Elles peuvent seulement être frappées (créées) ou brûlées (détruites) le long de la courbe de liaison pour un subgraph particulier. La quantité de GRT nécessaire pour frapper un nouveau signal, et la quantité de GRT que vous recevez lorsque vous brûlez votre signal existant sont déterminées par cette courbe de liaison. En tant que curateur, vous devez savoir que lorsque vous brûlez vos parts de curation pour retirer des GRT, vous pouvez vous retrouver avec plus ou moins de GRT que ce que vous aviez initialement déposé. Vous ne savez toujours pas quo. Vous ne savez toujours pas où vous en êtes ? Regardez notre guide vidéo sur la curation ci-dessous : From ced8efde0ac7c6fdc607a3f65801bc92b494b016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:37 -0400 Subject: [PATCH 170/924] New translations curating.mdx (Czech) --- website/pages/cs/network/curating.mdx | 100 +++++++++++++------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/website/pages/cs/network/curating.mdx b/website/pages/cs/network/curating.mdx index 797d9b9dd896..c9ced1831766 100644 --- a/website/pages/cs/network/curating.mdx +++ b/website/pages/cs/network/curating.mdx @@ -1,93 +1,93 @@ --- -title: Curating +title: Kurátorování --- -Curators are critical to the Graph decentralized economy. They use their knowledge of the web3 ecosystem to assess and signal on the subgraphs that should be indexed by The Graph Network. Through the Explorer, curators are able to view network data to make signaling decisions. The Graph Network rewards curators who signal on good quality subgraphs with a share of the query fees that subgraphs generate. Curators are economically incentivized to signal early. These cues from curators are important for Indexers, who can then process or index the data from these signaled subgraphs. +Kurátoři mají pro graf decentralizovanou ekonomiku zásadní význam. Využívají své znalosti ekosystému web3 k posuzování a signalizaci podgrafů, které by měly být indexovány sítí Graf. Prostřednictvím Průzkumníka mohou kurátoři prohlížet data sítě a rozhodovat o signalizaci. síť Graf odměňuje kurátory, kteří signalizují kvalitní podgrafy, podílem na poplatcích za dotazy, které podgrafy generují. Kurátoři jsou ekonomicky motivováni k včasné signalizaci. Tyto signály od kurátorů jsou důležité pro indexátory, kteří pak mohou zpracovávat nebo indexovat data z těchto signalizovaných podgrafů. -When signaling, curators can decide to signal on a specific version of the subgraph or to signal using auto-migrate. When signaling using auto-migrate, a Curator’s shares will always be migrated to the latest version published by the developer. If you decide to signal on a specific version instead, shares will always stay on this specific version. +Při signalizaci se kurátoři mohou rozhodnout, zda budou signalizovat na konkrétní verzi podgrafu, nebo zda budou signalizovat pomocí automatické migrace. Při signalizaci pomocí automatické migrace budou sdílení kurátora vždy migrována na nejnovější verzi zveřejněnou vývojářem. Pokud se místo toho rozhodnete signalizovat na konkrétní verzi, zůstanou sdílené položky vždy na této konkrétní verzi. -Remember that curation is risky. Please do your diligence to make sure you curate on subgraphs you trust. Creating a subgraph is permissionless, so people can create subgraphs and call them any name they'd like. For more guidance on curation risks, check out [The Graph Academy's Curation Guide.](https://thegraph.academy/curators/) +Nezapomeňte, že kurátorství je riskantní. Dbejte na to, abyste se ujistili, že kurátorství probíhá na podgraf, kterým důvěřujete. Vytváření podgrafů je bez oprávnění, takže lidé mohou vytvářet podgrafy a pojmenovávat je, jak chtějí. Další pokyny k rizikům kurátorství naleznete v [Průvodci kurátorstvím Akademie grafů.](https://thegraph.academy/curators/) -## Bonding Curve 101 +## Křivka lepení 101 -First, we take a step back. Each subgraph has a bonding curve on which curation shares are minted when a user adds signal **into** the curve. Each subgraph’s bonding curve is unique. The bonding curves are architected so that the price to mint a curation share on a subgraph increases linearly, over the number of shares minted. +Nejprve se vrátíme o krok zpět. Každý podgraf má vazební křivku, na které se razí kurátorské podíly, když uživatel přidá signál **do** křivky. Vazbová křivka každého podgrafu je jedinečná. Spojovací křivky jsou konstruovány tak, že cena za ražbu kurátorského podílu na podgrafu lineárně roste v závislosti na počtu ražených podílů. -![Price per shares](/img/price-per-share.png) +![Cena za akcii](/img/price-per-share.png) -As a result, price increases linearly, meaning that it will get more expensive to purchase a share over time. Here’s an example of what we mean, see the bonding curve below: +V důsledku toho se cena lineárně zvyšuje, což znamená, že nákup akcie bude v průběhu času dražší. Zde je příklad toho, co máme na mysli, viz níže uvedená vazební křivka: -![Bonding curve](/img/bonding-curve.png) +![Křivka lepení](/img/bonding-curve.png) -Consider we have two curators that mint shares for a subgraph: +Uvažujme, že máme dva kurátory, kteří mintují podíly pro podgraf -- Curator A is the first to signal on the subgraph. By adding 120,000 GRT into the curve, they are able to mint 2000 shares. -- Curator B’s signal is on the subgraph at some point in time later. To receive the same amount of shares as Curator A, they would have to add 360,000 GRT into the curve. -- Since both curators hold half the total of curation shares, they would receive an equal amount of curator royalties. -- If any of the curators were now to burn their 2000 curation shares, they would receive 360,000 GRT. -- The remaining curator would now receive all the curator royalties for that subgraph. If they were to burn their shares to withdraw GRT, they would receive 120,000 GRT. -- **TLDR:** The GRT valuation of curation shares is determined by the bonding curve and can be volatile. There is potential to incur big losses. Signaling early means you put in less GRT for each share. By extension, this means you earn more curator royalties per GRT than later curators for the same subgraph. +- Kurátor A signalizuje jako první na podgrafu. Přidáním 120,000 GRT do křivky se jim podaří vydolovat 2000 akcií. +- Signál kurátora B se na podgrafu objeví v určitém časovém okamžiku později. Aby získal stejné množství podílů jako kurátor A, musel by do křivky přidat 360,000 GRT. +- Vzhledem k tomu, že oba kurátoři mají polovinu všech kurátorských podílů, dostávali by stejnou částku kurátorských honorářů. +- Pokud by nyní některý z kurátorů spálil svých 2000 kurátorských podílů, získal by 360,000 GRT. +- Zbývající kurátor by nyní obdržel všechny kurátorské honoráře za tento podgraf. Pokud by své podíly spálili a vybrali GRT, získali by 120,000 GRT. +- **TLDR:** Ocenění kurátorských akcií GRT je určeno vazebnou křivkou a může být volatilní. Existuje potenciál pro vznik velkých ztrát. Včasná signalizace znamená, že do každé akcie vložíte méně GRT. V důsledku to znamená, že vyděláte více kurátorských poplatků za GRT než pozdější kurátoři za stejný podgraf. -In general, a bonding curve is a mathematical curve that defines the relationship between token supply and asset price. In the specific case of subgraph curation, **the price of each subgraph share increases with each token invested** and the **price of each share decreases with each token sold.** +Obecně je vazební křivka matematická křivka, která definuje vztah mezi nabídkou žetonů a cenou aktiva. V konkrétním případě kurátorství podgrafu **cena každé akcie podgrafu roste s každým investovaným tokenem** a **cena každé akcie klesá s každým prodaným tokenem.** -In the case of The Graph, [Bancor’s implementation of a bonding curve formula](https://drive.google.com/file/d/0B3HPNP-GDn7aRkVaV3dkVl9NS2M/view?resourcekey=0-mbIgrdd0B9H8dPNRaeB_TA) is leveraged. +V případě Grafu se využívá [Bankorova implementace vzorce vazební křivky](https://drive.google.com/file/d/0B3HPNP-GDn7aRkVaV3dkVl9NS2M/view?resourcekey=0-mbIgrdd0B9H8dPNRaeB_TA). -## How to Signal +## Jak signalizovat -Now that we’ve covered the basics about how the bonding curve works, this is how you will proceed to signal on a subgraph. Within the Curator tab on the Graph Explorer, curators will be able to signal and unsignal on certain subgraphs based on network stats. For a step-by-step overview of how to do this in the Explorer, [click here.](/network/explorer) +Nyní, když jsme se seznámili se základy fungování vazební křivky, budete postupovat tak, že budete signalizovat na podgrafu. V rámci karty Kurátor v Průzkumníku grafu budou moci kurátoři signalizovat a nesignalizovat na určitých podgrafech na základě statistik sítě. Přehled postupu v Průzkumníku krok za krokem naleznete [kliknutím zde.](/network/explorer) -A curator can choose to signal on a specific subgraph version, or they can choose to have their signal automatically migrate to the newest production build of that subgraph. Both are valid strategies and come with their own pros and cons. +Kurátor si může zvolit, zda bude signalizovat na konkrétní verzi podgrafu, nebo zda se jeho signál automaticky přenese na nejnovější produkční sestavení daného podgrafu. Obě strategie jsou platné a mají své výhody i nevýhody. -Signaling on a specific version is especially useful when one subgraph is used by multiple dApps. One dApp might need to regularly update the subgraph with new features. Another dApp might prefer to use an older, well-tested subgraph version. Upon initial curation, a 1% standard tax is incurred. +Signalizace na konkrétní verzi je užitečná zejména tehdy, když jeden podgraf používá více dApps. Jedna dApp může potřebovat pravidelně aktualizovat podgraf o nové funkce. Jiná dApp může preferovat používání starší, dobře otestované verze podgrafu. Při počáteční kurátorské úpravě je účtována standardní daň ve výši 1 %. -Having your signal automatically migrate to the newest production build can be valuable to ensure you keep accruing query fees. Every time you curate, a 1% curation tax is incurred. You will also pay a 0.5% curation tax on every migration. Subgraph developers are discouraged from frequently publishing new versions - they have to pay a 0.5% curation tax on all auto-migrated curation shares. +Automatická migrace signálu na nejnovější produkční sestavení může být cenná, protože zajistí, že se poplatky za dotazy budou neustále zvyšovat. Při každém kurátorství se platí 1% kurátorský poplatek. Při každé migraci také zaplatíte 0,5% kurátorskou daň. Vývojáři podgrafu jsou odrazováni od častého publikování nových verzí - musí zaplatit 0.5% kurátorskou daň ze všech automaticky migrovaných kurátorských podílů. -> **Note**: The first address to signal a particular subgraph is considered the first curator and will have to do much more gas-intensive work than the rest of the following curators because the first curator initializes the curation share tokens, initializes the bonding curve, and also transfers tokens into the Graph proxy. +> **Poznámka**: První adresa, která signalizuje určitý podgraf, je považována za prvního kurátora a bude muset vykonat mnohem více práce s plynem než ostatní následující kurátoři, protože první kurátor inicializuje tokeny sdílení kurátorů, inicializuje vazební křivku a také přenáší tokeny do Graf proxy. -## What does Signaling mean for The Graph Network? +## Co znamená signalizace pro síť Graf? -For end consumers to be able to query a subgraph, the subgraph must first be indexed. Indexing is a process where files, data, and metadata are looked at, cataloged, and then indexed so that results can be found faster. In order for a subgraph’s data to be searchable, it needs to be organized. +Aby se koncoví uživatelé mohli dotazovat na podgraf, musí být podgraf nejprve indexován. Indexování je proces, při kterém jsou soubory, data a metadata prohlédnuty, katalogizovány a poté indexovány, aby bylo možné rychleji nalézt výsledky. Aby bylo možné v datech podgrafu vyhledávat, je třeba je uspořádat. -And so, if Indexers had to guess which subgraphs they should index, there would be a low chance that they would earn robust query fees because they’d have no way of validating which subgraphs are good quality. Enter curation. +Pokud by tedy indexátoři museli hádat, které podgrafy mají indexovat, byla by malá šance, že získají solidní poplatky za dotazy, protože by neměli možnost ověřit, které podgrafy jsou kvalitní. Nastupuje kurátorství. -Curators make The Graph network efficient and signaling is the process that curators use to let Indexers know that a subgraph is good to index, where GRT is added to a bonding curve for a subgraph. Indexers can inherently trust the signal from a curator because upon signaling, curators mint a curation share for the subgraph, entitling them to a portion of future query fees that the subgraph drives. Curator signal is represented as ERC20 tokens called Graph Curation Shares (GCS). Curators that want to earn more query fees should signal their GRT to subgraphs that they predict will generate a strong flow of fees to the network. Curators cannot be slashed for bad behavior, but there is a deposit tax on Curators to disincentivize poor decision-making that could harm the integrity of the network. Curators also earn fewer query fees if they choose to curate on a low-quality Subgraph since there will be fewer queries to process or fewer Indexers to process those queries. See the diagram below! +Kurátoři zefektivňují síť grafů a signalizace je proces, který kurátoři používají k tomu, aby dali indexátorům vědět, že podgraf je vhodné indexovat, přičemž GRT se přidává k vazební křivce podgrafu. Indexátoři mohou ze své podstaty důvěřovat signálu od kurátora, protože při signalizaci kurátoři vybírají podíl na kurátorství pro podgraf, který je opravňuje k části budoucích poplatků za dotazy, které podgraf vyvolá. Signál kurátora je reprezentován jako tokeny ERC20 nazývané Graph Curation Shares (GCS). Kurátoři, kteří chtějí získat více poplatků za dotazování, by měli signalizovat své GRT podgrafům, u nichž předpokládají, že budou generovat silný tok poplatků do sítě. Kurátoři nemohou být kráceni za špatné chování, ale existuje daň z vkladů pro kurátory, která má odradit od špatného rozhodování, jež by mohlo poškodit integritu sítě. Kurátoři také vydělají méně poplatků za dotazy, pokud se rozhodnou kurátorovat na nekvalitním podgrafu, protože bude méně dotazů ke zpracování nebo méně indexátorů, kteří budou tyto dotazy zpracovávat. Podívejte se na diagram níže! -![Signaling diagram](/img/curator-signaling.png) +![Signalizační diagram](/img/curator-signaling.png) -Indexers can find subgraphs to index based on curation signals they see in The Graph Explorer (screenshot below). +Indexátoři mohou najít podgrafy k indexování na základě kurátorských signálů, které vidí v Průzkumníku grafů (obrázek níže). -![Explorer subgraphs](/img/explorer-subgraphs.png) +![Podgrafy průzkumníka](/img/explorer-subgraphs.png) -## Risks +## Rizika -1. The query market is inherently young at The Graph and there is risk that your %APY may be lower than you expect due to nascent market dynamics. -2. Curation Fee - when a Curator signals GRT on a subgraph, they incur a 1% curation tax. This fee is burned and the rest is deposited into the reserve supply of the bonding curve. -3. When curators burn their shares to withdraw GRT, the GRT valuation of the remaining shares will be reduced. Be aware that in some cases, curators may decide to burn their shares **all at once**. This situation may be common if a dApp developer stops versioning/improving and querying their subgraph or if a subgraph fails. As a result, remaining curators might only be able to withdraw a fraction of their initial GRT. For a network role with a lower risk profile, see [Delegators](/network/delegating). -4. A subgraph can fail due to a bug. A failed subgraph does not accrue query fees. As a result, you’ll have to wait until the developer fixes the bug and deploys a new version. - - If you are subscribed to the newest version of a subgraph, your shares will auto-migrate to that new version. This will incur a 0.5% curation tax. - - If you have signaled on a specific subgraph version and it fails, you will have to manually burn your curation shares. Note that you may receive more or less GRT than you initially deposited into the curation curve, which is a risk associated with being a curator. You can then signal on the new subgraph version, thus incurring a 1% curation tax. +1. Trh s dotazy je v Graf ze své podstaty mladý a existuje riziko, že vaše %APY může být nižší, než očekáváte, v důsledku dynamiky rodícího se trhu. +2. Kurátorský poplatek - když kurátor signalizuje GRT na podgrafu, platí 1% kurátorský poplatek. Tento poplatek se spálí a zbytek se uloží do rezervní zásoby vazební křivky. +3. Když kurátoři spálí své podíly za účelem výběru GRT, sníží se ocenění GRT zbývajících podílů. Uvědomte si, že v některých případech se kurátoři mohou rozhodnout spálit své podíly **všechny najednou**. Tato situace může být běžná, pokud vývojář dApp přestane verzovat/vylepšovat a dotazovat se na svůj podgraf nebo pokud podgraf selže. V důsledku toho mohou být zbývající kurátoři schopni vybrat pouze zlomek svého původního GRT. Síťovou roli s nižším rizikovým profilem naleznete v části [Delegátoři](/network/delegating). +4. Podgraf může selhat kvůli chybě. Za neúspěšný podgraf se neúčtují poplatky za dotaz. V důsledku toho budete muset počkat, až vývojář chybu opraví a nasadí novou verzi. + - Pokud jste přihlášeni k odběru nejnovější verze podgrafu, vaše sdílené položky se automaticky přemigrují na tuto novou verzi. Při tom bude účtována 0,5% kurátorská daň. + - Pokud jste signalizovali na konkrétní verzi podgrafu a nepodařilo se to, budete muset ručně vypálit sdílení kurátorů. Všimněte si, že můžete obdržet více nebo méně GRT, než jste původně vložili do kurátorského podílu, což je riziko spojené s funkcí kurátora. Poté můžete signalizovat na nové verzi podgrafu, čímž vám vznikne 1% daň z kurátorství. -## Curation FAQs +## Nejčastější dotazy ke kurátorství -### 1. What % of query fees do Curators earn? +### 1. Kolik % z poplatků za dotazy kurátoři vydělávají? -By signalling on a subgraph, you will earn a share of all the query fees that this subgraph generates. 10% of all query fees goes to the Curators pro-rata to their curation shares. This 10% is subject to governance. +Signalizací na podgrafu získáte podíl ze všech poplatků za dotazy, které tento podgraf vygeneruje. 10 % všech poplatků za dotazy připadá kurátorům poměrně k jejich podílům na kurátorství. Těchto 10 % podléhá správě. -### 2. How do I decide which subgraphs are high quality to signal on? +### 2. Jak se rozhodnu, které podgrafy jsou kvalitní a na kterých je třeba signalizovat? -Finding high-quality subgraphs is a complex task, but it can be approached in many different ways. As a Curator, you want to look for trustworthy subgraphs that are driving query volume. A trustworthy subgraph may be valuable if it is complete, accurate, and supports a dApp’s data needs. A poorly architected subgraph might need to be revised or re-published, and can also end up failing. It is critical for Curators to review a subgraph’s architecture or code in order to assess if a subgraph is valuable. As a result: +Nalezení kvalitních podgrafů je složitý úkol, ale lze k němu přistupovat mnoha různými způsoby. Jako kurátor chcete hledat důvěryhodné podgrafy, které jsou zdrojem objemu dotazů. Důvěryhodný podgraf může být cenný, pokud je úplný, přesný a podporuje datové potřeby dApp. Špatně navržený podgraf může vyžadovat revizi nebo opětovné zveřejnění a může také skončit neúspěchem. Pro kurátory je zásadní, aby přezkoumali architekturu nebo kód podgrafu, aby mohli posoudit, zda je podgraf hodnotný. V důsledku toho: -- Curators can use their understanding of a network to try and predict how an individual subgraph may generate a higher or lower query volume in the future -- Curators should also understand the metrics that are available through The Graph Explorer. Metrics like past query volume and who the subgraph developer is can help determine whether or not a subgraph is worth signalling on. +- Kurátoři mohou využít své znalosti sítě k tomu, aby se pokusili předpovědět, jak může jednotlivý podgraf v budoucnu generovat vyšší nebo nižší objem dotazů +- Kurátoři by také měli rozumět metrikám, které jsou k dispozici prostřednictvím nástroje na graf Explorer. Metriky, jako je objem dotazů v minulosti a kdo je tvůrcem podgrafu, mohou pomoci určit, zda stojí za to podgraf signalizovat. -### 3. What’s the cost of updating a subgraph? +### 3. Jaké jsou náklady na aktualizaci podgrafu? -Migrating your curation shares to a new subgraph version incurs a curation tax of 1%. Curators can choose to subscribe to the newest version of a subgraph. When curation shares get auto-migrated to a new version, Curators will also pay half curation tax, ie. 0.5%, because updating subgraphs is an on-chain action that costs gas. +Při migraci podílů kurátorů na novou verzi podgrafů se účtuje kurátorská daň ve výši 1 %. Kurátoři se mohou rozhodnout, že si předplatí nejnovější verzi podgrafu. Při automatické migraci sdílení kurátorů na novou verzi zaplatí kurátoři také polovinu kurátorské daně, tj. 0,5 %, protože aktualizace podgrafů je akce na řetězci, která stojí plyn. -### 4. How often can I update my subgraph? +### 4. Jak často mohu svůj podgraf aktualizovat? -It’s suggested that you don’t update your subgraphs too frequently. See the question above for more details. +Doporučujeme, abyste podgrafy neaktualizovali příliš často. Další podrobnosti naleznete v otázce výše. -### 5. Can I sell my curation shares? +### 5. Mohu prodat své kurátorské podíly? Curation shares cannot be "bought" or "sold" like other ERC20 tokens that you may be familiar with. They can only be minted (created) or burned (destroyed) along the bonding curve for a particular subgraph. The amount of GRT needed to mint a new signal, and the amount of GRT you receive when you burn your existing signal are determined by that bonding curve. As a Curator, you need to know that when you burn your curation shares to withdraw GRT, you can end up with more or less GRT than you initially deposited. From f6d1d4facd616f24e0bcb7791535d3cd8adee2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:41 -0400 Subject: [PATCH 171/924] New translations curating.mdx (Dutch) --- website/pages/nl/network/curating.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/nl/network/curating.mdx b/website/pages/nl/network/curating.mdx index 8a12ceba709a..a9f36ca3f07b 100644 --- a/website/pages/nl/network/curating.mdx +++ b/website/pages/nl/network/curating.mdx @@ -1,5 +1,5 @@ --- -title: Curating +title: Cureren --- Curatoren spelen een cruciale rol in de gedecentraliseerde economie van The Graph. Ze gebruiken hun kennis van het web3-ecosysteem om signalen af te geven op de subgraphs die geïndexeerd moeten worden door The Graph Network. Via de Graph Explorer kunnen curatoren netwerkgegevens bekijken om signaleringsbeslissingen te nemen. Het Graph Network beloont curatoren die signalen afgeven op subgraphs van goede kwaliteit door een deel van de querykosten die door deze subgraphs worden gegenereerd te verdelen over de curatoren. Curatoren worden beloond als ze vroeg signaleren. Deze signaleringen van curatoren zijn belangrijk voor Indexeerders, die vervolgens de gegevens van deze gesignaleerde subgraphs kunnen verwerken of indexeren. From 8bf8e5c2e9f0ffcadc871402c716ad840cca9684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:48 -0400 Subject: [PATCH 172/924] New translations curating.mdx (Hindi) --- website/pages/hi/network/curating.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/hi/network/curating.mdx b/website/pages/hi/network/curating.mdx index 14a099594b19..b0546cce7285 100644 --- a/website/pages/hi/network/curating.mdx +++ b/website/pages/hi/network/curating.mdx @@ -41,7 +41,7 @@ When signaling, curators can decide to signal on a specific version of the subgr अपने सिग्नल को स्वचालित रूप से नवीनतम उत्पादन बिल्ड में माइग्रेट करना यह सुनिश्चित करने के लिए मूल्यवान हो सकता है कि आप क्वेरी शुल्क अर्जित करते रहें। हर बार जब आप क्यूरेट करते हैं, तो 1% क्यूरेशन टैक्स लगता है। आप हर माइग्रेशन पर 0.5% क्यूरेशन टैक्स भी देंगे। सबग्राफ डेवलपर्स को बार-बार नए संस्करण प्रकाशित करने से हतोत्साहित किया जाता है - उन्हें सभी ऑटो-माइग्रेटेड क्यूरेशन शेयरों पर 0.5% क्यूरेशन टैक्स देना पड़ता है। -> **टिप्पणी**: किसी विशेष सबग्राफ को संकेत देने वाला पहला पता पहला क्यूरेटर माना जाता है और उसे बाकी के क्यूरेटरों की तुलना में बहुत अधिक गैस-गहन काम करना होगा क्योंकि पहला क्यूरेटर क्यूरेशन शेयर टोकन को इनिशियलाइज़ करता है, बॉन्डिंग कर्व को इनिशियलाइज़ करता है, और ग्राफ़ प्रॉक्सी में टोकन भी ट्रांसफर करता है। +> **Note**: The first address to signal a particular subgraph is considered the first curator and will have to do much more gas-intensive work than the rest of the following curators because the first curator initializes the curation share tokens, initializes the bonding curve, and also transfers tokens into the Graph proxy. ## ग्राफ़ नेटवर्क के लिए सिग्नलिंग का क्या अर्थ है? From f615ac8270a33498a9fbe5d4a638df9307d21d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:50 -0400 Subject: [PATCH 173/924] New translations delegating.mdx (French) --- website/pages/fr/network/delegating.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/fr/network/delegating.mdx b/website/pages/fr/network/delegating.mdx index 1f6648e16226..980ace6dad0d 100644 --- a/website/pages/fr/network/delegating.mdx +++ b/website/pages/fr/network/delegating.mdx @@ -33,8 +33,8 @@ Lorsqu'un délégué souhaite se dé-déléguer, ses jetons sont soumis à une p Il convient également de choisir judicieusement un indexeur. Si vous choisissez un indexeur qui n'est pas digne de confiance ou qui ne fait pas du bon travail, vous voudrez annuler la délégation, ce qui signifie que vous perdrez beaucoup d'occasions de gagner des récompenses, ce qui peut être tout aussi grave que de brûler des TRG.
- !Délégation débondage](/img/Delegation-Unbonding.png) _Notez la commission de 0,5% dans l'interface utilisateur de la - délégation, ainsi que la période de débondage de 28 jours. de 28 jours + !Délégation débondage](/img/Delegation-Unbonding.png) _Notez la commission de 0,5% dans l'interface utilisateur de la délégation, ainsi que la période de débondage de 28 jours. + de 28 jours
### Choisir un indexeur digne de confiance avec une rémunération équitable pour les délégués @@ -45,7 +45,7 @@ Réduction de la récompense d'indexation - La réduction de la récompense d'in
![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Le meilleur indexeur donne aux délégués 90 % des récompenses. Le - celui du milieu donne 20 % aux délégués. Celui du bas donne aux délégués environ 83 %.* + celui du milieu donne 20 % aux délégués. Celui du bas donne aux délégués environ 83 %.*
- Réduction des frais de requête – Cela fonctionne exactement comme la réduction des récompenses d’indexation. Cependant, cela concerne spécifiquement les retours sur les frais de requête collectés par l’indexeur. Il convient de noter qu’au démarrage du réseau, les retours sur les frais de requête seront très faibles par rapport à la récompense d’indexation. Il est recommandé de prêter attention au réseau pour déterminer quand les frais de requête sur le réseau commenceront à être plus importants. From 2670e051105106050c4d6052b4fe197b93399417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:52 -0400 Subject: [PATCH 174/924] New translations delegating.mdx (Arabic) --- website/pages/ar/network/delegating.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/pages/ar/network/delegating.mdx b/website/pages/ar/network/delegating.mdx index e5a9fb6b8955..eea33ceb91da 100644 --- a/website/pages/ar/network/delegating.mdx +++ b/website/pages/ar/network/delegating.mdx @@ -32,7 +32,9 @@ Whenever a Delegator wants to undelegate, their tokens are subject to a 28-day u One thing to consider as well is choosing an Indexer wisely. If you choose an Indexer who was not trustworthy, or not doing a good job, you will want to undelegate, which means you will be losing a lot of opportunities to earn rewards, which can be just as bad as burning GRT. -
لاحظ 0.5٪ رسوم التفويض ، بالإضافة إلى فترة 28 يوما لإلغاء التفويض.
+
+ لاحظ 0.5٪ رسوم التفويض ، بالإضافة إلى فترة 28 يوما لإلغاء التفويض. +
### اختيار مفهرس جدير بالثقة مع عائد جيد للمفوضين From b6bb59d7ace4ebd0a0019af4943a3fd53650783f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:53 -0400 Subject: [PATCH 175/924] New translations delegating.mdx (Czech) --- website/pages/cs/network/delegating.mdx | 96 ++++++++++++------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/cs/network/delegating.mdx b/website/pages/cs/network/delegating.mdx index 4a6d6e00b73e..df6ce204f133 100644 --- a/website/pages/cs/network/delegating.mdx +++ b/website/pages/cs/network/delegating.mdx @@ -1,98 +1,98 @@ --- -title: Delegating +title: Delegování --- -Delegators are network participants who delegate (i.e., "stake") GRT to one or more Indexers. Delegators contribute to securing the network without running a Graph Node themselves. +Delegáti jsou účastníci sítě, kteří delegují (tj. "sázejí") GRT na jednoho nebo více indexátorů. Delegáti přispívají k zabezpečení sítě, aniž by sami provozovali uzel Graf. -By delegating to an Indexer, Delegators earn a portion of the Indexer's query fees and rewards. The amount of queries an Indexer can process depends on the Indexer's own (and delegated) stake and the price the Indexer charges for each query, so the more stake that is allocated to an Indexer, the more potential queries they can process. +Delegováním na indexátora získávají delegáti část poplatků a odměn za dotazy indexátora. Množství dotazů, které může indexátor zpracovat, závisí na jeho vlastním (a delegovaném) podílu a ceně, kterou si indexátor účtuje za každý dotaz, takže čím větší podíl je indexátorovi přidělen, tím více potenciálních dotazů může zpracovat. -## Delegator Guide +## Průvodce delegáta -This guide will explain how to be an effective Delegator in the Graph Network. Delegators share earnings of the protocol alongside all Indexers based on their delegated stake. A Delegator must use their best judgment to choose Indexers based on multiple factors. Please note this guide will not go over steps such as setting up Metamask properly, as that information is widely available on the internet. There are three sections in this guide: +V této příručce se dozvíte, jak se stát efektivním delegátem v síti Graf. Delegáti se podílejí na výnosech protokolu spolu se všemi Indexery na základě svého delegovaného podílu. Delegát musí při výběru Indexátorů vycházet ze svého nejlepšího úsudku, a to na základě více faktorů. Vezměte prosím na vědomí, že tento průvodce nebude rozebírat kroky, jako je správné nastavení Metamasky, protože tyto informace jsou široce dostupné na internetu. Tato příručka obsahuje tři části: -- The risks of delegating tokens in The Graph Network -- How to calculate expected returns as a Delegator -- A video guide showing the steps to delegate in the Graph Network UI +- Rizika delegování tokenů v síti Graf +- Jak vypočítat očekávané výnosy jako delegát +- Videoprůvodce ukazující kroky delegování v UI sit' Graf -## Delegation Risks +## Rizika delegování -Listed below are the main risks of being a Delegator in the protocol. +Níže jsou uvedena hlavní rizika plynoucí z delegáta v protokolu. -### The delegation tax +### Delegační daň -Delegators cannot be slashed for bad behavior, but there is a tax on Delegators to disincentivize poor decision-making that could harm the integrity of the network. +Delegáti nemohou být za špatné chování kráceni, ale existuje daň pro delegáty, která má odradit od špatného rozhodování, jež by mohlo poškodit integritu sítě. -It is important to understand that every time you delegate, you will be charged 0.5%. This means if you are delegating 1000 GRT, you will automatically burn 5 GRT. +Je důležité si uvědomit, že při každém delegování vám bude účtováno 0.5%. To znamená, že pokud delegujete 1000 GRT, automaticky spálíte 5 GRT. -This means that to be safe, a Delegator should calculate what their return will be by delegating to an Indexer. For example, a Delegator might calculate how many days it will take before they have earned back the 0.5% tax on their delegation. +To znamená, že delegát by si měl pro jistotu spočítat, jaký bude jeho výnos při delegování na indexátor. Delegát by si například mohl spočítat, za kolik dní se mu vrátí 0.5% daň z delegování. -### The delegation unbonding period +### Konec období vázanosti delegací -Whenever a Delegator wants to undelegate, their tokens are subject to a 28-day unbonding period. This means they cannot transfer their tokens, or earn any rewards for 28 days. +Kdykoli chce delegát zrušit delegování, jeho tokeny podléhají 28denní lhůtě pro zrušení delegování. To znamená, že po dobu 28 dní nemohou své tokeny převádět ani získávat žádné odměny. -One thing to consider as well is choosing an Indexer wisely. If you choose an Indexer who was not trustworthy, or not doing a good job, you will want to undelegate, which means you will be losing a lot of opportunities to earn rewards, which can be just as bad as burning GRT. +Jednou z věcí, kterou je třeba zvážit, je rozumný výběr indexátoru. Pokud si vyberete indexátora, který nebyl důvěryhodný nebo neodváděl dobrou práci, budete chtít zrušit delegaci, což znamená, že přijdete o mnoho příležitostí získat odměny, což může být stejně špatné jako spálení GRT.
- ![Delegation unbonding](/img/Delegation-Unbonding.png) _Note the 0.5% fee in the Delegation UI, as well as the 28 day - unbonding period._ + ![Zrušení vázanosti delegací](/img/Delegation-Unbonding.png) _Všimněte si 0.5% poplatku v UI delegací a 28denní lhůty. + období pro zrušení závazku._
-### Choosing a trustworthy Indexer with a fair reward payout for Delegators +### Výběr důvěryhodného indexátora se spravedlivou odměnou pro delegáty -This is an important part to understand. First let's discuss three very important values, which are the Delegation Parameters. +To je důležitá část, kterou je třeba pochopit. Nejprve si probereme tři velmi důležité hodnoty, které představují parametry delegování. -Indexing Reward Cut - The indexing reward cut is the portion of the rewards that the Indexer will keep for themselves. That means if it is set to 100%, as a Delegator you will get 0 indexing rewards. If you see 80% in the UI, that means as a Delegator, you will receive 20%. An important note - at the beginning of the network, Indexing Rewards will account for the majority of the rewards. +Indexační podíl na odměně - Indexační podíl na odměně je část odměny, kterou si indexátor ponechá pro sebe. To znamená, že pokud je nastavena na 100%, jako delegát získáte 0 odměn za indexaci. Pokud se v uživatelském rozhraní zobrazí hodnota 80%, znamená to, že jako delegát obdržíte 20%. Důležitá poznámka - na začátku sítě budou odměny za indexování tvořit většinu odměn.
- ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *The top Indexer is giving Delegators 90% of the rewards. The - middle one is giving Delegators 20%. The bottom one is giving Delegators ~83%.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Nejlepší indexátor dává delegátům 90 % odměn. Na + prostřední dává delegátům 20 % odměn. Spodní dává delegátům ~83 %.*
-- Query Fee Cut - This works exactly like the Indexing Reward Cut. However, this is specifically for returns on the query fees the Indexer collects. It should be noted that at the start of the network, returns from query fees will be very small compared to the indexing reward. It is recommended to pay attention to the network to determine when the query fees in the network will start to be more significant. +- Snížení poplatku za dotaz - Funguje stejně jako snížení odměny za indexování. Jedná se však konkrétně o výnosy z poplatků za dotaz, které indexátor vybere. Je třeba poznamenat, že na začátku sítě budou výnosy z poplatků za dotazování ve srovnání s odměnou za indexaci velmi malé. Doporučujeme věnovat pozornost síti, abyste zjistili, kdy začnou být poplatky za dotazování v síti významnější. -As you can see, there is a lot of thought that must go into choosing the right Indexer. This is why we highly recommend you explore The Graph Discord to determine who the Indexers are with the best social reputation, and technical reputation, to reward Delegators consistently. Many of the Indexers are very active in Discord and will be happy to answer your questions. Many of them have been Indexing for months in the testnet, and are doing their best to help Delegators earn a good return, as it improves the health and success of the network. +Jak vidíte, výběr správného indexátoru je třeba důkladně promyslet. Proto vám vřele doporučujeme prozkoumat Graf Discord a zjistit, kdo jsou Indexátoři s nejlepší společenskou reputací a technickou reputací, abyste mohli Delegáty důsledně odměňovat. Mnozí z Indexátorů jsou na Discordu velmi aktivní a rádi zodpoví vaše dotazy. Mnozí z nich indexují v testovací síti již několik měsíců a dělají vše pro to, aby pomohli Delegátům získat dobrou odměnu, protože tím zlepšují zdraví a úspěšnost sítě. -### Calculating Delegators expected return +### Výpočet očekávaného výnosu delegátů -A Delegator has to consider a lot of factors when determining the return. These include: +Delegát musí při určování návratnosti zohlednit mnoho faktorů. Mezi ně patří: -- A technical Delegator can also look at the Indexer's ability to use the Delegated tokens available to them. If an Indexer is not allocating all the tokens available, they are not earning the maximum profit they could be for themselves or their Delegators. -- Right now in the network an Indexer can choose to close an allocation and collect rewards anytime between 1 and 28 days. So it is possible that an Indexer has a lot of rewards they have not collected yet, and thus, their total rewards are low. This should be taken into consideration in the early days. +- Technický delegát se může také podívat na schopnost indexátoru používat dostupné delegované tokeny. Pokud Indexátor nealokuje všechny dostupné tokeny, nevydělává pro sebe ani pro své Delegáty maximální možný zisk. +- V současné době může indexátor v síti uzavřít alokaci a vybrat odměnu kdykoli v rozmezí 1 až 28 dnů. Je tedy možné, že indexátor má mnoho odměn, které ještě nevybral, a jeho celkové odměny jsou tedy nízké. To je třeba v prvních dnech brát v úvahu. -### Considering the query fee cut and indexing fee cut +### S ohledem na snížení poplatků za dotaz a indexaci -As described in the above sections, you should choose an Indexer that is transparent and honest about setting their Query Fee Cut and Indexing Fee Cuts. A Delegator should also look at the Parameters Cooldown time to see how much of a time buffer they have. After that is done, it is fairly simple to calculate the amount of rewards the Delegators are getting. The formula is: +Jak je popsáno v předchozích částech, měli byste si vybrat indexátor, který je transparentní a poctivý, pokud jde o nastavení snížení poplatků za dotaz a indexování. Delegovatel by se měl také podívat na dobu Cooldown parametrů, aby zjistil, jak velkou má časovou rezervu. Poté je poměrně jednoduché vypočítat výši odměn, které Delegátoři dostávají. Vzorec je následující: -![Delegation Image 3](/img/Delegation-Reward-Formula.png) +![Delegování Obrázek 3](/img/Delegation-Reward-Formula.png) -### Considering the Indexer's delegation pool +### Zohlednění fondu delegování indexátoru -Another thing a Delegator has to consider is what proportion of the Delegation Pool they own. All delegation rewards are shared evenly, with a simple rebalancing of the pool determined by the amount the Delegator has deposited into the pool. This gives the Delegator a share of the pool: +Další věcí, kterou musí delegát zvážit, je, jakou část fondu delegátů vlastní. Všechny odměny za delegování se rozdělují rovnoměrně, přičemž jednoduché vyvážení fondu se určuje podle částky, kterou delegát do fondu vložil. Delegát tak získá podíl na fondu: -![Share formula](/img/Share-Forumla.png) +![Sdílet vzorec](/img/Share-Forumla.png) -Using this formula, we can see that it is actually possible for an Indexer who is offering only 20% to Delegators, to actually be giving Delegators an even better reward than an Indexer who is giving 90% to Delegators. +Pomocí tohoto vzorce můžeme zjistit, že je možné, aby indexátor, který nabízí delegátům pouze 20%, ve skutečnosti poskytoval delegátům ještě lepší odměnu než indexátor, který poskytuje delegátům 90%. -A Delegator can therefore do the math to determine that the Indexer offering 20% to Delegators, is offering a better return. +Delegát tedy může výpočtem zjistit, že indexátor, který nabízí delegátům 20%, nabízí lepší výnos. -### Considering the delegation capacity +### Vzhledem ke kapacitě delegace -Another thing to consider is the delegation capacity. Currently, the Delegation Ratio is set to 16. This means that if an Indexer has staked 1,000,000 GRT, their Delegation Capacity is 16,000,000 GRT of Delegated tokens that they can use in the protocol. Any delegated tokens over this amount will dilute all the Delegator rewards. +Další věcí, kterou je třeba zvážit, je kapacita delegování. V současné době je poměr delegování nastaven na 16. To znamená, že pokud indexátor vsadil 1,000,000 GRT, jeho delegační kapacita je 16,000,000 GRT delegovaných tokenů, které může v protokolu použít. Jakékoli delegované tokeny nad toto množství rozředí všechny odměny delegátora. -Imagine an Indexer has 100,000,000 GRT delegated to them, and their capacity is only 16,000,000 GRT. This means effectively, 84,000,000 GRT tokens are not being used to earn tokens. And all the Delegators, and the Indexer, are earning way less rewards than they could be. +Představte si, že na indexátora je delegováno 100,000,000 BRT a jeho kapacita je pouze 16,000,000 BRT. To znamená, že efektivně 84,000,000 žetonů GRT není použito k vydělávání žetonů. A všichni delegáti i Indexer vydělávají mnohem méně odměn, než by mohli. -Therefore a Delegator should always consider the Delegation Capacity of an Indexer, and factor it into their decision making. +Delegát by proto měl vždy zvážit kapacitu delegování indexátora a zohlednit ji při svém rozhodování. -## Delegator FAQs and Bugs +## FAQ a chyby delegáta -### MetaMask "Pending Transaction" Bug +### Chyba MetaMask "Čekající transakce" -**When I try to delegate my transaction in MetaMask appears as "Pending" or "Queued" for longer than expected. What should I do?** +**Když se pokusím delegovat transakci, zobrazí se v MetaMasce jako "Pending" nebo "Queued" na delší dobu, než se očekávalo. Co mám dělat?** -At times, attempts to delegate to indexers via MetaMask can fail and result in prolonged periods of "Pending" or "Queued" transaction attempts. For example, a user may attempt to delegate with an insufficient gas fee relative to the current prices, resulting in the transaction attempt displaying as "Pending" in their MetaMask wallet for 15+ minutes. When this occurs, subsequent transactions can be attempted by a user, but these will not be processed until the initial transaction is mined, as transactions for an address must be processed in order. In such cases, these transactions can be cancelled in MetaMask, but the transactions attempts will accrue gas fees without any guarantee that subsequent attempts will be successful. A simpler resolution to this bug is restarting the browsesr (e.g., using "abort:restart" in the address bar), which will cancel all previous attempts without gas being subtracted from the wallet. Several users that have encountered this issue and have reported successful transactions after restarting their browser and attempting to delegate. +Občas se může stát, že pokusy o delegování na indexátory prostřednictvím funkce MetaMask selžou a vyústí v delší dobu trvající pokusy o transakci v režimu "čekající" nebo "ve frontě". Uživatel se například může pokusit o delegování s nedostatečným poplatkem za plyn vzhledem k aktuálním cenám, což vede k tomu, že se pokus o transakci v jeho peněžence MetaMask zobrazí jako "čekající" po dobu více než 15 minut. Pokud k tomu dojde, může se uživatel pokusit o další transakce, ale ty nebudou zpracovány, dokud nebude vytěžena původní transakce, protože transakce pro danou adresu musí být zpracovány v pořadí. V takových případech lze tyto transakce v MetaMasku zrušit, ale za pokusy o transakce budou narůstat poplatky za plyn bez záruky, že následné pokusy budou úspěšné. Jednodušším řešením této chyby je restartování prohlížeče (např. pomocí příkazu "abort:restart" v adresním řádku), čímž se zruší všechny předchozí pokusy, aniž by se z peněženky odečetl plyn. Několik uživatelů, kteří se s tímto problémem setkali a hlásili úspěšné transakce po restartování prohlížeče a pokusu o delegování. -## Video guide for the network UI +## Videoprůvodce UI sítě -This guide provides a full review of this document, and how to consider everything in this document while interacting with the UI. +V této příručce najdete úplný přehled tohoto dokumentu a návod, jak při práci s UI zohlednit vše, co je v tomto dokumentu uvedeno. From acd08c9299324518de571053bfae39a5c4fff4de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:54 -0400 Subject: [PATCH 176/924] New translations delegating.mdx (Italian) --- website/pages/it/network/delegating.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/it/network/delegating.mdx b/website/pages/it/network/delegating.mdx index 344420fccebd..8f07f0b33986 100644 --- a/website/pages/it/network/delegating.mdx +++ b/website/pages/it/network/delegating.mdx @@ -33,8 +33,8 @@ Ogni volta che un Delegator vuole riottenere i suoi token, questi sono soggetti Una cosa da considerare è anche la scelta oculata di un Indexer. Se scegliete un Indexer che non è affidabile o che non sta facendo un buon lavoro, vorrete annullare la delega, il che significa che perderete molte opportunità di guadagnare ricompense, il che può essere altrettanto negativo che bruciare GRT.
- ![Sblocco di Delegator](/img/Delegation-Unbonding.png) _Nota la commissione del 0,5% nel UI della delegazione, così - come il periodo di sblocco di 28 giorni. periodo di sblocco._ + ![Sblocco di Delegator](/img/Delegation-Unbonding.png) _Nota la commissione del 0,5% nel UI della delegazione, così come il periodo di sblocco di 28 giorni. + periodo di sblocco._
### Scegliere un Indexer affidabile con una giusta ricompensa per i Delegator @@ -44,8 +44,8 @@ Questa è una parte importante da capire. Per prima cosa discutiamo di tre valor Taglio della ricompensa di indicizzazione - Il taglio della ricompensa di indicizzazione è la parte delle ricompense che l'Indexer terrà per sé. Ciò significa che se è impostato al 100%, come delegator riceverete 0 ricompense di indicizzazione. Se nel UI vedete 80%, significa che come Delegator riceverete il 20%. Una nota importante: all'inizio della rete, le ricompense di indicizzazione rappresentano la maggior parte delle ricompense.
- ![Taglio delle ricompense dell'indicizzazione](/img/Indexing-Reward-Cut.png) *Il top Indexer sta dando ai Delegator il - 90% delle ricompense. Il centrale dà ai Delegator il 20%. Quello in basso dà ai Delegator ~83%.* + ![Taglio delle ricompense dell'indicizzazione](/img/Indexing-Reward-Cut.png) *Il top Indexer sta dando ai Delegator il 90% delle ricompense. Il + centrale dà ai Delegator il 20%. Quello in basso dà ai Delegator ~83%.*
- Taglio delle tariffe di query - Funziona esattamente come il Taglio della ricompensa di indicizzazione. Tuttavia, riguarda specificamente i rendimenti delle tariffe di query raccolte dal Indexer. Va notato che all'inizio della rete, i rendimenti delle tariffe di query saranno molto ridotti rispetto alla ricompensa di indicizzazione. Si raccomanda di prestare attenzione alla rete per determinare quando le tariffe di query nella rete inizieranno a essere più significative. From bb5924534a75c94b2236d778a9c116122335ede5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:57 -0400 Subject: [PATCH 177/924] New translations delegating.mdx (Dutch) --- website/pages/nl/network/delegating.mdx | 92 ++++++++++++------------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/website/pages/nl/network/delegating.mdx b/website/pages/nl/network/delegating.mdx index 4a6d6e00b73e..9cf383d14f26 100644 --- a/website/pages/nl/network/delegating.mdx +++ b/website/pages/nl/network/delegating.mdx @@ -1,98 +1,96 @@ --- -title: Delegating +title: Delegeren --- -Delegators are network participants who delegate (i.e., "stake") GRT to one or more Indexers. Delegators contribute to securing the network without running a Graph Node themselves. +Delegeerders zijn netwerkdeelnemers die GRT delegeren (d.w.z. "staking") aan één of meerdere Indexeerders. Delegeerders dragen bij aan de beveiliging van het netwerk zonder zelf een Graph Node operationeel te houden. -By delegating to an Indexer, Delegators earn a portion of the Indexer's query fees and rewards. The amount of queries an Indexer can process depends on the Indexer's own (and delegated) stake and the price the Indexer charges for each query, so the more stake that is allocated to an Indexer, the more potential queries they can process. +Door te delegeren aan een Indexeerder, krijgen Delegeerders een deel van de querykosten en inkomsten van de Indexeerder. Het aantal query's dat een Indexeerder kan verwerken, hangt af van de eigen (en gedelegeerde) GRT van de Indexer en de prijs die de Indexeerder rekent voor elke query. Dus hoe meer inzet aan een Indexeerder wordt toegewezen, hoe meer potentiële query's ze kunnen verwerken. -## Delegator Guide +## Delegeerder Gids -This guide will explain how to be an effective Delegator in the Graph Network. Delegators share earnings of the protocol alongside all Indexers based on their delegated stake. A Delegator must use their best judgment to choose Indexers based on multiple factors. Please note this guide will not go over steps such as setting up Metamask properly, as that information is widely available on the internet. There are three sections in this guide: +Deze gids legt uit hoe je een effectieve Delegeerder kunt zijn in The Graph Netwerk. Delegeerders delen de inkomsten van het protocol samen met alle Indexeerders op basis van hun gedelegeerde Grt. Een Delegeerder moet zijn gezonde verstand gebruiken bij het kiezen van Indexeerders op basis van meerdere factoren. Houd er rekening mee dat deze gids niet ingaat op stappen zoals het correct instellen van een wallet, aangezien die informatie wijdverspreid beschikbaar is op internet. Deze gids heeft drie onderdelen: -- The risks of delegating tokens in The Graph Network -- How to calculate expected returns as a Delegator -- A video guide showing the steps to delegate in the Graph Network UI +- De risico's van het delegeren van tokens in het Graph Netwerk +- Hoe je verwachte opbrengsten als Delegeerder berekent +- Een videogids die de stappen laat zien om te delegeren in het Graph Netwerk -## Delegation Risks +## Delegatie Risico's -Listed below are the main risks of being a Delegator in the protocol. +Hieronder staan de belangrijkste risico's van het zijn van een Delegeerder in het protocol. -### The delegation tax +### Delegatiebelasting -Delegators cannot be slashed for bad behavior, but there is a tax on Delegators to disincentivize poor decision-making that could harm the integrity of the network. +Delegeerders kunnen niet worden gestraft voor slecht gedrag, maar er is een belasting voor Delegeerders om slechte besluitvorming die de integriteit van het netwerk kan schaden te ontmoedigen. -It is important to understand that every time you delegate, you will be charged 0.5%. This means if you are delegating 1000 GRT, you will automatically burn 5 GRT. +Het is belangrijk om te begrijpen dat elke keer dat je delegeert, er 0,5% belasting in rekening wordt gebracht. Dit betekent dat als je bijvoorbeeld 1000 GRT delegeert, je automatisch 5 GRT zult betalen aan belasting, deze GRT wordt verbrand. -This means that to be safe, a Delegator should calculate what their return will be by delegating to an Indexer. For example, a Delegator might calculate how many days it will take before they have earned back the 0.5% tax on their delegation. +Dit betekent dat om veilig te zijn, een Delegeerder kan berekenen wat hun opbrengst zal zijn door te delegeren aan een Indexeerder. Bijvoorbeeld, een Delegeerder kan berekenen hoeveel dagen het zal duren voordat ze de 0,5% belasting op hun delegatie hebben terugverdiend. -### The delegation unbonding period +### Delegatieontbindingsperiode -Whenever a Delegator wants to undelegate, their tokens are subject to a 28-day unbonding period. This means they cannot transfer their tokens, or earn any rewards for 28 days. +Wanneer een Delegeerder een delegatie wil sluiten, zijn hun tokens gebonden aan een ontbindingsperiode van 28 dagen. Dit betekent dat ze hun tokens niet kunnen overdragen naar een andere delegatie of beloningen kunnen verdienen gedurende 28 dagen. -One thing to consider as well is choosing an Indexer wisely. If you choose an Indexer who was not trustworthy, or not doing a good job, you will want to undelegate, which means you will be losing a lot of opportunities to earn rewards, which can be just as bad as burning GRT. +Een andere overweging is ook het wijs kiezen van een Indexeerder. Als je een Indexeerder kiest die niet betrouwbaar was of zijn werk niet goed doet, wil je je delegatie sluiten, wat betekent dat je veel kansen om beloningen te ontvangen zal missen wat net zo slecht kan zijn als GRT verbranden.
- ![Delegation unbonding](/img/Delegation-Unbonding.png) _Note the 0.5% fee in the Delegation UI, as well as the 28 day - unbonding period._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Let op de 0,5% belasting in de Delegatie UI, evenals de 28-daagse ontbindingsperiode_
-### Choosing a trustworthy Indexer with a fair reward payout for Delegators +### Het kiezen van een betrouwbare Indexeerder met een eerlijke beloningsuitbetaling voor Delegeerders -This is an important part to understand. First let's discuss three very important values, which are the Delegation Parameters. +Dit is een belangrijk aspect om te begrijpen. Laten we eerst drie zeer belangrijke waarden bespreken, die de Delegatieparameters genoemd worden. -Indexing Reward Cut - The indexing reward cut is the portion of the rewards that the Indexer will keep for themselves. That means if it is set to 100%, as a Delegator you will get 0 indexing rewards. If you see 80% in the UI, that means as a Delegator, you will receive 20%. An important note - at the beginning of the network, Indexing Rewards will account for the majority of the rewards. +Indexing Reward Cut - De indexing reward cut is het deel van de beloningen dat de Indexeerder voor zichzelf zal houden. Dat betekent dat als het is ingesteld op 100%, je als delegeerder 0% van de beloningen voor het indexeren krijgt. Als je 80% ziet op de website, betekent dit dat je als Delegeerder 20% van de beloningen ontvangt. Een belangrijke opmerking - aan het begin van het netwerk zullen Indexing Rewards het grootste deel van de beloningen uitmaken.
- ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *The top Indexer is giving Delegators 90% of the rewards. The - middle one is giving Delegators 20%. The bottom one is giving Delegators ~83%.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *De bovenste Indexeerder geeft Delegeerders 90% van de beloningen. De middelste geeft Delegeerders 20%. De onderste geeft Delegeerders ~83%.*
-- Query Fee Cut - This works exactly like the Indexing Reward Cut. However, this is specifically for returns on the query fees the Indexer collects. It should be noted that at the start of the network, returns from query fees will be very small compared to the indexing reward. It is recommended to pay attention to the network to determine when the query fees in the network will start to be more significant. +- Query Fee Cut - Dit werkt precies hetzelfde als de Indexing Reward Cut. Dit is echter specifiek voor opbrengsten uit de querykosten die de Indexer binnen krijgt. Aan het begin van het netwerk zullen de opbrengsten uit querykosten erg klein zijn in vergelijking met de opbrengsten van het indexeren. Het wordt aanbevolen om aandacht te besteden aan het netwerkactiviteit om te bepalen wanneer de querykosten in het netwerk significant zullen worden. -As you can see, there is a lot of thought that must go into choosing the right Indexer. This is why we highly recommend you explore The Graph Discord to determine who the Indexers are with the best social reputation, and technical reputation, to reward Delegators consistently. Many of the Indexers are very active in Discord and will be happy to answer your questions. Many of them have been Indexing for months in the testnet, and are doing their best to help Delegators earn a good return, as it improves the health and success of the network. +Zoals je kunt zien, moet je goed nadenken over welke indexeerder je kiest. Daarom raden we ten zeerste aan om discord server van The Graph te verkennen om te bepalen wie de Indexers zijn met de beste reputatie en technische reputatie. Veel van de Indexers zijn zeer actief op Discord en zullen je vragen beantwoorden. Velen van hen zijn al maanden of jaren bezig met Indexeren in het testnet en doen hun best om Delegeerders een goed rendement te laten behalen, omdat dit de gezondheid en het succes van het netwerk verbetert. -### Calculating Delegators expected return +### Het berekenen van de verwachte opbrengst van Delegeerders -A Delegator has to consider a lot of factors when determining the return. These include: +Een Delegeerder moet veel factoren overwegen bij het berekenen van het rendement. Deze zijn: -- A technical Delegator can also look at the Indexer's ability to use the Delegated tokens available to them. If an Indexer is not allocating all the tokens available, they are not earning the maximum profit they could be for themselves or their Delegators. -- Right now in the network an Indexer can choose to close an allocation and collect rewards anytime between 1 and 28 days. So it is possible that an Indexer has a lot of rewards they have not collected yet, and thus, their total rewards are low. This should be taken into consideration in the early days. +- Een technische delegeerder kan ook kijken of een Indexeerder de aan hen beschikbaar gestelde gedelegeerde tokens wel volledig gebruikt. Als een Indexeerder niet alle beschikbare tokens toewijst, verdienen zij niet de maximale winst die mogelijk is voor zichzelf of hun Delegeerders. +- Op dit moment in het netwerk kan een Indexeerder ervoor kiezen om een allocatie te sluiten en beloningen op elk moment tussen 1 en 28 dagen te verzamelen. Het is dus mogelijk dat een Indexer veel beloningen heeft die ze nog niet hebben verzameld, en dus zijn hun totale beloningen laag. Hiermee moet rekening worden gehouden in de beginfase van het netwerk. -### Considering the query fee cut and indexing fee cut +### Rekening houden met de query fee aandeel en indexing fee aandeel -As described in the above sections, you should choose an Indexer that is transparent and honest about setting their Query Fee Cut and Indexing Fee Cuts. A Delegator should also look at the Parameters Cooldown time to see how much of a time buffer they have. After that is done, it is fairly simple to calculate the amount of rewards the Delegators are getting. The formula is: +Zoals beschreven in de bovenstaande secties, moet je een Indexeerder kiezen die transparant en eerlijk is over het instellen van hun Query Fee Aandeel en Indexing Fee Aandeel. Een Delegeerder moet ook kijken naar de parameter "Cooldown Time" om te zien hoeveel van een tijdsbuffer ze hebben. Nadat dat is gedaan, is het vrij eenvoudig om de hoeveelheid beloningen te berekenen die Delegators ontvangen. De formule is: -![Delegation Image 3](/img/Delegation-Reward-Formula.png) +![Delegatie Figuur 3](/img/Delegation-Reward-Formula.png) -### Considering the Indexer's delegation pool +### Rekening houden met de delegatie pool van een Indexeerder -Another thing a Delegator has to consider is what proportion of the Delegation Pool they own. All delegation rewards are shared evenly, with a simple rebalancing of the pool determined by the amount the Delegator has deposited into the pool. This gives the Delegator a share of the pool: +Een andere factor waarmee een Delegeerder rekening moet houden, is welk deel van de Delegatiepool zij bezitten. Alle beloningen uit delegatie worden gelijk verdeeld, overeenkomstig een eenvoudige herverdeling van de pool, die bepaald wordt door de hoeveelheid die de Delegeerder in de pool heeft gestort. Dit geeft de Delegeerder een aandeel in de pool: -![Share formula](/img/Share-Forumla.png) +![Deel Formule](/img/Share-Forumla.png) -Using this formula, we can see that it is actually possible for an Indexer who is offering only 20% to Delegators, to actually be giving Delegators an even better reward than an Indexer who is giving 90% to Delegators. +Met behulp van deze formule kunnen we zien dat het eigenlijk mogelijk is dat een Indexeerder die slechts 20% aan Delegeerders biedt, Delegeerders een nog betere beloning kan geven dan een Indexeerder die 90% aan Delegeerders geeft. -A Delegator can therefore do the math to determine that the Indexer offering 20% to Delegators, is offering a better return. +Een Delegeerder kan dus de berekeningen maken om te bepalen dat de Indexeerder die 20% aan Delegeerder aanbiedt, een beter rendement biedt. -### Considering the delegation capacity +### Rekening houden met de delegatiecapaciteit -Another thing to consider is the delegation capacity. Currently, the Delegation Ratio is set to 16. This means that if an Indexer has staked 1,000,000 GRT, their Delegation Capacity is 16,000,000 GRT of Delegated tokens that they can use in the protocol. Any delegated tokens over this amount will dilute all the Delegator rewards. +Een andere factor om te overwegen is de delegatiecapaciteit. Momenteel is de Delegatie Ratio ingesteld op 16. Dit betekent dat als een Indexeerder 1.000.000 GRT heeft gestaked, hun Delegatiecapaciteit 16.000.000 GRT aan gedelegeerde tokens is die ze kunnen gebruiken in het protocol. Elke gedelegeerde token boven dit bedrag zal voor alle Delegeerders de beloningen verwateren. -Imagine an Indexer has 100,000,000 GRT delegated to them, and their capacity is only 16,000,000 GRT. This means effectively, 84,000,000 GRT tokens are not being used to earn tokens. And all the Delegators, and the Indexer, are earning way less rewards than they could be. +Stel je voor dat een Indexeerder 100.000.000 GRT aan zich heeft gedelegeerd en hun capaciteit slechts 16.000.000 GRT is. Dit betekent effectivelijk dat 84.000.000 GRT tokens niet worden gebruikt om beloningen te verdienen. In dit geval zullen alle Delegeerders, en de Indexeerder, veel minder beloningen verdienen dan ze zouden kunnen. -Therefore a Delegator should always consider the Delegation Capacity of an Indexer, and factor it into their decision making. +Daarom moet een Delegeerder altijd rekening houden met de Delegatiecapaciteit van een Indexeerder en dit meenemen in hun besluitvorming. -## Delegator FAQs and Bugs +## Veelgestelde vragen van Delegeerders en Bugs ### MetaMask "Pending Transaction" Bug -**When I try to delegate my transaction in MetaMask appears as "Pending" or "Queued" for longer than expected. What should I do?** +**Wanneer ik probeer te delegeren, staat mijn transactie in MetaMask "Pending" of "Queued" voor langer dan verwacht. Wat moet ik doen?** -At times, attempts to delegate to indexers via MetaMask can fail and result in prolonged periods of "Pending" or "Queued" transaction attempts. For example, a user may attempt to delegate with an insufficient gas fee relative to the current prices, resulting in the transaction attempt displaying as "Pending" in their MetaMask wallet for 15+ minutes. When this occurs, subsequent transactions can be attempted by a user, but these will not be processed until the initial transaction is mined, as transactions for an address must be processed in order. In such cases, these transactions can be cancelled in MetaMask, but the transactions attempts will accrue gas fees without any guarantee that subsequent attempts will be successful. A simpler resolution to this bug is restarting the browsesr (e.g., using "abort:restart" in the address bar), which will cancel all previous attempts without gas being subtracted from the wallet. Several users that have encountered this issue and have reported successful transactions after restarting their browser and attempting to delegate. +Soms kunnen pogingen om via MetaMask te delegeren aan indexeerders mislukken en resulteren in langdurige perioden van "Pending" of "Queued" transactiepogingen. Bijvoorbeeld, een gebruiker kan proberen te delegeren met een onvoldoende gas in verhouding tot de huidige prijzen, waardoor de transactiepoging gedurende 15+ minuten als "Pending" in hun MetaMask wordt weergegeven. Wanneer dit gebeurt, kunnen gebruikers nadien transacties proberen uit te voeren, maar deze worden pas verwerkt nadat de initiële transactie is verwerkt, aangezien transacties voor een adres in volgorde moeten worden verwerkt. In dergelijke gevallen kunnen deze transacties in MetaMask worden geannuleerd, maar de transactiepogingen zullen gasvergoedingen opbouwen zonder enige garantie dat latere pogingen succesvol zullen zijn. Een eenvoudigere oplossing voor deze bug is het opnieuw opstarten van de browser (bijv. "abort:restart" gebruiken in de adresbalk), wat alle vorige pogingen zal annuleren zonder dat er gaskosten van de portemonnee wordt afgetrokken. Verschillende gebruikers die dit probleem zijn tegengekomen, hebben succesvolle transacties gemeld na het herstarten van de browser. -## Video guide for the network UI +## Videohandleiding voor de netwerk-gebruikersomgeving -This guide provides a full review of this document, and how to consider everything in this document while interacting with the UI. +Deze gids biedt een volledige beoordeling van dit document en hoe je alles in dit document moet overwegen bij het omgaan met de gebruikersomgeving. From a9495ac7550da90281457c3d394b0d6447ce93d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:06:58 -0400 Subject: [PATCH 178/924] New translations delegating.mdx (Portuguese) --- website/pages/pt/network/delegating.mdx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/pages/pt/network/delegating.mdx b/website/pages/pt/network/delegating.mdx index 38324efaa954..1eff5f9b506c 100644 --- a/website/pages/pt/network/delegating.mdx +++ b/website/pages/pt/network/delegating.mdx @@ -33,8 +33,7 @@ Se um Delegado quiser cancelar a sua delegação, seus tokens estarão sujeitos Considere escolher um Indexador com muito cuidado. Se escolher um Indexador que não é de confiança, ou não fez um bom trabalho, talvez queira cancelar a sua delegação, o que implica em sacrificar muitas oportunidades de recompensa, o que pode ser tão lamentável quanto queimar GRT.
- ![Delegation unbonding](/img/Delegation-Unbonding.png) _Perceba a taxa de 0.5% na interface da Delegação, além do - período de separação de 28 dias._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Perceba a taxa de 0.5% na interface da Delegação, além do período de separação de 28 dias._
### Como escolher um Indexador de confiança, com um pagamento justo para Delegantes @@ -44,8 +43,7 @@ Isto é importante. Primeiro, vamos discutir três valores muito importantes: os Porção da Recompensa de Indexação - Esta é a porção das recompensas que o Indexador guardará para si. Isto significa que, se configurada para 100%, o Delegante receberá 0 recompensas de indexação. Se ver 80% na interface, isto significa que, como Delegado, receberá 20%. Importante saber que no começo da rede, as Recompensas de Indexação contarão como a maioria das recompensas.
- ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *O Indexador acima está a dar 90% das recompensas aos Delegantes, - o do meio dá 20%, e o de baixo dá cerca de 83%.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *O Indexador acima está a dar 90% das recompensas aos Delegantes, o do meio dá 20%, e o de baixo dá cerca de 83%.*
- Porção da Taxa de Recompensa - Isto funciona exatamente como a Porção da Recompensa de Indexação, sendo especificamente para retornos nas taxas de consulta coletadas pelo Indexador. Perceba que, no começo da rede, os retornos de taxas de query serão muito menores que a recompensa de indexação. Vale prestar atenção na rede para determinar quando as taxas de consulta na rede começarão a ser mais significantes. From caffa40f3f6ce651726308fd4b330af0e5c10386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:00 -0400 Subject: [PATCH 179/924] New translations delegating.mdx (Russian) --- website/pages/ru/network/delegating.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ru/network/delegating.mdx b/website/pages/ru/network/delegating.mdx index 5d2bdf1326a5..ed6f3a0c5332 100644 --- a/website/pages/ru/network/delegating.mdx +++ b/website/pages/ru/network/delegating.mdx @@ -33,8 +33,8 @@ title: Делегирование Еще одним аспектом, который стоит учитывать, является разумный выбор Индексатора. Если вы выберете ненадежного или некомпетентного Индексатора, вам, возможно, захочется отозвать делегирование, что в свою очередь означает потерю множества возможностей для получения вознаграждений. Это может быть столь плохо, как и сжигание токенов GRT.
- ![Delegation unbonding](/img/Delegation-Unbonding.png) _Обратите внимание на комиссию в размере 0,5% в - пользовательском интерфейсе Delegation, а также на 28-дневный срок период разблокировки._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Обратите внимание на комиссию в размере 0,5% в пользовательском интерфейсе Delegation, а также на 28-дневный срок + период разблокировки._
### Выбор надежного Индексатора со справедливым распределением вознаграждений для Делегаторов From f67ff4ccda77a689cde52867dbc3622107994b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:00 -0400 Subject: [PATCH 180/924] New translations delegating.mdx (Swedish) --- website/pages/sv/network/delegating.mdx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/website/pages/sv/network/delegating.mdx b/website/pages/sv/network/delegating.mdx index 27bad461386c..65204d68d29d 100644 --- a/website/pages/sv/network/delegating.mdx +++ b/website/pages/sv/network/delegating.mdx @@ -33,8 +33,8 @@ När som helst en Delegater vill upphäva sin delegering är deras tokens förem En sak att tänka på är också att välja en Indexer klokt. Om du väljer en Indexer som inte var pålitlig eller inte gjorde ett bra jobb, kommer du att vilja upphäva, vilket innebär att du kommer att förlora många möjligheter att tjäna belöningar, vilket kan vara lika dåligt som att bränna GRT.
- ![Delegation upphävning](/img/Delegation-Upphävning.png) _Observera avgiften på 0,5% i Delegation UI, samt den 28 - dagar långa upphävningsperioden._ + ![Delegation upphävning](/img/Delegation-Upphävning.png) _Observera avgiften +på 0,5% i Delegation UI, samt den 28 dagar långa upphävningsperioden._
### Att välja en pålitlig Indexer med en rättvis belöningsutbetalning till Delegater @@ -44,8 +44,9 @@ Detta är en viktig del att förstå. Först låt oss diskutera tre mycket vikti Indexing Reward Cut - Indexing reward cut är den del av belöningarna som Indexer kommer att behålla för sig själva. Det betyder om den är inställd på 100%, som en Delegater kommer du att få 0 indexing rewards. Om du ser 80% i UI, innebär det att du som Delegater kommer att få 20%. En viktig notering - i början av nätverket kommer Indexing Rewards att utgöra majoriteten av belöningarna.
- ![Indexing Edward Cut](/img/Indexing-Edward-Cut.png) *Den översta Indexet ger Delegater 90% av belöningarna. Den - mellersta ger Delegater 20%. Den nedersta ger Delegater ~83%.* + ![Indexing Edward Cut](/img/Indexing-Edward-Cut.png) *Den översta Indexet ger +Delegater 90% av belöningarna. Den mellersta ger Delegater 20%. Den nedersta +ger Delegater ~83%.*
- Query Fee Cut - Detta fungerar precis som Indexing Reward Cut. Detta gäller dock för avkastningen på frågebetalningar som Indexer samlar in. Det bör noteras att i början av nätverket kommer avkastningen från frågebetalningar att vara mycket små jämfört med indexeringsbelöningen. Det rekommenderas att uppmärksamma nätverket för att avgöra när frågebetalningarna i nätverket kommer att börja vara mer betydande. From 8126c22ca561f947f0a075e783b3a9e9088d9fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:01 -0400 Subject: [PATCH 181/924] New translations delegating.mdx (Turkish) --- website/pages/tr/network/delegating.mdx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/pages/tr/network/delegating.mdx b/website/pages/tr/network/delegating.mdx index ba7c066ce8a2..c2f28e949987 100644 --- a/website/pages/tr/network/delegating.mdx +++ b/website/pages/tr/network/delegating.mdx @@ -33,8 +33,7 @@ Bir delegatör, stak ettiği tokenları geri almak istediğinde, tokenları 28 g Dikkate alınması gereken bir şey de akıllıca bir indeksleyici seçmektir. Güvenilir olmayan veya iyi bir iş çıkarmayan bir indeksleyici seçerseniz, stake ettiğiniz token’ları geri almak istersiniz. Bu da GRT'yi yakmak kadar kötü olabilecek olan bir durum gibidir, yani ödül kazanmak için birçok fırsatı kaybedeceğiniz anlamına gelir.
- ![Delegation unbonding](/img/Delegation-Unbonding.png) _Delegasyon Kullanıcı Arayüzündeki %0,5 ücreti ve 28 günlük - ayrılma süresini bir yere not edin._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Delegasyon Kullanıcı Arayüzündeki %0,5 ücreti ve 28 günlük ayrılma süresini bir yere not edin._
### Delegatörler İçin Adil Bir Ödül Ödemesi Olan Güvenilir Bir İndeksleyici Seçme @@ -44,8 +43,7 @@ Bu anlaşılması gereken önemli bir kısımdır. Öncelikle, Delegasyon Parame İndeksleme Ödül Kesintisi - İndeksleme ödül kesintisi, ödüllerin indeksleyicinin kendisi için tutacağı kısmıdır. Bu, %100'e ayarlanırsa, delegatörn olarak 0 indeksleme ödülü alacağınız anlamına gelir. Kullanıcı arayüzünde %80 görürseniz, bu bir delegatör olarak %20 alacağınız anlamına gelir. Önemli bir not - ağın başlangıcında, indeksleme ödülleri, ödüllerin çoğuna sahip olacaktır.
- ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *En iyi indeksleyici, delegatörlere ödüllerin %90'ını veriyor. - Ortadaki, delegatörlere %20 veriyor. Alttaki, delegatörlere ~%83 veriyor.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *En iyi indeksleyici, delegatörlere ödüllerin %90'ını veriyor. Ortadaki, delegatörlere %20 veriyor. Alttaki, delegatörlere ~%83 veriyor.*
- Sorgu Ücreti Kesintisi - Bu, tam olarak indeksleme ödül kesintisi gibi çalışır. Ancak bu, özellikle indeksleyicinin topladığı sorgu ücretlerinin getirileri içindir. Ağın başlangıcında, sorgu ücretlerinden elde edilen getirilerin, indeksleme ödülüne kıyasla çok küçük olacağı belirtilmelidir. Ağdaki sorgu ücretlerinin ne zaman daha belirgin olmaya başlayacağını belirlemek için ağa dikkat edilmesi önerilir. From 337e4210ec3bfbe0622a7148f8606ef15529193f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:02 -0400 Subject: [PATCH 182/924] New translations delegating.mdx (Ukrainian) --- website/pages/uk/network/delegating.mdx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/pages/uk/network/delegating.mdx b/website/pages/uk/network/delegating.mdx index 64584883d14b..a4fe90cf6c5a 100644 --- a/website/pages/uk/network/delegating.mdx +++ b/website/pages/uk/network/delegating.mdx @@ -33,8 +33,7 @@ title: Делегування Важливо також враховувати, що вибір індексатора має бути обґрунтованим. Якщо ви вирішите обрати індексатора, який не заслуговує на довіру або погано виконує свою роботу, ви побажаєте відмовитися від делегування, а це означає, що ви втратите багато можливостей заробити винагороду, що може бути так само погано, як і спалювання GRT.
- ![Delegation unbonding](/img/Delegation-Unbonding.png) _Зверніть увагу на комісію в розмірі 0,5% в Інтерфейсі для - делегацій, а також на 28-денний період розблокування._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Зверніть увагу на комісію в розмірі 0,5% в Інтерфейсі для делегацій, а також на 28-денний період розблокування._
### Вибір надійного індексатора зі справедливою винагородою для делегатів @@ -44,8 +43,7 @@ title: Делегування Частина винагороди за індексацію (Indexing Reward Cut) — це частина винагороди, яку індексатор залишає собі. Це означає, що якщо вона встановлена на рівні 100%, то як делегат ви отримаєте 0% за індексацію. Якщо в інтерфейсі ви бачите 80%, це означає, що як делегат ви отримаєте 20%. Важливе зауваження — на початку роботи мережі винагороди за індексацію будуть складати більшу частину доходів.
- ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Найкращий індексатор віддає делегатам 90% від суми винагороди. - Середній - 20%. Найменший індексатор дає ~83%. * + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Найкращий індексатор віддає делегатам 90% від суми винагороди. Середній - 20%. Найменший індексатор дає ~83%. *
- Частина від винагороди за запити — працює точно так само, як і за індексацію. Однак, це стосується саме повернення комісії за запити, яку отримує індексатор. Слід зазначити, що на початку роботи мережі прибуток від комісійних за запити буде дуже малий в порівнянні з винагородою за індексацію. Рекомендується стежити за мережею, щоб визначити, коли комісія за запити в мережі почне бути більш значущою. From 68529089b2124225936087a649efa10101999e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:03 -0400 Subject: [PATCH 183/924] New translations delegating.mdx (Chinese Simplified) --- website/pages/zh/network/delegating.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/zh/network/delegating.mdx b/website/pages/zh/network/delegating.mdx index 9a0d6888d54c..09208995ad22 100644 --- a/website/pages/zh/network/delegating.mdx +++ b/website/pages/zh/network/delegating.mdx @@ -32,7 +32,9 @@ title: 委托 还需要考虑的一件事是明智地选择索引人。 如果您选择了一个不值得信赖的 索引人,或者没有做好工作,您将想要取消委托,这意味着您将失去很多获得奖励的机会,这可能与耗费 GRT 一样糟糕。 -
请注意委托用户界面中的0.5%费用,以及28天的解约期。
+
+ 请注意委托用户界面中的0.5%费用,以及28天的解约期。 +
### 选择一个为委托人提供公平的奖励分配的值得信赖的索引人 @@ -41,8 +43,7 @@ title: 委托 索引奖励分成- 索引奖励分成是指索引人将为自己保留的那部分奖励。 这意味着,如果它被设置为 100%,作为一个委托人,你将获得 0 个索引奖励。 如果你在 UI 中看到 80%,这意味着作为委托人,你将获得 20%。 一个重要的说明 -在网络的初期,索引奖励将占奖励的大部分比重。
- ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *上 面的索引人分给委托人 90% 的收益。 中间的给委托人 20%。 - 下面的给委托人约 83%。 + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *上 面的索引人分给委托人 90% 的收益。 中间的给委托人 20%。 下面的给委托人约 83%。
- 查询费分成-这与索引奖励分成的运作方式完全相同。 不过,这是专门针对索引人收取的查询费的回报。 需要注意的是,在网络初期,查询费的回报与索引奖励相比会非常小。 建议关注网络来确定网络中的查询费何时开始变的比较可观。 From 088b163aee0c590a7b2398b92f1f2780704422a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:04 -0400 Subject: [PATCH 184/924] New translations delegating.mdx (Urdu (Pakistan)) --- website/pages/ur/network/delegating.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/website/pages/ur/network/delegating.mdx b/website/pages/ur/network/delegating.mdx index 2e274a6d8aab..a9df7189a9ae 100644 --- a/website/pages/ur/network/delegating.mdx +++ b/website/pages/ur/network/delegating.mdx @@ -33,8 +33,8 @@ title: ڈیلیگیٹنگ غور کرنے کی ایک چیز یہ ہے کہ انڈیکسر کا انتخاب دانشمندی سے کریں۔اگر آپ انڈیکسر کا انتخاب کرتے ہیں جو قابل اعتماد نہیں تھا،یا اچھا کام نہیں کر رہا،آپ غیر منتخب کرنا چاہیں گے،جس کا مطلب ہے آپ انعامات حاصل کرنے کے بہت سے مواقع کھو رہے ہوں گے،جو GRT کو جلانے جیسا ہی برا ہو سکتا ہے.
- [ڈیلیگیشن ان بانڈنگ](/img/Delegation-Unbonding.png) _ڈیلیگیشن UI میں 0.5% فیس نوٹ کریں، ساتھ ہی 28 دن غیر بندھن کی - مدت۔_ + [ڈیلیگیشن ان بانڈنگ](/img/Delegation-Unbonding.png) _ڈیلیگیشن UI میں 0.5% فیس نوٹ کریں، ساتھ ہی 28 دن + غیر بندھن کی مدت۔_
### ڈیلیگیٹرز کے لیے منصفانہ انعامی ادائیگی کے ساتھ ایک قابل اعتماد انڈیکسر کا انتخاب کرنا @@ -44,8 +44,7 @@ title: ڈیلیگیٹنگ انڈیکسنگ ریوارڈ کٹ - انڈیکسنگ ریوارڈ کٹ انعامات کا وہ حصہ ہے جو انڈیکسر اپنے لیے رکھے گا۔ اس کا مطلب ہے کہ اگر یہ 100% پر سیٹ ہے، بطور ڈیلیگیٹر آپ کو 0 انڈیکسنگ کےانعامات ملیں گے۔ اگر آپ UI میں 80٪ دیکھتے ہیں،اس کا مطلب ہے کہ بطور ڈیلیگیٹر، آپ کو 20% ملے گا۔ ایک اہم نوٹ - نیٹ ورک کے آغاز میں، انڈیکسنگ انعامات کی اکثریت کا حصہ ہوں گے.
- ![انڈیکسنگ ریوارڈ کٹ](/img/Indexing-Reward-Cut.png) *سب سے اوپر انڈیکسر ڈیلیگیٹرز کو 90% انعامات دے رہا ہے. درمیان - والا ڈیلیگیٹرز کو 20% دے رہا ہے۔ نیچے والا ڈیلیگیٹرز کو ~83% دے رہا ہے۔* + ![انڈیکسنگ ریوارڈ کٹ](/img/Indexing-Reward-Cut.png) *سب سے اوپر انڈیکسر ڈیلیگیٹرز کو 90% انعامات دے رہا ہے. درمیان والا ڈیلیگیٹرز کو 20% دے رہا ہے۔ نیچے والا ڈیلیگیٹرز کو ~83% دے رہا ہے۔*
- کیوری فیس کٹوتی - یہ بلکل انڈیکسنگ ریوارڈ کٹ کی طرح کام کرتا ہے. البتہ، یہ خاص طور پر انڈیکسر جمع کردہ کیوری کی فیس پر واپسی کے لیے ہے۔ واضح رہے کہ نیٹ ورک کے آغاز پر، کیوری فیس سے واپسی انڈیکسنگ کے انعامات کے مقابلے میں بہت کم ہوگی۔ اس بات کا تعین کرنے کے لیے نیٹ ورک پر توجہ دینے کی سفارش کی جاتی ہے کہ نیٹ ورک میں کیوری کی فیس کب زیادہ اہم ہونا شروع ہو گی. From e9866e071ef0acf7e468badab00237adfbbb071d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:06 -0400 Subject: [PATCH 185/924] New translations delegating.mdx (Marathi) --- website/pages/mr/network/delegating.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/mr/network/delegating.mdx b/website/pages/mr/network/delegating.mdx index 74e6bf0d8e10..4370f27cb5c4 100644 --- a/website/pages/mr/network/delegating.mdx +++ b/website/pages/mr/network/delegating.mdx @@ -34,7 +34,7 @@ Listed below are the main risks of being a Delegator in the protocol.
![प्रतिनिधी अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलिगेशन UI मध्ये 0.5% शुल्क तसेच २८ दिवसांची नोंद घ्या - अनबॉन्डिंग कालावधी._ + अनबॉन्डिंग कालावधी._
### Choosing a trustworthy Indexer with a fair reward payout for Delegators @@ -44,8 +44,8 @@ Listed below are the main risks of being a Delegator in the protocol. इंडेक्सिंग रिवॉर्ड कट - इंडेक्सिंग रिवॉर्ड कट हा रिवॉर्डचा भाग आहे जो इंडेक्सर स्वतःसाठी ठेवतो. याचा अर्थ 100% वर सेट केल्यास, प्रतिनिधी म्हणून तुम्हाला 0 इंडेक्सिंग रिवॉर्ड मिळतील. तुम्हाला UI मध्ये 80% दिसल्यास, याचा अर्थ प्रतिनिधी म्हणून, तुम्हाला 20% मिळेल. एक महत्त्वाची टीप - नेटवर्कच्या सुरूवातीस, बहुसंख्य पुरस्कारांसाठी अनुक्रमणिका रिवॉर्ड्स असतील.
- ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *टॉप इंडेक्सर प्रतिनिधींना 90% बक्षिसे देत आहे. द मधला - प्रतिनिधी 20% देत आहे. सर्वात खालचा भाग प्रतिनिधींना ~83% देत आहे.* + ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *टॉप इंडेक्सर प्रतिनिधींना 90% बक्षिसे देत आहे. द + मधला प्रतिनिधी 20% देत आहे. सर्वात खालचा भाग प्रतिनिधींना ~83% देत आहे.*
- क्वेरी फी कट - हे इंडेक्सिंग रिवॉर्ड कट प्रमाणेच कार्य करते. तथापि, हे विशेषत: इंडेक्सर गोळा केलेल्या क्वेरी शुल्कावरील परताव्यासाठी आहे. हे लक्षात घेतले पाहिजे की नेटवर्कच्या सुरूवातीस, अनुक्रमणिकेच्या रिवॉर्डच्या तुलनेत क्वेरी फीमधून मिळणारे रिटर्न खूपच कमी असेल. नेटवर्कमधील क्वेरी शुल्क अधिक लक्षणीय केव्हा सुरू होईल हे निर्धारित करण्यासाठी नेटवर्ककडे लक्ष देण्याची शिफारस केली जाते. From 58a2552bf1a47adf8d40623511dbc33997777735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:07 -0400 Subject: [PATCH 186/924] New translations delegating.mdx (Hindi) --- website/pages/hi/network/delegating.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/hi/network/delegating.mdx b/website/pages/hi/network/delegating.mdx index b66e0e9e4ce2..3ced69566ba6 100644 --- a/website/pages/hi/network/delegating.mdx +++ b/website/pages/hi/network/delegating.mdx @@ -33,8 +33,8 @@ title: Delegating एक बात पर भी विचार करना चाहिए कि एक इंडेक्सर को बुद्धिमानी से चुनना है। यदि आप एक ऐसे इंडेक्सर को चुनते हैं जो भरोसेमंद नहीं था, या अच्छा काम नहीं कर रहा था, तो आप अनाधिकृत करना चाहेंगे, जिसका अर्थ है कि आप पुरस्कार अर्जित करने के बहुत सारे अवसर खो देंगे, जो जीआरटी जलाने जितना ही बुरा हो सकता है।
- ![डेलिगेशन अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलीगेशन UI में 0.5% शुल्क और साथ ही 28 दिन पर ध्यान दें बंधन - अवधि._ + ![डेलिगेशन अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलीगेशन UI में 0.5% शुल्क और साथ ही 28 दिन पर ध्यान दें + बंधन अवधि._
### डेलीगेटर्स के लिए उचित इनाम भुगतान के साथ एक भरोसेमंद इंडेक्सर चुनना @@ -44,8 +44,8 @@ title: Delegating इंडेक्सिंग रिवार्ड कट - इंडेक्सिंग रिवार्ड कट उन रिवॉर्ड्स का हिस्सा है जो इंडेक्सर अपने लिए रखेंगे। इसका मतलब है कि अगर इसे 100% पर सेट किया जाता है, तो डेलिगेटर के तौर पर आपको 0 इंडेक्सिंग रिवॉर्ड्स मिलेंगे। यदि आप यूआई में 80% देखते हैं, तो इसका मतलब है कि एक प्रतिनिधि के रूप में, आपको 20% प्राप्त होगा। एक महत्वपूर्ण नोट - नेटवर्क की शुरुआत में, इंडेक्सिंग रिवार्ड्स अधिकांश पुरस्कारों के लिए जिम्मेदार होंगे।
- ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *शीर्ष इंडेक्सर डेलीगेटर्स को पुरस्कारों का 90% दे रहा है। बीच - वाला प्रतिनिधि को 20% दे रहा है। नीचे वाला डेलिगेटरों को ~83% दे रहा है।* + ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *शीर्ष इंडेक्सर डेलीगेटर्स को पुरस्कारों का 90% दे रहा है। + बीच वाला प्रतिनिधि को 20% दे रहा है। नीचे वाला डेलिगेटरों को ~83% दे रहा है।*
- प्रश्न शुल्क कट - यह बिल्कुल इंडेक्सिंग रिवार्ड कट की तरह काम करता है। हालाँकि, यह विशेष रूप से इंडेक्सर द्वारा एकत्र की जाने वाली क्वेरी फीस पर रिटर्न के लिए है। यह ध्यान दिया जाना चाहिए कि नेटवर्क की शुरुआत में, इंडेक्सिंग रिवार्ड की तुलना में क्वेरी फीस से रिटर्न बहुत कम होगा। यह निर्धारित करने के लिए नेटवर्क पर ध्यान देने की सिफारिश की जाती है कि नेटवर्क में क्वेरी शुल्क कब अधिक महत्वपूर्ण होने लगेगा। From 1cd047943d117966db82a986d05d3bad4132bff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:09 -0400 Subject: [PATCH 187/924] New translations explorer.mdx (French) --- website/pages/fr/network/explorer.mdx | 162 +++++++++++++------------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/website/pages/fr/network/explorer.mdx b/website/pages/fr/network/explorer.mdx index 7d9abbc8eb3e..0a627fc28c1a 100644 --- a/website/pages/fr/network/explorer.mdx +++ b/website/pages/fr/network/explorer.mdx @@ -25,7 +25,7 @@ Sur la page dédiée à chaque subgraph, plusieurs détails font surface. Il s'a - Test subgraphs in the playground - Afficher les indexeurs qui indexent sur un certain subgraph - Statistiques du subgraph (allocations, conservateurs, etc.) -- View the entity who published the subgraph +- Afficher l'entité qui a publié le subgraph ![Explorer Image 3](/img/Explorer-Signal-Unsignal.png) @@ -33,171 +33,171 @@ Sur la page dédiée à chaque subgraph, plusieurs détails font surface. Il s'a Within this tab, you’ll get a bird’s eye view of all the people that are participating in the network activities, such as Indexers, Delegators, and Curators. Below, we’ll go into an in-depth review of what each tab means for you. -### 1. Indexers +### 1. Indexeurs ![Explorer Image 4](/img/Indexer-Pane.png) -Let’s start with the Indexers. Indexers are the backbone of the protocol, being the ones that stake on subgraphs, index them, and serve queries to anyone consuming subgraphs. In the Indexers table, you’ll be able to see an Indexers’ delegation parameters, their stake, how much they have staked to each subgraph, and how much revenue they have made off of query fees and indexing rewards. Deep dives below: +Commençons par les indexeurs. Les indexeurs sont l'épine dorsale du protocole, étant ceux qui misent sur les subgraphs, les indexent et envoient des requêtes à toute personne consommant des subgraphs. Dans le tableau Indexeurs, vous pourrez voir les paramètres de délégation d'un indexeur, sa participation, le montant qu'ils ont misé sur chaque subgraph et le montant des revenus qu'ils ont tirés des frais de requête et des récompenses d'indexation. Analyses approfondies ci-dessous : -- Query Fee Cut - the % of the query fee rebates that the Indexer keeps when splitting with Delegators -- Effective Reward Cut - the indexing reward cut applied to the delegation pool. If it’s negative, it means that the Indexer is giving away part of their rewards. If it’s positive, it means that the Indexer is keeping some of their rewards -- Cooldown Remaining - the time remaining until the Indexer can change the above delegation parameters. Cooldown periods are set up by Indexers when they update their delegation parameters -- Owned - This is the Indexer’s deposited stake, which may be slashed for malicious or incorrect behavior -- Delegated - Stake from Delegators which can be allocated by the Indexer, but cannot be slashed -- Allocated - Stake that Indexers are actively allocating towards the subgraphs they are indexing -- Available Delegation Capacity - the amount of delegated stake the Indexers can still receive before they become over-delegated -- Max Delegation Capacity - the maximum amount of delegated stake the Indexer can productively accept. An excess delegated stake cannot be used for allocations or rewards calculations. -- Query Fees - this is the total fees that end users have paid for queries from an Indexer over all time -- Indexer Rewards - this is the total indexer rewards earned by the Indexer and their Delegators over all time. Indexer rewards are paid through GRT issuance. +- Query Fee Cut - le pourcentage des remises sur les frais de requête que l'indexeur conserve lorsqu'il les partage avec les délégués +- Réduction de récompense effective - la réduction de récompense d'indexation appliquée au pool de délégation. S’il est négatif, cela signifie que l’indexeur distribue une partie de ses récompenses. S'il est positif, cela signifie que l'indexeur conserve une partie de ses récompenses +- Cooldown Remaining : temps restant jusqu'à ce que l'indexeur puisse modifier les paramètres de délégation ci-dessus. Des périodes de refroidissement sont définies par les indexeurs lorsqu'ils mettent à jour leurs paramètres de délégation +- Propriété : il s'agit de la participation déposée par l'indexeur, qui peut être réduite en cas de comportement malveillant ou incorrect +- Délégué - Participation des délégués qui peut être allouée par l'indexeur, mais ne peut pas être réduite +- Alloué - Participation que les indexeurs allouent activement aux subgraphs qu'ils indexent +- Capacité de délégation disponible - le montant de la participation déléguée que les indexeurs peuvent encore recevoir avant qu'ils ne soient surdélégués +- Capacité de délégation maximale : montant maximum de participation déléguée que l'indexeur peut accepter de manière productive. Une mise déléguée excédentaire ne peut pas être utilisée pour le calcul des allocations ou des récompenses. +- Frais de requête - il s'agit du total des frais que les utilisateurs finaux ont payés pour les requêtes d'un indexeur pendant toute la durée de l'indexation +- Récompenses de l'indexeur - il s'agit du total des récompenses de l'indexeur gagnées par l'indexeur et ses délégués sur toute la durée. Les récompenses des indexeurs sont payées par l'émission de GRT. -Indexers can earn both query fees and indexing rewards. Functionally, this happens when network participants delegate GRT to an Indexer. This enables Indexers to receive query fees and rewards depending on their Indexer parameters. Indexing parameters are set by clicking on the right-hand side of the table, or by going into an Indexer’s profile and clicking the “Delegate” button. +Les indexeurs peuvent gagner à la fois des frais de requête et des récompenses d'indexation. Fonctionnellement, cela se produit lorsque les participants au réseau délèguent GRT à un indexeur. Cela permet aux indexeurs de recevoir des frais de requête et des récompenses en fonction de leurs paramètres d'indexeur. Les paramètres d'indexation sont définis en cliquant sur le côté droit du tableau, ou en accédant au profil d'un indexeur et en cliquant sur le bouton « Délégué ». -To learn more about how to become an Indexer, you can take a look at the [official documentation](/network/indexing) or [The Graph Academy Indexer guides.](https://thegraph.academy/delegators/choosing-indexers/) +Pour en savoir plus sur la façon de devenir un indexeur, vous pouvez consulter la [documentation officielle](/network/indexing) ou les [guides de l'indexeur de la Graph Academy.](https://thegraph.academy/delegators/choosing-indexers/) -![Indexing details pane](/img/Indexing-Details-Pane.png) +![Volet Détails de l'indexation](/img/Indexing-Details-Pane.png) ### 2. Curators -Curators analyze subgraphs to identify which subgraphs are of the highest quality. Once a Curator has found a potentially attractive subgraph, they can curate it by signaling on its bonding curve. In doing so, Curators let Indexers know which subgraphs are high quality and should be indexed. +Les curateurs analysent les subgraphs afin d'identifier ceux qui sont de la plus haute qualité. Une fois qu'un curateur a trouvé un subgraph potentiellement intéressant, il peut le curer en signalant sa courbe de liaison. Ce faisant, les curateurs indiquent aux indexeurs quels sont les subgraphs de haute qualité qui devraient être indexés. Curators can be community members, data consumers, or even subgraph developers who signal on their own subgraphs by depositing GRT tokens into a bonding curve. By depositing GRT, Curators mint curation shares of a subgraph. As a result, Curators are eligible to earn a portion of the query fees that the subgraph they have signaled on generates. The bonding curve incentivizes Curators to curate the highest quality data sources. The Curator table in this section will allow you to see: - The date the Curator started curating - The number of GRT that was deposited -- The number of shares a Curator owns +- Nombre d'actions détenues par un curateur ![Explorer Image 6](/img/Curation-Overview.png) If you want to learn more about the Curator role, you can do so by visiting the following links of [The Graph Academy](https://thegraph.academy/curators/) or [official documentation.](/network/curating) -### 3. Delegators +### 3. Délégués -Delegators play a key role in maintaining the security and decentralization of The Graph Network. They participate in the network by delegating (i.e., “staking”) GRT tokens to one or multiple indexers. Without Delegators, Indexers are less likely to earn significant rewards and fees. Therefore, Indexers seek to attract Delegators by offering them a portion of the indexing rewards and query fees that they earn. +Les délégués jouent un rôle clé dans le maintien de la sécurité et de la décentralisation de The Graph Network. Ils participent au réseau en déléguant (c'est-à-dire en « jalonnant ») des jetons GRT à un ou plusieurs indexeurs. Sans délégués, les indexeurs sont moins susceptibles de gagner des récompenses et des frais importants. Par conséquent, les indexeurs cherchent à attirer les délégants en leur offrant une partie des récompenses d'indexation et des frais de requête qu'ils gagnent. -Delegators, in turn, select Indexers based on a number of different variables, such as past performance, indexing reward rates, and query fee cuts. Reputation within the community can also play a factor in this! It’s recommended to connect with the indexers selected via [The Graph’s Discord](https://discord.gg/graphprotocol) or [The Graph Forum](https://forum.thegraph.com/)! +Les délégués, quant à eux, sélectionnent les indexeurs sur la base d'un certain nombre de variables différentes, telles que les performances passées, les taux de récompense de l'indexation et les réductions des frais d'interrogation. La réputation au sein de la communauté peut également jouer un rôle à cet égard ! Il est recommandé d'entrer en contact avec les indexeurs sélectionnés via le [Discord du Graph](https://discord.gg/graphprotocol) ou le [Forum du Graph](https://forum.thegraph.com/) ! ![Explorer Image 7](/img/Delegation-Overview.png) -The Delegators table will allow you to see the active Delegators in the community, as well as metrics such as: +Le tableau des délégués vous permet de voir les délégués actifs dans la communauté, ainsi que des indicateurs tels que : -- The number of Indexers a Delegator is delegating towards -- A Delegator’s original delegation -- The rewards they have accumulated but have not withdrawn from the protocol -- The realized rewards they withdrew from the protocol +- Le nombre d’indexeurs auxquels un délégant délègue +- Délégation originale d’un délégant +- Les récompenses qu'ils ont accumulées mais qu'ils n'ont pas retirées du protocole +- Les récompenses obtenues qu'ils ont retirées du protocole - Total amount of GRT they have currently in the protocol - The date they last delegated at -If you want to learn more about how to become a Delegator, look no further! All you have to do is to head over to the [official documentation](/network/delegating) or [The Graph Academy](https://docs.thegraph.academy/official-docs/delegator/choosing-indexers). +Si vous voulez en savoir plus sur la façon de devenir un délégué, ne cherchez plus ! Il vous suffit de consulter la [documentation officielle](/network/delegating) ou [The Graph Academy](https://docs.thegraph.academy/official-docs/delegator/choosing-indexers). -## Network +## Réseau -In the Network section, you will see global KPIs as well as the ability to switch to a per-epoch basis and analyze network metrics in more detail. These details will give you a sense of how the network is performing over time. +Dans la section Réseau, vous verrez des indicateurs globaux ainsi que la possibilité de passer à une base par écho et d'analyser les paramètres du réseau de manière plus détaillée. Ces détails vous donneront une idée des performances du réseau au fil du temps. -### Activity +### Activité -The activity section has all the current network metrics as well as some cumulative metrics over time. Here you can see things like: +La section "Activité" contient toutes les mesures actuelles du réseau ainsi que des mesures cumulées dans le temps. Vous pouvez y voir des éléments tels que : -- The current total network stake -- The stake split between the Indexers and their Delegators -- Total supply, minted, and burned GRT since the network inception -- Total Indexing rewards since the inception of the protocol -- Protocol parameters such as curation reward, inflation rate, and more -- Current epoch rewards and fees +- L’enjeu total actuel du réseau +- La répartition des enjeux entre les indexeurs et leurs délégués +- Approvisionnement total, GRT frappés et brûlés depuis la création du réseau +- Récompenses totales de l'indexation depuis la création du protocole +- Paramètres du protocole tels que la récompense de la curation, le taux d'inflation, etc +- Récompenses et frais de l'époque actuelle -A few key details that are worth mentioning: +Quelques détails clés qui méritent d'être mentionnés : -- **Query fees represent the fees generated by the consumers**, and they can be claimed (or not) by the Indexers after a period of at least 7 epochs (see below) after their allocations towards the subgraphs have been closed and the data they served has been validated by the consumers. -- **Indexing rewards represent the amount of rewards the Indexers claimed from the network issuance during the epoch.** Although the protocol issuance is fixed, the rewards only get minted once the Indexers close their allocations towards the subgraphs they’ve been indexing. Thus the per-epoch number of rewards varies (ie. during some epochs, Indexers might’ve collectively closed allocations that have been open for many days). +- Les **Frais de requête représentent les frais générés par les consommateurs**, et ils peuvent être réclamés (ou non) par les indexeurs après une période d'au moins 7 époques (voir ci-dessous) après la clôture de leurs allocations vers les subgraphs. et les données qu'ils ont servies ont été validées par les consommateurs. +- **Les récompenses d'indexation représentent le montant des récompenses que les indexeurs ont réclamé à l'émission du réseau au cours de l'époque.** Bien que l'émission du protocole soit fixe, les récompenses ne sont frappées qu'une fois que les indexeurs ont clôturé leurs allocations vers les subgraphs qu'ils ont indexés. Ainsi, le nombre de récompenses par époque varie (par exemple, au cours de certaines époques, les indexeurs peuvent avoir fermé collectivement des allocations qui étaient ouvertes depuis plusieurs jours). ![Explorer Image 8](/img/Network-Stats.png) -### Epochs +### Époques -In the Epochs section, you can analyze on a per-epoch basis, metrics such as: +Dans la section Époques, vous pouvez analyser, époque par époque, des métriques telles que : -- Epoch start or end block -- Query fees generated and indexing rewards collected during a specific epoch -- Epoch status, which refers to the query fee collection and distribution and can have different states: - - The active epoch is the one in which Indexers are currently allocating stake and collecting query fees +- Bloc de début ou de fin d'époque +- Frais de requête générés et récompenses d'indexation collectées au cours d'une époque spécifique +- Le statut de l'époque, qui fait référence à la collecte et à la distribution de la redevance d'interrogation, peut présenter différents états : + - L'époque active est celle où les indexeurs sont en train d'allouer des enjeux et de collecter des frais de requête - The settling epochs are the ones in which the state channels are being settled. This means that the Indexers are subject to slashing if the consumers open disputes against them. - - The distributing epochs are the epochs in which the state channels for the epochs are being settled and Indexers can claim their query fee rebates. - - The finalized epochs are the epochs that have no query fee rebates left to claim by the Indexers, thus being finalized. + - Les époques de distribution sont les époques au cours desquelles les canaux d'État pour les époques sont réglés et les indexeurs peuvent réclamer leurs remises sur les frais de requête. + - Les époques finalisées sont les époques pour lesquelles il ne reste plus aucune remise sur les frais de requête à réclamer par les indexeurs, et sont donc finalisées. ![Explorer Image 9](/img/Epoch-Stats.png) -## Your User Profile +## Votre profil d'utilisateur -Now that we’ve talked about the network stats, let’s move on to your personal profile. Your personal profile is the place for you to see your network activity, no matter how you’re participating on the network. Your crypto wallet will act as your user profile, and with the User Dashboard, you’ll be able to see: +Maintenant que nous avons parlé des statistiques du réseau, passons à votre profil personnel. Votre profil personnel vous permet de voir votre activité sur le réseau, quelle que soit la manière dont vous participez au réseau. Votre portefeuille crypto fera office de profil utilisateur, et avec le tableau de bord utilisateur, vous pourrez voir : -### Profile Overview +### Aperçu du profil -This is where you can see any current actions you took. This is also where you can find your profile information, description, and website (if you added one). +C'est ici que vous pouvez voir toutes les actions en cours que vous avez entreprises. Vous y trouverez également les informations relatives à votre profil, votre description et votre site web (si vous en avez ajouté un). ![Explorer Image 10](/img/Profile-Overview.png) ### Subgraphs Tab -If you click into the Subgraphs tab, you’ll see your published subgraphs. This will not include any subgraphs deployed with the CLI for testing purposes – subgraphs will only show up when they are published to the decentralized network. +Si vous cliquez sur l'onglet Subgraphs, vous verrez vos subgraphs publiés. Cela n'inclut pas les subgraphs déployés avec l'interface de programmation à des fins de test - les subgraphs ne s'affichent que lorsqu'ils sont publiés sur le réseau décentralisé. ![Explorer Image 11](/img/Subgraphs-Overview.png) -### Indexing Tab +### Onglet Indexation -If you click into the Indexing tab, you’ll find a table with all the active and historical allocations towards the subgraphs, as well as charts that you can analyze and see your past performance as an Indexer. +Si vous cliquez sur l'onglet Indexation, vous trouverez un tableau avec toutes les allocations actives et historiques vers les subgraphs, ainsi que des graphs que vous pouvez analyser et voir vos performances passées en tant qu'indexeur. -This section will also include details about your net Indexer rewards and net query fees. You’ll see the following metrics: +Cette section comprendra également des détails sur vos récompenses nettes d'indexeur et vos frais de requête nets. Vous verrez les métriques suivantes : -- Delegated Stake - the stake from Delegators that can be allocated by you but cannot be slashed -- Total Query Fees - the total fees that users have paid for queries served by you over time +- Participation déléguée - la participation des délégués qui peut être allouée par vous mais ne peut pas être réduite +- Total des frais de requête - le total des frais payés par les utilisateurs pour les requêtes que vous leur avez adressées au fil du temps - Indexer Rewards - the total amount of Indexer rewards you have received, in GRT -- Fee Cut - the % of query fee rebates that you will keep when you split with Delegators +- Réduction des frais : % de remise sur les frais de requête que vous conserverez lors de votre séparation avec les délégués - Rewards Cut - the % of Indexer rewards that you will keep when splitting with Delegators -- Owned - your deposited stake, which could be slashed for malicious or incorrect behavior +- Possédé : votre mise déposée, qui pourrait être réduite en cas de comportement malveillant ou incorrect ![Explorer Image 12](/img/Indexer-Stats.png) -### Delegating Tab +### Onglet Délégation -Delegators are important to the Graph Network. A Delegator must use their knowledge to choose an Indexer that will provide a healthy return on rewards. Here you can find details of your active and historical delegations, along with the metrics of the Indexers that you delegated towards. +Les délégués sont importants pour le Graph Network. Un délégant doit utiliser ses connaissances pour choisir un indexeur qui fournira un bon retour sur récompenses. Vous trouverez ici les détails de vos délégations actives et historiques, ainsi que les mesures des indexeurs vers lesquels vous avez délégué. -In the first half of the page, you can see your delegation chart, as well as the rewards-only chart. To the left, you can see the KPIs that reflect your current delegation metrics. +Dans la première moitié de la page, vous pouvez voir votre diagramme de délégation, ainsi que le diagramme des récompenses uniquement. À gauche, vous pouvez voir les indicateurs clés de performance qui reflètent vos paramètres de délégation actuels. -The Delegator metrics you’ll see here in this tab include: +Les métriques du délégué que vous verrez ici dans cet onglet incluent : -- Total delegation rewards -- Total unrealized rewards -- Total realized rewards +- Récompenses totales de la délégation +- Récompenses totales non réalisées +- Récompenses totales réalisées -In the second half of the page, you have the delegations table. Here you can see the Indexers that you delegated towards, as well as their details (such as rewards cuts, cooldown, etc). +Dans la seconde moitié de la page, vous avez le tableau des délégations. Ici, vous pouvez voir les indexeurs auxquels vous avez délégué, ainsi que leurs détails (tels que les réductions de récompenses, le temps de recharge, etc.). -With the buttons on the right side of the table, you can manage your delegation - delegate more, undelegate, or withdraw your delegation after the thawing period. +Les boutons situés à droite du tableau vous permettent de gérer votre délégation - déléguer davantage, dé-déléguer ou retirer votre délégation après la période de dégel. -Keep in mind that this chart is horizontally scrollable, so if you scroll all the way to the right, you can also see the status of your delegation (delegating, undelegating, withdrawable). +Gardez à l'esprit que ce graph peut être parcouru horizontalement, donc si vous le faites défiler jusqu'à la droite, vous pouvez également voir le statut de votre délégation (en cours de délégation, non-déléguée, en cours de retrait). ![Explorer Image 13](/img/Delegation-Stats.png) -### Curating Tab +### Onglet Conservation -In the Curation tab, you’ll find all the subgraphs you’re signaling on (thus enabling you to receive query fees). Signaling allows Curators to highlight to Indexers which subgraphs are valuable and trustworthy, thus signaling that they need to be indexed on. +Dans l'onglet Curation, vous trouverez tous les subgraphs vous signalez (vous permettant ainsi de recevoir des frais de requête). La signalisation permet aux conservateurs de mettre en évidence aux indexeurs quels subgraphs sont précieux et dignes de confiance, signalant ainsi qu'ils doivent être indexés. -Within this tab, you’ll find an overview of: +Dans cet onglet, vous trouverez un aperçu de : -- All the subgraphs you're curating on with signal details -- Share totals per subgraph -- Query rewards per subgraph -- Updated at date details +- Tous les subgraphs sur lesquels vous êtes en train de curer avec les détails du signal +- Partager les totaux par subgraph +- Récompenses de requête par subraph +- Détails mis à jour ![Explorer Image 14](/img/Curation-Stats.png) -## Your Profile Settings +## Paramètres de votre profil -Within your user profile, you’ll be able to manage your personal profile details (like setting up an ENS name). If you’re an Indexer, you have even more access to settings at your fingertips. In your user profile, you’ll be able to set up your delegation parameters and operators. +Dans votre profil utilisateur, vous pourrez gérer les détails de votre profil personnel (comme la configuration d'un nom ENS). Si vous êtes un indexeur, vous avez encore plus accès aux paramètres à portée de main. Dans votre profil utilisateur, vous pourrez configurer vos paramètres et opérateurs de délégation. -- Operators take limited actions in the protocol on the Indexer's behalf, such as opening and closing allocations. Operators are typically other Ethereum addresses, separate from their staking wallet, with gated access to the network that Indexers can personally set +- Les opérateurs effectuent des actions limitées dans le protocole au nom de l'indexeur, telles que l'ouverture et la clôture des allocations. Les opérateurs sont généralement d'autres adresses Ethereum, distinctes de leur portefeuille de jalonnement, avec un accès sécurisé au réseau que les indexeurs peuvent définir personnellement - Delegation parameters allow you to control the distribution of GRT between you and your Delegators. ![Explorer Image 15](/img/Profile-Settings.png) -As your official portal into the world of decentralized data, The Graph Explorer allows you to take a variety of actions, no matter your role in the network. You can get to your profile settings by opening the dropdown menu next to your address, then clicking on the Settings button. +En tant que portail officiel vers le monde des données décentralisées, The Graph Explorer vous permet d'effectuer diverses actions, quel que soit votre rôle dans le réseau. Vous pouvez accéder aux paramètres de votre profil en ouvrant le menu déroulant situé à côté de votre adresse, puis en cliquant sur le bouton Paramètres.
![Wallet details](/img/Wallet-Details.png)
From d22ad46cf56683dbb7619d1ea836e1915843b708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:12 -0400 Subject: [PATCH 188/924] New translations explorer.mdx (Czech) --- website/pages/cs/network/explorer.mdx | 230 +++++++++++++------------- 1 file changed, 115 insertions(+), 115 deletions(-) diff --git a/website/pages/cs/network/explorer.mdx b/website/pages/cs/network/explorer.mdx index b3a549900b83..92a6940cfe8c 100644 --- a/website/pages/cs/network/explorer.mdx +++ b/website/pages/cs/network/explorer.mdx @@ -1,193 +1,193 @@ --- -title: Graph Explorer +title: Průzkumník grafů --- -Welcome to the Graph Explorer, or as we like to call it, your decentralized portal into the world of subgraphs and network data. 👩🏽‍🚀 The Graph Explorer consists of multiple parts where you can interact with other subgraph developers, dapp developers, Curators, Indexers, and Delegators. For a general overview of the Graph Explorer, check out the video below (or keep reading below): +Vítejte v Průzkumníku grafů, nebo jak mu rádi říkáme, ve vašem decentralizovaném portálu do světa podgrafů a síťových dat. 👩🏽‍🚀 Průzkumník grafů se skládá z několika částí, ve kterých můžete komunikovat s ostatními vývojáři subgrafů, vývojáři dapp, kurátory, indexátory a delegátory. Pro obecný přehled o průzkumník grafů se podívejte na video níže (nebo pokračujte ve čtení níže): -## Subgraphs +## Podgrafy -First things first, if you just finished deploying and publishing your subgraph in the Subgraph Studio, the Subgraphs tab on the top of the navigation bar is the place to view your own finished subgraphs (and the subgraphs of others) on the decentralized network. Here, you’ll be able to find the exact subgraph you’re looking for based on the date created, signal amount, or name. +Nejdříve, pokud jste právě dokončili nasazení a publikování podgrafu ve Studio podgrafu, je karta podgrafy v horní části navigačního panelu místem pro zobrazení vlastních dokončených podgrafů (a podgrafů ostatních) v decentralizované síti. Zde budete moci najít přesně ten podgraf, který hledáte, na základě data vytvoření, množství signálu nebo názvu. -![Explorer Image 1](/img/Subgraphs-Explorer-Landing.png) +![Obrázek průzkumníka 1](/img/Subgraphs-Explorer-Landing.png) -When you click into a subgraph, you’ll be able to test queries in the playground and be able to leverage network details to make informed decisions. You’ll also be able to signal GRT on your own subgraph or the subgraphs of others to make indexers aware of its importance and quality. This is critical because signaling on a subgraph incentivizes it to be indexed, which means that it’ll surface on the network to eventually serve queries. +Po kliknutí do podgrafu budete moci testovat dotazy na hřišti a využívat podrobnosti o síti k přijímání informovaných rozhodnutí. Budete také moci signalizovat GRT na svém vlastním podgrafu nebo podgrafech ostatních, aby si indexátory uvědomily jeho důležitost a kvalitu. To je velmi důležité, protože signalizace na podgrafu motivuje k jeho indexaci, což znamená, že se v síti objeví a nakonec bude sloužit dotazům. -![Explorer Image 2](/img/Subgraph-Details.png) +![Obrázek průzkumníka 2](/img/Subgraph-Details.png) -On each subgraph’s dedicated page, several details are surfaced. These include: +Na stránce věnované každému podgrafu se objeví několik podrobností. Patří mezi ně: -- Signal/Un-signal on subgraphs -- View more details such as charts, current deployment ID, and other metadata -- Switch versions to explore past iterations of the subgraph -- Query subgraphs via GraphQL -- Test subgraphs in the playground -- View the Indexers that are indexing on a certain subgraph -- Subgraph stats (allocations, Curators, etc) -- View the entity who published the subgraph +- Signál/nesignál na podgraf +- Zobrazit další podrobnosti, například grafy, ID aktuálního nasazení a další metadata +- Přepínání verzí pro zkoumání minulých iterací podgrafu +- Dotazování na podgrafy prostřednictvím GraphQL +- Testování podgrafů na hřišti +- Zobrazení indexátorů, které indexují na určitém podgrafu +- Statistiky podgrafů (alokace, kurátoři atd.) +- Zobrazení subjektu, který podgraf zveřejnil -![Explorer Image 3](/img/Explorer-Signal-Unsignal.png) +![Obrázek průzkumníka 3](/img/Explorer-Signal-Unsignal.png) -## Participants +## Účastníci -Within this tab, you’ll get a bird’s eye view of all the people that are participating in the network activities, such as Indexers, Delegators, and Curators. Below, we’ll go into an in-depth review of what each tab means for you. +Na této kartě získáte přehled o všech osobách, které se podílejí na činnostech sítě, jako jsou indexátoři, delegáti a kurátoři. Níže si podrobně rozebereme, co pro vás jednotlivé karty znamenají. -### 1. Indexers +### 1. Indexery -![Explorer Image 4](/img/Indexer-Pane.png) +![Obrázek průzkumníka 4](/img/Indexer-Pane.png) -Let’s start with the Indexers. Indexers are the backbone of the protocol, being the ones that stake on subgraphs, index them, and serve queries to anyone consuming subgraphs. In the Indexers table, you’ll be able to see an Indexers’ delegation parameters, their stake, how much they have staked to each subgraph, and how much revenue they have made off of query fees and indexing rewards. Deep dives below: +Začněme u indexátorů. Základem protokolu jsou indexery, které sázejí na podgrafy, indexují je a obsluhují dotazy všech, kdo podgrafy spotřebovávají. V tabulce Indexers uvidíte parametry delegace indexerů, jejich podíl, kolik vsadili na jednotlivé podgrafy a kolik vydělali na poplatcích za dotazy a odměnách za indexování. Hlubší ponory níže: -- Query Fee Cut - the % of the query fee rebates that the Indexer keeps when splitting with Delegators -- Effective Reward Cut - the indexing reward cut applied to the delegation pool. If it’s negative, it means that the Indexer is giving away part of their rewards. If it’s positive, it means that the Indexer is keeping some of their rewards -- Cooldown Remaining - the time remaining until the Indexer can change the above delegation parameters. Cooldown periods are set up by Indexers when they update their delegation parameters -- Owned - This is the Indexer’s deposited stake, which may be slashed for malicious or incorrect behavior -- Delegated - Stake from Delegators which can be allocated by the Indexer, but cannot be slashed -- Allocated - Stake that Indexers are actively allocating towards the subgraphs they are indexing -- Available Delegation Capacity - the amount of delegated stake the Indexers can still receive before they become over-delegated -- Max Delegation Capacity - the maximum amount of delegated stake the Indexer can productively accept. An excess delegated stake cannot be used for allocations or rewards calculations. -- Query Fees - this is the total fees that end users have paid for queries from an Indexer over all time -- Indexer Rewards - this is the total indexer rewards earned by the Indexer and their Delegators over all time. Indexer rewards are paid through GRT issuance. +- Query Fee Cut - % slevy z poplatku za dotaz, které si indexátor ponechá při rozdělení s delegáty +- Efektivní snížení odměny - indexační snížení odměny použité na fond delegací. Pokud je záporná, znamená to, že indexátor odevzdává část svých odměn. Pokud je kladná, znamená to, že si indexátor ponechává část svých odměn +- Cooldown Remaining - doba, která zbývá do doby, kdy indexátor může změnit výše uvedené parametry delegování. Období Cooldown nastavují indexátory při aktualizaci parametrů delegování. +- Owned - Jedná se o uložený podíl indexátora, který může být zkrácen za škodlivé nebo nesprávné chování. +- Delegated - Podíl z delegátů, který může být přidělen indexátor, ale nemůže být zkrácen +- Allocated - Podíl, který indexátory aktivně alokují k indexovaným podgrafy +- Dostupná kapacita delegování - množství delegovaných podílů, které mohou indexátoři ještě obdržet, než dojde k jejich nadměrnému delegování +- Maximální kapacita delegování - maximální množství delegovaných podílů, které může indexátor produktivně přijmout. Nadměrný delegovaný podíl nelze použít pro alokace nebo výpočty odměn. +- Poplatky za dotazy - jedná se o celkové poplatky, které koncoví uživatelé zaplatili za dotazy z indexátoru za celou dobu +- Odměny indexátorů - jedná se o celkové odměny indexátorů, které indexátor a jeho delegáti získali za celou dobu. Odměny indexátorů jsou vypláceny prostřednictvím vydání GRT. -Indexers can earn both query fees and indexing rewards. Functionally, this happens when network participants delegate GRT to an Indexer. This enables Indexers to receive query fees and rewards depending on their Indexer parameters. Indexing parameters are set by clicking on the right-hand side of the table, or by going into an Indexer’s profile and clicking the “Delegate” button. +Indexátoři mohou získat jak poplatky za dotazy, tak odměny za indexování. Funkčně k tomu dochází, když účastníci sítě delegují GRT na indexátor. To indexátorům umožňuje získávat poplatky za dotazování a odměny v závislosti na parametrech indexátoru. Parametry indexování se nastavují kliknutím na pravou stranu tabulky nebo vstupem do profilu indexátora a kliknutím na tlačítko "Delegate". -To learn more about how to become an Indexer, you can take a look at the [official documentation](/network/indexing) or [The Graph Academy Indexer guides.](https://thegraph.academy/delegators/choosing-indexers/) +Chcete-li se dozvědět více o tom, jak se stát indexátorem, můžete se podívat do [oficiální dokumentace](/network/indexing) nebo do [průvodců pro indexátory akademie graf.](https://thegraph.academy/delegators/choosing-indexers/) -![Indexing details pane](/img/Indexing-Details-Pane.png) +![Podokno s podrobnostmi o indexování](/img/Indexing-Details-Pane.png) -### 2. Curators +### 2. Kurátoři -Curators analyze subgraphs to identify which subgraphs are of the highest quality. Once a Curator has found a potentially attractive subgraph, they can curate it by signaling on its bonding curve. In doing so, Curators let Indexers know which subgraphs are high quality and should be indexed. +Kurátoři analyzují podgrafy, aby určili, které podgrafy jsou nejkvalitnější. Jakmile kurátor najde potenciálně atraktivní podgraf, může jej kurátorovi signalizovat na jeho vazební křivce. Kurátoři tak dávají indexátorům vědět, které podgrafy jsou vysoce kvalitní a měly by být indexovány. -Curators can be community members, data consumers, or even subgraph developers who signal on their own subgraphs by depositing GRT tokens into a bonding curve. By depositing GRT, Curators mint curation shares of a subgraph. As a result, Curators are eligible to earn a portion of the query fees that the subgraph they have signaled on generates. The bonding curve incentivizes Curators to curate the highest quality data sources. The Curator table in this section will allow you to see: +Kurátory mohou být členové komunity, konzumenti dat nebo dokonce vývojáři podgrafů, kteří signalizují své vlastní podgrafy tím, že vkládají žetony GRT do vazební křivky. Vložením GRT kurátoři razí kurátorské podíly podgrafu. V důsledku toho mají kurátoři nárok vydělat část poplatků za dotazy, které signalizovaný podgraf generuje. Vázací křivka motivuje kurátory ke kurátorství datových zdrojů nejvyšší kvality. Tabulka kurátorů v této části vám umožní vidět: -- The date the Curator started curating -- The number of GRT that was deposited -- The number of shares a Curator owns +- Datum, kdy kurátor zahájil kurátorskou činnost +- Počet uložených GRT +- Počet akcií, které kurátor vlastní -![Explorer Image 6](/img/Curation-Overview.png) +![Obrázek průzkumníka 6](/img/Curation-Overview.png) -If you want to learn more about the Curator role, you can do so by visiting the following links of [The Graph Academy](https://thegraph.academy/curators/) or [official documentation.](/network/curating) +Pokud se chcete o roli kurátora dozvědět více, můžete tak učinit na následujících odkazech [The Graph Academy](https://thegraph.academy/curators/) nebo [oficiální dokumentace.](/network/curating) -### 3. Delegators +### 3. Delegáti -Delegators play a key role in maintaining the security and decentralization of The Graph Network. They participate in the network by delegating (i.e., “staking”) GRT tokens to one or multiple indexers. Without Delegators, Indexers are less likely to earn significant rewards and fees. Therefore, Indexers seek to attract Delegators by offering them a portion of the indexing rewards and query fees that they earn. +Delegáti hrají klíčovou roli při udržování bezpečnosti a decentralizace sítě Graf. Podílejí se na síti tím, že delegují (tj. "sází") tokeny GRT jednomu nebo více indexátorům. Bez delegátů mají indexátoři menší šanci získat významné odměny a poplatky. Proto se indexátoři snaží přilákat delegáty tím, že jim nabízejí část odměn za indexování a poplatků za dotazy, které získají. -Delegators, in turn, select Indexers based on a number of different variables, such as past performance, indexing reward rates, and query fee cuts. Reputation within the community can also play a factor in this! It’s recommended to connect with the indexers selected via [The Graph’s Discord](https://discord.gg/graphprotocol) or [The Graph Forum](https://forum.thegraph.com/)! +Delegáti zase vybírají indexátory na základě řady různých proměnných, jako je výkonnost v minulosti, míra odměny za indexaci a snížení poplatků za dotaz. Svou roli může hrát i pověst v rámci komunity! Doporučujeme se s vybranými indexátory spojit prostřednictvím [Discord Grafu](https://discord.gg/graphprotocol) nebo [Fóra Grafu](https://forum.thegraph.com/)! -![Explorer Image 7](/img/Delegation-Overview.png) +![Obrázek průzkumníka 7](/img/Delegation-Overview.png) -The Delegators table will allow you to see the active Delegators in the community, as well as metrics such as: +Tabulka Delegáti vám umožní zobrazit aktivní delegáty v komunitě a také metriky, jako jsou: -- The number of Indexers a Delegator is delegating towards -- A Delegator’s original delegation -- The rewards they have accumulated but have not withdrawn from the protocol -- The realized rewards they withdrew from the protocol -- Total amount of GRT they have currently in the protocol -- The date they last delegated at +- Počet indexátorů, na které deleguje delegát +- Původní delegace delegát +- Odměny, které nashromáždili, ale z protokolu si je nevyzvedli +- Realizované odměny odstranili z protokolu +- Celkové množství GRT, které mají v současné době v protokolu +- Datum, kdy byly naposledy delegovány na -If you want to learn more about how to become a Delegator, look no further! All you have to do is to head over to the [official documentation](/network/delegating) or [The Graph Academy](https://docs.thegraph.academy/official-docs/delegator/choosing-indexers). +Pokud se chcete dozvědět více o tom, jak se stát delegátem, už nemusíte hledat dál! Stačí, když se vydáte na [oficiální dokumentaci](/network/delegating) nebo [Akademii Graf](https://docs.thegraph.academy/official-docs/delegator/choosing-indexers). -## Network +## Síť -In the Network section, you will see global KPIs as well as the ability to switch to a per-epoch basis and analyze network metrics in more detail. These details will give you a sense of how the network is performing over time. +V sekci Síť uvidíte globální klíčové ukazatele výkonnosti (KPI) a také možnost přepnout na základ epoch a detailněji analyzovat síťové metriky. Tyto podrobnosti vám poskytnou představu o tom, jak síť funguje v průběhu času. -### Activity +### Aktivita -The activity section has all the current network metrics as well as some cumulative metrics over time. Here you can see things like: +V části o činnosti jsou uvedeny všechny aktuální síťové metriky a některé kumulativní metriky za určitý časový úsek. Zde můžete vidět např: -- The current total network stake -- The stake split between the Indexers and their Delegators -- Total supply, minted, and burned GRT since the network inception -- Total Indexing rewards since the inception of the protocol -- Protocol parameters such as curation reward, inflation rate, and more -- Current epoch rewards and fees +- Současný celkový podíl v síti +- Rozdělení stake mezi indexátory a jejich delegátory +- Celková nabídka, vytěžené a spálené GRT od založení sítě +- Celkové odměny za indexaci od zavedení protokolu +- Parametry protokolu, jako je odměna za kurátorství, míra inflace a další +- Odměny a poplatky současné epochy -A few key details that are worth mentioning: +Několik klíčových informací, které stojí za zmínku: -- **Query fees represent the fees generated by the consumers**, and they can be claimed (or not) by the Indexers after a period of at least 7 epochs (see below) after their allocations towards the subgraphs have been closed and the data they served has been validated by the consumers. -- **Indexing rewards represent the amount of rewards the Indexers claimed from the network issuance during the epoch.** Although the protocol issuance is fixed, the rewards only get minted once the Indexers close their allocations towards the subgraphs they’ve been indexing. Thus the per-epoch number of rewards varies (ie. during some epochs, Indexers might’ve collectively closed allocations that have been open for many days). +- **Poplatky za dotazy představují poplatky generované spotřebiteli** a indexátory si je mohou nárokovat (nebo ne) po uplynutí nejméně 7 epoch (viz níže) poté, co byly jejich příděly vůči podgraf uzavřeny a data, která obsluhovali, byla potvrzena spotřebiteli. +- ** Odměny za indexaci představují množství odměn, které indexátoři nárokovali ze síťové emise během epochy.** Ačkoli je emise protokolu pevně daná, odměny jsou vyraženy až poté, co indexátoři uzavřou své alokace vůči podgraf, které indexovali. Proto se počet odměn v jednotlivých epochách mění (tj. během některých epoch mohli indexátoři kolektivně uzavřít alokace, které byly otevřené mnoho dní). -![Explorer Image 8](/img/Network-Stats.png) +![Obrázek průzkumníka 8](/img/Network-Stats.png) ### Epochs -In the Epochs section, you can analyze on a per-epoch basis, metrics such as: +V části Epochy můžete na základě jednotlivých epoch analyzovat metriky, jako jsou: -- Epoch start or end block -- Query fees generated and indexing rewards collected during a specific epoch -- Epoch status, which refers to the query fee collection and distribution and can have different states: - - The active epoch is the one in which Indexers are currently allocating stake and collecting query fees - - The settling epochs are the ones in which the state channels are being settled. This means that the Indexers are subject to slashing if the consumers open disputes against them. - - The distributing epochs are the epochs in which the state channels for the epochs are being settled and Indexers can claim their query fee rebates. - - The finalized epochs are the epochs that have no query fee rebates left to claim by the Indexers, thus being finalized. +- Počáteční nebo koncový blok epoch +- Poplatky za dotazy vygenerované a odměny za indexování vybrané během určité epoch +- Stav epoch, který se týká výběru a distribuce poplatků za dotaz a může mít různé stavy: + - Aktivní epocha je ta, ve které indexéry právě přidělují podíl a vybírají poplatky za dotazy + - Epoch zúčtování jsou ty, ve kterých se zúčtovávají stavové kanály. To znamená, že indexátoři podléhají krácení, pokud proti nim spotřebitelé zahájí spory. + - Distribuční epochy jsou epochy, ve kterých se vypořádávají státní kanály pro epochy a indexátoři si mohou nárokovat slevy z poplatků za dotazy. + - Finalizované epochy jsou epochy, u nichž indexátorům nezbývají žádné slevy z poplatků za dotaz, a jsou tedy finalizované. -![Explorer Image 9](/img/Epoch-Stats.png) +![Obrázek průzkumníka 9](/img/Epoch-Stats.png) -## Your User Profile +## Váš uživatelský profil -Now that we’ve talked about the network stats, let’s move on to your personal profile. Your personal profile is the place for you to see your network activity, no matter how you’re participating on the network. Your crypto wallet will act as your user profile, and with the User Dashboard, you’ll be able to see: +Nyní, když jsme si řekli něco o statistikách sítě, přejděme k vašemu osobnímu profilu. Váš osobní profil je místem, kde vidíte svou aktivitu v síti, ať už se jí účastníte jakýmkoli způsobem. Vaše kryptopeněženka bude fungovat jako váš uživatelský profil a pomocí uživatelského panelu si ji budete moci prohlédnout: -### Profile Overview +### Přehled profilů -This is where you can see any current actions you took. This is also where you can find your profile information, description, and website (if you added one). +Zde se zobrazují všechny aktuální akce, které jste provedli. Zde také najdete informace o svém profilu, popis a webové stránky (pokud jste si je přidali). -![Explorer Image 10](/img/Profile-Overview.png) +![Obrázek průzkumníka 10](/img/Profile-Overview.png) -### Subgraphs Tab +### Tab Podgrafy -If you click into the Subgraphs tab, you’ll see your published subgraphs. This will not include any subgraphs deployed with the CLI for testing purposes – subgraphs will only show up when they are published to the decentralized network. +Pokud kliknete na kartu podgrafy, zobrazí se vaše publikované podgrafy. Nebudou zde zahrnuty žádné podgrafy nasazené pomocí CLI pro účely testování - podgrafy se zobrazí až po jejich zveřejnění v decentralizované síti. -![Explorer Image 11](/img/Subgraphs-Overview.png) +![Obrázek průzkumníka 11](/img/Subgraphs-Overview.png) -### Indexing Tab +### Tab Indexování -If you click into the Indexing tab, you’ll find a table with all the active and historical allocations towards the subgraphs, as well as charts that you can analyze and see your past performance as an Indexer. +Pokud kliknete na kartu Indexování, najdete tabulku se všemi aktivními a historickými alokacemi k dílčím grafy a také grafy, které můžete analyzovat a podívat se na svou minulou výkonnost jako indexátor. -This section will also include details about your net Indexer rewards and net query fees. You’ll see the following metrics: +Tato část bude také obsahovat podrobnosti o vašich čistých odměnách za indexování a čistých poplatcích za dotazy. Zobrazí se následující metriky: -- Delegated Stake - the stake from Delegators that can be allocated by you but cannot be slashed -- Total Query Fees - the total fees that users have paid for queries served by you over time -- Indexer Rewards - the total amount of Indexer rewards you have received, in GRT -- Fee Cut - the % of query fee rebates that you will keep when you split with Delegators -- Rewards Cut - the % of Indexer rewards that you will keep when splitting with Delegators -- Owned - your deposited stake, which could be slashed for malicious or incorrect behavior +- Delegovaná sázka – sázka od delegátů, kterou můžete přidělit vy, ale nelze ji snížit +- Celkové poplatky za dotazy - celkové poplatky, které uživatelé zaplatili za dotazy, které jste obsloužili v průběhu času +- Odměny indexátora - celková částka odměn indexátora, kterou jste obdrželi, v GRT +- Fee Cut - % slevy z poplatku za dotaz, které si ponecháte při rozdělení s delegáty +- Rozdělení odměn - % odměn indexátorů, které si ponecháte při dělení s delegáty +- Ve vlastnictví - váš vložený vklad, který může být snížen za škodlivé nebo nesprávné chování -![Explorer Image 12](/img/Indexer-Stats.png) +![Obrázek průzkumníka 12](/img/Indexer-Stats.png) -### Delegating Tab +### Tab Delegování -Delegators are important to the Graph Network. A Delegator must use their knowledge to choose an Indexer that will provide a healthy return on rewards. Here you can find details of your active and historical delegations, along with the metrics of the Indexers that you delegated towards. +Delegáti jsou pro síť Graf důležití. Delegát musí využít svých znalostí k výběru indexátora, který mu zajistí zdravou návratnost odměn. Zde najdete podrobnosti o svých aktivních a historických delegacích spolu s metrikami Indexátorů, ke kterým jste delegovali. -In the first half of the page, you can see your delegation chart, as well as the rewards-only chart. To the left, you can see the KPIs that reflect your current delegation metrics. +V první polovině stránky vidíte graf delegování a také graf odměn. Vlevo vidíte klíčové ukazatele výkonnosti, které odrážejí vaše aktuální metriky delegování. -The Delegator metrics you’ll see here in this tab include: +Metriky delegáta, které uvidíte na této tab, zahrnují: -- Total delegation rewards -- Total unrealized rewards -- Total realized rewards +- Celkové odměny za delegování +- Nerealizované odměny celkem +- Celkové realizované odměny -In the second half of the page, you have the delegations table. Here you can see the Indexers that you delegated towards, as well as their details (such as rewards cuts, cooldown, etc). +V druhé polovině stránky je tabulka delegací. Zde vidíte indexátory, které jste delegovali, a také jejich podrobnosti (například snížení odměn, zkrácení doby platnosti atd.). -With the buttons on the right side of the table, you can manage your delegation - delegate more, undelegate, or withdraw your delegation after the thawing period. +Pomocí tlačítek na pravé straně tabulky můžete spravovat delegování - delegovat více, zrušit delegování nebo stáhnout delegování po uplynutí doby rozmrazení. -Keep in mind that this chart is horizontally scrollable, so if you scroll all the way to the right, you can also see the status of your delegation (delegating, undelegating, withdrawable). +Nezapomeňte, že tento graf lze horizontálně posouvat, takže pokud se posunete úplně doprava, uvidíte také stav svého delegování (delegování, nedelegování, odvolání). -![Explorer Image 13](/img/Delegation-Stats.png) +![Obrázek průzkumníka 13](/img/Delegation-Stats.png) -### Curating Tab +### Tab Kurátorství -In the Curation tab, you’ll find all the subgraphs you’re signaling on (thus enabling you to receive query fees). Signaling allows Curators to highlight to Indexers which subgraphs are valuable and trustworthy, thus signaling that they need to be indexed on. +Na kartě Kurátorství najdete všechny dílčí grafy, na které signalizujete (a které vám tak umožňují přijímat poplatky za dotazy). Signalizace umožňuje kurátorům upozornit indexátory na to, které podgrafy jsou hodnotné a důvěryhodné, a tím signalizovat, že je třeba je indexovat. -Within this tab, you’ll find an overview of: +Na této tab najdete přehled: -- All the subgraphs you're curating on with signal details -- Share totals per subgraph -- Query rewards per subgraph -- Updated at date details +- Všechny dílčí podgrafy, na kterých kurátor pracuje, s podrobnostmi o signálu +- Celkové podíly na podgraf +- Odměny za dotaz na podgraf +- Aktualizováno v detailu data -![Explorer Image 14](/img/Curation-Stats.png) +![Obrázek průzkumníka 14](/img/Curation-Stats.png) ## Your Profile Settings From 9a42d68e4b1650ce3587beb9fce009693d5e9be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:14 -0400 Subject: [PATCH 189/924] New translations explorer.mdx (Japanese) --- website/pages/ja/network/explorer.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ja/network/explorer.mdx b/website/pages/ja/network/explorer.mdx index b3a1c9c9a6aa..77904c65fd3b 100644 --- a/website/pages/ja/network/explorer.mdx +++ b/website/pages/ja/network/explorer.mdx @@ -74,7 +74,7 @@ Subgraph Studio でサブグラフを公開すると、ナビゲーション バ デリゲーターは、グラフネットワークの安全性と分散性を維持するための重要な役割を担っています。 デリゲーターは、GRT トークンを 1 人または複数のインデクサーにデリゲート(=「ステーク」)することでネットワークに参加します。 デリゲーターがいなければ、インデクサーは大きな報酬や手数料を得ることができません。 そのため、インデクサーは獲得したインデクシング報酬やクエリフィーの一部をデリゲーターに提供することで、デリゲーターの獲得を目指します。 -Delegators, in turn, select Indexers based on a number of different variables, such as past performance, indexing reward rates, and query fee cuts. Reputation within the community can also play a factor in this! It’s recommended to connect with the indexers selected via [The Graph’s Discord](https://discord.gg/graphprotocol) or [The Graph Forum](https://forum.thegraph.com/)! +デリゲーターは、過去のパフォーマンス、インデクシング報酬率、クエリ手数料の割引率など、さまざまな要因に基づいてインデクサーを選択します。コミュニティ内での評判もこれに影響を与える可能性があります!選ばれたインデクサーと連携することをお勧めします。それには[The Graph's Discord](https://discord.gg/graphprotocol)or[The Graph Forum](https://forum.thegraph.com/)を利用することができます! ![エクスプローラーイメージ 7](/img/Delegation-Overview.png) From cc54ccfba8da17804402f8457634efcfca0273d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:16 -0400 Subject: [PATCH 190/924] New translations explorer.mdx (Dutch) --- website/pages/nl/network/explorer.mdx | 226 +++++++++++++------------- 1 file changed, 113 insertions(+), 113 deletions(-) diff --git a/website/pages/nl/network/explorer.mdx b/website/pages/nl/network/explorer.mdx index b3a549900b83..e5849178e0d2 100644 --- a/website/pages/nl/network/explorer.mdx +++ b/website/pages/nl/network/explorer.mdx @@ -2,202 +2,202 @@ title: Graph Explorer --- -Welcome to the Graph Explorer, or as we like to call it, your decentralized portal into the world of subgraphs and network data. 👩🏽‍🚀 The Graph Explorer consists of multiple parts where you can interact with other subgraph developers, dapp developers, Curators, Indexers, and Delegators. For a general overview of the Graph Explorer, check out the video below (or keep reading below): +Welkom bij de Graph Explorer, of zoals wij het graag noemen, uw gedecentraliseerde portaal naar de wereld van subgraphs en netwerkgegevens. 👩🏽‍🚀 De Graph Explorer bestaat uit meerdere onderdelen waar u interactie kunt hebben met andere subgraph-ontwikkelaars, dapp-ontwikkelaars, Curatoren, Indexeerders en Delegeerders. Bekijk voor een algemeen overzicht van de Graph Explorer de video hieronder (of blijf hieronder lezen): ## Subgraphs -First things first, if you just finished deploying and publishing your subgraph in the Subgraph Studio, the Subgraphs tab on the top of the navigation bar is the place to view your own finished subgraphs (and the subgraphs of others) on the decentralized network. Here, you’ll be able to find the exact subgraph you’re looking for based on the date created, signal amount, or name. +Allereerst, als u klaar bent met het creëren en publiceren van uw subgraph in de Subgraph Studio, dan is het tabblad 'Subgraphs' bovenaan de navigatiebalk de plek om uw eigen voltooide subgraph (en die van anderen) te bekijken op het gedecentraliseerde netwerk. Hier kunt u de exacte subgraph vinden waarnaar u op zoek bent op basis van de aanmaakdatum, signaalhoeveelheid of naam. -![Explorer Image 1](/img/Subgraphs-Explorer-Landing.png) +![Explorer Afbeelding 1](/img/Subgraphs-Explorer-Landing.png) -When you click into a subgraph, you’ll be able to test queries in the playground and be able to leverage network details to make informed decisions. You’ll also be able to signal GRT on your own subgraph or the subgraphs of others to make indexers aware of its importance and quality. This is critical because signaling on a subgraph incentivizes it to be indexed, which means that it’ll surface on the network to eventually serve queries. +Wanneer u op een subgraph klikt, kunt u query's testen in de playground en netwerkdetails gebruiken om geïnformeerde beslissingen te nemen. U kunt ook GRT signaleren op uw eigen subgraph of de subgraph van anderen om indexeerders bewust te maken van het belang en de kwaliteit ervan. Dit is cruciaal, want het signaleren op een subgraph stimuleert het om geïndexeerd te worden, wat betekent dat het op het netwerk zal verschijnen om uiteindelijk query's te serveren. -![Explorer Image 2](/img/Subgraph-Details.png) +![Explorer Afbeelding 2](/img/Subgraph-Details.png) -On each subgraph’s dedicated page, several details are surfaced. These include: +Op elke pagina toegewijd aan een subgraph, worden verschillende details weergegeven. Bijvoorbeeld: -- Signal/Un-signal on subgraphs -- View more details such as charts, current deployment ID, and other metadata -- Switch versions to explore past iterations of the subgraph +- Het toevoegen/weghalen van signaal op een subgraph +- Details zoals grafieken, huidige implementatie-ID en andere metadata +- Schakel tussen versies om eerdere iteraties van de subgraph te verkennen - Query subgraphs via GraphQL -- Test subgraphs in the playground -- View the Indexers that are indexing on a certain subgraph -- Subgraph stats (allocations, Curators, etc) -- View the entity who published the subgraph +- Subgraphs testen in de playground +- Bekijk de indexeerders die indexeren op een bepaalde subgraph +- Subgraphstatistieken (allocaties, curatoren, etc.) +- Bekijk de entiteit die de subgraph heeft gepubliceerd -![Explorer Image 3](/img/Explorer-Signal-Unsignal.png) +![Explorer Afbeelding 3](/img/Explorer-Signal-Unsignal.png) -## Participants +## Deelnemers -Within this tab, you’ll get a bird’s eye view of all the people that are participating in the network activities, such as Indexers, Delegators, and Curators. Below, we’ll go into an in-depth review of what each tab means for you. +Binnen dit tabblad krijgt u een vogelvlucht van alle mensen die deelnemen aan de netwerkactiviteiten, zoals Indexeerders, Delegeerders en Curatoren. Hieronder zullen we dieper ingaan op wat elk tabblad voor u betekent. ### 1. Indexers -![Explorer Image 4](/img/Indexer-Pane.png) +![Explorer Afbeelding 4](/img/Indexer-Pane.png) -Let’s start with the Indexers. Indexers are the backbone of the protocol, being the ones that stake on subgraphs, index them, and serve queries to anyone consuming subgraphs. In the Indexers table, you’ll be able to see an Indexers’ delegation parameters, their stake, how much they have staked to each subgraph, and how much revenue they have made off of query fees and indexing rewards. Deep dives below: +Laten we beginnen met de Indexers. Indexers zijn de ruggengraat van het protocol, zij zijn degenen die Grt staken op subgraphs, deze indexeren en query's leveren aan iedereen die de subgraphs gebruikt. In de tabel van de Indexers kunt u de delegatieparameters van een Indexer, hun inzet, hoeveel stake ze op elke subgraph en hoeveel inkomsten ze hebben gegenereerd uit queryvergoedingen en indexeringsbeloningen zien. Meer details hieronder: -- Query Fee Cut - the % of the query fee rebates that the Indexer keeps when splitting with Delegators -- Effective Reward Cut - the indexing reward cut applied to the delegation pool. If it’s negative, it means that the Indexer is giving away part of their rewards. If it’s positive, it means that the Indexer is keeping some of their rewards -- Cooldown Remaining - the time remaining until the Indexer can change the above delegation parameters. Cooldown periods are set up by Indexers when they update their delegation parameters -- Owned - This is the Indexer’s deposited stake, which may be slashed for malicious or incorrect behavior -- Delegated - Stake from Delegators which can be allocated by the Indexer, but cannot be slashed -- Allocated - Stake that Indexers are actively allocating towards the subgraphs they are indexing -- Available Delegation Capacity - the amount of delegated stake the Indexers can still receive before they become over-delegated -- Max Delegation Capacity - the maximum amount of delegated stake the Indexer can productively accept. An excess delegated stake cannot be used for allocations or rewards calculations. -- Query Fees - this is the total fees that end users have paid for queries from an Indexer over all time -- Indexer Rewards - this is the total indexer rewards earned by the Indexer and their Delegators over all time. Indexer rewards are paid through GRT issuance. +- Query Fee Cut - het % van de queryvergoedingen dat de Indexer behoudt na het delen met Delegeerders +- Effective Reward Aandeel - de indexeringsbeloning die wordt toegepast op de Delegatie pool. Als dit negatief is, betekent dit dat de Indexeerder een deel van hun beloningen weggeeft. Als dit positief is, betekent dit dat de Indexeerder een deel van hun beloningen behoudt +- Cooldown Remaining - de resterende tijd tot de Indexeerder de bovenstaande delegatieparameters kan wijzigen. Cooldown-perioden worden ingesteld door Indexeerders wanneer ze hun delegatieparameters bijwerken +- Owned - Dit is de eigen stake van de Indexer, die kan worden verlaagd vanwege kwaadwillig of incorrect gedrag +- Delegated - Dit is de stake van de Delegeerders die door de Indexeerders kunnen worden gebruikt, maar niet kunnen worden afgenomen bij kwaadwillig of incorrect gedrag van de Indexeerder +- Allocated - Stake die Indexers actief alloceren aan de subgraphs die ze indexeren +- Available Delegation Capacity - het bedrag van gedelegeerde inzet dat de Indexeerders nog kunnen ontvangen voordat ze overgedelegeerd worden +- Max Delegation Capacity - het maximale bedrag aan gedelegeerde inzet dat de Indexer productief kan accepteren. Een teveel aan gedelegeerde inzet kan niet worden gebruikt voor allocaties of beloningsberekeningen. +- Query Fees - dit zijn de totale kosten die eindgebruikers hebben betaald voor query's van een Indexer +- Indexer Rewards - dit zijn de totale indexerbeloningen die door de Indexer en hun Delegeerders zijn verdiend. Indexerbeloningen worden uitbetaald via de uitgifte van GRT. -Indexers can earn both query fees and indexing rewards. Functionally, this happens when network participants delegate GRT to an Indexer. This enables Indexers to receive query fees and rewards depending on their Indexer parameters. Indexing parameters are set by clicking on the right-hand side of the table, or by going into an Indexer’s profile and clicking the “Delegate” button. +Indexeerders kunnen zowel queryvergoedingen als indexeringsbeloningen verdienen. Functioneel gebeurt dit wanneer netwerkdeelnemers GRT aan een Indexeerder delegeren. Hierdoor kunnen Indexeerders queryvergoedingen en beloningen ontvangen, afhankelijk van hun Indexeerder parameters. Indexeerparameters worden ingesteld door aan de rechterkant van de tabel te klikken, of door naar het profiel van een Indexeerder te gaan en op de knop "Delegate" te klikken. -To learn more about how to become an Indexer, you can take a look at the [official documentation](/network/indexing) or [The Graph Academy Indexer guides.](https://thegraph.academy/delegators/choosing-indexers/) +Om meer te weten te komen over hoe je een Indexer kunt worden, kun je een kijkje nemen in de [officiële documentatie](/network/indexing) of de Indexeerdersgidsen van [The Graph Academy](https://thegraph.academy/delegators/choosing-indexers/) -![Indexing details pane](/img/Indexing-Details-Pane.png) +![Indexering details paneel](/img/Indexing-Details-Pane.png) -### 2. Curators +### 2. Curatoren -Curators analyze subgraphs to identify which subgraphs are of the highest quality. Once a Curator has found a potentially attractive subgraph, they can curate it by signaling on its bonding curve. In doing so, Curators let Indexers know which subgraphs are high quality and should be indexed. +Curatoren analyseren subgraphs om te identificeren welke subgraphs van de hoogste kwaliteit zijn. Zodra een Curator een potentieel aantrekkelijke subgraph heeft gevonden, kunnen ze deze cureren door te signaleren, met Grt, op de bonding curve. Door dit te doen, laten Curatoren Indexeerders weten welke subgraphs van hoge kwaliteit zijn en geïndexeerd moeten worden. -Curators can be community members, data consumers, or even subgraph developers who signal on their own subgraphs by depositing GRT tokens into a bonding curve. By depositing GRT, Curators mint curation shares of a subgraph. As a result, Curators are eligible to earn a portion of the query fees that the subgraph they have signaled on generates. The bonding curve incentivizes Curators to curate the highest quality data sources. The Curator table in this section will allow you to see: +Curatoren kunnen leden zijn van de community, dataconsumenten, of zelf subgraph-ontwikkelaars die op hun eigen subgraphs signaleren door GRT-tokens in een bonding curve te storten. Door GRT te storten, maken Curatoren curator-aandelen van een subgraph aan. Als gevolg hiervan komen Curatoren in aanmerking om een deel van de querykosten te verdienen die de subgraph waarop zijn hebben gesignaleerd gerenereert. De bonding curve stimuleert Curatoren om de hoogste kwaliteit data te cureren. De Curator-tabel in deze sectie laart je zien: -- The date the Curator started curating -- The number of GRT that was deposited -- The number of shares a Curator owns +- De datum waarop de curator is begonnen met cureren +- Het gestorte aantal GRT +- Het aantal curator-aandelen in het bezit van de curator -![Explorer Image 6](/img/Curation-Overview.png) +![Explorer Afbeelding 6](/img/Curation-Overview.png) -If you want to learn more about the Curator role, you can do so by visiting the following links of [The Graph Academy](https://thegraph.academy/curators/) or [official documentation.](/network/curating) +Als je meer wilt weten over de rol van de Curator, kun je de volgende websites bezoeken: [The Graph Academy](https://thegraph.academy/curators/) of de [officiële documentatie.](/network/curating) ### 3. Delegators -Delegators play a key role in maintaining the security and decentralization of The Graph Network. They participate in the network by delegating (i.e., “staking”) GRT tokens to one or multiple indexers. Without Delegators, Indexers are less likely to earn significant rewards and fees. Therefore, Indexers seek to attract Delegators by offering them a portion of the indexing rewards and query fees that they earn. +Delegators spelen een belangrijke rol in het bewaken van de veiligheid en decentralisatie van het Graph Netwerk. Ze nemen deel aan het netwerk door hun GRT-tokens te delegeren aan één of meerdere Indexeerders. Zonder Delegators krijgen Indexeerders minder beloningen en vergoedingen. Daarom proberen Indexeerders Delegators aan te trekken door hen een deel van de indexeringsbeloningen en query-vergoedingen die zij verdienen aan te bieden. -Delegators, in turn, select Indexers based on a number of different variables, such as past performance, indexing reward rates, and query fee cuts. Reputation within the community can also play a factor in this! It’s recommended to connect with the indexers selected via [The Graph’s Discord](https://discord.gg/graphprotocol) or [The Graph Forum](https://forum.thegraph.com/)! +Delegators kiezen op hun beurt Indexeerders op basis van verschillende variabelen, zoals eerdere prestaties, hoeveelheid indexeringsbeloningen en hoeveelheid query-vergoedingen. Reputatie binnen de community kan hierbij ook een rol spelen. Het is aanbevolen om contact te leggen met de inderxers via [de Graph Discord](https://discord.gg/graphprotocol) of [het Graph Forum](https://forum.thegraph.com/)! -![Explorer Image 7](/img/Delegation-Overview.png) +![Explorer Afbeelding 7](/img/Delegation-Overview.png) -The Delegators table will allow you to see the active Delegators in the community, as well as metrics such as: +De tabel met Delegators geeft je een overzicht van de actieve Delegators in de community, het laat ook de volgende statistieken zien: -- The number of Indexers a Delegator is delegating towards -- A Delegator’s original delegation -- The rewards they have accumulated but have not withdrawn from the protocol -- The realized rewards they withdrew from the protocol -- Total amount of GRT they have currently in the protocol -- The date they last delegated at +- Het aantal Indexeerders waaraan een Delegator heeft gedelegeerd +- De oorspronkelijke delegatie van een Delegator +- De beloningen die ze hebben opgebouwd, maar nog niet hebben opgenomen uit het protocol +- De gerealiseerde beloningen die ze uit het protocol hebben opgenomen +- Het totale bedrag aan GRT dat ze momenteel in het protocol hebben +- De datum waarop ze voor het laatst hebben gedelegeerd -If you want to learn more about how to become a Delegator, look no further! All you have to do is to head over to the [official documentation](/network/delegating) or [The Graph Academy](https://docs.thegraph.academy/official-docs/delegator/choosing-indexers). +Wil je meer leren over hoe je een Delegator kunt worden? Zoek niet verder! Het enige wat je hoeft te doen is naar de [official documentatie](/network/delegating) of [The Graph Academy](https://docs.thegraph.academy/official-docs/delegator/choosing-indexers) te gaan. -## Network +## Netwerk -In the Network section, you will see global KPIs as well as the ability to switch to a per-epoch basis and analyze network metrics in more detail. These details will give you a sense of how the network is performing over time. +In het "Netwerk" gedeelte ziet u de prestatie-indicatoren, evenals de mogelijkheid om te wisselen naar een per-epoch basis en netwerkmetrieken gedetailleerder te analyseren. Deze details geven u een beeld van hoe het netwerk presteert over een bepaalde tijd. -### Activity +### Activiteit -The activity section has all the current network metrics as well as some cumulative metrics over time. Here you can see things like: +De activiteiten afdeling bevat alle huidige netwerkmetriek, evenals enkele cumulatieve metrieken over tijd. Hier kunt u het volgende zien: -- The current total network stake -- The stake split between the Indexers and their Delegators -- Total supply, minted, and burned GRT since the network inception -- Total Indexing rewards since the inception of the protocol -- Protocol parameters such as curation reward, inflation rate, and more -- Current epoch rewards and fees +- De huidige totale hoeveelheid GRT in het netwerk +- De verdeling van de GRT tussen Indexeerders en hun Delegators +- Totale voorraad, gemunt en verbrand GRT sinds de start van het netwerk +- Totale indexeringsbeloningen sinds de start van het protocol +- Protocolparameters zoals curatiebeloningen, inflatiepercentage, en meer +- Huidige epoch beloningen en kosten -A few key details that are worth mentioning: +Een paar belangrijke details die het vermelden waard zijn: -- **Query fees represent the fees generated by the consumers**, and they can be claimed (or not) by the Indexers after a period of at least 7 epochs (see below) after their allocations towards the subgraphs have been closed and the data they served has been validated by the consumers. -- **Indexing rewards represent the amount of rewards the Indexers claimed from the network issuance during the epoch.** Although the protocol issuance is fixed, the rewards only get minted once the Indexers close their allocations towards the subgraphs they’ve been indexing. Thus the per-epoch number of rewards varies (ie. during some epochs, Indexers might’ve collectively closed allocations that have been open for many days). +- **Querykosten vertegenwoordigen de kosten die door de consumenten worden gegenereerd** en kunnen (of niet) door de indexeerders worden geclaimd na een periode van ten minste 7 epochs (zie hieronder) nadat hun allocaties naar de subgraphs zijn gesloten en de data die zij hebben geleverd is gevalideerd door de consumenten. +- **Indexeringsbeloningen vertegenwoordigen de hoeveelheid beloningen die de Indexers hebben geclaimd van de netwerk uitgifte tijdens de epoch.** Hoewel de uitgifte van nieuwe Grt vaststaat, worden de beloningen pas gemunt nadat de Indexers hun allocaties naar de subgraphs die ze hebben geïndexeerd, sluiten. Daarom varieert het aantal beloningen per epoch (Bijvoorbeeld, tijdens sommige epochs, hebben Indexers mogelijk gezamenlijk allocaties gesloten die al vele dagen open stonden). -![Explorer Image 8](/img/Network-Stats.png) +![Explorer Afbeelding 8](/img/Network-Stats.png) ### Epochs -In the Epochs section, you can analyze on a per-epoch basis, metrics such as: +In de Epochs afdeling kun je per epoch verschillende metrieken analyseren, zoals: -- Epoch start or end block -- Query fees generated and indexing rewards collected during a specific epoch -- Epoch status, which refers to the query fee collection and distribution and can have different states: - - The active epoch is the one in which Indexers are currently allocating stake and collecting query fees - - The settling epochs are the ones in which the state channels are being settled. This means that the Indexers are subject to slashing if the consumers open disputes against them. - - The distributing epochs are the epochs in which the state channels for the epochs are being settled and Indexers can claim their query fee rebates. - - The finalized epochs are the epochs that have no query fee rebates left to claim by the Indexers, thus being finalized. +- Start- of eindblock van de epoch +- Gegenereerde querykosten en verzamelde indexeringsbeloningen tijden een specifieke epoch +- Epoch status, verwijst naar de verzameling en distributie van querykosten en zich in verschillende staten kan bevinden: + - De actieve epoch is degene waarin Indexers momenteel Grt toewijzen en querykosten verzamelen + - De afhandelende epochs zijn die waarin de state channels worden afgehandeld. Dit betekent dat Indexers te maken kunnen krijgen met slashing als consumenten geschillen tegen hen openen. + - De distribuerende epochs zijn de epochs waarin de state channels voor de epochs worden afgehandeld en Indexeerders hun querykostenkorting kunnen claimen. + - De afgeronde epochs zijn de epochs waarin geen querykostenkortingen meer te claimen zijn door de Indexeerders, waardoor ze als afgerond worden beschouwd. -![Explorer Image 9](/img/Epoch-Stats.png) +![Explorer Afbeelding 9](/img/Epoch-Stats.png) -## Your User Profile +## Uw Gebruikersprofiel -Now that we’ve talked about the network stats, let’s move on to your personal profile. Your personal profile is the place for you to see your network activity, no matter how you’re participating on the network. Your crypto wallet will act as your user profile, and with the User Dashboard, you’ll be able to see: +Nu we het hebben gehad over de netwerkstatistieken, laten we verder gaan met uw persoonlijk profiel. Uw persoonlijk profiel is de plek waar u uw netwerkactiviteit kunt zien, ongeacht hoe u deelneemt aan het netwerk. Uw crypto wallet fungeert als uw gebruikersprofiel, en met het gebruikersdashboard kunt u het volgende zien: -### Profile Overview +### Profieloverzicht -This is where you can see any current actions you took. This is also where you can find your profile information, description, and website (if you added one). +Hier kunt u zien welke acties u onlangs hebt ondernomen. Dit is ook waar u uw profielinformatie, beschrijving, en website (als u er een hebt toegevoegd) kunt vinden. -![Explorer Image 10](/img/Profile-Overview.png) +![Explorer Afbeelding 10](/img/Profile-Overview.png) -### Subgraphs Tab +### Subgraph Tab -If you click into the Subgraphs tab, you’ll see your published subgraphs. This will not include any subgraphs deployed with the CLI for testing purposes – subgraphs will only show up when they are published to the decentralized network. +Als u op de Subgraphs tab klikt, ziet u uw gepubliceerde subgraphs. Dit bevat niet de subgraphs die geïmplementeerd zijn met de CLI voor testdoeleinden - subgraphs worden alleen weergegeven als ze zijn gepubliceerd op het gedecentraliseerde netwerk. -![Explorer Image 11](/img/Subgraphs-Overview.png) +![Explorer Afbeelding 11](/img/Subgraphs-Overview.png) ### Indexing Tab -If you click into the Indexing tab, you’ll find a table with all the active and historical allocations towards the subgraphs, as well as charts that you can analyze and see your past performance as an Indexer. +Als u op de Indexing tab klikt, vindt u een tabel met alle actieve en historische allocaties op de subgraphs, evenals grafieken waarmee u uw eerder prestaties als Indexeerder kunt analyseren. -This section will also include details about your net Indexer rewards and net query fees. You’ll see the following metrics: +Dit gedeelte bevat ook details over uw netto indexeringsbeloningen en netto querykosten. U zult de volgende metrics zien: -- Delegated Stake - the stake from Delegators that can be allocated by you but cannot be slashed -- Total Query Fees - the total fees that users have paid for queries served by you over time -- Indexer Rewards - the total amount of Indexer rewards you have received, in GRT -- Fee Cut - the % of query fee rebates that you will keep when you split with Delegators -- Rewards Cut - the % of Indexer rewards that you will keep when splitting with Delegators -- Owned - your deposited stake, which could be slashed for malicious or incorrect behavior +- Gedelegeerde GRT - de GRT van Delegators die door u kan worden toegewezen, maar die niet kan worden geslashed +- Totale Querykosten - de totale kosten die door gebruikers in de loop van de tijd hebben betaald voor queries die door u zijn verwerkt +- Indexer-beloningen - het totale bedrag aan Indexer-beloningen dat u heeft ontvangen, in GRT +- Fee Cut - het percentage van de query fee rebates dat u houdt wanneer u het splitst met Delegators +- Reward Cut - het % van Indexer-beloningen dat u houdt bij het splitsen met Delegators +- Owned - jouw eigen gestorte inzet, die kan worden geslashed voor kwaadaardig of incorrect gedrag -![Explorer Image 12](/img/Indexer-Stats.png) +![Explorer Afbeelding 12](/img/Indexer-Stats.png) ### Delegating Tab -Delegators are important to the Graph Network. A Delegator must use their knowledge to choose an Indexer that will provide a healthy return on rewards. Here you can find details of your active and historical delegations, along with the metrics of the Indexers that you delegated towards. +Delegators zijn belangrijk voor The Graph Network. Een Delegator moet hun kennis gebruiken om een Indexer te kiezen die een gezond rendement op beloningen zal bieden. Hier kunt u details vinden van uw actieve en historische delegaties, samen met de metrics van de Indexeerders waarnaar u hebt gedelegeerd. -In the first half of the page, you can see your delegation chart, as well as the rewards-only chart. To the left, you can see the KPIs that reflect your current delegation metrics. +In de eerste helft van de pagina kunt u uw delegatiegrafiek zien, evenals de alleen-beloningen-grafiek. Aan de linkerkant kun u de KPI's zien die uw huidige delegatiemetrics weerspiegelen. -The Delegator metrics you’ll see here in this tab include: +De Delegator-metrieken die u hier in deze tab zult zien, omvatten: -- Total delegation rewards -- Total unrealized rewards -- Total realized rewards +- Totale delegatiebeloningen +- Totale niet-gerealiseerde beloningen +- Totaal gerealiseerde beloningen -In the second half of the page, you have the delegations table. Here you can see the Indexers that you delegated towards, as well as their details (such as rewards cuts, cooldown, etc). +In de tweede helft van de pagina heeft u de delegatietabel. Hier kunt u de Indexeerders zien waarnaar u hebt gedelegeerd, evenals hun parameters (zoals beloningsverlagingen, afkoelperiode, enz.). -With the buttons on the right side of the table, you can manage your delegation - delegate more, undelegate, or withdraw your delegation after the thawing period. +Met de knoppen aan de rechterkant van de tabel kunt u uw delegatie beheren - meer delegeren, stoppen met delegeren of uw delegatie opnemen na de ontdooiperiode. -Keep in mind that this chart is horizontally scrollable, so if you scroll all the way to the right, you can also see the status of your delegation (delegating, undelegating, withdrawable). +Houd er rekening mee dat deze grafiek horizontaal scrollbaar is, dus als u helemaal naar rechts scrolt, kunt u ook de status van uw delegatie zien (delegeren, ontdooien, opneembaar). -![Explorer Image 13](/img/Delegation-Stats.png) +![Explorer Afbeelding 13](/img/Delegation-Stats.png) ### Curating Tab -In the Curation tab, you’ll find all the subgraphs you’re signaling on (thus enabling you to receive query fees). Signaling allows Curators to highlight to Indexers which subgraphs are valuable and trustworthy, thus signaling that they need to be indexed on. +Op de Curating Tab vind je alle subgraphs waarop je signaleert (dit stelt je in staat om querykosten te ontvangen). Singaleren stelt Curatoren in staat om aan Indexeerders te laten zien welke subgraphs waardevol en betrouwbaar zijn, wat aangeeft dat ze geïndexeerd moeten worden. -Within this tab, you’ll find an overview of: +Binnen deze tab vind je een overzicht van: -- All the subgraphs you're curating on with signal details -- Share totals per subgraph -- Query rewards per subgraph -- Updated at date details +- Alle subgraphs waarop je cureert met signaaldetails +- Totale aandelen per subgraph +- Querybeloningen per subgraph +- Gegevens van de bijwerkdatum -![Explorer Image 14](/img/Curation-Stats.png) +![Explorer Afbeelding 14](/img/Curation-Stats.png) -## Your Profile Settings +## Jouw profielinstellingen -Within your user profile, you’ll be able to manage your personal profile details (like setting up an ENS name). If you’re an Indexer, you have even more access to settings at your fingertips. In your user profile, you’ll be able to set up your delegation parameters and operators. +Binnen je gebruikersprofiel kun je je persoonlijke profielgegevens beheren (zoals het instellen van een ENS-naam). Als je een Indexeerder bent, heb je nog meer toegang tot instellingen binnen handbereik. In je gebruikersprofiel kun je je delegatieparameters en operators instellen. -- Operators take limited actions in the protocol on the Indexer's behalf, such as opening and closing allocations. Operators are typically other Ethereum addresses, separate from their staking wallet, with gated access to the network that Indexers can personally set -- Delegation parameters allow you to control the distribution of GRT between you and your Delegators. +- Operators nemen beperkte acties in het protocol namens de Indexer, zoals het openen en sluiten van allocaties. Operators zijn doorgaans andere Ethereum-adressen, los van hun wallet die inzet, met beperkte toegang tot het netwerk die Indexeerders persoonlijk kunnen instellen +- Delegatieparameters stellen je in staat om de verdeling van GRT tussen jou en je Delegators te regelen. -![Explorer Image 15](/img/Profile-Settings.png) +![Explorer Afbeelding 15](/img/Profile-Settings.png) -As your official portal into the world of decentralized data, The Graph Explorer allows you to take a variety of actions, no matter your role in the network. You can get to your profile settings by opening the dropdown menu next to your address, then clicking on the Settings button. +Als je officiële portaal naar de wereld van gedecentraliseerde data, stelt The Graph Explorer je in staat om een verscheidenheid aan acties te ondernemen, ongeacht je rol in het netwerk. Je kunt naar je profielinstellingen gaan door het dropdownmenu naast je adres te openen en vervolgens op de knop "Instellingen" te klikken.
![Wallet details](/img/Wallet-Details.png)
From 8ee503b8d4a17e8150d292d355e7b815ec4f90fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:19 -0400 Subject: [PATCH 191/924] New translations explorer.mdx (Russian) --- website/pages/ru/network/explorer.mdx | 242 +++++++++++++------------- 1 file changed, 121 insertions(+), 121 deletions(-) diff --git a/website/pages/ru/network/explorer.mdx b/website/pages/ru/network/explorer.mdx index a08d20f7aa52..431fecc335b0 100644 --- a/website/pages/ru/network/explorer.mdx +++ b/website/pages/ru/network/explorer.mdx @@ -2,202 +2,202 @@ title: Graph Explorer --- -Welcome to the Graph Explorer, or as we like to call it, your decentralized portal into the world of subgraphs and network data. 👩🏽‍🚀 The Graph Explorer consists of multiple parts where you can interact with other subgraph developers, dapp developers, Curators, Indexers, and Delegators. For a general overview of the Graph Explorer, check out the video below (or keep reading below): +Добро пожаловать в Graph Explorer или, как мы его называем, Ваш децентрализованный портал в мир субграфов и сетевых данных. 👩🏽‍🚀 Graph Explorer состоит из нескольких частей, где Вы можете взаимодействовать с другими разработчиками субграфов, разработчиками децентрализованных приложений, кураторами, индексаторами и делегаторами. Для получения общего обзора Graph Explorer посмотрите видео ниже (или продолжайте читать дальше): ## Субграфы -First things first, if you just finished deploying and publishing your subgraph in the Subgraph Studio, the Subgraphs tab on the top of the navigation bar is the place to view your own finished subgraphs (and the subgraphs of others) on the decentralized network. Here, you’ll be able to find the exact subgraph you’re looking for based on the date created, signal amount, or name. +Прежде всего, если Вы только что завершили развертывание и публикацию вашего субграфа в Subgraph Studio, вкладка Subgraphs в верхней части панели навигации - это место, где Вы можете просмотреть свои готовые субграфы (а также субграфы других участников) в децентрализованной сети. Здесь Вы сможете найти нужный Вам субграф по дате создания, количеству сигналов или имени. -![Explorer Image 1](/img/Subgraphs-Explorer-Landing.png) +![Изображение проводника 1](/img/Subgraphs-Explorer-Landing.png) -When you click into a subgraph, you’ll be able to test queries in the playground and be able to leverage network details to make informed decisions. You’ll also be able to signal GRT on your own subgraph or the subgraphs of others to make indexers aware of its importance and quality. This is critical because signaling on a subgraph incentivizes it to be indexed, which means that it’ll surface on the network to eventually serve queries. +Если Вы кликнете по субграфу, Вы сможете тестировать запросы в песочнице и использовать информацию о сети для принятия обоснованных решений. Вы также сможете отправить сигнал GRT на свой субграф или субграфы других участников, чтобы проинформировать индексаторов о его значимости и высоком качестве. Это очень важно, поскольку отправка сигнала на субграф стимулирует его индексацию, а это означает, что он появится в сети для последующего обслуживания запросов. -![Explorer Image 2](/img/Subgraph-Details.png) +![Изображение проводника 2](/img/Subgraph-Details.png) -On each subgraph’s dedicated page, several details are surfaced. These include: +На отдельной странице каждого субграфа отображается несколько деталей. Это: -- Signal/Un-signal on subgraphs -- View more details such as charts, current deployment ID, and other metadata -- Switch versions to explore past iterations of the subgraph -- Query subgraphs via GraphQL -- Test subgraphs in the playground -- View the Indexers that are indexing on a certain subgraph -- Subgraph stats (allocations, Curators, etc) -- View the entity who published the subgraph +- Сигнал/снятие сигнала на субграфах +- Просмотр дополнительных сведений, таких как диаграммы, текущий идентификатор развертывания и другие метаданные +- Переключение версии с целью изучения прошлых итераций субграфа +- Запрос субграфов через GraphQL +- Тестовые субграфы на тренировочной площадке +- Просмотр индексаторов, индексирующих определенный субграф +- Статистика субграфов (распределения, кураторы и т. д.) +- Просмотр объекта, опубликовавшего субграф -![Explorer Image 3](/img/Explorer-Signal-Unsignal.png) +![Изображение проводника 3](/img/Explorer-Signal-Unsignal.png) -## Participants +## Участники -Within this tab, you’ll get a bird’s eye view of all the people that are participating in the network activities, such as Indexers, Delegators, and Curators. Below, we’ll go into an in-depth review of what each tab means for you. +На этой вкладке Вы получите возможность увидеть всех участников, принимающих участие в сетевой деятельности, таких как индексаторы, делегаторы и кураторы. Далее мы подробно рассмотрим, что каждая вкладка означает. -### 1. Indexers +### 1. Индексаторы -![Explorer Image 4](/img/Indexer-Pane.png) +![Изображение проводника 4](/img/Indexer-Pane.png) -Let’s start with the Indexers. Indexers are the backbone of the protocol, being the ones that stake on subgraphs, index them, and serve queries to anyone consuming subgraphs. In the Indexers table, you’ll be able to see an Indexers’ delegation parameters, their stake, how much they have staked to each subgraph, and how much revenue they have made off of query fees and indexing rewards. Deep dives below: +Давайте начнем с индексаторов. Индексаторы - это главная опора протокола, они делают ставки на субграфы, индексируют их и предоставляют запросы всем, кто их использует. В таблице индексаторов Вы сможете увидеть параметры делегирования индексаторов, их ставки, сколько они поставили на каждый субграф, и какой доход получили от комиссий за запросы и вознаграждений за индексацию. Подробный разбор представлен ниже: -- Query Fee Cut - the % of the query fee rebates that the Indexer keeps when splitting with Delegators -- Effective Reward Cut - the indexing reward cut applied to the delegation pool. If it’s negative, it means that the Indexer is giving away part of their rewards. If it’s positive, it means that the Indexer is keeping some of their rewards -- Cooldown Remaining - the time remaining until the Indexer can change the above delegation parameters. Cooldown periods are set up by Indexers when they update their delegation parameters -- Owned - This is the Indexer’s deposited stake, which may be slashed for malicious or incorrect behavior -- Delegated - Stake from Delegators which can be allocated by the Indexer, but cannot be slashed -- Allocated - Stake that Indexers are actively allocating towards the subgraphs they are indexing -- Available Delegation Capacity - the amount of delegated stake the Indexers can still receive before they become over-delegated -- Max Delegation Capacity - the maximum amount of delegated stake the Indexer can productively accept. An excess delegated stake cannot be used for allocations or rewards calculations. -- Query Fees - this is the total fees that end users have paid for queries from an Indexer over all time -- Indexer Rewards - this is the total indexer rewards earned by the Indexer and their Delegators over all time. Indexer rewards are paid through GRT issuance. +- Сокращение комиссии за запрос — процент скидки от платы за запрос, которую индексатор сохраняет при разделении с Делегаторами +- Эффективное сокращение вознаграждения — сокращение вознаграждения за индексацию, применяемое к пулу делегирования. Если он отрицательный, это означает, что индексатор отдает часть своего вознаграждения. Если он положительный, это означает, что индексатор сохраняет часть своих вознаграждений +- Оставшееся время восстановления — время, оставшееся до того, как Индексатор сможет изменить вышеуказанные параметры делегирования. Периоды восстановления устанавливаются Индексаторами при обновлении параметров делегирования +- Собственность — это внесенная ставка индексатора, которая может быть уменьшена за злонамеренное или неправильное поведение +- Делегирование — доля Делегаторов, которая может быть выделена Индексатором, но не может быть сокращена +- Выделение — доля, которую Индексаторы активно распределяют между индексируемыми субграфами +- Доступная емкость делегирования — объем делегированной доли, которую Индексаторы всё ещё могут получить, прежде чем они будут перераспределены +- Максимальная емкость делегирования — максимальная сумма делегированной доли, которую Индексатор может продуктивно принять. Избыточная делегированная ставка не может быть использована для распределения или расчета вознаграждений. +- Плата за запросы — это общая сумма комиссий, которую конечные пользователи заплатили за запросы Индексатора за все время +- Вознаграждения Индексатора — это общая сумма вознаграждений Индексатора, полученная им и его Делегаторами за все время. Вознаграждения Индексаторов выплачиваются посредством выпуска GRT. -Indexers can earn both query fees and indexing rewards. Functionally, this happens when network participants delegate GRT to an Indexer. This enables Indexers to receive query fees and rewards depending on their Indexer parameters. Indexing parameters are set by clicking on the right-hand side of the table, or by going into an Indexer’s profile and clicking the “Delegate” button. +Индексаторы могут зарабатывать как комиссии за запросы, так и вознаграждения за индексацию. Фактически это происходит, когда участники сети делегируют GRT Индексатору. Это позволяет Индексаторам получать комиссионные и вознаграждения в зависимости от параметров самого Индексатора. Параметры индексации устанавливаются нажатием на правую сторону таблицы или переходом в профиль Индексатора и нажатием кнопки «Делегировать». -To learn more about how to become an Indexer, you can take a look at the [official documentation](/network/indexing) or [The Graph Academy Indexer guides.](https://thegraph.academy/delegators/choosing-indexers/) +Чтобы узнать больше о том, как стать индексатором, ознакомьтесь с [официальной документацией](/network/indexing) или [Руководством для Индексаторов The Graph Academy.](https://thegraph.academy/delegators/choosing-indexers/) -![Indexing details pane](/img/Indexing-Details-Pane.png) +![Панель сведений об индексировании](/img/Indexing-Details-Pane.png) -### 2. Curators +### 2. Кураторы -Curators analyze subgraphs to identify which subgraphs are of the highest quality. Once a Curator has found a potentially attractive subgraph, they can curate it by signaling on its bonding curve. In doing so, Curators let Indexers know which subgraphs are high quality and should be indexed. +Кураторы анализируют субграфы, чтобы определить, какие из них имеют наивысшее качество. Найдя потенциально привлекательный субграф, Куратор может курировать его, отправляя сигнал на его кривую связывания. Таким образом, Кураторы сообщают Индексаторам, какие субграфы имеют высокое качество и должны быть проиндексированы. -Curators can be community members, data consumers, or even subgraph developers who signal on their own subgraphs by depositing GRT tokens into a bonding curve. By depositing GRT, Curators mint curation shares of a subgraph. As a result, Curators are eligible to earn a portion of the query fees that the subgraph they have signaled on generates. The bonding curve incentivizes Curators to curate the highest quality data sources. The Curator table in this section will allow you to see: +Кураторы могут быть членами сообщества, потребителями данных или даже разработчиками субграфов, которые отправляют сигналы на свои собственные субграфы, депонируя токены GRT на кривую связывания. Депонируя GRT, Кураторы создают акции кураторства субграфа. В результате Кураторы имеют право получать часть комиссий за запросы, которые генерирует субграф, на который они отправили сигнал. Кривая связывания стимулирует Кураторов курировать источники данных наивысшего качества. Таблица Куратора в этом разделе позволит Вам увидеть: -- The date the Curator started curating -- The number of GRT that was deposited -- The number of shares a Curator owns +- Дату начала курирования +- Количество GRT, которое было внесено +- Количество акций, которыми владеет Куратор -![Explorer Image 6](/img/Curation-Overview.png) +![Изображение проводника 6](/img/Curation-Overview.png) -If you want to learn more about the Curator role, you can do so by visiting the following links of [The Graph Academy](https://thegraph.academy/curators/) or [official documentation.](/network/curating) +Если Вы хотите получить больше информации о роли Куратора, Вы можете сделать это, перейдя по следующим ссылкам: [ Академия The Graph](https://thegraph.academy/curators/) или [ Официальная документация.](/network/curating) -### 3. Delegators +### 3. Делегаторы -Delegators play a key role in maintaining the security and decentralization of The Graph Network. They participate in the network by delegating (i.e., “staking”) GRT tokens to one or multiple indexers. Without Delegators, Indexers are less likely to earn significant rewards and fees. Therefore, Indexers seek to attract Delegators by offering them a portion of the indexing rewards and query fees that they earn. +Делегаторы играют ключевую роль в обеспечении безопасности и децентрализации сети The Graph. Они участвуют в сети, делегируя (то есть "ставя") токены GRT одному или нескольким индексаторам. Без Делегаторов у Индексаторов меньше вероятности заработать значительные награды и комиссии. Поэтому Индексаторы стремятся привлечь Делегаторов, предлагая им часть наград за индексацию и комиссий за запросы, которые они зарабатывают. -Delegators, in turn, select Indexers based on a number of different variables, such as past performance, indexing reward rates, and query fee cuts. Reputation within the community can also play a factor in this! It’s recommended to connect with the indexers selected via [The Graph’s Discord](https://discord.gg/graphprotocol) or [The Graph Forum](https://forum.thegraph.com/)! +Делегаторы, в свою очередь, выбирают Индексаторов на основе ряда различных переменных, таких как прошлые результаты, ставки вознаграждения за индексирование и снижение стоимости оплаты за запросы. Репутация в сообществе также может сыграть важную роль в этом! Рекомендуется подключаться к выбранным индексаторам через [The Graph’s Discord](https://discord.gg/graphprotocol) или [The Graph Forum](https://forum.thegraph.com/)! -![Explorer Image 7](/img/Delegation-Overview.png) +![Изображение проводника 7](/img/Delegation-Overview.png) -The Delegators table will allow you to see the active Delegators in the community, as well as metrics such as: +Таблица «Делегаторы» позволит Вам увидеть активных Делегаторов сообщества, а также такие показатели, как: -- The number of Indexers a Delegator is delegating towards -- A Delegator’s original delegation -- The rewards they have accumulated but have not withdrawn from the protocol -- The realized rewards they withdrew from the protocol -- Total amount of GRT they have currently in the protocol -- The date they last delegated at +- Количество Индексаторов, к которым делегирует Делегатор +- Первоначальная делегация Делегатора +- Накопленные ими вознаграждения, которые они не вывели из протокола +- Реализованные вознаграждения, которые они сняли с протокола +- Общее количество GRT, которое у них имеется в настоящее время в протоколе +- Дата их последней делегации -If you want to learn more about how to become a Delegator, look no further! All you have to do is to head over to the [official documentation](/network/delegating) or [The Graph Academy](https://docs.thegraph.academy/official-docs/delegator/choosing-indexers). +Если Вы хотите узнать больше о том, как стать Делегатором, не ищите информацию дальше! Все, что Вам нужно сделать, это перейти к [официальной документации](/network/delegating) или в [The Graph Academy](https://docs.thegraph.academy/official-docs/delegator/choosing-indexers). -## Network +## Сеть -In the Network section, you will see global KPIs as well as the ability to switch to a per-epoch basis and analyze network metrics in more detail. These details will give you a sense of how the network is performing over time. +В разделе "Сеть" Вы увидите глобальные ключевые показатели эффективности, а также сможете переключиться на основу каждой эпохи и проанализировать метрики сети более детально. Эти данные дадут Вам представление о том, как сеть работает на протяжении определённого времени. -### Activity +### Активность -The activity section has all the current network metrics as well as some cumulative metrics over time. Here you can see things like: +В разделе «Активность» представлены все текущие показатели сети, а также некоторые совокупные показатели на протяжении определённого времени. Здесь Вы можете увидеть такие вещи, как: -- The current total network stake -- The stake split between the Indexers and their Delegators -- Total supply, minted, and burned GRT since the network inception -- Total Indexing rewards since the inception of the protocol -- Protocol parameters such as curation reward, inflation rate, and more -- Current epoch rewards and fees +- Текущая общая доля сети +- Доля распределяется между Индексаторами и их Делегаторами +- Общий запас, отчеканенные и сожженные GRT с момента создания сети +- Общее вознаграждение за индексацию с момента создания протокола +- Параметры протокола, такие как вознаграждение за курирование, уровень инфляции и т. д +- Награды и сборы текущей эпохи -A few key details that are worth mentioning: +Несколько ключевых деталей, о которых стоит упомянуть: -- **Query fees represent the fees generated by the consumers**, and they can be claimed (or not) by the Indexers after a period of at least 7 epochs (see below) after their allocations towards the subgraphs have been closed and the data they served has been validated by the consumers. -- **Indexing rewards represent the amount of rewards the Indexers claimed from the network issuance during the epoch.** Although the protocol issuance is fixed, the rewards only get minted once the Indexers close their allocations towards the subgraphs they’ve been indexing. Thus the per-epoch number of rewards varies (ie. during some epochs, Indexers might’ve collectively closed allocations that have been open for many days). +- **Комиссии за запросы представляют собой сборы, генерируемые потребителями**, и их могут заявить (или не заявить) Индексаторы по истечении периода как минимум 7 эпох (см. ниже) после того, как их распределения по отношению к субграфам были закрыты и данные, которые они предоставили, были проверены потребителями. +- **Вознаграждения за индексацию представляют собой количество вознаграждений, которые Индексаторы заявили за выпуск сети в течение эпохи.** Хотя объем выпуска протокола фиксирован, вознаграждения создаются только после того, как Индексаторы закрывают свои распределения по отношению к субграфам, которые они индексировали. Таким образом, количество вознаграждений в эпоху меняется (т. е. в течение некоторых эпох Индексаторы могли коллективно закрыть распределения, которые были открыты в течение многих дней). -![Explorer Image 8](/img/Network-Stats.png) +![Изображение проводника 8](/img/Network-Stats.png) -### Epochs +### Эпохи -In the Epochs section, you can analyze on a per-epoch basis, metrics such as: +В разделе «Эпохи» Вы можете анализировать по эпохам такие показатели, как: -- Epoch start or end block -- Query fees generated and indexing rewards collected during a specific epoch -- Epoch status, which refers to the query fee collection and distribution and can have different states: - - The active epoch is the one in which Indexers are currently allocating stake and collecting query fees - - The settling epochs are the ones in which the state channels are being settled. This means that the Indexers are subject to slashing if the consumers open disputes against them. - - The distributing epochs are the epochs in which the state channels for the epochs are being settled and Indexers can claim their query fee rebates. - - The finalized epochs are the epochs that have no query fee rebates left to claim by the Indexers, thus being finalized. +- Начало или конец блока эпохи +- Комиссионные за запросы и вознаграждения за индексацию, полученные в течение определенной эпохи +- Статус эпохи, который относится к сбору и распределению комиссионных за запросы и может иметь разные состояния: + - Активная эпоха - это та, в которой Индексаторы в настоящее время выделяют ставки и собирают комиссионные за запросы + - Эпохи урегулирования — это эпохи, в которых используются государственные каналы. Это означает, что Индексаторы могут столкнуться с сокращением своих GRT, если потребители откроют против них споры. + - Эпохи распределения - это эпохи, в которых состояния каналов для эпох регулируются, и Индексаторы могут требовать скидки на комиссию за запросы. + - Завершенные эпохи — это эпохи, в которых Индексаторы не имеют скидок на комиссию за запросы, и поэтому они являются завершенными. -![Explorer Image 9](/img/Epoch-Stats.png) +![Изображение проводника 9](/img/Epoch-Stats.png) -## Your User Profile +## Ваш профиль пользователя -Now that we’ve talked about the network stats, let’s move on to your personal profile. Your personal profile is the place for you to see your network activity, no matter how you’re participating on the network. Your crypto wallet will act as your user profile, and with the User Dashboard, you’ll be able to see: +Теперь, когда мы поговорили о статистике сети, давайте перейдем к Вашему личному профилю. Ваш личный профиль - это место, где Вы можете видеть свою сетевую активность, независимо от того, как Вы участвуете в сети. Ваш криптовалютный кошелек будет действовать как Ваш профиль пользователя, и с помощью пользовательской панели Вы сможете увидеть: -### Profile Overview +### Обзор профиля -This is where you can see any current actions you took. This is also where you can find your profile information, description, and website (if you added one). +Здесь Вы можете увидеть любые текущие действия, которые Вы предприняли. Здесь Вы также можете найти информацию о своём профиле, описание и веб-сайт (если Вы его добавили). -![Explorer Image 10](/img/Profile-Overview.png) +![Изображение проводника 10](/img/Profile-Overview.png) -### Subgraphs Tab +### Вкладка "Субграфы" -If you click into the Subgraphs tab, you’ll see your published subgraphs. This will not include any subgraphs deployed with the CLI for testing purposes – subgraphs will only show up when they are published to the decentralized network. +Если Вы перейдете на вкладку "Субграфы", Вы увидите свои опубликованные субграфы. Здесь не будут отображаться субграфы, развернутые с помощью CLI в целях тестирования – субграфы появятся только после их публикации в децентрализованной сети. -![Explorer Image 11](/img/Subgraphs-Overview.png) +![Изображение проводника 11](/img/Subgraphs-Overview.png) -### Indexing Tab +### Вкладка "Индексирование" -If you click into the Indexing tab, you’ll find a table with all the active and historical allocations towards the subgraphs, as well as charts that you can analyze and see your past performance as an Indexer. +Если Вы перейдете на вкладку «Индексирование», Вы найдете таблицу со всеми активными и прежними распределениями по субграфам, а также диаграммы, которые сможете проанализировать и увидеть свои прошлые результаты в качестве Индексатора. -This section will also include details about your net Indexer rewards and net query fees. You’ll see the following metrics: +Этот раздел также будет содержать подробную информацию о Ваших чистых вознаграждениях Индексатора и чистой комиссии за запросы. Вы увидите следующие показатели: -- Delegated Stake - the stake from Delegators that can be allocated by you but cannot be slashed -- Total Query Fees - the total fees that users have paid for queries served by you over time -- Indexer Rewards - the total amount of Indexer rewards you have received, in GRT -- Fee Cut - the % of query fee rebates that you will keep when you split with Delegators -- Rewards Cut - the % of Indexer rewards that you will keep when splitting with Delegators -- Owned - your deposited stake, which could be slashed for malicious or incorrect behavior +- Делегированная ставка — ставка Делегаторов, которую Вы можете выделить, но не можете уменьшить +- Общая комиссия за запросы — общая сумма комиссий, которую пользователи платили за запросы, обслуживаемые Вами за определенный период времени +- Вознаграждения Индексатора – общая сумма полученных Вами вознаграждений Индексатора в GRT +- Сокращение комиссии — процент скидки на комиссию за запросы, который Вы сохраните при разделении с Делегаторами +- Сокращение вознаграждений — процент вознаграждений Индексатора, который Вы сохраните при разделении с Делегаторами +- Собственность — Ваша внесенная ставка, которая может быть уменьшена за злонамеренное или неправильное поведение -![Explorer Image 12](/img/Indexer-Stats.png) +![Изображение проводника 12](/img/Indexer-Stats.png) -### Delegating Tab +### Вкладка "Делегирование" -Delegators are important to the Graph Network. A Delegator must use their knowledge to choose an Indexer that will provide a healthy return on rewards. Here you can find details of your active and historical delegations, along with the metrics of the Indexers that you delegated towards. +Делегаторы важны для сети the Graph. Делегатор должен использовать свои знания, чтобы выбрать Индексатора, который обеспечит высокий доход от вознаграждений. Здесь Вы можете найти детали своих активных и прежних делегаций, а также метрики Индексаторов, которым Вы делегировали. -In the first half of the page, you can see your delegation chart, as well as the rewards-only chart. To the left, you can see the KPIs that reflect your current delegation metrics. +В первой половине страницы Вы можете увидеть диаграмму делегирования, а также диаграмму только вознаграждений. Слева Вы можете увидеть ключевые показатели эффективности, которые отражают Ваши текущие показатели делегирования. -The Delegator metrics you’ll see here in this tab include: +Метрики делегатора, которые Вы увидите на этой вкладке, включают: -- Total delegation rewards -- Total unrealized rewards -- Total realized rewards +- Общую сумму вознаграждений за делегирование +- Общее количество нереализованных наград +- Общее количество реализованных наград -In the second half of the page, you have the delegations table. Here you can see the Indexers that you delegated towards, as well as their details (such as rewards cuts, cooldown, etc). +Во второй половине страницы находится таблица делегирования. Здесь Вы можете увидеть Индексаторов, которым Вы делегировали полномочия, а также подробную информацию о них (например, сокращение вознаграждений, время восстановления и т. д.). -With the buttons on the right side of the table, you can manage your delegation - delegate more, undelegate, or withdraw your delegation after the thawing period. +С помощью кнопок в правой части таблицы Вы можете управлять своим делегированием: делегировать больше, отменить делегирование или отозвать свое делегирование после разморозки. -Keep in mind that this chart is horizontally scrollable, so if you scroll all the way to the right, you can also see the status of your delegation (delegating, undelegating, withdrawable). +Имейте в виду, что эта диаграмма прокручивается по горизонтали, поэтому, если Вы прокрутите ее до конца вправо, Вы также сможете увидеть статус своего делегирования (делегирование, отмена делегирования, возможность отзыва). -![Explorer Image 13](/img/Delegation-Stats.png) +![Изображение проводника 13](/img/Delegation-Stats.png) -### Curating Tab +### Вкладка "Курирование" -In the Curation tab, you’ll find all the subgraphs you’re signaling on (thus enabling you to receive query fees). Signaling allows Curators to highlight to Indexers which subgraphs are valuable and trustworthy, thus signaling that they need to be indexed on. +На вкладке «Курирование» Вы найдете все субграфы, на которые Вы подаете сигналы (что позволит Вам получать комиссию за запросы). Сигнализация позволяет Кураторам указывать Индексаторам, какие субграфы являются ценными и заслуживающими доверия, тем самым сигнализируя о том, что их необходимо проиндексировать. -Within this tab, you’ll find an overview of: +На данной вкладке Вы найдете обзор: -- All the subgraphs you're curating on with signal details -- Share totals per subgraph -- Query rewards per subgraph -- Updated at date details +- Всех субграфов, которые Вы курируете, с подробной информацией о сигнале +- Общего количества акций на субграф +- Вознаграждений за запрос за субграф +- Даты обновления данных -![Explorer Image 14](/img/Curation-Stats.png) +![Изображение проводника 14](/img/Curation-Stats.png) -## Your Profile Settings +## Параметры Вашего профиля -Within your user profile, you’ll be able to manage your personal profile details (like setting up an ENS name). If you’re an Indexer, you have even more access to settings at your fingertips. In your user profile, you’ll be able to set up your delegation parameters and operators. +В Вашем пользовательском профиле Вы сможете управлять деталями своего личного профиля (например, настройкой имени ENS). Если Вы Индексатор, у Вас есть еще больше возможностей для доступа к настройкам. В Вашем пользовательском профиле Вы сможете настроить параметры делегирования и операторов. -- Operators take limited actions in the protocol on the Indexer's behalf, such as opening and closing allocations. Operators are typically other Ethereum addresses, separate from their staking wallet, with gated access to the network that Indexers can personally set -- Delegation parameters allow you to control the distribution of GRT between you and your Delegators. +- Операторы выполняют ограниченные действия в протоколе от имени Индексатора, такие как открытие и закрытие распределения. Операторами обычно являются другие адреса Ethereum, отдельные от их кошелька для ставок, с ограниченным доступом к сети, который Индексаторы могут настроить лично +- Параметры делегирования позволяют Вам контролировать распределение GRT между Вами и Вашими Делегаторами. -![Explorer Image 15](/img/Profile-Settings.png) +![Изображение проводника 15](/img/Profile-Settings.png) -As your official portal into the world of decentralized data, The Graph Explorer allows you to take a variety of actions, no matter your role in the network. You can get to your profile settings by opening the dropdown menu next to your address, then clicking on the Settings button. +Являясь Вашим официальным порталом в мир децентрализованных данных, The Graph Explorer позволяет Вам выполнять самые разные действия, независимо от Вашей роли в сети. Вы можете перейти к настройкам своего профиля, открыв выпадающее меню рядом со своим адресом и нажав кнопку «Настройки». -
![Wallet details](/img/Wallet-Details.png)
+
![Подробности о кошельке](/img/Wallet-Details.png)
From 99c342f2cecf0c54a1c57c30af4cde9ebfa362a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:27 -0400 Subject: [PATCH 192/924] New translations indexing.mdx (Romanian) --- website/pages/ro/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/ro/network/indexing.mdx b/website/pages/ro/network/indexing.mdx index 9bdc2fb2eb7e..842a5c8e0c74 100644 --- a/website/pages/ro/network/indexing.mdx +++ b/website/pages/ro/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From e354180eadd87f8bcfdffb1223ffe954ab129264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:28 -0400 Subject: [PATCH 193/924] New translations indexing.mdx (French) --- website/pages/fr/network/indexing.mdx | 414 +++++++++++++------------- 1 file changed, 213 insertions(+), 201 deletions(-) diff --git a/website/pages/fr/network/indexing.mdx b/website/pages/fr/network/indexing.mdx index 8cb1418aa24d..3aed4193949b 100644 --- a/website/pages/fr/network/indexing.mdx +++ b/website/pages/fr/network/indexing.mdx @@ -2,17 +2,17 @@ title: Indexage --- -Indexers are node operators in The Graph Network that stake Graph Tokens (GRT) in order to provide indexing and query processing services. Indexers earn query fees and indexing rewards for their services. They also earn query fees that are rebated according to an exponential rebate function. +Les indexeurs sont des opérateurs de nœuds dans The Graph Network qui mettent en jeu des jetons Graph (GRT) afin de fournir des services d'indexation et de traitement de requêtes. Les indexeurs perçoivent des frais de requête et des récompenses d'indexation pour leurs services. Ils perçoivent également des frais de requête qui sont réduits selon une fonction de remise exponentielle. -GRT that is staked in the protocol is subject to a thawing period and can be slashed if Indexers are malicious and serve incorrect data to applications or if they index incorrectly. Indexers also earn rewards for delegated stake from Delegators, to contribute to the network. +Le GRT intégré au protocole est soumis à une période de décongélation et peut être réduit si les indexeurs sont malveillants et fournissent des données incorrectes aux applications ou s'ils indexent de manière incorrecte. Les indexeurs gagnent également des récompenses pour la participation déléguée des délégués, afin de contribuer au réseau. -Indexers select subgraphs to index based on the subgraph’s curation signal, where Curators stake GRT in order to indicate which subgraphs are high-quality and should be prioritized. Consumers (eg. applications) can also set parameters for which Indexers process queries for their subgraphs and set preferences for query fee pricing. +Les indexeurs sélectionnent les subgraphs à indexer en fonction du signal de curation du subgraph, où les curateurs misent du GRT afin d'indiquer quels subgraphs sont de haute qualité et doivent être priorisés. Les consommateurs (par exemple les applications) peuvent également définir les paramètres pour lesquels les indexeurs traitent les requêtes pour leurs subgraphs et définir les préférences pour la tarification des frais de requête. ## Questions fréquemment posées -### What is the minimum stake required to be an Indexer on the network? +### Quelle est la mise minimale requise pour être indexeur sur le réseau ? La mise minimale pour un indexeur est actuellement fixée à 100 000 GRT. @@ -26,23 +26,23 @@ La mise minimale pour un indexeur est actuellement fixée à 100 000 GRT. Les récompenses de l'indexation proviennent de l'inflation du protocole qui est fixée à 3 % par an. Ils sont répartis entre les subraphs en fonction de la proportion de tous les signaux de curation sur chacun, puis distribués proportionnellement aux indexeurs en fonction de leur participation allouée sur ce subgraph. **Une allocation doit être clôturée avec une preuve d'indexation (POI) valide et répondant aux normes fixées par la charte d'arbitrage afin d'être éligible aux récompenses.** -Numerous tools have been created by the community for calculating rewards; you'll find a collection of them organized in the [Community Guides collection](https://www.notion.so/Community-Guides-abbb10f4dba040d5ba81648ca093e70c). You can also find an up to date list of tools in the #Delegators and #Indexers channels on the [Discord server](https://discord.gg/graphprotocol). Here we link a [recommended allocation optimiser](https://github.com/graphprotocol/AllocationOpt.jl) integrated with the indexer software stack. +De nombreux outils ont été créés par la communauté pour calculer les récompenses ; vous en trouverez une collection organisée dans la [Collection de guides communautaires](https://www.notion.so/Community-Guides-abbb10f4dba040d5ba81648ca093e70c). Vous pouvez également trouver une liste à jour d'outils dans les canaux #Delegators et #Indexers sur le [Serveur Discord](https://discord.gg/graphprotocol). Nous lions ici un [optimiseur d'allocation recommandé](https://github.com/graphprotocol/AllocationOpt.jl) intégré à la pile logicielle de l'indexeur. -### What is a proof of indexing (POI)? +### Qu'est-ce qu'une preuve d'indexation (POI) ? -POIs are used in the network to verify that an Indexer is indexing the subgraphs they have allocated on. A POI for the first block of the current epoch must be submitted when closing an allocation for that allocation to be eligible for indexing rewards. A POI for a block is a digest for all entity store transactions for a specific subgraph deployment up to and including that block. +Les POI sont utilisés dans le réseau pour vérifier qu'un indexeur indexe les subgraphs sur lesquels ils ont été alloués. Un POI pour le premier bloc de l'époque actuelle doit être soumis lors de la clôture d'une allocation pour que cette allocation soit éligible aux récompenses d'indexation. Un POI pour un bloc est un résumé de toutes les transactions du magasin d'entités pour un déploiement de subgraph spécifique jusqu'à ce bloc inclus. -### When are indexing rewards distributed? +### Quand les récompenses d’indexation sont-elles distribuées ? -Allocations are continuously accruing rewards while they're active and allocated within 28 epochs. Rewards are collected by the Indexers, and distributed whenever their allocations are closed. That happens either manually, whenever the Indexer wants to force close them, or after 28 epochs a Delegator can close the allocation for the Indexer, but this results in no rewards. 28 epochs is the max allocation lifetime (right now, one epoch lasts for ~24h). +Les allocations accumulent continuellement des récompenses pendant qu'elles sont actives et allouées dans un délai de 28 époques. Les récompenses sont collectées par les indexeurs et distribuées chaque fois que leurs allocations sont clôturées. Cela se produit soit manuellement, chaque fois que l'indexeur souhaite forcer leur fermeture, soit après 28 époques, un délégant peut fermer l'allocation pour l'indexeur, mais cela n'entraîne aucune récompense. 28 époques est la durée de vie maximale de l'allocation (à l'heure actuelle, une époque dure environ 24 heures). -### Can pending indexing rewards be monitored? +### Les récompenses d’indexation en attente peuvent-elles être surveillées ? -The RewardsManager contract has a read-only [getRewards](https://github.com/graphprotocol/contracts/blob/master/contracts/rewards/RewardsManager.sol#L317) function that can be used to check the pending rewards for a specific allocation. +Le contrat RewardsManager dispose d'une fonction [getRewards](https://github.com/graphprotocol/contracts/blob/master/contracts/rewards/RewardsManager.sol#L317) en lecture seule qui peut être utilisée pour vérifier les récompenses en attente pour une allocation spécifique. -Many of the community-made dashboards include pending rewards values and they can be easily checked manually by following these steps: +De nombreux tableaux de bord créés par la communauté incluent des valeurs de récompenses en attente et ils peuvent être facilement vérifiés manuellement en suivant ces étapes : -1. Query the [mainnet subgraph](https://thegraph.com/hosted-service/subgraph/graphprotocol/graph-network-mainnet) to get the IDs for all active allocations: +1. Interrogez le [subgraph du mainnet](https://thegraph.com/hosted-service/subgraph/graphprotocol/graph-network-mainnet) pour obtenir les ID de toutes les allocations actives : ```graphql query indexerAllocations { @@ -58,139 +58,139 @@ query indexerAllocations { } ``` -Use Etherscan to call `getRewards()`: +Utilisez Etherscan pour appeler `getRewards()` : -- Navigate to [Etherscan interface to Rewards contract](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) +- Naviguer vers [Interface d'étherscan pour le contrat Rewards](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) -* To call `getRewards()`: - - Expand the **10. getRewards** dropdown. - - Enter the **allocationID** in the input. - - Click the **Query** button. +* Appeller `getRewards()`: + - Développez le **10. liste déroulante getRewards**. + - Saisissez le **allocationID** dans l'entrée. + - Cliquez sur le bouton **Requête**. -### What are disputes and where can I view them? +### Que sont les litiges et où puis-je les consulter ? -Indexer's queries and allocations can both be disputed on The Graph during the dispute period. The dispute period varies, depending on the type of dispute. Queries/attestations have 7 epochs dispute window, whereas allocations have 56 epochs. After these periods pass, disputes cannot be opened against either of allocations or queries. When a dispute is opened, a deposit of a minimum of 10,000 GRT is required by the Fishermen, which will be locked until the dispute is finalized and a resolution has been given. Fisherman are any network participants that open disputes. +Les requêtes et les allocations de l'indexeur peuvent toutes deux être contestées sur The Graph pendant la période de contestation. Le délai de contestation varie selon le type de litige. Les requêtes/attestations ont une fenêtre de contestation de 7 époques, tandis que les allocations ont 56 époques. Passé ces délais, aucun litige ne peut être ouvert ni contre les attributions ni contre les requêtes. Lorsqu'un litige est ouvert, une caution d'un minimum de 10 000 GRT est exigée par les pêcheurs, qui sera verrouillée jusqu'à ce que le litige soit finalisé et qu'une résolution soit trouvée. Les pêcheurs sont tous les participants au réseau qui ouvrent des différends. -Disputes have **three** possible outcomes, so does the deposit of the Fishermen. +Les différends sur **trois** enjeux possibles, tout comme la prudence des pêcheurs. -- If the dispute is rejected, the GRT deposited by the Fishermen will be burned, and the disputed Indexer will not be slashed. -- If the dispute is settled as a draw, the Fishermen's deposit will be returned, and the disputed Indexer will not be slashed. -- If the dispute is accepted, the GRT deposited by the Fishermen will be returned, the disputed Indexer will be slashed and the Fishermen will earn 50% of the slashed GRT. +- Si la contestation est rejetée, le GRT déposé par les Pêcheurs sera brûlé, et l'Indexeur contesté ne sera pas sabré. +- Si le différend est réglé par un match nul, la caution du pêcheur sera restituée et l'indexeur contesté ne sera pas réduit. +- Si la contestation est acceptée, le GRT déposé par les Pêcheurs sera restitué, l'Indexeur contesté sera réduit et les Pêcheurs gagneront 50% du GRT réduit. -Disputes can be viewed in the UI in an Indexer's profile page under the `Disputes` tab. +Les litiges peuvent être consultés dans l'interface utilisateur sur la page de profil d'un indexeur sous l'onglet `Différends`. -### What are query fee rebates and when are they distributed? +### Que sont les remises sur les frais de requête et quand sont-elles distribuées ? -Query fees are collected by the gateway and distributed to indexers according to the exponential rebate function (see GIP [here](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162)). The exponential rebate function is proposed as a way to ensure indexers achieve the best outcome by faithfully serving queries. It works by incentivizing Indexers to allocate a large amount of stake (which can be slashed for erring when serving a query) relative to the amount of query fees they may collect. +Les frais de requête sont collectés par la passerelle et distribués aux indexeurs selon la fonction de remise exponentielle (voir GIP [ici](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for -indexers/4162)). La fonction de remise exponentielle est proposée comme moyen de garantir que les indexeurs obtiennent le meilleur résultat en répondant fidèlement aux requêtes. Il fonctionne en incitant les indexeurs à allouer une part importante (qui peut être réduite en cas d'erreur lors de la réponse à une requête) par rapport au montant des frais de requête qu'ils peuvent percevoir. -Once an allocation has been closed the rebates are available to be claimed by the Indexer. Upon claiming, the query fee rebates are distributed to the Indexer and their Delegators based on the query fee cut and the exponential rebate function. +Une fois qu'une allocation a été clôturée, les remises peuvent être réclamées par l'indexeur. Lors de la réclamation, les remises sur les frais de requête sont distribuées à l'indexeur et à leurs délégués en fonction de la réduction des frais de requête et de la fonction de remise exponentielle. -### What is query fee cut and indexing reward cut? +### Qu'est-ce que la réduction des frais de requête et la réduction des récompenses d'indexation ? -The `queryFeeCut` and `indexingRewardCut` values are delegation parameters that the Indexer may set along with cooldownBlocks to control the distribution of GRT between the Indexer and their Delegators. See the last steps in [Staking in the Protocol](/network/indexing#stake-in-the-protocol) for instructions on setting the delegation parameters. +Les valeurs `queryFeeCut` et `indexingRewardCut` sont des paramètres de délégation que l'indexeur peut définir avec cooldownBlocks pour contrôler la distribution du GRT entre l'indexeur et ses délégués. Consultez les dernières étapes dans [Jalonnement dans le protocole](/network/indexing#stake-in-the-protocol) pour obtenir des instructions sur la définition des paramètres de délégation. -- **queryFeeCut** - the % of query fee rebates that will be distributed to the Indexer. If this is set to 95%, the Indexer will receive 95% of the query fees earned when an allocation is closed with the other 5% going to the Delegators. +- **queryFeeCut** : % de remise sur les frais de requête qui sera distribuée à l'indexeur. Si ce taux est fixé à 95 %, l'indexeur recevra 95 % des frais de requête gagnés lorsqu'une allocation est clôturée, les 5 % restants étant reversés aux délégateurs. -- **indexingRewardCut** - the % of indexing rewards that will be distributed to the Indexer. If this is set to 95%, the Indexer will receive 95% of the indexing rewards when an allocation is closed and the Delegators will split the other 5%. +- **indexingRewardCut** - le % de récompenses d'indexation qui seront distribuées à l'indexeur. Si ce taux est fixé à 95 %, l'indexeur recevra 95 % des récompenses d'indexation lorsqu'une allocation est clôturée et les délégateurs se partageront les 5 % restants. -### How do Indexers know which subgraphs to index? +### Comment les indexeurs savent-ils quels subgraphs indexer ? -Indexers may differentiate themselves by applying advanced techniques for making subgraph indexing decisions but to give a general idea we'll discuss several key metrics used to evaluate subgraphs in the network: +Les indexeurs peuvent se différencier en appliquant des techniques avancées pour prendre des décisions d'indexation de subgraphs, mais pour donner une idée générale, nous discuterons de plusieurs mesures clés utilisées pour évaluer les subgraphs du réseau : -- **Curation signal** - The proportion of network curation signal applied to a particular subgraph is a good indicator of the interest in that subgraph, especially during the bootstrap phase when query voluming is ramping up. +- **Signal de curation** : la proportion de signal de curation de réseau appliquée à un subgraph particulier est un bon indicateur de l'intérêt porté à ce subgraph, en particulier pendant la phase d'amorçage lorsque le volume des requêtes augmente. . -- **Query fees collected** - The historical data for volume of query fees collected for a specific subgraph is a good indicator of future demand. +- **Frais de requête collectés** : les données historiques sur le volume des frais de requête collectés pour un subgraph spécifique sont un bon indicateur de la demande future. -- **Amount staked** - Monitoring the behavior of other Indexers or looking at proportions of total stake allocated towards specific subgraphs can allow an Indexer to monitor the supply side for subgraph queries to identify subgraphs that the network is showing confidence in or subgraphs that may show a need for more supply. +- **Montant mis en jeu** : surveiller le comportement des autres indexeurs ou examiner les proportions de la mise totale allouées à des subgraphs spécifiques peut permettre à un indexeur de surveiller l'offre pour les requêtes de subgraphs afin d'identifier les subgraphs qui le réseau fait preuve de confiance dans des subgraphs qui peuvent montrer un besoin d'approvisionnement accru. -- **Subgraphs with no indexing rewards** - Some subgraphs do not generate indexing rewards mainly because they are using unsupported features like IPFS or because they are querying another network outside of mainnet. You will see a message on a subgraph if it is not generating indexing rewards. +- **Subgraphs sans récompenses d'indexation** : certains subgraphs ne génèrent pas de récompenses d'indexation principalement parce qu'ils utilisent des fonctionnalités non prises en charge comme IPFS ou parce qu'ils interrogent un autre réseau en dehors du réseau principal. Vous verrez un message sur un subgraph s'il ne génère pas de récompenses d'indexation. -### What are the hardware requirements? +### Quelle est la configuration matérielle requise ? -- **Small** - Enough to get started indexing several subgraphs, will likely need to be expanded. -- **Standard** - Default setup, this is what is used in the example k8s/terraform deployment manifests. -- **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. -- **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. +- **Petit** - Assez pour commencer à indexer plusieurs subgraphs, il faudra probablement l'étendre. +- **Standard** - Configuration par défaut, c'est ce qui est utilisé dans l'exemple de manifeste de déploiement k8s/terraform. +- **Moyen** - Indexeur de production prenant en charge 100 subgraphs et 200 à 500 requêtes par seconde. +- **Large** : Prêt à indexer tous les subgraphs actuellement utilisés et à répondre aux demandes pour le trafic associé. -| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Installation | Postgres
(CPUs) | Postgres
(mémoire en Gbs) | Postgres
(disque en TB) | VMs
(CPUs) | VMs
(mémoire en Gbs) | +| ------------ |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| +| Petit | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 11 | 12 | 48 | +| Moyen | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | | -### What are some basic security precautions an Indexer should take? +### Quelles sont les précautions de sécurité de base qu’un indexeur doit prendre ? -- **Operator wallet** - Setting up an operator wallet is an important precaution because it allows an Indexer to maintain separation between their keys that control stake and those that are in control of day-to-day operations. See [Stake in Protocol](/network/indexing#stake-in-the-protocol) for instructions. +- **Portefeuille d'opérateur** : la configuration d'un portefeuille d'opérateur est une précaution importante car elle permet à un indexeur de maintenir une séparation entre ses clés qui contrôlent la participation et celles qui contrôlent les opérations quotidiennes. opérations de jour. Voir [Participation dans le protocole](/network/indexing#stake-in-the-protocol) pour les instructions. -- **Firewall** - Only the Indexer service needs to be exposed publicly and particular attention should be paid to locking down admin ports and database access: the Graph Node JSON-RPC endpoint (default port: 8030), the Indexer management API endpoint (default port: 18000), and the Postgres database endpoint (default port: 5432) should not be exposed. +- **Pare-feu** : seul le service Indexer doit être exposé publiquement et une attention particulière doit être accordée au verrouillage des ports d'administration et de l'accès à la base de données : le point de terminaison JSON-RPC de Graph Node (port par défaut : 8030), le point de terminaison de l'API de gestion de l'indexeur (port par défaut : 18000) et le point de terminaison de la base de données Postgres (port par défaut : 5432) ne doivent pas être exposés. ## Infrastructure -At the center of an Indexer's infrastructure is the Graph Node which monitors the indexed networks, extracts and loads data per a subgraph definition and serves it as a [GraphQL API](/about/#how-the-graph-works). The Graph Node needs to be connected to an endpoint exposing data from each indexed network; an IPFS node for sourcing data; a PostgreSQL database for its store; and Indexer components which facilitate its interactions with the network. +Au centre de l'infrastructure d'un indexeur se trouve le nœud Graph qui surveille les réseaux indexés, extrait et charge les données selon une définition de subgraph et le sert d'[API GraphQL. ](/about/#how-the-graph-works). Le nœud graph doit être connecté à un point de terminaison exposant les données de chaque réseau indexé ; un nœud IPFS pour la recherche de données ; une base de données PostgreSQL pour son magasin ; et des composants d'indexeur qui facilitent ses interactions avec le réseau. -- **PostgreSQL database** - The main store for the Graph Node, this is where subgraph data is stored. The Indexer service and agent also use the database to store state channel data, cost models, indexing rules, and allocation actions. +- **Base de données PostgreSQL** - Le magasin principal du nœud graph, c'est là que les données du subgraph sont stockées. Le service et l'agent Indexeur utilisent également la base de données pour stocker les données du canal d'état, les modèles de coûts, les règles d'indexation et les actions d'allocation. -- **Data endpoint** - For EVM-compatible networks, Graph Node needs to be connected to an endpoint that exposes an EVM-compatible JSON-RPC API. This may take the form of a single client or it could be a more complex setup that load balances across multiple. It's important to be aware that certain subgraphs will require particular client capabilities such as archive mode and/or the parity tracing API. +- **Point de terminaison des données** : pour les réseaux compatibles EVM, Graph Node doit être connecté à un point de terminaison qui expose une API JSON-RPC compatible EVM. Cela peut prendre la forme d'un client unique ou d'une configuration plus complexe qui équilibre la charge sur plusieurs. Il est important de savoir que certains subgraphs nécessiteront des fonctionnalités client particulières telles que le mode archive et/ou l'API de traçage de parité. -- **IPFS node (version less than 5)** - Subgraph deployment metadata is stored on the IPFS network. The Graph Node primarily accesses the IPFS node during subgraph deployment to fetch the subgraph manifest and all linked files. Network Indexers do not need to host their own IPFS node, an IPFS node for the network is hosted at https://ipfs.network.thegraph.com. +- **Nœud IPFS (version inférieure à 5)** : les métadonnées de déploiement de Subgraph sont stockées sur le réseau IPFS. Le nœud Graph accède principalement au nœud IPFS pendant le déploiement du subgraph pour récupérer le manifeste du sugraph et btous les fichiers liés. Les indexeurs de réseau n'ont pas besoin d'héberger leur propre nœud IPFS, un nœud IPFS pour le réseau est hébergé sur https://ipfs.network.thegraph.com. -- **Indexer service** - Handles all required external communications with the network. Shares cost models and indexing statuses, passes query requests from gateways on to a Graph Node, and manages the query payments via state channels with the gateway. +- **Service d'indexation** : gère toutes les communications externes requises avec le réseau. Partage les modèles de coûts et les statuts d'indexation, transmet les demandes de requête des passerelles à un nœud graphlm et gère les paiements des requêtes via les canaux d'état avec la passerelle. -- **Indexer agent** - Facilitates the Indexers interactions on chain including registering on the network, managing subgraph deployments to its Graph Node/s, and managing allocations. +- **Agent indexeur** - Facilite les interactions des indexeurs sur la chaîne, y compris l'enregistrement sur le réseau, la gestion des déploiements de subgraphs sur son(ses) nœud(s) graph(s) et la gestion des allocations. -- **Prometheus metrics server** - The Graph Node and Indexer components log their metrics to the metrics server. +- **Serveur de métriques Prometheus** : les composants Graph Node et Indexer enregistrent leurs métriques sur le serveur de métriques. -Note: To support agile scaling, it is recommended that query and indexing concerns are separated between different sets of nodes: query nodes and index nodes. +Remarque : Pour prendre en charge la mise à l'échelle agile, il est recommandé de séparer les problèmes de requête et d'indexation entre différents ensembles de nœuds : nœuds de requête et nœuds d'index. -### Ports overview +### Aperçu des ports -> **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC and the Indexer management endpoints detailed below. +> **Important** : Soyez prudent lorsque vous exposez les ports publiquement : les **ports d'administration** doivent être maintenus verrouillés. Cela inclut les points de terminaison de gestion Graph Node JSON-RPC et Indexer détaillés ci-dessous. #### Nœud de The Graph -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent -| Port | Purpose | Routes | CLI Argument | Environment Variable | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | | ---- | ---------------------- | ------ | ------------------------- | --------------------------------------- | | 8000 | Indexer management API | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | -### Setup server infrastructure using Terraform on Google Cloud +### Configurer l'infrastructure du serveur à l'aide de Terraform sur Google Cloud > Note: Indexers can alternatively use AWS, Microsoft Azure, or Alibaba. -#### Install prerequisites +#### Conditions préalables à l'installation - Google Cloud SDK - Kubectl command line tool - Terraform -#### Create a Google Cloud Project +#### Créer un projet Google Cloud -- Clone or navigate to the Indexer repository. +- Clonez ou accédez au référentiel Indexer. -- Navigate to the ./terraform directory, this is where all commands should be executed. +- Accédez au répertoire ./terraform, c'est là que toutes les commandes doivent être exécutées. ```sh cd terraform ``` -- Authenticate with Google Cloud and create a new project. +- Authentifiez-vous auprès de Google Cloud et créez un nouveau projet. ```sh gcloud auth login @@ -198,9 +198,9 @@ project= gcloud projects create --enable-cloud-apis $project ``` -- Use the Google Cloud Console's billing page to enable billing for the new project. +- Utilisez la page de facturation de Google Cloud Console pour activer la facturation du nouveau projet. -- Create a Google Cloud configuration. +- Créez une configuration Google Cloud. ```sh proj_id=$(gcloud projects list --format='get(project_id)' --filter="name=$project") @@ -210,7 +210,7 @@ gcloud config set compute/region us-central1 gcloud config set compute/zone us-central1-a ``` -- Enable required Google Cloud APIs. +- Activez les API Google Cloud requises. ```sh gcloud services enable compute.googleapis.com @@ -219,7 +219,7 @@ gcloud services enable servicenetworking.googleapis.com gcloud services enable sqladmin.googleapis.com ``` -- Create a service account. +- Créez un compte de service. ```sh svc_name= @@ -237,7 +237,7 @@ gcloud projects add-iam-policy-binding $proj_id \ --role roles/editor ``` -- Enable peering between database and Kubernetes cluster that will be created in the next step. +- Activez le peering entre la base de données et le cluster Kubernetes qui sera créé à l'étape suivante. ```sh gcloud compute addresses create google-managed-services-default \ @@ -251,7 +251,7 @@ gcloud services vpc-peerings connect \ --ranges=google-managed-services-default ``` -- Create minimal terraform configuration file (update as needed). +- Créez un fichier de configuration Terraform minimal (mettez à jour si nécessaire). ```sh indexer= @@ -262,24 +262,24 @@ database_password = "" EOF ``` -#### Use Terraform to create infrastructure +#### Utiliser Terraform pour créer une infrastructure -Before running any commands, read through [variables.tf](https://github.com/graphprotocol/indexer/blob/main/terraform/variables.tf) and create a file `terraform.tfvars` in this directory (or modify the one we created in the last step). For each variable where you want to override the default, or where you need to set a value, enter a setting into `terraform.tfvars`. +Avant d'exécuter des commandes, lisez [variables.tf](https://github.com/graphprotocol/indexer/blob/main/terraform/variables.tf) et créez un fichier `terraform .tfvars` dans ce répertoire (ou modifiez celui que nous avons créé à la dernière étape). Pour chaque variable dont vous souhaitez remplacer la valeur par défaut ou pour laquelle vous devez définir une valeur, entrez un paramètre dans `terraform.tfvars`. -- Run the following commands to create the infrastructure. +- Exécutez les commandes suivantes pour créer l'infrastructure. ```sh -# Install required plugins +# Installer les Plugins Requis terraform init -# View plan for resources to be created +# Afficher le plan des ressources à créer terraform plan -# Create the resources (expect it to take up to 30 minutes) +# Créez les ressources (attendez-vous à ce que cela prenne jusqu'à 30 minutes) terraform apply ``` -Download credentials for the new cluster into `~/.kube/config` and set it as your default context. +Téléchargez les informations d'identification du nouveau cluster dans `~/.kube/config` et définissez-le comme contexte par défaut. ```sh gcloud container clusters get-credentials $indexer @@ -287,21 +287,21 @@ kubectl config use-context $(kubectl config get-contexts --output='name' | grep $indexer) ``` -#### Creating the Kubernetes components for the Indexer +#### Création des composants Kubernetes pour l'indexeur -- Copy the directory `k8s/overlays` to a new directory `$dir,` and adjust the `bases` entry in `$dir/kustomization.yaml` so that it points to the directory `k8s/base`. +- Copiez le répertoire `k8s/overlays` dans un nouveau répertoire `$dir,` et ajustez l'entrée `bases` dans `$dir/kustomization.yaml`pour qu'il pointe vers le répertoire `k8s/base`. -- Read through all the files in `$dir` and adjust any values as indicated in the comments. +- Lisez tous les fichiers dans `$dir` et ajustez les valeurs comme indiqué dans les commentaires. -Deploy all resources with `kubectl apply -k $dir`. +Déployez toutes les ressources avec `kubectl apply -k $dir`. ### Nœud de The Graph -[Graph Node](https://github.com/graphprotocol/graph-node) is an open source Rust implementation that event sources the Ethereum blockchain to deterministically update a data store that can be queried via the GraphQL endpoint. Developers use subgraphs to define their schema, and a set of mappings for transforming the data sourced from the block chain and the Graph Node handles syncing the entire chain, monitoring for new blocks, and serving it via a GraphQL endpoint. +[Graph Node](https://github.com/graphprotocol/graph-node) est une implémentation open source de Rust qui génère des événements sur la blockchain Ethereum pour mettre à jour de manière déterministe un magasin de données qui peut être interrogé via le Point de terminaison GraphQL. Les développeurs utilisent des subgraphs pour définir leur schéma et un ensemble de mappages pour transformer les données provenant de la chaîne de blocs et le Graph Node gère la synchronisation de l'ensemble de la chaîne, la surveillance des nouveaux blocs et leur diffusion via un point de terminaison GraphQL. -#### Getting started from source +#### Commencer à partir des sources -#### Install prerequisites +#### Conditions préalables à l'installation - **Rust** @@ -309,13 +309,13 @@ Deploy all resources with `kubectl apply -k $dir`. - **IPFS** -- **Additional Requirements for Ubuntu users** - To run a Graph Node on Ubuntu a few additional packages may be needed. +- **Exigences supplémentaires pour les utilisateurs d'Ubuntu** - Pour exécuter un nœud graphique sur Ubuntu, quelques packages supplémentaires peuvent être nécessaires. ```sh sudo apt-get install -y clang libpg-dev libssl-dev pkg-config ``` -#### Setup +#### Installation 1. Start a PostgreSQL database server @@ -325,9 +325,9 @@ pg_ctl -D .postgres -l logfile start createdb graph-node ``` -2. Clone [Graph Node](https://github.com/graphprotocol/graph-node) repo and build the source by running `cargo build` +2. Clonez le dépôt [Graph Node](https://github.com/graphprotocol/graph-node) et créez la source en exécutant `cargo build` -3. Now that all the dependencies are setup, start the Graph Node: +3. Maintenant que toutes les dépendances sont configurées, démarrez le Graph Node : ```sh cargo run -p graph-node --release -- \ @@ -340,44 +340,44 @@ cargo run -p graph-node --release -- \ #### Conditions préalables -- **Ethereum node** - By default, the docker compose setup will use mainnet: [http://host.docker.internal:8545](http://host.docker.internal:8545) to connect to the Ethereum node on your host machine. You can replace this network name and url by updating `docker-compose.yaml`. +- **Nœud Ethereum** – Par défaut, la configuration de Docker Compose utilisera le réseau principal : [http:// host.docker.internal:8545](http://host.docker.internal:8545) pour vous connecter au nœud Ethereum sur votre machine hôte. Vous pouvez remplacer ce nom de réseau et cette Url en mettant à jour `docker-compose.yaml`. -#### Setup +#### Installation -1. Clone Graph Node and navigate to the Docker directory: +1. Clonez Graph Node et accédez au répertoire Docker : ```sh git clone https://github.com/graphprotocol/graph-node cd graph-node/docker ``` -2. For linux users only - Use the host IP address instead of `host.docker.internal` in the `docker-compose.yaml`using the included script: +2. Pour les utilisateurs Linux uniquement - Utilisez l'adresse IP de l'hôte au lieu de `host.docker.internal` dans le `docker-compose.yaml`à l'aide du script inclus : ```sh ./setup.sh ``` -3. Start a local Graph Node that will connect to your Ethereum endpoint: +3. Démarrez un nœud graph local qui se connectera à votre point de terminaison Ethereum : ```sh docker-compose up ``` -### Indexer components +### Composants de l'indexeur -To successfully participate in the network requires almost constant monitoring and interaction, so we've built a suite of Typescript applications for facilitating an Indexers network participation. There are three Indexer components: +Pour participer avec succès au réseau, il faut une surveillance et une interaction presque constantes. Nous avons donc créé une suite d'applications Typescript pour faciliter la participation au réseau des indexeurs. Il existe trois composants d'indexeur : -- **Indexer agent** - The agent monitors the network and the Indexer's own infrastructure and manages which subgraph deployments are indexed and allocated towards on chain and how much is allocated towards each. +- **Agent indexeur** - L'agent surveille le réseau et la propre infrastructure de l'indexeur et gère les déploiements de subgraphs qui sont indexés et alloués sur la chaîne et la quantité allouée à chacun. -- **Indexer service** - The only component that needs to be exposed externally, the service passes on subgraph queries to the graph node, manages state channels for query payments, shares important decision making information to clients like the gateways. +- **Service d'indexation** : seul composant qui doit être exposé en externe, le service transmet les requêtes de subgraph au nœud de graph, gère les canaux d'état pour les paiements des requêtes, partage des informations importantes pour la prise de décision. aux clients comme les passerelles. -- **Indexer CLI** - The command line interface for managing the Indexer agent. It allows Indexers to manage cost models, manual allocations, actions queue, and indexing rules. +- **Indexer CLI** - L'interface de ligne de commande pour gérer l'agent Indexer. Il permet aux indexeurs de gérer les modèles de coûts, les allocations manuelles, la file d'attente d'actions et les règles d'indexation. -#### Getting started +#### Commencer -The Indexer agent and Indexer service should be co-located with your Graph Node infrastructure. There are many ways to set up virtual execution environments for your Indexer components; here we'll explain how to run them on baremetal using NPM packages or source, or via kubernetes and docker on the Google Cloud Kubernetes Engine. If these setup examples do not translate well to your infrastructure there will likely be a community guide to reference, come say hi on [Discord](https://discord.gg/graphprotocol)! Remember to [stake in the protocol](/network/indexing#stake-in-the-protocol) before starting up your Indexer components! +L’agent Indexer et le service Indexer doivent être colocalisés avec votre infrastructure Graph Node. Il existe de nombreuses façons de configurer des environnements d'exécution virtuels pour vos composants Indexer ; nous expliquerons ici comment les exécuter sur baremetal à l'aide des packages ou de la source NPM, ou via kubernetes et docker sur Google Cloud Kubernetes Engine. Si ces exemples de configuration ne s'adaptent pas bien à votre infrastructure, il y aura probablement un guide communautaire à consulter, venez nous dire bonjour sur [Discord](https://discord.gg/graphprotocol) ! N'oubliez pas de [participer au protocole](/network/indexing#stake-in-the-protocol) avant de démarrer vos composants Indexer ! -#### From NPM packages +#### À partir des packages NPM ```sh npm install -g @graphprotocol/indexer-service @@ -400,7 +400,7 @@ graph indexer connect http://localhost:18000/ graph indexer ... ``` -#### From source +#### De la source ```sh # From Repo root directory @@ -420,16 +420,16 @@ cd packages/indexer-cli ./bin/graph-indexer-cli indexer ... ``` -#### Using docker +#### Utiliser docker -- Pull images from the registry +- Extraire les images du registre ```sh docker pull ghcr.io/graphprotocol/indexer-service:latest docker pull ghcr.io/graphprotocol/indexer-agent:latest ``` -Or build images locally from source +Ou créez des images localement à partir de la source ```sh # Indexer service @@ -444,7 +444,7 @@ docker build \ -t indexer-agent:latest \ ``` -- Run the components +- Exécutez les composants ```sh docker run -p 7600:7600 -it indexer-service:latest ... @@ -453,13 +453,13 @@ docker run -p 18000:8000 -it indexer-agent:latest ... **NOTE**: After starting the containers, the Indexer service should be accessible at [http://localhost:7600](http://localhost:7600) and the Indexer agent should be exposing the Indexer management API at [http://localhost:18000/](http://localhost:18000/). -#### Using K8s and Terraform +#### Utilisation de K8s et Terraform -See the [Setup Server Infrastructure Using Terraform on Google Cloud](/network/indexing#setup-server-infrastructure-using-terraform-on-google-cloud) section +Consultez la section [Configurer l'infrastructure du serveur à l'aide de Terraform sur Google Cloud](/network/indexing#setup-server-infrastructure-using-terraform-on-google-cloud) #### Usage -> **NOTE**: All runtime configuration variables may be applied either as parameters to the command on startup or using environment variables of the format `COMPONENT_NAME_VARIABLE_NAME`(ex. `INDEXER_AGENT_ETHEREUM`). +> **REMARQUE** : Toutes les variables de configuration d'exécution peuvent être appliquées soit en tant que paramètres à la commande au démarrage, soit en utilisant des variables d'environnement au format `COMPONENT_NAME_VARIABLE_NAME` (ex. `INDEXER_AGENT_ETHEREUM`). #### Indexer agent @@ -525,47 +525,47 @@ graph indexer connect http://localhost:18000 graph indexer status ``` -#### Indexer management using Indexer CLI +#### Gestion de l'indexeur à l'aide de l'indexeur CLI -The suggested tool for interacting with the **Indexer Management API** is the **Indexer CLI**, an extension to the **Graph CLI**. The Indexer agent needs input from an Indexer in order to autonomously interact with the network on the behalf of the Indexer. The mechanism for defining Indexer agent behavior are **allocation management** mode and **indexing rules**. Under auto mode, an Indexer can use **indexing rules** to apply their specific strategy for picking subgraphs to index and serve queries for. Rules are managed via a GraphQL API served by the agent and known as the Indexer Management API. Under manual mode, an Indexer can create allocation actions using **actions queue** and explicitly approve them before they get executed. Under oversight mode, **indexing rules** are used to populate **actions queue** and also require explicit approval for execution. +L'outil suggéré pour interagir avec l'**API de gestion de l'indexeur** est la **CLI de l'indexeur**, une extension de l'**Graphique CLI**. L'agent indexeur a besoin de l'entrée d'un indexeur afin d'interagir de manière autonome avec le réseau au nom de l'indexeur. Le mécanisme permettant de définir le comportement de l'agent Indexeur est le mode de **gestion des allocations** et les **règles d'indexation**. En mode automatique, un indexeur peut utiliser des **règles d'indexation** pour appliquer sa stratégie spécifique de sélection des subgraphs à indexer et pour lesquels servir des requêtes. Les règles sont gérées via une API GraphQL servie par l'agent et connue sous le nom d'API de gestion de l'indexeur. En mode manuel, un indexeur peut créer des actions d'allocation à l'aide de la **file d'attente d'actions** et les approuver explicitement avant qu'elles ne soient exécutées. En mode surveillance, les **règles d'indexation** sont utilisées pour remplir la **file d'attente des actions** et nécessitent également une approbation explicite pour l'exécution. #### Usage -The **Indexer CLI** connects to the Indexer agent, typically through port-forwarding, so the CLI does not need to run on the same server or cluster. To help you get started, and to provide some context, the CLI will briefly be described here. +La **Indexer CLI** se connecte à l'agent Indexer, généralement via la redirection de port, de sorte que la CLI n'a pas besoin de s'exécuter sur le même serveur ou cluster. Pour vous aider à démarrer et pour fournir un certain contexte, la CLI sera brièvement décrite ici. -- `graph indexer connect ` - Connect to the Indexer management API. Typically the connection to the server is opened via port forwarding, so the CLI can be easily operated remotely. (Example: `kubectl port-forward pod/ 8000:8000`) +- La **Indexer CLI** se connecte à l'agent Indexer, généralement via la redirection de port, de sorte que la CLI n'a pas besoin de s'exécuter sur le même serveur ou cluster. Pour vous aider à démarrer et pour fournir un certain contexte, la CLI sera brièvement décrite ici -- `graph indexer rules get [options] [ ...]` - Get one or more indexing rules using `all` as the `` to get all rules, or `global` to get the global defaults. An additional argument `--merged` can be used to specify that deployment specific rules are merged with the global rule. This is how they are applied in the Indexer agent. +- Les règles de l'indexeur de graphs ` obtiennent [options] [ ...]` - Obtenez une ou plusieurs règles d'indexation en utilisant `all` comme `` pour obtenir toutes les règles, ou `global` pour obtenir les valeurs par défaut globales. Un argument supplémentaire `--merged` peut être utilisé pour spécifier que les règles spécifiques au déploiement sont fusionnées avec la règle globale. C'est ainsi qu'ils sont appliqués dans l'agent Indexeur. -- `graph indexer rules set [options] ...` - Set one or more indexing rules. +- `ensemble de règles de l'indexeur de graphs [options] ...` - Définissez une ou plusieurs règles d'indexation. -- `graph indexer rules start [options] ` - Start indexing a subgraph deployment if available and set its `decisionBasis` to `always`, so the Indexer agent will always choose to index it. If the global rule is set to always then all available subgraphs on the network will be indexed. +- `graph indexer Rules start [options] ` - Commencez à indexer un déploiement de subgraph si disponible et définissez sa `decisionBasis` sur `toujours`, donc l'agent Indexeur choisira toujours de l'indexer. Si la règle globale est définie sur toujours, tous les sugraphs disponibles sur le réseau seront indexés. -- `graph indexer rules stop [options] ` - Stop indexing a deployment and set its `decisionBasis` to never, so it will skip this deployment when deciding on deployments to index. +- `graph indexer Rules stop [options] ` - Arrêtez d'indexer un déploiement et définissez sa `decisionBasis` sur jamais, de sorte qu'il ignorera ce déploiement lors de la décision sur les déploiements à indice. -- `graph indexer rules maybe [options] ` — Set the `decisionBasis` for a deployment to `rules`, so that the Indexer agent will use indexing rules to decide whether to index this deployment. +- `règles de l'indexeur graphique peut-être [options] ` — Définissez le `decisionBasis` pour un déploiement sur `rules`, afin que l'agent indexeur utilisez des règles d'indexation pour décider d'indexer ou non ce déploiement. -- `graph indexer actions get [options] ` - Fetch one or more actions using `all` or leave `action-id` empty to get all actions. An additonal argument `--status` can be used to print out all actions of a certain status. +- `graph indexer actions get [options] ` - Récupère une ou plusieurs actions en utilisant `all` ou laissez `action-id` vide pour obtenir toutes les actions. Un argument supplémentaire `--status` peut être utilisé pour imprimer toutes les actions d'un certain statut. -- `graph indexer action queue allocate ` - Queue allocation action +- `file d'attente d'action de l'indexeur de graphs alloue ` - Action d'allocation de file d'attente -- `graph indexer action queue reallocate ` - Queue reallocate action +- `réaffectation de la file d'attente des actions de l'indexeur de graphs ` - Action de réaffectation de la file d'attente -- `graph indexer action queue unallocate ` - Queue unallocate action +- `file d'attente d'action de l'indexeur de graphs désallouer ` - Mettre en file d'attente l'action de désallocation -- `graph indexer actions cancel [ ...]` - Cancel all action in the queue if id is unspecified, otherwise cancel array of id with space as separator +- Les actions de l'indexeur de graphs ` annulent [ ...]` - Annuler toutes les actions dans la file d'attente si l'identifiant n'est pas spécifié, sinon annuler le tableau d'identifiants avec un espace comme séparateur -- `graph indexer actions approve [ ...]` - Approve multiple actions for execution +- `les actions de l'indexeur de graphs approuvent [ ...]` - Approuver plusieurs actions à exécuter -- `graph indexer actions execute approve` - Force the worker to execute approved actions immediately +- `les actions de l'indexeur de graphs exécutent l'approbation` - Force le travailleur à exécuter immédiatement les actions approuvées -All commands which display rules in the output can choose between the supported output formats (`table`, `yaml`, and `json`) using the `-output` argument. +Toutes les commandes qui affichent les règles dans la sortie peuvent choisir entre les formats de sortie pris en charge (`table`, `yaml` et `json`) à l'aide du `- argument de sortie`. #### Indexing rules -Indexing rules can either be applied as global defaults or for specific subgraph deployments using their IDs. The `deployment` and `decisionBasis` fields are mandatory, while all other fields are optional. When an indexing rule has `rules` as the `decisionBasis`, then the Indexer agent will compare non-null threshold values on that rule with values fetched from the network for the corresponding deployment. If the subgraph deployment has values above (or below) any of the thresholds it will be chosen for indexing. +Les règles d'indexation peuvent être appliquées soit comme valeurs par défaut globales, soit pour des déploiements de subgraphs spécifiques à l'aide de leurs ID. Les champs `deployment` et `decisionBasis` sont obligatoires, tandis que tous les autres champs sont facultatifs. Lorsqu'une règle d'indexation a `rules` comme `decisionBasis`, l'agent indexeur comparera les valeurs de seuil non nulles sur cette règle avec les valeurs extraites du réseau pour le déploiement correspondant. Si le déploiement du subgraph a des valeurs supérieures (ou inférieures) à l'un des seuils, il sera choisi pour l'indexation. -For example, if the global rule has a `minStake` of **5** (GRT), any subgraph deployment which has more than 5 (GRT) of stake allocated to it will be indexed. Threshold rules include `maxAllocationPercentage`, `minSignal`, `maxSignal`, `minStake`, and `minAverageQueryFees`. +Par exemple, si la règle globale a un `minStake` de **5** (GRT), tout déploiement de subgraph ayant plus de 5 (GRT) d'enjeu qui lui est alloué seront indexés. Les règles de seuil incluent `maxAllocationPercentage`, `minSignal`, `maxSignal`, `minStake` et `minAverageQueryFees`. Data model: @@ -601,7 +601,7 @@ IndexingDecisionBasis { } ``` -Example usage of indexing rule: +Exemple d'utilisation de la règle d'indexation : ``` graph indexer rules offchain QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK @@ -615,16 +615,16 @@ graph indexer rules delete QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK #### Actions queue CLI -The indexer-cli provides an `actions` module for manually working with the action queue. It uses the **Graphql API** hosted by the indexer management server to interact with the actions queue. +L'indexer-cli fournit un module `actions` pour travailler manuellement avec le fichier d'attente d'actions. Il utilise l'**API Graphql** hébergée par le serveur de gestion de l'indexeur pour interagir avec le fichier d'attente des actions. -The action execution worker will only grab items from the queue to execute if they have `ActionStatus = approved`. In the recommended path actions are added to the queue with ActionStatus = queued, so they must then be approved in order to be executed on-chain. The general flow will look like: +Le travailleur d'exécution d'action ne récupérera les éléments de la file d'attente à exécuter que s'ils ont `ActionStatus = approved`. Dans le chemin recommandé, les actions sont ajoutées à la file d'attente avec ActionStatus = queued, elles doivent donc ensuite être approuvées afin d'être exécutées en chaîne. Le flux général ressemblera à : -- Action added to the queue by the 3rd party optimizer tool or indexer-cli user -- Indexer can use the `indexer-cli` to view all queued actions -- Indexer (or other software) can approve or cancel actions in the queue using the `indexer-cli`. The approve and cancel commands take an array of action ids as input. -- The execution worker regularly polls the queue for approved actions. It will grab the `approved` actions from the queue, attempt to execute them, and update the values in the db depending on the status of execution to `success` or `failed`. -- If an action is successful the worker will ensure that there is an indexing rule present that tells the agent how to manage the allocation moving forward, useful when taking manual actions while the agent is in `auto` or `oversight` mode. -- The indexer can monitor the action queue to see a history of action execution and if needed re-approve and update action items if they failed execution. The action queue provides a history of all actions queued and taken. +- Action ajoutée à la file d'attente par l'outil d'optimisation tiers ou l'utilisateur indexeur-cli +- L'indexeur peut utiliser `indexer-cli` pour afficher toutes les actions en file d'attente +- L'indexeur (ou un autre logiciel) peut approuver ou annuler les actions dans la file d'attente à l'aide du `indexer-cli`. Les commandes d'approbation et d'annulation prennent un tableau d'identifiants d'action en entrée. +- L'agent d'exécution interroge régulièrement la file d'attente pour connaître les actions approuvées. Il récupérera les actions `approuvées` de la file d'attente, tentera de les exécuter et mettra à jour les valeurs dans la base de données en fonction de l'état d'exécution sur `succès` ou `échec`. +- Si une action réussit, le travailleur s'assurera qu'il existe une règle d'indexation qui indique à l'agent comment gérer l'allocation à l'avenir, utile lors de la réalisation d'actions manuelles lorsque l'agent est en mode `auto` ou `. mode surveillance`. +- L'indexeur peut surveiller la file d'attente des actions pour consulter un historique de l'exécution des actions et, si nécessaire, réapprouver et mettre à jour les éléments d'action en cas d'échec de leur exécution. La file d'attente des actions fournit un historique de toutes les actions mises en file d'attente et entreprises. Data model: @@ -659,7 +659,7 @@ ActionType { } ``` -Example usage from source: +Exemple d'utilisation à partir de la source : ```bash graph indexer actions get all @@ -679,57 +679,58 @@ graph indexer actions approve 1 3 5 graph indexer actions execute approve ``` -Note that supported action types for allocation management have different input requirements: +Notez que les types d'actions pris en charge pour la gestion des allocations ont des exigences d'entrée différentes : - `Allocate` - allocate stake to a specific subgraph deployment - - required action params: + - paramètres d'action requis : - deploymentID - amount -- `Unallocate` - close allocation, freeing up the stake to reallocate elsewhere +- `Annuler l'allocation` - clôturer l'allocation, libérant la mise pour la réaffecter ailleurs - - required action params: - - allocationID + - paramètres d'action requis : + - ID d'allocation - deploymentID - - optional action params: + - paramètres d'action facultatifs : - poi - - force (forces using the provided POI even if it doesn’t match what the graph-node provides) + - force (force l'utilisation du POI fourni même s'il ne correspond pas à ce que fournit le nœud graph) -- `Reallocate` - atomically close allocation and open a fresh allocation for the same subgraph deployment +- `Réallouer` - fermer atomiquement l'allocation et ouvrir une nouvelle allocation pour le même déploiement de subgraph - - required action params: - - allocationID + - paramètres d'action requis : + - ID d'allocation - deploymentID - amount - - optional action params: + - paramètres d'action facultatifs : - poi - - force (forces using the provided POI even if it doesn’t match what the graph-node provides) + - force (force l'utilisation du POI fourni même s'il ne correspond pas à ce que fournit le nœud graph) -#### Cost models +#### Modèles de coûts -Cost models provide dynamic pricing for queries based on market and query attributes. The Indexer Service shares a cost model with the gateways for each subgraph for which they intend to respond to queries. The gateways, in turn, use the cost model to make Indexer selection decisions per query and to negotiate payment with chosen Indexers. +Les modèles de coûts fournissent une tarification dynamique pour les requêtes en fonction des attributs du marché et des requêtes. Le service Indexeur partage un modèle de coût avec les passerelles pour chaque subgraph pour lequel elles ont l'intention de répondre aux requêtes. Les passerelles, à leur tour, utilisent le modèle de coût pour prendre des décisions de sélection des indexeurs par requête et pour négocier le paiement avec les indexeurs choisis. #### Agora -The Agora language provides a flexible format for declaring cost models for queries. An Agora price model is a sequence of statements that execute in order for each top-level query in a GraphQL query. For each top-level query, the first statement which matches it determines the price for that query. +Le langage Agora fournit un format flexible pour déclarer des modèles de coûts pour les requêtes. Un modèle de prix Agora est une séquence d'instructions qui s'exécutent dans l'ordre pour chaque requête de niveau supérieur dans une requête GraphQL. Pour chaque requête de niveau supérieur, la première instruction qui y correspond détermine le prix de cette requête. -A statement is comprised of a predicate, which is used for matching GraphQL queries, and a cost expression which when evaluated outputs a cost in decimal GRT. Values in the named argument position of a query may be captured in the predicate and used in the expression. Globals may also be set and substituted in for placeholders in an expression. +Une instruction est composée d'un prédicat, qui est utilisé pour faire correspondre les requêtes GraphQL, et d'une expression de coût qui, une fois évaluée, génère un coût en GRT décimal. Les valeurs dans la position d'argument nommé d'une requête peuvent être capturées dans le prédicat et utilisées dans l'expression. Des éléments globaux peuvent également être définis et remplacés par des espaces réservés dans une expression. -Example cost model: +Exemple de modèle de coût : ``` -# This statement captures the skip value, -# uses a boolean expression in the predicate to match specific queries that use `skip` -# and a cost expression to calculate the cost based on the `skip` value and the SYSTEM_LOAD global +# Cette instruction capture la valeur de saut, +# utiliser une expression booléenne dans le prédicat pour correspondre aux requêtes spécifiques qui utilisent `skip` +# et une expression de coût pour calculer le coût en fonction de la valeur `skip` et du SYSTEM_LOAD global query { pairs(skip: $skip) { id } } when $skip > 2000 => 0.0001 * $skip * $SYSTEM_LOAD; -# This default will match any GraphQL expression. -# It uses a Global substituted into the expression to calculate cost + +# Cette valeur par défaut correspondra à n'importe quelle expression GraphQL. +# Il utilise un Global substitué dans l'expression pour calculer le coût default => 0.1 * $SYSTEM_LOAD; ``` -Example query costing using the above model: +Exemple de calcul des coûts de requête utilisant le modèle ci-dessus : | Query | Price | | ---------------------------------------------------------------------------- | ------- | @@ -737,7 +738,7 @@ Example query costing using the above model: | { tokens { symbol } } | 0.1 GRT | | { pairs(skip: 5000) { id { tokens } symbol } } | 0.6 GRT | -#### Applying the cost model +#### Application du modèle de coût Les modèles de coûts sont appliqués via la CLI Indexer, qui les transmet à l'API de gestion de l'indexeur de l'agent Indexer pour les stocker dans la base de données. Le service d'indexation les récupérera ensuite et fournira les modèles de coûts aux passerelles chaque fois qu'elles les demanderont. @@ -746,56 +747,67 @@ indexer cost set variables '{ "SYSTEM_LOAD": 1.4 }' indexer cost set model my_model.agora ``` -## Interacting with the network +## Interagir avec le réseau + +### Enjeu dans le protocole -### Stake in the protocol +Les premières étapes pour participer au réseau en tant qu'indexeur consistent à approuver le protocole, à investir des fonds et (éventuellement) à configurer une adresse d'opérateur pour les interactions quotidiennes du protocole. _ **Remarque** : Aux fins de ces instructions, Remix sera utilisé pour l'interaction contractuelle, mais n'hésitez pas à utiliser l'outil de votre choix ([OneClickDapp](https://oneclickdapp.com/), -The first steps to participating in the network as an Indexer are to approve the protocol, stake funds, and (optionally) set up an operator address for day-to-day protocol interactions. _ **Note**: For the purposes of these instructions Remix will be used for contract interaction, but feel free to use your tool of choice ([OneClickDapp](https://oneclickdapp.com/), [ABItopic](https://abitopic.io/), and [MyCrypto](https://www.mycrypto.com/account) are a few other known tools)._ +ABItopic et [MyCrypto](https://www.mycrypto.com/account) sont quelques autres outils connus)._

Once an Indexer has staked GRT in the protocol, the [Indexer components](/network/indexing#indexer-components) can be started up and begin their interactions with the network. -#### Approve tokens -1. Open the [Remix app](https://remix.ethereum.org/) in a browser -2. In the `File Explorer` create a file named **GraphToken.abi** with the [token ABI](https://raw.githubusercontent.com/graphprotocol/contracts/mainnet-deploy-build/build/abis/GraphToken.json). +#### Approuver les jetons + +1. Ouvrez l'[application Remix](https://remix.ethereum.org/) dans un navigateur -3. With `GraphToken.abi` selected and open in the editor, switch to the Deploy and `Run Transactions` section in the Remix interface. +2. Dans l'`Explorateur de fichiers`, créez un fichier nommé **GraphToken.abi** avec le [jeton ABI](https://raw.githubusercontent.com/graphprotocol/contracts/mainnet-deploy-build/build/abis/GraphToken.json). + +3. Avec `GraphToken.abi` sélectionné et ouvert dans l'éditeur, passez à la section Déployer et `Exécuter des transactions` dans l'interface Remix. 4. Sous Environnement, sélectionnez `Injected Web3` et sous `Compte` sélectionnez votre adresse d'indexeur. -5. Set the GraphToken contract address - Paste the GraphToken contract address (`0xc944E90C64B2c07662A292be6244BDf05Cda44a7`) next to `At Address` and click the `At address` button to apply. +5. Définissez l'adresse du contrat GraphToken : collez l'adresse du contrat GraphToken (`0xc944E90C64B2c07662A292be6244BDf05Cda44a7`) à côté de `À l'adresse` et cliquez sur le bouton `À l'adresse` pour appliquer. + +6. Appelez la fonction `approve(spender, montant)` pour approuver le contrat de Staking. Remplissez `spender` avec l'adresse du contrat de Staking (`0xF55041E37E12cD407ad00CE2910B8269B01263b9`) et `montant` avec les jetons à miser (en wei). + -6. Call the `approve(spender, amount)` function to approve the Staking contract. Fill in `spender` with the Staking contract address (`0xF55041E37E12cD407ad00CE2910B8269B01263b9`) and `amount` with the tokens to stake (in wei). -#### Stake tokens +#### Jetons de mise -1. Open the [Remix app](https://remix.ethereum.org/) in a browser +1. Ouvrez l'[application Remix](https://remix.ethereum.org/) dans un navigateur -2. In the `File Explorer` create a file named **Staking.abi** with the staking ABI. +2. Dans l'`Explorateur de fichiers`, créez un fichier nommé **Staking.abi** avec l'ABI de staking. -3. With `Staking.abi` selected and open in the editor, switch to the `Deploy` and `Run Transactions` section in the Remix interface. +3. Avec `Staking.abi` sélectionné et ouvert dans l'éditeur, passez aux sections `Déployer` et `Exécuter des transactions` dans l'interface Remix. 4. Sous Environnement, sélectionnez `Injected Web3` et sous `Compte` sélectionnez votre adresse d'indexeur. -5. Set the Staking contract address - Paste the Staking contract address (`0xF55041E37E12cD407ad00CE2910B8269B01263b9`) next to `At Address` and click the `At address` button to apply. +5. Définissez l'adresse du contrat de jalonnement - Collez l'adresse du contrat de jalonnement (`0xF55041E37E12cD407ad00CE2910B8269B01263b9`) à côté de `À l'adresse` et cliquez sur le bouton `À l'adresse` pour appliquer. -6. Call `stake()` to stake GRT in the protocol. +6. Appelez `stake()` pour implanter GRT dans le protocole. + +7. (Facultatif) Les indexeurs peuvent approuver une autre adresse pour être l'opérateur de leur infrastructure d'indexeur afin de séparer les clés qui contrôlent les fonds de celles qui effectuent des actions quotidiennes telles que l'allocation sur des sugraphes et la réponse à des requêtes (payantes). Afin de définir l'opérateur, appelez `setOperator()` avec l'adresse de l'opérateur. + +8. (Facultatif) Afin de contrôler la distribution des récompenses et d'attirer stratégiquement les délégués, les indexeurs peuvent mettre à jour leurs paramètres de délégation en mettant à jour leur indexingRewardCut (parties par million), queryFeeCut (parties par million) et cooldownBlocks (nombre de blocs). Pour ce faire, appelez `setDelegationParameters()`. L'exemple suivant définit queryFeeCut pour distribuer 95 % des remises sur les requêtes à l'indexeur et 5 % aux délégués, définit indexingRewardCut pour distribuer 60 % des récompenses d'indexation à l'indexeur et 40 % aux délégués, et définit `thecooldownBlocks`. période à 500 blocs. -7. (Optional) Indexers may approve another address to be the operator for their Indexer infrastructure in order to separate the keys that control the funds from those that are performing day to day actions such as allocating on subgraphs and serving (paid) queries. In order to set the operator call `setOperator()` with the operator address. -8. (Optional) In order to control the distribution of rewards and strategically attract Delegators Indexers can update their delegation parameters by updating their indexingRewardCut (parts per million), queryFeeCut (parts per million), and cooldownBlocks (number of blocks). To do so call `setDelegationParameters()`. The following example sets the queryFeeCut to distribute 95% of query rebates to the Indexer and 5% to Delegators, set the indexingRewardCutto distribute 60% of indexing rewards to the Indexer and 40% to Delegators, and set `thecooldownBlocks` period to 500 blocks. ``` setDelegationParameters(950000, 600000, 500) ``` -### The life of an allocation -After being created by an Indexer a healthy allocation goes through four states. -- **Active** - Once an allocation is created on-chain ([allocateFrom()](https://github.com/graphprotocol/contracts/blob/master/contracts/staking/Staking.sol#L873)) it is considered **active**. A portion of the Indexer's own and/or delegated stake is allocated towards a subgraph deployment, which allows them to claim indexing rewards and serve queries for that subgraph deployment. The Indexer agent manages creating allocations based on the Indexer rules. -- **Closed** - An Indexer is free to close an allocation once 1 epoch has passed ([closeAllocation()](https://github.com/graphprotocol/contracts/blob/master/contracts/staking/Staking.sol#L873)) or their Indexer agent will automatically close the allocation after the **maxAllocationEpochs** (currently 28 days). When an allocation is closed with a valid proof of indexing (POI) their indexing rewards are distributed to the Indexer and its Delegators (see "how are rewards distributed?" below to learn more). +### La durée de vie d'une allocation + +Après avoir été créée par un indexeur, une allocation saine passe par quatre états. + +- **Active** : une fois qu'une allocation est créée sur la chaîne ([allocateFrom()](https://github.com/graphprotocol/contracts/blob/master/contracts/staking/Staking.sol#L873)), elle est considérée comme **active**. Une partie de la participation propre et/ou déléguée de l'indexeur est allouée à un déploiement de subgraph, ce qui lui permet de réclamer des récompenses d'indexation et de répondre à des requêtes pour ce déploiement de subgraph. L'agent Indexer gère la création d'allocations basées sur les règles de l'Indexeur. + +- **Fermé** : un indexeur est libre de fermer une allocation une fois qu'une époque s'est écoulée ([closeAllocation()](https://github.com/graphprotocol/contracts/blob/master/contracts/staking/Staking.sol#L873)) ou son agent indexeur fermera automatiquement l'allocation après le **maxAllocationEpochs**(actuellement 28 jours). Lorsqu'une allocation est clôturée avec une preuve d'indexation (POI) valide, leurs récompenses d'indexation sont distribuées à l'indexeur et à ses délégants (voir « comment les récompenses sont-elles distribuées ? » ci-dessous pour en savoir plus). -Indexers are recommended to utilize offchain syncing functionality to sync subgraph deployments to chainhead before creating the allocation on-chain. This feature is especially useful for subgraphs that may take longer than 28 epochs to sync or have some chances of failing undeterministically. +Il est recommandé aux indexeurs d'utiliser la fonctionnalité de synchronisation hors chaîne pour synchroniser les déploiements de subgraphs avec Chainhead avant de créer l'allocation en chaîne. Cette fonctionnalité est particulièrement utile pour les sous-graphes dont la synchronisation peut prendre plus de 28 époques ou qui risquent d'échouer de manière indéterministe. From b2dcf7e35cf6090610b7514eb1ab4b055aa78ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:29 -0400 Subject: [PATCH 194/924] New translations indexing.mdx (Spanish) --- website/pages/es/network/indexing.mdx | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/es/network/indexing.mdx b/website/pages/es/network/indexing.mdx index b3ed8579fb0b..9b272559f5a6 100644 --- a/website/pages/es/network/indexing.mdx +++ b/website/pages/es/network/indexing.mdx @@ -113,11 +113,11 @@ Los indexadores pueden diferenciarse aplicando técnicas avanzadas para tomar de - **Grande**: Preparado para indexar todos los subgrafos utilizados actualmente y atender solicitudes para el tráfico relacionado. | Configuración | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Pequeño | 4 | 8 | 1 | 4 | 16 | -| Estándar | 8 | 30 | 1 | 12 | 48 | -| Medio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3,5 | 48 | 184 | +| ------------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Pequeño | 4 | 8 | 1 | 4 | 16 | +| Estándar | 8 | 30 | 1 | 12 | 48 | +| Medio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3,5 | 48 | 184 | ### ¿Qué precauciones básicas de seguridad debe tomar un Indexador? @@ -149,20 +149,20 @@ Nota: Para admitir el escalado ágil, se recomienda que las inquietudes de consu #### Graph Node -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| --- | --- | --- | --- | --- | -| 8000 | Servidor HTTP GraphQL
(para consultas de subgrafos) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(para suscripciones a subgrafos) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(para administrar implementaciones) | / | --admin-port | - | -| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | -| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| ------ | -------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------- | +| 8000 | Servidor HTTP GraphQL
(para consultas de subgrafos) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(para suscripciones a subgrafos) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(para administrar implementaciones) | / | --admin-port | - | +| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | +| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | #### Servicio de Indexador -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| --- | --- | --- | --- | --- | -| 7600 | Servidor HTTP GraphQL
(para consultas de subgrafo pagadas) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| ------ | --------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | Servidor HTTP GraphQL
(para consultas de subgrafo pagadas) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Métricas de Prometheus | /metrics | --metrics-port | - | #### Agente Indexador From 1dc8fabecefce9c6d124408d887a8c4026241867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:30 -0400 Subject: [PATCH 195/924] New translations indexing.mdx (Arabic) --- website/pages/ar/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/ar/network/indexing.mdx b/website/pages/ar/network/indexing.mdx index abe53eae2f89..26ba96bbe16d 100644 --- a/website/pages/ar/network/indexing.mdx +++ b/website/pages/ar/network/indexing.mdx @@ -63,7 +63,7 @@ Allocations are continuously accruing rewards while they're active and allocated - انتقل إلى [ واجهة Etherscan لعقد المكافآت Rewards contract ](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) * لاستدعاء `getRewards()`: - - قم بتوسيع ** 10 .الحصول على المكافآت ** القائمة المنسدلة. + - قم بتوسيع ** 10 .الحصول على المكافآت ** القائمة المنسدلة. - أدخل ** معرّف التخصيص ** في الإدخال. - انقر فوق الزر ** الاستعلام **. @@ -113,11 +113,11 @@ The `queryFeeCut` and `indexingRewardCut` values are delegation parameters that - **كبيرة** - مُعدة لفهرسة جميع ال subgraphs المستخدمة حاليا وأيضا لخدمة طلبات حركة مرور البيانات ذات الصلة. | Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| صغير | 4 | 8 | 1 | 4 | 16 | -| قياسي | 8 | 30 | 1 | 12 | 48 | -| متوسط | 16 | 64 | 2 | 32 | 64 | -| كبير | 72 | 468 | 3.5 | 48 | 184 | +| ----- |:---------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| صغير | 4 | 8 | 1 | 4 | 16 | +| قياسي | 8 | 30 | 1 | 12 | 48 | +| متوسط | 16 | 64 | 2 | 32 | 64 | +| كبير | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ At the center of an Indexer's infrastructure is the Graph Node which monitors th #### Graph Node -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...

/subgraphs/name/.../... | http-port-- | - | -| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...

/subgraphs/name/.../... | ws-port-- | - | -| 8020 | JSON-RPC
(for managing deployments) | / | admin-port-- | - | -| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | -| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| ------ | ------------------------------------------------------- | ------------------------------------------------------------------- | ----------------- | -------------- | +| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...

/subgraphs/name/.../... | http-port-- | - | +| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...

/subgraphs/name/.../... | ws-port-- | - | +| 8020 | JSON-RPC
(for managing deployments) | / | admin-port-- | - | +| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | +| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | #### خدمة المفهرس -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | port-- | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| ------ | ------------------------------------------------------------ | --------------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | port-- | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | metrics-port-- | - | #### وكيل المفهرس(Indexer Agent) From e04a56fda3ee011f1773703e4e4384a1a74b7950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:31 -0400 Subject: [PATCH 196/924] New translations indexing.mdx (Czech) --- website/pages/cs/network/indexing.mdx | 390 +++++++++++++------------- 1 file changed, 195 insertions(+), 195 deletions(-) diff --git a/website/pages/cs/network/indexing.mdx b/website/pages/cs/network/indexing.mdx index 9bdc2fb2eb7e..6eb088873b8c 100644 --- a/website/pages/cs/network/indexing.mdx +++ b/website/pages/cs/network/indexing.mdx @@ -1,48 +1,48 @@ --- -title: Indexing +title: Indexování --- -Indexers are node operators in The Graph Network that stake Graph Tokens (GRT) in order to provide indexing and query processing services. Indexers earn query fees and indexing rewards for their services. They also earn query fees that are rebated according to an exponential rebate function. +Indexery jsou operátoři uzlů v síti Graf, kteří sázejí graf tokeny (GRT), aby mohli poskytovat služby indexování a zpracování dotazů. Indexátoři za své služby získávají poplatky za dotazy a odměny za indexování. Získávají také poplatky za dotazy, které jsou vráceny podle exponenciální funkce vrácení. -GRT that is staked in the protocol is subject to a thawing period and can be slashed if Indexers are malicious and serve incorrect data to applications or if they index incorrectly. Indexers also earn rewards for delegated stake from Delegators, to contribute to the network. +GRT, který je v protokolu založen, podléhá období rozmrazování a může být zkrácen, pokud jsou indexátory škodlivé a poskytují aplikacím nesprávná data nebo pokud indexují nesprávně. Indexátoři také získávají odměny za delegované sázky od delegátů, aby přispěli do sítě. -Indexers select subgraphs to index based on the subgraph’s curation signal, where Curators stake GRT in order to indicate which subgraphs are high-quality and should be prioritized. Consumers (eg. applications) can also set parameters for which Indexers process queries for their subgraphs and set preferences for query fee pricing. +Indexátory vybírají podgrafy k indexování na základě signálu kurátorů podgrafů, přičemž kurátoři sázejí na GRT, aby určili, které podgrafy jsou vysoce kvalitní a měly by být upřednostněny. Spotřebitelé (např. aplikace) mohou také nastavit parametry, podle kterých indexátoři zpracovávají dotazy pro jejich podgrafy, a nastavit preference pro stanovení ceny poplatků za dotazy. ## FAQ -### What is the minimum stake required to be an Indexer on the network? +### Jaký je minimální podíl potřebný k tomu, abyste se mohli stát indexátorem v síti? -The minimum stake for an Indexer is currently set to 100K GRT. +Minimální vklad pro indexátora je v současné době nastaven na 100k GRT. -### What are the revenue streams for an Indexer? +### Jaké jsou toky příjmů pro indexátora? -**Query fee rebates** - Payments for serving queries on the network. These payments are mediated via state channels between an Indexer and a gateway. Each query request from a gateway contains a payment and the corresponding response a proof of query result validity. +**Slevy z poplatků za dotazy** - Platby za obsluhu dotazů v síti. Tyto platby jsou zprostředkovány prostřednictvím stavových kanálů mezi indexerem a bránou. Každý dotazový požadavek z brány obsahuje platbu a odpovídající odpověď doklad o platnosti výsledku dotazu. -**Indexing rewards** - Generated via a 3% annual protocol wide inflation, the indexing rewards are distributed to Indexers who are indexing subgraph deployments for the network. +**Odměny za indexování** - Odměny za indexování, generované prostřednictvím 3% roční inflace v rámci celého protokolu, jsou rozdělovány indexátorům, kteří indexují rozmístění podgrafů pro síť. -### How are indexing rewards distributed? +### Jak se rozdělují odměny za indexaci? -Indexing rewards come from protocol inflation which is set to 3% annual issuance. They are distributed across subgraphs based on the proportion of all curation signal on each, then distributed proportionally to Indexers based on their allocated stake on that subgraph. **An allocation must be closed with a valid proof of indexing (POI) that meets the standards set by the arbitration charter in order to be eligible for rewards.** +Odměny za indexaci pocházejí z protokolární inflace, která je stanovena na 3 % ročně. Rozdělují se mezi podgrafy na základě podílu všech kurátorských signálů na každém z nich a poté se poměrně rozdělí indexátorům na základě jejich přiděleného podílu na daném podgrafu. **Alokace musí být uzavřena platným důkazem indexace (POI), který splňuje standardy stanovené rozhodčí chartou, aby bylo možné získat odměny.** -Numerous tools have been created by the community for calculating rewards; you'll find a collection of them organized in the [Community Guides collection](https://www.notion.so/Community-Guides-abbb10f4dba040d5ba81648ca093e70c). You can also find an up to date list of tools in the #Delegators and #Indexers channels on the [Discord server](https://discord.gg/graphprotocol). Here we link a [recommended allocation optimiser](https://github.com/graphprotocol/AllocationOpt.jl) integrated with the indexer software stack. +Komunita vytvořila řadu nástrojů pro výpočet odměn; jejich sbírku najdete ve sbírce [Průvodci komunity](https://www.notion.so/Community-Guides-abbb10f4dba040d5ba81648ca093e70c). Aktuální seznam nástrojů najdete také v kanálech #Delegators a #Indexers na serveru [Discord](https://discord.gg/graphprotocol). Zde uvádíme odkaz na [doporučený optimalizátor alokace](https://github.com/graphprotocol/AllocationOpt.jl) integrovaný se softwarovým zásobníkem indexátorů. -### What is a proof of indexing (POI)? +### Co je Důkaz indexování (POI)? -POIs are used in the network to verify that an Indexer is indexing the subgraphs they have allocated on. A POI for the first block of the current epoch must be submitted when closing an allocation for that allocation to be eligible for indexing rewards. A POI for a block is a digest for all entity store transactions for a specific subgraph deployment up to and including that block. +V síti se používají Proofy indexování (POI) k ověření, zda indexátor skutečně indexuje podgrafy, na které má alokovanou kapacitu. Pro uzavření alokace a možnost získat odměny za indexování je nutné při uzavírání alokace předložit POI pro první blok aktuální epochy. POI pro daný blok je souhrn všech transakcí v úložišti entit pro konkrétní nasazení podgrafu, a to až do tohoto bloku včetně. -### When are indexing rewards distributed? +### Kdy se rozdělují odměny za indexaci? -Allocations are continuously accruing rewards while they're active and allocated within 28 epochs. Rewards are collected by the Indexers, and distributed whenever their allocations are closed. That happens either manually, whenever the Indexer wants to force close them, or after 28 epochs a Delegator can close the allocation for the Indexer, but this results in no rewards. 28 epochs is the max allocation lifetime (right now, one epoch lasts for ~24h). +Za přidělení se průběžně připisují odměny, dokud jsou aktivní a přidělené během 28 epoch. Odměny jsou shromažďovány indexátory a rozdělovány vždy, když jsou jejich alokace uzavřeny. To se děje buď ručně, kdykoli je chce indexátor násilně uzavřít, nebo po 28 epochách může alokaci za indexátora uzavřít delegát, což však nevede k žádným odměnám. 28 epoch je maximální doba životnosti alokace (právě teď trvá jedna epocha ~24 hodin). -### Can pending indexing rewards be monitored? +### Lze sledovat čekající odměny za indexaci? -The RewardsManager contract has a read-only [getRewards](https://github.com/graphprotocol/contracts/blob/master/contracts/rewards/RewardsManager.sol#L317) function that can be used to check the pending rewards for a specific allocation. +Smlouva RewardsManager obsahuje funkci [getRewards](https://github.com/graphprotocol/contracts/blob/master/contracts/rewards/RewardsManager.sol#L317) pouze pro čtení, kterou lze použít ke zjištění čekajících odměn pro konkrétní příděl. -Many of the community-made dashboards include pending rewards values and they can be easily checked manually by following these steps: +Mnoho informačních panelů vytvořených komunitou obsahuje hodnoty čekajících odměn a lze je snadno zkontrolovat ručně podle následujících kroků: -1. Query the [mainnet subgraph](https://thegraph.com/hosted-service/subgraph/graphprotocol/graph-network-mainnet) to get the IDs for all active allocations: +1. Dotazem na podgraf [mainnet](https://thegraph.com/hosted-service/subgraph/graphprotocol/graph-network-mainnet) získáte ID všech aktivních alokací: ```graphql query indexerAllocations { @@ -58,139 +58,139 @@ query indexerAllocations { } ``` -Use Etherscan to call `getRewards()`: +Pomocí funkce Etherscan zavolejte `getRewards()`: -- Navigate to [Etherscan interface to Rewards contract](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) +- Přejděte na [Etherscan rozhraní na smlouvu odměny](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) -* To call `getRewards()`: - - Expand the **10. getRewards** dropdown. - - Enter the **allocationID** in the input. - - Click the **Query** button. +* Volání funkce `getRewards()`: + - Rozbalte rozevírací seznam **10. getRewards**. + - Do vstupu zadejte **allocationID**. + - Klikněte na tlačítko **Dotaz**. -### What are disputes and where can I view them? +### Co jsou to spory a kde si je mohu prohlédnout? -Indexer's queries and allocations can both be disputed on The Graph during the dispute period. The dispute period varies, depending on the type of dispute. Queries/attestations have 7 epochs dispute window, whereas allocations have 56 epochs. After these periods pass, disputes cannot be opened against either of allocations or queries. When a dispute is opened, a deposit of a minimum of 10,000 GRT is required by the Fishermen, which will be locked until the dispute is finalized and a resolution has been given. Fisherman are any network participants that open disputes. +Dotazy indexátoru i alokace lze v grafu zpochybnit během sporného období. Období sporu se liší v závislosti na typu sporu. Dotazy/atesty mají 7 epochové sporné okno, zatímco alokace mají 56 epoch. Po uplynutí těchto období nelze zahájit spor ani proti alokacím, ani proti dotazům. Při zahájení sporu musí rybáři složit zálohu v minimální výši 10,000 GRT, která bude zablokována až do ukončení sporu a vydání rozhodnutí. Rybáři jsou všichni účastníci sítě, kteří otevírají spory. -Disputes have **three** possible outcomes, so does the deposit of the Fishermen. +Spory mají **tři** možné výsledky, stejně tak vklad rybářů. -- If the dispute is rejected, the GRT deposited by the Fishermen will be burned, and the disputed Indexer will not be slashed. -- If the dispute is settled as a draw, the Fishermen's deposit will be returned, and the disputed Indexer will not be slashed. -- If the dispute is accepted, the GRT deposited by the Fishermen will be returned, the disputed Indexer will be slashed and the Fishermen will earn 50% of the slashed GRT. +- Pokud bude spor zamítnut, GRT složené rybáři budou spáleny a sporný indexátor nebude krácen. +- Pokud je spor vyřešen nerozhodně, bude Fishermen's vklad vrácen a sporný indexátor nebude penalizován snížením stake. +- Pokud je spor uznán, bude Fishermen's vklad vrácen, sporný indexátor bude penalizován snížením stake a Fishermen obdrží 50 % sníženého stake. -Disputes can be viewed in the UI in an Indexer's profile page under the `Disputes` tab. +Spory lze zobrazit v UI na stránce profilu indexátora na kartě `Spory`. -### What are query fee rebates and when are they distributed? +### Co jsou to slevy z poplatků za dotaz a kdy se rozdělují? -Query fees are collected by the gateway and distributed to indexers according to the exponential rebate function (see GIP [here](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162)). The exponential rebate function is proposed as a way to ensure indexers achieve the best outcome by faithfully serving queries. It works by incentivizing Indexers to allocate a large amount of stake (which can be slashed for erring when serving a query) relative to the amount of query fees they may collect. +Poplatky za dotazy vybírá brána a rozděluje je indexátorům podle exponenciální funkce rabatu (viz GIP [zde](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162)). Exponenciální funkce rabatu je navržena jako způsob, jak zajistit, aby indexátory dosáhly nejlepšího výsledku věrným obsloužením dotazů. Funguje tak, že motivuje indexátory, aby přidělovali velké množství podílu (který může být snížen za chybu při obsluze dotazu) v poměru k výši poplatků za dotazy, které mohou inkasovat. -Once an allocation has been closed the rebates are available to be claimed by the Indexer. Upon claiming, the query fee rebates are distributed to the Indexer and their Delegators based on the query fee cut and the exponential rebate function. +Po uzavření přídělu může indexátor požádat o slevy. Po uplatnění nároku jsou slevy z poplatku za dotaz rozděleny mezi indexátora a jeho delegáty na základě snížení poplatku za dotaz a exponenciální funkce slevy. -### What is query fee cut and indexing reward cut? +### Co je to snížení poplatku za dotaz a snížení odměny za indexaci? -The `queryFeeCut` and `indexingRewardCut` values are delegation parameters that the Indexer may set along with cooldownBlocks to control the distribution of GRT between the Indexer and their Delegators. See the last steps in [Staking in the Protocol](/network/indexing#stake-in-the-protocol) for instructions on setting the delegation parameters. +Hodnoty `queryFeeCut` a `indexingRewardCut` jsou parametry delegování, které může indexátor nastavit spolu s bloky cooldownBlocks a řídit tak rozdělení GRT mezi indexátor a jeho delegáty. Pokyny k nastavení parametrů delegování naleznete v posledních krocích v části [Zadání protokolu](/network/indexing#stake-in-the-protocol). -- **queryFeeCut** - the % of query fee rebates that will be distributed to the Indexer. If this is set to 95%, the Indexer will receive 95% of the query fees earned when an allocation is closed with the other 5% going to the Delegators. +- **queryFeeCut** - % slev z poplatků za dotaz, které budou rozděleny mezi indexátory. Pokud je tato hodnota nastavena na 95%, obdrží indexátor 95% poplatků za dotaz získaných při uzavření přídělu a zbylých 5% připadne delegátům. -- **indexingRewardCut** - the % of indexing rewards that will be distributed to the Indexer. If this is set to 95%, the Indexer will receive 95% of the indexing rewards when an allocation is closed and the Delegators will split the other 5%. +- **indexingRewardCut** - % odměn za indexování, které budou rozděleny indexátoru. Pokud je tato hodnota nastavena na 95 %, obdrží indexátor při uzavření přídělu 95 % odměn za indexování a zbylých 5 % si rozdělí delegáti. -### How do Indexers know which subgraphs to index? +### Jak indexátory poznají, které podgrafy mají indexovat? -Indexers may differentiate themselves by applying advanced techniques for making subgraph indexing decisions but to give a general idea we'll discuss several key metrics used to evaluate subgraphs in the network: +Indexátory se mohou odlišovat použitím pokročilých technik pro rozhodování o indexaci podgrafů, ale pro obecnou představu probereme několik klíčových metrik používaných k hodnocení podgrafů v síti: -- **Curation signal** - The proportion of network curation signal applied to a particular subgraph is a good indicator of the interest in that subgraph, especially during the bootstrap phase when query voluming is ramping up. +- **Signál kurátorství** - Podíl signálu kurátorství sítě aplikovaného na určitý podgraf je dobrým ukazatelem zájmu o tento podgraf, zejména během zaváděcí fáze, kdy se zvyšuje objem dotazů. -- **Query fees collected** - The historical data for volume of query fees collected for a specific subgraph is a good indicator of future demand. +- **Vybrané poplatky za dotazy** - Historické údaje o objemu vybraných poplatků za dotazy pro určitý podgraf jsou dobrým ukazatelem budoucí poptávky. -- **Amount staked** - Monitoring the behavior of other Indexers or looking at proportions of total stake allocated towards specific subgraphs can allow an Indexer to monitor the supply side for subgraph queries to identify subgraphs that the network is showing confidence in or subgraphs that may show a need for more supply. +- **Amount staked** - Sledování chování ostatních indexátorů nebo podílů celkového vkladu přiděleného konkrétním podgrafům může indexátoru umožnit sledovat stranu nabídky pro dotazy na podgrafy a identifikovat podgrafy, kterým síť důvěřuje, nebo podgrafy, které mohou vykazovat potřebu větší nabídky. -- **Subgraphs with no indexing rewards** - Some subgraphs do not generate indexing rewards mainly because they are using unsupported features like IPFS or because they are querying another network outside of mainnet. You will see a message on a subgraph if it is not generating indexing rewards. +- **Podgrafy bez odměn za indexování** - Některé podgrafy negenerují odměny za indexování především proto, že používají nepodporované funkce, jako je IPFS, nebo protože se dotazují na jinou síť mimo hlavní síť. Pokud podgraf negeneruje odměny za indexování, zobrazí se u něj tato zpráva. -### What are the hardware requirements? +### Jaké jsou požadavky na hardware? -- **Small** - Enough to get started indexing several subgraphs, will likely need to be expanded. -- **Standard** - Default setup, this is what is used in the example k8s/terraform deployment manifests. -- **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. -- **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. +- **Malý** - Dostatečný pro začátek indexování několika podgrafů, pravděpodobně bude třeba jej rozšířit. +- **Standard** - Výchozí nastavení, které je použito v ukázkových manifestech nasazení k8s/terraform. +- **Střední** - produkční indexer podporující 100 podgrafů a 200-500 požadavků za sekundu. +- **Large** - Připraveno k indexování všech aktuálně nepoužívaných příbuzných podgrafů. -| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Nastavení | Postgres
(CPUs) | Postgres
(paměť v GBs) | Postgres
(disk v TBs) | VMs
(CPUs) | VMs
(paměť v GBs) | +| --------- |:--------------------------:|:---------------------------------:|:--------------------------------:|:---------------------:|:----------------------------:| +| Malé | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Střední | 16 | 64 | 2 | 32 | 64 | +| Velký | 72 | 468 | 3.5 | 48 | 184 | -### What are some basic security precautions an Indexer should take? +### Jaká jsou základní bezpečnostní opatření, která by měl indexátor přijmout? -- **Operator wallet** - Setting up an operator wallet is an important precaution because it allows an Indexer to maintain separation between their keys that control stake and those that are in control of day-to-day operations. See [Stake in Protocol](/network/indexing#stake-in-the-protocol) for instructions. +- **Peněženka operátora** - Nastavení peněženky operátora je důležitým opatřením, protože umožňuje indexátorovi udržovat oddělení mezi klíči, které kontrolují sázky, a klíči, které řídí každodenní operace. Pokyny naleznete v části [Podíl na protokolu](/network/indexing#stake-in-the-protocol). -- **Firewall** - Only the Indexer service needs to be exposed publicly and particular attention should be paid to locking down admin ports and database access: the Graph Node JSON-RPC endpoint (default port: 8030), the Indexer management API endpoint (default port: 18000), and the Postgres database endpoint (default port: 5432) should not be exposed. +- **Firewall** - Pouze služba Indexer musí být vystavena veřejně a zvláštní pozornost by měla být věnována uzamčení portů pro správu a přístupu k databázi: koncový bod JSON-RPC uzlu Graf (výchozí port: 8030), koncový bod API pro správu Indexeru (výchozí port: 18000) a koncový bod databáze Postgres (výchozí port: 5432) by neměly být vystaveny. -## Infrastructure +## Infrastruktura -At the center of an Indexer's infrastructure is the Graph Node which monitors the indexed networks, extracts and loads data per a subgraph definition and serves it as a [GraphQL API](/about/#how-the-graph-works). The Graph Node needs to be connected to an endpoint exposing data from each indexed network; an IPFS node for sourcing data; a PostgreSQL database for its store; and Indexer components which facilitate its interactions with the network. +Centrem infrastruktury indexeru je uzel Graf, který monitoruje indexované sítě, extrahuje a načítá data podle definice podgrafu a poskytuje je jako [GraphQL API](/about/#how-the-graph-works). Uzel Graf musí být připojen ke koncovému bodu vystavujícímu data z každé indexované sítě, uzlu IPFS pro získávání dat, databázi PostgreSQL pro jejich ukládání a komponentám Indexeru, které usnadňují jeho interakci se sítí. -- **PostgreSQL database** - The main store for the Graph Node, this is where subgraph data is stored. The Indexer service and agent also use the database to store state channel data, cost models, indexing rules, and allocation actions. +- **Databáze PostgreSQL** - Hlavní úložiště pro uzel Graf kde jsou uložena data dílčích grafů. Služba Indexer a agent také používají databázi k ukládání dat stavového kanálu, nákladových modelů, indexačních pravidel a alokačních akcí. -- **Data endpoint** - For EVM-compatible networks, Graph Node needs to be connected to an endpoint that exposes an EVM-compatible JSON-RPC API. This may take the form of a single client or it could be a more complex setup that load balances across multiple. It's important to be aware that certain subgraphs will require particular client capabilities such as archive mode and/or the parity tracing API. +- **Datový koncový bod** - Pro sítě kompatibilní s EVM musí být graf uzel připojen ke koncovému bodu, který vystavuje API JSON-RPC kompatibilní s EVM. To může mít podobu jediného klienta nebo může jít o složitější nastavení, které vyrovnává zátěž mezi více. Je důležité si uvědomit, že některé dílčí grafy budou vyžadovat konkrétní schopnosti klienta, jako je archivační režim a/nebo API pro sledování parity. -- **IPFS node (version less than 5)** - Subgraph deployment metadata is stored on the IPFS network. The Graph Node primarily accesses the IPFS node during subgraph deployment to fetch the subgraph manifest and all linked files. Network Indexers do not need to host their own IPFS node, an IPFS node for the network is hosted at https://ipfs.network.thegraph.com. +- **Vuzel IPFS (verze menší než 5)** - Metadata nasazení podgrafů jsou uložena v síti IPFS. Uzel Graf přistupuje během nasazení podgrafu primárně k uzlu IPFS, aby načetl manifest podgrafu a všechny propojené soubory. Síťové indexátory nemusí hostovat vlastní uzel IPFS, uzel IPFS pro síť je hostován na adrese https://ipfs.network.thegraph.com. -- **Indexer service** - Handles all required external communications with the network. Shares cost models and indexing statuses, passes query requests from gateways on to a Graph Node, and manages the query payments via state channels with the gateway. +- **Služba indexeru** - Zpracovává veškerou požadovanou externí komunikaci se sítí. Sdílí nákladové modely a stavy indexace, předává požadavky na dotazy z bran na uzel Graga spravuje platby za dotazy prostřednictvím stavových kanálů s branou. -- **Indexer agent** - Facilitates the Indexers interactions on chain including registering on the network, managing subgraph deployments to its Graph Node/s, and managing allocations. +- **Indexer agent** - Usnadňuje interakce indexerů v řetězci, včetně registrace v síti, správy nasazení podgrafů do jejich grafových uzlů a správy alokací. -- **Prometheus metrics server** - The Graph Node and Indexer components log their metrics to the metrics server. +- **Server metrik Prometheus** - Komponenty Uzel grafu a Indexer zaznamenávají své metriky na metrický server. -Note: To support agile scaling, it is recommended that query and indexing concerns are separated between different sets of nodes: query nodes and index nodes. +Poznámka: Pro podporu agilního škálování se doporučuje oddělit dotazování a indexování mezi různé sady uzlů: dotazovací uzly a indexovací uzly. -### Ports overview +### Přehled portů -> **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC and the Indexer management endpoints detailed below. +> **Důležité**: Dávejte pozor na veřejné vystavování portů - **administrační porty** by měly být uzamčeny. To zahrnuje koncové body JSON-RPC uzlu Graf a koncové body správy Indexeru, které jsou podrobně popsány níže. -#### Graph Node +#### Uzel Graf -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| ---- | ---------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | +| 8000 | GraphQL HTTP server
(pro dotazy podgrafy) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(pro odběry podgrafů) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(pro správu nasazení) | / | --admin-port | - | +| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | +| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | -#### Indexer Service +#### Služba Indexer -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| ---- | --------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(pro placené dotazy na podgrafy) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Metriky Prometheus | /metrics | --metrics-port | - | -#### Indexer Agent +#### Agent indexátoru -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------- | ------ | ------------------------- | --------------------------------------- | -| 8000 | Indexer management API | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| ---- | ------------------------- | ----- | ------------------------- | --------------------------------------- | +| 8000 | API pro správu indexátoru | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | -### Setup server infrastructure using Terraform on Google Cloud +### Nastavení serverové infrastruktury pomocí Terraformu ve Google Cloud -> Note: Indexers can alternatively use AWS, Microsoft Azure, or Alibaba. +> Poznámka: Indexéry mohou alternativně používat AWS, Microsoft Azure nebo Alibaba. -#### Install prerequisites +#### Instalace předpokladů - Google Cloud SDK -- Kubectl command line tool +- Nástroj příkazového řádku Kubectl - Terraform -#### Create a Google Cloud Project +#### Vytvoření projektu Google Cloud -- Clone or navigate to the Indexer repository. +- Klonujte nebo přejděte do úložiště Indexer. -- Navigate to the ./terraform directory, this is where all commands should be executed. +- Přejděte do adresáře ./terraform, kde by se měly spouštět všechny příkazy. ```sh cd terraform ``` -- Authenticate with Google Cloud and create a new project. +- Ověřte se pomocí služby Google Cloud a vytvořte nový projekt. ```sh gcloud auth login @@ -198,9 +198,9 @@ project= gcloud projects create --enable-cloud-apis $project ``` -- Use the Google Cloud Console's billing page to enable billing for the new project. +- Pomocí fakturační stránky konzoly Google Cloud Console povolte fakturaci pro nový projekt. -- Create a Google Cloud configuration. +- Vytvořte konfiguraci služby Google Cloud. ```sh proj_id=$(gcloud projects list --format='get(project_id)' --filter="name=$project") @@ -210,7 +210,7 @@ gcloud config set compute/region us-central1 gcloud config set compute/zone us-central1-a ``` -- Enable required Google Cloud APIs. +- Povolte požadované Google Cloud API. ```sh gcloud services enable compute.googleapis.com @@ -219,7 +219,7 @@ gcloud services enable servicenetworking.googleapis.com gcloud services enable sqladmin.googleapis.com ``` -- Create a service account. +- Vytvoření účtu služby. ```sh svc_name= @@ -237,7 +237,7 @@ gcloud projects add-iam-policy-binding $proj_id \ --role roles/editor ``` -- Enable peering between database and Kubernetes cluster that will be created in the next step. +- Povolte peering mezi databází a clusterem Kubernetes, který bude vytvořen v dalším kroku. ```sh gcloud compute addresses create google-managed-services-default \ @@ -251,7 +251,7 @@ gcloud services vpc-peerings connect \ --ranges=google-managed-services-default ``` -- Create minimal terraform configuration file (update as needed). +- Vytvořte minimální konfigurační soubor terraformu (aktualizujte jej podle potřeby). ```sh indexer= @@ -262,11 +262,11 @@ database_password = "" EOF ``` -#### Use Terraform to create infrastructure +#### Použití nástroje Terraform k vytvoření infrastruktury -Before running any commands, read through [variables.tf](https://github.com/graphprotocol/indexer/blob/main/terraform/variables.tf) and create a file `terraform.tfvars` in this directory (or modify the one we created in the last step). For each variable where you want to override the default, or where you need to set a value, enter a setting into `terraform.tfvars`. +Před spuštěním jakýchkoli příkazů si přečtěte soubor [variables.tf](https://github.com/graphprotocol/indexer/blob/main/terraform/variables.tf) a vytvořte v tomto adresáři soubor `terraform.tfvars` (nebo upravte soubor vytvořený v minulém kroku). Pro každou proměnnou, u které chcete přepsat výchozí hodnotu nebo u které potřebujete nastavit hodnotu, zadejte nastavení do `terraform.tfvars`. -- Run the following commands to create the infrastructure. +- Pro vytvoření infrastruktury spusťte následující příkazy. ```sh # Install required plugins @@ -279,7 +279,7 @@ terraform plan terraform apply ``` -Download credentials for the new cluster into `~/.kube/config` and set it as your default context. +Stáhněte pověření pro nový cluster do souboru `~/.kubeconfig` a nastavte jej jako výchozí kontext. ```sh gcloud container clusters get-credentials $indexer @@ -287,21 +287,21 @@ kubectl config use-context $(kubectl config get-contexts --output='name' | grep $indexer) ``` -#### Creating the Kubernetes components for the Indexer +#### Vytvoření komponent Kubernetes pro Indexer -- Copy the directory `k8s/overlays` to a new directory `$dir,` and adjust the `bases` entry in `$dir/kustomization.yaml` so that it points to the directory `k8s/base`. +- Zkopírujte adresář `k8s/overlays` do nového adresáře `$dir,` a upravte položku `bases` v `$dir/kustomization.yaml` tak, aby ukazovala na adresář `k8s/base`. -- Read through all the files in `$dir` and adjust any values as indicated in the comments. +- Přečtěte si všechny soubory v `$dir` a upravte všechny hodnoty uvedené v komentářích. -Deploy all resources with `kubectl apply -k $dir`. +Všechny prostředky nasadíte pomocí `kubectl apply -k $dir`. -### Graph Node +### Uzel Grafu -[Graph Node](https://github.com/graphprotocol/graph-node) is an open source Rust implementation that event sources the Ethereum blockchain to deterministically update a data store that can be queried via the GraphQL endpoint. Developers use subgraphs to define their schema, and a set of mappings for transforming the data sourced from the block chain and the Graph Node handles syncing the entire chain, monitoring for new blocks, and serving it via a GraphQL endpoint. +[Uzel Graf](https://github.com/graphprotocol/graph-node) je open source implementace Rust, která využívá zdrojové kódy událostí v blockchainu Ethereum k deterministické aktualizaci datového úložiště, na které se lze dotazovat prostřednictvím koncového bodu GraphQL. Vývojáři používají podgrafy k definici svého schématu a sadu mapování pro transformaci dat získaných z blokového řetězce a Uzel Graf se stará o synchronizaci celého řetězce, monitorování nových bloků a jejich obsluhu prostřednictvím koncového bodu GraphQL. -#### Getting started from source +#### Začínáme od zdroje -#### Install prerequisites +#### Instalace předpokladů - **Rust** @@ -309,15 +309,15 @@ Deploy all resources with `kubectl apply -k $dir`. - **IPFS** -- **Additional Requirements for Ubuntu users** - To run a Graph Node on Ubuntu a few additional packages may be needed. +- **Další požadavky pro uživatele Ubuntu** - Pro spuštění Uzel Graf v Ubuntu může být potřeba několik dalších balíčků. ```sh sudo apt-get install -y clang libpg-dev libssl-dev pkg-config ``` -#### Setup +#### Nastavení -1. Start a PostgreSQL database server +1. Spuštění databázového serveru PostgreSQL ```sh initdb -D .postgres @@ -325,9 +325,9 @@ pg_ctl -D .postgres -l logfile start createdb graph-node ``` -2. Clone [Graph Node](https://github.com/graphprotocol/graph-node) repo and build the source by running `cargo build` +2. Klonujte repozitář [Uzel Graf](https://github.com/graphprotocol/graph-node) a sestavte zdrojový kód spuštěním příkazu `cargo build` -3. Now that all the dependencies are setup, start the Graph Node: +3. Nyní, když jsou všechny závislosti nastaveny, spusťte uzel Graf: ```sh cargo run -p graph-node --release -- \ @@ -336,48 +336,48 @@ cargo run -p graph-node --release -- \ --ipfs https://ipfs.network.thegraph.com ``` -#### Getting started using Docker +#### Začínáme používat Docker -#### Prerequisites +#### Požadavky -- **Ethereum node** - By default, the docker compose setup will use mainnet: [http://host.docker.internal:8545](http://host.docker.internal:8545) to connect to the Ethereum node on your host machine. You can replace this network name and url by updating `docker-compose.yaml`. +- **Ethereum Uzel** - Ve výchozím nastavení docker compose použije mainnet: [http://host.docker.internal:8545](http://host.docker.internal:8545) pro připojení k uzlu Ethereum na hostitelském počítači. Tento název sítě a url můžete nahradit aktualizací souboru `docker-compose.yaml`. -#### Setup +#### Nastavení -1. Clone Graph Node and navigate to the Docker directory: +1. Klonujte graf uzel a najděte cestu do adresáře Docker: ```sh git clone https://github.com/graphprotocol/graph-node cd graph-node/docker ``` -2. For linux users only - Use the host IP address instead of `host.docker.internal` in the `docker-compose.yaml`using the included script: +2. Pouze pro uživatele Linux- Použijte IP adresu hostitele místo `host.docker.internal` v `docker-compose.yaml` pomocí přiloženého skript: ```sh ./setup.sh ``` -3. Start a local Graph Node that will connect to your Ethereum endpoint: +3. Spusťte místní uzel Graf, který se připojí ke koncovému bodu Ethereum: ```sh docker-compose up ``` -### Indexer components +### Součásti indexeru -To successfully participate in the network requires almost constant monitoring and interaction, so we've built a suite of Typescript applications for facilitating an Indexers network participation. There are three Indexer components: +Úspěšná účast v síti vyžaduje téměř neustálé sledování a interakci, proto jsme vytvořili sadu aplikací Typescript pro usnadnění účasti v síti Indexers. K dispozici jsou tři komponenty Indexer: -- **Indexer agent** - The agent monitors the network and the Indexer's own infrastructure and manages which subgraph deployments are indexed and allocated towards on chain and how much is allocated towards each. +- **Agent indexátoru** - Agent monitoruje síť a vlastní infrastrukturu indexátoru a spravuje, která dílčí nasazení jsou indexována a alokována do řetězce a kolik je jim přiděleno. -- **Indexer service** - The only component that needs to be exposed externally, the service passes on subgraph queries to the graph node, manages state channels for query payments, shares important decision making information to clients like the gateways. +- **Služba indexeru** - Jediná komponenta, která musí být vystavena externě, služba předává dotazy na podgraf uzlu grafu, spravuje stavové kanály pro platby dotazů, sdílí důležité rozhodovací informace klientům, jako jsou brány. -- **Indexer CLI** - The command line interface for managing the Indexer agent. It allows Indexers to manage cost models, manual allocations, actions queue, and indexing rules. +- **Indexer CLI** - Rozhraní příkazového řádku pro správu agenta Indexer. Umožňuje indexátorům spravovat nákladové modely, ruční přidělování, frontu akcí a pravidla indexování. -#### Getting started +#### Začínáme -The Indexer agent and Indexer service should be co-located with your Graph Node infrastructure. There are many ways to set up virtual execution environments for your Indexer components; here we'll explain how to run them on baremetal using NPM packages or source, or via kubernetes and docker on the Google Cloud Kubernetes Engine. If these setup examples do not translate well to your infrastructure there will likely be a community guide to reference, come say hi on [Discord](https://discord.gg/graphprotocol)! Remember to [stake in the protocol](/network/indexing#stake-in-the-protocol) before starting up your Indexer components! +Agent Indexer a služba Indexer by měly být umístěny společně s infrastrukturou graf uzlu. Existuje mnoho způsobů, jak nastavit virtuální prováděcí prostředí pro komponenty Indexer; zde vysvětlíme, jak je spustit na baremetalu pomocí balíčků NPM nebo zdrojových kódů, nebo pomocí kubernetes a docker na Google Cloud Kubernetes Engine. Pokud se tyto příklady nastavení nedají dobře převést na vaši infrastrukturu, bude pravděpodobně existovat komunitní příručka, na kterou se můžete odkázat, přijďte ji pozdravit na [Discord](https://discord.gg/graphprotocol)! Před spuštěním komponent Indexeru nezapomeňte [zakázat protokol](/network/indexing#stake-in-the-protocol)! -#### From NPM packages +#### Z balíčků NPM ```sh npm install -g @graphprotocol/indexer-service @@ -400,7 +400,7 @@ graph indexer connect http://localhost:18000/ graph indexer ... ``` -#### From source +#### Ze zdroje ```sh # From Repo root directory @@ -420,16 +420,16 @@ cd packages/indexer-cli ./bin/graph-indexer-cli indexer ... ``` -#### Using docker +#### Použití docker -- Pull images from the registry +- Stažení obrázků z registru ```sh docker pull ghcr.io/graphprotocol/indexer-service:latest docker pull ghcr.io/graphprotocol/indexer-agent:latest ``` -Or build images locally from source +Nebo sestavte obrazy lokálně ze zdrojových kódů ```sh # Indexer service @@ -444,24 +444,24 @@ docker build \ -t indexer-agent:latest \ ``` -- Run the components +- Spustit komponenty ```sh docker run -p 7600:7600 -it indexer-service:latest ... docker run -p 18000:8000 -it indexer-agent:latest ... ``` -**NOTE**: After starting the containers, the Indexer service should be accessible at [http://localhost:7600](http://localhost:7600) and the Indexer agent should be exposing the Indexer management API at [http://localhost:18000/](http://localhost:18000/). +**POZNÁMKA**: Po spuštění kontejnerů by měla být služba Indexer dostupná na adrese [http://localhost:7600](http://localhost:7600) a agent Indexer by měl vystavovat API pro správu Indexeru na adrese [http://localhost:18000/](http://localhost:18000/). -#### Using K8s and Terraform +#### Použití K8s a Terraform -See the [Setup Server Infrastructure Using Terraform on Google Cloud](/network/indexing#setup-server-infrastructure-using-terraform-on-google-cloud) section +Viz část [Nastavení serverové infrastruktury pomocí Terraformu ve službě Google Cloud](/network/indexing#setup-server-infrastructure-using-terraform-on-google-cloud) -#### Usage +#### Použití -> **NOTE**: All runtime configuration variables may be applied either as parameters to the command on startup or using environment variables of the format `COMPONENT_NAME_VARIABLE_NAME`(ex. `INDEXER_AGENT_ETHEREUM`). +> **POZNÁMKA**: Všechny konfigurační proměnné za běhu mohou být použity buď jako parametry příkazu při spuštění, nebo pomocí proměnných prostředí ve formátu `NÁZEV_PŘÍKAZU_VARIABLE_NAME`(např. `INDEXER_AGENT_ETHEREUM`). -#### Indexer agent +#### Agent indexátoru ```sh graph-indexer-agent start \ @@ -490,7 +490,7 @@ graph-indexer-agent start \ | pino-pretty ``` -#### Indexer service +#### Služba Indexer ```sh SERVER_HOST=localhost \ @@ -518,56 +518,56 @@ graph-indexer-service start \ #### Indexer CLI -The Indexer CLI is a plugin for [`@graphprotocol/graph-cli`](https://www.npmjs.com/package/@graphprotocol/graph-cli) accessible in the terminal at `graph indexer`. +Indexer CLI je zásuvný modul pro [`@graphprotocol/graph-cli`](https://www.npmjs.com/package/@graphprotocol/graph-cli) přístupný v terminál na adrese `graf indexer`. ```sh graph indexer connect http://localhost:18000 graph indexer status ``` -#### Indexer management using Indexer CLI +#### Správa indexeru pomocí Indexer CLI -The suggested tool for interacting with the **Indexer Management API** is the **Indexer CLI**, an extension to the **Graph CLI**. The Indexer agent needs input from an Indexer in order to autonomously interact with the network on the behalf of the Indexer. The mechanism for defining Indexer agent behavior are **allocation management** mode and **indexing rules**. Under auto mode, an Indexer can use **indexing rules** to apply their specific strategy for picking subgraphs to index and serve queries for. Rules are managed via a GraphQL API served by the agent and known as the Indexer Management API. Under manual mode, an Indexer can create allocation actions using **actions queue** and explicitly approve them before they get executed. Under oversight mode, **indexing rules** are used to populate **actions queue** and also require explicit approval for execution. +Navrhovaným nástrojem pro interakci s **Indexer Management API** je **Indexer CLI**, rozšíření **Graph CLI**. Agent Indexer potřebuje vstup od Indexeru, aby mohl autonomně komunikovat se sítí jménem Indexeru. Mechanismem pro definování chování agenta Indexer jsou **režim správy přidělování** a **pravidla indexování**. V automatickém režimu může indexátor použít **indexační pravidla** k použití své specifické strategie pro výběr podgrafů k indexování a obsluze dotazů. Pravidla jsou spravována prostřednictvím GraphQL API obsluhovaného agentem a známého jako rozhraní API pro správu indexátoru. V manuálním režimu může indexátor vytvářet alokační akce pomocí **akční fronty** a explicitně je schvalovat před jejich provedením. V režimu dohledu se k naplnění **akční fronty** používají **indexační pravidla**, která rovněž vyžadují explicitní schválení pro provedení. -#### Usage +#### Použití -The **Indexer CLI** connects to the Indexer agent, typically through port-forwarding, so the CLI does not need to run on the same server or cluster. To help you get started, and to provide some context, the CLI will briefly be described here. +**Indexer CLI** se připojuje k agentovi Indexer, obvykle prostřednictvím přesměrování portů, takže CLI nemusí běžet na stejném serveru nebo clusteru. Abychom vám usnadnili začátek a poskytli vám určitý kontext, bude zde CLI stručně popsáno. -- `graph indexer connect ` - Connect to the Indexer management API. Typically the connection to the server is opened via port forwarding, so the CLI can be easily operated remotely. (Example: `kubectl port-forward pod/ 8000:8000`) +- `graf indexer připojit ` - Připojení k API pro správu indexeru. Obvykle se připojení k serveru otevírá pomocí přesměrování portů, takže CLI lze snadno ovládat na dálku. (Příklad: `kubectl port-forward pod/ 8000:8000`) -- `graph indexer rules get [options] [ ...]` - Get one or more indexing rules using `all` as the `` to get all rules, or `global` to get the global defaults. An additional argument `--merged` can be used to specify that deployment specific rules are merged with the global rule. This is how they are applied in the Indexer agent. +- `pravidla indexování grafů získat [možnosti] [ ...]` - Získá jedno nebo více indexovacích pravidel pomocí `all` jako `` pro získání všech pravidel nebo `global` pro získání globálních výchozích hodnot. Pomocí doplňkového argumentu `--merged` lze určit, že pravidla specifická pro nasazení budou sloučena s globálním pravidlem. Takto se použijí v agentu Indexer. -- `graph indexer rules set [options] ...` - Set one or more indexing rules. +- `pravidla indexování grafů získat [možnosti] ...` -Nastavení jednoho nebo více pravidel indexování. -- `graph indexer rules start [options] ` - Start indexing a subgraph deployment if available and set its `decisionBasis` to `always`, so the Indexer agent will always choose to index it. If the global rule is set to always then all available subgraphs on the network will be indexed. +- `pravidla indexování grafů získat [možnosti] ` - Spustí indexování nasazení podgrafů, pokud je k dispozici, a nastaví jeho `decisionBasis` na `always`, takže agent Indexer vždy zvolí jeho indexování. Pokud je globální pravidlo nastaveno na vždy, pak budou indexovány všechny dostupné podgrafy v síti. -- `graph indexer rules stop [options] ` - Stop indexing a deployment and set its `decisionBasis` to never, so it will skip this deployment when deciding on deployments to index. +- `zastavení pravidel indexování grafů [možnosti]` - Zastaví indexování nasazení a nastaví jeho `decisionBasis` na never, takže při rozhodování o nasazeních k indexování toto nasazení přeskočí. -- `graph indexer rules maybe [options] ` — Set the `decisionBasis` for a deployment to `rules`, so that the Indexer agent will use indexing rules to decide whether to index this deployment. +- `možná pravidla indexování grafů [možnosti] ` - Nastaví `decisionBasis` pro nasazení na `rules`, takže agent Indexer bude při rozhodování o indexování tohoto nasazení používat pravidla indexování. -- `graph indexer actions get [options] ` - Fetch one or more actions using `all` or leave `action-id` empty to get all actions. An additonal argument `--status` can be used to print out all actions of a certain status. +- `Akce indexátoru grafu získají [možnosti] ` - Získá jednu nebo více akcí pomocí `all` nebo ponechá `action-id` prázdné pro získání všech akcí. Přídavný argument `--status` lze použít pro vypsání všech akcí určitého stavu. -- `graph indexer action queue allocate ` - Queue allocation action +- `graph indexer action queue allocate ` - Akce přidělení fronty -- `graph indexer action queue reallocate ` - Queue reallocate action +- `graph indexer action queue reallocate ` - Akce přerozdělení fronty -- `graph indexer action queue unallocate ` - Queue unallocate action +- `graph indexer action queue unallocate ` - Akce odalokování fronty -- `graph indexer actions cancel [ ...]` - Cancel all action in the queue if id is unspecified, otherwise cancel array of id with space as separator +- `Akce indexátoru grafů zrušit [ ...]` - Zruší všechny akce ve frontě, pokud není id zadáno, jinak zruší pole id s mezerou jako oddělovačem -- `graph indexer actions approve [ ...]` - Approve multiple actions for execution +- `schvalovat akce indexátoru grafů[ ...]` - Schválení více akcí k provedení -- `graph indexer actions execute approve` - Force the worker to execute approved actions immediately +- `akce indexátoru grafu provést schválit` - Vynutí, aby pracovník okamžitě provedl schválené akce -All commands which display rules in the output can choose between the supported output formats (`table`, `yaml`, and `json`) using the `-output` argument. +Všechny příkazy, které zobrazují pravidla na výstupu, mohou pomocí argumentu `-output` volit mezi podporovanými výstupními formáty (`table`, `yaml` a `json`). -#### Indexing rules +#### Pravidla indexování -Indexing rules can either be applied as global defaults or for specific subgraph deployments using their IDs. The `deployment` and `decisionBasis` fields are mandatory, while all other fields are optional. When an indexing rule has `rules` as the `decisionBasis`, then the Indexer agent will compare non-null threshold values on that rule with values fetched from the network for the corresponding deployment. If the subgraph deployment has values above (or below) any of the thresholds it will be chosen for indexing. +Pravidla indexování lze použít buď jako globální výchozí, nebo pro konkrétní nasazení podgrafů pomocí jejich ID. Pole `nasazení` a `podklad pro rozhodování` jsou povinná, zatímco všechna ostatní pole jsou nepovinná. Pokud má indexovací pravidlo `pravidla` jako `základnu rozhodování`, pak agent Indexer porovná nenulové prahové hodnoty tohoto pravidla s hodnotami získanými ze sítě pro příslušné nasazení. Pokud má dílčí nasazení grafu hodnoty vyšší (nebo nižší) než některá z prahových hodnot, bude vybráno pro indexaci. -For example, if the global rule has a `minStake` of **5** (GRT), any subgraph deployment which has more than 5 (GRT) of stake allocated to it will be indexed. Threshold rules include `maxAllocationPercentage`, `minSignal`, `maxSignal`, `minStake`, and `minAverageQueryFees`. +Pokud má například globální pravidlo `minStake` hodnotu **5** (GRT), bude indexováno každé nasazení podgrafu, kterému je přiděleno více než 5 (GRT) podílů. Mezi prahová pravidla patří `maxAllocationPercentage`, `minSignal`, `maxSignal`, `minStake` a `minAverageQueryFees`. -Data model: +Datový model: ```graphql type IndexingRule { @@ -601,7 +601,7 @@ IndexingDecisionBasis { } ``` -Example usage of indexing rule: +Příklad použití indexovacího pravidla: ``` graph indexer rules offchain QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK @@ -613,20 +613,20 @@ graph indexer rules stop QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK graph indexer rules delete QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK ``` -#### Actions queue CLI +#### Fronta akcí CLI -The indexer-cli provides an `actions` module for manually working with the action queue. It uses the **Graphql API** hosted by the indexer management server to interact with the actions queue. +Indexer-cli poskytuje modul `actions` pro ruční práci s frontou akcí. K interakci s frontou akcí používá **Graphql API**, které je hostováno serverem pro správu indexeru. -The action execution worker will only grab items from the queue to execute if they have `ActionStatus = approved`. In the recommended path actions are added to the queue with ActionStatus = queued, so they must then be approved in order to be executed on-chain. The general flow will look like: +Pracovník pro provádění akcí převezme položky z fronty k provedení pouze tehdy, pokud mají `ActionStatus = approved`. V doporučené cestě jsou akce přidány do fronty se stavem ActionStatus = queued, takže pak musí být schváleny, aby mohly být provedeny v řetězci. Obecný průběh bude vypadat takto: -- Action added to the queue by the 3rd party optimizer tool or indexer-cli user -- Indexer can use the `indexer-cli` to view all queued actions -- Indexer (or other software) can approve or cancel actions in the queue using the `indexer-cli`. The approve and cancel commands take an array of action ids as input. -- The execution worker regularly polls the queue for approved actions. It will grab the `approved` actions from the queue, attempt to execute them, and update the values in the db depending on the status of execution to `success` or `failed`. -- If an action is successful the worker will ensure that there is an indexing rule present that tells the agent how to manage the allocation moving forward, useful when taking manual actions while the agent is in `auto` or `oversight` mode. -- The indexer can monitor the action queue to see a history of action execution and if needed re-approve and update action items if they failed execution. The action queue provides a history of all actions queued and taken. +- Akce přidaná do fronty nástrojem optimalizace třetí strany nebo uživatelem indexer-cli +- Indexer může pomocí `indexer-cli` zobrazit všechny akce ve frontě +- Indexer (nebo jiný software) může akce ve frontě schválit nebo zrušit pomocí příkazu `indexer-cli`. Příkazy approve a cancel přijímají jako vstup pole id akcí. +- Pracovník provádějící operace pravidelně kontroluje frontu schválených akcí. Vezme z fronty `schválené` akce, pokusí se je provést a aktualizuje hodnoty v db v závislosti na stavu provedení na `úspěšné` nebo `neúspěšné`. +- Pokud je akce úspěšná, pracovník zajistí, že je přítomno pravidlo indexování, které agentovi říká, jak má alokaci dále spravovat, což je užitečné při provádění ručních akcí, když je agent v režimu `auto` nebo `oversight`. +- Indexer může sledovat frontu akcí a zobrazit historii jejich provádění a v případě potřeby znovu schválit a aktualizovat položky akcí, pokud se nepodařilo je provést. Fronta akcí poskytuje historii všech akcí zařazených do fronty a provedených. -Data model: +Datový model: ```graphql Type ActionInput { @@ -659,7 +659,7 @@ ActionType { } ``` -Example usage from source: +Příklad použití ze zdroje: ```bash graph indexer actions get all @@ -679,34 +679,34 @@ graph indexer actions approve 1 3 5 graph indexer actions execute approve ``` -Note that supported action types for allocation management have different input requirements: +Všimněte si, že podporované typy akcí pro správu přidělování mají různé vstupní požadavky: -- `Allocate` - allocate stake to a specific subgraph deployment +- `Allocate` - přidělí podíl konkrétnímu nasazení podgrafu - - required action params: + - požadované parametry akce: - deploymentID - - amount + - částka -- `Unallocate` - close allocation, freeing up the stake to reallocate elsewhere +- `Unallocate` - uzavře alokaci, čímž uvolní podíl k přerozdělení jinam - - required action params: + - požadované parametry akce: - allocationID - deploymentID - - optional action params: + - volitelné parametry akce: - poi - - force (forces using the provided POI even if it doesn’t match what the graph-node provides) + - síla (vynutí pomocí poskytnutého POI, i když neodpovídá tomu, co poskytuje uzel graf) -- `Reallocate` - atomically close allocation and open a fresh allocation for the same subgraph deployment +- `Přerozdělit` – atomicky uzavřít alokaci a otevřít novou alokaci pro stejné nasazení podgrafu - - required action params: + - požadované parametry akce: - allocationID - deploymentID - - amount - - optional action params: + - částka + - volitelné parametry akce: - poi - - force (forces using the provided POI even if it doesn’t match what the graph-node provides) + - síla (vynutí pomocí poskytnutého POI, i když neodpovídá tomu, co poskytuje uzel graf) -#### Cost models +#### Nákladové modely Cost models provide dynamic pricing for queries based on market and query attributes. The Indexer Service shares a cost model with the gateways for each subgraph for which they intend to respond to queries. The gateways, in turn, use the cost model to make Indexer selection decisions per query and to negotiate payment with chosen Indexers. From a5aef2de0ce06cdb676c69749ba4fc0bd090780f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:32 -0400 Subject: [PATCH 197/924] New translations indexing.mdx (German) --- website/pages/de/network/indexing.mdx | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/de/network/indexing.mdx b/website/pages/de/network/indexing.mdx index 8d273d73853d..b0de4567f4fc 100644 --- a/website/pages/de/network/indexing.mdx +++ b/website/pages/de/network/indexing.mdx @@ -113,11 +113,11 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. | Konfiguration | Postgres
(CPUs) | Postgres
(Speicher in GB) | Postgres
(Festplatte in TB) | VMs
(CPUs) | VMs
(Speicher in GB) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Klein | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Mittel | 16 | 64 | 2 | 32 | 64 | -| Groß | 72 | 468 | 3.5 | 48 | 184 | +| ------------- |:--------------------------:|:------------------------------------:|:--------------------------------------:|:---------------------:|:-------------------------------:| +| Klein | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Mittel | 16 | 64 | 2 | 32 | 64 | +| Groß | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Der Graph-Knoten -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP-Server
(für Subgraf-Abfragen) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(für Subgraf-Abonnements) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(zum Verwalten von Deployments) | / | --admin-port | - | -| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | ----------------- | +| 8000 | GraphQL HTTP-Server
(für Subgraf-Abfragen) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(für Subgraf-Abonnements) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(zum Verwalten von Deployments) | / | --admin-port | - | +| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | #### Indexer Service -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL-HTTP-Server
(für kostenpflichtige Subgraf-Abfragen) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| ---- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL-HTTP-Server
(für kostenpflichtige Subgraf-Abfragen) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus-Metriken | /metrics | --metrics-port | - | #### Indexer Agent From 439b9f829fea35d347794798137e6d21ec67db3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:33 -0400 Subject: [PATCH 198/924] New translations indexing.mdx (Italian) --- website/pages/it/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/it/network/indexing.mdx b/website/pages/it/network/indexing.mdx index 33a42fc96831..514e7ea925cb 100644 --- a/website/pages/it/network/indexing.mdx +++ b/website/pages/it/network/indexing.mdx @@ -112,12 +112,12 @@ Gli Indexer possono differenziarsi applicando tecniche avanzate per prendere dec - **Medio** - Indexer di produzione che supporta 100 subgraph e 200-500 richieste al secondo. - **Grande** - È pronto a indicizzare tutti i subgraph attualmente utilizzati e a servire le richieste per il relativo traffico. -| Setup | Postgres
(CPUs) | Postgres
(memoria in GBs) | Postgres
(disco in TBs) | VMs
(CPUs) | VMs
(memoria in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Piccolo | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
(CPUs) | Postgres
(memoria in GBs) | Postgres
(disco in TBs) | VMs
(CPUs) | VMs
(memoria in GBs) | +| -------- |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| +| Piccolo | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3.5 | 48 | 184 | ### Quali sono le precauzioni di base per la sicurezza che un Indexer dovrebbe adottare? @@ -149,20 +149,20 @@ Nota: Per supportare una scalabilità agile, si consiglia di separare le attivit #### Graph Node -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(per le query di subgraph) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(per le sottoscrizioni ai subgraph) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(per la gestione dei deployment) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| ----- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
(per le query di subgraph) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(per le sottoscrizioni ai subgraph) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(per la gestione dei deployment) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | #### Servizio Indexer -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(per le query di subgraph a pagamento) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| ----- | --------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(per le query di subgraph a pagamento) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Metriche di Prometheus | /metrics | --metrics-port | - | #### Indexer Agent From 7a7f7e2e0ebe05a15e9c2dcc9f2ccaa34decc752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:34 -0400 Subject: [PATCH 199/924] New translations indexing.mdx (Japanese) --- website/pages/ja/network/indexing.mdx | 44 +++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/website/pages/ja/network/indexing.mdx b/website/pages/ja/network/indexing.mdx index ca3453fcb6e9..6e7daf5e2b76 100644 --- a/website/pages/ja/network/indexing.mdx +++ b/website/pages/ja/network/indexing.mdx @@ -26,7 +26,7 @@ title: インデキシング インデキシング報酬は、年間 3%の発行量に設定されているプロトコル・インフレから得られます。 報酬は、それぞれのサブグラフにおけるすべてのキュレーション・シグナルの割合に基づいてサブグラフに分配され、そのサブグラフに割り当てられたステークに基づいてインデクサーに分配されます。 **特典を受けるためには、仲裁憲章で定められた基準を満たす有効な POI(Proof of Indexing)で割り当てを終了する必要があります。** -Numerous tools have been created by the community for calculating rewards; you'll find a collection of them organized in the [Community Guides collection](https://www.notion.so/Community-Guides-abbb10f4dba040d5ba81648ca093e70c). You can also find an up to date list of tools in the #Delegators and #Indexers channels on the [Discord server](https://discord.gg/graphprotocol). Here we link a [recommended allocation optimiser](https://github.com/graphprotocol/AllocationOpt.jl) integrated with the indexer software stack. +コミュニティでは報酬を計算するための多くのツールが開発されており、それらは[Community Guides collection](https://www.notion.so/Community-Guides-abbb10f4dba040d5ba81648ca093e70c)で整理されています。また、最新のツールのリストは[Discord server](https://discord.gg/graphprotocol)の#Delegatorsおよび#Indexersチャンネルで確認できます。以下に、インデクサーソフトウェアスタックに統合された[recommended allocation optimiser](https://github.com/graphprotocol/AllocationOpt.jl)へのリンクを示します。 ### POI(proof of indexing)とは何ですか? @@ -81,7 +81,7 @@ Use Etherscan to call `getRewards()`: ### クエリフィーリベートとは何ですか、またいつ配布されますか? -Query fees are collected by the gateway and distributed to indexers according to the exponential rebate function (see GIP [here](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162)). The exponential rebate function is proposed as a way to ensure indexers achieve the best outcome by faithfully serving queries. It works by incentivizing Indexers to allocate a large amount of stake (which can be slashed for erring when serving a query) relative to the amount of query fees they may collect. +クエリ料金はゲートウェイによって収集され、指数リベート関数に従ってインデクサーに分配されます (GIP[こちら](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162)を参照)。 指数リベート関数は、インデクサーがクエリを忠実に処理することで確実に最良の結果を達成する方法として提案されています。 これは、インデクサーが収集する可能性のあるクエリ料金の額と比較して、大量のステーク (クエリの提供時にエラーが発生した場合に削減される可能性がある) を割り当てるようインデクサーに奨励することによって機能します。 割り当てが閉じられると、リベートはインデクサーによって請求されることができるようになります。請求されると、クエリ料金のリベートは、クエリ料金のカットと指数的なリベート関数に基づいて、インデクサーとその委任者に分配されます。 @@ -112,12 +112,12 @@ Query fees are collected by the gateway and distributed to indexers according to - **Medium** - 100 個のサブグラフと 1 秒あたり 200 ~ 500 のリクエストをサポートするプロダクションインデクサー - **Large** - 現在使用されているすべてのサブグラフのインデックスを作成し、関連するトラフィックのリクエストに対応します -| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### インデクサーが取るべきセキュリティ対策は? @@ -149,20 +149,20 @@ Query fees are collected by the gateway and distributed to indexers according to #### グラフノード -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ------------------------------------------------------- | ------------------------------------------------------ | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ------------------------------------------------------------ | --------------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -374,7 +374,7 @@ docker-compose up #### はじめに -The Indexer agent and Indexer service should be co-located with your Graph Node infrastructure. There are many ways to set up virtual execution environments for your Indexer components; here we'll explain how to run them on baremetal using NPM packages or source, or via kubernetes and docker on the Google Cloud Kubernetes Engine. If these setup examples do not translate well to your infrastructure there will likely be a community guide to reference, come say hi on [Discord](https://discord.gg/graphprotocol)! Remember to [stake in the protocol](/network/indexing#stake-in-the-protocol) before starting up your Indexer components! +インデクサー エージェントとインデクサー サービスは、グラフ ノード インフラストラクチャと同じ場所に配置する必要があります。 インデクサー コンポーネントの仮想実行環境をセットアップするには、さまざまな方法があります。 ここでは、NPM パッケージまたはソースを使用するか、Google Cloud Kubernetes Engine 上の kubernetes と Docker を介してベアメタル上でそれらを実行する方法を説明します。 これらの設定例がご使用のインフラストラクチャにうまく反映されない場合は、参考となるコミュニティ ガイドがある可能性があります。[Discord](https://discord.gg/graphprotocol) にお越しください。 インデクサー コンポーネントを起動する前に、忘れずに [stake in the protocol](/network/indexing#stake-in-the-protocol) してください。 #### NPM パッケージから @@ -730,10 +730,10 @@ default => 0.1 * $SYSTEM_LOAD; 上記のモデルを使用したクエリのコスト計算の例: -| クエリ | 価格 | +| クエリ | 価格 | | ---------------------------------------------------------------------------- | ------- | | { pairs(skip: 5000) { id } } | 0.5 GRT | -| { トークン { シンボル } } | 0.1 GRT | +| { トークン { シンボル } } | 0.1 GRT | | { pairs(skip: 5000) { id { tokens } symbol } } | 0.6 GRT | #### コストモデルの適用 From 75b2d6d86260d26e2d8adf331fbe0b68cf7657fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:36 -0400 Subject: [PATCH 200/924] New translations indexing.mdx (Korean) --- website/pages/ko/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/ko/network/indexing.mdx b/website/pages/ko/network/indexing.mdx index 9bdc2fb2eb7e..842a5c8e0c74 100644 --- a/website/pages/ko/network/indexing.mdx +++ b/website/pages/ko/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From 6388e52010563a185d8b8813d5b6b1326f6fc239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:37 -0400 Subject: [PATCH 201/924] New translations indexing.mdx (Dutch) --- website/pages/nl/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/nl/network/indexing.mdx b/website/pages/nl/network/indexing.mdx index 9bdc2fb2eb7e..842a5c8e0c74 100644 --- a/website/pages/nl/network/indexing.mdx +++ b/website/pages/nl/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From cd65391dbe4812c206fa2b318af39d08864b477a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:38 -0400 Subject: [PATCH 202/924] New translations indexing.mdx (Polish) --- website/pages/pl/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/pl/network/indexing.mdx b/website/pages/pl/network/indexing.mdx index 9bdc2fb2eb7e..842a5c8e0c74 100644 --- a/website/pages/pl/network/indexing.mdx +++ b/website/pages/pl/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From a1b405efe39248174bf8e5f25a5db49be584f333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:39 -0400 Subject: [PATCH 203/924] New translations indexing.mdx (Portuguese) --- website/pages/pt/network/indexing.mdx | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/website/pages/pt/network/indexing.mdx b/website/pages/pt/network/indexing.mdx index e22041a8bb18..2e04edc3b940 100644 --- a/website/pages/pt/network/indexing.mdx +++ b/website/pages/pt/network/indexing.mdx @@ -63,7 +63,7 @@ Use o Etherscan para chamar o `getRewards()`: - Navegue à [interface do Etherscan para o contrato de Recompensas](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) * Para chamar o `getRewards()`: - - Abra o _dropdown_ **10. getRewards**. + - Abra o *dropdown* **10. getRewards**. - Insira a **allocationID**. - Clique no botão **Query**. @@ -112,12 +112,12 @@ Os Indexadores podem se diferenciar ao aplicar técnicas avançadas para decidir - **Médio** — Indexador de Produção. Apoia 100 subgraphs e 200 – 500 pedidos por segundo. - **Grande** — Preparado para indexar todos os subgraphs usados atualmente e servir pedidos para o tráfego relacionado. -| Setup | Postgres
(CPUs) | Postgres
(memória em GBs) | Postgres
(disco em TBs) | VMs
(CPUs) | VMs
(memória em GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Pequeno | 4 | 8 | 1 | 4 | 16 | -| Normal | 8 | 30 | 1 | 12 | 48 | -| Médio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
(CPUs) | Postgres
(memória em GBs) | Postgres
(disco em TBs) | VMs
(CPUs) | VMs
(memória em GBs) | +| ------- |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| +| Pequeno | 4 | 8 | 1 | 4 | 16 | +| Normal | 8 | 30 | 1 | 12 | 48 | +| Médio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3.5 | 48 | 184 | ### Há alguma precaução básica de segurança que um Indexador deve tomar? @@ -149,20 +149,20 @@ Nota: Para apoiar o escalamento ágil, recomendamos que assuntos de consulta e i #### Graph Node -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| --- | --- | --- | --- | --- | -| 8000 | Servidor HTTP GraphQL
(para consultas de subgraph) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | WS GraphQL
(para inscrições a subgraphs) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(para gerir lançamentos) | / | --admin-port | - | -| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | -| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| ----- | ------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | Servidor HTTP GraphQL
(para consultas de subgraph) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | WS GraphQL
(para inscrições a subgraphs) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(para gerir lançamentos) | / | --admin-port | - | +| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | +| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | #### Serviço Indexador -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| --- | --- | --- | --- | --- | -| 7600 | Servidor HTTP GraphQL
(para consultas de subgraph pagas) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| ----- | ------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | Servidor HTTP GraphQL
(para consultas de subgraph pagas) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Agente Indexador From b370ac219c71f2bc0bf52cd74ca74c6d6594c40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:40 -0400 Subject: [PATCH 204/924] New translations indexing.mdx (Russian) --- website/pages/ru/network/indexing.mdx | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/ru/network/indexing.mdx b/website/pages/ru/network/indexing.mdx index ab88480b0ba3..6269c5fd4f9d 100644 --- a/website/pages/ru/network/indexing.mdx +++ b/website/pages/ru/network/indexing.mdx @@ -113,11 +113,11 @@ Once an allocation has been closed the rebates are available to be claimed by th - **Large** – готовность индексировать все используемые в настоящее время подграфы и обслуживать запросы на соответствующий трафик. | Настройка | Postgres
(ЦП) | Postgres
(память в ГБ) | Postgres
(диск в ТБ) | VMs
(ЦП) | VMs
(память в ГБ) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| --------- |:------------------------:|:---------------------------------:|:-------------------------------:|:-------------------:|:----------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### Какие основные меры безопасности следует предпринять индексатору? @@ -149,26 +149,26 @@ Once an allocation has been closed the rebates are available to be claimed by th #### Graph Node -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| --- | --- | --- | --- | --- | -| 8000 | HTTP-сервер GraphQL
(для запросов подграфов) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(для подписок на подграфы) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(для управления процессом развертывания) | / | --admin-port | - | -| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | -| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| ---- | ------------------------------------------------------------ | ---------------------------------------------------- | ----------------- | ---------------- | +| 8000 | HTTP-сервер GraphQL
(для запросов подграфов) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(для подписок на подграфы) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(для управления процессом развертывания) | / | --admin-port | - | +| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | +| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | #### Indexer Service -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| --- | --- | --- | --- | --- | -| 7600 | HTTP-сервер GraphQL
(для платных запросов к подграфам) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | HTTP-сервер GraphQL
(для платных запросов к подграфам) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Показатели Prometheus | /metrics | --metrics-port | - | #### Indexer Agent -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| --- | --- | --- | --- | --- | -| 8000 | API для управления индексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| ---- | ------------------------------- | ------------ | ------------------------- | --------------------------------------- | +| 8000 | API для управления индексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### Настройка серверной инфраструктуры с помощью Terraform в Google Cloud From 20d707cd2398e20da32f9b5bfb06b84c160dcd34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:41 -0400 Subject: [PATCH 205/924] New translations indexing.mdx (Swedish) --- website/pages/sv/network/indexing.mdx | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/sv/network/indexing.mdx b/website/pages/sv/network/indexing.mdx index 609035dec6fc..f48375d7043a 100644 --- a/website/pages/sv/network/indexing.mdx +++ b/website/pages/sv/network/indexing.mdx @@ -113,11 +113,11 @@ Indexers kan skilja sig åt genom att tillämpa avancerade tekniker för att fat - **Stor** - Förberedd för att indexera alla för närvarande använda subgrafer och att ta emot förfrågningar för relaterad trafik. | Konfiguration | Postgres
(CPU:er) | Postgres
(minne i GB) | Postgres
(disk i TB) | VM:er
(CPU:er) | VM:er
(minne i GB) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Liten | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Stor | 72 | 468 | 3,5 | 48 | 184 | +| ------------- |:----------------------------:|:--------------------------------:|:-------------------------------:|:-------------------------:|:-----------------------------:| +| Liten | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Stor | 72 | 468 | 3,5 | 48 | 184 | ### Vilka grundläggande säkerhetsåtgärder bör en Indexer vidta? @@ -149,20 +149,20 @@ Observera: För att stödja smidig skalning rekommenderas det att fråge- och in #### Graf Node -| Port | Syfte | Vägar | CLI-argument | Miljövariabel | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP-server
(för subgraf-förfrågningar) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(för subgraf-prenumerationer) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(för hantering av distributioner) | / | --admin-port | - | -| 8030 | Subgrafindexeringsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-metrar | /metrics | --metrics-port | - | +| Port | Syfte | Vägar | CLI-argument | Miljövariabel | +| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------- | +| 8000 | GraphQL HTTP-server
(för subgraf-förfrågningar) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(för subgraf-prenumerationer) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(för hantering av distributioner) | / | --admin-port | - | +| 8030 | Subgrafindexeringsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-metrar | /metrics | --metrics-port | - | #### Indexertjänst -| Port | Syfte | Vägar | CLI-argument | Miljövariabel | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP-server
(för betalda subgraf-förfrågningar) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus-metrar | /metrics | --metrics-port | - | +| Port | Syfte | Vägar | CLI-argument | Miljövariabel | +| ---- | ------------------------------------------------------------------ | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP-server
(för betalda subgraf-förfrågningar) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus-metrar | /metrics | --metrics-port | - | #### Indexeragent From 50bf53aefac08457273c1e6f9417fcf630b05ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:42 -0400 Subject: [PATCH 206/924] New translations indexing.mdx (Turkish) --- website/pages/tr/network/indexing.mdx | 38 +++++++++++++-------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/website/pages/tr/network/indexing.mdx b/website/pages/tr/network/indexing.mdx index 797eb551966f..fb6a2cf1d2bf 100644 --- a/website/pages/tr/network/indexing.mdx +++ b/website/pages/tr/network/indexing.mdx @@ -112,12 +112,12 @@ Bir tahsisat kapatıldıktan sonra iadeler İndeksleyici tarafından talep edile - **Orta** - 100 subgraph ve saniyede 200-500 isteği destekleyen Üretim İndeksleyici. - **Yüksek** - Şu anda kullanılan tüm subgraphları indekslemek ve ilgili trafik için istekleri sunmak için hazırlanmıştır. -| Kurulum | Postgres
(CPU'lar) | Postgres
(GB cinsinden bellek) | Postgres
(TB cinsinden disk) | VM'ler
(CPU'lar) | VM'ler
(GB cinsinden bellek) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Düşük | 4 | 8 | 1 | 4 | 16 | -| Standart | 8 | 30 | 1 | 12 | 48 | -| Orta | 16 | 64 | 2 | 32 | 64 | -| Yüksek | 72 | 468 | 3.5 | 48 | 184 | +| Kurulum | Postgres
(CPU'lar) | Postgres
(GB cinsinden bellek) | Postgres
(TB cinsinden disk) | VM'ler
(CPU'lar) | VM'ler
(GB cinsinden bellek) | +| -------- |:-----------------------------:|:-----------------------------------------:|:---------------------------------------:|:---------------------------:|:---------------------------------------:| +| Düşük | 4 | 8 | 1 | 4 | 16 | +| Standart | 8 | 30 | 1 | 12 | 48 | +| Orta | 16 | 64 | 2 | 32 | 64 | +| Yüksek | 72 | 468 | 3.5 | 48 | 184 | ### Bir İndeksleyicinin alması gereken bazı temel güvenlik önlemleri nelerdir? @@ -149,20 +149,20 @@ Not: Çevik ölçeklendirmeyi desteklemek için, sorgulama ve indeksleme endişe #### Graph Node -| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP sunucusu
( subgraph sorguları için) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
( subgraph abonelikleri için) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(dağıtımları yönetmek için) | / | --admin-port | - | -| 8030 | Subgraph indeksleme durum API'si | /graphql | --index-node-port | - | -| 8040 | Prometheus metrikleri | /metrics | --metrics-port | - | +| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | +| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | +| 8000 | GraphQL HTTP sunucusu
( subgraph sorguları için) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
( subgraph abonelikleri için) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(dağıtımları yönetmek için) | / | --admin-port | - | +| 8030 | Subgraph indeksleme durum API'si | /graphql | --index-node-port | - | +| 8040 | Prometheus metrikleri | /metrics | --metrics-port | - | #### İndeksleyici Hizmeti -| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP sunucusu
(ücretli subgraph sorguları için) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrikleri | /metrics | --metrics-port | - | +| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | +| ---- | ------------------------------------------------------------------ | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP sunucusu
(ücretli subgraph sorguları için) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrikleri | /metrics | --metrics-port | - | #### İndeksleyici Aracı @@ -531,9 +531,7 @@ graph indexer status #### Kullanım -İndeksleyici CLI, tipik olarak bağlantı noktası yönlendirme yoluyla İndeksleyici aracısına -bağlanır, bu nedenle CLI'nın aynı sunucuda veya kümede çalışması gerekmez. Başlamanıza yardımcı olmak ve biraz bilgi -vermek için CLI burada kısaca açıklanacaktır. +**İndeksleyici CLI**, tipik olarak bağlantı noktası yönlendirme yoluyla İndeksleyici aracısına bağlanır, bu nedenle CLI'nın aynı sunucuda veya kümede çalışması gerekmez. Başlamanıza yardımcı olmak ve biraz bilgi vermek için CLI burada kısaca açıklanacaktır. - `graph indexer connect ` - İndeksleyici yönetim API'sine bağlanın. Tipik olarak sunucuya bağlantı port yönlendirme yoluyla açılır, böylece CLI uzaktan kolayca çalıştırılabilir. (Örnek: `kubectl port-forward pod/ 8000:8000`) From 6934a78052199f231b2b205a73b887b8b1bae859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:43 -0400 Subject: [PATCH 207/924] New translations indexing.mdx (Ukrainian) --- website/pages/uk/network/indexing.mdx | 42 +++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/website/pages/uk/network/indexing.mdx b/website/pages/uk/network/indexing.mdx index 2169804aabe3..a795eae0c6bd 100644 --- a/website/pages/uk/network/indexing.mdx +++ b/website/pages/uk/network/indexing.mdx @@ -113,11 +113,11 @@ Query fees are collected by the gateway and distributed to indexers according to - **Large** - підготовлений для індексації всіх підграфів, що використовуються наразі, і обслуговування запитів на відповідний трафік. | Налаштування | Postgres
(CPU) | Postgres
(пам'ять в GB) | Postgres
(диск у ТБ) | VMs
(Центральні CPU) | VMs
(пам'ять у ГБ) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| ------------ |:-------------------------:|:----------------------------------:|:-------------------------------:|:-------------------------------:|:-----------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### Яких основних заходів безпеки повинен дотримуватися індексатор? @@ -149,26 +149,26 @@ Query fees are collected by the gateway and distributed to indexers according to #### Graph Node -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| --- | --- | --- | --- | --- | -| 8000 | HTTP-сервер GraphQL
(для запитів до підграфів) | /subgraphs/id/...
/subgraphs/name/.../... | --http-порт | - | -| 8001 | GraphQL WS
(для підписок на підграфи) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(для керування розгортаннями) | / | --admin-port | - | -| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | -| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | +| 8000 | HTTP-сервер GraphQL
(для запитів до підграфів) | /subgraphs/id/...
/subgraphs/name/.../... | --http-порт | - | +| 8001 | GraphQL WS
(для підписок на підграфи) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(для керування розгортаннями) | / | --admin-port | - | +| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | +| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | #### Служба індексації -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| --- | --- | --- | --- | --- | -| 7600 | HTTP-сервер GraphQL
(для платних запитів до підграфів) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | HTTP-сервер GraphQL
(для платних запитів до підграфів) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Метрики Prometheus | /metrics | --metrics-port | - | #### Агент індексації -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| --- | --- | --- | --- | --- | -| 8000 | API для керування індексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| ---- | ------------------------------ | ------------ | ------------------------- | --------------------------------------- | +| 8000 | API для керування індексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### Налаштування серверної інфраструктури з використанням Terraform на Google Cloud @@ -622,8 +622,8 @@ indexer-cli надає модуль `actions` для ручної роботи - Дія, додана до черги стороннім оптимізатором або користувачем indexer-cli - Індексатор може використовувати `indexer-cli` для перегляду всіх дій у черзі - Індексатор (або інша програма) може затверджувати або скасовувати дії у черзі за допомогою `indexer-cli`. Команди затвердження та скасування приймають на вхід масив ідентифікаторів дій. -- Виконавець регулярно проводить опитування черги на предмет схвалення дій. Він бере `approved` дії з черги, пробує виконати їх і потім оновлює значення в db в залежності від статусу виконання до `success` або `failed`. -- Якщо дія успішна, виконавець забезпечить наявність правила індексації, яке підкаже агенту, як керувати розподілом далі, що корисно при виконанні ручних дій під час перебування агента в режимі `auto` або `oversight`. +- Виконавець регулярно проводить опитування черги на предмет схвалення дій. Він бере `approved` дії з черги, пробує виконати їх і потім оновлює значення в db в залежності від статусу виконання до
` success` або ` failed`. +- Якщо дія успішна, виконавець забезпечить наявність правила індексації, яке підкаже агенту, як керувати розподілом далі, що корисно при виконанні ручних дій під час перебування агента в режимі `auto` або ` oversight`. - Індексатор може стежити за чергою дій, щоб бачити історію виконання дій і при необхідності повторно затверджувати та оновлювати елементи дій, якщо вони не були виконані. У черзі дій відображається історія всіх дій, поставлених у чергу і виконаних. Модель даних: From 25ec849675d35a2a14f7626cdefd4f08c05d5619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:45 -0400 Subject: [PATCH 208/924] New translations indexing.mdx (Chinese Simplified) --- website/pages/zh/network/indexing.mdx | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/website/pages/zh/network/indexing.mdx b/website/pages/zh/network/indexing.mdx index effefb23adbe..1218280c992d 100644 --- a/website/pages/zh/network/indexing.mdx +++ b/website/pages/zh/network/indexing.mdx @@ -2,7 +2,7 @@ title: 索引 --- -Indexers are node operators in The Graph Network that stake Graph Tokens (GRT) in order to provide indexing and query processing services. Indexers earn query fees and indexing rewards for their services. They also earn query fees that are rebated according to an exponential rebate function. +索引人是Graph 网络中的节点运营商,他们质押 Graph 通证 (GRT) 以提供索引和查询处理服务。 索引人通过他们的服务赚取查询费和索引奖励。 他们还根据 Cobbs-Douglas 回扣函数从回扣池中赚取收益,该回扣池与所有网络贡献者按他们的工作成比例共享。 抵押在协议中的 GRT 会受到解冻期的影响,如果索引人是恶意的并向应用程序提供不正确的数据或索引不正确,则可能会被削减。 索引人也可以从委托人那里获得委托,为网络做出贡献。 @@ -83,15 +83,15 @@ query indexerAllocations { Query fees are collected by the gateway and distributed to indexers according to the exponential rebate function (see GIP [here](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162)). The exponential rebate function is proposed as a way to ensure indexers achieve the best outcome by faithfully serving queries. It works by incentivizing Indexers to allocate a large amount of stake (which can be slashed for erring when serving a query) relative to the amount of query fees they may collect. -Once an allocation has been closed the rebates are available to be claimed by the Indexer. Upon claiming, the query fee rebates are distributed to the Indexer and their Delegators based on the query fee cut and the exponential rebate function. +一旦分配已结束且争议期已过,索引人就可以要求回扣。 查询费用回扣根据查询费用减免和委托池比例分配给索引人及其委托人。 ### 什么是查询费减免和索引奖励减免? `queryFeeCut` 和 `indexingRewardCut` 值是委托的参数,该索引可以设置连同 cooldownBlocks 控制 GRT 的索引和他们的委托人之间的分配。 有关设置委托参数的说明,请参阅[协议中的质押](/network/indexing#stake-in-the-protocol)的最后步骤。 -- **queryFeeCut** - the % of query fee rebates that will be distributed to the Indexer. If this is set to 95%, the Indexer will receive 95% of the query fees earned when an allocation is closed with the other 5% going to the Delegators. +- **查询费用削减** - 将分配给索引人的子图上累积的查询费用回扣的百分比。 如果将其设置为 95%,则在申请分配时,索引人将获得查询费用回扣池的 95%,另外 5% 将分配给委托人。 -- **indexingRewardCut** - the % of indexing rewards that will be distributed to the Indexer. If this is set to 95%, the Indexer will receive 95% of the indexing rewards when an allocation is closed and the Delegators will split the other 5%. +- **索引奖励削减** - 分配给索引人的子图上累积的索引奖励的百分比。 如果将其设置为 95%,则当分配结束时,索引人将获得索引奖励池的 95%,而委托人将分配其他 5%。 ### 索引人如何知道要索引哪些子图? @@ -113,11 +113,11 @@ Once an allocation has been closed the rebates are available to be claimed by th - **大型** -准备对当前使用的所有子图进行索引,并为相关流量的请求提供服务。 | 设置 | (CPU 数量) | (内存 GB) | (硬盘 TB) | (CPU 数量) | (内存 GB) | -| ---- | :--------: | :-------: | :-------: | :--------: | :-------: | -| 小型 | 4 | 8 | 1 | 4 | 16 | -| 标准 | 8 | 30 | 1 | 12 | 48 | -| 中型 | 16 | 64 | 2 | 32 | 64 | -| 大型 | 72 | 468 | 3.5 | 48 | 184 | +| -- |:--------:|:-------:|:-------:|:--------:|:-------:| +| 小型 | 4 | 8 | 1 | 4 | 16 | +| 标准 | 8 | 30 | 1 | 12 | 48 | +| 中型 | 16 | 64 | 2 | 32 | 64 | +| 大型 | 72 | 468 | 3.5 | 48 | 184 | ### 索引人应该采取哪些基本的安全防范措施? @@ -149,26 +149,26 @@ Once an allocation has been closed the rebates are available to be claimed by th #### Graph 节点 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP 服务
(用于子图查询) | /subgraphs/id/...

/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(用于子图订阅) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(用于管理部署) | / | --admin-port | - | -| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | -| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| ---- | ------------------------------------ | ------------------------------------------------------------------- | ----------------- | ----- | +| 8000 | GraphQL HTTP 服务
(用于子图查询) | /subgraphs/id/...

/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(用于子图订阅) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(用于管理部署) | / | --admin-port | - | +| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | +| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | #### 索引人服务 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP 服务器
(用于付费子图查询) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| ---- | --------------------------------------- | --------------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP 服务器
(用于付费子图查询) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus 指标 | /metrics | --metrics-port | - | #### 索引人代理 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| ---- | -------------- | ---- | ------------------------- | --------------------------------------- | -| 8000 | 索引人管理 API | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| ---- | --------- | -- | ------------------------- | --------------------------------------- | +| 8000 | 索引人管理 API | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### 在谷歌云上使用 Terraform 建立服务器基础设施 @@ -730,7 +730,7 @@ default => 0.1 * $SYSTEM_LOAD; 使用上述模型的查询成本计算示例: -| 询问 | 价格 | +| 询问 | 价格 | | ---------------------------------------------------------------------------- | ------- | | { pairs(skip: 5000) { id } } | 0.5 GRT | | { tokens { symbol } } | 0.1 GRT | From 7b2b03e36badce516dad5231e4010997ac9bf354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:46 -0400 Subject: [PATCH 209/924] New translations indexing.mdx (Urdu (Pakistan)) --- website/pages/ur/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/ur/network/indexing.mdx b/website/pages/ur/network/indexing.mdx index 6b396ceccca7..52062b9b6584 100644 --- a/website/pages/ur/network/indexing.mdx +++ b/website/pages/ur/network/indexing.mdx @@ -112,12 +112,12 @@ query indexerAllocations { - **درمیانہ** - پروڈکشن انڈیکسر 100 سب گراف اور 200-500 درخواستیں فی سیکنڈ کو اٹھا سکتا ہے. - **بڑا** - تمام فی الحال زیر استعمال سب گرافس کو انڈیکس کرنے اور متعلقہ ٹریفک کے لیے درخواستیں پیش کرنے کے لیے تیار ہے. -| سیٹ اپ | Postgres
(CPUs) | Postgres
(GBs میں میموری) | Postgres
(TBs میں ڈسک) | VMs
(CPUs) | VMs
(GBs میں میموری) | -| --- | :-: | :-: | :-: | :-: | :-: | -| چھوٹا | 4 | 8 | 1 | 4 | 16 | -| معیاری | 8 | 30 | 1 | 12 | 48 | -| درمیانہ | 16 | 64 | 2 | 32 | 64 | -| بڑا | 72 | 468 | 3.5 | 48 | 184 | +| سیٹ اپ | Postgres
(CPUs) | Postgres
(GBs میں میموری) | Postgres
(TBs میں ڈسک) | VMs
(CPUs) | VMs
(GBs میں میموری) | +| ------- |:--------------------------:|:------------------------------------:|:---------------------------------:|:---------------------:|:-------------------------------:| +| چھوٹا | 4 | 8 | 1 | 4 | 16 | +| معیاری | 8 | 30 | 1 | 12 | 48 | +| درمیانہ | 16 | 64 | 2 | 32 | 64 | +| بڑا | 72 | 468 | 3.5 | 48 | 184 | ### وہ کون سی چند بنیادی حفاظتی تدابیر ہیں جو ایک انڈیکسر کو اختیار کرنی چاہیے؟ @@ -149,20 +149,20 @@ query indexerAllocations { #### گراف نوڈ -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | -| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | -| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
(سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | +| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | +| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | #### انڈیکسر سروس -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(ادا شدہ سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(ادا شدہ سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus میٹرکس | /metrics | --metrics-port | - | #### انڈیکسر ایجنٹ From 520c1a3a2a58df45452a3566259a08992999787f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:47 -0400 Subject: [PATCH 210/924] New translations indexing.mdx (Vietnamese) --- website/pages/vi/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/vi/network/indexing.mdx b/website/pages/vi/network/indexing.mdx index 8365be2856b1..cbff1daedbc3 100644 --- a/website/pages/vi/network/indexing.mdx +++ b/website/pages/vi/network/indexing.mdx @@ -112,12 +112,12 @@ Indexer có thể tự phân biệt bản thân bằng cách áp dụng các k - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Lớn** - Được chuẩn bị để index tất cả các subgraph hiện đang được sử dụng và phục vụ các yêu cầu cho lưu lượng truy cập liên quan. -| Cài đặt | Postgres
(CPUs) | Postgres
(bộ nhớ tính bằng GB) | Postgres
(đĩa tính bằng TB) | VMs
(CPUs) | VMs
(bộ nhớ tính bằng GB) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Nhỏ | 4 | 8 | 1 | 4 | 16 | -| Tiêu chuẩn | 8 | 30 | 1 | 12 | 48 | -| Trung bình | 16 | 64 | 2 | 32 | 64 | -| Lớn | 72 | 468 | 3.5 | 48 | 184 | +| Cài đặt | Postgres
(CPUs) | Postgres
(bộ nhớ tính bằng GB) | Postgres
(đĩa tính bằng TB) | VMs
(CPUs) | VMs
(bộ nhớ tính bằng GB) | +| ----------- |:--------------------------:|:-----------------------------------------:|:--------------------------------------:|:---------------------:|:------------------------------------:| +| Nhỏ | 4 | 8 | 1 | 4 | 16 | +| Tiêu chuẩn | 8 | 30 | 1 | 12 | 48 | +| Trung bình | 16 | 64 | 2 | 32 | 64 | +| Lớn | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Lưu ý: Để hỗ trợ mở rộng quy mô nhanh, bạn nên tách các mối #### Graph Node -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| --- | --- | --- | --- | --- | -| 8000 | Máy chủ GraphQL HTTP
(cho các truy vấn subgraph) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(cho các đăng ký subgraph) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(để quản lý triển khai) | / | --admin-port | - | -| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | -| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | +| 8000 | Máy chủ GraphQL HTTP
(cho các truy vấn subgraph) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(cho các đăng ký subgraph) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(để quản lý triển khai) | / | --admin-port | - | +| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | +| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | #### Dịch vụ Indexer -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| --- | --- | --- | --- | --- | -| 7600 | Máy chủ GraphQL HTTP
(cho các truy vấn subgraph có trả phí) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| ---- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | Máy chủ GraphQL HTTP
(cho các truy vấn subgraph có trả phí) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Số liệu Prometheus | /metrics | --metrics-port | - | #### Đại lý Indexer From 059e68062c5360956e02d5393d30da54e021d401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:48 -0400 Subject: [PATCH 211/924] New translations indexing.mdx (Marathi) --- website/pages/mr/network/indexing.mdx | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/website/pages/mr/network/indexing.mdx b/website/pages/mr/network/indexing.mdx index 4ead6f7ae74b..9cdbc569d607 100644 --- a/website/pages/mr/network/indexing.mdx +++ b/website/pages/mr/network/indexing.mdx @@ -112,12 +112,12 @@ Once an allocation has been closed the rebates are available to be claimed by th - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| मानक | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
(CPUs) | Postgres
(memory in GBs) | Postgres
(disk in TBs) | VMs
(CPUs) | VMs
(memory in GBs) | +| ------ |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| मानक | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Once an allocation has been closed the rebates are available to be claimed by th #### आलेख नोड -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
(for subgraph queries) | /subgraphs/id/...
/subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
(for subgraph subscriptions) | /subgraphs/id/...
/subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
(for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
(for paid subgraph queries) | /subgraphs/id/...
/status
/channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -623,7 +623,7 @@ graph indexer rules delete QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK - Indexer can use the `indexer-cli` to view all queued actions - इंडेक्सर (किंवा इतर सॉफ्टवेअर) `indexer-cli` वापरून रांगेतील क्रिया मंजूर किंवा रद्द करू शकतात. मंजूर आणि रद्द आदेश इनपुट म्हणून अॅक्शन आयडीचा अॅरे घेतात. - अंमलबजावणी कर्मचारी नियमितपणे मंजूर कृतींसाठी रांगेत मतदान करतात. ते रांगेतील `मंजूर` क्रिया पकडेल, त्या कार्यान्वित करण्याचा प्रयत्न करेल आणि अंमलबजावणीच्या स्थितीनुसार `यशस्वी` किंवा `अयशस्वी< वर db मधील मूल्ये अपडेट करेल. /code>. -
  • एखादी कृती यशस्वी झाल्यास कार्यकर्ता खात्री करेल की एक अनुक्रमणिका नियम उपस्थित आहे जो एजंटला वाटप कसे व्यवस्थापित करावे हे सांगते, एजंट ऑटो` किंवा ` मध्ये असताना मॅन्युअल क्रिया करताना उपयुक्त oversight` मोड. +
  • एखादी कृती यशस्वी झाल्यास कार्यकर्ता खात्री करेल की एक अनुक्रमणिका नियम उपस्थित आहे जो एजंटला वाटप कसे व्यवस्थापित करावे हे सांगते, एजंट ऑटो` किंवा ` मध्ये असताना मॅन्युअल क्रिया करताना उपयुक्त oversight` मोड. - इंडेक्सर कारवाईच्या अंमलबजावणीचा इतिहास पाहण्यासाठी कृती रांगेचे निरीक्षण करू शकतो आणि आवश्यक असल्यास क्रिया आयटमची अंमलबजावणी अयशस्वी झाल्यास पुन्हा मंजूर आणि अद्यतनित करू शकतो. कृती रांग रांगेत लावलेल्या आणि केलेल्या सर्व क्रियांचा इतिहास प्रदान करते. Data model: From ee000d1d9ae1819cc922063855a3259e855276ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:49 -0400 Subject: [PATCH 212/924] New translations indexing.mdx (Hindi) --- website/pages/hi/network/indexing.mdx | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/hi/network/indexing.mdx b/website/pages/hi/network/indexing.mdx index 4af09b4d7fd8..399bca439431 100644 --- a/website/pages/hi/network/indexing.mdx +++ b/website/pages/hi/network/indexing.mdx @@ -112,12 +112,12 @@ Once an allocation has been closed the rebates are available to be claimed by th - **माध्यम** - प्रोडक्शन इंडेक्सर प्रति सेकंड 100 सबग्राफ और 200-500 अनुरोधों का समर्थन करता है। - **बड़ा** - वर्तमान में उपयोग किए जाने वाले सभी सबग्राफ को अनुक्रमित करने और संबंधित ट्रैफ़िक के अनुरोधों को पूरा करने के लिए तैयार है। -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### एक इंडेक्सर को कौन सी बुनियादी सुरक्षा सावधानियां बरतनी चाहिए? @@ -149,20 +149,20 @@ Once an allocation has been closed the rebates are available to be claimed by th #### ग्राफ नोड -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | -------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | -------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -559,7 +559,7 @@ graph indexer status - `ग्राफ़ अनुक्रमणिका क्रियाएँ स्वीकृत निष्पादित करती हैं` - कार्यकर्ता को स्वीकृत क्रियाओं को तुरंत निष्पादित करने के लिए बाध्य करें -सभी आदेश जो आउटपुट में नियम प्रदर्शित करते हैं, समर्थित आउटपुट स्वरूपों (`तालिका`, `yaml`, और `json`) के बीच `का उपयोग करके चुन सकते हैं - आउटपुट` तर्क। +सभी आदेश जो आउटपुट में नियम प्रदर्शित करते हैं, समर्थित आउटपुट स्वरूपों (`तालिका`, `yaml`, और `json`) के बीच ` का उपयोग करके चुन सकते हैं - आउटपुट ` तर्क। #### Indexing rules @@ -623,7 +623,7 @@ graph indexer rules delete QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK - सभी कतारबद्ध क्रियाओं को देखने के लिए इंडेक्सर `indexer-cli` का उपयोग कर सकता है - इंडेक्सर (या अन्य सॉफ़्टवेयर) `इंडेक्सर-क्ली` का उपयोग करके कतार में क्रियाओं को स्वीकृत या रद्द कर सकता है। स्वीकृति और रद्द करने के आदेश इनपुट के रूप में क्रिया आईडी की एक सरणी लेते हैं। - निष्पादन कार्यकर्ता नियमित रूप से स्वीकृत कार्यों के लिए कतार का चुनाव करता है। यह कतार से `अनुमोदित` कार्यों को पकड़ लेगा, उन्हें निष्पादित करने का प्रयास करेगा, और निष्पादन की स्थिति के आधार पर डीबी में मूल्यों को `सफलता` या `विफल< पर अपडेट करेगा। /0>.
  • -
  • If an action is successful the worker will ensure that there is an indexing rule present that tells the agent how to manage the allocation moving forward, useful when taking manual actions while the agent is in auto` or `oversight` mode. +
  • If an action is successful the worker will ensure that there is an indexing rule present that tells the agent how to manage the allocation moving forward, useful when taking manual actions while the agent is in auto` or `oversight` mode. - अनुक्रमणक क्रिया निष्पादन के इतिहास को देखने के लिए क्रिया कतार की निगरानी कर सकता है और यदि आवश्यक हो तो निष्पादन विफल होने पर क्रिया आइटम को पुन: अनुमोदित और अद्यतन कर सकता है। क्रिया कतार पंक्तिबद्ध और की गई सभी कार्रवाइयों का इतिहास प्रदान करती है। डेटा मॉडल: From b577d2876616c815ac62f728310b5fec247bf75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:50 -0400 Subject: [PATCH 213/924] New translations indexing.mdx (Yoruba) --- website/pages/yo/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/yo/network/indexing.mdx b/website/pages/yo/network/indexing.mdx index 9bdc2fb2eb7e..842a5c8e0c74 100644 --- a/website/pages/yo/network/indexing.mdx +++ b/website/pages/yo/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From b25cb27efa9bc8245678e3ec16a8e6c95c2bc0e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:52 -0400 Subject: [PATCH 214/924] New translations overview.mdx (French) --- website/pages/fr/network/overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/fr/network/overview.mdx b/website/pages/fr/network/overview.mdx index a09b708c81d9..85433f3772f8 100644 --- a/website/pages/fr/network/overview.mdx +++ b/website/pages/fr/network/overview.mdx @@ -10,6 +10,6 @@ Le réseau Graph se compose d'indexeurs, de conservateurs et de délégués qui ![Token Economics](/img/Network-roles@2x.png) -To ensure economic security of The Graph Network and the integrity of data being queried, participants stake and use Graph Tokens ([GRT](/tokenomics)). GRT is a work utility token that is an ERC-20 used to allocate resources in the network. +Pour garantir la sécurité économique du Graph Network et l'intégrité des données interrogées, les participants misent et utilisent des jetons Graph ([GRT](/tokenomics)). GRT est un jeton utilitaire de travail qui est un ERC-20 utilisé pour allouer des ressources dans le réseau. Active Indexers, Curators and Delegators can provide services and earn income from the network, proportional to the amount of work they perform and their GRT stake. From b096519e3c8588b8e4af2a9442c1b878381cbe53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:07:54 -0400 Subject: [PATCH 215/924] New translations overview.mdx (Czech) --- website/pages/cs/network/overview.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/cs/network/overview.mdx b/website/pages/cs/network/overview.mdx index bee546908372..6d0e628ec063 100644 --- a/website/pages/cs/network/overview.mdx +++ b/website/pages/cs/network/overview.mdx @@ -1,15 +1,15 @@ --- -title: Network Overview +title: Přehled sítě --- -The Graph Network is a decentralized indexing protocol for organizing blockchain data. Applications use GraphQL to query open APIs called subgraphs, to retrieve data that is indexed on the network. With The Graph, developers can build serverless applications that run entirely on public infrastructure. +Sit' Graf je decentralizovaný indexovací protokol pro organizaci dat v blockchainu. Aplikace používají GraphQL k dotazování otevřených API zvaných podgrafy, aby získaly data, která jsou v síti indexována. Díky Graf mohou vývojáři vytvářet bezserverové aplikace, které běží výhradně na veřejné infrastruktuře. -## Overview +## Přehled -The Graph Network consists of Indexers, Curators and Delegators that provide services to the network, and serve data to Web3 applications. Consumers use the applications and consume the data. +Síť grafů se skládá z indexátorů, kurátorů a delegátorů, kteří poskytují služby síti a obsluhují data aplikací Web3. Spotřebitelé používají aplikace a spotřebovávají data. ![Token Economics](/img/Network-roles@2x.png) -To ensure economic security of The Graph Network and the integrity of data being queried, participants stake and use Graph Tokens ([GRT](/tokenomics)). GRT is a work utility token that is an ERC-20 used to allocate resources in the network. +Pro zajištění ekonomické bezpečnosti sítě Graf a integrity dotazovaných dat účastníci sázejí a používají graf tokeny ([GRT](/tokenomics)). GRT je pracovní užitkový token, který má hodnotu ERC-20 a slouží k přidělování zdrojů v síti. -Active Indexers, Curators and Delegators can provide services and earn income from the network, proportional to the amount of work they perform and their GRT stake. +Aktivní indexátoři, kurátoři a delegáti mohou poskytovat služby a vydělávat na síti úměrně množství práce, kterou vykonají, a svému podílu GRT. From 425f21bfeac1da77a9d6a583d47a3949b044acbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:04 -0400 Subject: [PATCH 216/924] New translations publishing-a-subgraph.mdx (Romanian) --- website/pages/ro/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ro/publishing/publishing-a-subgraph.mdx b/website/pages/ro/publishing/publishing-a-subgraph.mdx index bd8d1ca698a5..63ec80a57e88 100644 --- a/website/pages/ro/publishing/publishing-a-subgraph.mdx +++ b/website/pages/ro/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Once your subgraph has been [deployed to the Subgraph Studio](/deploying/deployi Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it. - + You can find the list of the supported networks [Here](/developing/supported-networks). From 9522693208729f346e09eb1f6e6fa2d617168d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:05 -0400 Subject: [PATCH 217/924] New translations publishing-a-subgraph.mdx (French) --- website/pages/fr/publishing/publishing-a-subgraph.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/fr/publishing/publishing-a-subgraph.mdx b/website/pages/fr/publishing/publishing-a-subgraph.mdx index 7ce631cb5e05..b799dc02c59d 100644 --- a/website/pages/fr/publishing/publishing-a-subgraph.mdx +++ b/website/pages/fr/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Une fois que votre subgraph a été [déployé dans Subgraph Studio](/deploying/ La publication d'un subgraph sur le réseau décentralisé permet aux [curateurs](/network/curating) de commencer à signaler et aux [indexeurs](/network/indexing) de l'indexer. - + Vous pouvez trouver la liste des réseaux supportés [ici](/developing/supported-networks). @@ -14,20 +14,20 @@ Vous pouvez trouver la liste des réseaux supportés [ici](/developing/supported Les subgraphs peuvent être publiés sur le réseau décentralisé directement depuis le tableau de bord du subgraph Studio en cliquant sur le bouton **Publier**. Une fois qu'un subgraph est publié, il sera disponible dans l'[explorateur The Graph](https://thegraph.com/explorer/). -- Subgraphs can be published to Goerli, Arbitrum goerli, Arbitrum One, or Ethereum mainnet. +- Les subgraphs peuvent être publiés sur Goerli, Arbitrum goerli, Arbitrum One ou sur le mainnet Ethereum. -- Regardless of the network the subgraph was published on, it can index data on any of the [supported networks](/developing/supported-networks). +- Quel que soit le réseau sur lequel le subgraph a été publié, il peut indexer des données sur n'importe lequel des [réseaux pris en charge](/developing/supported-networks). - Lors de la publication d'une nouvelle version pour un subgraph existant, les mêmes règles que ci-dessus s'appliquent. ## Curating your subgraph -> It is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. +> Il est recommandé de créer votre propre subgraph avec 10 000 GRT pour vous assurer qu'il est indexé et disponible pour interrogation dès que possible. Subgraph Studio enables you to be the first to curate your subgraph by adding GRT to your subgraph's curation pool in the same transaction. When publishing your subgraph, make sure to check the button that says, "Be the first to signal on this subgraph." ![Curation Pool](/img/curate-own-subgraph-tx.png) -## Updating metadata for a published subgraph +## Mise à jour des métadonnées d'un subgraph publié Une fois que votre subgraph a été publié sur le réseau décentralisé, vous pouvez modifier les métadonnées à tout moment en effectuant la mise à jour dans le tableau de bord Subgraph Studio du subgraphe. Après avoir enregistré les modifications et publié vos mises à jour sur le réseau, elles seront reflétées dans l'Explorateur The Graph. Cela ne créera pas de nouvelle version, puisque votre déploiement n'a pas changé. From 3fe9f2398db45a09cde1cf7613251838c91e3c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:06 -0400 Subject: [PATCH 218/924] New translations publishing-a-subgraph.mdx (Spanish) --- website/pages/es/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/es/publishing/publishing-a-subgraph.mdx b/website/pages/es/publishing/publishing-a-subgraph.mdx index 02abd677d7cf..dca0908133b1 100644 --- a/website/pages/es/publishing/publishing-a-subgraph.mdx +++ b/website/pages/es/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Una vez que tu subgrafo se haya [deployado en Subgraph Studio](/deploying/deploy La publicación de un subgrafo en la red descentralizada hace que esté disponible para que los [Curadores](/network/curating) comiencen a seleccionarlo y los [Indexadores](/network/indexing) comienzen a indexarlo. - + Puedes encontrar la lista de las redes admitidas [Aquí](/developing/supported-networks). From 8a2717a1ffed7cd60a602c4e128198d8e5a948da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:07 -0400 Subject: [PATCH 219/924] New translations publishing-a-subgraph.mdx (Arabic) --- website/pages/ar/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ar/publishing/publishing-a-subgraph.mdx b/website/pages/ar/publishing/publishing-a-subgraph.mdx index 4ced198161be..89aec5bee958 100644 --- a/website/pages/ar/publishing/publishing-a-subgraph.mdx +++ b/website/pages/ar/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Once your subgraph has been [deployed to the Subgraph Studio](/deploying/deployi Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it. - + You can find the list of the supported networks [Here](/developing/supported-networks). From 7498d9bd66f6f700e5a680b372e1f68354d2eeb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:08 -0400 Subject: [PATCH 220/924] New translations publishing-a-subgraph.mdx (Czech) --- .../cs/publishing/publishing-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/cs/publishing/publishing-a-subgraph.mdx b/website/pages/cs/publishing/publishing-a-subgraph.mdx index bd8d1ca698a5..2a090f8812f4 100644 --- a/website/pages/cs/publishing/publishing-a-subgraph.mdx +++ b/website/pages/cs/publishing/publishing-a-subgraph.mdx @@ -1,33 +1,33 @@ --- -title: Publishing a Subgraph to the Decentralized Network +title: Zveřejnění podgrafu v decentralizované síti --- -Once your subgraph has been [deployed to the Subgraph Studio](/deploying/deploying-a-subgraph-to-studio), you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. +Jakmile je váš podgraf [nastaven ve Studio podgrafu](/deploying/deploying-a-subgraph-to-studio), otestován a připraven k uvedení do produkčního provozu, můžete jej publikovat v decentralizované síti. -Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it. +Zveřejněním podgrafu v decentralizované síti jej mohou [kurátoři](/network/curating) začít kurátorsky zpracovávat a [indexátoři](/network/indexing) jej mohou začít indexovat. - + -You can find the list of the supported networks [Here](/developing/supported-networks). +Seznam podporovaných sítí najdete [Zde](/developing/supported-networks). -## Publishing a subgraph +## Zveřejnění podgrafu -Subgraphs can be published to the decentralized network directly from the Subgraph Studio dashboard by clicking on the **Publish** button. Once a subgraph is published, it will be available to view in the [Graph Explorer](https://thegraph.com/explorer/). +Podgrafy lze publikovat do decentralizované sítě přímo z ovládacího panelu podgraf Studio kliknutím na tlačítko **Publish**. Jakmile je podgraf publikován, bude k dispozici k zobrazení v [Průzkumníku grafů](https://thegraph.com/explorer/). -- Subgraphs can be published to Goerli, Arbitrum goerli, Arbitrum One, or Ethereum mainnet. +- Podgrafy lze publikovat do sítí Goerli, Arbitrum goerli, Arbitrum One nebo Ethereum mainnet. -- Regardless of the network the subgraph was published on, it can index data on any of the [supported networks](/developing/supported-networks). +- Bez ohledu na to, v jaké síti byl podgraf publikován, může indexovat data v kterékoli z [podporovaných sítí](/developing/supported-networks). -- When publishing a new version for an existing subgraph the same rules apply as above. +- Při publikování nové verze pro existující podgraf platí stejná pravidla jako výše. -## Curating your subgraph +## Kurátorství podgrafu -> It is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. +> Doporučujeme, abyste si vytvořili vlastní podgraf s 10 000 GRT, abyste zajistili, že bude co nejdříve indexován a dostupný pro dotazování. -Subgraph Studio enables you to be the first to curate your subgraph by adding GRT to your subgraph's curation pool in the same transaction. When publishing your subgraph, make sure to check the button that says, "Be the first to signal on this subgraph." +Aplikace podgraf Studio vám umožní být prvním, kdo bude kurátorem vašeho podgrafu, a to přidáním GRT do fondu kurátorů vašeho podgrafu v rámci stejné transakce. Při publikování podgrafu nezapomeňte zaškrtnout tlačítko "Be first to signal on this subgraph" (Buďte první, kdo bude signalizovat na tomto podgrafu) -![Curation Pool](/img/curate-own-subgraph-tx.png) +![Kurátorský bazén](/img/curate-own-subgraph-tx.png) -## Updating metadata for a published subgraph +## Aktualizace metadata publikovaného podgrafu -Once your subgraph has been published to the decentralized network, you can modify the metadata at any time by making the update in the Subgraph Studio dashboard of the subgraph. After saving the changes and publishing your updates to the network, they will be reflected in The Graph Explorer. This won’t create a new version, as your deployment hasn’t changed. +Jakmile je podgraf zveřejněn v decentralizované síti, můžete kdykoli změnit metadata provedením aktualizace na ovládacím panelu podgrafu v aplikaci podgraf Studio. Po uložení změn a publikování aktualizací do sítě se tyto změny projeví v Průzkumníku grafů. Tím se nevytvoří nová verze, protože vaše nasazení se nezměnilo. From 5052fcf33d59b9518f56eb62a0bb36c2156cf13b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:09 -0400 Subject: [PATCH 221/924] New translations publishing-a-subgraph.mdx (German) --- website/pages/de/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/de/publishing/publishing-a-subgraph.mdx b/website/pages/de/publishing/publishing-a-subgraph.mdx index bd8d1ca698a5..63ec80a57e88 100644 --- a/website/pages/de/publishing/publishing-a-subgraph.mdx +++ b/website/pages/de/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Once your subgraph has been [deployed to the Subgraph Studio](/deploying/deployi Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it. - + You can find the list of the supported networks [Here](/developing/supported-networks). From f353fc257a90f3466b288e82e812cf21ab9f83b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:10 -0400 Subject: [PATCH 222/924] New translations publishing-a-subgraph.mdx (Italian) --- website/pages/it/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/it/publishing/publishing-a-subgraph.mdx b/website/pages/it/publishing/publishing-a-subgraph.mdx index 55e453ea2623..9fef5cdce1a3 100644 --- a/website/pages/it/publishing/publishing-a-subgraph.mdx +++ b/website/pages/it/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Una volta che il subgraph è stato [implementato nel Subgraph Studio](/deploying La pubblicazione di un Subgraph nella rete decentralizzata lo rende disponibile per [i Сurator](/network/curating) per iniziare a curarlo e [gli Indexer](/network/indexing) per iniziare a indicizzarlo. - + La lista delle reti supportate è disponibile [qui](/developing/supported-networks). From 4ecc61334e6e2aafb2110214260b61e2eb32ecdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:11 -0400 Subject: [PATCH 223/924] New translations publishing-a-subgraph.mdx (Japanese) --- website/pages/ja/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ja/publishing/publishing-a-subgraph.mdx b/website/pages/ja/publishing/publishing-a-subgraph.mdx index bb549d287714..5d0bd2e459cb 100644 --- a/website/pages/ja/publishing/publishing-a-subgraph.mdx +++ b/website/pages/ja/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ title: 分散型ネットワークへのサブグラフの公開 サブグラフを分散型ネットワークに公開すると、[キュレーター](/network/curating)がキュレーションを開始したり、[インデクサー](/network/indexing)がインデックスを作成したりできるようになります。 - + 対応ネットワークの一覧は[こちら](/developing/supported-networks)で確認できます。 From be014036a37ac17a6fb43ef153fa23436cc090f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:12 -0400 Subject: [PATCH 224/924] New translations publishing-a-subgraph.mdx (Korean) --- website/pages/ko/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ko/publishing/publishing-a-subgraph.mdx b/website/pages/ko/publishing/publishing-a-subgraph.mdx index bd8d1ca698a5..63ec80a57e88 100644 --- a/website/pages/ko/publishing/publishing-a-subgraph.mdx +++ b/website/pages/ko/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Once your subgraph has been [deployed to the Subgraph Studio](/deploying/deployi Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it. - + You can find the list of the supported networks [Here](/developing/supported-networks). From a5dfd54d6b408560353078ebc710882085001b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:13 -0400 Subject: [PATCH 225/924] New translations publishing-a-subgraph.mdx (Dutch) --- website/pages/nl/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/nl/publishing/publishing-a-subgraph.mdx b/website/pages/nl/publishing/publishing-a-subgraph.mdx index bd8d1ca698a5..63ec80a57e88 100644 --- a/website/pages/nl/publishing/publishing-a-subgraph.mdx +++ b/website/pages/nl/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Once your subgraph has been [deployed to the Subgraph Studio](/deploying/deployi Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it. - + You can find the list of the supported networks [Here](/developing/supported-networks). From a025da8429caea57790efe485693cf79d56c34e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:14 -0400 Subject: [PATCH 226/924] New translations publishing-a-subgraph.mdx (Polish) --- website/pages/pl/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pl/publishing/publishing-a-subgraph.mdx b/website/pages/pl/publishing/publishing-a-subgraph.mdx index bd8d1ca698a5..63ec80a57e88 100644 --- a/website/pages/pl/publishing/publishing-a-subgraph.mdx +++ b/website/pages/pl/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Once your subgraph has been [deployed to the Subgraph Studio](/deploying/deployi Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it. - + You can find the list of the supported networks [Here](/developing/supported-networks). From 1723754d09b03a6b4a358f7cbe9c76b7591562d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:15 -0400 Subject: [PATCH 227/924] New translations publishing-a-subgraph.mdx (Portuguese) --- website/pages/pt/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pt/publishing/publishing-a-subgraph.mdx b/website/pages/pt/publishing/publishing-a-subgraph.mdx index 82d9dd320c64..b09693642e0e 100644 --- a/website/pages/pt/publishing/publishing-a-subgraph.mdx +++ b/website/pages/pt/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Quando o seu subgraph for [lançado ao Subgraph Studio](/deploying/deploying-a-s Editar um Subgraph na rede descentralizada o disponibiliza para a curadoria pelos [Curadores](/network/curating), e para indexação pelos [Indexadores](/network/indexing). - + A lista de redes apoiadas está [aqui](/developing/supported-networks). From 0e826d6f1fbd170f23af7df5d1734fd079497aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:16 -0400 Subject: [PATCH 228/924] New translations publishing-a-subgraph.mdx (Russian) --- website/pages/ru/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ru/publishing/publishing-a-subgraph.mdx b/website/pages/ru/publishing/publishing-a-subgraph.mdx index e92b9f8b9bcd..596bf3ff5d23 100644 --- a/website/pages/ru/publishing/publishing-a-subgraph.mdx +++ b/website/pages/ru/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ title: Публикация подграфа в децентрализованн Публикация Подграфа в децентрализованной сети делает его доступным для [Кураторов](/network/curating), чтобы начать его курирование, и для [Индексаторов](/network/indexing), чтобы начать его индексирование. - + Вы можете найти список поддерживаемых сетей [тут](/developing/supported-networks). From 7ae7b6732c4d6a1119624efc550657caca291312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:17 -0400 Subject: [PATCH 229/924] New translations publishing-a-subgraph.mdx (Swedish) --- website/pages/sv/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/publishing/publishing-a-subgraph.mdx b/website/pages/sv/publishing/publishing-a-subgraph.mdx index 8e1085448fd1..82beda3c26b3 100644 --- a/website/pages/sv/publishing/publishing-a-subgraph.mdx +++ b/website/pages/sv/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ När din subgraph har [implementerats i Subgraph Studio](/deploying/deploying-a- Genom att publicera en subgraph på det decentraliserade nätverket blir den tillgänglig för [Kurators](/network/curating) att börja kurera och [Indexeres](/network/indexing) att börja indexera den. - + Du hittar listan över de nätverk som stöds [Här](/developing/supported-networks). From 2ceabda3eb2e1b6f516dd31ecb031058f2013275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:18 -0400 Subject: [PATCH 230/924] New translations publishing-a-subgraph.mdx (Turkish) --- website/pages/tr/publishing/publishing-a-subgraph.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/tr/publishing/publishing-a-subgraph.mdx b/website/pages/tr/publishing/publishing-a-subgraph.mdx index 99073aebec44..5ea9a59a3679 100644 --- a/website/pages/tr/publishing/publishing-a-subgraph.mdx +++ b/website/pages/tr/publishing/publishing-a-subgraph.mdx @@ -4,9 +4,9 @@ title: Merkeziyetsiz Ağa Bir Subgraph Yayınlamak Subgraph'iniz [Subgraph Studio'ya deploy edildikten](/deploying/deploying-a-subgraph-to-studio) sonra, onu test edip üretime sokmaya hazırsınız, ardından merkeziyetsiz ağda yayınlayabilirsiniz. -Merkeziyetsiz ağda bir subgraph yayınlamak, [küratörlerin](/network/curating) ona sinyal göndermeye ve [indeksleyicilerin](/network/indexing) onu indekslemeye başlamasını sağlar. +Merkeziyetsiz ağda bir subgraph yayınlamak, [küratörlerin](/network/curating) ona sinyal göndermeye ve [indeksleyicilerin](/network/indexing) onu indekslemeye başlamasını sağlar. - + Desteklenen ağların listesini [burada](/developing/supported-networks) bulabilirsiniz. From bcb2dbedc220f3c037aef126313de465eb295460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:18 -0400 Subject: [PATCH 231/924] New translations publishing-a-subgraph.mdx (Ukrainian) --- website/pages/uk/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/uk/publishing/publishing-a-subgraph.mdx b/website/pages/uk/publishing/publishing-a-subgraph.mdx index bd8d1ca698a5..63ec80a57e88 100644 --- a/website/pages/uk/publishing/publishing-a-subgraph.mdx +++ b/website/pages/uk/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Once your subgraph has been [deployed to the Subgraph Studio](/deploying/deployi Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it. - + You can find the list of the supported networks [Here](/developing/supported-networks). From 41b1c65f3644f63448af302296dbd5823f082812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:19 -0400 Subject: [PATCH 232/924] New translations publishing-a-subgraph.mdx (Chinese Simplified) --- website/pages/zh/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/zh/publishing/publishing-a-subgraph.mdx b/website/pages/zh/publishing/publishing-a-subgraph.mdx index af95567d0a69..ea343c5fbfc4 100644 --- a/website/pages/zh/publishing/publishing-a-subgraph.mdx +++ b/website/pages/zh/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ title: 向去中心化的网络发布子图 将一个子图发布到去中心化的网络上,使其可以开始让[策展人](/network/curating)进行策展,并开始让[索引人](/network/indexing)进行索引。 - + 您可以在[这里](/developing/supported-networks)找到支持的网络列表。 From 456bd32788fd87b6abad355c9a2b9bee852180bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:20 -0400 Subject: [PATCH 233/924] New translations publishing-a-subgraph.mdx (Urdu (Pakistan)) --- website/pages/ur/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ur/publishing/publishing-a-subgraph.mdx b/website/pages/ur/publishing/publishing-a-subgraph.mdx index c307639f953a..b92fc89f20c4 100644 --- a/website/pages/ur/publishing/publishing-a-subgraph.mdx +++ b/website/pages/ur/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ title: ڈیسینٹرلائزڈ نیٹ ورک پر سب گراف شائع کرن ڈیسینٹرالائزڈ نیٹ ورک پر سب گراف شائع کرنا اسے [کیوریٹرز](/network/curating) کے لیے اس پر کیوریٹنگ شروع کرنے کے لیے، اور [انڈیکسرز](/network/indexing) کے لیے دستیاب کرتا ہے۔ اس کی ترتیب شروع کرنے کے لیے. - + آپ سپورٹڈ نیٹ ورکس کی فہرست [یہاں](/developing/supported-networks) تلاش کر سکتے ہیں. From 5807de4a88cb25410fe8c8936104abb0a0a286e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:21 -0400 Subject: [PATCH 234/924] New translations publishing-a-subgraph.mdx (Vietnamese) --- website/pages/vi/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/vi/publishing/publishing-a-subgraph.mdx b/website/pages/vi/publishing/publishing-a-subgraph.mdx index aedf444c18de..546991c84816 100644 --- a/website/pages/vi/publishing/publishing-a-subgraph.mdx +++ b/website/pages/vi/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Once your subgraph has been [deployed to the Subgraph Studio](/deploying/deployi Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it. - + You can find the list of the supported networks [Here](/developing/supported-networks). From b4cf8815de609cc02569a2e7cc2ff36b47b30afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:22 -0400 Subject: [PATCH 235/924] New translations publishing-a-subgraph.mdx (Marathi) --- website/pages/mr/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/mr/publishing/publishing-a-subgraph.mdx b/website/pages/mr/publishing/publishing-a-subgraph.mdx index c6c71b44ca5b..8c097cf7c0d4 100644 --- a/website/pages/mr/publishing/publishing-a-subgraph.mdx +++ b/website/pages/mr/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ title: विकेंद्रीकृत नेटवर्कवर सब विकेंद्रीकृत नेटवर्कवर सबग्राफ प्रकाशित केल्याने ते [क्युरेटर्स](/network/curating) वर क्युरेटिंग सुरू करण्यासाठी आणि [इंडेक्सर्स](/network/indexing) साठी उपलब्ध होते. त्याची अनुक्रमणिका सुरू करण्यासाठी. - + तुम्ही समर्थित नेटवर्कची सूची [येथे](/developing/supported-networks) शोधू शकता. From 30d46255cf53b78ba95143b4db16ffbe74eaf915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:23 -0400 Subject: [PATCH 236/924] New translations publishing-a-subgraph.mdx (Hindi) --- website/pages/hi/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/hi/publishing/publishing-a-subgraph.mdx b/website/pages/hi/publishing/publishing-a-subgraph.mdx index 5afd918fa92e..bc936ae91146 100644 --- a/website/pages/hi/publishing/publishing-a-subgraph.mdx +++ b/website/pages/hi/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ title: विकेंद्रीकृत नेटवर्क के लि विकेन्द्रीकृत नेटवर्क पर एक सबग्राफ प्रकाशित करने से यह [क्यूरेटर्स](/network/curating) के लिए उपलब्ध हो जाता है ताकि वे उस पर क्यूरेट करना शुरू कर सकें, और [इंडेक्सर्स](/network/indexing) इसे अनुक्रमणित करना शुरू करने के लिए। - + आप समर्थित नेटवर्क की सूची [यहां](/Developing/supported-networks) प्राप्त कर सकते हैं। From cade9dbec942e85a88129d50094361b1b8f33635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:24 -0400 Subject: [PATCH 237/924] New translations publishing-a-subgraph.mdx (Yoruba) --- website/pages/yo/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/yo/publishing/publishing-a-subgraph.mdx b/website/pages/yo/publishing/publishing-a-subgraph.mdx index bd8d1ca698a5..63ec80a57e88 100644 --- a/website/pages/yo/publishing/publishing-a-subgraph.mdx +++ b/website/pages/yo/publishing/publishing-a-subgraph.mdx @@ -6,7 +6,7 @@ Once your subgraph has been [deployed to the Subgraph Studio](/deploying/deployi Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it. - + You can find the list of the supported networks [Here](/developing/supported-networks). From f3a57797dc0b808f7c1bd4c6fafbe6de3f6f610b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:26 -0400 Subject: [PATCH 238/924] New translations distributed-systems.mdx (French) --- .../pages/fr/querying/distributed-systems.mdx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/website/pages/fr/querying/distributed-systems.mdx b/website/pages/fr/querying/distributed-systems.mdx index eb1f30013c17..7c9b26ab4d87 100644 --- a/website/pages/fr/querying/distributed-systems.mdx +++ b/website/pages/fr/querying/distributed-systems.mdx @@ -1,16 +1,16 @@ --- -title: Distributed Systems +title: Systèmes distribués --- -The Graph is a protocol implemented as a distributed system. +Le graph est un protocole mis en œuvre sous la forme d'un système distribué. -Connections fail. Requests arrive out of order. Different computers with out-of-sync clocks and states process related requests. Servers restart. Re-orgs happen between requests. These problems are inherent to all distributed systems but are exacerbated in systems operating at a global scale. +Les connexions échouent. Les demandes arrivent dans le désordre. Différents ordinateurs dont les horloges et les états ne sont pas synchronisés traitent les demandes correspondantes. Les serveurs redémarrent. Des réorgs se produisent entre les demandes. Ces problèmes sont inhérents à tous les systèmes distribués, mais ils sont exacerbés dans les systèmes fonctionnant à l'échelle mondiale. -Consider this example of what may occur if a client polls an Indexer for the latest data during a re-org. +Considérez cet exemple de ce qui peut se produire si un client interroge un indexeur pour connaître les dernières données lors d'une réorganisation. 1. L'indexeur ingère le bloc 8 2. Demande transmise au client pour le bloc 8 -3. Indexer ingests block 9 +3. L'indexeur ingère le bloc 9 4. L'indexeur ingère le bloc 10A 5. Demande transmise au client pour le bloc 10A 6. L'indexeur détecte la réorganisation à 10B et annule 10A @@ -27,11 +27,11 @@ Il est de la responsabilité du client et du serveur de travailler ensemble pour Il est difficile de raisonner sur les implications des systèmes distribués, mais la solution ne l'est pas nécessairement ! Nous avons établi des API et des modèles pour vous aider à naviguer dans certains cas d'utilisation courants. Les exemples suivants illustrent ces modèles tout en éludant les détails requis par le code de production (comme la gestion des erreurs et l'annulation) afin de ne pas obscurcir les idées principales. -## Polling for updated data +## Demande de données actualisées -The Graph provides the `block: { number_gte: $minBlock }` API, which ensures that the response is for a single block equal or higher to `$minBlock`. If the request is made to a `graph-node` instance and the min block is not yet synced, `graph-node` will return an error. If `graph-node` has synced min block, it will run the response for the latest block. If the request is made to an Edge & Node Gateway, the Gateway will filter out any Indexers that have not yet synced min block and make the request for the latest block the Indexer has synced. +Le graph fournit l'API `block : { number_gte: $minBlock }`, qui garantit que la réponse concerne un seul bloc égal ou supérieur à `$minBlock`. Si la requête est faite à une instance de `graph-node` et que le bloc min n'est pas encore synchronisé, `graph-node` renverra une erreur. Si `graph-node` a synchronisé le bloc min, il exécutera la réponse pour le dernier bloc. Si la demande est adressée à un Edge & Node Gateway, la passerelle filtrera tous les indexeurs qui n'ont pas encore synchronisé le bloc min et fera la demande pour le dernier bloc synchronisé par l'indexeur. -We can use `number_gte` to ensure that time never travels backward when polling for data in a loop. Here is an example: +Nous pouvons utiliser `number_gte` pour nous assurer que le temps ne recule jamais lorsque nous interrogeons des données dans une boucle. Voici un exemple : ```javascript /// Updates the protocol.paused variable to the latest @@ -76,7 +76,7 @@ async function updateProtocolPaused() { ## Fetching a set of related items -Another use-case is retrieving a large set or, more generally, retrieving related items across multiple requests. Unlike the polling case (where the desired consistency was to move forward in time), the desired consistency is for a single point in time. +Un autre cas d'utilisation est la récupération d'un grand ensemble ou, plus généralement, la récupération d'éléments liés entre plusieurs requêtes. Contrairement au cas des sondages (où la cohérence souhaitée était d'avancer dans le temps), la cohérence souhaitée est pour un seul point dans le temps. Ici, nous utiliserons l'argument `block: { hash: $blockHash }` pour épingler tous nos résultats dans le même bloc. @@ -131,4 +131,4 @@ async function getDomainNames() { } ``` -Note that in case of a re-org, the client will need to retry from the first request to update the block hash to a non-uncle block. +Il convient de noter qu'en cas de réorganisation, le client devra réessayer à partir de la première demande de mise à jour du hachage du bloc vers un bloc qui n'a pas été supprimé. From ecc4bd2e4471ba2b76ec19994adb6528f44062ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:28 -0400 Subject: [PATCH 239/924] New translations distributed-systems.mdx (Czech) --- .../pages/cs/querying/distributed-systems.mdx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/website/pages/cs/querying/distributed-systems.mdx b/website/pages/cs/querying/distributed-systems.mdx index 85337206bfd3..e75d5f214bf5 100644 --- a/website/pages/cs/querying/distributed-systems.mdx +++ b/website/pages/cs/querying/distributed-systems.mdx @@ -1,14 +1,14 @@ --- -title: Distributed Systems +title: Distribuované systémy --- -The Graph is a protocol implemented as a distributed system. +Graf je protokol implementovaný jako distribuovaný systém. -Connections fail. Requests arrive out of order. Different computers with out-of-sync clocks and states process related requests. Servers restart. Re-orgs happen between requests. These problems are inherent to all distributed systems but are exacerbated in systems operating at a global scale. +Připojení selhávají. Požadavky přicházejí mimo pořadí. Různé počítače s nesynchronizovanými hodinami a stavy zpracovávají související požadavky. Servery se restartují. Mezi požadavky dochází k opětovným Re-orgs. Tyto problémy jsou vlastní všem distribuovaným systémům, ale v systémech pracujících v globálním měřítku se ještě zhoršují. -Consider this example of what may occur if a client polls an Indexer for the latest data during a re-org. +Vezměme si tento příklad toho, co může nastat, pokud se klient dotazuje indexeru na nejnovější data během re-org. -1. Indexer ingests block 8 +1. Indexer zpracovat blok 8 2. Request served to the client for block 8 3. Indexer ingests block 9 4. Indexer ingests block 10A @@ -19,19 +19,19 @@ Consider this example of what may occur if a client polls an Indexer for the lat 9. Indexer ingests block 11 10. Request served to the client for block 11 -From the point of view of the Indexer, things are progressing forward logically. Time is moving forward, though we did have to roll back an uncle block and play the block under consensus forward on top of it. Along the way, the Indexer serves requests using the latest state it knows about at that time. +Z pohledu indexátora postupují věci logicky vpřed. Čas se posouvá vpřed, i když jsme museli vrátit blok strýce a přehrát na něj blok v rámci konsensu vpřed. Po cestě Indexer obsluhuje požadavky pomocí nejnovějšího stavu, o kterém v danou chvíli ví. -From the point of view of the client, however, things appear chaotic. The client observes that the responses were for blocks 8, 10, 9, and 11 in that order. We call this the "block wobble" problem. When a client experiences block wobble, data may appear to contradict itself over time. The situation worsens when we consider that Indexers do not all ingest the latest blocks simultaneously, and your requests may be routed to multiple Indexers. +Z pohledu klienta se však situace jeví jako chaotická. Klient si všimne, že odpovědi se týkaly bloků 8, 10, 9 a 11 v tomto pořadí. Tomu říkáme problém "kmitání bloků". Když klient zažije blokové kmitání, může se zdát, že si data v průběhu času odporují. Situace se ještě zhorší, když uvážíme, že všechny indexátory nepřijímají nejnovější bloky současně a vaše požadavky mohou být směrovány k více indexátorům. -It is the responsibility of the client and server to work together to provide consistent data to the user. Different approaches must be used depending on the desired consistency as there is no one right program for every problem. +Je odpovědností klienta a serveru, aby spolupracovali a poskytovali uživateli konzistentní data. V závislosti na požadované konzistenci je třeba použít různé přístupy, protože pro každý problém neexistuje jeden správný program. -Reasoning through the implications of distributed systems is hard, but the fix may not be! We've established APIs and patterns to help you navigate some common use-cases. The following examples illustrate those patterns but still elide details required by production code (like error handling and cancellation) to not obfuscate the main ideas. +Uvažovat o důsledcích distribuovaných systémů je těžké, ale náprava možná není! Vytvořili jsme API a vzory, které vám pomohou orientovat se v některých běžných případech použití. Následující příklady ilustrují tyto vzory, ale přesto opomíjejí detaily vyžadované produkčním kódem (jako je zpracování chyb a zrušení), aby nebyly zastřeny hlavní myšlenky. ## Polling for updated data -The Graph provides the `block: { number_gte: $minBlock }` API, which ensures that the response is for a single block equal or higher to `$minBlock`. If the request is made to a `graph-node` instance and the min block is not yet synced, `graph-node` will return an error. If `graph-node` has synced min block, it will run the response for the latest block. If the request is made to an Edge & Node Gateway, the Gateway will filter out any Indexers that have not yet synced min block and make the request for the latest block the Indexer has synced. +Graf poskytuje blok `: {Počet_gte:{ number_gte: $minBlock }}` API, které zajišťuje, že odpověď je pro jeden blok rovný nebo vyšší než `$minBlock`. Pokud je požadavek zadán instanci `graph-node` a min. blok ještě není synchronizován, `graph-node` vrátí chybu. Pokud `graph-node` má synchronizovaný minblok, spustí odpověď pro nejnovější blok. Pokud je požadavek zadán bráně Edge & Node, brána odfiltruje všechny indexery, které ještě nesynchronizovaly minblok, a provede požadavek na nejnovější blok, který indexer synchronizoval. -We can use `number_gte` to ensure that time never travels backward when polling for data in a loop. Here is an example: +Pomocí `number_gte` můžeme zajistit, aby se čas při dotazování na data ve smyčce nikdy nevracel zpět. Zde je příklad: ```javascript /// Updates the protocol.paused variable to the latest @@ -76,9 +76,9 @@ async function updateProtocolPaused() { ## Fetching a set of related items -Another use-case is retrieving a large set or, more generally, retrieving related items across multiple requests. Unlike the polling case (where the desired consistency was to move forward in time), the desired consistency is for a single point in time. +Dalším případem použití je načítání velkého souboru nebo obecněji načítání souvisejících položek ve více požadavcích. Na rozdíl od případu dotazování (kde byla požadovaná konzistence pro posun v čase) je požadovaná konzistence pro jeden bod v čase. -Here we will use the `block: { hash: $blockHash }` argument to pin all of our results to the same block. +Zde použijeme blok `: { hash: $blockHash }`, abychom všechny naše výsledky připnuli ke stejnému bloku. ```javascript /// Gets a list of domain names from a single block using pagination @@ -131,4 +131,4 @@ async function getDomainNames() { } ``` -Note that in case of a re-org, the client will need to retry from the first request to update the block hash to a non-uncle block. +Všimněte si, že v případě reorganizace bude muset klient zopakovat první požadavek na aktualizaci hashe bloku na blok, který není strýčkem. From 1acc8b910e2c1bcc556df426c20246fef5a77089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:34 -0400 Subject: [PATCH 240/924] New translations distributed-systems.mdx (Swedish) --- .../pages/sv/querying/distributed-systems.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/sv/querying/distributed-systems.mdx b/website/pages/sv/querying/distributed-systems.mdx index 365340f65a1b..3143d4859eb8 100644 --- a/website/pages/sv/querying/distributed-systems.mdx +++ b/website/pages/sv/querying/distributed-systems.mdx @@ -84,8 +84,8 @@ Här kommer vi att använda argumentet `block: { hash: $blockHash }` för att bi /// Gets a list of domain names from a single block using pagination async function getDomainNames() { // Set a cap on the maximum number of items to pull. - let pages = 5 - const perPage = 1000 + let pages = 5; + const perPage = 1000; // The first query will get the first page of results and also get the block // hash so that the remainder of the queries are consistent with the first. @@ -100,34 +100,34 @@ async function getDomainNames() { hash } } - }` + }`; - let data = await graphql(listDomainsQuery, { perPage }) - let result = data.domains.map((d) => d.name) - let blockHash = data._meta.block.hash + let data = await graphql(listDomainsQuery, { perPage }); + let result = data.domains.map((d) => d.name); + let blockHash = data._meta.block.hash; - let query + let query; // Continue fetching additional pages until either we run into the limit of // 5 pages total (specified above) or we know we have reached the last page // because the page has fewer entities than a full page. while (data.domains.length == perPage && --pages) { - let lastID = data.domains[data.domains.length - 1].id + let lastID = data.domains[data.domains.length - 1].id; query = ` query ListDomains($perPage: Int!, $lastID: ID!, $blockHash: Bytes!) { domains(first: $perPage, where: { id_gt: $lastID }, block: { hash: $blockHash }) { name id } - }` + }`; - data = await graphql(query, { perPage, lastID, blockHash }) + data = await graphql(query, { perPage, lastID, blockHash }); // Accumulate domain names into the result for (domain of data.domains) { - result.push(domain.name) + result.push(domain.name); } } - return result + return result; } ``` From b0f683bb33aae12f0165004a515400c6513f15f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:38 -0400 Subject: [PATCH 241/924] New translations distributed-systems.mdx (Marathi) --- website/pages/mr/querying/distributed-systems.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/mr/querying/distributed-systems.mdx b/website/pages/mr/querying/distributed-systems.mdx index d967c914134e..c1d63087e5e3 100644 --- a/website/pages/mr/querying/distributed-systems.mdx +++ b/website/pages/mr/querying/distributed-systems.mdx @@ -21,7 +21,7 @@ Consider this example of what may occur if a client polls an Indexer for the lat इंडेक्सरच्या दृष्टिकोनातून, गोष्टी तार्किकदृष्ट्या पुढे जात आहेत. वेळ पुढे सरकत आहे, जरी आम्हाला अंकल ब्लॉक मागे घ्यावा लागला आणि त्याच्या वरच्या बाजूने एकमताने ब्लॉक खेळला गेला. वाटेत, इंडेक्सर त्यावेळेस माहित असलेली नवीनतम स्थिती वापरून विनंती करतो. -क्लायंटच्या दृष्टिकोनातून, तथापि, गोष्टी गोंधळलेल्या दिसतात. क्लायंटचे निरीक्षण आहे की प्रतिसाद त्या क्रमाने ब्लॉक 8, 10, 9 आणि 11 साठी होते. आम्ही याला "ब्लॉक वॅबल" समस्या म्हणतो. जेव्हा क्लायंटला ब्लॉक व्हॉबलचा अनुभव येतो, तेव्हा डेटा कालांतराने स्वतःचा विरोधाभास दर्शवू शकतो. जेव्हा आम्ही विचार करतो की सर्व इंडेक्सर्स नवीनतम ब्लॉक्स एकाच वेळी घेत नाहीत आणि तुमच्या विनंत्या एकाधिक इंडेक्सर्सकडे पाठवल्या जाऊ शकतात. +From the point of view of the client, however, things appear chaotic. The client observes that the responses were for blocks 8, 10, 9, and 11 in that order. We call this the "block wobble" problem. When a client experiences block wobble, data may appear to contradict itself over time. The situation worsens when we consider that Indexers do not all ingest the latest blocks simultaneously, and your requests may be routed to multiple Indexers. वापरकर्त्याला सातत्यपूर्ण डेटा प्रदान करण्यासाठी एकत्र काम करणे ही क्लायंट आणि सर्व्हरची जबाबदारी आहे. इच्छित सुसंगततेवर अवलंबून भिन्न पध्दती वापरणे आवश्यक आहे कारण प्रत्येक समस्येसाठी कोणताही एक योग्य कार्यक्रम नाही. From 6b4e6386d32876f470064d8b04091b5a42a91c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:41 -0400 Subject: [PATCH 242/924] New translations graphql-api.mdx (Romanian) --- website/pages/ro/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ro/querying/graphql-api.mdx b/website/pages/ro/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/ro/querying/graphql-api.mdx +++ b/website/pages/ro/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 92d2934cfed4ee2c8ccef365ee656c198f004feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:41 -0400 Subject: [PATCH 243/924] New translations graphql-api.mdx (French) --- website/pages/fr/querying/graphql-api.mdx | 106 +++++++++++----------- 1 file changed, 54 insertions(+), 52 deletions(-) diff --git a/website/pages/fr/querying/graphql-api.mdx b/website/pages/fr/querying/graphql-api.mdx index 7dca36ee0f9e..842b3bb27033 100644 --- a/website/pages/fr/querying/graphql-api.mdx +++ b/website/pages/fr/querying/graphql-api.mdx @@ -6,11 +6,11 @@ Ce guide explique l'API de requête GraphQL utilisée pour le protocole Graph. ## Queries -In your subgraph schema you define types called `Entities`. For each `Entity` type, an `entity` and `entities` field will be generated on the top-level `Query` type. Note that `query` does not need to be included at the top of the `graphql` query when using The Graph. +Dans votre schéma de subgraph, vous définissez des types appelés `Entités`. Pour chaque type `Entity`, un champ `entity` et `entities` sera généré sur le type `Query` de niveau supérieur. Notez que `query` n'a pas besoin d'être inclus en haut de la requête `graphql` lors de l'utilisation de The Graph. ### Exemples -Query for a single `Token` entity defined in your schema: +Requête pour une seule entité `Token` définie dans votre schéma : ```graphql { @@ -21,9 +21,9 @@ Query for a single `Token` entity defined in your schema: } ``` -> **Note:** When querying for a single entity, the `id` field is required, and it must be a string. +> **Remarque :** Lors d'une requête pour une seule entité, le champ `id` est obligatoire et il doit s'agir d'une chaîne. -Query all `Token` entities: +Interrogez toutes les entités `Token` : ```graphql { @@ -36,49 +36,51 @@ Query all `Token` entities: ### Sorting -When querying a collection, the `orderBy` parameter may be used to sort by a specific attribute. Additionally, the `orderDirection` can be used to specify the sort direction, `asc` for ascending or `desc` for descending. +Lors de l'interrogation d'une collection, le paramètre `orderBy` peut être utilisé pour trier selon un attribut spécifique. De plus, `orderDirection` peut être utilisé pour spécifier le sens du tri, `asc` pour ascendant ou `desc` pour décroissant. #### Exemple ```graphql { - tokens(orderBy: price, orderDirection: asc) { + tokens(orderBy : price, orderDirection : asc) { id - owner + propriétaire } } ``` -#### Example for nested entity sorting +#### Exemple de tri d'entités imbriquées As of Graph Node [`v0.30.0`](https://github.com/graphprotocol/graph-node/releases/tag/v0.30.0) entities can be sorted on the basis of nested entities. -In the following example, we sort the tokens by the name of their owner: +Dans l'exemple suivant, nous trions les jetons en fonction de leur nom propre: ```graphql { - tokens(orderBy: owner__name, orderDirection: asc) { - id - owner { + jetons (orderBy : propriétaire__nom, orderDirection : asc) { + identifiant + propriétaire { + { name } - } + } + } } ``` -> Currently, you can sort by one-level deep `String` or `ID` types on `@entity` and `@derivedFrom` fields. Unfortunately, [sorting by interfaces on one level-deep entities](https://github.com/graphprotocol/graph-node/pull/4058), sorting by fields which are arrays and nested entities is not yet supported. +> Actuellement, vous pouvez trier par types `String` ou `ID` profonds à un niveau sur les champs `@entity` et `@derivedFrom`. Malheureusement, le [tri par interfaces sur des entités d'un seul niveau](https://github.com/graphprotocol/graph-node/pull/4058), le tri par champs qui sont des tableaux et des entités imbriquées est pas encore pris en charge. ### Pagination -When querying a collection, the `first` parameter can be used to paginate from the beginning of the collection. It is worth noting that the default sort order is by ID in ascending alphanumeric order, not by creation time. +Lors de l'interrogation d'une collection, le paramètre `first` peut être utilisé pour paginer depuis le début de la collection. Il convient de noter que l'ordre de tri par défaut est par ID dans l'ordre alphanumérique croissant, et non par heure de création. -Further, the `skip` parameter can be used to skip entities and paginate. e.g. `first:100` shows the first 100 entities and `first:100, skip:100` shows the next 100 entities. +De plus, le paramètre `skip` peut être utilisé pour ignorer des entités et paginer. par exemple. `first:100` affiche les 100 premières entités et `first:100, skip:100` affiche les 100 entités suivantes. -Queries should avoid using very large `skip` values since they generally perform poorly. For retrieving a large number of items, it is much better to page through entities based on an attribute as shown in the last example. +Les requêtes doivent éviter d'utiliser de très grandes valeurs de `skip` car elles fonctionnent généralement mal. Pour récupérer un grand nombre d'éléments, il est préférable de parcourir les entités sur la base d'un attribut, comme le montre le dernier exemple. -#### Example using `first` +#### Exemple utilisant `first` -Query the first 10 tokens: +Interroger les 10 premiers tokens : ```graphql { @@ -89,11 +91,11 @@ Query the first 10 tokens: } ``` -To query for groups of entities in the middle of a collection, the `skip` parameter may be used in conjunction with the `first` parameter to skip a specified number of entities starting at the beginning of the collection. +Pour rechercher des groupes d'entités au milieu d'une collection, le paramètre `skip` peut être utilisé conjointement avec le paramètre `first` pour ignorer un nombre spécifié d'entités en commençant par le début. de la collection. -#### Example using `first` and `skip` +#### Exemple utilisant `first` et `skip` -Query 10 `Token` entities, offset by 10 places from the beginning of the collection: +Interrogez 10 entités `Token`, décalées de 10 places depuis le début de la collection : ```graphql { @@ -104,9 +106,9 @@ Query 10 `Token` entities, offset by 10 places from the beginning of the collect } ``` -#### Example using `first` and `id_ge` +#### Exemple utilisant `first` et `id_ge` -If a client needs to retrieve a large number of entities, it is much more performant to base queries on an attribute and filter by that attribute. For example, a client would retrieve a large number of tokens using this query: +Si un client a besoin de récupérer un grand nombre d'entités, il est beaucoup plus performant de baser les requêtes sur un attribut et de filtrer par cet attribut. Par exemple, un client récupérerait un grand nombre de jetons en utilisant cette requête : ```graphql query manyTokens($lastID: String) { @@ -117,13 +119,13 @@ query manyTokens($lastID: String) { } ``` -The first time, it would send the query with `lastID = ""`, and for subsequent requests would set `lastID` to the `id` attribute of the last entity in the previous request. This approach will perform significantly better than using increasing `skip` values. +La première fois, il enverrait la requête avec `lastID = ""`, et pour les requêtes suivantes, il définirait `lastID` sur l'attribut `id` du dernier entité dans la demande précédente. Cette approche fonctionnera nettement mieux que l'utilisation de valeurs `skip` croissantes. -### Filtering +### Filtration Vous pouvez utiliser le paramètre `where` dans vos requêtes pour filtrer différentes propriétés. Vous pouvez filtrer sur plusieurs valeurs dans le paramètre `where`. -#### Example using `where` +#### Exemple utilisant `where` Query challenges with `failed` outcome: @@ -139,9 +141,9 @@ Query challenges with `failed` outcome: } ``` -You can use suffixes like `_gt`, `_lte` for value comparison: +Vous pouvez utiliser des suffixes comme `_gt`, `_lte` pour comparer les valeurs : -#### Example for range filtering +#### Exemple de filtrage de plage ```graphql { @@ -153,11 +155,11 @@ You can use suffixes like `_gt`, `_lte` for value comparison: } ``` -#### Example for block filtering +#### Exemple de filtrage par bloc -You can also filter entities by the `_change_block(number_gte: Int)` - this filters entities which were updated in or after the specified block. +Vous pouvez également filtrer les entités par `_change_block(number_gte: Int)` - cela filtre les entités qui ont été mises à jour dans ou après le bloc spécifié. -This can be useful if you are looking to fetch only entities which have changed, for example since the last time you polled. Or alternatively it can be useful to investigate or debug how entities are changing in your subgraph (if combined with a block filter, you can isolate only entities that changed in a specific block). +Cela peut être utile si vous cherchez à récupérer uniquement les entités qui ont changé, par exemple depuis la dernière fois que vous avez interrogé. Ou bien, il peut être utile d'étudier ou de déboguer la façon dont les entités changent dans votre subgraph (si combiné avec un filtre de bloc, vous pouvez isoler uniquement les entités qui ont changé dans un bloc spécifique). ```graphql { @@ -169,11 +171,11 @@ This can be useful if you are looking to fetch only entities which have changed, } ``` -#### Example for nested entity filtering +#### Exemple de filtrage d'entités imbriquées -Filtering on the basis of nested entities is possible in the fields with the `_` suffix. +Un filtrage sur la base d'entités imbriquées est possible dans les champs portant le suffixe `_`. -This can be useful if you are looking to fetch only entities whose child-level entities meet the provided conditions. +Cela peut être utile si vous souhaitez récupérer uniquement les entités dont les entités au niveau enfant remplissent les conditions fournies. ```graphql { @@ -187,9 +189,9 @@ This can be useful if you are looking to fetch only entities whose child-level e } ``` -#### Logical operators +#### Opérateurs logiques -As of Graph Node [`v0.30.0`](https://github.com/graphprotocol/graph-node/releases/tag/v0.30.0) you can group multiple parameters in the same `where` argument using the `and` or the `or` operators to filter results based on more than one criteria. +Depuis Graph Node [`v0.30.0`](https://github.com/graphprotocol/graph-node/releases/tag/v0.30.0), vous pouvez regrouper plusieurs paramètres dans le même argument `where` en utilisant les opérateurs `et` ou `ou` pour filtrer les résultats en fonction de plusieurs critères. ##### `AND` Operator @@ -208,7 +210,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,16 +324,16 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Utilisez le terme de recherche de préfixe pour trouver les mots dont le préfixe correspond (2 caractères requis.) | #### Exemples -Using the `or` operator, this query will filter to blog entities with variations of either "anarchism" or "crumpet" in their fulltext fields. +En utilisant l'opérateur `ou`, cette requête filtrera les entités de blog ayant des variations de "anarchism" ou "crumpet" dans leurs champs de texte intégral. ```graphql { @@ -344,7 +346,7 @@ Using the `or` operator, this query will filter to blog entities with variations } ``` -The `follow by` operator specifies a words a specific distance apart in the fulltext documents. The following query will return all blogs with variations of "decentralize" followed by "philosophy" +L'opérateur `follow by` spécifie un mot à une distance spécifique dans les documents en texte intégral. La requête suivante renverra tous les blogs contenant des variations de "décentraliser" suivies de "philosophie" ```graphql { @@ -357,7 +359,7 @@ The `follow by` operator specifies a words a specific distance apart in the full } ``` -Combine fulltext operators to make more complex filters. With a pretext search operator combined with a follow by this example query will match all blog entities with words that start with "lou" followed by "music". +Combinez des opérateurs de texte intégral pour créer des filtres plus complexes. Avec un opérateur de recherche de prétexte combiné à un suivi de cet exemple, la requête fera correspondre toutes les entités de blog avec des mots commençant par « lou » suivi de « musique ». ```graphql { @@ -372,7 +374,7 @@ Combine fulltext operators to make more complex filters. With a pretext search o ### Validation -Graph Node implements [specification-based](https://spec.graphql.org/October2021/#sec-Validation) validation of the GraphQL queries it receives using [graphql-tools-rs](https://github.com/dotansimha/graphql-tools-rs#validation-rules), which is based on the [graphql-js reference implementation](https://github.com/graphql/graphql-js/tree/main/src/validation). Queries which fail a validation rule do so with a standard error - visit the [GraphQL spec](https://spec.graphql.org/October2021/#sec-Validation) to learn more. +Graph Node met en œuvre une validation [basée sur les spécifications](https://spec.graphql.org/October2021/#sec-Validation) des requêtes GraphQL qu'il reçoit à l'aide de [graphql-tools-rs](https://github.com/dotansimha/graphql-tools-rs#validation-rules), qui est basée sur l'implémentation de référence [graphql-js](https://github.com/graphql/graphql-js/tree/main/src/validation). Les requêtes qui échouent à une règle de validation sont accompagnées d'une erreur standard - consultez la [Spécification GraphQL](https://spec.graphql.org/October2021/#sec-Validation) pour en savoir plus. ## Schema @@ -380,17 +382,17 @@ Le schéma de votre source de données, c'est-à-dire les types d'entités, les Les schémas GraphQL définissent généralement des types racine pour les `requêtes`, les `abonnements` et les `mutations`. Le graphe ne prend en charge que les `requêtes`. Le type racine `Query` pour votre subgraph est automatiquement généré à partir du schéma GraphQL inclus dans le manifeste de votre subgraph. -> **Note:** Our API does not expose mutations because developers are expected to issue transactions directly against the underlying blockchain from their applications. +> **Note:** Notre API n'expose pas les mutations car les développeurs sont censés émettre des transactions directement contre la blockchain sous-jacente à partir de leurs applications. ### Entities -All GraphQL types with `@entity` directives in your schema will be treated as entities and must have an `ID` field. +Tous les types GraphQL avec des directives `@entity` dans votre schéma seront traités comme des entités et doivent avoir un champ `ID`. -> **Note:** Currently, all types in your schema must have an `@entity` directive. In the future, we will treat types without an `@entity` directive as value objects, but this is not yet supported. +> **Note:** Actuellement, tous les types de votre schéma doivent avoir une directive `@entity`. À l'avenir, nous traiterons les types sans directive `@entity` comme des objets de valeur, mais cela n'est pas encore possible. ### Subgraph Metadata -All subgraphs have an auto-generated `_Meta_` object, which provides access to subgraph metadata. This can be queried as follows: +Tous les subgraphs ont un objet `_Meta_` auto-généré, qui permet d'accéder aux métadonnées du subgraph. Cet objet peut être interrogé comme suit : ```graphQL { From a1a1356d4d612fdcc1842de439c86afbe6b56f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:42 -0400 Subject: [PATCH 244/924] New translations graphql-api.mdx (Spanish) --- website/pages/es/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/es/querying/graphql-api.mdx b/website/pages/es/querying/graphql-api.mdx index 2eac7116dad8..321ec705c482 100644 --- a/website/pages/es/querying/graphql-api.mdx +++ b/website/pages/es/querying/graphql-api.mdx @@ -208,7 +208,7 @@ En el siguiente ejemplo, estamos filtrando desafíos con `coutcome` `succeeded` ``` > **Azúcar sintáctico**: Puedes simplificar la consulta anterior eliminando el operador `and` pasando una subexpresión separada por comas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Las consultas de búsqueda de texto completo tienen un campo obligatorio, `text` Operadores de búsqueda de texto completo: -| Símbolo | Operador | Descripción | -| --- | --- | --- | -| `&` | `And` | Para combinar varios términos de búsqueda en un filtro para entidades que incluyen todos los términos proporcionados | -| | | `O` | Las consultas con varios términos de búsqueda separados por o el operador devolverá todas las entidades que coincidan con cualquiera de los términos proporcionados | -| `<->` | `Follow by` | Especifica la distancia entre dos palabras. | -| `:*` | `Prefijo` | Utilice el término de búsqueda del prefijo para encontrar palabras cuyo prefijo coincida (se requieren 2 caracteres.) | +| Símbolo | Operador | Descripción | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Para combinar varios términos de búsqueda en un filtro para entidades que incluyen todos los términos proporcionados | +| | | `O` | Las consultas con varios términos de búsqueda separados por o el operador devolverá todas las entidades que coincidan con cualquiera de los términos proporcionados | +| `<->` | `Follow by` | Especifica la distancia entre dos palabras. | +| `:*` | `Prefijo` | Utilice el término de búsqueda del prefijo para encontrar palabras cuyo prefijo coincida (se requieren 2 caracteres.) | #### Ejemplos From 00a4168732d89bd5d0f22329120b51559918fcf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:43 -0400 Subject: [PATCH 245/924] New translations graphql-api.mdx (Arabic) --- website/pages/ar/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ar/querying/graphql-api.mdx b/website/pages/ar/querying/graphql-api.mdx index 5807eba74fab..6c81b7756f3a 100644 --- a/website/pages/ar/querying/graphql-api.mdx +++ b/website/pages/ar/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| رمز | عامل التشغيل | الوصف | -| --- | --- | --- | -| `&` | `And` | لدمج عبارات بحث متعددة في فلتر للكيانات التي تتضمن جميع العبارات المتوفرة | -| | | `أو` | الاستعلامات التي تحتوي على عبارات بحث متعددة مفصولة بواسطة عامل التشغيل or ستعيد جميع الكيانات المتطابقة من أي عبارة متوفرة | -| `<->` | `Follow by` | يحدد المسافة بين كلمتين. | -| `:*` | `Prefix` | يستخدم عبارة البحث prefix للعثور على الكلمات التي تتطابق بادئتها (مطلوب حرفان.) | +| رمز | عامل التشغيل | الوصف | +| ----------- | ------------ | --------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | لدمج عبارات بحث متعددة في فلتر للكيانات التي تتضمن جميع العبارات المتوفرة | +| | | `أو` | الاستعلامات التي تحتوي على عبارات بحث متعددة مفصولة بواسطة عامل التشغيل or ستعيد جميع الكيانات المتطابقة من أي عبارة متوفرة | +| `<->` | `Follow by` | يحدد المسافة بين كلمتين. | +| `:*` | `Prefix` | يستخدم عبارة البحث prefix للعثور على الكلمات التي تتطابق بادئتها (مطلوب حرفان.) | #### Examples From 02010dff37304e2daee6119adfaea12c258de437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:44 -0400 Subject: [PATCH 246/924] New translations graphql-api.mdx (Czech) --- website/pages/cs/querying/graphql-api.mdx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/website/pages/cs/querying/graphql-api.mdx b/website/pages/cs/querying/graphql-api.mdx index 89cda460d58f..68099a5e08a9 100644 --- a/website/pages/cs/querying/graphql-api.mdx +++ b/website/pages/cs/querying/graphql-api.mdx @@ -38,7 +38,7 @@ Query all `Token` entities: When querying a collection, the `orderBy` parameter may be used to sort by a specific attribute. Additionally, the `orderDirection` can be used to specify the sort direction, `asc` for ascending or `desc` for descending. -#### Example +#### Příklad ```graphql { @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -282,7 +282,7 @@ The result of such a query will not change over time, i.e., querying at a certai Note that the current implementation is still subject to certain limitations that might violate these gurantees. The implementation can not always tell that a given block hash is not on the main chain at all, or that the result of a query by block hash for a block that can not be considered final yet might be influenced by a block reorganization running concurrently with the query. They do not affect the results of queries by block hash when the block is final and known to be on the main chain. [This issue](https://github.com/graphprotocol/graph-node/issues/1405) explains what these limitations are in detail. -#### Example +#### Příklad ```graphql { @@ -298,7 +298,7 @@ Note that the current implementation is still subject to certain limitations tha This query will return `Challenge` entities, and their associated `Application` entities, as they existed directly after processing block number 8,000,000. -#### Example +#### Příklad ```graphql { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Popis | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 670d7cd89b1de00783c19e3dac983b0b31f981c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:45 -0400 Subject: [PATCH 247/924] New translations graphql-api.mdx (German) --- website/pages/de/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/de/querying/graphql-api.mdx b/website/pages/de/querying/graphql-api.mdx index fc1b29586442..1bc64a267db7 100644 --- a/website/pages/de/querying/graphql-api.mdx +++ b/website/pages/de/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Beschreibung | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Beschreibung | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Beispiele From b98c8dd4e8c0bfc577d15b953a9958e603063339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:46 -0400 Subject: [PATCH 248/924] New translations graphql-api.mdx (Italian) --- website/pages/it/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/it/querying/graphql-api.mdx b/website/pages/it/querying/graphql-api.mdx index d3dd3c57a549..2a1b9a54eef7 100644 --- a/website/pages/it/querying/graphql-api.mdx +++ b/website/pages/it/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Nell'esempio seguente, si filtrano le sfide con `outcome` `succeeded` e `number` ``` > **Syntactic sugar:** Si può semplificare la query precedente eliminando l'operatore `and` passando una sottoespressione separata da virgole. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Le query di ricerca fulltext hanno un campo obbligatorio, `text`, per fornire i Operatori di ricerca fulltext: -| Simbolo | Operatore | Descrizione | -| --- | --- | --- | -| `&` | `And` | Per combinare più termini di ricerca in un filtro per le entità che includono tutti i termini forniti | -| | | `Or` | Le query con più termini di ricerca separati dall'operatore Or restituiranno tutte le entità con una corrispondenza tra i termini forniti | -| `<->` | `Follow by` | Specifica la distanza tra due parole. | -| `:*` | `Prefisso` | Utilizzare il termine di ricerca del prefisso per trovare le parole il cui prefisso corrisponde (sono richiesti 2 caratteri.) | +| Simbolo | Operatore | Descrizione | +| ----------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Per combinare più termini di ricerca in un filtro per le entità che includono tutti i termini forniti | +| | | `Or` | Le query con più termini di ricerca separati dall'operatore Or restituiranno tutte le entità con una corrispondenza tra i termini forniti | +| `<->` | `Follow by` | Specifica la distanza tra due parole. | +| `:*` | `Prefisso` | Utilizzare il termine di ricerca del prefisso per trovare le parole il cui prefisso corrisponde (sono richiesti 2 caratteri.) | #### Esempi From 03d9ea2c8e76ac521d50385b7111008721b70d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:47 -0400 Subject: [PATCH 249/924] New translations graphql-api.mdx (Japanese) --- website/pages/ja/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ja/querying/graphql-api.mdx b/website/pages/ja/querying/graphql-api.mdx index bb65c50d2929..3d503ece126e 100644 --- a/website/pages/ja/querying/graphql-api.mdx +++ b/website/pages/ja/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Graph Node [`v0.30.0`](https://github.com/graphprotocol/graph-node/releases/tag/ ``` > **シンタックス シュガー:** コンマで区切られた部分式を渡すことで `and` 演算子を削除することで、上記のクエリを簡素化できます。 -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) 全文検索演算子: -| シンボル | オペレーター | 説明書き | -| --- | --- | --- | -| `&` | `と` | 複数の検索語を組み合わせて、指定したすべての検索語を含むエンティティをフィルタリングします。 | -| | | `Or` | 複数の検索語をオペレーターで区切って検索すると、指定した語のいずれかにマッチするすべてのエンティティが返されます。 | -| `<->` | `Follow by` | 2 つの単語の間の距離を指定します。 | -| `:*` | `プレフィックス` | プレフィックス検索語を使って、プレフィックスが一致する単語を検索します(2 文字必要) | +| シンボル | オペレーター | 説明書き | +| ----------- | ----------- | --------------------------------------------------------- | +| `&` | `と` | 複数の検索語を組み合わせて、指定したすべての検索語を含むエンティティをフィルタリングします。 | +| | | `Or` | 複数の検索語をオペレーターで区切って検索すると、指定した語のいずれかにマッチするすべてのエンティティが返されます。 | +| `<->` | `Follow by` | 2 つの単語の間の距離を指定します。 | +| `:*` | `プレフィックス` | プレフィックス検索語を使って、プレフィックスが一致する単語を検索します(2 文字必要) | #### 例 From 702014de0afd9a7ef3ed93470886a8e93481c873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:48 -0400 Subject: [PATCH 250/924] New translations graphql-api.mdx (Korean) --- website/pages/ko/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ko/querying/graphql-api.mdx b/website/pages/ko/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/ko/querying/graphql-api.mdx +++ b/website/pages/ko/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From fc405eb2cfc46c47c240443adea3fd7b67b5ceb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:49 -0400 Subject: [PATCH 251/924] New translations graphql-api.mdx (Dutch) --- website/pages/nl/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/nl/querying/graphql-api.mdx b/website/pages/nl/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/nl/querying/graphql-api.mdx +++ b/website/pages/nl/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From bf60f03bc31399a40ad3dd05b5a3df9ebed829fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:50 -0400 Subject: [PATCH 252/924] New translations graphql-api.mdx (Polish) --- website/pages/pl/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/pl/querying/graphql-api.mdx b/website/pages/pl/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/pl/querying/graphql-api.mdx +++ b/website/pages/pl/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 2366206dd1b00744e616d6063c2538fb5e6a68c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:51 -0400 Subject: [PATCH 253/924] New translations graphql-api.mdx (Portuguese) --- website/pages/pt/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/pt/querying/graphql-api.mdx b/website/pages/pt/querying/graphql-api.mdx index 733da228a890..207c226d9d8e 100644 --- a/website/pages/pt/querying/graphql-api.mdx +++ b/website/pages/pt/querying/graphql-api.mdx @@ -208,7 +208,7 @@ No seguinte exemplo, filtramos por desafios com `outcome`, `succeeded` e `number ``` > **Açúcar sintático**: pode simplificar a consulta acima ao retirar o operador `and`, com o passe de uma subexpressão separada por vírgulas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Buscas fulltext têm um campo obrigatório, `text`, para ofertar termos de busca Operadores de busca fulltext: -| Símbolo | Operador | Descrição | -| --- | --- | --- | -| `&` | `And` | Para combinar múltiplos termos de busca num filtro para entidades que incluem todos os termos fornecidos | -| | | `Or` | Consultas com vários termos de busca separados pelo operador `or` retornarão todas as entidades com uma correspondência de qualquer termo providenciado | -| `<->` | `Follow by` | Especifica a distância entre duas palavras. | -| `:*` | `Prefix` | Use o prefixo para encontrar palavras que correspondem a tal prefixo (2 caracteres necessários.) | +| Símbolo | Operador | Descrição | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Para combinar múltiplos termos de busca num filtro para entidades que incluem todos os termos fornecidos | +| | | `Or` | Consultas com vários termos de busca separados pelo operador `or` retornarão todas as entidades com uma correspondência de qualquer termo providenciado | +| `<->` | `Follow by` | Especifica a distância entre duas palavras. | +| `:*` | `Prefix` | Use o prefixo para encontrar palavras que correspondem a tal prefixo (2 caracteres necessários.) | #### Exemplos From 671f2d272cb14b09d9b2b5bc79e5cba39d0b2e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:52 -0400 Subject: [PATCH 254/924] New translations graphql-api.mdx (Russian) --- website/pages/ru/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ru/querying/graphql-api.mdx b/website/pages/ru/querying/graphql-api.mdx index 2637a70c52e8..9bcb91258a9d 100644 --- a/website/pages/ru/querying/graphql-api.mdx +++ b/website/pages/ru/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { ``` > **Syntactic sugar:**. Вы можете упростить приведенный выше запрос, удалив оператор `and`, передав подвыражение, разделенное запятыми. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) Полнотекстовые поисковые операторы: -| Символ | Оператор | Описание | -| --- | --- | --- | -| `&` | `And` | Для объединения нескольких условий поиска в фильтр для объектов, которые включают все указанные условия | -| | | `Or` | Запросы с несколькими условиями поиска, разделенные оператором or, вернут все объекты, которые соответствуют любому из предоставленных условий | -| `<->` | `Follow by` | Укажите расстояние между двумя словами. | -| `:*` | `Prefix` | Используйте поисковый запрос по префиксу, чтобы найти слова с соответствующим префиксом (необходимо 2 символа) | +| Символ | Оператор | Описание | +| ----------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Для объединения нескольких условий поиска в фильтр для объектов, которые включают все указанные условия | +| | | `Or` | Запросы с несколькими условиями поиска, разделенные оператором or, вернут все объекты, которые соответствуют любому из предоставленных условий | +| `<->` | `Follow by` | Укажите расстояние между двумя словами. | +| `:*` | `Prefix` | Используйте поисковый запрос по префиксу, чтобы найти слова с соответствующим префиксом (необходимо 2 символа) | #### Примеры From 61c99cdbcbd2d04776ad41acf00f2e5857b879c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:53 -0400 Subject: [PATCH 255/924] New translations graphql-api.mdx (Swedish) --- website/pages/sv/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/sv/querying/graphql-api.mdx b/website/pages/sv/querying/graphql-api.mdx index 3823820de6eb..303ee3c400df 100644 --- a/website/pages/sv/querying/graphql-api.mdx +++ b/website/pages/sv/querying/graphql-api.mdx @@ -208,7 +208,7 @@ I följande exempel filtrerar vi efter utmaningar med `utfall` `lyckades` och `n ``` > **Syntactic sugar:** Du kan förenkla ovanstående fråga genom att ta bort `and`-operatorn och istället skicka ett underuttryck separerat med kommatecken. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltextsökförfrågningar har ett obligatoriskt fält, `text`, för att tillha Fulltextsökoperatorer: -| Symbol | Operatör | Beskrivning | -| --- | --- | --- | -| `&` | `Och` | För att kombinera flera söktermer till ett filter för entiteter som inkluderar alla de angivna termerna | -| | | `Eller` | Förfrågningar med flera söktermer separerade av ellipsen kommer att returnera alla entiteter med en matchning från någon av de angivna termerna | -| `<->` | `Följs av` | Ange avståndet mellan två ord. | -| `:*` | `Prefix` | Använd prefixsöktermen för att hitta ord vars prefix matchar (2 tecken krävs.) | +| Symbol | Operatör | Beskrivning | +| ----------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `Och` | För att kombinera flera söktermer till ett filter för entiteter som inkluderar alla de angivna termerna | +| | | `Eller` | Förfrågningar med flera söktermer separerade av ellipsen kommer att returnera alla entiteter med en matchning från någon av de angivna termerna | +| `<->` | `Följs av` | Ange avståndet mellan två ord. | +| `:*` | `Prefix` | Använd prefixsöktermen för att hitta ord vars prefix matchar (2 tecken krävs.) | #### Exempel From d65e25fb35d821c555680351f55ddc0c094d7818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:54 -0400 Subject: [PATCH 256/924] New translations graphql-api.mdx (Turkish) --- website/pages/tr/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/tr/querying/graphql-api.mdx b/website/pages/tr/querying/graphql-api.mdx index 4e817f0e579d..84ba2a601058 100644 --- a/website/pages/tr/querying/graphql-api.mdx +++ b/website/pages/tr/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Aşağıdaki örnekte, `outcome` değeri `succeeded` olan ve `number` değeri `1 ``` > **Syntactic sugar:** Yukarıdaki sorguyu, virgülle ayrılmış bir alt ifade geçirerek, `and` operatörünü kaldırarak basitleştirebilirsiniz. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Tam metin arama sorgularının kullanması gereken bir zorunlu alanı vardır, b Tam metin arama operatörleri: -| Sembol | Operatör | Tanımlama | -| --- | --- | --- | -| `&` | `And` | Birden fazla arama terimini, sağlanan tüm terimleri içeren varlıklar için bir filtrede birleştirmek için kullanılır | -| | | `Or` | Or, işleciyle ayrılmış birden çok arama terimi içeren sorgular, sağlanan terimlerden herhangi biriyle eşleşen tüm varlıkları döndürür | -| `<->` | `Follow by` | İki kelime arasındaki mesafeyi belirtir. | -| `:*` | `Prefix` | Ön eki eşleşen kelimeleri bulmak için önek arama terimini kullanın (2 karakter gereklidir.) | +| Sembol | Operatör | Tanımlama | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Birden fazla arama terimini, sağlanan tüm terimleri içeren varlıklar için bir filtrede birleştirmek için kullanılır | +| | | `Or` | Or, işleciyle ayrılmış birden çok arama terimi içeren sorgular, sağlanan terimlerden herhangi biriyle eşleşen tüm varlıkları döndürür | +| `<->` | `Follow by` | İki kelime arasındaki mesafeyi belirtir. | +| `:*` | `Prefix` | Ön eki eşleşen kelimeleri bulmak için önek arama terimini kullanın (2 karakter gereklidir.) | #### Örnekler From ea8dc6738996e4bf81c05a3a5219ded1ef3dac87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:55 -0400 Subject: [PATCH 257/924] New translations graphql-api.mdx (Ukrainian) --- website/pages/uk/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/uk/querying/graphql-api.mdx b/website/pages/uk/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/uk/querying/graphql-api.mdx +++ b/website/pages/uk/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 5a2777028c4159438720010554338713100f26de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:56 -0400 Subject: [PATCH 258/924] New translations graphql-api.mdx (Chinese Simplified) --- website/pages/zh/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/zh/querying/graphql-api.mdx b/website/pages/zh/querying/graphql-api.mdx index 9ab99b1eb0c2..c798bdfd4ec6 100644 --- a/website/pages/zh/querying/graphql-api.mdx +++ b/website/pages/zh/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { tokens(first: 1000, where: { id_gt: $last ``` > **语法糖:**您可以通过传递一个用逗号分隔的子表达式来删除`and`运算符,从而简化上述查询。 -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) 全文搜索运算符: -| 符号 | 运算符 | 描述 | -| ------ | ----------- | ---------------------------------------------------------------------- | -| `&` | `And` | 用于将多个搜索词组合到包含所有提供词条的实体的过滤器中 | -| | | `Or` | 由 or 运算符分隔的多个搜索词的查询,将返回与任何提供的词匹配的所有实体 | -| `<->` | `Follow by` | 指定两个单词之间的距离。 | -| `:*` | `Prefix` | 使用前缀搜索词查找前缀匹配的单词(需要 2 个字符) | +| 符号 | 运算符 | 描述 | +| ----------- | ----------- | ------------------------------------- | +| `&` | `And` | 用于将多个搜索词组合到包含所有提供词条的实体的过滤器中 | +| | | `Or` | 由 or 运算符分隔的多个搜索词的查询,将返回与任何提供的词匹配的所有实体 | +| `<->` | `Follow by` | 指定两个单词之间的距离。 | +| `:*` | `Prefix` | 使用前缀搜索词查找前缀匹配的单词(需要 2 个字符) | #### 例子 From ac70edd23f1da192b7832e0f1be06aa3bec4fb13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:57 -0400 Subject: [PATCH 259/924] New translations graphql-api.mdx (Urdu (Pakistan)) --- website/pages/ur/querying/graphql-api.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/ur/querying/graphql-api.mdx b/website/pages/ur/querying/graphql-api.mdx index 47147daa2b13..0be6aaa6db53 100644 --- a/website/pages/ur/querying/graphql-api.mdx +++ b/website/pages/ur/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { ``` > **Syntactic شوگر:** آپ `and` آپریٹر کو ہٹا کر کوما سے الگ کردہ سب اظہار کو پاس کر کے مذکورہ کیوری کو آسان بنا سکتے ہیں. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) فل ٹیکسٹ سرچ آپریٹرز: -| علامت | آپریٹر | تفصیل | -| --- | --- | --- | -| `&` | `And` | ایک سے زیادہ تلاش کی اصطلاحات کو ایک فلٹر میں یکجا کرنے کے لیے ان ہستیوں کے لیے جس میں فراہم کردہ تمام اصطلاحات شامل ہوں | -| | | `Or` | Or آپریٹر کے ذریعہ الگ کردہ متعدد تلاش کی اصطلاحات کے ساتھ کیوریز فراہم کردہ شرائط میں سے کسی سے بھی مماثلت کے ساتھ تمام ہستیوں کو واپس کریں گے | -| `<>` | `Follow by` | دو الفاظ کے درمیان فاصلہ بتائیں. | -| `:*` | `Prefix` | ایسے الفاظ تلاش کرنے کے لیے پریفکس ​​تلاش کی اصطلاح استعمال کریں جن کا سابقہ ​​مماثل ہو (۲ حروف درکار ہیں.) | +| علامت | آپریٹر | تفصیل | +| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | ایک سے زیادہ تلاش کی اصطلاحات کو ایک فلٹر میں یکجا کرنے کے لیے ان ہستیوں کے لیے جس میں فراہم کردہ تمام اصطلاحات شامل ہوں | +| | | `Or` | Or آپریٹر کے ذریعہ الگ کردہ متعدد تلاش کی اصطلاحات کے ساتھ کیوریز فراہم کردہ شرائط میں سے کسی سے بھی مماثلت کے ساتھ تمام ہستیوں کو واپس کریں گے | +| `<>` | `Follow by` | دو الفاظ کے درمیان فاصلہ بتائیں. | +| `:*` | `Prefix` | ایسے الفاظ تلاش کرنے کے لیے پریفکس ​​تلاش کی اصطلاح استعمال کریں جن کا سابقہ ​​مماثل ہو (۲ حروف درکار ہیں.) | #### مثالیں @@ -408,7 +408,7 @@ GraphQL اسکیمے عام طور پر `queries`، `subscriptions` اور `muta اگر کوئی بلاک فراہم کیا جاتا ہے تو، میٹا ڈیٹا اس بلاک کا ہوتا ہے، اگر تازہ ترین انڈیکسڈ بلاک استعمال نہیں کیا جاتا ہے۔ اگر فراہم کیا گیا ہو، تو بلاک سب گراف کے اسٹارٹ بلاک کے بعد ہونا چاہیے، اور حال ہی میں انڈیکس کیے گئے بلاک سے کم یا اس کے برابر ہونا چاہیے. -`deployment` ایک منفرد ID ہے، جو `subgraph.yaml` فائل کے IPFS CID سے مطابقت رکھتی ہے. +` deployment ` ایک منفرد ID ہے، جو `subgraph.yaml` فائل کے IPFS CID سے مطابقت رکھتی ہے. `block` تازہ ترین بلاک کے بارے میں معلومات فراہم کرتا ہے (`_meta` کو بھیجی گئی کسی بھی بلاک کی رکاوٹوں کو مدنظر رکھتے ہوئے): From f7b61db39e085c1368285b65a0df4e6b94fc5681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:58 -0400 Subject: [PATCH 260/924] New translations graphql-api.mdx (Vietnamese) --- website/pages/vi/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/vi/querying/graphql-api.mdx b/website/pages/vi/querying/graphql-api.mdx index d15b7659d204..4acdfc3e2c56 100644 --- a/website/pages/vi/querying/graphql-api.mdx +++ b/website/pages/vi/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Biểu tượng | Toán tử | Miêu tả | -| --- | --- | --- | -| `&` | `And` | Để kết hợp nhiều cụm từ tìm kiếm thành một bộ lọc cho các thực thể bao gồm tất cả các cụm từ được cung cấp | -| | | `Or` | Các truy vấn có nhiều cụm từ tìm kiếm được phân tách bằng toán tử hoặc sẽ trả về tất cả các thực thể có kết quả khớp với bất kỳ cụm từ nào được cung cấp | -| `<->` | `Follow by` | Chỉ định khoảng cách giữa hai từ. | -| `:*` | `Prefix` | Sử dụng cụm từ tìm kiếm tiền tố để tìm các từ có tiền tố khớp với nhau (yêu cầu 2 ký tự.) | +| Biểu tượng | Toán tử | Miêu tả | +| ----------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Để kết hợp nhiều cụm từ tìm kiếm thành một bộ lọc cho các thực thể bao gồm tất cả các cụm từ được cung cấp | +| | | `Or` | Các truy vấn có nhiều cụm từ tìm kiếm được phân tách bằng toán tử hoặc sẽ trả về tất cả các thực thể có kết quả khớp với bất kỳ cụm từ nào được cung cấp | +| `<->` | `Follow by` | Chỉ định khoảng cách giữa hai từ. | +| `:*` | `Prefix` | Sử dụng cụm từ tìm kiếm tiền tố để tìm các từ có tiền tố khớp với nhau (yêu cầu 2 ký tự.) | #### Examples From dfca04c8091d59259b0e205261d9e286c869e46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:08:59 -0400 Subject: [PATCH 261/924] New translations graphql-api.mdx (Marathi) --- website/pages/mr/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/mr/querying/graphql-api.mdx b/website/pages/mr/querying/graphql-api.mdx index b66f2673be24..de35e41f2124 100644 --- a/website/pages/mr/querying/graphql-api.mdx +++ b/website/pages/mr/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | वर्णन | -| --- | --- | --- | -| `&` | `आणि` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `किंवा` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `द्वारे अनुसरण करा` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | वर्णन | +| ----------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `आणि` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `किंवा` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `द्वारे अनुसरण करा` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 11005655d9d6a266b5d4d1a1d9920f730a46fe55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:00 -0400 Subject: [PATCH 262/924] New translations graphql-api.mdx (Hindi) --- website/pages/hi/querying/graphql-api.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/hi/querying/graphql-api.mdx b/website/pages/hi/querying/graphql-api.mdx index 353a62ef15a7..81d663ed1277 100644 --- a/website/pages/hi/querying/graphql-api.mdx +++ b/website/pages/hi/querying/graphql-api.mdx @@ -93,7 +93,7 @@ When querying a collection, the `first` parameter can be used to paginate from t #### उदाहरण का उपयोग करना `पहले` और `छोड़ें` -क्वेरी 10 `टोकन` इकाइयां, संग्रह की शुरुआत से 10 स्थानों से ऑफसेट: +क्वेरी 10 ` टोकन ` इकाइयां, संग्रह की शुरुआत से 10 स्थानों से ऑफसेट: ```graphql { @@ -208,7 +208,7 @@ This can be useful if you are looking to fetch only entities which have changed, ``` > **सिंटैक्टिक शुगर:** आप `और` ऑपरेटर को कॉमा द्वारा अलग किए गए सब-एक्सप्रेशन को पास करके उपरोक्त क्वेरी को सरल बना सकते हैं। -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search query fields provide an expressive text search API that can be a पूर्ण पाठ खोज ऑपरेटर: -| प्रतीक | ऑपरेटर | विवरण | -| --- | --- | --- | -| `&` | `And` | सभी प्रदान किए गए शब्दों को शामिल करने वाली संस्थाओं के लिए एक से अधिक खोज शब्दों को फ़िल्टर में संयोजित करने के लिए | -| | | `Or` | या ऑपरेटर द्वारा अलग किए गए एकाधिक खोज शब्दों वाली क्वेरी सभी संस्थाओं को प्रदान की गई शर्तों में से किसी से मेल के साथ वापस कर देगी | -| `<->` | `Follow by` | दो शब्दों के बीच की दूरी निर्दिष्ट करें। | -| `:*` | `Prefix` | उन शब्दों को खोजने के लिए उपसर्ग खोज शब्द का उपयोग करें जिनके उपसर्ग मेल खाते हैं (2 वर्ण आवश्यक हैं।) | +| प्रतीक | ऑपरेटर | विवरण | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | सभी प्रदान किए गए शब्दों को शामिल करने वाली संस्थाओं के लिए एक से अधिक खोज शब्दों को फ़िल्टर में संयोजित करने के लिए | +| | | `Or` | या ऑपरेटर द्वारा अलग किए गए एकाधिक खोज शब्दों वाली क्वेरी सभी संस्थाओं को प्रदान की गई शर्तों में से किसी से मेल के साथ वापस कर देगी | +| `<->` | `Follow by` | दो शब्दों के बीच की दूरी निर्दिष्ट करें। | +| `:*` | `Prefix` | उन शब्दों को खोजने के लिए उपसर्ग खोज शब्द का उपयोग करें जिनके उपसर्ग मेल खाते हैं (2 वर्ण आवश्यक हैं।) | #### उदाहरण From 45aaa8608741d8243054a4b903331434b41126ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:00 -0400 Subject: [PATCH 263/924] New translations graphql-api.mdx (Yoruba) --- website/pages/yo/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/yo/querying/graphql-api.mdx b/website/pages/yo/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/yo/querying/graphql-api.mdx +++ b/website/pages/yo/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 80697e513a43480ccfe7521d97348d48666a04d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:02 -0400 Subject: [PATCH 264/924] New translations querying-best-practices.mdx (French) --- .../fr/querying/querying-best-practices.mdx | 118 +++++++++--------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/website/pages/fr/querying/querying-best-practices.mdx b/website/pages/fr/querying/querying-best-practices.mdx index 10d504b7c708..a633b98c52e8 100644 --- a/website/pages/fr/querying/querying-best-practices.mdx +++ b/website/pages/fr/querying/querying-best-practices.mdx @@ -12,11 +12,11 @@ Cette page vous guidera à travers les règles essentielles du langage GraphQL e ## Interroger une API GraphQL -### The anatomy of a GraphQL query +### L'anatomie d'une requête GraphQL -Unlike REST API, a GraphQL API is built upon a Schema that defines which queries can be performed. +Contrairement à l'API REST, une API GraphQL repose sur un schéma qui définit les requêtes qui peuvent être effectuées. -For example, a query to get a token using the `token` query will look as follows: +Par exemple, une requête pour obtenir un jeton à l'aide de la requête `token` ressemblera à ceci : ```graphql query GetToken($id: ID!) { @@ -27,7 +27,7 @@ query GetToken($id: ID!) { } ``` -which will return the following predictable JSON response (_when passing the proper `$id` variable value_): +qui renverra la réponse JSON prévisible suivante (_lors du passage de la valeur de variable `$id` appropriée_) : ```json { @@ -38,9 +38,9 @@ which will return the following predictable JSON response (_when passing the pro } ``` -GraphQL queries use the GraphQL language, which is defined upon [a specification](https://spec.graphql.org/). +Les requêtes GraphQL utilisent le langage GraphQL, qui est défini sur [une spécification](https://spec.graphql.org/). -The above `GetToken` query is composed of multiple language parts (replaced below with `[...]` placeholders): +La requête `GetToken` ci-dessus est composée de plusieurs parties de langage (remplacées ci-dessous par des espaces réservés `[...]`) : ```graphql query [operationName]([variableName]: [variableType]) { @@ -52,33 +52,33 @@ query [operationName]([variableName]: [variableType]) { } ``` -While the list of syntactic do's and don'ts is long, here are the essential rules to keep in mind when it comes to writing GraphQL queries: +Bien que la liste des choses à faire et à ne pas faire syntaxiquement soit longue, voici les règles essentielles à garder à l'esprit lorsqu'il s'agit d'écrire des requêtes GraphQL : -- Each `queryName` must only be used once per operation. -- Each `field` must be used only once in a selection (we cannot query `id` twice under `token`) -- Some `field`s or queries (like `tokens`) return complex types that require a selection of sub-field. Not providing a selection when expected (or providing one when not expected - for example, on `id`) will raise an error. To know a field type, please refer to [The Graph Explorer](/network/explorer). -- Any variable assigned to an argument must match its type. -- In a given list of variables, each of them must be unique. -- All defined variables must be used. +- Chaque `queryName` ne doit être utilisé qu'une seule fois par opération. +- Chaque `champ` ne doit être utilisé qu'une seule fois dans une sélection (on ne peut pas interroger `id` deux fois sous `token`) +- Certains `champs` ou requêtes (comme les `jetons`) renvoient des types complexes qui nécessitent une sélection de sous-champs. Ne pas fournir de sélection lorsque cela est attendu (ou en fournir une lorsque cela n'est pas prévu - par exemple, sur `id`) générera une erreur. Pour connaître un type de champ, veuillez vous référer au [The Graph Explorer](/network/explorer). +- Toute variable affectée à un argument doit correspondre à son type. +- Dans une liste de variables donnée, chacune d’elles doit être unique. +- Toutes les variables définies doivent être utilisées. -Failing to follow the above rules will end with an error from the Graph API. +Toutes les variables définies doivent être utilisées. Pour une liste complète des règles avec des exemples de code, veuillez consulter notre guide de validations GraphQL. -### Sending a query to a GraphQL API +### Envoi d'une requête à une API GraphQL -GraphQL is a language and set of conventions that transport over HTTP. +GraphQL est un langage et un ensemble de conventions qui transportent via HTTP. -It means that you can query a GraphQL API using standard `fetch` (natively or via `@whatwg-node/fetch` or `isomorphic-fetch`). +Cela signifie que vous pouvez interroger une API GraphQL en utilisant le standard `fetch` (nativement ou via `@whatwg-node/fetch` ou `isomorphic-fetch`). -However, as stated in ["Querying from an Application"](/querying/querying-from-an-application), we recommend you to use our `graph-client` that supports unique features such as: +Cependant, comme indiqué dans ["Requête à partir d'une application"](/querying/querying-from-an-application), nous vous recommandons d'utiliser notre `graph-client` qui prend en charge des fonctionnalités uniques telles que : - Gestion des subgraphs inter-chaînes : interrogation à partir de plusieurs subgraphs en une seule requête -- [Automatic Block Tracking](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) -- [Automatic Pagination](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) -- Fully typed result +- [Suivi automatique des blocs](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) +- [Pagination automatique](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) +- Résultat entièrement typé -Here's how to query The Graph with `graph-client`: +Voici comment interroger The Graph avec `graph-client` : ```tsx import { execute } from '../.graphclient' @@ -108,11 +108,11 @@ Maintenant que nous avons couvert les règles de base de la syntaxe des requête --- -## Writing GraphQL queries +## Écrire des requêtes GraphQL -### Always write static queries +### Écrivez toujours des requêtes statiques -A common (bad) practice is to dynamically build query strings as follows: +Une (mauvaise) pratique courante consiste à créer dynamiquement des chaînes de requête comme suit : ```tsx const id = params.id @@ -128,14 +128,14 @@ query GetToken { // Execute query... ``` -While the above snippet produces a valid GraphQL query, **it has many drawbacks**: +Bien que l'extrait ci-dessus produise une requête GraphQL valide, **il présente de nombreux inconvénients** : -- it makes it **harder to understand** the query as a whole -- developers are **responsible for safely sanitizing the string interpolation** -- not sending the values of the variables as part of the request parameters **prevent possible caching on server-side** -- it **prevents tools from statically analyzing the query** (ex: Linter, or type generations tools) +- cela rend **plus difficile de comprendre** la requête dans son ensemble +- les développeurs sont **responsables de nettoyer en toute sécurité l'interpolation de chaîne** +- ne pas envoyer les valeurs des variables dans le cadre des paramètres de la requête **empêcher une éventuelle mise en cache côté serveur** +- cela **empêche les outils d'analyser statiquement la requête** (ex : Linter, ou outils de génération de types) -For this reason, it is recommended to always write queries as static strings: +Pour cette raison, il est recommandé de toujours écrire les requêtes sous forme de chaînes statiques : ```tsx import { execute } from 'your-favorite-graphql-client' @@ -157,18 +157,18 @@ const result = await execute(query, { }) ``` -Doing so brings **many advantages**: +Cela apporte de **de nombreux avantages** : -- **Easy to read and maintain** queries +- **Requêtes faciles à lire et à gérer** - The GraphQL **server handles variables sanitization** - **Variables can be cached** at server-level -- **Queries can be statically analyzed by tools** (more on this in the following sections) +- **Les requêtes peuvent être analysées statiquement par des outils** (plus d'informations à ce sujet dans les sections suivantes) -**Note: How to include fields conditionally in static queries** +**Remarque : Comment inclure des champs de manière conditionnelle dans les requêtes statiques** -We might want to include the `owner` field only on a particular condition. +Nous pourrions vouloir inclure le champ `owner` uniquement dans une condition particulière. -For this, we can leverage the `@include(if:...)` directive as follows: +Pour cela, nous pouvons exploiter la directive `@include(if:...)` comme suit : ```tsx import { execute } from 'your-favorite-graphql-client' @@ -191,21 +191,21 @@ const result = await execute(query, { }) ``` -Note: The opposite directive is `@skip(if: ...)`. +Remarque : La directive opposée est `@skip(if: ...)`. -### Performance tips +### Conseils de performances -**"Ask for what you want"** +**"Demande ce que tu veux"** -GraphQL became famous for its "Ask for what you want" tagline. +GraphQL est devenu célèbre pour son slogan « Demandez ce que vous voulez ». -For this reason, there is no way, in GraphQL, to get all available fields without having to list them individually. +Pour cette raison, il n'existe aucun moyen, dans GraphQL, d'obtenir tous les champs disponibles sans avoir à les lister individuellement. -When querying GraphQL APIs, always think of querying only the fields that will be actually used. +Lorsque vous interrogez les API GraphQL, pensez toujours à interroger uniquement les champs qui seront réellement utilisés. -A common cause of over-fetching is collections of entities. By default, queries will fetch 100 entities in a collection, which is usually much more than what will actually be used, e.g., for display to the user. Queries should therefore almost always set first explicitly, and make sure they only fetch as many entities as they actually need. This applies not just to top-level collections in a query, but even more so to nested collections of entities. +Les collections d’entités sont une cause fréquente de surextraction. Par défaut, les requêtes récupèrent 100 entités dans une collection, ce qui est généralement bien plus que ce qui sera réellement utilisé, par exemple pour l'affichage à l'utilisateur. Les requêtes doivent donc presque toujours être définies explicitement en premier et s'assurer qu'elles ne récupèrent que le nombre d'entités dont elles ont réellement besoin. Cela s'applique non seulement aux collections de niveau supérieur dans une requête, mais encore plus aux collections d'entités imbriquées. -For example, in the following query: +Par exemple, dans la requête suivante : ```graphql query listTokens { @@ -220,13 +220,13 @@ query listTokens { } ``` -The response could contain 100 transactions for each of the 100 tokens. +La réponse pourrait contenir 100 transactions pour chacun des 100 jetons. -If the application only needs 10 transactions, the query should explicitly set `first: 10` on the transactions field. +Si l'application n'a besoin que de 10 transactions, la requête doit explicitement définir `first: 10` dans le champ transactions. -**Combining multiple queries** +**Combinaison de plusieurs requêtes** -Your application might require querying multiple types of data as follows: +Votre application peut nécessiter l'interrogation de plusieurs types de données comme suit : ```graphql import { execute } from "your-favorite-graphql-client" @@ -256,7 +256,7 @@ const [tokens, counters] = Promise.all( ) ``` -While this implementation is totally valid, it will require two round trips with the GraphQL API. +Bien que cette implémentation soit totalement valide, elle nécessitera deux allers-retours avec l'API GraphQL. Fortunately, it is also valid to send multiple queries in the same GraphQL request as follows: @@ -439,25 +439,25 @@ This will allow you to **catch errors without even testing queries** on the play ### IDE plugins -**VSCode and GraphQL** +**VSCode et GraphQL** -The [GraphQL VSCode extension](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql) is an excellent addition to your development workflow to get: +L'[extension GraphQL VSCode](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql) est un excellent ajout à votre flux de travail de développement pour obtenir : - syntax highlighting - autocomplete suggestions -- validation against schema +- validation par rapport au schéma - snippets -- go to definition for fragments and input types +- aller à la définition des fragments et des types d'entrée -If you are using `graphql-eslint`, the [ESLint VSCode extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) is a must-have to visualize errors and warnings inlined in your code correctly. +Si vous utilisez `graphql-eslint`, l'[extension ESLint VSCode](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) est un incontournable pour visualiser correctement les erreurs et les avertissements intégrés dans votre code. -**WebStorm/Intellij and GraphQL** +**WebStorm/Intellij et GraphQL** -The [JS GraphQL plugin](https://plugins.jetbrains.com/plugin/8097-graphql/) will significantly improve your experience while working with GraphQL by providing: +Le [plug-in JS GraphQL](https://plugins.jetbrains.com/plugin/8097-graphql/) améliorera considérablement votre expérience lorsque vous travaillez avec GraphQL en fournissant : - syntax highlighting - autocomplete suggestions -- validation against schema +- validation par rapport au schéma - snippets -More information on this [WebStorm article](https://blog.jetbrains.com/webstorm/2019/04/featured-plugin-js-graphql/) that showcases all the plugin's main features. +Plus d'informations sur cet [article WebStorm](https://blog.jetbrains.com/webstorm/2019/04/featured-plugin-js-graphql/) qui présente toutes les principales fonctionnalités du plugin. From 5c14fbc08dbe1993f27133bdf8583276c126c67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:04 -0400 Subject: [PATCH 265/924] New translations querying-best-practices.mdx (Arabic) --- .../ar/querying/querying-best-practices.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/ar/querying/querying-best-practices.mdx b/website/pages/ar/querying/querying-best-practices.mdx index 24f0e802e02a..b5501c497ce3 100644 --- a/website/pages/ar/querying/querying-best-practices.mdx +++ b/website/pages/ar/querying/querying-best-practices.mdx @@ -16,7 +16,7 @@ title: أفضل الممارسات للاستعلام على عكس REST API ، فإن GraphQL API مبنية على مخطط يحدد الاستعلامات التي يمكن تنفيذها. -على سبيل المثال ، طلب الاستعلام للحصول على توكن باستخدام استعلام `token` سيبدو كما يلي: +على سبيل المثال ، طلب الاستعلام للحصول على توكن باستخدام استعلام ` token ` سيبدو كما يلي: ```graphql query GetToken($id: ID!) { @@ -40,7 +40,7 @@ query GetToken($id: ID!) { تستخدم استعلامات GraphQL لغة GraphQL ، التي تم تحديدها في [المواصفات](https://spec.graphql.org/). -يتكون استعلام `GetToken` أعلاه من أجزاء متعددة للغة (تم استبدالها أدناه بـ placeholders `[...]`): +يتكون استعلام ` GetToken ` أعلاه من أجزاء متعددة للغة (تم استبدالها أدناه بـ placeholders ` [...] `): ```graphql query [operationName]([variableName]: [variableType]) { @@ -54,9 +54,9 @@ query [operationName]([variableName]: [variableType]) { على الرغم من أن قائمة القواعد التي يجب اتباعها طويلة، إلا أن هناك قواعد أساسية يجب أخذها في الاعتبار عند كتابة استعلامات GraphQL: -- يجب استخدام كل `queryName` مرة واحدة فقط لكل عملية. -- يجب استخدام كل `field` مرة واحدة فقط في التحديد (لا يمكننا الاستعلام عن `id` مرتين ضمن `token`) -- بعض `field` أو الاستعلامات (مثل `tokens`) ترجع أنواعًا معقدة تتطلب تحديدًا للحقول الفرعية. عدم تقديم تحديد عندما يكون متوقعًا (أو تقديم تحديد عندما لا يكون متوقعًا - على سبيل المثال ، الـ `id`) سيؤدي إلى ظهور خطأ. لمعرفة نوع الحقل ، يرجى الرجوع إلى [ The Graph Explorer ](/network/explorer). +- يجب استخدام كل ` queryName ` مرة واحدة فقط لكل عملية. +- يجب استخدام كل ` field ` مرة واحدة فقط في التحديد (لا يمكننا الاستعلام عن ` id ` مرتين ضمن ` token `) +- بعض ` field ` أو الاستعلامات (مثل `tokens`) ترجع أنواعًا معقدة تتطلب تحديدًا للحقول الفرعية. عدم تقديم تحديد عندما يكون متوقعًا (أو تقديم تحديد عندما لا يكون متوقعًا - على سبيل المثال ، الـ ` id `) سيؤدي إلى ظهور خطأ. لمعرفة نوع الحقل ، يرجى الرجوع إلى [ The Graph Explorer ](/network/explorer). - يجب أن يكون أي متغير تم تعيينه لوسيط متطابقًا مع نوعه. - في قائمة المتغيرات المعطاة ، يجب أن يكون كل واحد منها فريدًا. - يجب استخدام جميع المتغيرات المحددة. @@ -308,7 +308,7 @@ query { Such repeated fields (`id`, `active`, `status`) bring many issues: - harder to read for more extensive queries -- عند استخدام الأدوات التي تنشئ أنواع TypeScript بناءً على الاستعلامات (_المزيد عن ذلك في القسم الأخير_)، و `newDelate` و `oldDelegate` سينتج عنهما واجهتين مضمنتان متمايزتين. +- عند استخدام الأدوات التي تنشئ أنواع TypeScript بناءً على الاستعلامات (_المزيد عن ذلك في القسم الأخير_)، و ` newDelate ` و ` oldDelegate ` سينتج عنهما واجهتين مضمنتان متمايزتين. A refactored version of the query would be the following: @@ -431,8 +431,8 @@ In order to keep up with the mentioned above best practices and syntactic rules, [Setup the "operations-recommended"](https://github.com/dotansimha/graphql-eslint#available-configs) config will enforce essential rules such as: -- `@ graphql-eslint / field-on-right-type`: هل يتم استخدام الحقل على النوع المناسب؟ -- `@ graphql-eslint / no-unused variables`: هل يجب أن يبقى المتغير المعطى غير مستخدم؟ +- ` @ graphql-eslint / field-on-right-type `: هل يتم استخدام الحقل على النوع المناسب؟ +- ` @ graphql-eslint / no-unused variables `: هل يجب أن يبقى المتغير المعطى غير مستخدم؟ - و اكثر! This will allow you to **catch errors without even testing queries** on the playground or running them in production! From bc5e3659bdb91e09e78a854cde8104516a54019c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:05 -0400 Subject: [PATCH 266/924] New translations querying-best-practices.mdx (Czech) --- .../cs/querying/querying-best-practices.mdx | 150 +++++++++--------- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/website/pages/cs/querying/querying-best-practices.mdx b/website/pages/cs/querying/querying-best-practices.mdx index 98c0ffb72c61..d656ab17bffb 100644 --- a/website/pages/cs/querying/querying-best-practices.mdx +++ b/website/pages/cs/querying/querying-best-practices.mdx @@ -1,22 +1,22 @@ --- -title: Querying Best Practices +title: Osvědčené postupy dotazování --- -The Graph provides a decentralized way to query data from blockchains. +Graf poskytuje decentralizovaný způsob dotazování na data z blockchainů. -The Graph network's data is exposed through a GraphQL API, making it easier to query data with the GraphQL language. +Data sítě Graf jsou zpřístupněna prostřednictvím GraphQL API, což usnadňuje dotazování na data pomocí jazyka GraphQL. -This page will guide you through the essential GraphQL language rules and GraphQL queries best practices. +Tato stránka vás provede základními pravidly jazyka GraphQL a osvědčenými postupy pro dotazy GraphQL. --- -## Querying a GraphQL API +## Dotazování GraphQL API -### The anatomy of a GraphQL query +### Anatomie dotazu GraphQL -Unlike REST API, a GraphQL API is built upon a Schema that defines which queries can be performed. +Na rozdíl od rozhraní REST API je GraphQL API postaveno na schématu, které definuje, jaké dotazy lze provádět. -For example, a query to get a token using the `token` query will look as follows: +Například dotaz pro získání tokenu pomocí dotazu `token` bude vypadat takto: ```graphql query GetToken($id: ID!) { @@ -27,7 +27,7 @@ query GetToken($id: ID!) { } ``` -which will return the following predictable JSON response (_when passing the proper `$id` variable value_): +která vrátí následující předvídatelnou odpověď JSON (_při předání správné `$id`hodnoty proměnné _): ```json { @@ -38,9 +38,9 @@ which will return the following predictable JSON response (_when passing the pro } ``` -GraphQL queries use the GraphQL language, which is defined upon [a specification](https://spec.graphql.org/). +Dotazy GraphQL používají jazyk GraphQL, který je definován na základě [specifikace](https://spec.graphql.org/). -The above `GetToken` query is composed of multiple language parts (replaced below with `[...]` placeholders): +Výše uvedený dotaz `GetToken` se skládá z více jazykových částí (níže nahrazených `[...]`) zástupnými znaky: ```graphql query [operationName]([variableName]: [variableType]) { @@ -52,33 +52,33 @@ query [operationName]([variableName]: [variableType]) { } ``` -While the list of syntactic do's and don'ts is long, here are the essential rules to keep in mind when it comes to writing GraphQL queries: +I když je seznam syntaktických doporučení a doporučení dlouhý, zde jsou základní pravidla, která je třeba mít na paměti, pokud jde o psaní dotazů GraphQL: -- Each `queryName` must only be used once per operation. -- Each `field` must be used only once in a selection (we cannot query `id` twice under `token`) -- Some `field`s or queries (like `tokens`) return complex types that require a selection of sub-field. Not providing a selection when expected (or providing one when not expected - for example, on `id`) will raise an error. To know a field type, please refer to [The Graph Explorer](/network/explorer). -- Any variable assigned to an argument must match its type. -- In a given list of variables, each of them must be unique. -- All defined variables must be used. +- Každý `název dotazu` smí být při jedné operaci použit pouze jednou. +- Každé `pole` musí být ve výběru použito pouze jednou (pod `token` se nemůžeme dvakrát dotazovat na `id`) +- Některá `pole` nebo dotazy (jako `tokeny`) vracejí složené typy, které vyžadují výběr podpole. Nezadání výběru, když se očekává (nebo zadání výběru, když se neočekává - například u `id`), vyvolá chybu. Chcete-li znát typ pole, podívejte se na [Prohlížeč grafů](/network/explorer). v. +- Každá proměnná přiřazená argumentu musí odpovídat jeho typu. +- V daném seznamu proměnných musí být každá z nich jedinečná. +- Musí být použity všechny definované proměnné. -Failing to follow the above rules will end with an error from the Graph API. +Nedodržení výše uvedených pravidel skončí chybou Graf API. -For a complete list of rules with code examples, please look at our GraphQL Validations guide. +Kompletní seznam pravidel s příklady kódu naleznete v naší příručce Ověřování GraphQL. -### Sending a query to a GraphQL API +### Odeslání dotazu na GraphQL API -GraphQL is a language and set of conventions that transport over HTTP. +GraphQL je jazyk a sada konvencí, které se přenášejí přes protokol HTTP. -It means that you can query a GraphQL API using standard `fetch` (natively or via `@whatwg-node/fetch` or `isomorphic-fetch`). +To znamená, že se můžete dotazovat na GraphQL API pomocí standardního `fetch` (nativně nebo pomocí `@whatwg-node/fetch` nebo `isomorphic-fetch`). -However, as stated in ["Querying from an Application"](/querying/querying-from-an-application), we recommend you to use our `graph-client` that supports unique features such as: +Jak je však uvedeno v části ["Dotazování z aplikace"](/querying/querying-from-an-application), doporučujeme používat našeho `graf-klienta`, který podporuje jedinečné funkce, jako např: -- Cross-chain Subgraph Handling: Querying from multiple subgraphs in a single query -- [Automatic Block Tracking](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) -- [Automatic Pagination](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) -- Fully typed result +- Manipulace s podgrafy napříč řetězci: Dotazování z více podgrafů v jednom dotazu +- [Automatické sledování](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) +- [Automatické stránkování](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) +- Plně zadaný výsledekv -Here's how to query The Graph with `graph-client`: +Zde se dozvíte, jak zadat dotaz do Grafu pomocí `graph-client`: ```tsx import { execute } from '../.graphclient' @@ -102,17 +102,17 @@ async function main() { main() ``` -More GraphQL client alternatives are covered in ["Querying from an Application"](/querying/querying-from-an-application). +Další alternativy klienta GraphQL jsou popsány v ["Dotazování z aplikace"](/querying/querying-from-an-application). -Now that we covered the basic rules of GraphQL queries syntax, let's now look at the best practices of GraphQL query writing. +Nyní, když jsme se seznámili se základními pravidly syntaxe dotazů GraphQL, se podíváme na osvědčené postupy psaní dotazů GraphQL. --- -## Writing GraphQL queries +## Psaní dotazů GraphQL -### Always write static queries +### Vždy pište statické dotazy -A common (bad) practice is to dynamically build query strings as follows: +Běžnou (špatnou) praxí je dynamické vytváření řetězců dotazů následujícím způsobem: ```tsx const id = params.id @@ -128,14 +128,14 @@ query GetToken { // Execute query... ``` -While the above snippet produces a valid GraphQL query, **it has many drawbacks**: +Výše uvedený úryvek sice vytvoří platný dotaz GraphQL, ale **má mnoho nevýhod**: -- it makes it **harder to understand** the query as a whole -- developers are **responsible for safely sanitizing the string interpolation** -- not sending the values of the variables as part of the request parameters **prevent possible caching on server-side** -- it **prevents tools from statically analyzing the query** (ex: Linter, or type generations tools) +- je **těžší porozumět** dotazu jako celku +- vývojáři jsou **zodpovědní za bezpečnou úpravu interpolace řetězců** +- neposílat hodnoty proměnných jako součást parametrů požadavku **zabránit případnému ukládání do mezipaměti na straně serveru** +- **zabraňuje nástrojům staticky analyzovat dotaz** (např.: Linter nebo nástroje pro generování typů) -For this reason, it is recommended to always write queries as static strings: +Z tohoto důvodu se doporučuje psát dotazy vždy jako statické řetězce: ```tsx import { execute } from 'your-favorite-graphql-client' @@ -157,18 +157,18 @@ const result = await execute(query, { }) ``` -Doing so brings **many advantages**: +To přináší **mnoho výhod**: -- **Easy to read and maintain** queries -- The GraphQL **server handles variables sanitization** -- **Variables can be cached** at server-level -- **Queries can be statically analyzed by tools** (more on this in the following sections) +- **Snadné čtení a údržba** dotazů +- GraphQL **server zpracovává sanitizaci proměnných** +- **Proměnné lze ukládat do mezipaměti** na úrovni serveru +- **Nástroje mohou staticky analyzovat dotazy** (více v následujících kapitolách) -**Note: How to include fields conditionally in static queries** +**Poznámka: Jak podmíněně zahrnout pole do statických dotazů** -We might want to include the `owner` field only on a particular condition. +Pole `vlastník` můžeme chtít zahrnout pouze při splnění určité podmínky. -For this, we can leverage the `@include(if:...)` directive as follows: +K tomu můžeme využít direktivu `@include(if:...)` takto: ```tsx import { execute } from 'your-favorite-graphql-client' @@ -191,21 +191,21 @@ const result = await execute(query, { }) ``` -Note: The opposite directive is `@skip(if: ...)`. +Poznámka: Opačným direktivou je `@skip(if: ...)`. -### Performance tips +### Výkonnostní tipy -**"Ask for what you want"** +**"Požádejte o to, co chcete"** -GraphQL became famous for its "Ask for what you want" tagline. +GraphQL se proslavil sloganem „Požádejte o to, co chcete“. -For this reason, there is no way, in GraphQL, to get all available fields without having to list them individually. +Z tohoto důvodu neexistuje způsob, jak v GraphQL získat všechna dostupná pole, aniž byste je museli vypisovat jednotlivě. -When querying GraphQL APIs, always think of querying only the fields that will be actually used. +Při dotazování na GraphQL vždy myslete na to, abyste dotazovali pouze pole, která budou skutečně použita. -A common cause of over-fetching is collections of entities. By default, queries will fetch 100 entities in a collection, which is usually much more than what will actually be used, e.g., for display to the user. Queries should therefore almost always set first explicitly, and make sure they only fetch as many entities as they actually need. This applies not just to top-level collections in a query, but even more so to nested collections of entities. +Častou příčinou nadměrného načítání jsou kolekce entit. Ve výchozím nastavení dotazy načtou 100 entit v kolekci, což je obvykle mnohem více, než kolik se skutečně použije, např. pro zobrazení uživateli. Dotazy by proto měly být téměř vždy nastaveny explicitně jako první a měly by zajistit, aby načítaly pouze tolik entit, kolik skutečně potřebují. To platí nejen pro kolekce nejvyšší úrovně v dotazu, ale ještě více pro vnořené kolekce entit. -For example, in the following query: +Například v následujícím dotazu: ```graphql query listTokens { @@ -220,13 +220,13 @@ query listTokens { } ``` -The response could contain 100 transactions for each of the 100 tokens. +Odpověď může obsahovat 100 transakcí pro každý ze 100 tokenů. -If the application only needs 10 transactions, the query should explicitly set `first: 10` on the transactions field. +Pokud aplikace potřebuje pouze 10 transakcí, měl by dotaz explicitně nastavit parametr `first: 10` v poli transakcí. -**Combining multiple queries** +**Kombinace více dotazů** -Your application might require querying multiple types of data as follows: +Vaše aplikace může vyžadovat dotazování na více typů dat takto: ```graphql import { execute } from "your-favorite-graphql-client" @@ -256,9 +256,9 @@ const [tokens, counters] = Promise.all( ) ``` -While this implementation is totally valid, it will require two round trips with the GraphQL API. +Přestože je tato implementace zcela platná, bude vyžadovat dva požadavky na GraphQL API. -Fortunately, it is also valid to send multiple queries in the same GraphQL request as follows: +Naštěstí je také možné odeslat více dotazů v jednom požadavku GraphQL, a to následujícím způsobem: ```graphql import { execute } from "your-favorite-graphql-client" @@ -279,13 +279,13 @@ query GetTokensandCounters { const { result: { tokens, counters } } = execute(query) ``` -This approach will **improve the overall performance** by reducing the time spent on the network (saves you a round trip to the API) and will provide a **more concise implementation**. +Tento přístup **zlepší celkový výkon** tím, že zkrátí čas strávený na síti (ušetří vám cestu k API) a poskytne **stručnější implementaci**. -### Leverage GraphQL Fragments +### Využití fragmentů GraphQL -A helpful feature to write GraphQL queries is GraphQL Fragment. +Užitečnou funkcí pro psaní dotazů GraphQL je GraphQL Fragment. -Looking at the following query, you will notice that some fields are repeated across multiple Selection-Sets (`{ ... }`): +Při pohledu na následující dotaz si všimnete, že některá pole se opakují ve více výběrových sadách (`{ ... }`): ```graphql query { @@ -305,12 +305,12 @@ query { } ``` -Such repeated fields (`id`, `active`, `status`) bring many issues: +Taková opakovaná pole (`id`, `active`, `status`) přinášejí mnoho problémů: -- harder to read for more extensive queries -- when using tools that generate TypeScript types based on queries (_more on that in the last section_), `newDelegate` and `oldDelegate` will result in two distinct inline interfaces. +- hůře čitelné pro rozsáhlejší dotazy +- při použití nástrojů, které generují typy TypeScript na základě dotazů (_více o tom v poslední části_), budou `newDelegate` a `oldDelegate` mít za následek dvě samostatné inline rozhraní. -A refactored version of the query would be the following: +Přepracovaná verze dotazu by byla následující: ```graphql query { @@ -334,11 +334,11 @@ fragment DelegateItem on Transcoder { } ``` -Using GraphQL `fragment` will improve readability (especially at scale) but also will result in better TypeScript types generation. +Použití GraphQL `fragment` zlepší čitelnost (zejména v měřítku), ale také povede k lepšímu generování typůTypeScript. -When using the types generation tool, the above query will generate a proper `DelegateItemFragment` type (_see last "Tools" section_). +Při použití nástroje pro generování typů vygeneruje výše uvedený dotaz vhodný typ `DelegateItemFragment` (_viz poslední část "Nástroje"_). -### GraphQL Fragment do's and don'ts +### Co dělat a nedělat s fragmenty GraphQL **Fragment base must be a type** @@ -356,7 +356,7 @@ fragment MyFragment on BigInt { Fragments are defined on specific types and should be used accordingly in queries. -Example: +Příklad: ```graphql query { @@ -417,7 +417,7 @@ fragment VoteWithPoll on Vote { ### GraphQL web-based explorers -Iterating over queries by running them in your application can be cumbersome. For this reason, don't hesitate to use [The Graph Explorer](https://thegraph.com/explorer) to test your queries before adding them to your application. The Graph Explorer will provide you a preconfigured GraphQL playground to test your queries. +Iterování dotazů jejich spouštěním ve vaší aplikaci může být těžkopádné. Z tohoto důvodu neváhejte použít [The Graph Explorer](https://thegraph.com/explorer) k otestování svých dotazů před jejich přidáním do aplikace. Průzkumník Graf vám poskytne předkonfigurované hřiště GraphQL pro testování vašich dotazů. If you are looking for a more flexible way to debug/test your queries, other similar web-based tools are available such as [Altair](https://altair.sirmuel.design/) and [GraphiQL](https://graphiql-online.com/graphiql). From d0b85f34a0d9baff8b9cf18c4e1179e9028e75ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:06 -0400 Subject: [PATCH 267/924] New translations querying-best-practices.mdx (Italian) --- .../it/querying/querying-best-practices.mdx | 228 +++++++++--------- 1 file changed, 114 insertions(+), 114 deletions(-) diff --git a/website/pages/it/querying/querying-best-practices.mdx b/website/pages/it/querying/querying-best-practices.mdx index 98c0ffb72c61..0e906915124d 100644 --- a/website/pages/it/querying/querying-best-practices.mdx +++ b/website/pages/it/querying/querying-best-practices.mdx @@ -2,21 +2,21 @@ title: Querying Best Practices --- -The Graph provides a decentralized way to query data from blockchains. +The Graph fornisce un modo decentralizzato per effettuare query dei dati delle blockchain. -The Graph network's data is exposed through a GraphQL API, making it easier to query data with the GraphQL language. +I dati di The Graph network sono esposti attraverso un API GraphQL, che facilita query dei dati con il linguaggio GraphQL. -This page will guide you through the essential GraphQL language rules and GraphQL queries best practices. +Questa pagina vi guiderà attraverso le regole essenziali del linguaggio GraphQL e le best practice delle query in GraphQL. --- -## Querying a GraphQL API +## Effettuare query con API GraphQL -### The anatomy of a GraphQL query +### L'anatomia di una query GraphQL -Unlike REST API, a GraphQL API is built upon a Schema that defines which queries can be performed. +A differenza del REST API, un GraphQL API si basa su uno schema che definisce le query che possono essere eseguite. -For example, a query to get a token using the `token` query will look as follows: +Ad esempio, una query per ottenere un token utilizzando la query `token` avrà il seguente aspetto: ```graphql query GetToken($id: ID!) { @@ -27,7 +27,7 @@ query GetToken($id: ID!) { } ``` -which will return the following predictable JSON response (_when passing the proper `$id` variable value_): +che restituirà la seguente risposta JSON prevedibile (_quando si passa il valore corretto della variabile `$id`_): ```json { @@ -38,9 +38,9 @@ which will return the following predictable JSON response (_when passing the pro } ``` -GraphQL queries use the GraphQL language, which is defined upon [a specification](https://spec.graphql.org/). +Le query GraphQL utilizzano il linguaggio GraphQL, definito da [una specificazione](https://spec.graphql.org/). -The above `GetToken` query is composed of multiple language parts (replaced below with `[...]` placeholders): +La query `GetToken` di cui sopra è composta da più parti linguistiche (sostituite di seguito con i segnaposto `[...]`): ```graphql query [operationName]([variableName]: [variableType]) { @@ -52,33 +52,33 @@ query [operationName]([variableName]: [variableType]) { } ``` -While the list of syntactic do's and don'ts is long, here are the essential rules to keep in mind when it comes to writing GraphQL queries: +Sebbene l'elenco delle cose da fare e da non fare a livello sintattico sia lungo, ecco le regole essenziali da tenere a mente quando si tratta di scrivere query GraphQL: -- Each `queryName` must only be used once per operation. -- Each `field` must be used only once in a selection (we cannot query `id` twice under `token`) -- Some `field`s or queries (like `tokens`) return complex types that require a selection of sub-field. Not providing a selection when expected (or providing one when not expected - for example, on `id`) will raise an error. To know a field type, please refer to [The Graph Explorer](/network/explorer). -- Any variable assigned to an argument must match its type. -- In a given list of variables, each of them must be unique. -- All defined variables must be used. +- Ogni `queryName` deve essere usato una sola volta per ogni operazione. +- Ogni `field` deve essere utilizzato una sola volta in una selezione (non si può effettuare query di `id` due volte sotto `token`) +- Alcuni `field` o query (come i `token`) restituiscono tipi complessi che richiedono una selezione di sub-field. Se non si fornisce una selezione quando ci si aspetta (o se la si fornisce quando non ci si aspetta, ad esempio su `id`), si genererà un errore. Per conoscere un tipo di campo, consultare [Il Graph Explorer](/network/explorer). +- Qualsiasi variabile assegnata a un argomento deve corrispondere al suo tipo. +- In un determinato elenco di variabili, ciascuna di esse deve essere unica. +- Tutte le variabili definite devono essere utilizzate. -Failing to follow the above rules will end with an error from the Graph API. +Se non si rispettano le regole di cui sopra, si ottiene un errore dall'API Graph. -For a complete list of rules with code examples, please look at our GraphQL Validations guide. +Per un elenco completo delle regole con esempi di codice, consultare la guida GraphQL Validations guide. -### Sending a query to a GraphQL API +### Invio di una query a un API GraphQL -GraphQL is a language and set of conventions that transport over HTTP. +GraphQL è un linguaggio e una serie di convenzioni che si trasportano su HTTP. -It means that you can query a GraphQL API using standard `fetch` (natively or via `@whatwg-node/fetch` or `isomorphic-fetch`). +Significa che è possibile effettuare query di un API GraphQL utilizzando lo standard `fetch` (in modo nativo o tramite `@whatwg-node/fetch` or `isomorphic-fetch`). -However, as stated in ["Querying from an Application"](/querying/querying-from-an-application), we recommend you to use our `graph-client` that supports unique features such as: +Tuttavia, come indicato in ["Eseguire una query da un'applicazione"](/querying/querying-from-an-application), si consiglia di utilizzare il nostro `graph-client` che supporta caratteristiche uniche come: -- Cross-chain Subgraph Handling: Querying from multiple subgraphs in a single query -- [Automatic Block Tracking](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) -- [Automatic Pagination](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) -- Fully typed result +- Gestione dei subgraph a cross-chain: effettuare query di più subgraph in un'unica query +- [Tracciamento automatico dei blocchi](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) +- [Paginazione automatica](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) +- Risultato completamente tipizzato -Here's how to query The Graph with `graph-client`: +Ecco come effettuare query di The Graph con `graph-client`: ```tsx import { execute } from '../.graphclient' @@ -102,17 +102,17 @@ async function main() { main() ``` -More GraphQL client alternatives are covered in ["Querying from an Application"](/querying/querying-from-an-application). +Altre alternative di client GraphQL sono trattate in ["Eseguire una query da un'applicazione"](/querying/querying-from-an-application). -Now that we covered the basic rules of GraphQL queries syntax, let's now look at the best practices of GraphQL query writing. +Ora che abbiamo trattato le regole di base della sintassi delle query GraphQL, esaminiamo le best practices di scrittura delle query GraphQL. --- -## Writing GraphQL queries +## Scrivere query GraphQL -### Always write static queries +### Scrivere sempre query statiche -A common (bad) practice is to dynamically build query strings as follows: +Una pratica comune (sbagliata) è quella di costruire dinamicamente le stringhe di query come segue: ```tsx const id = params.id @@ -128,14 +128,14 @@ query GetToken { // Execute query... ``` -While the above snippet produces a valid GraphQL query, **it has many drawbacks**: +Sebbene lo snippet di cui sopra produca una GraphQL query valida, **ha molti svantaggi**: -- it makes it **harder to understand** the query as a whole -- developers are **responsible for safely sanitizing the string interpolation** -- not sending the values of the variables as part of the request parameters **prevent possible caching on server-side** -- it **prevents tools from statically analyzing the query** (ex: Linter, or type generations tools) +- rende **più difficile la comprensione** della query nel suo insieme +- gli sviluppatori sono **responsabili della sanificazione sicura dell'interpolazione delle stringhe** +- non inviare i valori delle variabili come parte dei parametri della richiesta **previene eventuali cache sul lato server** +- **impedisce agli strumenti di analizzare staticamente la query** (ad esempio, Linter o strumenti di generazione dei tipi) -For this reason, it is recommended to always write queries as static strings: +Per questo motivo, si consiglia di scrivere sempre le query come stringhe statiche: ```tsx import { execute } from 'your-favorite-graphql-client' @@ -157,18 +157,18 @@ const result = await execute(query, { }) ``` -Doing so brings **many advantages**: +Questo comporta **molti vantaggi**: -- **Easy to read and maintain** queries -- The GraphQL **server handles variables sanitization** -- **Variables can be cached** at server-level -- **Queries can be statically analyzed by tools** (more on this in the following sections) +- Query **facili da leggere e da mantenere** +- Il server GraphQL **gestisce la sanificazione delle variabili** +- **Le variabili possono essere messe in cache** a livello di server +- **Le query possono essere analizzate staticamente dagli strumenti** (maggiori informazioni nelle sezioni successive) -**Note: How to include fields conditionally in static queries** +**Nota: come includere i campi in modo condizionato nelle query statiche** -We might want to include the `owner` field only on a particular condition. +Si potrebbe voler includere il campo `owner` solo in una condizione particolare. -For this, we can leverage the `@include(if:...)` directive as follows: +Per questo possiamo sfruttare la direttiva `@include(if:...)` come segue: ```tsx import { execute } from 'your-favorite-graphql-client' @@ -191,21 +191,21 @@ const result = await execute(query, { }) ``` -Note: The opposite directive is `@skip(if: ...)`. +Nota: La direttiva opposta è `@skip(if: ...)`. -### Performance tips +### Suggerimenti sulle prestazioni -**"Ask for what you want"** +**"Chiedi quello che vuoi"** -GraphQL became famous for its "Ask for what you want" tagline. +GraphQL è diventato famoso per il suo slogan "Chiedi quello che vuoi". -For this reason, there is no way, in GraphQL, to get all available fields without having to list them individually. +Per questo motivo, non c'è modo, in GraphQL, di ottenere tutti i campi disponibili senza doverli elencare singolarmente. -When querying GraphQL APIs, always think of querying only the fields that will be actually used. +Quando si interrogano le GraphQL API, si deve sempre pensare di effettuare query di solo i campi che verranno effettivamente utilizzati. -A common cause of over-fetching is collections of entities. By default, queries will fetch 100 entities in a collection, which is usually much more than what will actually be used, e.g., for display to the user. Queries should therefore almost always set first explicitly, and make sure they only fetch as many entities as they actually need. This applies not just to top-level collections in a query, but even more so to nested collections of entities. +Una causa comune di over-fetching sono le collezioni di entità. Per impostazione predefinita, le query recuperano 100 entità in un collezione, che di solito sono molte di più di quelle effettivamente utilizzate, ad esempio per la visualizzazione all'utente. Le query dovrebbero quindi essere impostate quasi sempre in modo esplicito e assicurarsi di recuperare solo il numero di entità di cui hanno effettivamente bisogno. Questo vale non solo per le collezioni di primo livello in una query, ma ancora di più per le collezioni di entità annidate. -For example, in the following query: +Ad esempio, nella seguente query: ```graphql query listTokens { @@ -220,13 +220,13 @@ query listTokens { } ``` -The response could contain 100 transactions for each of the 100 tokens. +La risposta potrebbe contenere 100 transazioni per ciascuno dei 100 token. -If the application only needs 10 transactions, the query should explicitly set `first: 10` on the transactions field. +Se l'applicazione ha bisogno solo di 10 transazioni, la query deve impostare esplicitamente `first: 10` sul campo transazioni. -**Combining multiple queries** +**Combinazione di più query** -Your application might require querying multiple types of data as follows: +L'applicazione potrebbe richiedere di effettuare query di più tipi di dati, come di seguito indicato: ```graphql import { execute } from "your-favorite-graphql-client" @@ -256,9 +256,9 @@ const [tokens, counters] = Promise.all( ) ``` -While this implementation is totally valid, it will require two round trips with the GraphQL API. +Sebbene questa implementazione sia assolutamente valida, richiederà due viaggi di andata e ritorno con API GraphQL. -Fortunately, it is also valid to send multiple queries in the same GraphQL request as follows: +Fortunatamente, è anche possibile inviare più query nella stessa richiesta GraphQL, come segue: ```graphql import { execute } from "your-favorite-graphql-client" @@ -279,13 +279,13 @@ query GetTokensandCounters { const { result: { tokens, counters } } = execute(query) ``` -This approach will **improve the overall performance** by reducing the time spent on the network (saves you a round trip to the API) and will provide a **more concise implementation**. +Questo approccio **migliorerà le prestazioni complessive** riducendo il tempo trascorso sulla rete (si risparmia un viaggio di andata e ritorno verso l'API) e fornirà **un'implementazione più concisa**. -### Leverage GraphQL Fragments +### Sfruttare i frammenti GraphQL -A helpful feature to write GraphQL queries is GraphQL Fragment. +Una funzione utile per scrivere GraphQL query è GraphQL Fragment. -Looking at the following query, you will notice that some fields are repeated across multiple Selection-Sets (`{ ... }`): +Osservando la seguente query, si noterà che alcuni campi sono ripetuti su Selection-Sets multipli (`{ ... }`): ```graphql query { @@ -305,12 +305,12 @@ query { } ``` -Such repeated fields (`id`, `active`, `status`) bring many issues: +Tali campi ripetuti (`id`, `active`, `status`) comportano molti problemi: -- harder to read for more extensive queries -- when using tools that generate TypeScript types based on queries (_more on that in the last section_), `newDelegate` and `oldDelegate` will result in two distinct inline interfaces. +- più difficile da leggere per le query più estese +- quando si usano strumenti che generano tipi TypeScript basati su query (_per saperne di più nell'ultima sezione_), `newDelegate` e `oldDelegate` risulteranno in due interfacce inline distinte. -A refactored version of the query would be the following: +Una versione riadattata della query sarebbe la seguente: ```graphql query { @@ -334,15 +334,15 @@ fragment DelegateItem on Transcoder { } ``` -Using GraphQL `fragment` will improve readability (especially at scale) but also will result in better TypeScript types generation. +L'uso di GraphQL `fragment` migliorerà la leggibilità (soprattutto in scala), ma anche la generazione di tipi TypeScript. -When using the types generation tool, the above query will generate a proper `DelegateItemFragment` type (_see last "Tools" section_). +Quando si usa lo strumento di generazione dei tipi, la query di cui sopra genererà un tipo `DelegateItemFragment` corretto (_vedi l'ultima sezione "Strumenti"_). -### GraphQL Fragment do's and don'ts +### I frammenti GraphQL da fare e da non fare -**Fragment base must be a type** +**La base del frammento deve essere un tipo** -A Fragment cannot be based on a non-applicable type, in short, **on type not having fields**: +Un frammento non può essere basato su un tipo non applicabile, in breve, **su un tipo che non ha campi**: ```graphql fragment MyFragment on BigInt { @@ -350,13 +350,13 @@ fragment MyFragment on BigInt { } ``` -`BigInt` is a **scalar** (native "plain" type) that cannot be used as a fragment's base. +`BigInt` è un **scalare** (tipo nativo "semplice") che non può essere usato come base di un frammento. -**How to spread a Fragment** +**Come diffondere un frammento** -Fragments are defined on specific types and should be used accordingly in queries. +I frammenti sono definiti su tipi specifici e devono essere usati di conseguenza nelle query. -Example: +Esempio: ```graphql query { @@ -377,20 +377,20 @@ fragment VoteItem on Vote { } ``` -`newDelegate` and `oldDelegate` are of type `Transcoder`. +`newDelegate` e `oldDelegate` sono di tipo `Transcoder`. -It is not possible to spread a fragment of type `Vote` here. +Non è possibile diffondere un frammento di tipo `Vote` qui. -**Define Fragment as an atomic business unit of data** +**Definire il frammento come unità aziendale atomica di dati** -GraphQL Fragment must be defined based on their usage. +I Fragment GraphQL devono essere definiti in base al loro utilizzo. -For most use-case, defining one fragment per type (in the case of repeated fields usage or type generation) is sufficient. +Per la maggior parte dei casi d'uso, è sufficiente definire un fragment per tipo (nel caso di utilizzo di campi ripetuti o di generazione di tipi). -Here is a rule of thumb for using Fragment: +Ecco una regola empirica per l'utilizzo di Fragment: -- when fields of the same type are repeated in a query, group them in a Fragment -- when similar but not the same fields are repeated, create multiple fragments, ex: +- quando i campi dello stesso tipo si ripetono in una query, raggrupparli in un Fragment +- quando si ripetono campi simili ma non uguali, creare più fragment, ad esempio: ```graphql # base fragment (mostly used in listing) @@ -413,51 +413,51 @@ fragment VoteWithPoll on Vote { --- -## The essential tools +## Gli strumenti essenziali -### GraphQL web-based explorers +### Esploratori web GraphQL -Iterating over queries by running them in your application can be cumbersome. For this reason, don't hesitate to use [The Graph Explorer](https://thegraph.com/explorer) to test your queries before adding them to your application. The Graph Explorer will provide you a preconfigured GraphQL playground to test your queries. +Iterare le query eseguendole nell'applicazione può essere ingombrante. Per questo motivo, non esitate a usare [Graph Explorer](https://thegraph.com/explorer) per testare le query prima di aggiungerle all'applicazione. Graph Explorer fornisce un'area di GraphQL playground preconfigurata per testare le query. -If you are looking for a more flexible way to debug/test your queries, other similar web-based tools are available such as [Altair](https://altair.sirmuel.design/) and [GraphiQL](https://graphiql-online.com/graphiql). +Se si cerca un modo più flessibile per eseguire il debug/test delle query, sono disponibili altri strumenti simili basati sul web, come [Altair](https://altair.sirmuel.design/) e [GraphiQL](https://graphiql-online.com/graphiql). -### GraphQL Linting +### Linting di GraphQL -In order to keep up with the mentioned above best practices and syntactic rules, it is highly recommended to use the following workflow and IDE tools. +Per tenere il passo con le best practice e le regole sintattiche di cui sopra, si consiglia vivamente di utilizzare i seguenti strumenti di workflow e IDE. **GraphQL ESLint** -[GraphQL ESLint](https://github.com/dotansimha/graphql-eslint) will help you stay on top of GraphQL best practices with zero effort. +[GraphQL ESLint](https://github.com/dotansimha/graphql-eslint) vi aiuterà a rimanere al passo con le best practice GraphQL senza alcuno sforzo. -[Setup the "operations-recommended"](https://github.com/dotansimha/graphql-eslint#available-configs) config will enforce essential rules such as: +[L'impostazione della configurazione "operazioni consigliate"](https://github.com/dotansimha/graphql-eslint#available-configs) farà rispettare regole essenziali come: -- `@graphql-eslint/fields-on-correct-type`: is a field used on a proper type? -- `@graphql-eslint/no-unused variables`: should a given variable stay unused? -- and more! +- `@graphql-eslint/fields-on-correct-type`: un campo è utilizzato su un tipo corretto? +- `@graphql-eslint/no-unused variables`: una determinata variabile deve rimanere inutilizzata? +- e altro ancora! -This will allow you to **catch errors without even testing queries** on the playground or running them in production! +Questo vi permetterà di **cogliere gli errori senza nemmeno testare le query** sul playground o eseguirle in produzione! -### IDE plugins +### Plugin IDE -**VSCode and GraphQL** +**VSCode e GraphQL** -The [GraphQL VSCode extension](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql) is an excellent addition to your development workflow to get: +[L'estensione GraphQL VSCode](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql) è un'eccellente aggiunta al vostro flusso di lavoro di sviluppo: -- syntax highlighting -- autocomplete suggestions -- validation against schema -- snippets -- go to definition for fragments and input types +- evidenziazione della sintassi +- suggerimenti per il completamento automatico +- validazione rispetto allo schema +- frammenti +- vai alla definizione dei frammenti e dei tipi dell'input -If you are using `graphql-eslint`, the [ESLint VSCode extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) is a must-have to visualize errors and warnings inlined in your code correctly. +Se si utilizza `graphql-eslint`, [l'estensione ESLint VSCode](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) è indispensabile per visualizzare correttamente gli errori e gli avvertimenti inseriti nel codice. -**WebStorm/Intellij and GraphQL** +**WebStorm/Intellij e GraphQL** -The [JS GraphQL plugin](https://plugins.jetbrains.com/plugin/8097-graphql/) will significantly improve your experience while working with GraphQL by providing: +[Il plugin JS GraphQL](https://plugins.jetbrains.com/plugin/8097-graphql/) migliorerà significativamente l'esperienza di lavoro con GraphQL fornendo: -- syntax highlighting -- autocomplete suggestions -- validation against schema -- snippets +- evidenziazione della sintassi +- suggerimenti per il completamento automatico +- validazione rispetto allo schema +- frammenti -More information on this [WebStorm article](https://blog.jetbrains.com/webstorm/2019/04/featured-plugin-js-graphql/) that showcases all the plugin's main features. +Maggiori informazioni in questo [articolo di WebStorm](https://blog.jetbrains.com/webstorm/2019/04/featured-plugin-js-graphql/) che illustra tutte le caratteristiche principali del plugin. From e442e3c2d63b1cfe47430c52cd063de3e177b2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:11 -0400 Subject: [PATCH 268/924] New translations querying-best-practices.mdx (Swedish) --- .../sv/querying/querying-best-practices.mdx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/pages/sv/querying/querying-best-practices.mdx b/website/pages/sv/querying/querying-best-practices.mdx index 5d5201189515..99d76809e653 100644 --- a/website/pages/sv/querying/querying-best-practices.mdx +++ b/website/pages/sv/querying/querying-best-practices.mdx @@ -81,7 +81,7 @@ Men, som det anges i ["Frågehantering från en applikation"](/querying/querying Så här ställer du en fråga till The Graph med `graph-client`: ```tsx -import { execute } from '../.graphclient' +import { execute } from "../.graphclient"; const query = ` query GetToken($id: ID!) { @@ -90,13 +90,13 @@ query GetToken($id: ID!) { owner } } -` +`; const variables = { id: '1' } async function main() { - const result = await execute(query, variables) + const result = await execute(query, variables); // `result` är fullständigt typad! - console.log(result) + console.log(result); } main() @@ -115,15 +115,15 @@ Nu när vi har gått igenom de grundläggande reglerna för syntax för GraphQL- En vanlig (dålig) praxis är att dynamiskt bygga upp frågesträngar enligt följande: ```tsx -const id = params.id -const fields = ['id', 'owner'] +const id = params.id; +const fields = ["id", "owner"]; const query = ` query GetToken { token(id: ${id}) { - ${fields.join('\n')} + ${fields.join("\n")} } } -` +`; // Execute query... ``` @@ -138,9 +138,9 @@ Medan det tidigare avsnittet genererar en giltig GraphQL-fråga har den **många Av dessa skäl rekommenderas det alltid att skriva frågor som statiska strängar: ```tsx -import { execute } from 'your-favorite-graphql-client' +import { execute } from "your-favorite-graphql-client"; -const id = params.id +const id = params.id; const query = ` query GetToken($id: ID!) { token(id: $id) { @@ -148,7 +148,7 @@ query GetToken($id: ID!) { owner } } -` +`; const result = await execute(query, { variables: { @@ -171,9 +171,9 @@ Ibland vill vi inkludera fältet `owner` endast under vissa villkor. För detta kan vi utnyttja direktivet `@include(if:...)` på följande sätt: ```tsx -import { execute } from 'your-favorite-graphql-client' +import { execute } from "your-favorite-graphql-client"; -const id = params.id +const id = params.id; const query = ` query GetToken($id: ID!, $includeOwner: Boolean) { token(id: $id) { From 92c5841c4543dfce97e8f96badbd46426ebc8339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:13 -0400 Subject: [PATCH 269/924] New translations querying-best-practices.mdx (Chinese Simplified) --- website/pages/zh/querying/querying-best-practices.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/zh/querying/querying-best-practices.mdx b/website/pages/zh/querying/querying-best-practices.mdx index 4584b5a48fc5..fdbc732e5742 100644 --- a/website/pages/zh/querying/querying-best-practices.mdx +++ b/website/pages/zh/querying/querying-best-practices.mdx @@ -195,13 +195,13 @@ const result = await execute(query, { ### 性能提示 -**"Ask for what you want"** +**“问你所想”** -GraphQL became famous for its "Ask for what you want" tagline. +GraphQL以其“问你所想”的口号而闻名。 因此,在GraphQL中,不单独列出所有可用字段,就无法获取所有可用字段。 -When querying GraphQL APIs, always think of querying only the fields that will be actually used. +在查询GraphQL API时,请始终考虑只查询实际使用的字段。 过度获取的一个常见原因是实体集合。默认情况下,查询将获取集合中的100个实体,这通常比实际使用的实体多得多,例如,用于向用户显示的实体。因此,查询几乎总是首先显式设置,并确保它们只获取实际需要的实体。这不仅适用于查询中的一层集合,更适用于实体的嵌套集合。 @@ -334,7 +334,7 @@ fragment DelegateItem on Transcoder { } ``` -Using GraphQL `fragment` will improve readability (especially at scale) but also will result in better TypeScript types generation. +使用GraphQL`fragment`将提高可读性(特别是在规模上),也将使更好的TypeScript类型生成。 当使用类型生成工具时,上述查询将生成一个正确的`DelegateItemFragment`类型(_请参阅上一节“工具”_)。 From 858cf4e77d673c6f5a7761fc8960ea291fc62d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:14 -0400 Subject: [PATCH 270/924] New translations querying-best-practices.mdx (Urdu (Pakistan)) --- website/pages/ur/querying/querying-best-practices.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/ur/querying/querying-best-practices.mdx b/website/pages/ur/querying/querying-best-practices.mdx index 144a23d1f309..ec6adef80199 100644 --- a/website/pages/ur/querying/querying-best-practices.mdx +++ b/website/pages/ur/querying/querying-best-practices.mdx @@ -55,8 +55,8 @@ query [operationName]([variableName]: [variableType]) { اگرچہ نحوی کرنے اور نہ کرنے کی فہرست طویل ہے، لیکن GraphQL کی کیوریز لکھنے کی بات کرتے وقت ذہن میں رکھنے کے لیے ضروری اصول یہ ہیں: - ہر ایک `queryName` کو فی آپریشن صرف ایک بار استعمال کیا جانا چاہیے. -- ہر ایک `field` کو انتخاب میں صرف ایک بار استعمال کیا جانا چاہیے (ہم `token` کے تحت دو بار `id` سے کیوری نہیں کرسکتے ہیں) -- کچھ `field` یا کیوریز (جیسے `tokens`) پیچیدہ قسمیں واپس کرتے ہیں جن کے لیے سب فیلڈ کے انتخاب کی ضرورت ہوتی ہے۔ توقع کے وقت انتخاب فراہم نہ کرنا (یا توقع نہ ہونے پر انتخاب فراہم کرنا - مثال کے طور پر، `id` پر) ایک خرابی پیدا کرے گا۔ فیلڈ کی قسم جاننے کے لیے، براہ کرم [گراف ایکسپلورر](/network/explorer) سے رجوع کریں. +- ہر ایک ` field ` کو انتخاب میں صرف ایک بار استعمال کیا جانا چاہیے (ہم `token` کے تحت دو بار `id` سے کیوری نہیں کرسکتے ہیں) +- کچھ ` field ` یا کیوریز (جیسے `tokens`) پیچیدہ قسمیں واپس کرتے ہیں جن کے لیے سب فیلڈ کے انتخاب کی ضرورت ہوتی ہے۔ توقع کے وقت انتخاب فراہم نہ کرنا (یا توقع نہ ہونے پر انتخاب فراہم کرنا - مثال کے طور پر، `id` پر) ایک خرابی پیدا کرے گا۔ فیلڈ کی قسم جاننے کے لیے، براہ کرم [گراف ایکسپلورر](/network/explorer) سے رجوع کریں. - کسی دلیل کو تفویض کردہ کوئی بھی متغیر اس کی قسم سے مماثل ہونا چاہیے. - متغیرات کی دی گئی فہرست میں، ان میں سے ہر ایک منفرد ہونا چاہیے. - تمام متعین متغیرات کو استعمال کیا جانا چاہیے. @@ -166,7 +166,7 @@ const result = await execute(query, { **نوٹ: جامد کیوریز میں فیلڈز کو مشروط طور پر کیسے شامل کیا جائے** -ہم صرف ایک خاص شرط پر `owner` فیلڈ کو شامل کرنا چاہتے ہیں. +ہم صرف ایک خاص شرط پر ` owner ` فیلڈ کو شامل کرنا چاہتے ہیں. اس کے لیے، ہم ذیل میں `@include(if:...)` ہدایت کا فائدہ اٹھا سکتے ہیں: From 5b86ab5965e6bb8606dc9aec02992c29aaa9d5f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:18 -0400 Subject: [PATCH 271/924] New translations querying-from-an-application.mdx (French) --- .../querying/querying-from-an-application.mdx | 78 +++++++++---------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/website/pages/fr/querying/querying-from-an-application.mdx b/website/pages/fr/querying/querying-from-an-application.mdx index 50f6fc2fb140..6dc4de761da3 100644 --- a/website/pages/fr/querying/querying-from-an-application.mdx +++ b/website/pages/fr/querying/querying-from-an-application.mdx @@ -1,43 +1,43 @@ --- -title: Querying from an Application +title: Interrogation à partir d'une application --- Une fois qu'un subgraph est déployé dans Subgraph Studio ou dans The Graph Explorer, vous recevrez le point de terminaison de votre API GraphQL qui devrait ressembler à ceci : -**Subgraph Studio (testing endpoint)** +**Subgraph Studio (point de terminaison de test)** ```sh Queries (HTTP) https://api.studio.thegraph.com/query/// ``` -**Explorateur Graph** +**Graph Explorer** ```sh Queries (HTTP) https://gateway.thegraph.com/api//subgraphs/id/ ``` -Using the GraphQL endpoint, you can use various GraphQL Client libraries to query the subgraph and populate your app with the data indexed by the subgraph. +À l'aide du point de terminaison GraphQL, vous pouvez utiliser diverses bibliothèques client GraphQL pour interroger le subgraph et remplir votre application avec les données indexées par le subgraph. -Here are a couple of the more popular GraphQL clients in the ecosystem and how to use them: +Voici quelques-uns des clients GraphQL les plus populaires de l'écosystème et comment les utiliser : -## GraphQL clients +## Clients GraphQL ### Graph client -The Graph is providing it own GraphQL client, `graph-client` that supports unique features such as: +The Graph fournit son propre client GraphQL, `graph-client` qui prend en charge des fonctionnalités uniques telles que : - Gestion des subgraphs inter-chaînes : interrogation à partir de plusieurs subgraphs en une seule requête -- [Automatic Block Tracking](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) -- [Automatic Pagination](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) -- Fully typed result +- [Suivi automatique des blocs](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) +- [Pagination automatique](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) +- Résultat entièrement typé -Also integrated with popular GraphQL clients such as Apollo and URQL and compatible with all environments (React, Angular, Node.js, React Native), using `graph-client` will give you the best experience for interacting with The Graph. +Également intégré aux clients GraphQL populaires tels qu'Apollo et URQL et compatible avec tous les environnements (React, Angular, Node.js, React Native), l'utilisation de `graph-client` vous offrira la meilleure expérience d'interaction avec The Graphique. -Let's look at how to fetch data from a subgraph with `graphql-client`. +Voyons comment récupérer les données d'un subgraph avec `graphql-client`. -To get started, make sure to install The Graph Client CLI in your project: +Pour commencer, assurez-vous d'installer le CLI de The Graph client dans votre projet: ```sh yarn add -D @graphprotocol/client-cli @@ -45,17 +45,17 @@ yarn add -D @graphprotocol/client-cli npm install --save-dev @graphprotocol/client-cli ``` -Define your query in a `.graphql` file (or inlined in your `.js` or `.ts` file): +Définissez votre requête dans un fichier `.graphql` (ou dans votre fichier `.js` ou `.ts`) : ```graphql query ExampleQuery { - # this one is coming from compound-v2 + # celle-ci provient de compound-v2 markets(first: 7) { borrowRate cash collateralFactor } - # this one is coming from uniswap-v2 + # celle-ci provient de uniswap-v2 pair(id: "0x00004ee988665cdda9a1080d5792cecd16dc1220") { id token0 { @@ -72,7 +72,7 @@ query ExampleQuery { } ``` -Then, create a configuration file (called `.graphclientrc.yml`) and point to your GraphQL endpoints provided by The Graph, for example: +Ensuite, créez un fichier de configuration (appelé `.graphclientrc.yml`) et pointez vers vos points de terminaison GraphQL fournis par The Graph, par exemple : ```yaml # .graphclientrc.yml @@ -90,13 +90,13 @@ documents: - ./src/example-query.graphql ``` -Running the following The Graph Client CLI command will generate typed and ready to use JavaScript code: +L’exécution de la commande CLI Graph Client suivante générera du code JavaScript tapé et prêt à être utilisé : ```sh graphclient build ``` -Finally, update your `.ts` file to use the generated typed GraphQL documents: +Enfin, mettez à jour votre fichier `.ts` pour utiliser les documents GraphQL typés générés : ```tsx import React, { useEffect } from 'react' @@ -130,37 +130,35 @@ function App() { ) } - -export default App ``` -**⚠️ Important notice** +**⚠️ Avis important** -`graph-client` is perfectly integrated with other GraphQL clients such as Apollo client, URQL, or React Query; you will [find examples in the official repository](https://github.com/graphprotocol/graph-client/tree/main/examples). +`graph-client` est parfaitement intégré à d'autres clients GraphQL tels que le client Apollo, URQL ou React Query ; vous [trouverez des exemples dans le référentiel officiel](https://github.com/graphprotocol/graph-client/tree/main/examples). -However, if you choose to go with another client, keep in mind that **you won't be able to get to use Cross-chain Subgraph Handling or Automatic Pagination, which are core features for querying The Graph**. +Cependant, si vous choisissez d'utiliser un autre client, gardez à l'esprit que **vous ne pourrez pas utiliser la gestion des subgraphs inter-chaînes ou la pagination automatique, qui sont des fonctionnalités essentielles pour les requêtes. Le graph**. ### Apollo client -[Apollo client](https://www.apollographql.com/docs/) is the ubiquitous GraphQL client on the front-end ecosystem. +Le [Client Apollo](https://www.apollographql.com/docs/) est le client GraphQL omniprésent dans l'écosystème front-end. -Available for React, Angular, Vue, Ember, iOS, and Android, Apollo Client, although the heaviest client, brings many features to build advanced UI on top of GraphQL: +Disponible pour React, Angular, Vue, Ember, iOS et Android, Apollo Client, bien que le client le plus lourd, apporte de nombreuses fonctionnalités pour créer une interface utilisateur avancée sur GraphQL : -- advanced error handling +- gestion avancée des erreurs - pagination - data prefetching - optimistic UI -- local state management +- gestion de l'État local -Let's look at how to fetch data from a subgraph with Apollo client in a web project. +Voyons comment récupérer les données d'un subgraph avec le client Apollo dans un projet Web. -First, install `@apollo/client` and `graphql`: +Tout d'abord, installez `@apollo/client` et `graphql` : ```sh npm install @apollo/client graphql ``` -Then you can query the API with the following code: +Ensuite, vous pouvez interroger l'API avec le code suivant : ```javascript import { ApolloClient, InMemoryCache, gql } from '@apollo/client' @@ -193,7 +191,7 @@ client }) ``` -To use variables, you can pass in a `variables` argument to the query: +Pour utiliser des variables, vous pouvez transmettre un argument `variables` à la requête : ```javascript const tokensQuery = ` @@ -226,22 +224,22 @@ client ### URQL -Another option is [URQL](https://formidable.com/open-source/urql/) which is available within Node.js, React/Preact, Vue, and Svelte environments, with more advanced features: +Une autre option est [URQL](https://formidable.com/open-source/urql/) qui est disponible dans les environnements Node.js, React/Preact, Vue et Svelte, avec des fonctionnalités plus avancées. caractéristiques: -- Flexible cache system -- Extensible design (easing adding new capabilities on top of it) -- Lightweight bundle (~5x lighter than Apollo Client) -- Support for file uploads and offline mode +- Système de cache flexible +- Conception extensible (facilitant l’ajout de nouvelles fonctionnalités par-dessus) +- Offre légère (~ 5 fois plus légère que Apollo Client) +- Prise en charge des téléchargements de fichiers et du mode hors ligne -Let's look at how to fetch data from a subgraph with URQL in a web project. +Voyons comment récupérer les données d'un subgraph avec URQL dans un projet Web. -First, install `urql` and `graphql`: +Tout d'abord, installez `urql` et `graphql` : ```sh npm install urql graphql ``` -Then you can query the API with the following code: +Ensuite, vous pouvez interroger l'API avec le code suivant : ```javascript import { createClient } from 'urql' From 93e73305174ac15d1ef5ab0c8788da71d641b57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:21 -0400 Subject: [PATCH 272/924] New translations querying-from-an-application.mdx (Czech) --- .../querying/querying-from-an-application.mdx | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/website/pages/cs/querying/querying-from-an-application.mdx b/website/pages/cs/querying/querying-from-an-application.mdx index 30b6c2264d64..9e15c2409837 100644 --- a/website/pages/cs/querying/querying-from-an-application.mdx +++ b/website/pages/cs/querying/querying-from-an-application.mdx @@ -1,43 +1,43 @@ --- -title: Querying from an Application +title: Dotazování z aplikace --- -Once a subgraph is deployed to the Subgraph Studio or to The Graph Explorer, you will be given the endpoint for your GraphQL API that should look something like this: +Po nasazení podgrafu do podgraf Studio nebo do Průzkumníka grafů se zobrazí koncový bod GraphQL API, který by měl vypadat následovně: -**Subgraph Studio (testing endpoint)** +**Podgraf Studio (testovací koncový bod)** ```sh Queries (HTTP) https://api.studio.thegraph.com/query/// ``` -**Graph Explorer** +**Průzkumník grafů** ```sh Queries (HTTP) https://gateway.thegraph.com/api//subgraphs/id/ ``` -Using the GraphQL endpoint, you can use various GraphQL Client libraries to query the subgraph and populate your app with the data indexed by the subgraph. +Pomocí koncového bodu GraphQL můžete použít různé knihovny GraphQL Client k dotazování podgrafu a naplnění aplikace daty indexovanými podgraf. -Here are a couple of the more popular GraphQL clients in the ecosystem and how to use them: +Zde je několik nejoblíbenějších klientů GraphQL v ekosystému a návod, jak je používat: -## GraphQL clients +## Klienti GraphQL -### Graph client +### Graf klient -The Graph is providing it own GraphQL client, `graph-client` that supports unique features such as: +Graf poskytuje vlastního klienta GraphQL, `graph-client`, který podporuje jedinečné funkce, jako jsou: -- Cross-chain Subgraph Handling: Querying from multiple subgraphs in a single query -- [Automatic Block Tracking](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) -- [Automatic Pagination](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) -- Fully typed result +- Manipulace s podgrafy napříč řetězci: Dotazování z více podgrafů v jednom dotazu +- [Automatické sledování](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) +- [Automatické stránkování](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) +- Plně zadaný výsledekv -Also integrated with popular GraphQL clients such as Apollo and URQL and compatible with all environments (React, Angular, Node.js, React Native), using `graph-client` will give you the best experience for interacting with The Graph. +Je také integrován s populárními klienty GraphQL, jako jsou Apollo a URQL, a je kompatibilní se všemi prostředími (React, Angular, Node.js, React Native).Použití `graph-client` vám poskytne nejlepší zážitek z interakce s Graf. -Let's look at how to fetch data from a subgraph with `graphql-client`. +Podívejme se, jak načíst data z podgrafu pomocí `graphql-client`. -To get started, make sure to install The Graph Client CLI in your project: +Chcete-li začít, nezapomeňte si do projektu nainstalovat Graf Client CLI: ```sh yarn add -D @graphprotocol/client-cli @@ -45,7 +45,7 @@ yarn add -D @graphprotocol/client-cli npm install --save-dev @graphprotocol/client-cli ``` -Define your query in a `.graphql` file (or inlined in your `.js` or `.ts` file): +Definujte svůj dotaz v souboru `.graphql` (nebo v souboru `.js` nebo `.ts`): ```graphql query ExampleQuery { @@ -72,7 +72,7 @@ query ExampleQuery { } ``` -Then, create a configuration file (called `.graphclientrc.yml`) and point to your GraphQL endpoints provided by The Graph, for example: +Poté vytvořte konfigurační soubor (nazvaný `.graphclientrc.yml`) a odkažte v něm například na koncové body GraphQL poskytnuté službou Graf: ```yaml # .graphclientrc.yml @@ -90,13 +90,13 @@ documents: - ./src/example-query.graphql ``` -Running the following The Graph Client CLI command will generate typed and ready to use JavaScript code: +Spuštěním následujícího příkazu Graf Client CLI se vygeneruje kód JavaScriptu připravený k použití: ```sh graphclient build ``` -Finally, update your `.ts` file to use the generated typed GraphQL documents: +Nakonec aktualizujte soubor `.ts` tak, aby používal vygenerované dokumenty GraphQL: ```tsx import React, { useEffect } from 'react' @@ -134,27 +134,27 @@ function App() { export default App ``` -**⚠️ Important notice** +**⚠️ Důležité upozornění** -`graph-client` is perfectly integrated with other GraphQL clients such as Apollo client, URQL, or React Query; you will [find examples in the official repository](https://github.com/graphprotocol/graph-client/tree/main/examples). +`graph-client` je dokonale integrován s dalšími klienty GraphQL, jako je klient Apollo, URQL nebo React Query; [příklady najdete v oficiálním repozitáři](https://github.com/graphprotocol/graph-client/tree/main/examples). -However, if you choose to go with another client, keep in mind that **you won't be able to get to use Cross-chain Subgraph Handling or Automatic Pagination, which are core features for querying The Graph**. +Pokud se však rozhodnete pro jiného klienta, mějte na paměti, že **nebudete moci používat funkci Cross-chain podgraf Obsluha nebo Automatické pagination, což jsou základní funkce pro dotazování v Grafu**. -### Apollo client +### Klient Apollo -[Apollo client](https://www.apollographql.com/docs/) is the ubiquitous GraphQL client on the front-end ecosystem. +[Klient Apollo](https://www.apollographql.com/docs/) je všudypřítomný klient GraphQL v ekosystému front-end. -Available for React, Angular, Vue, Ember, iOS, and Android, Apollo Client, although the heaviest client, brings many features to build advanced UI on top of GraphQL: +Klient Apollo je k dispozici pro React, Angular, Vue, Ember, iOS a Android, ačkoli je nejtěžším klientem, přináší mnoho funkcí pro budování pokročilého UI na základě GraphQL: -- advanced error handling -- pagination -- data prefetching -- optimistic UI -- local state management +- pokročilé zpracování chyb +- stránkování +- přednačítání dat +- optimistické UI +- místní státní správa -Let's look at how to fetch data from a subgraph with Apollo client in a web project. +Podívejme se, jak načíst data z podgrafu pomocí klienta Apollo ve web projektu. -First, install `@apollo/client` and `graphql`: +Nejprve nainstalujte `@apollo/client` a `graphql`: ```sh npm install @apollo/client graphql From a1c35d791762197fc2f6174eabda65cab0ac9964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:22 -0400 Subject: [PATCH 273/924] New translations querying-from-an-application.mdx (Italian) --- .../querying/querying-from-an-application.mdx | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/website/pages/it/querying/querying-from-an-application.mdx b/website/pages/it/querying/querying-from-an-application.mdx index 30b6c2264d64..27ca605e2bb5 100644 --- a/website/pages/it/querying/querying-from-an-application.mdx +++ b/website/pages/it/querying/querying-from-an-application.mdx @@ -1,10 +1,10 @@ --- -title: Querying from an Application +title: Eseguire una query da un'applicazione --- -Once a subgraph is deployed to the Subgraph Studio or to The Graph Explorer, you will be given the endpoint for your GraphQL API that should look something like this: +Una volta che un subgraph è stato distribuito in Subgraph Studio o in The Graph Explorer, verrà fornito l'endpoint per l'API GraphQL, che dovrebbe avere un aspetto simile a questo: -**Subgraph Studio (testing endpoint)** +**Subgraph Studio (endpoint di test)** ```sh Queries (HTTP) @@ -18,26 +18,26 @@ Queries (HTTP) https://gateway.thegraph.com/api//subgraphs/id/ ``` -Using the GraphQL endpoint, you can use various GraphQL Client libraries to query the subgraph and populate your app with the data indexed by the subgraph. +Utilizzando il GraphQL endpoint, si possono usare varie librerie GraphQL Client per interrogare il subgraph e popolare l'applicazione con i dati indicizzati dal subgraph. -Here are a couple of the more popular GraphQL clients in the ecosystem and how to use them: +Ecco un paio dei GraphQL client più diffusi nell'ecosistema e come utilizzarli: -## GraphQL clients +## I GraphQL client ### Graph client -The Graph is providing it own GraphQL client, `graph-client` that supports unique features such as: +The Graph fornisce il proprio client GraphQL, `graph-client`, che supporta caratteristiche uniche come: -- Cross-chain Subgraph Handling: Querying from multiple subgraphs in a single query -- [Automatic Block Tracking](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) -- [Automatic Pagination](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) -- Fully typed result +- Gestione dei subgraph a cross-chain: effettuare query di più subgraph in un'unica query +- [Tracciamento automatico dei blocchi](https://github.com/graphprotocol/graph-client/blob/main/packages/block-tracking/README.md) +- [Paginazione automatica](https://github.com/graphprotocol/graph-client/blob/main/packages/auto-pagination/README.md) +- Risultato completamente tipizzato -Also integrated with popular GraphQL clients such as Apollo and URQL and compatible with all environments (React, Angular, Node.js, React Native), using `graph-client` will give you the best experience for interacting with The Graph. +Integrato anche con i client GraphQL più diffusi, come Apollo e URQL, e compatibile con tutti gli ambienti (React, Angular, Node.js, React Native), l'uso di `graph-client` vi darà la migliore esperienza di interazione con The Graph. -Let's look at how to fetch data from a subgraph with `graphql-client`. +Vediamo come recuperare i dati da un subgraph con `graphql-client`. -To get started, make sure to install The Graph Client CLI in your project: +Per iniziare, assicuratevi di installare il Graph Client CLI nel vostro progetto: ```sh yarn add -D @graphprotocol/client-cli @@ -45,7 +45,7 @@ yarn add -D @graphprotocol/client-cli npm install --save-dev @graphprotocol/client-cli ``` -Define your query in a `.graphql` file (or inlined in your `.js` or `.ts` file): +Definire la query in un file `.graphql` (o in un file `.js` o `.ts`): ```graphql query ExampleQuery { @@ -72,7 +72,7 @@ query ExampleQuery { } ``` -Then, create a configuration file (called `.graphclientrc.yml`) and point to your GraphQL endpoints provided by The Graph, for example: +Quindi, creare un file di configurazione (chiamato `.graphclientrc.yml`) e puntare agli endpoint GraphQL forniti da The Graph, ad esempio: ```yaml # .graphclientrc.yml @@ -90,13 +90,13 @@ documents: - ./src/example-query.graphql ``` -Running the following The Graph Client CLI command will generate typed and ready to use JavaScript code: +L'esecuzione del seguente comando The Graph Client CLI genererà codice JavaScript digitato e pronto all'uso: ```sh graphclient build ``` -Finally, update your `.ts` file to use the generated typed GraphQL documents: +Infine, aggiornare il file `.ts` per utilizzare i documenti GraphQL digitati generati: ```tsx import React, { useEffect } from 'react' @@ -134,33 +134,33 @@ function App() { export default App ``` -**⚠️ Important notice** +**⚠️ Avviso importante** -`graph-client` is perfectly integrated with other GraphQL clients such as Apollo client, URQL, or React Query; you will [find examples in the official repository](https://github.com/graphprotocol/graph-client/tree/main/examples). +`graph-client` è perfettamente integrato con altri client GraphQL come Apollo client, URQL o React Query; troverete degli esempi nel repository ufficiale. -However, if you choose to go with another client, keep in mind that **you won't be able to get to use Cross-chain Subgraph Handling or Automatic Pagination, which are core features for querying The Graph**. +Tuttavia, se scegliete un altro client, tenete presente che **non sarete in grado di utilizzare la gestione dei Subgraph Cross-chain o la Paginazione Automatica, che sono caratteristiche fondamentali per effettuare query di The Graph**. -### Apollo client +### Client Apollo -[Apollo client](https://www.apollographql.com/docs/) is the ubiquitous GraphQL client on the front-end ecosystem. +[Client Apollo](https://www.apollographql.com/docs/) è il client GraphQL onnipresente nell'ecosistema front-end. -Available for React, Angular, Vue, Ember, iOS, and Android, Apollo Client, although the heaviest client, brings many features to build advanced UI on top of GraphQL: +Disponibile per React, Angular, Vue, Ember, iOS e Android, Apollo Client, sebbene sia il client più pesante, offre molte funzionalità per costruire UI avanzate in cima a GraphQL: -- advanced error handling -- pagination -- data prefetching -- optimistic UI -- local state management +- gestione avanzata degli errori +- paginazione +- prefetching dei dati +- UI ottimistica +- gestione statale locale -Let's look at how to fetch data from a subgraph with Apollo client in a web project. +Vediamo come recuperare i dati da un subgraph con il Apollo client in un progetto web. -First, install `@apollo/client` and `graphql`: +Per prima cosa, installare `@apollo/client` e `graphql`: ```sh npm install @apollo/client graphql ``` -Then you can query the API with the following code: +Quindi è possibile effettuare query del'API con il seguente codice: ```javascript import { ApolloClient, InMemoryCache, gql } from '@apollo/client' @@ -193,7 +193,7 @@ client }) ``` -To use variables, you can pass in a `variables` argument to the query: +Per usare le variabili, si può passare un argomento `variables` alla query: ```javascript const tokensQuery = ` @@ -226,22 +226,22 @@ client ### URQL -Another option is [URQL](https://formidable.com/open-source/urql/) which is available within Node.js, React/Preact, Vue, and Svelte environments, with more advanced features: +Un'altra opzione è [URQL](https://formidable.com/open-source/urql/), disponibile negli ambienti Node.js, React/Preact, Vue e Svelte, con caratteristiche più avanzate: -- Flexible cache system -- Extensible design (easing adding new capabilities on top of it) -- Lightweight bundle (~5x lighter than Apollo Client) -- Support for file uploads and offline mode +- Sistema di cache flessibile +- Design estensibile (facilita l'aggiunta di nuove funzionalità) +- Bundle leggero (~5 volte più leggero del Apollo Сlient) +- Supporto per il caricamento di file e la modalità offline -Let's look at how to fetch data from a subgraph with URQL in a web project. +Vediamo come recuperare i dati da un subgraph con il URQL in un progetto web. -First, install `urql` and `graphql`: +Per prima cosa, installare `urql` e `graphql`: ```sh npm install urql graphql ``` -Then you can query the API with the following code: +Quindi è possibile effettuare query del'API con il seguente codice: ```javascript import { createClient } from 'urql' From 23d4ab2ca3694cc4de8ba1c4556c7383204b82ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:25 -0400 Subject: [PATCH 274/924] New translations querying-from-an-application.mdx (Dutch) --- website/pages/nl/querying/querying-from-an-application.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/nl/querying/querying-from-an-application.mdx b/website/pages/nl/querying/querying-from-an-application.mdx index 30b6c2264d64..9b1f6be741c7 100644 --- a/website/pages/nl/querying/querying-from-an-application.mdx +++ b/website/pages/nl/querying/querying-from-an-application.mdx @@ -11,7 +11,7 @@ Queries (HTTP) https://api.studio.thegraph.com/query/// ``` -**Graph Explorer** +**Graph Verkenner** ```sh Queries (HTTP) From 4dbadeb1ecb82db1b6e8d27a93a63b58979dafc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:26 -0400 Subject: [PATCH 275/924] New translations querying-from-an-application.mdx (Portuguese) --- website/pages/pt/querying/querying-from-an-application.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pt/querying/querying-from-an-application.mdx b/website/pages/pt/querying/querying-from-an-application.mdx index de13777f23d5..6cea3da1b2c0 100644 --- a/website/pages/pt/querying/querying-from-an-application.mdx +++ b/website/pages/pt/querying/querying-from-an-application.mdx @@ -102,7 +102,7 @@ Finalmente, atualize o seu arquivo `.ts` para usar os documentos digitados em Gr import React, { useEffect } from 'react' // ... // nós importamos tipos e documentos em graphql do código gerado -;`..graphclient/` +(`..graphclient/`) import { ExampleQueryDocument, ExampleQueryQuery, execute } from '../.graphclient' function App() { From aa58105e3b3e60056d3357106c559d875805159f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:28 -0400 Subject: [PATCH 276/924] New translations querying-from-an-application.mdx (Swedish) --- .../querying/querying-from-an-application.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/sv/querying/querying-from-an-application.mdx b/website/pages/sv/querying/querying-from-an-application.mdx index b25e2b3868c0..4ddf84530e0a 100644 --- a/website/pages/sv/querying/querying-from-an-application.mdx +++ b/website/pages/sv/querying/querying-from-an-application.mdx @@ -163,9 +163,9 @@ npm install @apollo/client graphql Sedan kan du göra en förfrågan till API:et med följande kod: ```javascript -import { ApolloClient, InMemoryCache, gql } from '@apollo/client' +import { ApolloClient, InMemoryCache, gql } from "@apollo/client"; -const APIURL = 'https://api.studio.thegraph.com/query///' +const APIURL = "https://api.studio.thegraph.com/query///"; const tokensQuery = ` query { @@ -176,20 +176,20 @@ const tokensQuery = ` metadataURI } } -` +`; const client = new ApolloClient({ uri: APIURL, cache: new InMemoryCache(), -}) +}); client .query({ query: gql(tokensQuery), }) - .then((data) => console.log('Subgraph data: ', data)) + .then((data) => console.log("Subgraph data: ", data)) .catch((err) => { - console.log('Error fetching data: ', err) + console.log("Error fetching data: ", err); }) ``` @@ -207,20 +207,20 @@ const tokensQuery = ` metadataURI } } -` +`; client .query({ query: gql(tokensQuery), variables: { first: 10, - orderBy: 'createdAtTimestamp', - orderDirection: 'desc', + orderBy: "createdAtTimestamp", + orderDirection: "desc", }, }) - .then((data) => console.log('Subgraph data: ', data)) + .then((data) => console.log("Subgraph data: ", data)) .catch((err) => { - console.log('Error fetching data: ', err) + console.log("Error fetching data: ", err); }) ``` @@ -244,9 +244,9 @@ npm install urql graphql Sedan kan du göra en förfrågan till API:et med följande kod: ```javascript -import { createClient } from 'urql' +import { createClient } from "urql"; -const APIURL = 'https://api.thegraph.com/subgraphs/name/username/subgraphname' +const APIURL = "https://api.thegraph.com/subgraphs/name/username/subgraphname"; const tokensQuery = ` query { @@ -257,11 +257,11 @@ const tokensQuery = ` metadataURI } } -` +`; const client = createClient({ url: APIURL, -}) +}); const data = await client.query(tokensQuery).toPromise() ``` From 512dbe94b0b883823ed6866a07d3eb42652af3c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:30 -0400 Subject: [PATCH 277/924] New translations querying-from-an-application.mdx (Chinese Simplified) --- website/pages/zh/querying/querying-from-an-application.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/zh/querying/querying-from-an-application.mdx b/website/pages/zh/querying/querying-from-an-application.mdx index 19fa3993f822..a1dc6a802995 100644 --- a/website/pages/zh/querying/querying-from-an-application.mdx +++ b/website/pages/zh/querying/querying-from-an-application.mdx @@ -90,7 +90,7 @@ documents: - ./src/example-query.graphql ``` -Running the following The Graph Client CLI command will generate typed and ready to use JavaScript code: +运行以下 Graph Client CLI 命令将生成类型化的并可以投入使用 的JavaScript 代码: ```sh graphclient build From c80dd1d3bff8cdf4506b76258ec8596519bceb28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:35 -0400 Subject: [PATCH 278/924] New translations querying-the-graph.mdx (French) --- .../pages/fr/querying/querying-the-graph.mdx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/website/pages/fr/querying/querying-the-graph.mdx b/website/pages/fr/querying/querying-the-graph.mdx index 0c044b152622..61c24831e1fd 100644 --- a/website/pages/fr/querying/querying-the-graph.mdx +++ b/website/pages/fr/querying/querying-the-graph.mdx @@ -1,14 +1,14 @@ --- -title: Querying The Graph +title: Interroger The Graph --- -With the subgraph deployed, visit the [Graph Explorer](https://thegraph.com/explorer) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. +Une fois le subgraph déployé, visitez l'[Graph Explorer](https://thegraph.com/explorer) pour ouvrir un GraphiQL où vous pouvez explorer l'API GraphQL déployée pour le subgraph en émettant des requêtes et en affichant le schéma. -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. +Un exemple est fourni ci-dessous, mais veuillez consulter l'[API de requête](/querying/graphql-api) pour une référence complète sur la façon d'interroger les entités du subgraph. ## Exemple -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: +Cette requête répertorie tous les compteurs créés par notre mappage. Puisque nous n'en créons qu'un, le résultat ne contiendra qu'un seul `compteur par défaut` : ```graphql { @@ -19,14 +19,14 @@ This query lists all the counters our mapping has created. Since we only create } ``` -## Using The Graph Explorer +## Utilisation de The Graph Explorer -Each subgraph published to the decentralized Graph Explorer has a unique query URL that you can find by navigating to the subgraph details page and clicking on the "Query" button on the top right corner. This will open a side pane that will give you the unique query URL of the subgraph as well as some instructions about how to query it. +Chaque subgraph publié sur l'explorateur de graphiques décentralisé possède une URL de requête unique que vous pouvez trouver en accédant à la page de détails du subgraph et en cliquant sur le bouton « Requête » dans le coin supérieur droit. Cela ouvrira un volet latéral qui vous donnera l'URL de requête unique du subgraph ainsi que quelques instructions sur la façon de l'interroger. -![Query Subgraph Pane](/img/query-subgraph-pane.png) +![Vous pouvez également utiliser le terrain de jeu GraphQL dans l'onglet « Terrain de jeu » pour interroger un subgraph dans The Graph Explorer](/img/query-subgraph-pane.png) -As you can notice, this query URL must use a unique API key. You can create and manage your API keys in the [Subgraph Studio](https://thegraph.com/studio) in the "API Keys" section. Learn more about how to use Subgraph Studio [here](/deploying/subgraph-studio). +Comme vous pouvez le constater, cette URL de requête doit utiliser une clé API unique. Vous pouvez créer et gérer vos clés API dans [Subgraph Studio](https://thegraph.com/studio) dans la section "Clés API". Apprenez-en davantage sur l'utilisation de Subgraph Studio [ici](/deploying/subgraph-studio). -Querying subgraphs using your API keys will generate query fees that will be paid in GRT. You can learn more about billing [here](/billing). +L'interrogation de subgraphs à l'aide de vos clés API générera des frais de requête qui seront payés en GRT. Vous pouvez en savoir plus sur la facturation [ici](/billing). -You can also use the GraphQL playground in the "Playground" tab to query a subgraph within The Graph Explorer. +Vous pouvez également utiliser le terrain de jeu GraphQL dans l'onglet « Terrain de jeu » pour interroger un subgraph dans The Graph Explorer. From 977bcd1d9c97ecb5efa9456f3e5782356cd909e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:37 -0400 Subject: [PATCH 279/924] New translations querying-the-graph.mdx (Czech) --- .../pages/cs/querying/querying-the-graph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/cs/querying/querying-the-graph.mdx b/website/pages/cs/querying/querying-the-graph.mdx index af9dcaaf2477..1f725b18b1d7 100644 --- a/website/pages/cs/querying/querying-the-graph.mdx +++ b/website/pages/cs/querying/querying-the-graph.mdx @@ -1,14 +1,14 @@ --- -title: Querying The Graph +title: Dotazování na graf --- -With the subgraph deployed, visit the [Graph Explorer](https://thegraph.com/explorer) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. +Po nasazení podgrafu navštivte [Graph Explorer](https://thegraph.com/explorer) a otevřete rozhraní [GraphiQL](https://github.com/graphql/graphiql), kde můžete prozkoumat nasazené rozhraní GraphQL API pro podgraf zadáváním dotazů a zobrazením schéma. -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. +Níže je uveden příklad, ale kompletní informace o tom, jak se dotazovat na entity podgrafu, najdete v [Query API](/querying/graphql-api). -## Example +## Příklad -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: +Tento dotaz obsahuje seznam všech čítačů, které naše mapování vytvořilo. Protože jsme vytvořili pouze jeden, výsledek bude obsahovat pouze náš jeden `default-counter`: ```graphql { @@ -19,14 +19,14 @@ This query lists all the counters our mapping has created. Since we only create } ``` -## Using The Graph Explorer +## Používání Průzkumníka grafů -Each subgraph published to the decentralized Graph Explorer has a unique query URL that you can find by navigating to the subgraph details page and clicking on the "Query" button on the top right corner. This will open a side pane that will give you the unique query URL of the subgraph as well as some instructions about how to query it. +Každý podgraf publikovaný v decentralizovaném Průzkumníku grafů má jedinečnou adresu URL dotazu, kterou najdete po přechodu na stránku s podrobnostmi o podgrafu a kliknutím na tlačítko "Dotaz" v pravém horním rohu. Tím se otevře postranní panel, který vám poskytne jedinečnou adresu URL dotazu podgrafu a také několik pokynů, jak se na něj dotazovat. -![Query Subgraph Pane](/img/query-subgraph-pane.png) +![Podokno podgrafů dotazů](/img/query-subgraph-pane.png) -As you can notice, this query URL must use a unique API key. You can create and manage your API keys in the [Subgraph Studio](https://thegraph.com/studio) in the "API Keys" section. Learn more about how to use Subgraph Studio [here](/deploying/subgraph-studio). +Jak si můžete všimnout, tato adresa URL dotazu musí používat jedinečný klíč API. Klíče API můžete vytvářet a spravovat v [podgraf Studio](https://thegraph.com/studio) v části "Klíče API". Více informací o tom, jak používat aplikaci Subgraph Studio, se dozvíte [zde](/deploying/subgraph-studio). -Querying subgraphs using your API keys will generate query fees that will be paid in GRT. You can learn more about billing [here](/billing). +Dotazování na podgrafy pomocí vašich klíčů API bude generovat poplatky za dotazování, které se platí v GRT. Více informací o účtování se dozvíte [zde](/billing). -You can also use the GraphQL playground in the "Playground" tab to query a subgraph within The Graph Explorer. +K dotazování podgrafu v rámci Průzkumníka grafu můžete také použít hřiště GraphQL na kartě "Hřiště". From 6d68455d2597eb89acd3a87514d535580121d39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:38 -0400 Subject: [PATCH 280/924] New translations querying-the-graph.mdx (Italian) --- .../pages/it/querying/querying-the-graph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/it/querying/querying-the-graph.mdx b/website/pages/it/querying/querying-the-graph.mdx index af9dcaaf2477..b1e719738a6c 100644 --- a/website/pages/it/querying/querying-the-graph.mdx +++ b/website/pages/it/querying/querying-the-graph.mdx @@ -1,14 +1,14 @@ --- -title: Querying The Graph +title: Effettuare query di The Graph --- -With the subgraph deployed, visit the [Graph Explorer](https://thegraph.com/explorer) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. +Con il subgraph distribuito, visitare il [Graph Explorer](https://thegraph.com/explorer) per aprire un'interfaccia [GraphiQL](https://github.com/graphql/graphiql) in cui è possibile esplorare l'API GraphQL distribuita per il subgraph, emettendo query e visualizzando lo schema. -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. +Di seguito viene fornito un esempio, ma si rimanda alla pagina [Query API](/querying/graphql-api) per un riferimento completo su come effettuare query delle entità del subgraph. -## Example +## Esempio -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: +Questa query elenca tutti i contatori creati dalla nostra mapping. Poiché ne creiamo solo uno, il risultato conterrà solo il nostro `default-counter`: ```graphql { @@ -19,14 +19,14 @@ This query lists all the counters our mapping has created. Since we only create } ``` -## Using The Graph Explorer +## Utilizzo di The Graph Explorer -Each subgraph published to the decentralized Graph Explorer has a unique query URL that you can find by navigating to the subgraph details page and clicking on the "Query" button on the top right corner. This will open a side pane that will give you the unique query URL of the subgraph as well as some instructions about how to query it. +Ogni subgraph pubblicato sul Graph Explorer decentralizzato ha un URL di query unico che si può trovare navigando nella pagina dei dettagli del subgraph e facendo clic sul pulsante "Query" nell'angolo in alto a destra. Si aprirà un riquadro laterale che fornirà l'URL di query unico del subgraph e alcune istruzioni su come effettuare query. -![Query Subgraph Pane](/img/query-subgraph-pane.png) +![Riquadro del Subgraph della Query](/img/query-subgraph-pane.png) -As you can notice, this query URL must use a unique API key. You can create and manage your API keys in the [Subgraph Studio](https://thegraph.com/studio) in the "API Keys" section. Learn more about how to use Subgraph Studio [here](/deploying/subgraph-studio). +Come si può notare, questo URL di query deve utilizzare una chiave API unica. È possibile creare e gestire le chiavi API nel [Subgraph Studio](https://thegraph.com/studio), nella sezione "Chiavi API". Per saperne di più su come utilizzare Subgraph Studio, cliccate [qui](/deploying/subgraph-studio). -Querying subgraphs using your API keys will generate query fees that will be paid in GRT. You can learn more about billing [here](/billing). +Effettuare query dei subgraph utilizzando le chiavi API genera tariffe di query che saranno pagate in GRT. Per saperne di più sulla fatturazione, cliccare [qui](/billing). -You can also use the GraphQL playground in the "Playground" tab to query a subgraph within The Graph Explorer. +È inoltre possibile utilizzare il GraphQL playground nella scheda "Playground" per effettuare query di un subgraph all'interno di Graph Explorer. From 38bcd22fafb0de409f12559c1e12882aec2a50bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:42 -0400 Subject: [PATCH 281/924] New translations querying-the-graph.mdx (Russian) --- .../pages/ru/querying/querying-the-graph.mdx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/website/pages/ru/querying/querying-the-graph.mdx b/website/pages/ru/querying/querying-the-graph.mdx index 39bfd2f0a3bd..f3f6fe18c1e3 100644 --- a/website/pages/ru/querying/querying-the-graph.mdx +++ b/website/pages/ru/querying/querying-the-graph.mdx @@ -1,14 +1,14 @@ --- -title: Querying The Graph +title: Запрос The Graph --- -With the subgraph deployed, visit the [Graph Explorer](https://thegraph.com/explorer) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. +После развертывания субграфа, посетите [Graph Explorer](https://thegraph.com/explorer), чтобы открыть интерфейс [GraphiQL](https://github.com/graphql/graphiql), в котором Вы сможете изучить развернутый API GraphQL для субграфа, отправляя запросы и просматривая схему. -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. +Пример приведен ниже, но полную информацию о том, как выполнять запросы к объектам субграфа, можно найти в [Query API](/querying/graphql-api). ## Пример -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: +В этом запросе перечислены все счетчики, созданные нашим сопоставлением. Поскольку мы создаем только один, результат будет содержать только один наш `default-counter`: ```graphql { @@ -19,14 +19,14 @@ This query lists all the counters our mapping has created. Since we only create } ``` -## Using The Graph Explorer +## Использование The Graph Explorer -Each subgraph published to the decentralized Graph Explorer has a unique query URL that you can find by navigating to the subgraph details page and clicking on the "Query" button on the top right corner. This will open a side pane that will give you the unique query URL of the subgraph as well as some instructions about how to query it. +Каждый субграф, опубликованный в децентрализованном Graph Explorer, имеет уникальный URL-адрес запроса, который Вы можете найти, перейдя на страницу сведений о субграфе и нажав на кнопку "Запрос" в верхнем правом углу. Откроется боковая панель, которая предоставит Вам уникальный URL-адрес запроса субграфа, а также некоторые инструкции о том, как его запросить. -![Query Subgraph Pane](/img/query-subgraph-pane.png) +![Панель запроса субграфа](/img/query-subgraph-pane.png) -As you can notice, this query URL must use a unique API key. You can create and manage your API keys in the [Subgraph Studio](https://thegraph.com/studio) in the "API Keys" section. Learn more about how to use Subgraph Studio [here](/deploying/subgraph-studio). +Как Вы можете заметить, этот URL-адрес запроса должен использовать уникальный API-ключ. Вы можете создавать и управлять своими API-ключами в [Subgraph Studio](https://thegraph.com/studio) в разделе "API-ключи". Узнайте больше о том, как использовать Subgraph Studio [здесь](/deploying/subgraph-studio). -Querying subgraphs using your API keys will generate query fees that will be paid in GRT. You can learn more about billing [here](/billing). +При запросе субграфов с использованием Ваших API-ключей будет взиматься комиссия за запрос, которая будет выплачиваться в GRT. Подробнее о выставлении счетов можно узнать [здесь](/billing). -You can also use the GraphQL playground in the "Playground" tab to query a subgraph within The Graph Explorer. +Вы также можете использовать игровую площадку GraphQL на вкладке «Площадка» для запроса субграфа в The Graph Explorer. From 4a38a0205be1d757222d0475c93ff5f7480c6d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:48 -0400 Subject: [PATCH 282/924] New translations assemblyscript-migration-guide.mdx (Romanian) --- .../ro/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From debba03ae1ed83f546e635dfc55c6ab9c8a04ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:49 -0400 Subject: [PATCH 283/924] New translations assemblyscript-migration-guide.mdx (French) --- .../assemblyscript-migration-guide.mdx | 250 +++++++++--------- 1 file changed, 122 insertions(+), 128 deletions(-) diff --git a/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx index 19878b0ca508..e782a13b7e2b 100644 --- a/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx @@ -2,49 +2,49 @@ title: AssemblyScript Migration Guide --- -Up until now, subgraphs have been using one of the [first versions of AssemblyScript](https://github.com/AssemblyScript/assemblyscript/tree/v0.6) (v0.6). Finally we've added support for the [newest one available](https://github.com/AssemblyScript/assemblyscript/tree/v0.19.10) (v0.19.10)! 🎉 +Jusqu'à présent, les subgraphs utilisaient l'une des [premières versions d'AssemblyScript](https://github.com/AssemblyScript/assemblyscript/tree/v0.6) (v0.6). Enfin, nous avons ajouté la prise en charge du [le plus récent disponible](https://github.com/AssemblyScript/assemblyscript/tree/v0.19.10) (v0.19.10) ! 🎉 -That will enable subgraph developers to use newer features of the AS language and standard library. +Cela permettra aux développeurs de subgraph d'utiliser les nouvelles fonctionnalités du langage AS et de la bibliothèque standard. -This guide is applicable for anyone using `graph-cli`/`graph-ts` below version `0.22.0`. If you're already at a higher than (or equal) version to that, you've already been using version `0.19.10` of AssemblyScript 🙂 +Ce guide s'applique à toute personne utilisant `graph-cli`/`graph-ts` sous la version `0.22.0`. Si vous utilisez déjà une version supérieure (ou égale), vous utilisez déjà la version `0.19.10` d'AssemblyScript 🙂 -> Note: As of `0.24.0`, `graph-node` can support both versions, depending on the `apiVersion` specified in the subgraph manifest. +> Remarque : Depuis `0.24.0`, `graph-node` peut prendre en charge les deux versions, en fonction de la `apiVersion` spécifiée dans le manifeste du subgraph. -## Features +## Fonctionnalités -### New functionality +### Nouvelle fonctionnalité -- `TypedArray`s can now be built from `ArrayBuffer`s by using the [new `wrap` static method](https://www.assemblyscript.org/stdlib/typedarray.html#static-members) ([v0.8.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.8.1)) -- New standard library functions: `String#toUpperCase`, `String#toLowerCase`, `String#localeCompare`and `TypedArray#set` ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) -- Added support for x instanceof GenericClass ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) -- Added `StaticArray`, a more efficient array variant ([v0.9.3](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.3)) -- Added `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -- Implemented `radix` argument on `Number#toString` ([v0.10.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.1)) -- Added support for separators in floating point literals ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) -- Added support for first class functions ([v0.14.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.0)) -- Add builtins: `i32/i64/f32/f64.add/sub/mul` ([v0.14.13](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.13)) -- Implement `Array/TypedArray/String#at` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) -- Added support for template literal strings ([v0.18.17](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.17)) -- Add `encodeURI(Component)` and `decodeURI(Component)` ([v0.18.27](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.27)) -- Add `toString`, `toDateString` and `toTimeString` to `Date` ([v0.18.29](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.29)) -- Add `toUTCString` for `Date` ([v0.18.30](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.30)) -- Add `nonnull/NonNullable` builtin type ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) +- Les `TypedArray` peuvent désormais être construits à partir de `ArrayBuffer` en utilisant les [nouvelle méthode statique `wrap`](https://www.assemblyscript.org/stdlib/typedarray.html#static-members) ([v0.8.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.8.1)) +- Nouvelles fonctions de bibliothèque standard: `String#toUpperCase`, `String#toLowerCase`, `String#localeCompare`and `TypedArray#set` ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) +- Ajout de la prise en charge de x instanceof GenericClass ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) +- Ajout de `StaticArray`, une variante de tableau plus efficace ([v0.9.3](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.3)) +- Ajout de `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) +- Implémentation de `radix` argument on `Number#toString` ([v0.10.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.1)) +- Ajout de la prise en charge des séparateurs dans les littéraux à virgule flottante ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) +- Ajout du support pour les fonctions de première classe ([v0.14.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.0)) +- Ajout des fonctions intégrées : `i32/i64/f32/f64.add/sub/mul` ([v0.14.13](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.13)) +- Implementation de `Array/TypedArray/String#at` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) +- Ajout de la prise en charge des chaînes littérales de modèle ([v0.18.17](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.17)) +- Ajout de `encodeURI(Component)` et `decodeURI(Component)` ([v0.18.27](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.27)) +- Ajout de `toString`, `toDateString` et `toTimeString` à `Date` ([v0.18.29](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.29)) +- Ajout de `toUTCString` pour `Date` ([v0.18.30](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.30)) +- Ajout du type intégré `nonnull/NonNullable` ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) ### Optimizations -- `Math` functions such as `exp`, `exp2`, `log`, `log2` and `pow` have been replaced by faster variants ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) -- Slightly optimize `Math.mod` ([v0.17.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.1)) -- Cache more field accesses in std Map and Set ([v0.17.8](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.8)) -- Optimize for powers of two in `ipow32/64` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) +- Les fonctions `Math` telles que `exp`, `exp2`, `log`, `log2` et `pow` ont été remplacées par des variantes plus rapides ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) +- Légère optimisation de `Math.mod` ([v0.17.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.1)) +- Mise en cache de plus d'accès aux champs dans std Map et Set ([v0.17.8](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.8)) +- Optimiser pour des puissances de deux `ipow32/64` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) -### Other +### Autre -- The type of an array literal can now be inferred from its contents ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) -- Updated stdlib to Unicode 13.0.0 ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) +- Le type d'un littéral de tableau peut désormais être déduit de son contenu ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) +- Stdlib mis à jour vers Unicode 13.0.0 ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -## How to upgrade? +## Comment mettre à niveau ? -1. Change your mappings `apiVersion` in `subgraph.yaml` to `0.0.6`: +1. Modifiez vos mappages `apiVersion` dans `subgraph.yaml` en `0.0.6` : ```yaml ... @@ -56,30 +56,30 @@ dataSources: ... ``` -2. Update the `graph-cli` you're using to the `latest` version by running: +2. Mettez à jour le `graph-cli` que vous utilisez vers la version `dernière` en exécutant : ```bash -# if you have it globally installed +# si vous l'avez installé globalement npm install --global @graphprotocol/graph-cli@latest -# or in your subgraph if you have it as a dev dependency +# ou dans votre subgraph si vous l'avez comme dépendance de développement npm install --save-dev @graphprotocol/graph-cli@latest ``` -3. Do the same for `graph-ts`, but instead of installing globally, save it in your main dependencies: +3. Faites de même pour `graph-ts`, mais au lieu de l'installer globalement, enregistrez-le dans vos dépendances principales : ```bash npm install --save @graphprotocol/graph-ts@latest ``` -4. Follow the rest of the guide to fix the language breaking changes. -5. Run `codegen` and `deploy` again. +4. Suivez le reste du guide pour corriger les changements de langue. +5. Exécutez `codegen` et `deploy` à nouveau. -## Breaking changes +## Modifications radicales ### Nullability -On the older version of AssemblyScript, you could create code like this: +Sur l'ancienne version d'AssemblyScript, vous pouviez créer du code comme celui-ci : ```typescript function load(): Value | null { ... } @@ -88,17 +88,17 @@ let maybeValue = load(); maybeValue.aMethod(); ``` -However on the newer version, because the value is nullable, it requires you to check, like this: +Cependant, sur la version la plus récente, comme la valeur est nullable, vous devez vérifier, comme ceci : ```typescript let maybeValue = load() if (maybeValue) { - maybeValue.aMethod() // `maybeValue` is not null anymore + maybeValue.aMethod() // `maybeValue` n'est plus nul } ``` -Or force it like this: +Ou forcez-le comme ceci : ```typescript let maybeValue = load()! // breaks in runtime if value is null @@ -106,11 +106,11 @@ let maybeValue = load()! // breaks in runtime if value is null maybeValue.aMethod() ``` -If you are unsure which to choose, we recommend always using the safe version. If the value doesn't exist you might want to just do an early if statement with a return in you subgraph handler. +Si vous ne savez pas lequel choisir, nous vous recommandons de toujours utiliser la version sécurisée. Si la valeur n'existe pas, vous souhaiterez peut-être simplement effectuer une instruction if précoce avec un retour dans votre gestionnaire de subgraph. -### Variable Shadowing +### Ombrage variable -Before you could do [variable shadowing](https://en.wikipedia.org/wiki/Variable_shadowing) and code like this would work: +Avant de pouvoir faire de l'[observation de variables](https://en.wikipedia.org/wiki/Variable_shadowing) et un code comme celui-ci fonctionnerait : ```typescript let a = 10 @@ -118,7 +118,7 @@ let b = 20 let a = a + b ``` -However now this isn't possible anymore, and the compiler returns this error: +Cependant, cela n'est plus possible et le compilateur renvoie cette erreur : ```typescript ERROR TS2451: Cannot redeclare block-scoped variable 'a' @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - -You'll need to rename your duplicate variables if you had variable shadowing. - -### Null Comparisons - +Vous devrez renommer vos variables en double si vous conservez une observation de variables. +### Comparaisons nulles En effectuant la mise à niveau sur votre subgraph, vous pouvez parfois obtenir des erreurs comme celles-ci : ```typescript @@ -140,32 +137,31 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - -To solve you can simply change the `if` statement to something like this: +Pour résoudre, vous pouvez simplement remplacer l'instruction `if` par quelque chose comme ceci : ```typescript if (!decimals) { - // or + // ou bien if (decimals === null) { ``` -The same applies if you're doing != instead of ==. +La même chose s'applique si vous faites != au lieu de ==. ### Casting -The common way to do casting before was to just use the `as` keyword, like this: +Auparavant, la manière courante de faire du casting consistait simplement à utiliser le mot-clé `as`, comme ceci : ```typescript let byteArray = new ByteArray(10) let uint8Array = byteArray as Uint8Array // equivalent to: byteArray ``` -However this only works in two scenarios: +Cependant, cela ne fonctionne que dans deux scénarios : -- Primitive casting (between types such as `u8`, `i32`, `bool`; eg: `let b: isize = 10; b as usize`); -- Upcasting on class inheritance (subclass → superclass) +- Casting primitif (entre des types tels que `u8`, `i32`, `bool` ; par exemple : `let b : isize = 10 ; b as usize`); +- Upcasting sur l'héritage de classe (sous-classe → superclasse) Les Exemples: @@ -177,77 +173,77 @@ let c: usize = a + (b as usize) ``` ```typescript -// upcasting on class inheritance +//upcasting lors de l'héritage de classe class Bytes extends Uint8Array {} let bytes = new Bytes(2) -// bytes // same as: bytes as Uint8Array +// bytes // équivalent à : bytes as Uint8Array ``` -There are two scenarios where you may want to cast, but using `as`/`var` **isn't safe**: +Il existe deux scénarios dans lesquels vous souhaiterez peut-être diffuser du contenu, mais l'utilisation de `as`/`var` **n'est pas sûre** : -- Downcasting on class inheritance (superclass → subclass) -- Between two types that share a superclass +- Downcasting sur l'héritage de classe (superclasse → sous-classe) +- Entre deux types qui partagent une superclasse ```typescript -// downcasting on class inheritance +//downcasting lors de l'héritage de classe class Bytes extends Uint8Array {} let uint8Array = new Uint8Array(2) -// uint8Array // breaks in runtime :( +// uint8Array // plante à l'exécution :( ``` ```typescript -// between two types that share a superclass +// entre deux types qui partagent une superclasse class Bytes extends Uint8Array {} class ByteArray extends Uint8Array {} let bytes = new Bytes(2) -// bytes // breaks in runtime :( +// bytes // plante à l'exécution :( ``` -For those cases, you can use the `changetype` function: +Dans ces cas-là, vous pouvez utiliser la fonction `changetype` : ```typescript -// downcasting on class inheritance +//downcasting lors de l'héritage de classe class Bytes extends Uint8Array {} let uint8Array = new Uint8Array(2) -changetype(uint8Array) // works :) +changetype(uint8Array ) // fonctionne :) ``` ```typescript -// between two types that share a superclass +// entre deux types qui partagent une superclasse class Bytes extends Uint8Array {} class ByteArray extends Uint8Array {} let bytes = new Bytes(2) -changetype(bytes) // works :) +changetype(bytes) // fonctionne :) ``` -If you just want to remove nullability, you can keep using the `as` operator (or `variable`), but make sure you know that value can't be null, otherwise it will break. +Si vous souhaitez simplement supprimer la nullité, vous pouvez continuer à utiliser l'opérateur `as` (ou `variable`), mais assurez-vous de savoir que la valeur ne peut pas être nulle. sinon ça va casser. ```typescript -// remove nullability +// supprimer la possibilité de valeur nulle (nullability) let previousBalance = AccountBalance.load(balanceId) // AccountBalance | null if (previousBalance != null) { - return previousBalance as AccountBalance // safe remove null + return previousBalance as AccountBalance // suppression sûre de null } let newBalance = new AccountBalance(balanceId) ``` -For the nullability case we recommend taking a look at the [nullability check feature](https://www.assemblyscript.org/basics.html#nullability-checks), it will make your code cleaner 🙂 +Pour le cas de nullité, nous vous recommandons de jeter un œil à la [fonctionnalité de vérification de la nullité](https://www.assemblyscript.org/basics.html#nullability-checks), cela rendra votre code plus propre 🙂 -Also we've added a few more static methods in some types to ease casting, they are: +Nous avons également ajouté quelques méthodes statiques supplémentaires dans certains types pour faciliter la diffusion, à savoir : - Bytes.fromByteArray - Bytes.fromUint8Array - BigInt.fromByteArray - ByteArray.fromBigInt -### Nullability check with property access +### Vérification de nullité avec accès à la propriété Pour utiliser la [fonctionnalité de vérification de nullité](https://www.assemblyscript.org/basics.html#nullability-checks), vous pouvez utiliser soit les instructions `if`, soit l'opérateur ternaire (`?` et `:`) comme ce: @@ -256,7 +252,7 @@ let something: string | null = 'data' let somethingOrElse = something ? something : 'else' -// or +// ou let somethingOrElse @@ -267,7 +263,7 @@ if (something) { } ``` -However that only works when you're doing the `if` / ternary on a variable, not on a property access, like this: +Cependant, cela ne fonctionne que lorsque vous effectuez le `if` / ternaire sur une variable, pas sur un accès à une propriété, comme ceci : ```typescript class Container { @@ -277,10 +273,10 @@ class Container { let container = new Container() container.data = 'data' -let somethingOrElse: string = container.data ? container.data : 'else' // doesn't compile +let somethingOrElse: string = container.data ? container.data : 'else' // ne compile pas ``` -Which outputs this error: +Ce qui génère cette erreur : ```typescript ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/string/String'. @@ -288,8 +284,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - -To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: +Pour résoudre ce problème, vous pouvez créer une variable pour l'accès à cette propriété afin que le compilateur puisse effectuer la vérification magique de la nullité : ```typescript class Container { @@ -301,12 +296,12 @@ container.data = 'data' let data = container.data -let somethingOrElse: string = data ? data : 'else' // compiles just fine :) +let somethingOrElse: string = data ? data : 'else' // compile sans problème :) ``` -### Operator overloading with property access +### Surcharge de l'opérateur avec accès à la propriété -If you try to sum (for example) a nullable type (from a property access) with a non nullable one, the AssemblyScript compiler instead of giving a compile time error warning that one of the values is nullable, it just compiles silently, giving chance for the code to break at runtime. +Si vous essayez de additionner (par exemple) un type nullable (à partir d'un accès à une propriété) avec un type non nullable, le compilateur AssemblyScript au lieu de donner une erreur de compilation avertissant que l'une des valeurs est nullable, il compile simplement silencieusement, donnant une chance pour que le code soit interrompu au moment de l'exécution. ```typescript class BigInt extends Uint8Array { @@ -323,14 +318,13 @@ class Wrapper { let x = BigInt.fromI32(2) let y: BigInt | null = null -x + y // give compile time error about nullability - +x + y // donne une erreur de compilation concernant la nullité let wrapper = new Wrapper(y) -wrapper.n = wrapper.n + x // doesn't give compile time errors as it should +wrapper.n = wrapper.n + x // ne donne pas d'erreurs de compilation comme il se doit ``` -We've opened a issue on the AssemblyScript compiler for this, but for now if you do these kind of operations in your subgraph mappings, you should change them to do a null check before it. +Nous avons ouvert un problème sur le compilateur AssemblyScript pour cela, mais pour l'instant, si vous effectuez ce type d'opérations dans vos mappages de subgraph, vous devez les modifier pour effectuer une vérification nulle avant. ```typescript let wrapper = new Wrapper(y) @@ -339,12 +333,12 @@ if (!wrapper.n) { wrapper.n = BigInt.fromI32(0) } -wrapper.n = wrapper.n + x // now `n` is guaranteed to be a BigInt +wrapper.n = wrapper.n + x // maintenant `n` est garanti comme étant un BigInt ``` ### Value initialization -If you have any code like this: +Si vous avez un code comme celui-ci : ```typescript var value: Type // null @@ -352,7 +346,7 @@ value.x = 10 value.y = 'content' ``` -It will compile but break at runtime, that happens because the value hasn't been initialized, so make sure your subgraph has initialized their values, like this: +Il sera compilé mais s'arrêtera au moment de l'exécution, cela se produit parce que la valeur n'a pas été initialisée, alors assurez-vous que votre subgraph a initialisé ses valeurs, comme ceci : ```typescript var value = new Type() // initialized @@ -360,7 +354,7 @@ value.x = 10 value.y = 'content' ``` -Also if you have nullable properties in a GraphQL entity, like this: +De plus, si vous avez des propriétés nullables dans une entité GraphQL, comme ceci : ```graphql type Total @entity { @@ -369,7 +363,7 @@ type Total @entity { } ``` -And you have code similar to this: +Et vous avez un code similaire à celui-ci : ```typescript let total = Total.load('latest') @@ -381,7 +375,7 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` -You'll need to make sure to initialize the `total.amount` value, because if you try to access like in the last line for the sum, it will crash. So you either initialize it first: +Vous devrez vous assurer d'initialiser la valeur `total.amount`, car si vous essayez d'accéder à la dernière ligne pour la somme, elle plantera. Donc soit vous l'initialisez d'abord : ```typescript let total = Total.load('latest') @@ -394,7 +388,7 @@ if (total === null) { total.tokens = total.tokens + BigInt.fromI32(1) ``` -Or you can just change your GraphQL schema to not use a nullable type for this property, then we'll initialize it as zero on the `codegen` step 😉 +Ou vous pouvez simplement modifier votre schéma GraphQL pour ne pas utiliser de type nullable pour cette propriété, puis nous l'initialiserons à zéro à l'étape `codegen` 😉 ```graphql type Total @entity { @@ -407,15 +401,15 @@ type Total @entity { let total = Total.load('latest') if (total === null) { - total = new Total('latest') // already initializes non-nullable properties + total = new Total('latest') // initialise déjà les propriétés non-nullables } total.amount = total.amount + BigInt.fromI32(1) ``` -### Class property initialization +### Initialisation de la propriété de classe -If you export any classes with properties that are other classes (declared by you or by the standard library) like this: +Si vous exportez des classes avec des propriétés qui sont d'autres classes (déclarées par vous ou par la bibliothèque standard), comme ceci : ```typescript class Thing {} @@ -425,14 +419,14 @@ export class Something { } ``` -The compiler will error because you either need to add an initializer for the properties that are classes, or add the `!` operator: +Le compilateur générera une erreur car vous devez soit ajouter un initialiseur pour les propriétés qui sont des classes, soit ajouter l'opérateur `!` : ```typescript export class Something { constructor(public value: Thing) {} } -// or +// ou export class Something { value: Thing @@ -442,63 +436,63 @@ export class Something { } } -// or +// ou export class Something { value!: Thing } ``` -### Array initialization +### Initialisation du tableau -The `Array` class still accepts a number to initialize the length of the list, however you should take care because operations like `.push` will actually increase the size instead of adding to the beginning, for example: +La classe `Array` accepte toujours un nombre pour initialiser la longueur de la liste, mais vous devez faire attention car des opérations comme `.push` augmenteront en fait la taille au lieu de l'ajouter au début. , Par exemple: ```typescript let arr = new Array(5) // ["", "", "", "", ""] -arr.push('something') // ["", "", "", "", "", "something"] // size 6 :( +arr.push('something') // ["", "", "", "", "", "something"] // taille 6 :( ``` -Depending on the types you're using, eg nullable ones, and how you're accessing them, you might encounter a runtime error like this one: +En fonction des types que vous utilisez, par exemple les types nullables, et de la manière dont vous y accédez, vous pourriez rencontrer une erreur d'exécution comme celle-ci : ``` ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/array.ts, line 110, column 40, with message: Element type must be nullable if array is holey wasm backtrace: 0: 0x19c4 - !~lib/@graphprotocol/graph-ts/index/format 1: 0x1e75 - !~lib/@graphprotocol/graph-ts/common/collections/Entity#constructor 2: 0x30b9 - !node_modules/@graphprotocol/graph-ts/global/global/id_of_type ``` -To actually push at the beginning you should either, initialize the `Array` with size zero, like this: +Pour réellement pousser au début, vous devez soit initialiser le `Array` avec une taille zéro, comme ceci : ```typescript let arr = new Array(0) // [] -arr.push('something') // ["something"] +arr.push('quelque chose') // ["quelque chose"] ``` -Or you should mutate it via index: +Ou vous devriez le muter via index : ```typescript let arr = new Array(5) // ["", "", "", "", ""] -arr[0] = 'something' // ["something", "", "", "", ""] +arr[0] = 'quelque chose' // ["quelque chose", "", "", "", ""] ``` -### GraphQL schema +### Schéma GraphQL -This is not a direct AssemblyScript change, but you may have to update your `schema.graphql` file. +Il ne s'agit pas d'une modification directe d'AssemblyScript, mais vous devrez peut-être mettre à jour votre fichier `schema.graphql`. -Now you no longer can define fields in your types that are Non-Nullable Lists. If you have a schema like this: +Vous ne pouvez désormais plus définir de champs dans vos types qui sont des listes non nullables. Si vous avez un schéma comme celui-ci : ```graphql type Something @entity { - id: Bytes! + id: Bytes! } type MyEntity @entity { - id: Bytes! - invalidField: [Something]! # no longer valid + id: Bytes! + invalidField: [Something]! # n'est plus valide } ``` -You'll have to add an `!` to the member of the List type, like this: +Vous devrez ajouter un `!` au membre de type List, comme ceci : ```graphql type Something @entity { @@ -507,18 +501,18 @@ type Something @entity { type MyEntity @entity { id: Bytes! - invalidField: [Something!]! # valid + invalidField: [Something!]! # valide } ``` -This changed because of nullability differences between AssemblyScript versions, and it's related to the `src/generated/schema.ts` file (default path, you might have changed this). +Cela a changé en raison des différences de nullité entre les versions d'AssemblyScript et est lié au fichier `src/generated/schema.ts` (chemin par défaut, vous avez peut-être modifié cela). -### Other +### Autre -- Aligned `Map#set` and `Set#add` with the spec, returning `this` ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) -- Arrays no longer inherit from ArrayBufferView, but are now distinct ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -- Classes initialized from object literals can no longer define a constructor ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -- The result of a `**` binary operation is now the common denominator integer if both operands are integers. Previously, the result was a float as if calling `Math/f.pow` ([v0.11.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.11.0)) -- Coerce `NaN` to `false` when casting to `bool` ([v0.14.9](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.9)) +- Alignement de `Map#set` et `Set#add` avec la spécification, en retournant `this` ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) +- Les tableaux n'héritent plus d'ArrayBufferView, mais sont désormais distincts ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) +- Les classes initialisées à partir de littéraux d'objet ne peuvent plus définir de constructeur ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) +- Le résultat d'une opération binaire `**` est désormais le dénominateur commun entier si les deux opérandes sont des entiers. Auparavant, le résultat était un float comme si vous appeliez `Math/f.pow` ([v0.11.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.11.0)) +- Convertir `NaN` en `false` lors de la conversion en `bool` ([v0.14.9](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.9)) - Lors du décalage d'une petite valeur entière de type `i8`/`u8` ou `i16`/`u16`, seuls les 3 respectivement 4 les plus petits les bits significatifs de la valeur RHS affectent le résultat, de la même manière que le résultat d'un `i32.shl` n'est affecté que par les 5 bits les moins significatifs de la valeur RHS. Exemple : `someI8 << 8` produisait auparavant la valeur `0`, mais produit désormais `someI8` en raison du masquage du RHS comme `8 & 7 = 0` (3 bits) ([v0.17.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.0)) -- Bug fix of relational string comparisons when sizes differ ([v0.17.8](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.8)) +- Correction d'un bug des comparaisons de chaînes relationnelles lorsque les tailles diffèrent ([v0.17.8](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.8)) From 00ec4ff2cfc0b003f09f08a7deedc34ff1f7b264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:50 -0400 Subject: [PATCH 284/924] New translations assemblyscript-migration-guide.mdx (Spanish) --- .../es/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/es/release-notes/assemblyscript-migration-guide.mdx b/website/pages/es/release-notes/assemblyscript-migration-guide.mdx index bfc973f982dd..c3770a5c9ef7 100644 --- a/website/pages/es/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/es/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Tendrás que cambiar el nombre de las variables duplicadas si tienes una variable shadowing. - ### Comparaciones Nulas - Al hacer la actualización en un subgrafo, a veces pueden aparecer errores como estos: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - Para solucionarlo puedes simplemente cambiar la declaración `if` por algo así: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Para solucionar este problema, puedes crear una variable para ese acceso a la propiedad de manera que el compilador pueda hacer la magia de la comprobación de nulidad: ```typescript From a50667268f4eac0d5b023ed285b55ab5e5b543a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:51 -0400 Subject: [PATCH 285/924] New translations assemblyscript-migration-guide.mdx (Arabic) --- .../ar/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx index 84e00f13b4e1..9674f1777573 100644 --- a/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ let a = a + b ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - ستحتاج إلى إعادة تسمية المتغيرات المكررة إذا كان لديك variable shadowing. - ### مقارانات Null - من خلال إجراء الترقية على ال Subgraph الخاص بك ، قد تحصل أحيانًا على أخطاء مثل هذه: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - لحل المشكلة يمكنك ببساطة تغيير عبارة `if` إلى شيء مثل هذا: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - لإصلاح هذه المشكلة ، يمكنك إنشاء متغير للوصول إلى الخاصية حتى يتمكن المترجم من القيام بعملية التحقق من الـ nullability: ```typescript From bda6abc21c9e6f99132e29411160b699627611bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:52 -0400 Subject: [PATCH 286/924] New translations assemblyscript-migration-guide.mdx (Czech) --- .../assemblyscript-migration-guide.mdx | 185 +++++++++--------- 1 file changed, 90 insertions(+), 95 deletions(-) diff --git a/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx b/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..aaa199b28aab 100644 --- a/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx @@ -1,50 +1,50 @@ --- -title: AssemblyScript Migration Guide +title: Průvodce migrací AssemblyScript --- -Up until now, subgraphs have been using one of the [first versions of AssemblyScript](https://github.com/AssemblyScript/assemblyscript/tree/v0.6) (v0.6). Finally we've added support for the [newest one available](https://github.com/AssemblyScript/assemblyscript/tree/v0.19.10) (v0.19.10)! 🎉 +Dosud se pro subgrafy používala jedna z [prvních verzí AssemblyScript](https://github.com/AssemblyScript/assemblyscript/tree/v0.6) (v0.6). Konečně jsme přidali podporu pro [nejnovější dostupnou verzi](https://github.com/AssemblyScript/assemblyscript/tree/v0.19.10) (v0.19.10)! 🎉 -That will enable subgraph developers to use newer features of the AS language and standard library. +To umožní vývojářům podgrafů používat novější funkce jazyka AS a standardní knihovny. -This guide is applicable for anyone using `graph-cli`/`graph-ts` below version `0.22.0`. If you're already at a higher than (or equal) version to that, you've already been using version `0.19.10` of AssemblyScript 🙂 +Tato příručka platí pro všechny, kteří používají `graph-cli`/`graph-ts` pod verzí `0.22.0`. Pokud již máte vyšší (nebo stejnou) verzi, používáte již verzi `0.19.10` AssemblyScript 🙂 -> Note: As of `0.24.0`, `graph-node` can support both versions, depending on the `apiVersion` specified in the subgraph manifest. +> Poznámka: Od verze `0.24.0` může `graph-node` podporovat obě verze v závislosti na `apiVersion` uvedené v manifestu podgrafu. -## Features +## Funkce -### New functionality +### Nové funkce -- `TypedArray`s can now be built from `ArrayBuffer`s by using the [new `wrap` static method](https://www.assemblyscript.org/stdlib/typedarray.html#static-members) ([v0.8.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.8.1)) -- New standard library functions: `String#toUpperCase`, `String#toLowerCase`, `String#localeCompare`and `TypedArray#set` ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) -- Added support for x instanceof GenericClass ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) -- Added `StaticArray`, a more efficient array variant ([v0.9.3](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.3)) -- Added `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -- Implemented `radix` argument on `Number#toString` ([v0.10.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.1)) -- Added support for separators in floating point literals ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) -- Added support for first class functions ([v0.14.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.0)) -- Add builtins: `i32/i64/f32/f64.add/sub/mul` ([v0.14.13](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.13)) -- Implement `Array/TypedArray/String#at` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) -- Added support for template literal strings ([v0.18.17](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.17)) -- Add `encodeURI(Component)` and `decodeURI(Component)` ([v0.18.27](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.27)) -- Add `toString`, `toDateString` and `toTimeString` to `Date` ([v0.18.29](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.29)) -- Add `toUTCString` for `Date` ([v0.18.30](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.30)) -- Add `nonnull/NonNullable` builtin type ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) +- `TypedArray`s lze nyní sestavit z `ArrayBuffer`s pomocí [nové `wrap` statické metody](https://www.assemblyscript.org/stdlib/typedarray.html#static-members) ([v0.8.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.8.1)) +- Nové funkce standardní knihovny: `String#toUpperCase`, `String#toLowerCase`, `String#localeCompare`a `TypedArray#set` ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) +- Přidána podpora pro x instanceof GenericClass ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) +- Přidána `StaticArray`, efektivnější varianta pole ([v0.9.3](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.3)) +- Přidáno `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) +- Implementován argument `radix` na `Number#toString` ([v0.10.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.1)) +- Přidána podpora oddělovačů v literálech s plovoucí desetinnou čárkou ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) +- Přidána podpora funkcí první třídy ([v0.14.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.0)) +- Přidání vestavěných: `i32/i64/f32/f64.add/sub/mul` ([v0.14.13](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.13)) +- Implementovat `Array/TypedArray/String#at` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) +- Přidána podpora literálních řetězců šablon ([v0.18.17](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.17)) +- Přidat `encodeURI(Component)` and `decodeURI(Component)` ([v0.18.27](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.27)) +- Přidat `toString`, `toDateString` and `toTimeString` to `Date` ([v0.18.29](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.29)) +- Přidat `toUTCString` for `Date` ([v0.18.30](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.30)) +- Přidat `nonnull/NonNullable` builtin type ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) -### Optimizations +### Optimalizace -- `Math` functions such as `exp`, `exp2`, `log`, `log2` and `pow` have been replaced by faster variants ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) -- Slightly optimize `Math.mod` ([v0.17.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.1)) -- Cache more field accesses in std Map and Set ([v0.17.8](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.8)) -- Optimize for powers of two in `ipow32/64` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) +- `Math` funkce jako `exp`, `exp2`, `log`, `log2` a `pow` byly nahrazeny rychlejšími variantami ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) +- Mírná optimalizace `Math.mod` ([v0.17.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.1)) +- Vyrovnávací paměť pro více přístupů k polím std Map a Set ([v0.17.8](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.8)) +- Optimalizace pro mocniny dvou v `ipow32/64` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) -### Other +### Jiný -- The type of an array literal can now be inferred from its contents ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) -- Updated stdlib to Unicode 13.0.0 ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) +- Typ literálu pole lze nyní odvodit z jeho obsahu ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) +- Aktualizace stdlib na Unicode 13.0.0 ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -## How to upgrade? +## Jak provést upgrade? -1. Change your mappings `apiVersion` in `subgraph.yaml` to `0.0.6`: +1. Změňte mapování `apiVersion` v `subgraph.yaml` na `0.0.6`: ```yaml ... @@ -56,7 +56,7 @@ dataSources: ... ``` -2. Update the `graph-cli` you're using to the `latest` version by running: +2. Aktualizujte používaný `graph-cli` na `nejnovější` verzi spuštěním: ```bash # if you have it globally installed @@ -66,20 +66,20 @@ npm install --global @graphprotocol/graph-cli@latest npm install --save-dev @graphprotocol/graph-cli@latest ``` -3. Do the same for `graph-ts`, but instead of installing globally, save it in your main dependencies: +3. Totéž proveďte pro `graph-ts`, ale místo globální instalace jej uložte do hlavních závislostí: ```bash npm install --save @graphprotocol/graph-ts@latest ``` -4. Follow the rest of the guide to fix the language breaking changes. -5. Run `codegen` and `deploy` again. +4. Postupujte podle zbytku příručky a opravte změny, které narušují jazyk. +5. Znovu spusťte `codegen` a `deploy`. -## Breaking changes +## Prolomení změn ### Nullability -On the older version of AssemblyScript, you could create code like this: +Ve starší verzi AssemblyScript bylo možné vytvořit kód takto: ```typescript function load(): Value | null { ... } @@ -88,7 +88,7 @@ let maybeValue = load(); maybeValue.aMethod(); ``` -However on the newer version, because the value is nullable, it requires you to check, like this: +V novější verzi je však hodnota nulovatelná a je nutné ji zkontrolovat takto: ```typescript let maybeValue = load() @@ -98,7 +98,7 @@ if (maybeValue) { } ``` -Or force it like this: +Nebo si to vynuťte takto: ```typescript let maybeValue = load()! // breaks in runtime if value is null @@ -106,11 +106,11 @@ let maybeValue = load()! // breaks in runtime if value is null maybeValue.aMethod() ``` -If you are unsure which to choose, we recommend always using the safe version. If the value doesn't exist you might want to just do an early if statement with a return in you subgraph handler. +Pokud si nejste jisti, kterou verzi zvolit, doporučujeme vždy použít bezpečnou verzi. Pokud hodnota neexistuje, možná budete chtít provést pouze časný příkaz if s návratem v obsluze podgrafu. -### Variable Shadowing +### Proměnlivé stínování -Before you could do [variable shadowing](https://en.wikipedia.org/wiki/Variable_shadowing) and code like this would work: +Dříve jste mohli udělat [stínování proměnné](https://en.wikipedia.org/wiki/Variable_shadowing) a kód jako tento by fungoval: ```typescript let a = 10 @@ -118,7 +118,7 @@ let b = 20 let a = a + b ``` -However now this isn't possible anymore, and the compiler returns this error: +Nyní to však již není možné a překladač vrací tuto chybu: ```typescript ERROR TS2451: Cannot redeclare block-scoped variable 'a' @@ -127,12 +127,9 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - -You'll need to rename your duplicate variables if you had variable shadowing. - -### Null Comparisons - -By doing the upgrade on your subgraph, sometimes you might get errors like these: +Pokud jste použili stínování proměnných, musíte duplicitní proměnné přejmenovat. +### Nulová srovnání +Při aktualizaci podgrafu může někdy dojít k těmto chybám: ```typescript ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt'. @@ -140,8 +137,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - -To solve you can simply change the `if` statement to something like this: +Pro vyřešení můžete jednoduše změnit příkaz `if` na něco takového: ```typescript if (!decimals) { @@ -151,23 +147,23 @@ To solve you can simply change the `if` statement to something like this: if (decimals === null) { ``` -The same applies if you're doing != instead of ==. +Totéž platí, pokud místo == použijete !=. ### Casting -The common way to do casting before was to just use the `as` keyword, like this: +Dříve se běžně používalo klíčové slovo `jako`, například takto: ```typescript let byteArray = new ByteArray(10) let uint8Array = byteArray as Uint8Array // equivalent to: byteArray ``` -However this only works in two scenarios: +To však funguje pouze ve dvou případech: -- Primitive casting (between types such as `u8`, `i32`, `bool`; eg: `let b: isize = 10; b as usize`); -- Upcasting on class inheritance (subclass → superclass) +- Primitivní casting (mezi typy jako `u8`, `i32`, `bool`; např: `let b: isize = 10; b jako usize`); +- Upcasting na dědičnost tříd (podtřída → nadtřída) -Examples: +Příklady: ```typescript // primitive casting @@ -184,10 +180,10 @@ let bytes = new Bytes(2) // bytes // same as: bytes as Uint8Array ``` -There are two scenarios where you may want to cast, but using `as`/`var` **isn't safe**: +Existují dva scénáře, kdy můžete chtít provést obsazení, ale použití `jako`/`var` **není bezpečné**: -- Downcasting on class inheritance (superclass → subclass) -- Between two types that share a superclass +- Downcasting při dědění tříd (nadtřída → podtřída) +- Mezi dvěma typy, které mají společnou nadtřídu ```typescript // downcasting on class inheritance @@ -206,7 +202,7 @@ let bytes = new Bytes(2) // bytes // breaks in runtime :( ``` -For those cases, you can use the `changetype` function: +Pro tyto případy můžete použít funkci `changetype`: ```typescript // downcasting on class inheritance @@ -225,7 +221,7 @@ let bytes = new Bytes(2) changetype(bytes) // works :) ``` -If you just want to remove nullability, you can keep using the `as` operator (or `variable`), but make sure you know that value can't be null, otherwise it will break. +Pokud chcete pouze odstranit nullability, můžete nadále používat operátor `jako` (nebo `proměnná`), ale ujistěte se, že hodnota nemůže být nulová, jinak dojde k rozbití. ```typescript // remove nullability @@ -238,18 +234,18 @@ if (previousBalance != null) { let newBalance = new AccountBalance(balanceId) ``` -For the nullability case we recommend taking a look at the [nullability check feature](https://www.assemblyscript.org/basics.html#nullability-checks), it will make your code cleaner 🙂 +Pro případ nullability doporučujeme podívat se na funkci [kontrola nullability](https://www.assemblyscript.org/basics.html#nullability-checks), díky ní bude váš kód čistší 🙂 -Also we've added a few more static methods in some types to ease casting, they are: +Také jsme přidali několik dalších statických metod v některých typy abychom usnadnili odlévání, jsou to: - Bytes.fromByteArray - Bytes.fromUint8Array - BigInt.fromByteArray - ByteArray.fromBigInt -### Nullability check with property access +### Kontrola nulovatelnosti s přístupem k vlastnostem -To use the [nullability check feature](https://www.assemblyscript.org/basics.html#nullability-checks) you can use either `if` statements or the ternary operator (`?` and `:`) like this: +Chcete-li použít funkci [kontroly nulovatelnosti](https://www.assemblyscript.org/basics.html#nullability-checks), můžete použít buď příkazy `if`, nebo ternární operátor (`?` a `:`), například takto: ```typescript let something: string | null = 'data' @@ -267,7 +263,7 @@ if (something) { } ``` -However that only works when you're doing the `if` / ternary on a variable, not on a property access, like this: +To však funguje pouze tehdy, když provádíte `if` / ternár na proměnné, nikoli na přístupu k vlastnosti, jako je tento: ```typescript class Container { @@ -280,7 +276,7 @@ container.data = 'data' let somethingOrElse: string = container.data ? container.data : 'else' // doesn't compile ``` -Which outputs this error: +Který vypíše tuto chybu: ```typescript ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/string/String'. @@ -288,8 +284,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - -To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: +Chcete-li tento problém vyřešit, můžete vytvořit proměnnou pro přístup k této vlastnosti, aby překladač mohl provést kouzlo kontroly nulovatelnosti: ```typescript class Container { @@ -304,9 +299,9 @@ let data = container.data let somethingOrElse: string = data ? data : 'else' // compiles just fine :) ``` -### Operator overloading with property access +### Přetěžování operátorů s přístupem k vlastnostem -If you try to sum (for example) a nullable type (from a property access) with a non nullable one, the AssemblyScript compiler instead of giving a compile time error warning that one of the values is nullable, it just compiles silently, giving chance for the code to break at runtime. +Pokud se pokusíte sečíst (například) nullable typ (z přístupu k vlastnosti) s typem, který nullable není, kompilátor jazyka AssemblyScript namísto toho, aby při kompilaci zobrazil varování, že jedna z hodnot je nullable, provede tichou kompilaci, čímž se kód může za běhu pokazit. ```typescript class BigInt extends Uint8Array { @@ -330,7 +325,7 @@ let wrapper = new Wrapper(y) wrapper.n = wrapper.n + x // doesn't give compile time errors as it should ``` -We've opened a issue on the AssemblyScript compiler for this, but for now if you do these kind of operations in your subgraph mappings, you should change them to do a null check before it. +Otevřeli jsme kvůli tomu problém v kompilátoru jazyka AssemblyScript, ale zatím platí, že pokud provádíte tyto operace v mapování podgrafů, měli byste je změnit tak, aby se před nimi provedla kontrola null. ```typescript let wrapper = new Wrapper(y) @@ -342,9 +337,9 @@ if (!wrapper.n) { wrapper.n = wrapper.n + x // now `n` is guaranteed to be a BigInt ``` -### Value initialization +### Inicializace hodnot -If you have any code like this: +Pokud máte nějaký takový kód: ```typescript var value: Type // null @@ -352,7 +347,7 @@ value.x = 10 value.y = 'content' ``` -It will compile but break at runtime, that happens because the value hasn't been initialized, so make sure your subgraph has initialized their values, like this: +Zkompiluje se, ale za běhu se přeruší, což se stane, protože hodnota nebyla inicializována, takže se ujistěte, že váš podgraf inicializoval své hodnoty, například takto: ```typescript var value = new Type() // initialized @@ -360,7 +355,7 @@ value.x = 10 value.y = 'content' ``` -Also if you have nullable properties in a GraphQL entity, like this: +Také pokud máte v entitě GraphQL nulovatelné vlastnosti, jako je tato: ```graphql type Total @entity { @@ -369,7 +364,7 @@ type Total @entity { } ``` -And you have code similar to this: +A máte kód podobný tomuto: ```typescript let total = Total.load('latest') @@ -381,7 +376,7 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` -You'll need to make sure to initialize the `total.amount` value, because if you try to access like in the last line for the sum, it will crash. So you either initialize it first: +Musíte se ujistit, že jste inicializovali hodnotu `total.amount`, protože pokud se pokusíte přistupovat jako v posledním řádku pro součet, dojde k pádu. Takže ji buď nejprve inicializujte: ```typescript let total = Total.load('latest') @@ -394,7 +389,7 @@ if (total === null) { total.tokens = total.tokens + BigInt.fromI32(1) ``` -Or you can just change your GraphQL schema to not use a nullable type for this property, then we'll initialize it as zero on the `codegen` step 😉 +Nebo můžete změnit své schéma GraphQL tak, aby nepoužívalo nulovatelný typ pro tuto vlastnost, pak ji inicializujeme jako nulu v kroku `codegen` 😉 ```graphql type Total @entity { @@ -413,9 +408,9 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` -### Class property initialization +### Inicializace vlastností třídy -If you export any classes with properties that are other classes (declared by you or by the standard library) like this: +Pokud exportujete třídy s vlastnostmi, které jsou jinými třídami (deklarovanými vámi nebo standardní knihovnou), jako je tento: ```typescript class Thing {} @@ -425,7 +420,7 @@ export class Something { } ``` -The compiler will error because you either need to add an initializer for the properties that are classes, or add the `!` operator: +Překladač bude chybovat, protože buď musíte přidat inicializátor pro vlastnosti, které jsou třídami, nebo přidat operátor `!`: ```typescript export class Something { @@ -449,9 +444,9 @@ export class Something { } ``` -### Array initialization +### Inicializace polí -The `Array` class still accepts a number to initialize the length of the list, however you should take care because operations like `.push` will actually increase the size instead of adding to the beginning, for example: +Třída `Array` stále přijímá číslo pro inicializaci délky seznamu, ale měli byste si dát pozor, protože operace jako `.push` ve skutečnosti zvětší velikost, místo aby například přidávala na začátek: ```typescript let arr = new Array(5) // ["", "", "", "", ""] @@ -459,13 +454,13 @@ let arr = new Array(5) // ["", "", "", "", ""] arr.push('something') // ["", "", "", "", "", "something"] // size 6 :( ``` -Depending on the types you're using, eg nullable ones, and how you're accessing them, you might encounter a runtime error like this one: +V závislosti na typech, které používáte, např. nulovatelných, a na způsobu přístupu k nim se můžete setkat s chybou běhu, jako je tato: ``` -ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/array.ts, line 110, column 40, with message: Element type must be nullable if array is holey wasm backtrace: 0: 0x19c4 - !~lib/@graphprotocol/graph-ts/index/format 1: 0x1e75 - !~lib/@graphprotocol/graph-ts/common/collections/Entity#constructor 2: 0x30b9 - !node_modules/@graphprotocol/graph-ts/global/global/id_of_type +ERRO Handler přeskočen z důvodu selhání provádění, chyba: Mapování přerušeno na ~lib/array.ts, řádek 110, sloupec 40, se zprávou: Typ prvku musí být nulovatelný, pokud je pole děravé wasm backtrace: 0: 0x19c4 - !~lib/@graphprotocol/graph-ts/index/format 1: 0x1e75 - !~lib/@graphprotocol/graph-ts/common/collections/Entity#constructor 2: 0x30b9 - !node_modules/@graphprotocol/graph-ts/global/global/id_of_type ``` -To actually push at the beginning you should either, initialize the `Array` with size zero, like this: +Chcete-li skutečně tlačit na začátku, měli byste buď inicializovat `Array` s velikostí nula, například takto: ```typescript let arr = new Array(0) // [] @@ -473,7 +468,7 @@ let arr = new Array(0) // [] arr.push('something') // ["something"] ``` -Or you should mutate it via index: +Nebo byste ho měli zmutovat pomocí indexu: ```typescript let arr = new Array(5) // ["", "", "", "", ""] @@ -481,11 +476,11 @@ let arr = new Array(5) // ["", "", "", "", ""] arr[0] = 'something' // ["something", "", "", "", ""] ``` -### GraphQL schema +### Schéma GraphQL -This is not a direct AssemblyScript change, but you may have to update your `schema.graphql` file. +Nejedná se o přímou změnu AssemblyScript, ale možná budete muset aktualizovat soubor `schema.graphql`. -Now you no longer can define fields in your types that are Non-Nullable Lists. If you have a schema like this: +Nyní již nelze v typech definovat pole, která jsou nenulovatelnými seznamy. Pokud máte takovéto schéma: ```graphql type Something @entity { @@ -498,7 +493,7 @@ type MyEntity @entity { } ``` -You'll have to add an `!` to the member of the List type, like this: +Budete muset přidat `!` k členu typu List, například takto: ```graphql type Something @entity { @@ -513,7 +508,7 @@ type MyEntity @entity { This changed because of nullability differences between AssemblyScript versions, and it's related to the `src/generated/schema.ts` file (default path, you might have changed this). -### Other +### Jiný - Aligned `Map#set` and `Set#add` with the spec, returning `this` ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) - Arrays no longer inherit from ArrayBufferView, but are now distinct ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) From a37515ed9551a4c4a64a13ef473e1c736e87aad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:53 -0400 Subject: [PATCH 287/924] New translations assemblyscript-migration-guide.mdx (German) --- .../de/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/de/release-notes/assemblyscript-migration-guide.mdx b/website/pages/de/release-notes/assemblyscript-migration-guide.mdx index fb1ad8beb382..058c48b32e6f 100644 --- a/website/pages/de/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/de/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 141f93f89fae3456d89f98706c7767988ce94224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:54 -0400 Subject: [PATCH 288/924] New translations assemblyscript-migration-guide.mdx (Italian) --- .../it/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/it/release-notes/assemblyscript-migration-guide.mdx b/website/pages/it/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/it/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/it/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From cde7ec196d104ed9fe0730e91d95714b02b3b642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:55 -0400 Subject: [PATCH 289/924] New translations assemblyscript-migration-guide.mdx (Japanese) --- .../ja/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx index 766fbb6c80a3..82a7d23de3f8 100644 --- a/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - 変数シャドウイングを行っていた場合は、重複する変数の名前を変更する必要があります。 - ### Null 比較 - サブグラフのアップグレードを行うと、時々以下のようなエラーが発生することがあります。 ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - 解決するには、 `if` 文を以下のように変更するだけです。 ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - この問題を解決するには、そのプロパティアクセスのための変数を作成して、コンパイラが nullability check のマジックを行うようにします。 ```typescript From 4f4cac217ef510950211995d39d19a4fa4c6a452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:56 -0400 Subject: [PATCH 290/924] New translations assemblyscript-migration-guide.mdx (Korean) --- .../ko/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 90df6718f4379d2c271735b06bfd9363767c555a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:57 -0400 Subject: [PATCH 291/924] New translations assemblyscript-migration-guide.mdx (Dutch) --- .../nl/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx b/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 766de286dcea6d88b5da4b7ddf600ed26fff27d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:58 -0400 Subject: [PATCH 292/924] New translations assemblyscript-migration-guide.mdx (Polish) --- .../pl/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx b/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From a0a87bc44e1545c29c4bc1b56fa337f51f21e9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:09:59 -0400 Subject: [PATCH 293/924] New translations assemblyscript-migration-guide.mdx (Portuguese) --- .../pt/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx b/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx index ce410b9ed255..df425838fea1 100644 --- a/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Renomeie as suas variáveis duplicadas, se tinha o sombreamento variável. - ### Comparações de Nulos - Ao fazer a atualização no seu subgraph, às vezes aparecem erros como este: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - Para resolver isto, basta mudar a declaração `if` para algo assim: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Para consertar este problema, vale criar uma variável para aquele acesso à propriedade, para que o compilador faça a magia da checagem de anulabilidade: ```typescript From 716d7399f0f3b9bb2a79a5a0daee24eac3741d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:00 -0400 Subject: [PATCH 294/924] New translations assemblyscript-migration-guide.mdx (Russian) --- .../assemblyscript-migration-guide.mdx | 162 +++++++++++++++++- 1 file changed, 156 insertions(+), 6 deletions(-) diff --git a/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx index 9bd43965043a..ca3800da3b9e 100644 --- a/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx @@ -17,18 +17,24 @@ title: Руководство по миграции AssemblyScript - Теперь `TypedArray` можно создавать, используя `ArrayBuffer`6 с помощью [нового статического метода `wrap`](https://www.assemblyscript.org/stdlib/typedarray.html#static-members) ([v0.8.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.8.1)) - Новые функции стандартной библиотеки: `String#toUpperCase`, `String#toLowerCase`, `String#localeCompare` и `TypedArray#set` ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) - Добавлена поддержка x instanceof GenericClass ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) -- Добавлен `StaticArray`, более эффективный вариант массива ([v0.9.3](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.3)) -- Добавлен `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -- Реализован аргумент `radix` для `Number#toString` ([v0.10.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.1)) -- Добавлена поддержка разделителей в литералах с плавающей точкой ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) +- Добавлен `StaticArray`, более эффективный вариант массива ( +v0.9.3)
  • + + - Добавлен `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) +- Реализован аргумент `radix` для `Number#toString` (v0.10.1) + + - Добавлена поддержка разделителей в литералах с плавающей точкой ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) - Добавлена поддержка функций первого класса ([v0.14.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.0)) - Добавление встроенных модулей: `i32/i64/f32/f64.add/sub/mul` ([v0.14.13](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.13)) - Внедрение `Array/TypedArray/String#at` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) - Добавлена поддержка литеральных строк шаблона ([v0.18.17](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.17)) - Добавление `encodeURI(Component)` и `decodeURI(Component)` ([v0.18.27](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.27)) - Добавление `toString`, `toDateString` и `toTimeString` к `Date` ([v0.18.29](https://github.com/ AssemblyScript/assemblyscript/releases/tag/v0.18.29)) -- Добавление `toUTCString` для `Date` ([v0.18.30](https://github.com/ AssemblyScript/assemblyscript/releases/tag/v0.18.30)) -- Добавление встроенного типа `nonnull/NonNullable` ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) +- Добавление `toUTCString` для `Date` (v0.18.30) + + - Добавление встроенного типа `nonnull/NonNullable` ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) + + ### Оптимизации @@ -37,15 +43,21 @@ title: Руководство по миграции AssemblyScript - Кэширование большего количества обращений к полям в std Map и Set ([v0.17.8](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.8)) - Оптимизация по двум степеням в `ipow32/64` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) + + ### Прочее - Тип литерала массива теперь можно определить по его содержимому ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) - Стандартная библиотека обновлена до версии Unicode 13.0.0 ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) + + ## Как выполнить обновление? 1. Измените мэппинги `apiVersion` в `subgraph.yaml` на `0.0.6`: + + ```yaml ... dataSources: @@ -56,8 +68,11 @@ dataSources: ... ``` + 2. Обновите используемый Вами `graph-cli` до `latest` версии, выполнив: + + ```bash # если он у Вас установлен глобально npm install --global @graphprotocol/graph-cli@latest @@ -66,21 +81,31 @@ npm install --global @graphprotocol/graph-cli@latest npm install --save-dev @graphprotocol/graph-cli@latest ``` + 3. Сделайте то же самое для `graph-ts`, но вместо глобальной установки сохраните его в своих основных зависимостях: + + ```bash npm install --save @graphprotocol/graph-ts@latest ``` + 4. Следуйте остальной части руководства, чтобы исправить языковые изменения. 5. Снова запустите `codegen` и `deploy`. + + ## Критические изменения + + ### Обнуляемость В более старой версии AssemblyScript можно было создать такой код: + + ```typescript function load(): Value | null { ... } @@ -88,8 +113,11 @@ let maybeValue = load(); maybeValue.aMethod(); ``` + Однако в новой версии, поскольку значение обнуляемо, требуется проверка, например, такая: + + ```typescript let maybeValue = load() @@ -98,28 +126,39 @@ if (maybeValue) { } ``` + Или принудительно вот такая: + + ```typescript let maybeValue = load()! // прерывается во время выполнения, если значение равно null maybeValue.aMethod() ``` + Если Вы не уверены, что выбрать, мы рекомендуем всегда использовать безопасную версию. Если значение не существует, Вы можете просто выполнить раннее выражение if с возвратом в обработчике субграфа. + + ### Затенение переменных Раньше можно было сделать [затенение переменных](https://en.wikipedia.org/wiki/Variable_shadowing) и код, подобный этому, работал: + + ```typescript let a = 10 let b = 20 let a = a + b ``` + Однако теперь это больше невозможно, и компилятор возвращает эту ошибку: + + ```typescript ERROR TS2451: Cannot redeclare block-scoped variable 'a' @@ -128,12 +167,16 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' in assembly/index.ts(4,3) ``` + Вам нужно будет переименовать дублированные переменные, если Вы используете затенение переменных. + ### Нулевые сравнения Выполняя обновление своего субграфа, иногда Вы можете получить такие ошибки: + + ```typescript ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt'. if (decimals == null) { @@ -141,8 +184,11 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i in src/mappings/file.ts(41,21) ``` + Чтобы решить эту проблему, Вы можете просто изменить оператор `if` на что-то вроде этого: + + ```typescript if (!decimals) { @@ -151,17 +197,23 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i if (decimals === null) { ``` + Подобное относится к случаям, когда вместо == используется !=. + + ### Кастинг Раньше для кастинга обычно использовалось ключевое слово `as`, например: + + ```typescript let byteArray = new ByteArray(10) let uint8Array = byteArray as Uint8Array // equivalent to: byteArray ``` + Однако это работает только в двух случаях: - Примитивный кастинг (между такими типами, как `u8`, `i32`, `bool`; например: `let b: isize = 10; b as usize`); @@ -169,6 +221,8 @@ let uint8Array = byteArray as Uint8Array // equivalent to: byteArray Примеры: + + ```typescript // примитивный кастинг let a: usize = 10 @@ -176,6 +230,9 @@ let b: isize = 5 let c: usize = a + (b as usize) ``` + + + ```typescript // укрупнение по наследованию классов class Bytes extends Uint8Array {} @@ -184,11 +241,14 @@ let bytes = new Bytes(2) // bytes // то же, что: bytes as Uint8Array ``` + Есть два сценария, в которых Вы можете захотеть выполнить преобразование, но использовать `as`/`var` **небезопасно**: - Понижение уровня наследования классов (superclass → subclass) - Между двумя типами, имеющими общий супер класс + + ```typescript // понижение уровня наследования классов class Bytes extends Uint8Array {} @@ -197,6 +257,9 @@ let uint8Array = new Uint8Array(2) // uint8Array // перерывы в работе :( ``` + + + ```typescript // между двумя типами, имеющими общий суперкласс class Bytes extends Uint8Array {} @@ -206,8 +269,11 @@ let bytes = new Bytes(2) // bytes // перерывы в работе :( ``` + В таких случаях можно использовать функцию `changetype`: + + ```typescript // понижение уровня наследования классов class Bytes extends Uint8Array {} @@ -216,6 +282,9 @@ let uint8Array = new Uint8Array(2) changetype(uint8Array) // работает :) ``` + + + ```typescript // между двумя типами, имеющими общий суперкласс class Bytes extends Uint8Array {} @@ -225,8 +294,11 @@ let bytes = new Bytes(2) changetype(bytes) // работает :) ``` + Если Вы просто хотите удалить значение NULL, Вы можете продолжать использовать оператор `as` (или `variable`), но помните, что значение не может быть нулевым, иначе оно сломается. + + ```typescript // удалить значение NULL let previousBalance = AccountBalance.load(balanceId) // AccountBalance | null @@ -238,6 +310,7 @@ if (previousBalance != null) { let newBalance = new AccountBalance(balanceId) ``` + В случае обнуления мы рекомендуем Вам обратить внимание на [функцию проверки обнуления](https://www.assemblyscript.org/basics.html#nullability-checks), это сделает ваш код чище 🙂 Также мы добавили еще несколько статических методов в некоторые типы, чтобы облегчить кастинг: @@ -247,10 +320,14 @@ let newBalance = new AccountBalance(balanceId) - BigInt.fromByteArray - ByteArray.fromBigInt + + ### Проверка нулевого значения с доступом к свойству Чтобы применить [функцию проверки на нулевое значение](https://www.assemblyscript.org/basics.html#nullability-checks), Вы можете использовать операторы `if` или тернарный оператор (`?` и `:`) следующим образом: + + ```typescript let something: string | null = 'data' @@ -267,8 +344,11 @@ if (something) { } ``` + Однако это работает только тогда, когда Вы выполняете `if` / тернарную операцию для переменной, а не для доступа к свойству, например: + + ```typescript class Container { data: string | null @@ -280,8 +360,11 @@ container.data = 'data' let somethingOrElse: string = container.data ? container.data : 'else' // не компилируется ``` + В результате чего выдается ошибка: + + ```typescript ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/string/String'. @@ -289,8 +372,11 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Чтобы решить эту проблему, Вы можете создать переменную для доступа к этому свойству, чтобы компилятор мог выполнять проверку допустимости значений NULL: + + ```typescript class Container { data: string | null @@ -304,10 +390,15 @@ let data = container.data let somethingOrElse: string = data ? data : 'else' // компилируется просто отлично :) ``` + + + ### Перегрузка оператора при доступе к свойствам Если Вы попытаетесь суммировать (например) тип, допускающий значение Null (из доступа к свойству), с типом, не допускающим значение Null, компилятор AssemblyScript вместо того, чтобы выдать предупреждение об ошибке компиляции, предупреждающую, что одно из значений допускает значение Null, просто компилируется молча, давая возможность сломать код во время выполнения. + + ```typescript class BigInt extends Uint8Array { @operator('+') @@ -330,8 +421,11 @@ let wrapper = new Wrapper(y) wrapper.n = wrapper.n + x // не выдает ошибок времени компиляции, как это должно быть ``` + Мы открыли вопрос по этому поводу для компилятора AssemblyScript, но пока, если Вы выполняете подобные операции в своих мэппингах субграфов, Вам следует изменить их так, чтобы перед этим выполнялась проверка на нулевое значение. + + ```typescript let wrapper = new Wrapper(y) @@ -342,26 +436,37 @@ if (!wrapper.n) { wrapper.n = wrapper.n + x // теперь `n` гарантированно будет BigInt ``` + + + ### Инициализация значения Если у Вас есть такой код: + + ```typescript var value: Type // null value.x = 10 value.y = 'content' ``` + Он будет скомпилирован, но сломается во время выполнения. Это происходит из-за того, что значение не было инициализировано, поэтому убедитесь, что Ваш субграф инициализировал свои значения, например так: + + ```typescript var value = new Type() // initialized value.x = 10 value.y = 'content' ``` + Также, если у Вас есть свойства, допускающие значение NULL, в объекте GraphQL, например: + + ```graphql type Total @entity { id: Bytes! @@ -369,8 +474,11 @@ type Total @entity { } ``` + И у Вас есть код, аналогичный этому: + + ```typescript let total = Total.load('latest') @@ -381,8 +489,11 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` + Вам необходимо убедиться, что значение `total.amount` инициализировано, потому что, если Вы попытаетесь получить доступ к сумме, как в последней строке, произойдет сбой. Таким образом, Вы либо инициализируете его первым: + + ```typescript let total = Total.load('latest') @@ -394,8 +505,11 @@ if (total === null) { total.tokens = total.tokens + BigInt.fromI32(1) ``` + Или Вы можете просто изменить свою схему GraphQL, чтобы не использовать тип, допускающий значение NULL для этого свойства. Тогда мы инициализируем его нулем на этапе `codegen` 😉 + + ```graphql type Total @entity { id: Bytes! @@ -403,6 +517,9 @@ type Total @entity { } ``` + + + ```typescript let total = Total.load('latest') @@ -413,10 +530,15 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` + + + ### Инициализация свойств класса Если Вы экспортируете какие-либо классы со свойствами, которые являются другими классами (декларированными Вами или стандартной библиотекой), то это выглядит следующим образом: + + ```typescript class Thing {} @@ -425,8 +547,11 @@ export class Something { } ``` + Компилятор выдаст ошибку, потому что Вам нужно либо добавить инициализатор для свойств, являющихся классами, либо добавить оператор `!`: + + ```typescript export class Something { constructor(public value: Thing) {} @@ -449,44 +574,63 @@ export class Something { } ``` + + + ### Инициализация массива Класс `Array` по-прежнему принимает число для инициализации длины списка, однако Вам следует соблюдать осторожность, поскольку такие операции, как `.push`, фактически увеличивают размер, а не добавляют его в начало, например: + + ```typescript let arr = new Array(5) // ["", "", "", "", ""] arr.push('something') // ["", "", "", "", "", "something"] // size 6 :( ``` + В зависимости от используемых типов, например, допускающих значение NULL, и способа доступа к ним, можно столкнуться с ошибкой времени выполнения, подобной этой: + + ``` ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/array.ts, line 110, column 40, with message: Element type must be nullable if array is holey wasm backtrace: 0: 0x19c4 - !~lib/@graphprotocol/graph-ts/index/format 1: 0x1e75 - !~lib/@graphprotocol/graph-ts/common/collections/Entity#constructor 2: 0x30b9 - !node_modules/@graphprotocol/graph-ts/global/global/id_of_type ``` + Для того чтобы фактически начать, Вы должны либо инициализировать `Array` нулевым размером, следующим образом: + + ```typescript let arr = new Array(0) // [] arr.push('something') // ["something"] ``` + Или Вы должны изменить его через индекс: + + ```typescript let arr = new Array(5) // ["", "", "", "", ""] arr[0] = 'something' // ["something", "", "", "", ""] ``` + + + ### Схема GraphQL Это не прямое изменение AssemblyScript, но Вам, возможно, придется обновить файл `schema.graphql`. Теперь Вы больше не можете определять поля в своих типах, которые являются списками, не допускающими значение NULL. Если у Вас такая схема: + + ```graphql type Something @entity { id: Bytes! @@ -498,8 +642,11 @@ type MyEntity @entity { } ``` + Вам нужно добавить `!` к элементу типа List, например, так: + + ```graphql type Something @entity { id: Bytes! @@ -511,8 +658,11 @@ type MyEntity @entity { } ``` + Изменение произошло из-за различий в допустимости значений NULL между версиями AssemblyScript и связано с файлом `src/generated/schema.ts` (путь по умолчанию, возможно, Вы его изменили). + + ### Прочее - `Map#set` и `Set#add` согласованы со спецификацией, произведён возврат к `this` ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) From d92321b3a1e42b85acfd99735a1457232e8e2e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:01 -0400 Subject: [PATCH 295/924] New translations assemblyscript-migration-guide.mdx (Swedish) --- .../assemblyscript-migration-guide.mdx | 127 +++++++++--------- 1 file changed, 61 insertions(+), 66 deletions(-) diff --git a/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx b/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx index 97c6bb95635a..afa4a7df4747 100644 --- a/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx @@ -91,17 +91,17 @@ maybeValue.aMethod(); Men i den nyare versionen, eftersom värdet är nullable, måste du kontrollera, så här: ```typescript -let maybeValue = load() +let maybeValue = load(); if (maybeValue) { - maybeValue.aMethod() // `maybeValue` is not null anymore + maybeValue.aMethod(); // `maybeValue` is not null anymore } ``` Eller gör så här: ```typescript -let maybeValue = load()! // bryts i runtime om värdet är null +let maybeValue = load()!; // bryts i runtime om värdet är null maybeValue.aMethod() ``` @@ -113,8 +113,8 @@ Om du är osäker på vilken du ska välja, rekommenderar vi alltid att använda Tidigare kunde du använda [variabelskuggning](https://en.wikipedia.org/wiki/Variable_shadowing) och kod som detta skulle fungera: ```typescript -let a = 10 -let b = 20 +let a = 10; +let b = 20; let a = a + b ``` @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Du måste döpa om dina duplicerade variabler om du hade variabelskuggning. - ### Jämförelser med nollvärden - När du gör uppgraderingen av din subgraf kan du ibland få fel som dessa: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - För att lösa problemet kan du helt enkelt ändra `if`-satsen till något i den här stilen: ```typescript @@ -158,8 +154,8 @@ Samma gäller om du använder != istället för ==. Det vanliga sättet att göra kasting tidigare var att bara använda nyckelordet `as`, som så här: ```typescript -let byteArray = new ByteArray(10) -let uint8Array = byteArray as Uint8Array // motsvarande: byteArray +let byteArray = new ByteArray(10); +let uint8Array = byteArray as Uint8Array; // motsvarande: byteArray ``` Detta fungerar dock endast i två scenarier: @@ -171,8 +167,8 @@ Exempel: ```typescript // primitive casting -let a: usize = 10 -let b: isize = 5 +let a: usize = 10; +let b: isize = 5; let c: usize = a + (b as usize) ``` @@ -180,7 +176,7 @@ let c: usize = a + (b as usize) // upcasting on class inheritance class Bytes extends Uint8Array {} -let bytes = new Bytes(2) +let bytes = new Bytes(2); // bytes // same as: bytes as Uint8Array ``` @@ -193,7 +189,7 @@ Det finns två scenarier där du kan vilja casta, men att använda `as`/`var` // downcasting om klassarv class Bytes extends Uint8Array {} -let uint8Array = new Uint8Array(2) +let uint8Array = new Uint8Array(2); // uint8Array // breaks in runtime :( ``` @@ -202,7 +198,7 @@ let uint8Array = new Uint8Array(2) class Bytes extends Uint8Array {} class ByteArray extends Uint8Array {} -let bytes = new Bytes(2) +let bytes = new Bytes(2); // bytes // breaks in runtime :( ``` @@ -212,8 +208,8 @@ I dessa fall kan du använda funktionen `changetype`: // downcasting om klassarv class Bytes extends Uint8Array {} -let uint8Array = new Uint8Array(2) -changetype(uint8Array) // works :) +let uint8Array = new Uint8Array(2); +changetype(uint8Array); // works :) ``` ```typescript @@ -221,18 +217,18 @@ changetype(uint8Array) // works :) class Bytes extends Uint8Array {} class ByteArray extends Uint8Array {} -let bytes = new Bytes(2) -changetype(bytes) // works :) +let bytes = new Bytes(2); +changetype(bytes); // works :) ``` Om du bara vill ta bort nullability kan du fortsätta använda `as`-operatorn (eller `variable`), men se till att du vet att värdet inte kan vara null, annars kommer det att bryta. ```typescript // ta bort ogiltighet -let previousBalance = AccountBalance.load(balanceId) // AccountBalance | null +let previousBalance = AccountBalance.load(balanceId); // AccountBalance | null if (previousBalance != null) { - return previousBalance as AccountBalance // safe remove null + return previousBalance as AccountBalance; // safe remove null } let newBalance = new AccountBalance(balanceId) @@ -252,18 +248,18 @@ Vi har också lagt till några fler statiska metoder i vissa typer för att unde För att använda [nullability check feature](https://www.assemblyscript.org/basics.html#nullability-checks) kan du använda antingen `if`-satser eller den ternära operatorn (`?` och `:`) så här: ```typescript -let something: string | null = 'data' +let something: string | null = "data"; -let somethingOrElse = something ? something : 'else' +let somethingOrElse = something ? something : "else"; // or -let somethingOrElse +let somethingOrElse; if (something) { - somethingOrElse = something + somethingOrElse = something; } else { - somethingOrElse = 'else' + somethingOrElse = "else"; } ``` @@ -274,10 +270,10 @@ class Container { data: string | null } -let container = new Container() -container.data = 'data' +let container = new Container(); +container.data = "data"; -let somethingOrElse: string = container.data ? container.data : 'else' // Kompilerar inte +let somethingOrElse: string = container.data ? container.data : "else"; // Kompilerar inte ``` Vilket ger detta fel: @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - För att åtgärda problemet kan du skapa en variabel för den egenskapen så att kompilatorn kan utföra den magiska nollbarhetskontrollen: ```typescript @@ -296,12 +291,12 @@ class Container { data: string | null } -let container = new Container() -container.data = 'data' +let container = new Container(); +container.data = "data"; -let data = container.data +let data = container.data; -let somethingOrElse: string = data ? data : 'else' // kompilerar helt okej :) +let somethingOrElse: string = data ? data : "else"; // kompilerar helt okej :) ``` ### Operatörsöverladdning med egenskapsaccess @@ -310,7 +305,7 @@ Om du försöker summera (till exempel) en nullable typ (från en property acces ```typescript class BigInt extends Uint8Array { - @operator('+') + @operator("+") plus(other: BigInt): BigInt { // ... } @@ -320,26 +315,26 @@ class Wrapper { public constructor(public n: BigInt | null) {} } -let x = BigInt.fromI32(2) -let y: BigInt | null = null +let x = BigInt.fromI32(2); +let y: BigInt | null = null; -x + y // ge kompileringsfel om ogiltighet +x + y; // ge kompileringsfel om ogiltighet -let wrapper = new Wrapper(y) +let wrapper = new Wrapper(y); -wrapper.n = wrapper.n + x // ger inte kompileringsfel som det borde +wrapper.n = wrapper.n + x; // ger inte kompileringsfel som det borde ``` Vi har öppnat en fråga om AssemblyScript-kompilatorn för detta, men om du gör den här typen av operationer i dina subgraf-mappningar bör du ändra dem så att de gör en null-kontroll innan den. ```typescript -let wrapper = new Wrapper(y) +let wrapper = new Wrapper(y); if (!wrapper.n) { - wrapper.n = BigInt.fromI32(0) + wrapper.n = BigInt.fromI32(0); } -wrapper.n = wrapper.n + x // nu är `n` garanterat ett BigInt +wrapper.n = wrapper.n + x; // nu är `n` garanterat ett BigInt ``` ### Initialisering av värde @@ -347,17 +342,17 @@ wrapper.n = wrapper.n + x // nu är `n` garanterat ett BigInt Om du har någon kod som denna: ```typescript -var value: Type // null -value.x = 10 -value.y = 'content' +var value: Type; // null +value.x = 10; +value.y = "content" ``` Det kommer att kompilera men brytas vid körning, det händer eftersom värdet inte har initialiserats, så se till att din subgraf har initialiserat sina värden, så här: ```typescript -var value = new Type() // initialized -value.x = 10 -value.y = 'content' +var value = new Type(); // initialized +value.x = 10; +value.y = "content" ``` Även om du har nullable properties i en GraphQL-entitet, som denna: @@ -372,10 +367,10 @@ type Total @entity { Och du har en kod som liknar den här: ```typescript -let total = Total.load('latest') +let total = Total.load("latest"); if (total === null) { - total = new Total('latest') + total = new Total("latest") } total.amount = total.amount + BigInt.fromI32(1) @@ -384,11 +379,11 @@ total.amount = total.amount + BigInt.fromI32(1) Du måste se till att initialisera värdet `total.amount`, för om du försöker komma åt som i den sista raden för summan, kommer det att krascha. Så antingen initialiserar du det först: ```typescript -let total = Total.load('latest') +let total = Total.load("latest") if (total === null) { - total = new Total('latest') - total.amount = BigInt.fromI32(0) + total = new Total("latest") + total.amount = BigInt.fromI32(0); } total.tokens = total.tokens + BigInt.fromI32(1) @@ -404,10 +399,10 @@ type Total @entity { ``` ```typescript -let total = Total.load('latest') +let total = Total.load("latest"); if (total === null) { - total = new Total('latest') // initierar redan icke-nullställbara egenskaper + total = new Total("latest"); // initierar redan icke-nullställbara egenskaper } total.amount = total.amount + BigInt.fromI32(1) @@ -435,17 +430,17 @@ export class Something { // or export class Something { - value: Thing + value: Thing; constructor(value: Thing) { - this.value = value + this.value = value; } } // or export class Something { - value!: Thing + value!: Thing; } ``` @@ -454,9 +449,9 @@ export class Something { Klassen `Array` accepterar fortfarande ett tal för att initiera längden på listan, men du bör vara försiktig eftersom operationer som `.push` faktiskt ökar storleken istället för att lägga till i början, till exempel: ```typescript -let arr = new Array(5) // ["", "", "", "", ""] +let arr = new Array(5); // ["", "", "", "", ""] -arr.push('something') // ["", "", "", "", "", "something"] // size 6 :( +arr.push("something"); // ["", "", "", "", "", "something"] // size 6 :( ``` Beroende på vilka typer du använder, t.ex. nullable-typer, och hur du kommer åt dem, kan du stöta på ett runtime-fel som det här: @@ -468,17 +463,17 @@ ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/ar För att faktiskt trycka i början bör du antingen initiera `Array` med storlek noll, så här: ```typescript -let arr = new Array(0) // [] +let arr = new Array(0); // [] -arr.push('something') // ["something"] +arr.push("something"); // ["something"] ``` Eller så bör du mutera den via index: ```typescript -let arr = new Array(5) // ["", "", "", "", ""] +let arr = new Array(5); // ["", "", "", "", ""] -arr[0] = 'something' // ["something", "", "", "", ""] +arr[0] = "something"; // ["something", "", "", "", ""] ``` ### GraphQL-schema From e1e4c77210d1521427a6de0788bdb2b3ae08151a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:02 -0400 Subject: [PATCH 296/924] New translations assemblyscript-migration-guide.mdx (Turkish) --- .../tr/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx index 338c85951884..a54f163e8541 100644 --- a/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Değişken gölgelemeniz varsa, yinelenen değişkenlerinizi yeniden adlandırmanız gerekir. - ### Null Karşılaştırmaları - Subgraph'inizde yükseltme yaparak, bazen aşağıdaki gibi hatalar alabilirsiniz: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - Çözmek için `if` ifadesini aşağıdaki gibi değiştirebilirsiniz: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Bu sorunu çözmek için, bu özellik erişimi için bir değişken oluşturabilirsiniz, böylece derleyici geçersizlik denetimi sihrini yapabilir: ```typescript From 97c0d2c08211ecb1a21f67bc575e95580982133a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:03 -0400 Subject: [PATCH 297/924] New translations assemblyscript-migration-guide.mdx (Ukrainian) --- .../uk/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx b/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From f8aac8298f1706ef080863759df564fd50f36aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:04 -0400 Subject: [PATCH 298/924] New translations assemblyscript-migration-guide.mdx (Chinese Simplified) --- .../zh/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx b/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx index 622bdeef307e..3ff2d318c88f 100644 --- a/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - 如果您有变量遮蔽的情况,则需要重命名重名变量。 - ### 空值比较 - 对子图进行升级后,有时您可能会遇到如下错误: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - 要解决此问题,您只需将 `if` 语句更改为如下所示代码: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - 要解决此问题,您可以为该属性访问创建一个变量,以便编译器可以执行可空性检查: ```typescript From 949efedf9c6288fcef09f9bc0ca87780cd3dae44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:05 -0400 Subject: [PATCH 299/924] New translations assemblyscript-migration-guide.mdx (Urdu (Pakistan)) --- .../ur/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx index 31439d43c505..9c8d0512a4eb 100644 --- a/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - اگر آپ کے پاس متغیر شیڈونگ ہے تو آپ کو اپنے ڈپلیکیٹ متغیرات کا نام تبدیل کرنے کی ضرورت ہوگی. - ### کالعدم موازنہ - اپنے سب گراف پر اپ گریڈ کرنے سے، بعض اوقات آپ کو اس طرح کی غلطیاں مل سکتی ہیں: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - حل کرنے کے لیے آپ صرف `if` اسٹیٹمنٹ کو اس طرح تبدیل کر سکتے ہیں: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - اس مسئلے کو حل کرنے کے لیے، آپ اس پراپرٹی تک رسائی کے لیے ایک متغیر بنا سکتے ہیں تاکہ مرتب کرنے والا منسوخی چیک میجک کر سکے: ```typescript From 46b3b46a32e72cc21eddce3d5413d95ce138203f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:06 -0400 Subject: [PATCH 300/924] New translations assemblyscript-migration-guide.mdx (Vietnamese) --- .../vi/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx b/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx index 69c36218d8af..8536b657e78a 100644 --- a/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Bạn sẽ cần đổi tên các biến trùng lặp của mình nếu bạn có che biến. - ### So sánh Null - Bằng cách thực hiện nâng cấp trên subgraph của bạn, đôi khi bạn có thể gặp các lỗi như sau: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - Để giải quyết, bạn có thể chỉ cần thay đổi câu lệnh `if` thành một cái gì đó như sau: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Để khắc phục sự cố này, bạn có thể tạo một biến cho quyền truy cập thuộc tính đó để trình biên dịch có thể thực hiện phép thuật kiểm tra tính nullability: ```typescript From b3e270c9411895ee032a284c615a8e4956f667fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:07 -0400 Subject: [PATCH 301/924] New translations assemblyscript-migration-guide.mdx (Marathi) --- .../mr/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx index a170ebec8cda..2d735415bebb 100644 --- a/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ However now this isn't possible anymore, and the compiler returns this error: ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 4b021da517030e0814b083bf28c867cd32018a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:08 -0400 Subject: [PATCH 302/924] New translations assemblyscript-migration-guide.mdx (Hindi) --- .../hi/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx b/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx index 2182133b8d48..a6d16d2d7def 100644 --- a/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - यदि आपके पास वेरिएबल शैडोइंग है, तो आपको अपने डुप्लिकेट वेरिएबल्स का नाम बदलने की आवश्यकता होगी। - ### Null Comparisons - अपने सबग्राफ पर अपग्रेड करने से, कभी-कभी आपको इस तरह की त्रुटियाँ मिल सकती हैं: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - हल करने के लिए आप केवल `if` कथन को कुछ इस तरह से बदल सकते हैं: ```typescript @@ -287,7 +283,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ``` - इस समस्या को ठीक करने के लिए, आप उस प्रॉपर्टी एक्सेस के लिए एक वेरिएबल बना सकते हैं ताकि कंपाइलर अशक्तता जांच जादू कर सके: ```typescript From cdefbe1772fe1090b98c207c0f6839aa3fa8324a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:09 -0400 Subject: [PATCH 303/924] New translations assemblyscript-migration-guide.mdx (Yoruba) --- .../yo/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx b/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From e40566bbd83ce48b4fe8663245e5e4f23f0a1168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:10 -0400 Subject: [PATCH 304/924] New translations benefits.mdx (Romanian) --- website/pages/ro/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/ro/network/benefits.mdx b/website/pages/ro/network/benefits.mdx index 864672b16515..09c0548bfc4f 100644 --- a/website/pages/ro/network/benefits.mdx +++ b/website/pages/ro/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From fe51b5638d55bcafa7848d130b8205533eb4d777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:11 -0400 Subject: [PATCH 305/924] New translations benefits.mdx (French) --- website/pages/fr/network/benefits.mdx | 101 +++++++++++++------------- 1 file changed, 50 insertions(+), 51 deletions(-) diff --git a/website/pages/fr/network/benefits.mdx b/website/pages/fr/network/benefits.mdx index 4a932e5b788b..93e03fdda0df 100644 --- a/website/pages/fr/network/benefits.mdx +++ b/website/pages/fr/network/benefits.mdx @@ -3,86 +3,85 @@ title: Le réseau Graph vs l'auto-hébergement socialImage: https://thegraph.com/docs/img/seo/benefits.jpg --- -The Graph’s decentralized network has been engineered and refined to create a robust indexing and querying experience—and it’s getting better every day thanks to thousands of contributors around the world. +Le réseau décentralisé de The Graph a été conçu et affiné pour créer une expérience d'indexation et d'interrogation robuste, et il s'améliore chaque jour grâce à des milliers de contributeurs à travers le monde. -The benefits of this decentralized protocol cannot be replicated by running a `graph-node` locally. The Graph Network is more reliable, more efficient, and less expensive. +Les avantages de ce protocole décentralisé ne peuvent pas être répliqués en exécutant un `graph-node` localement. Le réseau Graph est plus fiable, plus efficace et moins cher. -Here is an analysis: +Voici une analyse : ## Pourquoi devriez-vous utiliser le réseau Graph - Coût mensuel inférieur de 60 à 98 % - 0 $ de frais de configuration de l'infrastructure - Disponibilité supérieure -- Access to hundreds of independent Indexers around the world +- Accès à des centaines d’indexeurs indépendants à travers le monde - Assistance technique 24h/24 et 7j/7 par la communauté mondiale -## The Benefits Explained +## Les avantages expliqués ### Une structure & de coûts faible et plus flexible -No contracts. No monthly fees. Only pay for the queries you use—with an average cost-per-query of $0.0002. Queries are priced in USD and paid in GRT. +Aucun contrat. Pas de frais mensuels. Ne payez que pour les requêtes que vous utilisez, avec un coût moyen par requête de 0,0002 $. Les requêtes sont facturées en USD et payées en GRT. -Query costs may vary; the quoted cost is the average at time of publication (December 2022). +Les coûts des requêtes peuvent varier ; le coût indiqué est la moyenne au moment de la publication (décembre 2022). ## Utilisateur à faible volume (moins de 30 000 requêtes par mois) -| Cost Comparison | Auto-hébergé | Réseau de The Graph | -| :-: | :-: | :-: | -| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | -| Frais de requête | + 0 $ | ~15 $ au mois | -| Temps d'ingénierie | 400 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | 30 000 (automatique mise à l'échelle) | -| Tarif par requête | 0 $ | 0,0005 $ | -| Les infrastructures | Centralisée | Décentralisée | -| La redondance géographique | 750$+ par nœud complémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | + 750 $ | ~15 $ | +| Cost Comparison | Auto-hébergé | Réseau de The Graph | +|:------------------------------:|:-----------------------------------------:|:---------------------------------------------------------------------------:| +| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | +| Frais de requête | + 0 $ | ~15 $ au mois | +| Temps d'ingénierie | 400 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | 30 000 (automatique mise à l'échelle) | +| Tarif par requête | 0 $ | 0,0005 $ | +| Les infrastructures | Centralisée | Décentralisée | +| La redondance géographique | 750$+ par nœud complémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | + 750 $ | ~15 $ | ## Utilisateur moyen (3 000 000+ demandes par mois) -| Comparaison de coût | Auto-hébergé | Réseau de The Graph | -| :-: | :-: | :-: | -| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | -| Frais de requête | 500 $ au mois | 750 $ au mois | -| Temps d'ingénierie | 800 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | + 3 000 000 | -| Tarif par requête | 0 $ | 0,00025 $ | -| L'infrastructure | Centralisée | Décentralisée | -| Frais d'ingénierie | 200 $ au mois | Compris | -| La redondance géographique | 1 200 $ coût total par nœud supplémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | $1,650+ | $750 | +| Comparaison de coût | Auto-hébergé | Réseau de The Graph | +|:------------------------------:|:------------------------------------------:|:---------------------------------------------------------------------------:| +| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | +| Frais de requête | 500 $ au mois | 750 $ au mois | +| Temps d'ingénierie | 800 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | + 3 000 000 | +| Tarif par requête | 0 $ | 0,00025 $ | +| L'infrastructure | Centralisée | Décentralisée | +| Frais d'ingénierie | 200 $ au mois | Compris | +| La redondance géographique | 1 200 $ coût total par nœud supplémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | $1,650+ | $750 | ## L'utilisateur de volume conséquent (30 000 000+ requêtes au mois) -| Cost Comparison | Auto-hébergé | Réseau de The Graph | -| :-: | :-: | :-: | -| Coût mensuel du serveur\* | 1100 $ au mois, par nœud | 0 $ | -| Frais de requête | 4000 $ | 4500 $ au mois | -| Nombre de nœuds obligatoires | 10 | Sans objet | -| Temps d'ingénierie | 6000 $ ou plus au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | + 30 000 000 | -| Tarif par requête | 0 $ | 0,00015 $ | -| L'infrastructure | Centralisée | Décentralisée | -| La redondance géographique | $1,200 in total costs per additional node | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | + 11 000 $ | $4,500 | +| Cost Comparison | Auto-hébergé | Réseau de The Graph | +|:------------------------------:|:-----------------------------------------------:|:---------------------------------------------------------------------------:| +| Coût mensuel du serveur\* | $1100 per month, per node | 0 $ | +| Frais de requête | $4000 | $4,500 per month | +| Nombre de nœuds obligatoires | 10 | Sans objet | +| Temps d'ingénierie | $6,000 or more per month | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | + 30 000 000 | +| Tarif par requête | 0 $ | 0,00015 $ | +| L'infrastructure | Centralisée | Décentralisée | +| La redondance géographique | 1 200 $ de coûts totaux par nœud supplémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | + 11 000 $ | $4,500 | \*y compris les coûts de sauvegarde : $50-$ à 100 dollars au mois Temps d'ingénierie basé sur une hypothèse de 200 $ de l'heure - en utilisant la fonction "max query budget" dans l'onglet "budget billing", tout en maintenant une qualité de -service élevée + en utilisant la fonction "max query budget" dans l'onglet "budget billing", tout en maintenant une qualité de service élevée -Estimated costs are only for Ethereum Mainnet subgraphs — costs are even higher when self hosting a `graph-node` on other networks. +Les coûts estimés ne concernent que les subgraphs du Mainnet Ethereum - les coûts sont encore plus élevés en cas d'auto-hébergement d'un `graph-node` sur d'autres réseaux. -Curating signal on a subgraph is an optional one-time, net-zero cost (e.g., $1k in signal can be curated on a subgraph, and later withdrawn—with potential to earn returns in the process). +Émettre un signal sur un subgraph est un cout net, nul optionnel et unique (par exemple, 1 000 $ de signal peuvent être conservés sur un subgraph, puis retirés - avec la possibilité de gagner des revenus au cours du processus). -Some users may need to update their subgraph to a new version. Due to Ethereum gas fees, an update costs ~$50 at time of writing. +Certains utilisateurs peuvent avoir besoin de mettre à jour leur subgraph vers une nouvelle version. En raison des frais de gaz Ethereum, une mise à jour coûte ~50 $ au moment de la rédaction. -Note that gas fees on [Arbitrum](/arbitrum/arbitrum-faq) are substantially lower than Ethereum mainnet. +Notez que les frais de gaz sur [Arbitrum](/arbitrum/arbitrum-faq) sont nettement inférieurs à ceux du mainnet Ethereum. ## Pas de frais d'installation & plus grande efficacité opérationnelle @@ -90,8 +89,8 @@ Commencez tout de suite, sans installation, sans frais généraux et sans matér ## Fiabilité & Résilience -The Graph’s decentralized network gives users access to geographic redundancy that does not exist when self-hosting a `graph-node`. Queries are served reliably thanks to 99.9%+ uptime, achieved by hundreds of independent Indexers securing the network globally. +Le réseau décentralisé du Graph permet aux utilisateurs d'accéder à une redondance géographique qui n'existe pas lorsqu'ils hébergent eux-mêmes un `nœud de Graph`. Les requêtes sont servies de manière fiable grâce à un temps de disponibilité de plus de 99,9 %, obtenu par des centaines d'indexeurs indépendants qui sécurisent le réseau à l'échelle mondiale. -Bottom line: The Graph Network is less expensive, easier to use, and produces superior results compared to running a `graph-node` locally. +En résumé : Le réseau de graphs est moins coûteux, plus facile à utiliser et produit des résultats supérieurs à ceux obtenus par l'exécution locale d'un `nœud de graphs`. -Start using The Graph Network today, and learn how to [upgrade your subgraph to The Graph's decentralized network](/cookbook/upgrading-a-subgraph). +Commencez à utiliser le réseau The Graph dès aujourd'hui, et apprenez comment [mettre à niveau votre subgraph vers le réseau décentralisé de The Graph](/cookbook/upgrading-a-subgraph). From 699ab1ebf55c3047bd64df24b8b4c301f8d8fc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:12 -0400 Subject: [PATCH 306/924] New translations benefits.mdx (Spanish) --- website/pages/es/network/benefits.mdx | 73 +++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/website/pages/es/network/benefits.mdx b/website/pages/es/network/benefits.mdx index c0e6d9fedf40..ebbd4529f7b7 100644 --- a/website/pages/es/network/benefits.mdx +++ b/website/pages/es/network/benefits.mdx @@ -27,54 +27,53 @@ Los costos de consulta pueden variar; el costo cotizado es el promedio al moment ## Usuario de bajo volumen (menos de 30,000 consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Costo mensual del servidor\* | $350 por mes | $0 | -| Costos de consulta | $0+ | ~$15 por mes | -| Tiempo de ingeniería | $400 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 30,000 (autoescalando) | -| Costo por consulta | $0 | $0.0005 | -| Infraestructura | Centralizado | Descentralizado | -| Redundancia geográfica | $750+ por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $750+ | ~$15 | +| Comparación de costos | Self Hosted | Graph Network | +|:--------------------------------:|:-----------------------------------------:|:---------------------------------------------------------------------:| +| Costo mensual del servidor\* | $350 por mes | $0 | +| Costos de consulta | $0+ | ~$15 por mes | +| Tiempo de ingeniería | $400 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 30,000 (autoescalando) | +| Costo por consulta | $0 | $0.0005 | +| Infraestructura | Centralizado | Descentralizado | +| Redundancia geográfica | $750+ por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $750+ | ~$15 | ## Usuario de Volumen Medio (3,000,000+ consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Costo mensual del servidor\* | $350 por mes | $0 | -| Costos de consulta | $500 por mes | $750 por mes | -| Tiempo de ingeniería | $800 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 3,000,000+ | -| Costo por consulta | $0 | $0.00025 | -| Infraestructura | Centralizado | Descentralizado | -| Gastos de ingeniería | $200 por hora | Incluido | -| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $1,650+ | $750 | +| Comparación de costos | Self Hosted | Graph Network | +|:--------------------------------:|:-------------------------------------------:|:---------------------------------------------------------------------:| +| Costo mensual del servidor\* | $350 por mes | $0 | +| Costos de consulta | $500 por mes | $750 por mes | +| Tiempo de ingeniería | $800 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 3,000,000+ | +| Costo por consulta | $0 | $0.00025 | +| Infraestructura | Centralizado | Descentralizado | +| Gastos de ingeniería | $200 por hora | Incluido | +| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $1,650+ | $750 | ## Usuario de alto volumen (30,000,000+ consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Costo mensual del servidor\* | $1100 por mes, por nodo | $0 | -| Costos de consulta | $4000 | $4,500 por mes | -| Número de nodos necesarios | 10 | No aplica | -| Tiempo de ingeniería | $6,000 o más por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 30,000,000+ | -| Costo por consulta | $0 | $0.00015 | -| Infraestructura | Centralizado | Descentralizado | -| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $11,000+ | $4,500 | +| Comparación de costos | Self Hosted | Graph Network | +|:--------------------------------:|:-------------------------------------------:|:---------------------------------------------------------------------:| +| Costo mensual del servidor\* | $1100 por mes, por nodo | $0 | +| Costos de consulta | $4000 | $4,500 por mes | +| Número de nodos necesarios | 10 | No aplica | +| Tiempo de ingeniería | $6,000 o más por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 30,000,000+ | +| Costo por consulta | $0 | $0.00015 | +| Infraestructura | Centralizado | Descentralizado | +| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $11,000+ | $4,500 | \*incluidos los costos de copia de seguridad: $50-$100 por mes Tiempo de ingeniería basado en un supuesto de $200 por hora -utilizando la función de presupuesto máximo de consulta en la pestaña de facturación presupuestaria, -manteniendo una alta calidad de servicio +utilizando la función de presupuesto máximo de consulta en la pestaña de facturación presupuestaria, manteniendo una alta calidad de servicio Costos estimados son solo para los subgrafos de Ethereum Mainnet — los costos son aún más altos cuando se aloja un `graph-node` en otras redes. From bf5cb5013c9292f63b51d077f62a5e3594ee35f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:13 -0400 Subject: [PATCH 307/924] New translations benefits.mdx (Arabic) --- website/pages/ar/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/ar/network/benefits.mdx b/website/pages/ar/network/benefits.mdx index a54a14a768c9..346ae4cfcab2 100644 --- a/website/pages/ar/network/benefits.mdx +++ b/website/pages/ar/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| البنية الأساسية | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| البنية الأساسية | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| البنية الأساسية | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| البنية الأساسية | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| البنية الأساسية | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| البنية الأساسية | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From f8f15dbc750ae2a00fb3945f734a00e5df4c18ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:14 -0400 Subject: [PATCH 308/924] New translations benefits.mdx (Czech) --- website/pages/cs/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/cs/network/benefits.mdx b/website/pages/cs/network/benefits.mdx index 864672b16515..ec33c75b4ae5 100644 --- a/website/pages/cs/network/benefits.mdx +++ b/website/pages/cs/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastruktura | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastruktura | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastruktura | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From c2a9b3ae0a1741cce4942c78054c576b90d51e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:15 -0400 Subject: [PATCH 309/924] New translations benefits.mdx (German) --- website/pages/de/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/de/network/benefits.mdx b/website/pages/de/network/benefits.mdx index cf9a39833987..10158195162f 100644 --- a/website/pages/de/network/benefits.mdx +++ b/website/pages/de/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastruktur | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastruktur | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastruktur | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastruktur | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastruktur | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastruktur | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From 0ebfc2cba4be4eb42aafa92afe9eaf33c9ce4b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:16 -0400 Subject: [PATCH 310/924] New translations benefits.mdx (Italian) --- website/pages/it/network/benefits.mdx | 73 +++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/website/pages/it/network/benefits.mdx b/website/pages/it/network/benefits.mdx index 482b5fbbcd0d..74d915452816 100644 --- a/website/pages/it/network/benefits.mdx +++ b/website/pages/it/network/benefits.mdx @@ -27,54 +27,53 @@ I costi di query possono variare; il costo indicato è quello medio al momento d ## Utente di basso volume (meno di 30.000 query al mese) -| Confronto costi | Self Hosted | The Graph Network | -| :-: | :-: | :-: | -| Costo mensile del server\* | $350 al mese | $0 | -| Costi di query | $0+ | ~$15 al mese | -| Tempo di progettazione | $400 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità di infra | 30,000 (autoscaling) | -| Costo per query | $0 | $0.0005 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Ridondanza geografica | $750+ per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $750+ | ~$15 | +| Confronto costi | Self Hosted | The Graph Network | +|:----------------------------------:|:---------------------------------------:|:-----------------------------------------------------------------------------:| +| Costo mensile del server\* | $350 al mese | $0 | +| Costi di query | $0+ | ~$15 al mese | +| Tempo di progettazione | $400 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità di infra | 30,000 (autoscaling) | +| Costo per query | $0 | $0.0005 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Ridondanza geografica | $750+ per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $750+ | ~$15 | ## Utente di medio volume (3,000,000+ di query al mese) -| Confronto dei costi | Self Hosted | The Graph Network | -| :-: | :-: | :-: | -| Costo mensile del server\* | $350 al mese | $0 | -| Costi di query | $500 al mese | $750 al mese | -| Tempo di progettazione | $800 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità dell'infrastruttura | 3,000,000+ | -| Costo per query | $0 | $0.00025 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Costi di ingegneria | $200 all'ora | Incluso | -| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $1,650+ | $750 | +| Confronto dei costi | Self Hosted | The Graph Network | +|:----------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------------------:| +| Costo mensile del server\* | $350 al mese | $0 | +| Costi di query | $500 al mese | $750 al mese | +| Tempo di progettazione | $800 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità dell'infrastruttura | 3,000,000+ | +| Costo per query | $0 | $0.00025 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Costi di ingegneria | $200 all'ora | Incluso | +| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $1,650+ | $750 | ## Utente di alto volume (3,000,000+ di query al mese) -| Confronto costi | Self Hosted | The Graph Network | -| :-: | :-: | :-: | -| Costo mensile del server\* | $1100 al mese, per nodo | $0 | -| Costi di query | $4000 | $4,500 al mese | -| Numero di nodi necessari | 10 | Non applicabile | -| Tempo di progettazione | $6.000 o più al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità di infra | 30,000,000+ | -| Costo per query | $0 | $0.00015 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $11,000+ | $4,500 | +| Confronto costi | Self Hosted | The Graph Network | +|:----------------------------------:|:-------------------------------------------:|:-----------------------------------------------------------------------------:| +| Costo mensile del server\* | $1100 al mese, per nodo | $0 | +| Costi di query | $4000 | $4,500 al mese | +| Numero di nodi necessari | 10 | Non applicabile | +| Tempo di progettazione | $6.000 o più al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità di infra | 30,000,000+ | +| Costo per query | $0 | $0.00015 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $11,000+ | $4,500 | \*inclusi i costi per il backup: $50-$100 al mese Tempo di progettazione basato su un'ipotesi di $200 all'ora - utilizzando la funzione di budget massimo della query nella scheda di fatturazione del budget, mantenendo un'alta -qualità del servizio + utilizzando la funzione di budget massimo della query nella scheda di fatturazione del budget, mantenendo un'alta qualità del servizio I costi previsti sono solo per i subgraph di Ethereum Mainnet - i costi sono ancora più alti quando si ospita un `graph-node` su altre reti. From 30d419f3118831f27443538040fe400ee011266e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:17 -0400 Subject: [PATCH 311/924] New translations benefits.mdx (Japanese) --- website/pages/ja/network/benefits.mdx | 74 +++++++++++++-------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/website/pages/ja/network/benefits.mdx b/website/pages/ja/network/benefits.mdx index f1dbdaa20937..93018679bfd6 100644 --- a/website/pages/ja/network/benefits.mdx +++ b/website/pages/ja/network/benefits.mdx @@ -14,7 +14,7 @@ Graph の分散型ネットワークは、堅牢なインデックス作成と - 60-98%の月額コスト削減 - インフラ構築費用0ドル - 優れたアップタイム -- Access to hundreds of independent Indexers around the world +- 世界中の数百の独立系インデクサーへのアクセス - グローバルコミュニティによる24時間365日の技術サポート ## 以下に利点を説明します @@ -27,47 +27,47 @@ Graph の分散型ネットワークは、堅牢なインデックス作成と ## ローボリュームユーザー(月間30,000クエリ以下) -| コスト比較 | セルフホスト | グラフネットワーク | -| :-: | :-: | :-: | -| 月額サーバー代 | $350/月 | $0 | -| クエリコスト | $0+ | ~$15/月 | -| エンジニアリングタイム | $400/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 30,000(オートスケーリング) | -| クエリごとのコスト | $0 | $0.0005 | -| インフラストラクチャ | 集中管理型 | 分散型 | -| 地理的な冗長性 | 追加1ノードにつき$750+ | 含まれる | -| アップタイム | バリエーション | 99.9%+ | -| 月額費用合計 | $750+ | ~$15 | +| コスト比較 | セルフホスト | グラフネットワーク | +|:-----------------------:|:---------------------------------------:|:-----------------------------------:| +| 月額サーバー代 | $350/月 | $0 | +| クエリコスト | $0+ | ~$15/月 | +| エンジニアリングタイム | $400/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 30,000(オートスケーリング) | +| クエリごとのコスト | $0 | $0.0005 | +| インフラストラクチャ | 集中管理型 | 分散型 | +| 地理的な冗長性 | 追加1ノードにつき$750+ | 含まれる | +| アップタイム | バリエーション | 99.9%+ | +| 月額費用合計 | $750+ | ~$15 | ## ミディアムボリュームユーザー(月間3,000,000クエリ以上) -| コスト比較 | セルフホスト | グラフネットワーク | -| :-: | :-: | :-: | -| 月額サーバー代 | $350/月 | $0 | -| クエリコスト | $500/月 | $750/月 | -| エンジニアリングタイム | $800/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 3,000,000+ | -| クエリごとのコスト | $0 | $0.00025 | -| インフラストラクチャ | 中央管理型 | 分散型 | -| エンジニアリングコスト | $200/時 | 含まれる | -| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | -| アップタイム | 変動 | 99.9%+ | -| 月額費用合計 | $1,650+ | $750 | +| コスト比較 | セルフホスト | グラフネットワーク | +|:-----------------------:|:------------------------------------------:|:-----------------------------------:| +| 月額サーバー代 | $350/月 | $0 | +| クエリコスト | $500/月 | $750/月 | +| エンジニアリングタイム | $800/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 3,000,000+ | +| クエリごとのコスト | $0 | $0.00025 | +| インフラストラクチャ | 中央管理型 | 分散型 | +| エンジニアリングコスト | $200/時 | 含まれる | +| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | +| アップタイム | 変動 | 99.9%+ | +| 月額費用合計 | $1,650+ | $750 | ## ハイボリュームユーザー(月間30,000,000クエリ以上) -| コスト比較 | セルフホスト | グラフネットワーク | -| :-: | :-: | :-: | -| 月額サーバー代 | $1100/月(ノードごと) | $0 | -| クエリコスト | $4000 | $4,500/月 | -| 必要ノード数 | 10 | 該当なし | -| エンジニアリングタイム | $6,000/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 30,000,000+ | -| クエリごとのコスト | $0 | $0.00015 | -| インフラストラクチャ | 集中管理型 | 分散型 | -| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | -| アップタイム | 変動 | 99.9%+ | -| 月額費用合計 | $11,000+ | $4,500 | +| コスト比較 | セルフホスト | グラフネットワーク | +|:-----------------------:|:-------------------------------------------:|:-----------------------------------:| +| 月額サーバー代 | $1100/月(ノードごと) | $0 | +| クエリコスト | $4000 | $4,500/月 | +| 必要ノード数 | 10 | 該当なし | +| エンジニアリングタイム | $6,000/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 30,000,000+ | +| クエリごとのコスト | $0 | $0.00015 | +| インフラストラクチャ | 集中管理型 | 分散型 | +| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | +| アップタイム | 変動 | 99.9%+ | +| 月額費用合計 | $11,000+ | $4,500 | \*バックアップ費用含む:月額$50〜$100 @@ -89,7 +89,7 @@ Graph の分散型ネットワークは、堅牢なインデックス作成と ## 信頼性と信頼性回復力 -The Graph’s decentralized network gives users access to geographic redundancy that does not exist when self-hosting a `graph-node`. Queries are served reliably thanks to 99.9%+ uptime, achieved by hundreds of independent Indexers securing the network globally. +Graphの分散型ネットワークは、`graph-node`をセルフホストする場合には存在しない地理的な冗長性をユーザーに提供します。何百もの独立したIndexerがグローバルにネットワークを保護することで、クエリは99.9%以上のアップタイムで確実に提供されます。 結論: グラフ ネットワークは、ローカルで `graph-node` を実行するよりも安価で使いやすく、優れた結果を生み出します。 From 6e57519240169fef4095987b9694363c3c9f50e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:18 -0400 Subject: [PATCH 312/924] New translations benefits.mdx (Korean) --- website/pages/ko/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/ko/network/benefits.mdx b/website/pages/ko/network/benefits.mdx index 864672b16515..09c0548bfc4f 100644 --- a/website/pages/ko/network/benefits.mdx +++ b/website/pages/ko/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From 21d0ce9df2fef95a468ecf3f47a18f0cdc0c71f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:19 -0400 Subject: [PATCH 313/924] New translations benefits.mdx (Dutch) --- website/pages/nl/network/benefits.mdx | 81 +++++++++++++-------------- 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/website/pages/nl/network/benefits.mdx b/website/pages/nl/network/benefits.mdx index 945586f14180..ccb2babe1b4c 100644 --- a/website/pages/nl/network/benefits.mdx +++ b/website/pages/nl/network/benefits.mdx @@ -5,7 +5,7 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg Het gedecentraliseerde netwerk van The Graph is ontworpen en verfijnd om een robuuste ervaring te creëren bij het indexeren en opvragen van data. Het netwerk wordt iedere dag sterker door de duizenden bijdragers wereldwijd. -De voordelen van dit gedecentraliseerde protocol is dat het niet gerepliceerd kan worden door een `graph-node` lokaal te laten werken. Het Graph Netwerk is betrouwbaarder, efficiënter en goedkoper. +De voordelen van dit gedecentraliseerde protocol is dat het niet gerepliceerd kan worden door een `graph-node` lokaal te laten werken. Het Graph Netwerk is betrouwbaarder, efficiënter en goedkoper. Hier is een analyse: @@ -14,7 +14,7 @@ Hier is een analyse: - 60-98% lagere maandelijkse kosten - Geen kosten voor het opzetten van infrastructuur - Superieure beschikbaarheid -- Access to hundreds of independent Indexers around the world +- Toegang tot honderden onafhankelijke Indexers wereldwijd - 24/7 technische ondersteuning door de wereldwijde Graph Netwerk gemeenschap ## De voordelen uitgelegd @@ -27,54 +27,53 @@ Kosten per query kunnen variëren; de genoemde kosten zijn het gemiddelde op het ## Gebruiker met een laag volume (minder dan 30.000 queries per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -| :-: | :-: | :-: | -| Maandelijkse serverkosten | $350 per maand | $0 | -| Querykosten | $0+ | ~$15 per maand | -| Engineering time | $400 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000 (schaalt automatisch) | -| Kosten per query | $0 | $0,0005 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Geografische redundantie | $750+ per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $750+ | ~$15 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +|:--------------------------:|:---------------------------------------:|:------------------------------------------------------------------------------------------------:| +| Maandelijkse serverkosten | $350 per maand | $0 | +| Querykosten | $0+ | ~$15 per maand | +| Onderhoud tijd | $400 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000 (schaalt automatisch) | +| Kosten per query | $0 | $0,0005 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Geografische redundantie | $750+ per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $750+ | ~$15 | ## Gebruiker met een gemiddeld volume (3.000.000+ queries per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -| :-: | :-: | :-: | -| Maandelijkse serverkosten | $350 per maand | $0 | -| Querykosten | $500 per maand | $750 per maand | -| Engineering time | $800 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 3000000+ | -| Kosten per query | $0 | $0,00025 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Technische personeelskosten | $200 per uur | Inbegrepen | -| Geografische redundantie | $1200 totale kosten per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $1650+ | $750 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +|:---------------------------:|:-----------------------------------------:|:------------------------------------------------------------------------------------------------:| +| Maandelijkse serverkosten | $350 per maand | $0 | +| Querykosten | $500 per maand | $750 per maand | +| Onderhoud | $800 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 3000000+ | +| Kosten per query | $0 | $0,00025 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Technische personeelskosten | $200 per uur | Inbegrepen | +| Geografische redundantie | $1200 totale kosten per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $1650+ | $750 | ## Gebruiker met een hoog volume (30.000.000+ query's per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -| :-: | :-: | :-: | -| Maandelijkse serverkosten | $1100 per maand, per node | $0 | -| Querykosten | $4000 | $4500 per maand | -| Aantal benodigde nodes | 10 | Niet van toepassing | -| Engineering time | $6000 of meer per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000000+ | -| Kosten per query | $0 | $0.00015 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Geografische redundantie | $1200 totale kosten per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $11000+ | $4500 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +|:--------------------------:|:------------------------------------------:|:------------------------------------------------------------------------------------------------:| +| Maandelijkse serverkosten | $1100 per maand, per node | $0 | +| Querykosten | $4000 | $4500 per maand | +| Aantal benodigde nodes | 10 | Niet van toepassing | +| Onderhoud | $6000 of meer per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000000+ | +| Kosten per query | $0 | $0.00015 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Geografische redundantie | $1200 in totale kosten per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $11000+ | $4500 | \*inclusief kosten voor een back-up: $50-$100 per maand -Engineering time based on $200 per hour assumption +Onderhoud tijd gebaseerd op $200 per uur -gebruikmakend van de maximale querybudgetfunctie in het budgetfacturatietabblad, met behoud van hoge -kwaliteit van de service +gebruikmakend van de maximale querybudgetfunctie in het budgetfacturatietabblad, met behoud van hoge kwaliteit van de service Geschatte kosten gelden alleen voor Ethereum Mainnet-subgraphs - de kosten zijn nog hoger bij zelfhosting van een `graph-node` op andere netwerken. @@ -90,7 +89,7 @@ Geen voorafgaande kosten. Begin direct zonder voorafgaande- of overheadkosten. G ## Betrouwbaarheid & Veerkrachtigheid -The Graph’s decentralized network gives users access to geographic redundancy that does not exist when self-hosting a `graph-node`. Queries are served reliably thanks to 99.9%+ uptime, achieved by hundreds of independent Indexers securing the network globally. +Het gedecentraliseerde netwerk van The Graph biedt gebruikers toegang tot geografische redundantie die niet bestaat bij het zelf hosten van een `graph-node`. Query's worden betrouwbaar verwerkt dankzij een uptime van 99.9%+, behaald door honderden onafhankelijke Indexeerders die het netwerk wereldwijd beveiligen. Samenvattend: Het Graph Network is goedkoper, gemakkelijker te gebruiken en levert superieure resultaten in vergelijking met het lokaal hosten van een `graph-node`. From 981d1dfad30127662c404130415e7af972b89421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:20 -0400 Subject: [PATCH 314/924] New translations benefits.mdx (Polish) --- website/pages/pl/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/pl/network/benefits.mdx b/website/pages/pl/network/benefits.mdx index 864672b16515..09c0548bfc4f 100644 --- a/website/pages/pl/network/benefits.mdx +++ b/website/pages/pl/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From 9e9a262d2ea6572e69a6b3f103bea8824be1bc3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:20 -0400 Subject: [PATCH 315/924] New translations benefits.mdx (Portuguese) --- website/pages/pt/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/pt/network/benefits.mdx b/website/pages/pt/network/benefits.mdx index ce56b07f42a5..7465acbb3b36 100644 --- a/website/pages/pt/network/benefits.mdx +++ b/website/pages/pt/network/benefits.mdx @@ -27,47 +27,47 @@ Os custos de consulta podem variar; o custo citado é o normal até o fechamento ## Utilizador de Baixo Volume (menos de 30 mil queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -| :-: | :-: | :-: | -| Custo mensal de servidor\* | $350 por mês | $0 | -| Custos de query | $0+ | ~$15 por mês | -| Tempo de engenharia | $400 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 30.000 (autoescala) | -| Custo por query | $0 | $0.0005 | -| Infraestrutura | Centralizada | Descentralizada | -| Redundância geográfica | $750+ por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $750+ | ~$15 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +|:-------------------------------:|:---------------------------------------:|:-----------------------------------------------------------------:| +| Custo mensal de servidor\* | $350 por mês | $0 | +| Custos de query | $0+ | ~$15 por mês | +| Tempo de engenharia | $400 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 30.000 (autoescala) | +| Custo por query | $0 | $0.0005 | +| Infraestrutura | Centralizada | Descentralizada | +| Redundância geográfica | $750+ por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $750+ | ~$15 | ## Utilizador de Volume Médio (3.000.000+ queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -| :-: | :-: | :-: | -| Custo mensal de servidor\* | $350 por mês | $0 | -| Custos de query | $500 por mês | $750 por mês | -| Tempo de engenharia | $800 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 3.000.000+ | -| Custo por query | $0 | $0.00025 | -| Infraestrutura | Centralizada | Descentralizada | -| Custo de engenharia | $200 por hora | Incluído | -| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $1.650+ | $750 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +|:-------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------:| +| Custo mensal de servidor\* | $350 por mês | $0 | +| Custos de query | $500 por mês | $750 por mês | +| Tempo de engenharia | $800 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 3.000.000+ | +| Custo por query | $0 | $0.00025 | +| Infraestrutura | Centralizada | Descentralizada | +| Custo de engenharia | $200 por hora | Incluído | +| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $1.650+ | $750 | ## Utilizador de Volume Alto (30.000.000+ queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -| :-: | :-: | :-: | -| Custo mensal de servidor\* | $1.100 por mês, por node | $0 | -| Custos de query | $4.000 | $4.500 por mês | -| Número de nodes necessário | 10 | Não se aplica | -| Tempo de engenharia | $6.000 ou mais por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 30.000.000+ | -| Custo por query | $0 | $0.00015 | -| Infraestrutura | Centralizada | Descentralizada | -| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $11.000+ | $4.500 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +|:-------------------------------:|:-------------------------------------------:|:-----------------------------------------------------------------:| +| Custo mensal de servidor\* | $1.100 por mês, por node | $0 | +| Custos de query | $4.000 | $4.500 por mês | +| Número de nodes necessário | 10 | Não se aplica | +| Tempo de engenharia | $6.000 ou mais por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 30.000.000+ | +| Custo por query | $0 | $0.00015 | +| Infraestrutura | Centralizada | Descentralizada | +| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $11.000+ | $4.500 | \*com custos de backup incluídos: $50-$100 por mês From 28736756c40de4d39fbd768cae934006579150f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:21 -0400 Subject: [PATCH 316/924] New translations benefits.mdx (Russian) --- website/pages/ru/network/benefits.mdx | 73 +++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/website/pages/ru/network/benefits.mdx b/website/pages/ru/network/benefits.mdx index 05dfe6b13c35..2d482b34f48c 100644 --- a/website/pages/ru/network/benefits.mdx +++ b/website/pages/ru/network/benefits.mdx @@ -27,54 +27,53 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## Пользователь с небольшим количеством запросов (менее 30 000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -| :-: | :-: | :-: | -| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | -| Стоимость запроса | $0+ | ~$15 в месяц | -| Время разработки | $400 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000 (автоматическое масштабирование) | -| Стоимость одного запроса | $0 | $0.0005 | -| Инфраструктура | Централизованная | Децентрализованная | -| Географическая избыточность | $750+ за каждую дополнительную ноду | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $750+ | ~$15 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +|:---------------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | +| Стоимость запроса | $0+ | ~$15 в месяц | +| Время разработки | $400 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000 (автоматическое масштабирование) | +| Стоимость одного запроса | $0 | $0.0005 | +| Инфраструктура | Централизованная | Децентрализованная | +| Географическая избыточность | $750+ за каждую дополнительную ноду | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $750+ | ~$15 | ## Пользователь со средним количеством запросов (более 3,000,000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -| :-: | :-: | :-: | -| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | -| Стоимость запроса | $500 в месяц | $750 в месяц | -| Время разработки | $800 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 3,000,000+ | -| Стоимость одного запроса | $0 | $0.00025 | -| Инфраструктура | Централизованная | Децентрализованная | -| Инженерные расходы | $200 в час | Включено | -| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $1,650+ | $750 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +|:---------------------------------:|:-------------------------------------------------------------:|:---------------------------------------------------------------:| +| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | +| Стоимость запроса | $500 в месяц | $750 в месяц | +| Время разработки | $800 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 3,000,000+ | +| Стоимость одного запроса | $0 | $0.00025 | +| Инфраструктура | Централизованная | Децентрализованная | +| Инженерные расходы | $200 в час | Включено | +| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $1,650+ | $750 | ## Пользователь с высоким количеством запросов (более 30,000,000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -| :-: | :-: | :-: | -| Ежемесячная стоимость сервера\* | $1100 в месяц за ноду | $0 | -| Стоимость запроса | $4000 | $4,500 в месяц | -| Необходимое количество нод | 10 | Не подходит | -| Время разработки | $6,000 или больше в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000,000+ | -| Стоимость одного запроса | $0 | $0.00015 | -| Инфраструктура | Централизованная | Децентрализованная | -| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $11,000+ | $4,500 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +|:---------------------------------:|:-------------------------------------------------------------:|:---------------------------------------------------------------:| +| Ежемесячная стоимость сервера\* | $1100 в месяц за ноду | $0 | +| Стоимость запроса | $4000 | $4,500 в месяц | +| Необходимое количество нод | 10 | Не подходит | +| Время разработки | $6,000 или больше в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000,000+ | +| Стоимость одного запроса | $0 | $0.00015 | +| Инфраструктура | Централизованная | Децентрализованная | +| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $11,000+ | $4,500 | \* включая расходы на резервное копирование: $50-$100 в месяц Время разработки основано на предположении о $200 в час -используя функцию максимального бюджета запроса на вкладке бюджетное выставление счетов, сохраняя при этом -высокое качество обслуживания +используя функцию максимального бюджета запроса на вкладке бюджетное выставление счетов, сохраняя при этом высокое качество обслуживания Предполагаемые затраты указаны только для субграфов в основной сети Ethereum — затраты еще выше при самостоятельном размещении `graph-node` в других сетях. From d77de7b3b81d7f74bf2ba087316f86c01a596893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:22 -0400 Subject: [PATCH 317/924] New translations benefits.mdx (Swedish) --- website/pages/sv/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/sv/network/benefits.mdx b/website/pages/sv/network/benefits.mdx index c94c62e684dc..e8713d003ce3 100644 --- a/website/pages/sv/network/benefits.mdx +++ b/website/pages/sv/network/benefits.mdx @@ -27,47 +27,47 @@ Frågekostnaderna kan variera; den citerade kostnaden är genomsnittet vid publi ## Användare Med Låg Volym (färre än 30,000 frågor per månad) -| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | -| :-: | :-: | :-: | -| Månatlig kostnad för server\* | $350 per månad | $0 | -| Kostnad för frågor | $0+ | ~$15 per månad | -| Konstruktionstid | $400 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 30 000 (automatisk skalning) | -| Kostnad per fråga | $0 | $0.0005 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Geografisk redundans | $750+ per extra nod | Inkluderat | -| Drifttid | Varierande | 99.9%+ | -| Total Månadskostnad | $750+ | ~$15 | +| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | +|:-------------------------------:|:---------------------------------------:|:-------------------------------------------------------------:| +| Månatlig kostnad för server\* | $350 per månad | $0 | +| Kostnad för frågor | $0+ | ~$15 per månad | +| Konstruktionstid | $400 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 30 000 (automatisk skalning) | +| Kostnad per fråga | $0 | $0.0005 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Geografisk redundans | $750+ per extra nod | Inkluderat | +| Drifttid | Varierande | 99.9%+ | +| Total Månadskostnad | $750+ | ~$15 | ## Medium volym användare (3,000,000+ förfrågningar per månad) -| Kostnadsjämförelse | Egen Värd | Graph Nätverk | -| :-: | :-: | :-: | -| Månadskostnad för server\* | $350 per månad | $0 | -| Kostnad för frågor | $500 per månad | $750 per månad | -| Ingenjörstid | $800 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 3,000,000+ | -| Kostnad per fråga | $0 | $0.00025 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Kostnader för ingenjörsarbete | $200 per timme | Inkluderat | -| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | -| Drifttid | Varierar | 99.9%+ | -| Total Månadskostnad | $1,650+ | $750 | +| Kostnadsjämförelse | Egen Värd | Graph Nätverk | +|:-----------------------------:|:------------------------------------------:|:-------------------------------------------------------------:| +| Månadskostnad för server\* | $350 per månad | $0 | +| Kostnad för frågor | $500 per månad | $750 per månad | +| Ingenjörstid | $800 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 3,000,000+ | +| Kostnad per fråga | $0 | $0.00025 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Kostnader för ingenjörsarbete | $200 per timme | Inkluderat | +| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | +| Drifttid | Varierar | 99.9%+ | +| Total Månadskostnad | $1,650+ | $750 | ## Användare Med Hög Volym (30,000,000+ frågor per månad) -| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | -| :-: | :-: | :-: | -| Månadskostnad för server\* | $1100 per månad, per nod | $0 | -| Kostnad för frågor | $4000 | $4,500 per månad | -| Antal noder som behövs | 10 | Ej tillämpligt | -| Ingenjörstid | $6,000 eller mer per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 30,000,000+ | -| Kostnad per fråga | $0 | $0.00015 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | -| Drifttid | Varierar | 99.9%+ | -| Total Månadskostnad | $11,000+ | $4,500 | +| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | +|:----------------------------:|:-------------------------------------------:|:-------------------------------------------------------------:| +| Månadskostnad för server\* | $1100 per månad, per nod | $0 | +| Kostnad för frågor | $4000 | $4,500 per månad | +| Antal noder som behövs | 10 | Ej tillämpligt | +| Ingenjörstid | $6,000 eller mer per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 30,000,000+ | +| Kostnad per fråga | $0 | $0.00015 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | +| Drifttid | Varierar | 99.9%+ | +| Total Månadskostnad | $11,000+ | $4,500 | \*inklusive kostnader för backup: $50-$100 per månad From bdb5b53d2a91e5a129a3bba313a4d081edd4051c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:23 -0400 Subject: [PATCH 318/924] New translations benefits.mdx (Turkish) --- website/pages/tr/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/tr/network/benefits.mdx b/website/pages/tr/network/benefits.mdx index 633b6a7740c8..6b888d327926 100644 --- a/website/pages/tr/network/benefits.mdx +++ b/website/pages/tr/network/benefits.mdx @@ -27,47 +27,47 @@ Sorgu maliyetleri değişebilir; alıntılanan maliyet, yayın tarihindeki (Aral ## Düşük Hacimli Kullanıcı (ayda 30.000'den az sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -| :-: | :-: | :-: | -| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | -| Sorgu maliyetleri | 0$ + | Aylık yaklaşık 15$ | -| Mühendislik süresi | Aylık 400$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 30.000 (otomatik ölçeklendirme) | -| Sorgu başına maliyet | 0$ | 0.0005$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Coğrafi fazlalıklar | Ek node başına 750$+ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | $750+ | ~$15 | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +|:------------------------------:|:---------------------------------------:|:-------------------------------------------------------------------------:| +| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | +| Sorgu maliyetleri | 0$ + | Aylık yaklaşık 15$ | +| Mühendislik süresi | Aylık 400$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 30.000 (otomatik ölçeklendirme) | +| Sorgu başına maliyet | 0$ | 0.0005$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Coğrafi fazlalıklar | Ek node başına 750$+ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | $750+ | ~$15 | ## Orta Hacimli Kullanıcı (ayda 3.000.000'den fazla sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -| :-: | :-: | :-: | -| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | -| Sorgu maliyetleri | Aylık 500$ | Aylık 750$ | -| Mühendislik süresi | Aylık 800$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 3,000,000+ | -| Sorgu başına maliyet | 0$ | 0.00025$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Mühendislik gideri | Saatlik 200$ | Dahil | -| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | 1,650$+ | 750$ | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +|:------------------------------:|:------------------------------------------:|:-------------------------------------------------------------------------:| +| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | +| Sorgu maliyetleri | Aylık 500$ | Aylık 750$ | +| Mühendislik süresi | Aylık 800$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 3,000,000+ | +| Sorgu başına maliyet | 0$ | 0.00025$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Mühendislik gideri | Saatlik 200$ | Dahil | +| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | 1,650$+ | 750$ | ## Yüksek Hacimli Kullanıcı (ayda 30.000.000'den fazla sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -| :-: | :-: | :-: | -| Aylık sunucu maliyeti\* | Node başına aylık 1100$ | 0$ | -| Sorgu maliyetleri | 4000$ | Aylık 4500$ | -| Gerekli node sayısı | 10 | Şart yok | -| Mühendislik süresi | Ayda 6.000 $ veya daha fazlası | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 30,000,000+ | -| Sorgu başına maliyet | 0$ | 0.00015$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | 11,000$+ | 4500$ | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +|:------------------------------:|:-------------------------------------------:|:-------------------------------------------------------------------------:| +| Aylık sunucu maliyeti\* | Node başına aylık 1100$ | 0$ | +| Sorgu maliyetleri | 4000$ | Aylık 4500$ | +| Gerekli node sayısı | 10 | Şart yok | +| Mühendislik süresi | Ayda 6.000 $ veya daha fazlası | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 30,000,000+ | +| Sorgu başına maliyet | 0$ | 0.00015$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | 11,000$+ | 4500$ | \*yedekleme maliyetleri dahil: aylık $50-$100 From 908f9ea6b50d3ea39c45ab9af1d50603bb4295d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:24 -0400 Subject: [PATCH 319/924] New translations benefits.mdx (Ukrainian) --- website/pages/uk/network/benefits.mdx | 73 +++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/website/pages/uk/network/benefits.mdx b/website/pages/uk/network/benefits.mdx index b12002a1b0ec..08bfd02f8129 100644 --- a/website/pages/uk/network/benefits.mdx +++ b/website/pages/uk/network/benefits.mdx @@ -27,54 +27,53 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Малоактивний користувач (менше ніж 30 000 запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -| :-: | :-: | :-: | -| Щомісячна плата за сервер\* | $350 на місяць | $0 | -| Вартість запитів | $0+ | ~$15 на місяць | -| Час технічного обслуговування | $400 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30 000 (автомасштабування) | -| Вартість одного запиту | $0 | $0.0005 | -| Інфраструктура | Централізована | Децентралізована | -| Географічне резервування | $750+ за кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $750+ | ~$15 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +|:-----------------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------:| +| Щомісячна плата за сервер\* | $350 на місяць | $0 | +| Вартість запитів | $0+ | ~$15 на місяць | +| Час технічного обслуговування | $400 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30 000 (автомасштабування) | +| Вартість одного запиту | $0 | $0.0005 | +| Інфраструктура | Централізована | Децентралізована | +| Географічне резервування | $750+ за кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $750+ | ~$15 | ## Середній користувач (3 000 000+ запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -| :-: | :-: | :-: | -| Щомісячна плата за сервер\* | $350 на місяць | $0 | -| Вартість запитів | $500 на місяць | $750 на місяць | -| Час технічного обслуговування | $800 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 3,000,000+ | -| Вартість одного запиту | $0 | $0.00025 | -| Інфраструктура | Централізована | Децентралізована | -| Інженерно-технічні витрати | $200 на годину | Включено | -| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $1,650+ | $750 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +|:-----------------------------------------:|:-----------------------------------------------:|:-----------------------------------------------------------------:| +| Щомісячна плата за сервер\* | $350 на місяць | $0 | +| Вартість запитів | $500 на місяць | $750 на місяць | +| Час технічного обслуговування | $800 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 3,000,000+ | +| Вартість одного запиту | $0 | $0.00025 | +| Інфраструктура | Централізована | Децентралізована | +| Інженерно-технічні витрати | $200 на годину | Включено | +| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $1,650+ | $750 | ## Високоактивний користувач (30 000 000+ запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -| :-: | :-: | :-: | -| Щомісячна плата за сервер\* | $1100 на місяць, за одну ноду | $0 | -| Вартість запитів | $4000 | $4,500 на місяць | -| Кількість необхідних нод | 10 | Не стосується | -| Час технічного обслуговування | $6,000 і більше на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30,000,000+ | -| Вартість одного запиту | $0 | $0.00015 | -| Інфраструктура | Централізована | Децентралізована | -| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $11,000+ | $4,500 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +|:-----------------------------------------:|:-----------------------------------------------:|:-----------------------------------------------------------------:| +| Щомісячна плата за сервер\* | $1100 на місяць, за одну ноду | $0 | +| Вартість запитів | $4000 | $4,500 на місяць | +| Кількість необхідних нод | 10 | Не стосується | +| Час технічного обслуговування | $6,000 і більше на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30,000,000+ | +| Вартість одного запиту | $0 | $0.00015 | +| Інфраструктура | Централізована | Децентралізована | +| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $11,000+ | $4,500 | \*включаючи витрати на резервне копіювання: $50-$100 на місяць Час технічного обслуговування, розрахований на основі припущення $200 за годину -використання функції максимального бюджету запиту у вкладці бюджетного тарифоутворення зі збереженням -високої якості обслуговування +використання функції максимального бюджету запиту у вкладці бюджетного тарифоутворення зі збереженням високої якості обслуговування Estimated costs are only for Ethereum Mainnet subgraphs — costs are even higher when self hosting a `graph-node` on other networks. From 5a3f1dbe4cfaa1ccf26b7a009d01c1a042463036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:26 -0400 Subject: [PATCH 320/924] New translations benefits.mdx (Chinese Simplified) --- website/pages/zh/network/benefits.mdx | 72 +++++++++++++-------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/website/pages/zh/network/benefits.mdx b/website/pages/zh/network/benefits.mdx index 1d1b32f131db..a6e203c5894b 100644 --- a/website/pages/zh/network/benefits.mdx +++ b/website/pages/zh/network/benefits.mdx @@ -27,49 +27,49 @@ Graph的去中心化网络经过精心设计和完善,创造了强大的索引 ## 低容量用户(每月少于30,000次查询) -| 成本比较 | 自托管 | Graph网络 | -| :------------------: | :-------------------------------------: | :----------------------------------------: | -| 每月服务器费用 \* | 每月350美元 | 0美元 | -| 查询成本 | $0+ | ~15美元每月 | -| 工程时间 | 400美元每月 | 没有,内置在具有全球去中心化索引者的网络中 | -| 每月查询 | 受限于基础设施能力 | 30,000(自动扩缩) | -| 每个查询的成本 | 0美元 | $0.0005 | -| 基础设施 | 中心化 | 去中心化 | -| 异地备援 | 每个额外节点 $750 + | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | $750+ | ~$15 | +| 成本比较 | 自托管 | Graph网络 | +|:----------------:|:---------------------------------------:|:---------------------:| +| 每月服务器费用 \* | 每月350美元 | 0美元 | +| 查询成本 | $0+ | ~15美元每月 | +| 工程时间 | 400美元每月 | 没有,内置在具有全球去中心化索引者的网络中 | +| 每月查询 | 受限于基础设施能力 | 30,000(自动扩缩) | +| 每个查询的成本 | 0美元 | $0.0005 | +| 基础设施 | 中心化 | 去中心化 | +| 异地备援 | 每个额外节点 $750 + | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | $750+ | ~$15 | ## 中等容量用户(每月超过3,000,000次查询) -| 成本比较 | 自托管 | Graph网络 | -| :------------------: | :---------------------------------------------: | :----------------------------------------: | -| 每月服务器费用 \* | 每月350美元 | 0美元 | -| 查询成本 | 每月500美元 | 每月750美元 | +| 成本比较 | 自托管 | Graph网络 | +|:----------------:|:-------------------------------------------:|:---------------------:| +| 每月服务器费用 \* | 每月350美元 | 0美元 | +| 查询成本 | 每月500美元 | 每月750美元 | | 工程时间 | 每月800美元 | 没有,内置在具有全球去中心化索引者的网络中 | -| 每月查询 | 受限于基础设施能力 | 3,000,000+ | -| 每个查询的成本 | 0美元 | 0.00025美元 | -| 基础设施 | 中心化 | 去中心化 | -| 工程费用 | 每小时200美元 | 包括在内 | -| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | 1650美元以上 | 750美元 | +| 每月查询 | 受限于基础设施能力 | 3,000,000+ | +| 每个查询的成本 | 0美元 | 0.00025美元 | +| 基础设施 | 中心化 | 去中心化 | +| 工程费用 | 每小时200美元 | 包括在内 | +| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | 1650美元以上 | 750美元 | ## 高容量用户(每月超过30,000,000次查询) -| 成本比较 | 自托管 | Graph网络 | -| :------------------: | :-------------------------------------------: | :----------------------------------------: | -| 每月服务器费用 \* | 1100美元每月每节点 | 0美元 | -| 查询成本 | 4000美元 | 4500美元每月 | -| 需要的节点数量 | 10 | 不适用 | -| 工程时间 | 每月6000美元或以上 | 没有,内置在具有全球去中心化索引人的网络中 | -| 每月查询 | 受限于基础设施能力 | 30,000,000+ | -| 每个查询的成本 | 0美元 | 0.00015美元 | -| 基础设施 | 中心化 | 去中心化 | -| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | 11000+美元 | 4500美元 | - -- 包括后备费用: 每月$50-$100美元 +| 成本比较 | 自托管 | Graph网络 | +|:----------------:|:-------------------------------------------:|:---------------------:| +| 每月服务器费用 \* | 1100美元每月每节点 | 0美元 | +| 查询成本 | 4000美元 | 4500美元每月 | +| 需要的节点数量 | 10 | 不适用 | +| 工程时间 | 每月6000美元或以上 | 没有,内置在具有全球去中心化索引人的网络中 | +| 每月查询 | 受限于基础设施能力 | 30,000,000+ | +| 每个查询的成本 | 0美元 | 0.00015美元 | +| 基础设施 | 中心化 | 去中心化 | +| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | 11000+美元 | 4500美元 | + +* 包括后备费用: 每月$50-$100美元 按每小时200美元的假设计算的工程时间 From 5367c75e170f85839cfc505979e1c8ab64c7dd58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:26 -0400 Subject: [PATCH 321/924] New translations benefits.mdx (Urdu (Pakistan)) --- website/pages/ur/network/benefits.mdx | 77 +++++++++++++-------------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/website/pages/ur/network/benefits.mdx b/website/pages/ur/network/benefits.mdx index dd0d9d2b3f80..f11155bd5c5a 100644 --- a/website/pages/ur/network/benefits.mdx +++ b/website/pages/ur/network/benefits.mdx @@ -27,54 +27,53 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## کم والیوم صارف (فی مہینہ 30,000 سے کم سوالات) -| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | -| :-: | :-: | :-: | -| ماہانہ سرور کی قیمت/\* | $350 فی مہینہ | $0 | -| استفسار کے اخراجات | $0+ | ~$15 فی مہینہ | -| انجینئرنگ کا وقت | $400 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000 (آٹو اسکیلنگ) | -| قیمت فی سوال | $0 | $0.0005 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| جغرافیائی فالتو پن | $750+ فی اضافی نوڈ | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $750+ | ~$15 | +| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | +|:----------------------------:|:---------------------------------------:|:-------------------------------------------------------------------------------:| +| ماہانہ سرور کی قیمت/* | $350 فی مہینہ | $0 | +| استفسار کے اخراجات | $0+ | ~$15 فی مہینہ | +| انجینئرنگ کا وقت | $400 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000 (آٹو اسکیلنگ) | +| قیمت فی سوال | $0 | $0.0005 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| جغرافیائی فالتو پن | $750+ فی اضافی نوڈ | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $750+ | ~$15 | ## درمیانے حجم کا صارف (3,000,000+ سوالات فی مہینہ) -| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | -| :-: | :-: | :-: | -| ماہانہ سرور کی قیمت/\* | $350 فی مہینہ | $0 | -| استفسار کے اخراجات | $500 فی مہینہ | $750 فی مہینہ | -| انجینئرنگ کا وقت | $800 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 3,000,000+ | -| قیمت فی سوال | $0 | $0.00025 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| انجینئرنگ کے اخراجات | $200 فی گھنٹہ | شامل | -| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $1,650+ | $750 | +| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | +|:----------------------------:|:------------------------------------------:|:-------------------------------------------------------------------------------:| +| ماہانہ سرور کی قیمت/* | $350 فی مہینہ | $0 | +| استفسار کے اخراجات | $500 فی مہینہ | $750 فی مہینہ | +| انجینئرنگ کا وقت | $800 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 3,000,000+ | +| قیمت فی سوال | $0 | $0.00025 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| انجینئرنگ کے اخراجات | $200 فی گھنٹہ | شامل | +| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $1,650+ | $750 | ## زیادہ حجم والا صارف (30,000,000+ سوالات فی مہینہ) -| اخراجات کا موازنہ | سیلف ہوسٹڈ | گراف نیٹ ورک | -| :-: | :-: | :-: | -| ماہانہ سرور کی قیمت/\* | $1100 فی مہینہ، فی نوڈ | $0 | -| استفسار کے اخراجات | $4000 | $4,500 فی مہینہ | -| نوڈس کی تعداد درکار ہے | 10 | قابل اطلاق نہیں | -| انجینئرنگ کا وقت | $6,000 یا اس سے زیادہ فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000,000+ | -| قیمت فی سوال | $0 | $0.00015 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $11,000+ | $4,500 | - -/\*بیک اپ کے اخراجات سمیت: $50-$100 فی مہینہ +| اخراجات کا موازنہ | سیلف ہوسٹڈ | گراف نیٹ ورک | +|:----------------------------:|:-------------------------------------------:|:-------------------------------------------------------------------------------:| +| ماہانہ سرور کی قیمت/* | $1100 فی مہینہ، فی نوڈ | $0 | +| استفسار کے اخراجات | $4000 | $4,500 فی مہینہ | +| نوڈس کی تعداد درکار ہے | 10 | قابل اطلاق نہیں | +| انجینئرنگ کا وقت | $6,000 یا اس سے زیادہ فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000,000+ | +| قیمت فی سوال | $0 | $0.00015 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $11,000+ | $4,500 | + +/*بیک اپ کے اخراجات سمیت: $50-$100 فی مہینہ $200 فی گھنٹہ کے مفروضے کی بنیاد پر انجینئرنگ کا وقت -بجٹ بلنگ ٹیب میں زیادہ سے زیادہ کیوری بجٹ فنکشن کا استعمال کرتے ہوئے، سروس کے اعلی معیار کو برقرار رکھتے -ہوئے +بجٹ بلنگ ٹیب میں زیادہ سے زیادہ کیوری بجٹ فنکشن کا استعمال کرتے ہوئے، سروس کے اعلی معیار کو برقرار رکھتے ہوئے تخمینی لاگتیں صرف ایتھیریم مینیٹ سب گراف کے لیے ہیں — دوسرے نیٹ ورکس پر `graph-node` کی خود ہوسٹڈ کرنے پر اخراجات اس سے بھی زیادہ ہوتے ہیں. From 2f07699690ae255c9e58b03452db94307a61293b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:27 -0400 Subject: [PATCH 322/924] New translations benefits.mdx (Vietnamese) --- website/pages/vi/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/vi/network/benefits.mdx b/website/pages/vi/network/benefits.mdx index b2fa328ed82f..c27a5f37f9f6 100644 --- a/website/pages/vi/network/benefits.mdx +++ b/website/pages/vi/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From 56dca1f189a292582d984412d879a21af47d6ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:28 -0400 Subject: [PATCH 323/924] New translations benefits.mdx (Marathi) --- website/pages/mr/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/mr/network/benefits.mdx b/website/pages/mr/network/benefits.mdx index c3322af4ad95..bacc3941bb26 100644 --- a/website/pages/mr/network/benefits.mdx +++ b/website/pages/mr/network/benefits.mdx @@ -27,47 +27,47 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## कमी आवाज वापरकर्ता (दरमहा 30,000 पेक्षा कमी क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | -| क्वेरी खर्च | $0+ | दरमहा ~$15 | -| अभियांत्रिकी वेळ | दरमहा $400 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000 (ऑटोस्केलिंग) | -| प्रति क्वेरी खर्च | $0 | $0.0005 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड $750+ | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $750+ | ~$15 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +|:----------------------------:|:---------------------------------------:|:------------------------------------------------------------------------:| +| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | +| क्वेरी खर्च | $0+ | दरमहा ~$15 | +| अभियांत्रिकी वेळ | दरमहा $400 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000 (ऑटोस्केलिंग) | +| प्रति क्वेरी खर्च | $0 | $0.0005 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड $750+ | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $750+ | ~$15 | ## मध्यम व्हॉल्यूम वापरकर्ता (दरमहा 3,000,000+ क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | -| क्वेरी खर्च | दरमहा $500 | दरमहा $750 | -| अभियांत्रिकी वेळ | दरमहा $800 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 3,000,000+ | -| प्रति क्वेरी खर्च | $0 | $0.00025 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| अभियांत्रिकी खर्च | $200 प्रति तास | समाविष्ट | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $1,650+ | $750 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +|:----------------------------:|:------------------------------------------:|:------------------------------------------------------------------------:| +| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | +| क्वेरी खर्च | दरमहा $500 | दरमहा $750 | +| अभियांत्रिकी वेळ | दरमहा $800 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 3,000,000+ | +| प्रति क्वेरी खर्च | $0 | $0.00025 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| अभियांत्रिकी खर्च | $200 प्रति तास | समाविष्ट | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $1,650+ | $750 | ## उच्च व्हॉल्यूम वापरकर्ता (दरमहा 30,000,000+ क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्व्हर खर्च\* | प्रति नोड, प्रति महिना $1100 | $0 | -| क्वेरी खर्च | $4000 | दरमहा $4,500 | -| आवश्यक नोड्सची संख्या | 10 | लागू नाही | -| अभियांत्रिकी वेळ | दरमहा $6,000 किंवा अधिक | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000,000+ | -| प्रति क्वेरी खर्च | $0 | $0.00015 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $11,000+ | $4,500 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +|:----------------------------:|:-------------------------------------------:|:------------------------------------------------------------------------:| +| मासिक सर्व्हर खर्च\* | प्रति नोड, प्रति महिना $1100 | $0 | +| क्वेरी खर्च | $4000 | दरमहा $4,500 | +| आवश्यक नोड्सची संख्या | 10 | लागू नाही | +| अभियांत्रिकी वेळ | दरमहा $6,000 किंवा अधिक | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000,000+ | +| प्रति क्वेरी खर्च | $0 | $0.00015 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $11,000+ | $4,500 | \*बॅकअपच्या खर्चासह: $50-$100 प्रति महिना From ca9a7638d057e42ca3fadad3bcf05a1cea1f9ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:29 -0400 Subject: [PATCH 324/924] New translations benefits.mdx (Hindi) --- website/pages/hi/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/hi/network/benefits.mdx b/website/pages/hi/network/benefits.mdx index b145895e7853..fe2a99679c50 100644 --- a/website/pages/hi/network/benefits.mdx +++ b/website/pages/hi/network/benefits.mdx @@ -27,47 +27,47 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## कम मात्रा वाले उपयोगकर्ता (प्रति माह 30,000 से कम प्रश्न) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | -| पूछताछ लागत | $0+ | ~ $ 15 प्रति माह | -| इंजीनियरिंग का समय | $ 400 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000 (ऑटो स्केलिंग) | -| लागत प्रति क्वेरी | $0 | $0.0005 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| भौगोलिक अतिरेक | $750+ प्रति अतिरिक्त नोड | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $750+ | ~$15 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +|:------------------------------:|:---------------------------------------:|:----------------------------------------------------------------------:| +| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | +| पूछताछ लागत | $0+ | ~ $ 15 प्रति माह | +| इंजीनियरिंग का समय | $ 400 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000 (ऑटो स्केलिंग) | +| लागत प्रति क्वेरी | $0 | $0.0005 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| भौगोलिक अतिरेक | $750+ प्रति अतिरिक्त नोड | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $750+ | ~$15 | ## मध्यम मात्रा उपयोगकर्ता (3,000,000+ प्रश्न प्रति माह) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | -| पूछताछ लागत | $ 500 प्रति माह | $750 प्रति माह | -| इंजीनियरिंग का समय | $800 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 3,000,000+ | -| लागत प्रति क्वेरी | $0 | $0.00025 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| इंजीनियरिंग खर्च | $ 200 प्रति घंटा | शामिल | -| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $1,650+ | $750 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +|:------------------------------:|:------------------------------------------:|:----------------------------------------------------------------------:| +| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | +| पूछताछ लागत | $ 500 प्रति माह | $750 प्रति माह | +| इंजीनियरिंग का समय | $800 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 3,000,000+ | +| लागत प्रति क्वेरी | $0 | $0.00025 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| इंजीनियरिंग खर्च | $ 200 प्रति घंटा | शामिल | +| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $1,650+ | $750 | ## उच्च मात्रा उपयोगकर्ता (30,000,000+ प्रश्न प्रति माह) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्वर लागत\* | $1100 प्रति माह, प्रति नोड | $0 | -| पूछताछ लागत | $4000 | $4,500 per month | -| आवश्यक नोड्स की संख्या | 10 | Not applicable | -| इंजीनियरिंग का समय | $6,000 or more per month | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000,000+ | -| लागत प्रति क्वेरी | $0 | $0.00015 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $11,000+ | $4,500 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +|:------------------------------:|:-------------------------------------------:|:----------------------------------------------------------------------:| +| मासिक सर्वर लागत\* | $1100 प्रति माह, प्रति नोड | $0 | +| पूछताछ लागत | $4000 | $4,500 per month | +| आवश्यक नोड्स की संख्या | 10 | Not applicable | +| इंजीनियरिंग का समय | $6,000 or more per month | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000,000+ | +| लागत प्रति क्वेरी | $0 | $0.00015 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $11,000+ | $4,500 | \*बैकअप की लागत सहित: $50-$100 प्रति माह From 2cd18a69362fa1bd9e89cbc996cf96a99a79baed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:30 -0400 Subject: [PATCH 325/924] New translations benefits.mdx (Yoruba) --- website/pages/yo/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/yo/network/benefits.mdx b/website/pages/yo/network/benefits.mdx index 864672b16515..09c0548bfc4f 100644 --- a/website/pages/yo/network/benefits.mdx +++ b/website/pages/yo/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From 6940190cdd8d10aa08f0bde281c11205c326a1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:32 -0400 Subject: [PATCH 326/924] New translations billing.mdx (French) --- website/pages/fr/billing.mdx | 108 +++++++++++++++++------------------ 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/website/pages/fr/billing.mdx b/website/pages/fr/billing.mdx index 5c5c04396519..72b266edbdf0 100644 --- a/website/pages/fr/billing.mdx +++ b/website/pages/fr/billing.mdx @@ -2,104 +2,104 @@ title: Billing --- -> Invoices are generated on a weekly basis. +> Les factures sont générées sur une base hebdomadaire. -There are two options for paying for your query fees: +Il existe deux options pour payer vos frais de requête : -- [Paying with fiat currency with Banxa](#billing-with-banxa) -- [Paying with crypto wallet](#billing-on-arbitrum) +- [Payer en monnaie fiduciaire avec Banxa](#billing-with-banxa) +- [Payer avec un portefeuille crypto](#billing-on-arbitrum) -## Billing with Banxa +## Facturation avec Banxa -Banxa enables you to bypass the need for an exchange and pay for your query fees using the fiat currency of your choice. The fiat currency will be converted to GRT, added to your account balance on the billing contract, and used to pay for queries associated with your API keys. +Banxa vous permet de contourner le besoin d'un échange et de payer vos frais de requête en utilisant la monnaie fiduciaire de votre choix. La monnaie fiduciaire sera convertie en GRT, ajoutée au solde de votre compte sur le contrat de facturation et utilisée pour payer les requêtes associées à vos clés API. -There may be KYC requirements depending on the regulations in your country. For more information about KYC, please visit [Banxa's FAQ page](https://docs.banxa.com/docs/faqs). +Il peut y avoir des exigences KYC en fonction de la réglementation en vigueur dans votre pays. Pour plus d'informations sur KYC, veuillez visiter la [page FAQ de Banxa](https://docs.banxa.com/docs/faqs). -You can learn more about Banxa by reading their [documentation](https://docs.banxa.com/docs). +Vous pouvez en savoir plus sur Banxa en lisant leur [documentation](https://docs.banxa.com/docs). -### Paying for query fees with Banxa +### Payer les frais de requête avec Banxa -1. Select “Pay with Card” option in [Subgraph Studio](https://thegraph.com/studio/billing/?show=Deposit). -2. Enter the amount of GRT to be added to your account balance. -3. Click the 'Continue with Banxa' button. -4. Enter necessary banking information on Banxa including payment method & fiat currency of choice. -5. Finish the transaction. +1. Sélectionnez l'option « Payer par carte » dans [Subgraph Studio](https://thegraph.com/studio/billing/?show=Deposit). +2. Saisissez le montant de GRT à ajouter au solde de votre compte. +3. Cliquez sur le bouton « Continuer avec Banxa ». +4. Saisissez les informations bancaires nécessaires sur Banxa, y compris le mode de paiement & et le paiement monnaie fiduciaire de votre choix. +5. Terminez la transaction. -It may take up to 10 minutes to complete the transaction. Once the transaction is confirmed, the purchased GRT will automatically be added to your account balance on Arbitrum. +La finalisation de la transaction peut prendre jusqu'à 10 minutes. Une fois la transaction confirmée, le GRT acheté sera automatiquement ajouté au solde de votre compte sur Arbitrum. ## Billing on Arbitrum Alors que le protocole The Graph fonctionne sur Ethereum Mainnet, le [contrat de facturation](https://arbiscan.io/address/0x1b07d3344188908fb6deceac381f3ee63c48477a) réside sur le réseau [Arbitrum](https://arbitrum.io/) pour réduire les délais et les coûts de transaction. Vous devrez payer les frais de requête générés à partir de vos clés API. Grâce au contrat de facturation, vous pourrez : -- Add and withdraw GRT from your account balance. -- Keep track of your balances based on how much GRT you have added to your account balance, how much you have removed, and your invoices. -- Automatically pay invoices based on query fees generated, as long as there is enough GRT in your account balance. +- Ajoutez et retirez du GRT du solde de votre compte. +- Gardez une trace de vos soldes en fonction du montant de GRT que vous avez ajouté au solde de votre compte, du montant que vous avez supprimé et de vos factures. +- Payez automatiquement les factures en fonction des frais de requête générés, à condition qu'il y ait suffisamment de GRT dans le solde de votre compte. -### Adding GRT using a crypto wallet +### Ajouter GRT à l'aide d'un portefeuille crypto -> This section is written assuming you already have GRT in your crypto wallet, and you're on Ethereum mainnet. If you don't have GRT, you can learn how to get GRT [here](#getting-grt). +> Cette section est rédigée en supposant que vous avez déjà GRT dans votre portefeuille crypto et que vous êtes sur le réseau principal Ethereum. Si vous n'avez pas GRT, vous pouvez apprendre comment obtenir GRT [ici](#getting-grt). -For a video walkthrough of adding GRT to your billing balance using a crypto wallet, watch this [video](https://youtu.be/4Bw2sh0FxCg). +Pour découvrir en vidéo comment ajouter du GRT à votre solde de facturation à l'aide d'un portefeuille cryptographique, regardez cette [vidéo](https://youtu.be/4Bw2sh0FxCg). 1. Accédez à la [page de facturation de Subgraph Studio](https://thegraph.com/studio/billing/). -2. Click on the "Connect Wallet" button on the top right corner of the page. You'll be redirected to the wallet selection page. Select your wallet and click on "Connect". +2. Cliquez sur le bouton « Connecter le portefeuille » dans le coin supérieur droit de la page. Vous serez redirigé vers la page de sélection du portefeuille. Sélectionnez votre portefeuille et cliquez sur "Connecter". -3. Click the 'Add GRT' button at the center of the page. A side panel will appear. +3. Cliquez sur le bouton « Ajouter GRT » au centre de la page. Un panneau latéral apparaîtra. -4. Enter the amount of GRT you want to add to your account balance. You can also select the maximum amount of GRT you want to add to your account balance by clicking on the "Max" button. +4. Saisissez le montant de GRT que vous souhaitez ajouter au solde de votre compte. Vous pouvez également sélectionner le montant maximum de GRT que vous souhaitez ajouter au solde de votre compte en cliquant sur le bouton « Max ». -5. Click 'Allow GRT Access' to allow the Subgraph Studio to access your GRT. Sign the associated transaction in your wallet. This will not cost any gas. +5. Cliquez sur « Autoriser l'accès à GRT » pour permettre à Subgraph Studio d'accéder à votre GRT. Signez la transaction associée dans votre portefeuille. Cela ne coûtera aucun gaz. -6. Click 'Add GRT to account balance' to add the GRT to your account balance. Sign the associated transaction in your wallet. This will cost gas. +6. Cliquez sur « Ajouter le GRT au solde du compte » pour ajouter le GRT au solde de votre compte. Signez la transaction associée dans votre portefeuille. Cela coûtera du gaz. -7. Once the transaction is confirmed, you'll see the GRT added to your account balance within an hour. +7. Une fois la transaction confirmée, vous verrez le GRT ajouté au solde de votre compte dans l'heure. -### Withdrawing GRT using a crypto wallet +### Retirer du GRT à l'aide d'un portefeuille crypto -> This section is written assuming you have deposited GRT into your account balance on [Subgraph Studio](https://thegraph.com/studio/billing/) and that you're on the Arbitrum network. +> Cette section est rédigée en supposant que vous avez déposé des GRT sur le solde de votre compte sur [Subgraph Studio](https://thegraph.com/studio/billing/) et que vous êtes sur le réseau Arbitrum. 1. Accédez à la [page de facturation de Subgraph Studio](https://thegraph.com/studio/billing/). -2. Click on the "Connect Wallet" button on the top right corner of the page. Select your wallet and click on "Connect". +2. Cliquez sur le bouton « Connecter le portefeuille » dans le coin supérieur droit de la page. Sélectionnez votre portefeuille et cliquez sur "Connecter". -3. Click the dropdown next to the 'Add GRT' button at the center of the page. Select withdraw GRT. A side panel will appear. +3. Cliquez sur la liste déroulante à côté du bouton « Ajouter GRT » au centre de la page. Sélectionnez retirer le GRT. Un panneau latéral apparaîtra. -4. Enter the amount of GRT you would like to withdraw. +4. Saisissez le montant de GRT que vous souhaitez retirer. -5. Click 'Withdraw GRT' to withdraw the GRT from your account balance. Sign the associated transaction in your wallet. This will cost gas. The GRT will be sent to your Arbitrum wallet. +5. Cliquez sur « Retirer le GRT » pour retirer le GRT du solde de votre compte. Signez la transaction associée dans votre portefeuille. Cela coûtera du gaz. Le GRT sera envoyé sur votre portefeuille Arbitrum. -6. Once the transaction is confirmed, you'll see the GRT withdrawn from your account balance in your Arbitrum wallet. +6. Une fois la transaction confirmée, vous verrez le GRT retiré du solde de votre compte dans votre portefeuille Arbitrum. -### Adding GRT using a multisig wallet +### Ajout de GRT à l'aide d'un portefeuille multisig 1. Accédez à la [page de facturation de Subgraph Studio](https://thegraph.com/studio/billing/). -2. Click on the "Connect Wallet" button on the top right corner of the page. Select your wallet and click on "Connect". If you're using [Gnosis-Safe](https://gnosis-safe.io/), you'll be able to connect your multisig as well as your signing wallet. Then, sign the associated message. This will not cost any gas. +2. Cliquez sur le bouton « Connecter le portefeuille » dans le coin supérieur droit de la page. Sélectionnez votre portefeuille et cliquez sur "Connecter". Si vous utilisez [Gnosis-Safe](https://gnosis-safe.io/), vous pourrez connecter votre multisig ainsi que votre portefeuille de signature. Ensuite, signez le message associé. Cela ne coûtera aucun gaz. -3. Click the 'Add GRT' button at the center of the page. A side panel will appear. +3. Cliquez sur le bouton « Ajouter GRT » au centre de la page. Un panneau latéral apparaîtra. -4. Once the transaction is confirmed, you'll see the GRT added to your account balance within an hour. +4. Une fois la transaction confirmée, vous verrez le GRT ajouté au solde de votre compte dans l'heure. -### Withdrawing GRT using a multisig wallet +### Retirer du GRT à l'aide d'un portefeuille multisig -> This section is written assuming you have deposited GRT into your account balance on [Subgraph Studio](https://thegraph.com/studio/billing/) and that you're on Ethereum mainnet. +> Cette section est rédigée en supposant que vous avez déposé des GRT sur le solde de votre compte sur [Subgraph Studio](https://thegraph.com/studio/billing/) et que vous êtes sur le mainnet Ethereum. 1. Accédez à la [page de facturation de Subgraph Studio](https://thegraph.com/studio/billing/). -2. Click on the "Connect Wallet" button on the top right corner of the page. Select your wallet and click on "Connect". +2. Cliquez sur le bouton « Connecter le portefeuille » dans le coin supérieur droit de la page. Sélectionnez votre portefeuille et cliquez sur "Connecter". -3. Click the dropdown next to the 'Add GRT' button at the center of the page. Select withdraw GRT. A side panel will appear. +3. Cliquez sur la liste déroulante à côté du bouton « Ajouter GRT » au centre de la page. Sélectionnez retirer le GRT. Un panneau latéral apparaîtra. -4. Enter the amount of GRT you would like to withdraw. Specify the receiving wallet which will receive the GRT from this transaction. The GRT will be sent to the receiving wallet on Arbitrum. +4. Saisissez le montant de GRT que vous souhaitez retirer. Spécifiez le portefeuille de réception qui recevra le GRT de cette transaction. Le GRT sera envoyé au portefeuille de réception sur Arbitrum. -5. Click 'Withdraw GRT' to withdraw the GRT from your account balance. Sign the associated transaction in your wallet. This will cost gas. +5. Cliquez sur « Retirer le GRT » pour retirer le GRT du solde de votre compte. Signez la transaction associée dans votre portefeuille. Cela coûtera du gaz. -6. Once the transaction is confirmed, you'll see the GRT added to your Arbitrum wallet within an hour. +6. Une fois la transaction confirmée, vous verrez le GRT ajouté à votre portefeuille Arbitrum dans l'heure. ## Getting GRT @@ -107,17 +107,17 @@ This section will show you how to get GRT to pay for query fees. ### Coinbase -This will be a step by step guide for purchasing GRT on Coinbase. +Ce sera un guide étape par étape pour acheter du GRT sur Coinbase. 1. Accédez à [Coinbase](https://www.coinbase.com/) et créez un compte. -2. Once you have created an account, you will need to verify your identity through a process known as KYC (or Know Your Customer). This is a standard procedure for all centralized or custodial crypto exchanges. -3. Once you have verified your identity, you can purchase GRT. You can do this by clicking on the "Buy/Sell" button on the top right of the page. -4. Select the currency you want to purchase. Select GRT. -5. Select the payment method. Select your preferred payment method. -6. Select the amount of GRT you want to purchase. -7. Review your purchase. Review your purchase and click "Buy GRT". -8. Confirm your purchase. Confirm your purchase and you will have successfully purchased GRT. -9. You can transfer the GRT from your account to your crypto wallet such as [MetaMask](https://metamask.io/). +2. Une fois que vous aurez créé un compte, vous devrez vérifier votre identité via un processus appelé KYC (ou Know Your Customer). Il s’agit d’une procédure standard pour tous les échanges cryptographiques centralisés ou dépositaires. +3. Une fois que vous avez vérifié votre identité, vous pouvez acheter du GRT. Vous pouvez le faire en cliquant sur le bouton « Acheter/Vendre » en haut à droite de la page. +4. Sélectionnez la devise que vous souhaitez acheter. Sélectionnez GRT. +5. Sélectionnez le mode de paiement. Sélectionnez votre mode de paiement préféré. +6. Sélectionnez le montant de GRT que vous souhaitez acheter. +7. Vérifiez votre achat. Vérifiez votre achat et cliquez sur « Acheter du GRT ». +8. Confirmez votre achat. Confirmez votre achat et vous aurez acheté GRT avec succès. +9. Vous pouvez transférer le GRT de votre compte vers votre portefeuille crypto tel que [MetaMask](https://metamask.io/). - To transfer the GRT to your crypto wallet, click on the "Accounts" button on the top right of the page. - Click on the "Send" button next to the GRT account. - Enter the amount of GRT you want to send and the wallet address you want to send it to. From 5c998d08b3564c1223b7a7e25a7c431d4aeab3d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:34 -0400 Subject: [PATCH 327/924] New translations billing.mdx (Arabic) --- website/pages/ar/billing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ar/billing.mdx b/website/pages/ar/billing.mdx index 763ebdbdaf2a..7321e41ffccf 100644 --- a/website/pages/ar/billing.mdx +++ b/website/pages/ar/billing.mdx @@ -152,7 +152,7 @@ This is how you can purchase GRT on Uniswap. 1. انتقل إلى [ Uniswap ](https://app.uniswap.org/#/swap) وقم بتوصيل محفظتك. 2. حدد التوكن الذي ترغب في استبداله. حدد ETH. 3. حدد التوكن الذي ترغب في تبديله. حدد GRT. - - تأكد من تبديل التوكن الصحيح. عنوان العقد الذكي GRT هو: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` + - تأكد من تبديل التوكن الصحيح. عنوان العقد الذكي GRT هو: ` 0xc944E90C64B2c07662A292be6244BDf05Cda44a7 ` 4. الرجاء إدخال كمية ETH التي ترغب في تحويلها. 5. انقر على زر "مبادلة". 6. قم بتأكيد المعاملة في محفظتك وانتظر حتى تتم المعالجة. From 5554aa9ffcecc0f55059546b4e1dae33700e01d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:43 -0400 Subject: [PATCH 328/924] New translations billing.mdx (Chinese Simplified) --- website/pages/zh/billing.mdx | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/website/pages/zh/billing.mdx b/website/pages/zh/billing.mdx index 9a7e15b9a612..0aebd655e687 100644 --- a/website/pages/zh/billing.mdx +++ b/website/pages/zh/billing.mdx @@ -159,7 +159,7 @@ This is how you can purchase GRT on Uniswap. You can learn more about getting GRT on Uniswap [here](https://support.uniswap.org/hc/en-us/articles/8370549680909-How-to-Swap-Tokens-). -## Getting Ethereum +## 获取以太币 This section will show you how to get Ethereum (ETH) to pay for transaction fees or gas costs. ETH is necessary to execute operations on the Ethereum network such as transferring tokens or interacting with contracts. @@ -168,17 +168,17 @@ This section will show you how to get Ethereum (ETH) to pay for transaction fees This will be a step by step guide for purchasing ETH on Coinbase. 1. 转到[Coinbase](https://www.coinbase.com/)并创建帐户。 -2. Once you have created an account, verify your identity through a process known as KYC (or Know Your Customer). This is a standard procedure for all centralized or custodial crypto exchanges. -3. Once you have verified your identity, purchase ETH by clicking on the "Buy/Sell" button on the top right of the page. -4. Select the currency you want to purchase. Select ETH. -5. Select your preferred payment method. -6. Enter the amount of ETH you want to purchase. -7. Review your purchase and click "Buy ETH". -8. Confirm your purchase and you will have successfully purchased ETH. -9. You can transfer the ETH from your Coinbase account to your crypto wallet such as [MetaMask](https://metamask.io/). - - To transfer the ETH to your crypto wallet, click on the "Accounts" button on the top right of the page. - - Click on the "Send" button next to the ETH account. - - Enter the amount of ETH you want to send and the wallet address you want to send it to. +2. 创建账户后,您需要通过KYC(或了解您的客户)流程验证您的身份。这是所有中心化或托管加密交易所的标准程序。 +3. 一旦您验证了自己的身份,就可以购买ETH。您可以通过单击页面右上方的“买入/卖出”按钮来完成此操作。 +4. 选择要购买的货币。选择ETH。 +5. 选择你喜欢的支付方式。 +6. 输入要购买的ETH金额。 +7. 查看您的购买并单击“购买ETH”。 +8. 确认您的购买,您将成功购买ETH。 +9. 您可以将ETH从您的账户转移到您的加密钱包,如[MetaMask](https://metamask.io/)。 + - 要将ETH转移到您的加密钱包,请单击页面右上方的“账户”按钮。 + - 单击ETH账户旁边的“发送”按钮。 + - 输入您要发送的ETH金额和您要发送到的钱包地址。 - 单击“继续”并确认您的交易。 You can learn more about getting ETH on Coinbase [here](https://help.coinbase.com/en/coinbase/trading-and-funding/buying-selling-or-converting-crypto/how-do-i-buy-digital-currency). @@ -188,17 +188,17 @@ You can learn more about getting ETH on Coinbase [here](https://help.coinbase.co This will be a step by step guide for purchasing ETH on Binance. 1. 转到[Binance](https://www.binance.com/en)并创建帐户。 -2. Once you have created an account, verify your identity through a process known as KYC (or Know Your Customer). This is a standard procedure for all centralized or custodial crypto exchanges. -3. Once you have verified your identity, purchase ETH by clicking on the "Buy Now" button on the homepage banner. -4. Select the currency you want to purchase. Select ETH. -5. Select your preferred payment method. -6. Enter the amount of ETH you want to purchase. -7. Review your purchase and click "Buy ETH". -8. Confirm your purchase and you will see your ETH in your Binance Spot Wallet. -9. You can withdraw the ETH from your account to your crypto wallet such as [MetaMask](https://metamask.io/). - - To withdraw the ETH to your crypto wallet, add your crypto wallet's address to the withdrawal whitelist. - - Click on the "wallet" button, click withdraw, and select ETH. - - Enter the amount of ETH you want to send and the whitelisted wallet address you want to send it to. +2. 创建账户后,您需要通过KYC(或了解您的客户)流程验证您的身份。这是所有中心化或托管加密交易所的标准程序。 +3. 一旦您完成了身份验证,您可以通过在首页横幅上点击“立即购买”按钮来购买ETH。 +4. 选择要购买的货币。选择ETH。 +5. 选择你喜欢的支付方式。 +6. 输入要购买的ETH金额。 +7. 查看您的购买并单击“购买ETH”。 +8. 确认您的购买,您将能够在Binance现货钱包中看到您的ETH。 +9. 您可以将ETH从您的账户提取到您的加密钱包,如[MetaMask](https://metamask.io/)。 + - 想要将ETH提现到你的加密钱包,先将你的加密钱包地址添加到提现白名单。 + - 单击“钱包”按钮,单击提取,然后选择ETH。 + - 输入您要发送的ETH金额和您要发送到的白名单钱包地址。 - 单击“继续”并确认您的交易。 You can learn more about getting ETH on Binance [here](https://www.binance.com/en/support/faq/how-to-buy-cryptocurrency-on-binance-homepage-400c38f5e0cd4b46a1d0805c296b5582). From febddfd323ca4b67b9f16c8fe37676bf5b1088e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:48 -0400 Subject: [PATCH 329/924] New translations developing.mdx (French) --- website/pages/fr/network/developing.mdx | 46 ++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/website/pages/fr/network/developing.mdx b/website/pages/fr/network/developing.mdx index 1b47b0ae079e..a29832a45afa 100644 --- a/website/pages/fr/network/developing.mdx +++ b/website/pages/fr/network/developing.mdx @@ -2,52 +2,52 @@ title: Le Développement --- -Developers are the demand side of The Graph ecosystem. Developers build subgraphs and publish them to The Graph Network. Then, they query live subgraphs with GraphQL in order to power their applications. +Les développeurs constituent le côté demande de l’écosystème The Graph. Les développeurs créent des subgraphs et les publient sur The Graph Network. Ensuite, ils interrogent les subgraphs en direct avec GraphQL afin d'alimenter leurs applications. ## Flux du cycle de vie des subgraphs Les subgraphs déployés sur le réseau ont un cycle de vie défini. -### Build locally +### Développer localement -As with all subgraph development, it starts with local development and testing. Developers can use the same local setup whether they are building for The Graph Network, the hosted service or a local Graph Node, leveraging `graph-cli` and `graph-ts` to build their subgraph. Developers are encouraged to use tools such as [Matchstick](https://github.com/LimeChain/matchstick) for unit testing to improve the robustness of their subgraphs. +Comme pour tout développement de subgraphs, cela commence par le développement et les tests locaux. Les développeurs peuvent utiliser la même configuration locale, qu'ils construisent pour The Graph Network, le service hébergé ou un nœud Graph local, en tirant parti de `graph-cli` et `graph-ts` pour créer leur subgraph. Les développeurs sont encouragés à utiliser des outils tels que [Matchstick](https://github.com/LimeChain/matchstick) pour les tests unitaires afin d'améliorer la robustesse de leurs subgraphs. -> There are certain constraints on The Graph Network, in terms of feature and network support. Only subgraphs on [supported networks](/developing/supported-networks) will earn indexing rewards, and subgraphs which fetch data from IPFS are also not eligible. +> Le réseau de graphes est soumis à certaines contraintes, en termes de fonctionnalités et de réseaux pris en charge. Seuls les subgraphs des [réseaux pris en charge](/developing/supported-networks) obtiendront des récompenses en matière d'indexation, et les subgraphs qui récupèrent des données à partir d'IPFS ne sont pas non plus éligibles. -### Deploy to the Subgraph Studio +### Déployer sur Subgraph Studio -Once defined, the subgraph can be built and deployed to the [Subgraph Studio](https://thegraph.com/docs/en/deploying/subgraph-studio-faqs/). The Subgraph Studio is a sandbox environment which will index the deployed subgraph and make it available for rate-limited development and testing. This gives developers an opportunity to verify that their subgraph does not encounter any indexing errors, and works as expected. +Une fois défini, le subgraph peut être construit et déployé dans [Subgraph Studio](https://thegraph.com/docs/en/deploying/subgraph-studio-faqs/). Subgraph Studio est un environnement sandbox qui indexera le subgraph déployé et le rendra disponible pour un développement et des tests à débit limité. Cela donne aux développeurs la possibilité de vérifier que leur subgraph ne rencontre aucune erreur d'indexation et fonctionne comme prévu. -### Publish to the Network +### Publier sur le réseau -When the developer is happy with their subgraph, they can publish it to The Graph Network. This is an on-chain action, which registers the subgraph so that it is discoverable by Indexers. Published subgraphs have a corresponding NFT, which is then easily transferable. The published subgraph has associated metadata, which provides other network participants with useful context and information. +Lorsque le développeur est satisfait de son subgraph, il peut le publier sur le réseau The Graph. Il s'agit d'une action 'on-chain', qui enregistre le subgraph afin qu'il puisse être découvert par les indexeurs. Les subgraphs publiés ont un NFT correspondant, qui est alors facilement transférable. Le subgraph publié est associé à des métadonnées qui fournissent aux autres participants du réseau un contexte et des informations utiles. -### Signal to Encourage Indexing +### Signal pour encourager l'indexation -Published subgraphs are unlikely to be picked up by Indexers without the addition of signal. Signal is locked GRT associated with a given subgraph, which indicates to Indexers that a given subgraph will receive query volume, and also contributes to the indexing rewards available for processing it. Subgraph developers will generally add signal to their subgraph, in order to encourage indexing. Third party Curators may also signal on a given subgraph, if they deem the subgraph likely to drive query volume. +Les subgraphs publiés ont peu de chances d'être repérés par les indexeurs sans l'ajout d'un signal. Le signal est constitué de GRT verrouillés associés à un subgraph donné, ce qui indique aux indexeurs qu'un subgraph donné recevra du volume de requêtes et contribue également aux récompenses d'indexation disponibles pour le traiter. Les développeurs de subgraphs ajoutent généralement un signal à leur subgraph afin d'encourager l'indexation. Les curateurs tiers peuvent également ajouter un signal à un subgraph donné s'ils estiment que ce dernier est susceptible de générer un volume de requêtes. -### Querying & Application Development +### Interrogation & Développement d'applications -Once a subgraph has been processed by Indexers and is available for querying, developers can start to use the subgraph in their applications. Developers query subgraphs via a gateway, which forwards their queries to an Indexer who has processed the subgraph, paying query fees in GRT. +Une fois qu'un subgraph a été traité par les indexeurs et est disponible pour l'interrogation, les développeurs peuvent commencer à utiliser le subgraph dans leurs applications. Les développeurs interrogent les subgraphs via une passerelle, qui transmet leurs requêtes à un indexeur qui a traité le subgraph, en payant les frais de requête en GRT. -In order to make queries, developers must generate an API key, which can be done in the Subgraph Studio. This API key must be funded with GRT, in order to pay query fees. Developers can set a maximum query fee, in order to control their costs, and limit their API key to a given subgraph or origin domain. The Subgraph Studio provides developers with data on their API key usage over time. +Pour effectuer des requêtes, les développeurs doivent générer une clé API, ce qui peut être fait dans le Subgraph Studio. Cette clé API doit être financée par le GRT, afin de payer les frais de requête. Les développeurs peuvent fixer un montant maximum pour les requêtes, afin de contrôler leurs coûts, et limiter leur clé API à un subgraph ou à un domaine d'origine donné. Le Subgraph Studio fournit aux développeurs des données sur l'utilisation de leur clé API au fil du temps. -Developers are also able to express an Indexer preference to the gateway, for example preferring Indexers whose query response is faster, or whose data is most up to date. These controls are set in the Subgraph Studio. +Les développeurs peuvent également exprimer une préférence d'indexeur envers la passerelle, en préférant par exemple les indexeurs dont la réponse aux requêtes est plus rapide ou dont les données sont les plus à jour. Ces contrôles sont définis dans Subgraph Studio. -### Updating Subgraphs +### Mise à jour des subgraphs -After a time a subgraph developer may want to update their subgraph, perhaps fixing a bug or adding new functionality. The subgraph developer may deploy new version(s) of their subgraph to the Subgraph Studio for rate-limited development and testing. +Au bout d'un certain temps, un développeur de subgraphs peut souhaiter mettre à jour son subgraph, par exemple en corrigeant un bogue ou en ajoutant de nouvelles fonctionnalités. Le développeur de subgraphs peut déployer une ou plusieurs nouvelles versions de son subgraph dans le Subgraph Studio pour un développement et des tests à cadence limitée. -Once the Subgraph Developer is ready to update, they can initiate a transaction to point their subgraph at the new version. Updating the subgraph migrates any signal to the new version (assuming the user who applied the signal selected "auto-migrate"), which also incurs a migration tax. This signal migration should prompt Indexers to start indexing the new version of the subgraph, so it should soon become available for querying. +Une fois que le développeur de subgraph est prêt à mettre à jour, il peut lancer une transaction pour pointer son subgraph vers la nouvelle version. La mise à jour du subgraph migre tout signal vers la nouvelle version (en supposant que l'utilisateur qui a appliqué le signal a sélectionné "migrer automatiquement"), ce qui entraîne également une taxe de migration. Cette migration de signal devrait inciter les indexeurs à commencer à indexer la nouvelle version du subgraph, elle devrait donc bientôt être disponible pour les interrogations. -### Deprecating Subgraphs +### Dépréciation des subgraphs -At some point a developer may decide that they no longer need a published subgraph. At that point they may deprecate the subgraph, which returns any signalled GRT to the Curators. +À un moment donné, un développeur peut décider qu'il n'a plus besoin d'un subgraph publié. À ce stade, ils peuvent déprécier le subgraph, qui renvoie tout GRT signalé aux curateurs. -### Diverse Developer Roles +### Diversité des rôles des développeurs -Some developers will engage with the full subgraph lifecycle on the network, publishing, querying and iterating on their own subgraphs. Some may be focused on subgraph development, building open APIs which others can build on. Some may be application focused, querying subgraphs deployed by others. +Certains développeurs s'engageront dans le cycle de vie complet des subgraphs sur le réseau, en publiant, en interrogeant et en itérant sur leurs propres subgraphs. D'autres se concentreront sur le développement de subgraphs, en créant des API ouvertes sur lesquelles d'autres pourront s'appuyer. D'autres peuvent se concentrer sur les applications, en interrogeant les subgraphs déployés par d'autres. -### Developers and Network Economics +### Economie du réseau et des développeurs -Developers are a key economic actor in the network, locking up GRT in order to encourage indexing, and crucially querying subgraphs, which is the network's primary value exchange. Subgraph developers also burn GRT whenever a subgraph is updated. +Les développeurs sont des acteurs économiques clés dans le réseau, bloquant des GRT pour encourager l'indexation et, surtout, interroger des subgraphs, ce qui constitue l'échange de valeur principal du réseau. Les développeurs de subgraphs brûlent également des GRT à chaque mise à jour d'un subgraph. From 5ec6acbb06551f6b13b80b70592148e13c8a2d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:50 -0400 Subject: [PATCH 330/924] New translations developing.mdx (Czech) --- website/pages/cs/network/developing.mdx | 44 ++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/website/pages/cs/network/developing.mdx b/website/pages/cs/network/developing.mdx index 9c543348259d..dd671220d0d6 100644 --- a/website/pages/cs/network/developing.mdx +++ b/website/pages/cs/network/developing.mdx @@ -1,50 +1,50 @@ --- -title: Developing +title: Vývoj --- -Developers are the demand side of The Graph ecosystem. Developers build subgraphs and publish them to The Graph Network. Then, they query live subgraphs with GraphQL in order to power their applications. +Vývojáři jsou poptávkovou stranou ekosystému Grafu. Vývojáři vytvářejí podgrafy a publikují je v síti Graf. Poté se dotazují na živé podgrafy pomocí GraphQL, aby mohli využívat své aplikace. -## Subgraph Lifecycle +## Životní cyklus podgrafů -Subgraphs deployed to the network have a defined lifecycle. +Podgrafy nasazené do sítě mají definovaný životní cyklus. -### Build locally +### Stavět lokálně -As with all subgraph development, it starts with local development and testing. Developers can use the same local setup whether they are building for The Graph Network, the hosted service or a local Graph Node, leveraging `graph-cli` and `graph-ts` to build their subgraph. Developers are encouraged to use tools such as [Matchstick](https://github.com/LimeChain/matchstick) for unit testing to improve the robustness of their subgraphs. +Stejně jako při vývoji všech podgrafů se začíná lokálním vývojem a testováním. Vývojáři mohou používat stejné místní nastavení, ať už vytvářejí pro síti Graf, hostovanou službu nebo místní uzel Grafu, a využívat při vytváření podgrafu `graph-cli` a `graph-ts`. Vývojářům se doporučuje používat nástroje, jako je [Matchstick](https://github.com/LimeChain/matchstick), pro testování jednotek, aby zvýšili robustnost svých podgrafů. -> There are certain constraints on The Graph Network, in terms of feature and network support. Only subgraphs on [supported networks](/developing/supported-networks) will earn indexing rewards, and subgraphs which fetch data from IPFS are also not eligible. +> Síť Graf má určitá omezení, pokud jde o funkce a podporu sítě. Odměny za indexaci získají pouze podgrafy na [podporovaných sítích](/developing/supported-networks) a odměny za indexaci nemohou získat ani podgrafy, které načítají data z IPFS. -### Deploy to the Subgraph Studio +### Nasazení do Studio Podgraf -Once defined, the subgraph can be built and deployed to the [Subgraph Studio](https://thegraph.com/docs/en/deploying/subgraph-studio-faqs/). The Subgraph Studio is a sandbox environment which will index the deployed subgraph and make it available for rate-limited development and testing. This gives developers an opportunity to verify that their subgraph does not encounter any indexing errors, and works as expected. +Jakmile je podgraf definován, lze jej sestavit a nasadit do [Studio podgrafů](https://thegraph.com/docs/en/deploying/subgraph-studio-faqs/). podgraf Studio je prostředí sandboxu, které indexuje nasazený subgraf a zpřístupní jej pro vývoj a testování s omezenou rychlostí. Vývojáři tak mají možnost ověřit, zda se jejich podgraf nesetkává s žádnými chybami indexování a zda funguje podle očekávání. -### Publish to the Network +### Publikovat v síti -When the developer is happy with their subgraph, they can publish it to The Graph Network. This is an on-chain action, which registers the subgraph so that it is discoverable by Indexers. Published subgraphs have a corresponding NFT, which is then easily transferable. The published subgraph has associated metadata, which provides other network participants with useful context and information. +Jakmile je vývojář se svým podgrafem spokojen, může jej zveřejnit v síti Grafu. Jedná se o akci v řetězci, která zaregistruje podgraf tak, aby jej indexery mohly objevit. Zveřejněné podgrafy mají odpovídající NFT, který je pak snadno přenositelný. Zveřejněný podgraf má přiřazená metadata, která poskytují ostatním účastníkům sítě užitečný kontext a informace. -### Signal to Encourage Indexing +### Signál na podporu indexování -Published subgraphs are unlikely to be picked up by Indexers without the addition of signal. Signal is locked GRT associated with a given subgraph, which indicates to Indexers that a given subgraph will receive query volume, and also contributes to the indexing rewards available for processing it. Subgraph developers will generally add signal to their subgraph, in order to encourage indexing. Third party Curators may also signal on a given subgraph, if they deem the subgraph likely to drive query volume. +Publikované podgrafy pravděpodobně nebudou zachyceny indexátory bez přidání signálu. Signál je uzamčený GRT spojený s daným podgrafem, který indikuje indexátorům, že daný podgraf obdrží objem dotazů, a také přispívá k indexačním odměnám, které jsou k dispozici pro jeho zpracování. Vývojáři podgrafů obvykle přidávají ke svým podgrafům signál, aby podpořili indexování. Kurátoři třetích stran mohou také signalizovat daný podgraf, pokud se domnívají, že podgraf bude pravděpodobně vytvářet objem dotazů. -### Querying & Application Development +### Dotazování & Vývoj aplikací -Once a subgraph has been processed by Indexers and is available for querying, developers can start to use the subgraph in their applications. Developers query subgraphs via a gateway, which forwards their queries to an Indexer who has processed the subgraph, paying query fees in GRT. +Jakmile je podgraf zpracován indexery a je k dispozici pro dotazování, mohou jej vývojáři začít používat ve svých aplikacích. Vývojáři se dotazují na podgrafy prostřednictvím brány, která jejich dotazy předává indexeru, jenž podgraf zpracoval, a platí poplatky za dotazy v GRT. -In order to make queries, developers must generate an API key, which can be done in the Subgraph Studio. This API key must be funded with GRT, in order to pay query fees. Developers can set a maximum query fee, in order to control their costs, and limit their API key to a given subgraph or origin domain. The Subgraph Studio provides developers with data on their API key usage over time. +Aby mohli vývojáři provádět dotazy, musí si vygenerovat klíč API, což lze provést v aplikaci podgraf Studio. Tento klíč API musí být financován pomocí GRT, aby bylo možné platit poplatky za dotazy. Vývojáři mohou nastavit maximální poplatek za dotaz, aby měli pod kontrolou své náklady, a omezit svůj klíč API na daný podgraf nebo doménu původu. Subgraph Studio poskytuje vývojářům údaje o využití jejich klíče API v průběhu času. -Developers are also able to express an Indexer preference to the gateway, for example preferring Indexers whose query response is faster, or whose data is most up to date. These controls are set in the Subgraph Studio. +Vývojáři mohou bráně také vyjádřit preferenci indexátoru, například preferovat indexátory, jejichž odezva na dotaz je rychlejší nebo jejichž data jsou nejaktuálnější. Tyto ovládací prvky se nastavují ve studiu Podgraf Studio. ### Updating Subgraphs -After a time a subgraph developer may want to update their subgraph, perhaps fixing a bug or adding new functionality. The subgraph developer may deploy new version(s) of their subgraph to the Subgraph Studio for rate-limited development and testing. +Po nějaké době může chtít vývojář podgrafu svůj podgraf aktualizovat, třeba opravit chybu nebo přidat novou funkci. Vývojář subgrafu může nasadit novou verzi/verze svého podgrafu do studio Podgraf Studio pro vývoj a testování s omezenou rychlostí. -Once the Subgraph Developer is ready to update, they can initiate a transaction to point their subgraph at the new version. Updating the subgraph migrates any signal to the new version (assuming the user who applied the signal selected "auto-migrate"), which also incurs a migration tax. This signal migration should prompt Indexers to start indexing the new version of the subgraph, so it should soon become available for querying. +Jakmile je vývojář podgrafu připraven k aktualizaci, může iniciovat transakci, která jeho podgraf nasměruje na novou verzi. Aktualizace podgrafu migruje jakýkoli signál na novou verzi (za předpokladu, že uživatel, který signál aplikoval, zvolil "automatickou migraci"), čímž také vzniká migrační daň. Tato migrace signálu by měla přimět indexátory, aby začaly indexovat novou verzi podgrafu, takže by měl být brzy k dispozici pro dotazování. -### Deprecating Subgraphs +### Vyřazování podgrafů -At some point a developer may decide that they no longer need a published subgraph. At that point they may deprecate the subgraph, which returns any signalled GRT to the Curators. +V určitém okamžiku se vývojář může rozhodnout, že publikovaný podgraf již nepotřebuje. V tu chvíli může podgraf vyřadit, čímž se kurátorům vrátí všechny signalizované GRT. -### Diverse Developer Roles +### Různorodé role vývojáře Some developers will engage with the full subgraph lifecycle on the network, publishing, querying and iterating on their own subgraphs. Some may be focused on subgraph development, building open APIs which others can build on. Some may be application focused, querying subgraphs deployed by others. From 103ea554e90d9a597e355029bd797ad1af6e16b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:10:53 -0400 Subject: [PATCH 331/924] New translations developing.mdx (Dutch) --- website/pages/nl/network/developing.mdx | 50 ++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/website/pages/nl/network/developing.mdx b/website/pages/nl/network/developing.mdx index 7a9dd694b719..8bfbe8a1f011 100644 --- a/website/pages/nl/network/developing.mdx +++ b/website/pages/nl/network/developing.mdx @@ -1,53 +1,53 @@ --- -title: Developing +title: Ontwikkelen --- -Developers are the demand side of The Graph ecosystem. Developers build subgraphs and publish them to The Graph Network. Then, they query live subgraphs with GraphQL in order to power their applications. +Ontwikkelaars zijn de vraagzijde van The Graph ecosysteem. Ontwikkelaars bouwen subgraphs en publiceren deze naar het Graph Netwerk. Vervolgens sturen ze query's naar de subgraphs met GraphQL om hun applicaties aan te sturen. -## Subgraph Lifecycle +## Subgraph Levenscyclus -Subgraphs deployed to the network have a defined lifecycle. +Subgraphs op het netwerk hebben een gedefinieerde levenscyclus. -### Build locally +### Lokaal Bouwen -As with all subgraph development, it starts with local development and testing. Developers can use the same local setup whether they are building for The Graph Network, the hosted service or a local Graph Node, leveraging `graph-cli` and `graph-ts` to build their subgraph. Developers are encouraged to use tools such as [Matchstick](https://github.com/LimeChain/matchstick) for unit testing to improve the robustness of their subgraphs. +Net als bij alle subgraph-ontwikkeling, begint het met lokaal ontwikkelen en testen. Ontwikkelaars kunnen dezelfde lokale setup gebruiken, ongeacht of ze bouwen voor het Graph-netwerk, de hosted service of een lokale Graph Node, waarbij ze `graph-cli` en `graph-ts` gebruiken om hun subgraph te bouwen. Ontwikkelaars wordt aangemoedigd om tools zoals [Matchstick](https://github.com/LimeChain/matchstick) te gebruiken voor unit testing om de robuustheid van hun subgraphs te verbeteren. -> There are certain constraints on The Graph Network, in terms of feature and network support. Only subgraphs on [supported networks](/developing/supported-networks) will earn indexing rewards, and subgraphs which fetch data from IPFS are also not eligible. +> Er zijn bepaalde beperkingen op The Graph-netwerk, qua functies en netwerkondersteuning. Alleen subgraphs op [ondersteunde netwerken](/developing/supported-networks) komen in aanmerking voor indexeringsbeloningen, en subgraphs die data ophalen uit IPFS komen niet in aanmerking. -### Deploy to the Subgraph Studio +### Implementeren op de Subgraph Studio -Once defined, the subgraph can be built and deployed to the [Subgraph Studio](https://thegraph.com/docs/en/deploying/subgraph-studio-faqs/). The Subgraph Studio is a sandbox environment which will index the deployed subgraph and make it available for rate-limited development and testing. This gives developers an opportunity to verify that their subgraph does not encounter any indexing errors, and works as expected. +Eenmaal gedefinieerd, kan de subgraph worden gebouwd en geïmplementeerd naar de [Subgraph Studio](https://thegraph.com/docs/en/deploying/subgraph-studio-faqs/). De Subgraph Studio is een sandbox-omgeving die de geïmplementeerde subgraph indexeert en beschikbaar maakt voor ontwikkeling en testen met een beperkte hoeveelheid query's. Dit geeft ontwikkelaars de kans om te verifiëren dat hun subgraph geen indexeerfouten tegenkomt en werkt zoals verwacht. ### Publiceren op het netwerk -When the developer is happy with their subgraph, they can publish it to The Graph Network. This is an on-chain action, which registers the subgraph so that it is discoverable by Indexers. Published subgraphs have a corresponding NFT, which is then easily transferable. The published subgraph has associated metadata, which provides other network participants with useful context and information. +Wanneer de ontwikkelaars tevreden zijn met hun subgraph, kunnen ze deze publiceren op The Graph-netwerk. Dit is een on-chain actie, die de subgraph registreert zodat deze door Indexers kan worden ontdekt. Gepubliceerde subgraphs hebben een bijbehorende NFT, die gemakkelijk overdraagbaar is. De gepubliceerde subgraph heeft bijbehorende metadata, die andere netwerkdeelnemers context en informatie bieden. -### Signal to Encourage Indexing +### Signaal Geven om Indexering te Stimuleren -Published subgraphs are unlikely to be picked up by Indexers without the addition of signal. Signal is locked GRT associated with a given subgraph, which indicates to Indexers that a given subgraph will receive query volume, and also contributes to the indexing rewards available for processing it. Subgraph developers will generally add signal to their subgraph, in order to encourage indexing. Third party Curators may also signal on a given subgraph, if they deem the subgraph likely to drive query volume. +Gepubliceerde subgraphs worden waarschijnlijk niet opgepikt door Indexers zonder toevoeging van signaal. Signaal is vergrendelde GRT die is gekoppeld aan een gegeven subgraph die aan Indexeerders aangeeft dat een bepaalde subgraph queryvolume zal ontvangen, dit draagt ook bij aan de indexeringsbeloningen die beschikbaar zijn voor het verwerken ervan. Subgraph-ontwikkelaars zullen over het algemeen signaal toevoegen aan hun eigen subgraph, om indexering aan te moedigen. Derde partij Curatoren kunnen ook signaal geven op een bepaalde subgraph, als zij van mening zijn dat de subgraph waarschijnlijk queryvolume zal genereren. -### Querying & Application Development +### Query's versturen & Applicatieontwikkeling -Once a subgraph has been processed by Indexers and is available for querying, developers can start to use the subgraph in their applications. Developers query subgraphs via a gateway, which forwards their queries to an Indexer who has processed the subgraph, paying query fees in GRT. +Zodra een subgraph is verwerkt door Indexers en beschikbaar is voor bevraging, kunnen ontwikkelaars de subgraph in hun applicaties gaan gebruiken. Ontwikkelaars bevragen subgraphs via een gateway, die hun queries doorstuurt naar een Indexer die de subgraph heeft verwerkt, en betalen querykosten in GRT. -In order to make queries, developers must generate an API key, which can be done in the Subgraph Studio. This API key must be funded with GRT, in order to pay query fees. Developers can set a maximum query fee, in order to control their costs, and limit their API key to a given subgraph or origin domain. The Subgraph Studio provides developers with data on their API key usage over time. +Om query's te maken, moeten ontwikkelaars een API-sleutel genereren, wat kan worden gedaan in de Subgraph Studio. Deze API-sleutel moet worden gefinancierd met GRT om querykosten te betalen. Ontwikkelaars kunnen een maximale queryvergoeding instellen om hun kosten te beheersen en hun API-sleutel beperken tot een bepaalde subgraph of oorsprongsdomein. De Subgraph Studio geeft ontwikkelaars gegevens over het gebruik van hun API-sleutel in de loop van de tijd. -Developers are also able to express an Indexer preference to the gateway, for example preferring Indexers whose query response is faster, or whose data is most up to date. These controls are set in the Subgraph Studio. +Ontwikkelaars kunnen ook een Indexer-voorkeur aan de gateway geven, bijvoorbeeld de voorkeur geven aan Indexer wiens queryrespons sneller is, of wiens gegevens het meest actueel zijn. Deze voorkeuren worden ingesteld in de Subgraph Studio. -### Updating Subgraphs +### Subgraphs Bijwerken -After a time a subgraph developer may want to update their subgraph, perhaps fixing a bug or adding new functionality. The subgraph developer may deploy new version(s) of their subgraph to the Subgraph Studio for rate-limited development and testing. +Na verloop van tijd wil een subgraph-ontwikkelaar mogelijk hun subgraph bijwerken, bijvoorbeeld om een bug te repareren of nieuwe functionaliteit toe te voegen. De subgraph-ontwikkelaar kan nieuwe versie(s) van hun subgraph implementeren naar de Subgraph Studio voor ontwikkeling en testen met beperkte snelheid. -Once the Subgraph Developer is ready to update, they can initiate a transaction to point their subgraph at the new version. Updating the subgraph migrates any signal to the new version (assuming the user who applied the signal selected "auto-migrate"), which also incurs a migration tax. This signal migration should prompt Indexers to start indexing the new version of the subgraph, so it should soon become available for querying. +Zodra de Subgraph-ontwikkelaar klaar is om bij te werken, kunnen ze een transactie starten om hun subgraph naar de nieuwe versie te wijzen. Het bijwerken van de subgraph migreert elk signaal naar de nieuwe versie (ervan uitgaande dat de gebruiker die het signaal heeft toegepast, "auto-migrate" heeft geselecteerd), wat ook een migratiebelasting met zich meebrengt. Deze signaalmigratie zou Indexers moeten aanzetten om de nieuwe versie van de subgraph te gaan indexeren, dus deze zou snel beschikbaar moeten zijn voor queries. -### Deprecating Subgraphs +### Subgraphs Uitfaseren -At some point a developer may decide that they no longer need a published subgraph. At that point they may deprecate the subgraph, which returns any signalled GRT to the Curators. +Op een gegeven moment kan een ontwikkelaar besluiten dat ze een gepubliceerde subgraph niet langer nodig hebben. Op dat moment kunnen ze de subgraph uitfaseren, wat eventuele gesignaleerde GRT aan de Curatoren retourneert. -### Diverse Developer Roles +### Diverse Ontwikkelaarsrollen -Some developers will engage with the full subgraph lifecycle on the network, publishing, querying and iterating on their own subgraphs. Some may be focused on subgraph development, building open APIs which others can build on. Some may be application focused, querying subgraphs deployed by others. +Sommige ontwikkelaars zullen zich bezighouden met de volledige subgraph-levenscyclus op het netwerk, publiceren, bevragen en itereren op hun eigen subgraphs. Sommigen kunnen zich richten op subgraph-ontwikkeling, het bouwen van open API's waar anderen op kunnen bouwen. Sommigen kunnen zich richten op applicatieontwikkeling, en bevragen subgraphs die door anderen zijn geïmplementeerd. -### Developers and Network Economics +### Ontwikkelaars en Netwerkeconomie -Developers are a key economic actor in the network, locking up GRT in order to encourage indexing, and crucially querying subgraphs, which is the network's primary value exchange. Subgraph developers also burn GRT whenever a subgraph is updated. +Ontwikkelaars zijn een belangrijke economische speler in het netwerk die GRT vastzetten om indexering te stimuleren en cruciaal zijn voor het bevragen van subgraphs, wat de primaire waarde-uitwisseling van het netwerk is. Subgraph-ontwikkelaars verbranden ook GRT wanneer een subgraph wordt bijgewerkt. From 815e3bf4cda223790158608e75f6e5b5c0ade1fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:02 -0400 Subject: [PATCH 332/924] New translations grafting.mdx (French) --- website/pages/fr/cookbook/grafting.mdx | 64 +++++++++++++------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/website/pages/fr/cookbook/grafting.mdx b/website/pages/fr/cookbook/grafting.mdx index d47ee3fe7d2b..1cb91372bb13 100644 --- a/website/pages/fr/cookbook/grafting.mdx +++ b/website/pages/fr/cookbook/grafting.mdx @@ -1,8 +1,8 @@ --- -title: Remplacer un contrat tout en conservant son histoire grâce à la greffe +title: Remplacer un contrat et conserver son historique grâce au « greffage » --- -In this guide, you will learn how to build and deploy new subgraphs by grafting existing subgraphs. +Dans ce guide, vous apprendrez à construire et à déployer de nouveaux subgraphs en utilisant le greffage sur des subgraphs existants. ## Qu'est-ce qu'une greffe ? @@ -89,11 +89,11 @@ Le greffage nécessite l'ajout de deux nouveaux éléments au manifeste du subgr ```yaml --- -caractéristiques: - - greffage # nom de l'élément -greffe: - base: Qm... # ID du subgraph de base - bloc: 1502122 # numéro du bloc +features: + - grafting # nom de la fonctionnalité +graft: + base: Qm... # identifiant du subgraphe de base + block: 1502122 # numéro du bloc ``` - `features :` est une liste de tous les [noms de fonctionnalités](developing/creating-a-subgraph/#experimental-features) utilisés. @@ -121,20 +121,20 @@ Cela renvoie quelque chose comme ceci : ``` { - "données": { - "retraits": [ - { - "identifiant": "0x13098b538a61837e9f29b32fb40527bbbe63c9120c250242b02b69bb42c287e5-5", - "montant": "0", - "quand": "1664367528" - }, - { - "identifiant": "0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498-3", - "montant": "0", - "quand": "1664367648" - } - ] - } + "data": { + "withdrawals": [ + { + "id": "0x13098b538a61837e9f29b32fb40527bbbe63c9120c250242b02b69bb42c287e5-5", + "amount": "0", + "when": "1664367528" + }, + { + "id": "0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498-3", + "amount": "0", + "when": "1664367648" + } + ] + } } ``` @@ -153,8 +153,8 @@ Le subgraph.yaml de remplacement du greffon aura une nouvelle adresse de contrat { withdrawals(first: 5) { id - montant - quand + amount + when } } ``` @@ -166,19 +166,19 @@ Le résultat devrait être le suivant : "data": { "withdrawals": [ { - "id" : "0x13098b538a61837e9f29b32fb40527bbbe63c9120c250242b02b69bb42c287e5-5", - "montant" : "0", - "when" : "1664367528" + "id": "0x13098b538a61837e9f29b32fb40527bbbe63c9120c250242b02b69bb42c287e5-5", + "amount": "0", + "when": "1664367528" }, { - "id" : "0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498-3", - "montant" : "0", - "when" : "1664367648" + "id": "0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498-3", + "amount": "0", + "when": "1664367648" }, { - "id" : "0xb4010e4c76f86762beb997a13cf020231778eaf7c64fa3b7794971a5e6b343d3-22", - "montant" : "0", - "when" : "1664371512" + "id": "0xb4010e4c76f86762beb997a13cf020231778eaf7c64fa3b7794971a5e6b343d3-22", + "amount": "0", + "when": "1664371512" } ] } From 1cd915840e7557c5d7cad97f550dfbd25e28f71d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:05 -0400 Subject: [PATCH 333/924] New translations grafting.mdx (Czech) --- website/pages/cs/cookbook/grafting.mdx | 112 ++++++++++++------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/website/pages/cs/cookbook/grafting.mdx b/website/pages/cs/cookbook/grafting.mdx index 6d781a5f7e06..420b3a8078d6 100644 --- a/website/pages/cs/cookbook/grafting.mdx +++ b/website/pages/cs/cookbook/grafting.mdx @@ -1,56 +1,56 @@ --- -title: Replace a Contract and Keep its History With Grafting +title: Nahrazení smlouvy a zachování její historie pomocí roubování --- -In this guide, you will learn how to build and deploy new subgraphs by grafting existing subgraphs. +V této příručce se dozvíte, jak vytvářet a nasazovat nové podgrafy roubováním stávajících podgrafů. -## What is Grafting? +## Co je to roubování? -Grafting reuses the data from an existing subgraph and starts indexing it at a later block. This is useful during development to get past simple errors in the mappings quickly or to temporarily get an existing subgraph working again after it has failed. Also, it can be used when adding a feature to a subgraph that takes long to index from scratch. +Při roubování se znovu použijí data z existujícího podgrafu a začne se indexovat v pozdějším bloku. To je užitečné během vývoje, abyste se rychle dostali přes jednoduché chyby v mapování nebo abyste dočasně znovu zprovoznili existující podgraf po jeho selhání. Také ji lze použít při přidávání funkce do podgrafu, které trvá dlouho, než se indexuje od začátku. -The grafted subgraph can use a GraphQL schema that is not identical to the one of the base subgraph, but merely compatible with it. It has to be a valid subgraph schema in its own right, but may deviate from the base subgraph's schema in the following ways: +Štěpovaný podgraf může používat schéma GraphQL, které není totožné se schématem základního podgrafu, ale je s ním pouze kompatibilní. Musí to být platné schéma podgrafu jako takové, ale může se od schématu základního podgrafu odchýlit následujícími způsoby: -- It adds or removes entity types -- It removes attributes from entity types -- It adds nullable attributes to entity types -- It turns non-nullable attributes into nullable attributes -- It adds values to enums -- It adds or removes interfaces -- It changes for which entity types an interface is implemented +- Přidává nebo odebírá typy entit +- Odstraňuje atributy z typů entit +- Přidává nulovatelné atributy k typům entit +- Mění nenulovatelné atributy na nulovatelné atributy +- Přidává hodnoty do enums +- Přidává nebo odebírá rozhraní +- Mění se, pro které typy entit je rozhraní implementováno -For more information, you can check: +Další informace naleznete na: -- [Grafting](https://thegraph.com/docs/en/developing/creating-a-subgraph#grafting-onto-existing-subgraphs) +- [Roubování](https://thegraph.com/docs/en/developing/creating-a-subgraph#grafting-onto-existing-subgraphs) -In this tutorial, we will be covering a basic usecase. We will replace an existing contract with an identical contract (with a new address, but the same code). Then, graft the existing subgraph onto the "base" subgraph that tracks the new contract. +V tomto tutoriálu se budeme zabývat základním případem použití. Nahradíme stávající smlouvu identickou smlouvou (s novou adresou, ale stejným kódem). Poté naroubujeme stávající podgraf na "základní" podgraf, který sleduje nový kontrakt. -## Important Note on Grafting When Upgrading to the Network +## Důležité upozornění k roubování při aktualizaci na síť -> **Caution**: if you are upgrading your subgraph from Subgraph Studio or the hosted service to the decentralized network, it is strongly recommended to avoid using grafting during the upgrade process. +> **Upozornění**: pokud upgradujete svůj subgraf ze služby Subgraph Studio nebo hostované služby na decentralizovanou síť, důrazně doporučujeme, abyste se během procesu upgradu vyhnuli použití roubování. -### Why Is This Important? +### Proč je to důležité? -Grafting is a powerful feature that allows you to "graft" one subgraph onto another, effectively transferring historical data from the existing subgraph to a new version. While this is an effective way to preserve data and save time on indexing, grafting may introduce complexities and potential issues when migrating from a hosted environment to the decentralized network. It is not possible to graft a subgraph from The Graph Network back to the hosted service or Subgraph Studio. +Štěpování je výkonná funkce, která umožňuje "naroubovat" jeden podgraf na druhý, čímž efektivně přenese historická data ze stávajícího podgrafu do nové verze. Ačkoli se jedná o účinný způsob, jak zachovat data a ušetřit čas při indexování, roubování může přinést složitosti a potenciální problémy při migraci z hostovaného prostředí do decentralizované sítě. Podgraf není možné naroubovat ze sítě The Graph Network zpět do hostované služby nebo do aplikace Subgraph Studio. -### Best Practices +### Osvědčené postupy -**Initial Migration**: when you first deploy your subgraph to the decentralized network, do so without grafting. Ensure that the subgraph is stable and functioning as expected. +**Počáteční migrace**: při prvním nasazení podgrafu do decentralizované sítě tak učiňte bez roubování. Ujistěte se, že je podgraf stabilní a funguje podle očekávání. -**Subsequent Updates**: once your subgraph is live and stable on the decentralized network, you may use grafting for future versions to make the transition smoother and to preserve historical data. +**Následující aktualizace**: jakmile je váš podgraf v decentralizované síti živý a stabilní, můžete použít roubování pro budoucí verze, aby byl přechod plynulejší a aby byla zachována historická data. -By adhering to these guidelines, you minimize risks and ensure a smoother migration process. +Dodržováním těchto pokynů minimalizujete rizika a zajistíte hladší průběh migrace. -## Building an Existing Subgraph +## Vytvoření existujícího podgrafu -Building subgraphs is an essential part of The Graph, described more in depth [here](http://localhost:3000/en/cookbook/quick-start/). To be able to build and deploy the existing subgraph used in this tutorial, the following repo is provided: +Vytváření podgrafů je podstatnou součástí Grafu, která je podrobněji popsána [zde](http://localhost:3000/en/cookbook/quick-start/). Aby bylo možné sestavit a nasadit existující subgraf použitý v tomto tutoriálu, je k dispozici následující repozitář: -- [Subgraph example repo](https://github.com/t-proctor/grafting-tutorial) +- [Příklad repo subgrafu](https://github.com/t-proctor/grafting-tutorial) -> Note: The contract used in the subgraph was taken from the following [Hackathon Starterkit](https://github.com/schmidsi/hackathon-starterkit). +> Poznámka: Smlouva použitá v dílčím grafu byla převzata z následující [Hackathon Starterkit](https://github.com/schmidsi/hackathon-starterkit). -## Subgraph Manifest Definition +## Definice podgrafu Manifest -The subgraph manifest `subgraph.yaml` identifies the data sources for the subgraph, the triggers of interest, and the functions that should be run in response to those triggers. See below for an example subgraph manifest that you will use: +Manifest podgrafu `subgraph.yaml` identifikuje zdroje dat pro podgraf, zajímavé spouštěče a funkce, které by měly být spuštěny v reakci na tyto spouštěče. Níže naleznete příklad manifestu podgrafu, který budete používat: ```yaml specVersion: 0.0.4 @@ -79,13 +79,13 @@ dataSources: file: ./src/lock.ts ``` -- The `Lock` data source is the abi and contract address we will get when we compile and deploy the contract -- The network should correspond to a indexed network being queried. Since we're running on Goerli testnet, the network is `goerli` -- The `mapping` section defines the triggers of interest and the functions that should be run in response to those triggers. In this case, we are listening for the `Withdrawal` event and calling the `handleWithdrawal` function when it is emitted. +- Zdroj dat `Lock` je adresa abi a smlouvy, kterou získáme při kompilaci a nasazení smlouvy +- Síť by měla odpovídat dotazované indexované síti. Protože běžíme na testovací síti Goerli, síť je `goerli` +- Sekce `mapování` definuje spouštěče, které vás zajímají, a funkce, které by měly být spuštěny v reakci na tyto spouštěče. V tomto případě nasloucháme na událost `Výstup` a po jejím vyslání voláme funkci `obsluhovatVýstup`. -## Grafting Manifest Definition +## Definice manifestu roubování -Grafting requires adding two new items to the original subgraph manifest: +Roubování vyžaduje přidání dvou nových položek do původního manifestu podgrafu: ```yaml --- @@ -96,16 +96,16 @@ graft: block: 1502122 # block number ``` -- `features:` is a list of all used [feature names](developing/creating-a-subgraph/#experimental-features). -- `graft:` is a map of the `base` subgraph and the block to graft on to. The `block` is the block number to start indexing from. The Graph will copy the data of the base subgraph up to and including the given block and then continue indexing the new subgraph from that block on. +- `funkce:` je seznam všech použitých [názvů funkcí](developing/creating-a-subgraph/#experimental-features). +- `graft:` je mapa subgrafu `base` a bloku, na který se má roubovat. `block` je číslo bloku, od kterého začít indexovat. Graph zkopíruje data základního subgrafu až k zadanému bloku včetně, a poté pokračuje v indexaci nového subgrafu od tohoto bloku dále. -The `base` and `block` values can be found by deploying two subgraphs: one for the base indexing and one with grafting +Hodnoty `base` a `block` lze nalézt nasazením dvou podgrafů: jednoho pro základní indexování a druhého s roubováním -## Deploying the Base Subgraph +## Nasazení základního podgrafu -1. Go to [The Graph Studio UI](https://thegraph.com/studio/) and create a subgraph on Goerli testnet called `graft-example` -2. Follow the directions in the `AUTH & DEPLOY` section on your subgraph page in the `graft-example` folder from the repo -3. Once finished, verify the subgraph is indexing properly. If you run the following command in The Graph Playground +1. Přejděte na [The Graph Studio UI](https://thegraph.com/studio/) a vytvořte subgraf na testovací síti Goerli s názvem `graft-example` +2. Následujte pokyny v části `AUTH & DEPLOY` na stránce vašeho subgrafu v adresáři `graft-example` ve vašem repozitáři +3. Po dokončení ověřte, zda se podgraf správně indexuje. Pokud spustíte následující příkaz v The Graph Playground ```graphql { @@ -117,7 +117,7 @@ The `base` and `block` values can be found by deploying two subgraphs: one for t } ``` -It returns something like this: +Vrátí něco takového: ``` { @@ -138,16 +138,16 @@ It returns something like this: } ``` -Once you have verified the subgraph is indexing properly, you can quickly update the subgraph with grafting. +Jakmile ověříte, že se podgraf správně indexuje, můžete jej rychle aktualizovat pomocí roubování. -## Deploying the Grafting Subgraph +## Nasazení podgrafu roubování -The graft replacement subgraph.yaml will have a new contract address. This could happen when you update your dapp, redeploy a contract, etc. +Náhradní podgraf.yaml bude mít novou adresu smlouvy. K tomu může dojít při aktualizaci dapp, novém nasazení kontraktu atd. -1. Go to [The Graph Studio UI](https://thegraph.com/studio/) and create a subgraph on Goerli testnet called `graft-replacement` -2. Create a new manifest. The `subgraph.yaml` for `graph-replacement` contains a different contract address and new information about how it should graft. These are the `block` of the [last event emitted](https://goerli.etherscan.io/tx/0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498) you care about by the old contract and the `base` of the old subgraph. The `base` subgraph ID is the `Deployment ID` of your original `graph-example` subgraph. You can find this in The Graph Studio UI. -3. Follow the directions in the `AUTH & DEPLOY` section on your subgraph page in the `graft-replacement` folder from the repo -4. Once finished, verify the subgraph is indexing properly. If you run the following command in The Graph Playground +1. Přejděte na [The Graph Studio UI](https://thegraph.com/studio/) a vytvořte subgraf na testovací síti Goerli s názvem `graft-replacement` +2. Vytvořte nový manifest. Soubor `subgraph.yaml` pro `graph-replacement` obsahuje odlišnou adresu smlouvy a nové informace o tom, jak by měl probíhat proces roubování. Jedná se o `blok` poslední událost vysílanou starou smlouvou, na kterou se zaměřujete, a o `base` starého podgrafu. ID podgrafu `base` je `ID nasazení` vašeho původního podgrafu `graph-example`. Tuto informaci najdete v uživatelském rozhraní The Graph Studio. +3. Postupujte podle pokynů v části `AUTH & DEPLOY` na stránce podgrafu ve složce `graft-replacement` z repozitáře +4. Po dokončení ověřte, zda se podgraf správně indexuje. Pokud spustíte následující příkaz v The Graph Playground ```graphql { @@ -159,7 +159,7 @@ The graft replacement subgraph.yaml will have a new contract address. This could } ``` -It should return the following: +Měla by vrátit následující: ``` { @@ -185,18 +185,18 @@ It should return the following: } ``` -You can see that the `graft-replacement` subgraph is indexing from older `graph-example` data and newer data from the new contract address. The original contract emitted two `Withdrawal` events, [Event 1](https://goerli.etherscan.io/tx/0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498) and [Event 2](https://goerli.etherscan.io/address/0x4ed995e775d3629b0566d2279f058729ae6ea493). The new contract emitted one `Withdrawal` after, [Event 3](https://goerli.etherscan.io/tx/0xb4010e4c76f86762beb997a13cf020231778eaf7c64fa3b7794971a5e6b343d3). The two previously indexed transactions (Event 1 and 2) and the new transaction (Event 3) were combined together in the `graft-replacement` subgraph. +Můžete vidět, že podgraf `graft-replacement` indexuje stará data z `graph-example` a nová data z nové adresy smlouvy. Původní smlouva vydala dvě události `Withdrawal`,[Událost 1](https://goerli.etherscan.io/tx/0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498) a [Událost 2](https://goerli.etherscan.io/address/0x4ed995e775d3629b0566d2279f058729ae6ea493). Nová smlouva vydala jednu událost `Withdrawal` poté,[Událost 3](https://goerli.etherscan.io/tx/0xb4010e4c76f86762beb997a13cf020231778eaf7c64fa3b7794971a5e6b343d3). Dvě předtím zaindexované transakce (Událost 1 a 2) a nová transakce (Událost 3) byly sloučeny dohromady v podgrafu `graft-replacement`. -Congrats! You have succesfully grafted a subgraph onto another subgraph. +Gratulujeme! Úspěšně jste naroubovali podgraf na jiný podgraf. -## Additional Resources +## Další zdroje -If you want more experience with grafting, here's a few examples for popular contracts: +Pokud chcete získat více zkušeností s roubováním, zde je několik příkladů oblíbených smluv: - [Curve](https://github.com/messari/subgraphs/blob/master/subgraphs/curve-finance/protocols/curve-finance/templates/curve.template.yaml) - [ERC-721](https://github.com/messari/subgraphs/blob/master/subgraphs/erc721-metadata/subgraph.yaml) - [Uniswap](https://github.com/messari/subgraphs/blob/master/subgraphs/uniswap-v3/protocols/uniswap-v3/config/templates/uniswap.v3.template.yaml), -To become even more of a Graph expert, consider learning about other ways to handle changes in underlying datasources. Alternatives like [Data Source Templates](developing/creating-a-subgraph/#data-source-templates) can achieve similar results +Chcete-li se stát ještě více odborníkem na Graph, zvažte další způsoby, jak zvládnout změny v základních zdrojích dat. Alternativy jako [Šablony zdroje dat](developing/creating-a-subgraph/#data-source-templates) mohou dosáhnout podobných výsledků -> Note: A lot of material from this article was taken from the previously published [Arweave article](/cookbook/arweave/) +> Poznámka: Mnoho materiálů z tohoto článku bylo převzato z dříve publikovaného [článku Arweave](/cookbook/arweave/) From dcab1e5a1b803e566f0900b909bfd6513118a747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:06 -0400 Subject: [PATCH 334/924] New translations grafting.mdx (Italian) --- website/pages/it/cookbook/grafting.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/pages/it/cookbook/grafting.mdx b/website/pages/it/cookbook/grafting.mdx index 6d781a5f7e06..088c1dcbd19d 100644 --- a/website/pages/it/cookbook/grafting.mdx +++ b/website/pages/it/cookbook/grafting.mdx @@ -8,15 +8,15 @@ In this guide, you will learn how to build and deploy new subgraphs by grafting Grafting reuses the data from an existing subgraph and starts indexing it at a later block. This is useful during development to get past simple errors in the mappings quickly or to temporarily get an existing subgraph working again after it has failed. Also, it can be used when adding a feature to a subgraph that takes long to index from scratch. -The grafted subgraph can use a GraphQL schema that is not identical to the one of the base subgraph, but merely compatible with it. It has to be a valid subgraph schema in its own right, but may deviate from the base subgraph's schema in the following ways: - -- It adds or removes entity types -- It removes attributes from entity types -- It adds nullable attributes to entity types -- It turns non-nullable attributes into nullable attributes -- It adds values to enums -- It adds or removes interfaces -- It changes for which entity types an interface is implemented +Il grafted subgraph può utilizzare uno schema GraphQL non identico a quello del subgraph di base, ma semplicemente compatibile con esso. Deve essere uno schema di subgraph valido di per sé, ma può discostarsi dallo schema del subgraph di base nei seguenti modi: + +- Aggiunge o rimuove i tipi di entità +- Rimuove gli attributi dai tipi di entità +- Aggiunge attributi annullabili ai tipi di entità +- Trasforma gli attributi non nulli in attributi nulli +- Aggiunge valori agli enum +- Aggiunge o rimuove le interfacce +- Cambia per quali tipi di entità viene implementata un'interfaccia For more information, you can check: From f7d51d637bfb54d40b21a18aa874dfea3ec11a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:07 -0400 Subject: [PATCH 335/924] New translations grafting.mdx (Japanese) --- website/pages/ja/cookbook/grafting.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/ja/cookbook/grafting.mdx b/website/pages/ja/cookbook/grafting.mdx index a5ee81c1b26f..c653adb13eda 100644 --- a/website/pages/ja/cookbook/grafting.mdx +++ b/website/pages/ja/cookbook/grafting.mdx @@ -24,21 +24,21 @@ title: グラフティングでコントラクトを取り替え、履歴を残 このチュートリアルでは、基本的なユースケースについて説明します。既存の契約を同一の契約に置き換えます(新しい住所ですが、コードは同じです)。次に、新しいコントラクトを追跡する「ベース」サブグラフに既存のサブグラフを移植します -## Important Note on Grafting When Upgrading to the Network +## ネットワークにアップグレードする際の移植に関する重要な注意事項 -> **Caution**: if you are upgrading your subgraph from Subgraph Studio or the hosted service to the decentralized network, it is strongly recommended to avoid using grafting during the upgrade process. +> **注意**: サブグラフを Subgraph Studio またはホストされたサービスから分散ネットワークにアップグレードする場合は、アップグレード プロセス中にグラフティングの使用を避けることを強くお勧めします。 -### Why Is This Important? +### 何でこれが大切ですか? -Grafting is a powerful feature that allows you to "graft" one subgraph onto another, effectively transferring historical data from the existing subgraph to a new version. While this is an effective way to preserve data and save time on indexing, grafting may introduce complexities and potential issues when migrating from a hosted environment to the decentralized network. It is not possible to graft a subgraph from The Graph Network back to the hosted service or Subgraph Studio. +グラフティングは、既存のサブグラフから新しいバージョンに歴史的なデータを効果的に転送することを可能にする、強力な機能です。これはデータを保存し、インデックス作業に時間を節約する効果的な方法ですが、ホスト環境から分散ネットワークに移行する際に複雑さや潜在的な問題を導入する可能性があります。The Graph NetworkからホストされたサービスやSubgraph Studioにサブグラフを戻すことはできません。 -### Best Practices +### ベストプラクティス -**Initial Migration**: when you first deploy your subgraph to the decentralized network, do so without grafting. Ensure that the subgraph is stable and functioning as expected. +**初期移行**: サブグラフを初めて分散ネットワークにデプロイするときは、移植せずに実行してください。 サブグラフが安定しており、期待どおりに機能していることを確認します。 -**Subsequent Updates**: once your subgraph is live and stable on the decentralized network, you may use grafting for future versions to make the transition smoother and to preserve historical data. +**その後の更新**: サブグラフが分散ネットワーク上で稼働し、安定したら、移行をよりスムーズにし、履歴データを保存するために、将来のバージョンにグラフティングを使用できます。 -By adhering to these guidelines, you minimize risks and ensure a smoother migration process. +これらのガイドラインに従うことで、リスクを最小限に抑え、よりスムーズな移行プロセスを確保できます。 ## 既存のサブグラフの構築 From 1842ea623e8354223169787e8ffae8942c8c1581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:18 -0400 Subject: [PATCH 336/924] New translations firehose.mdx (French) --- website/pages/fr/firehose.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/fr/firehose.mdx b/website/pages/fr/firehose.mdx index f4669f63f370..de3f978ae12b 100644 --- a/website/pages/fr/firehose.mdx +++ b/website/pages/fr/firehose.mdx @@ -4,19 +4,19 @@ title: Firehose ![Firehose Logo](/img/firehose-logo.png) -Firehose is a new technology developed by StreamingFast working with The Graph Foundation. The product provides **previously unseen capabilities and speeds for indexing blockchain data** using a files-based and streaming-first approach. +Firehose est une nouvelle technologie développée par StreamingFast en collaboration avec The Graph Foundation. Le produit offre des **des capacités et des vitesses inédites pour l'indexation des données de la blockchain** en utilisant une approche basée sur les fichiers et axée sur le streaming. -Firehose extracts, transforms and saves blockchain data in a highly performant file-based strategy. Blockchain developers can then access data extracted by Firehose through binary data streams. Firehose is intended to stand as a replacement for The Graph’s original blockchain data extraction layer. +Firehose extrait, transforme et enregistre les données de la blockchain dans une stratégie très performante basée sur des fichiers. Les développeurs de blockchain peuvent ensuite accéder aux données extraites par Firehose par le biais de flux de données binaires. Firehose est destiné à remplacer la couche d'extraction de données blockchain originale de The Graph. ## Firehose Documentation -The Firehose documentation is currently maintained by the StreamingFast team [on the StreamingFast website](https://firehose.streamingfast.io/). +La documentation Firehose est actuellement maintenue par l'équipe StreamingFast [sur le site web de StreamingFast](https://firehose.streamingfast.io/). ### Démarrage -- Read this [Firehose introduction](https://firehose.streamingfast.io/introduction/firehose-overview) to get an overview of what it is and why it was built. -- Learn about the [Prerequisites](https://firehose.streamingfast.io/introduction/prerequisites) to install and deploy Firehose. +- Lisez cette [introduction à Firehose](https://firehose.streamingfast.io/introduction/firehose-overview) pour avoir un aperçu de ce que c'est et pourquoi il a été construit. +- Découvrez les [Prérequis](https://firehose.streamingfast.io/introduction/prerequisites) pour installer et déployer Firehose. -### Expand Your Knowledge +### Élargissez vos connaissances -- Learn about the different [Firehose components](https://firehose.streamingfast.io/architecture/components) available. +- Découvrez les différents [composants Firehose](https://firehose.streamingfast.io/architecture/components) disponibles. From 4d1da928872610f5aadebe949356d49ebb9f57ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:20 -0400 Subject: [PATCH 337/924] New translations firehose.mdx (Czech) --- website/pages/cs/firehose.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/cs/firehose.mdx b/website/pages/cs/firehose.mdx index 02f0d63c72db..afcfd452145e 100644 --- a/website/pages/cs/firehose.mdx +++ b/website/pages/cs/firehose.mdx @@ -12,7 +12,7 @@ Firehose extracts, transforms and saves blockchain data in a highly performant f The Firehose documentation is currently maintained by the StreamingFast team [on the StreamingFast website](https://firehose.streamingfast.io/). -### Getting Started +### Začínáme - Read this [Firehose introduction](https://firehose.streamingfast.io/introduction/firehose-overview) to get an overview of what it is and why it was built. - Learn about the [Prerequisites](https://firehose.streamingfast.io/introduction/prerequisites) to install and deploy Firehose. From d785d05a058fef4a0d0ff035c5f6a8072b07fdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:22 -0400 Subject: [PATCH 338/924] New translations firehose.mdx (Japanese) --- website/pages/ja/firehose.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/pages/ja/firehose.mdx b/website/pages/ja/firehose.mdx index af1cfb29dd64..5829d0f1408d 100644 --- a/website/pages/ja/firehose.mdx +++ b/website/pages/ja/firehose.mdx @@ -2,21 +2,21 @@ title: Firehose --- -![Firehose Logo](/img/firehose-logo.png) +![Firehose ロゴ](/img/firehose-logo.png) -Firehose is a new technology developed by StreamingFast working with The Graph Foundation. The product provides **previously unseen capabilities and speeds for indexing blockchain data** using a files-based and streaming-first approach. +Firehoseは、StreamingFastがThe Graph Foundationと共同で開発した新技術です。この製品は、**ファイルベースとストリーミングファーストのアプローチを使って、ブロックチェーンデータ**をインデックス化するための、これまでにない機能と速度を提供します。 -Firehose extracts, transforms and saves blockchain data in a highly performant file-based strategy. Blockchain developers can then access data extracted by Firehose through binary data streams. Firehose is intended to stand as a replacement for The Graph’s original blockchain data extraction layer. +Firehoseはブロックチェーンのデータを抽出し、変換し、非常にパフォーマンスの高いファイルベースの戦略で保存します。ブロックチェーン開発者は、Firehoseによって抽出されたデータにバイナリ・データ・ストリームを通じてアクセスすることができる。Firehoseは、The Graphのオリジナルのブロックチェーンデータ抽出レイヤーの代替となることを意図しています。 -## Firehose Documentation +## Firehose ドキュメンテーション -The Firehose documentation is currently maintained by the StreamingFast team [on the StreamingFast website](https://firehose.streamingfast.io/). +Firehoseのドキュメントは現在、StreamingFastチーム[がStreamingFastのウェブサイト](https://firehose.streamingfast.io/)で管理しています。 ### はじめに -- Read this [Firehose introduction](https://firehose.streamingfast.io/introduction/firehose-overview) to get an overview of what it is and why it was built. -- Learn about the [Prerequisites](https://firehose.streamingfast.io/introduction/prerequisites) to install and deploy Firehose. +- この[Firehoseの紹介](https://firehose.streamingfast.io/introduction/firehose-overview)を読んで、Firehoseとは何か、なぜ作られたのかの概要を学びましょう。 +- Firehose をインストールおよびデプロイするための [ 前提条件](https://firehose.streamingfast.io/introduction/prerequisites) について説明します。 -### Expand Your Knowledge +### 知識を広げよう -- Learn about the different [Firehose components](https://firehose.streamingfast.io/architecture/components) available. +- さまざまな[ファイヤーホース・コンポーネント](https://firehose.streamingfast.io/architecture/components)についてご紹介します。 From a9eab71f58b1e15315678c757806fe2c2ced6401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:28 -0400 Subject: [PATCH 339/924] New translations firehose.mdx (Chinese Simplified) --- website/pages/zh/firehose.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/zh/firehose.mdx b/website/pages/zh/firehose.mdx index be2ecda94c66..eb0ecc6218da 100644 --- a/website/pages/zh/firehose.mdx +++ b/website/pages/zh/firehose.mdx @@ -17,6 +17,6 @@ The Firehose documentation is currently maintained by the StreamingFast team [on - Read this [Firehose introduction](https://firehose.streamingfast.io/introduction/firehose-overview) to get an overview of what it is and why it was built. - Learn about the [Prerequisites](https://firehose.streamingfast.io/introduction/prerequisites) to install and deploy Firehose. -### Expand Your Knowledge +### 知识拓展 - Learn about the different [Firehose components](https://firehose.streamingfast.io/architecture/components) available. From bf85d808b66c3f104f931eec58efa36407d75a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:28 -0400 Subject: [PATCH 340/924] New translations firehose.mdx (Urdu (Pakistan)) --- website/pages/ur/firehose.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ur/firehose.mdx b/website/pages/ur/firehose.mdx index ec5def6a02e5..b72345dabf9d 100644 --- a/website/pages/ur/firehose.mdx +++ b/website/pages/ur/firehose.mdx @@ -17,6 +17,6 @@ The Firehose documentation is currently maintained by the StreamingFast team [on - Read this [Firehose introduction](https://firehose.streamingfast.io/introduction/firehose-overview) to get an overview of what it is and why it was built. - Learn about the [Prerequisites](https://firehose.streamingfast.io/introduction/prerequisites) to install and deploy Firehose. -### Expand Your Knowledge +### اپنے علم کو وسعت دیں - Learn about the different [Firehose components](https://firehose.streamingfast.io/architecture/components) available. From 1f3b9a6da57974fdb45dd1019923ffa20fc95864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:32 -0400 Subject: [PATCH 341/924] New translations substreams.mdx (French) --- website/pages/fr/substreams.mdx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/fr/substreams.mdx b/website/pages/fr/substreams.mdx index ff1e1abf13e0..530576e93e03 100644 --- a/website/pages/fr/substreams.mdx +++ b/website/pages/fr/substreams.mdx @@ -4,11 +4,11 @@ title: Substreams ![Substreams Logo](/img/substreams-logo.png) -Substreams is a powerful blockchain indexing technology, developed for The Graph Network. Substreams enables developers to write Rust modules, composing data streams alongside the community, and provides extremely high-performance indexing by virtue of parallelization, in a streaming-first fashion. +Substreams est une puissante technologie d'indexation de blockchain, développée pour The Graph Network. Substreams permet aux développeurs d'écrire des modules Rust, composant des flux de données aux côtés de la communauté, et fournit une indexation extrêmement performante en vertu de la parallélisation, d'une manière "streaming-first". -With Substreams, you can extract data from different blockchains (Ethereum, BNB, Solana...) ultra-fast! Then, you can send to data to several locations (a Postgres database, a Mongo database, or a Subgraph). +Avec Substreams, vous pouvez extraire des données de différentes blockchains (Ethereum, BNB, Solana...) ultra-rapidement ! Ensuite, vous pouvez envoyer aux données à plusieurs endroits (une base de données Postgres, une base de données Mongo ou un Subgraph). -## How Substreams Works in 4 Steps +## Le fonctionnement de Substreams en 4 étapes 1. **You write a Rust program, which defines the transformations that you want to apply to the blockchain data.** For example, the following Rust function extracts relevant information from an Ethereum block (number, hash, and parent hash). @@ -24,21 +24,21 @@ fn get_my_block(blk: Block) -> Result { } ``` -2. **You wrap up your Rust program into a WASM module just by running a single CLI command.** +2. **Il suffit d'exécuter une seule commande CLI pour transformer votre programme Rust en un module WASM.** -3. **The WASM container is sent to a Substreams endpoint for execution.** The Substreams provider feeds the WASM container with the blockchain data and the transformations are applied. +3. **Le conteneur WASM est envoyé à un point de terminaison Substreams pour exécution.** Le fournisseur Substreams alimente le conteneur WASM avec les données blockchain et les transformations sont appliquées. -4. **You select a [sink](https://substreams.streamingfast.io/developers-guide/sink-targets), a place where you want to send the transformed data** (a Postgres database or a Subgraph, for example). +4. **Vous sélectionnez un [sink](https://substreams.streamingfast.io/developers-guide/sink-targets), un endroit où vous voulez envoyer les données transformées** (une base de données Postgres ou un Subgraph, par exemple). -## Substreams Documentation +## Documentation des Substreams -The official Substreams documentation is currently maintained by the StreamingFast team [on the StreamingFast website](https://substreams.streamingfast.io/). +La documentation officielle de Substreams est actuellement maintenue par l'équipe de StreamingFast [sur le site web de StreamingFast](https://substreams.streamingfast.io/). ### Démarrage -- In order to develop and deploy a Substreams, [you must install the Substreams CLI](https://substreams.streamingfast.io/getting-started/installing-the-cli). -- Then, run your first Substreams by following the [Quickstart Tutorial](https://substreams.streamingfast.io/getting-started/quickstart). +- Pour développer et déployer un Substreams, [vous devez installer le CLI Substreams](https://substreams.streamingfast.io/getting-started/installing-the-cli). +- Ensuite, exécutez vos premiers Substreams en suivant le [Tutoriel de démarrage rapide](https://substreams.streamingfast.io/getting-started/quickstart). -### Expand Your Knowledge +### Élargissez vos connaissances -- Take a look at the [Ethereum Explorer Tutorial](https://substreams.streamingfast.io/tutorials/overview/) to learn about the basic transformations you can create with Substreams. +- Jetez un œil au [Tutoriel Ethereum Explorer](https://substreams.streamingfast.io/tutorials/overview/) pour en savoir plus sur les transformations de base que vous pouvez créer avec Substreams. From 0215ce90cab2202f34893e5cf0c90dd5e456357c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:34 -0400 Subject: [PATCH 342/924] New translations substreams.mdx (Arabic) --- website/pages/ar/substreams.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ar/substreams.mdx b/website/pages/ar/substreams.mdx index 86f612820182..267a7b3c92b6 100644 --- a/website/pages/ar/substreams.mdx +++ b/website/pages/ar/substreams.mdx @@ -1,5 +1,5 @@ --- -title: متعدد-السلاسل +title: سبستريمز --- ![Substreams Logo](/img/substreams-logo.png) From 92c0cc5f4a0aaed8b31ba640f7c8ae37fd3eee85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:34 -0400 Subject: [PATCH 343/924] New translations substreams.mdx (Czech) --- website/pages/cs/substreams.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/cs/substreams.mdx b/website/pages/cs/substreams.mdx index 2a06de8ac868..3d91bccb7e51 100644 --- a/website/pages/cs/substreams.mdx +++ b/website/pages/cs/substreams.mdx @@ -34,7 +34,7 @@ fn get_my_block(blk: Block) -> Result { The official Substreams documentation is currently maintained by the StreamingFast team [on the StreamingFast website](https://substreams.streamingfast.io/). -### Getting Started +### Začínáme - In order to develop and deploy a Substreams, [you must install the Substreams CLI](https://substreams.streamingfast.io/getting-started/installing-the-cli). - Then, run your first Substreams by following the [Quickstart Tutorial](https://substreams.streamingfast.io/getting-started/quickstart). From fc53868d9f3dd43eb403771fb5ad74179a669f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:37 -0400 Subject: [PATCH 344/924] New translations substreams.mdx (Japanese) --- website/pages/ja/substreams.mdx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/website/pages/ja/substreams.mdx b/website/pages/ja/substreams.mdx index 83139831b10c..0ca4e021f17c 100644 --- a/website/pages/ja/substreams.mdx +++ b/website/pages/ja/substreams.mdx @@ -2,15 +2,15 @@ title: サブストリーム --- -![Substreams Logo](/img/substreams-logo.png) +![Substreams ロゴ](/img/substreams-logo.png) -Substreams is a powerful blockchain indexing technology, developed for The Graph Network. Substreams enables developers to write Rust modules, composing data streams alongside the community, and provides extremely high-performance indexing by virtue of parallelization, in a streaming-first fashion. +Substreamsは、The Graph Networkのために開発された強力なブロックチェーンインデクシング技術です。Substreams は、開発者がコミュニティと共にデータストリームを構成する Rust モジュールを記述することを可能にし、ストリーミングファースト方式による並列化によって極めて高性能なインデックス作成を実現します。 -With Substreams, you can extract data from different blockchains (Ethereum, BNB, Solana...) ultra-fast! Then, you can send to data to several locations (a Postgres database, a Mongo database, or a Subgraph). +Substreamsを使えば、さまざまなブロックチェーン(Ethereum、BNB、Solana...)から超高速でデータを抽出できます!そして、データを複数の場所(Postgresデータベース、Mongoデータベース、Subgraph)に送ることができます。 -## How Substreams Works in 4 Steps +## サブストリームの4つのステップ -1. **You write a Rust program, which defines the transformations that you want to apply to the blockchain data.** For example, the following Rust function extracts relevant information from an Ethereum block (number, hash, and parent hash). +1. **ブロックチェーンのデータに適用したい変換を定義したRustプログラムを記述します。**例えば、以下のRust関数はイーサリアムのブロックから関連情報(番号、ハッシュ、親ハッシュ)を抽出します。 ```rust fn get_my_block(blk: Block) -> Result { @@ -24,21 +24,21 @@ fn get_my_block(blk: Block) -> Result { } ``` -2. **You wrap up your Rust program into a WASM module just by running a single CLI command.** +2. **CLIコマンドを1つ実行するだけで、RustプログラムをWASMモジュールにまとめることができます。** -3. **The WASM container is sent to a Substreams endpoint for execution.** The Substreams provider feeds the WASM container with the blockchain data and the transformations are applied. +3. **WASMコンテナは実行のためにSubstreamsエンドポイントに送られます。** SubstreamsプロバイダはWASMコンテナにブロックチェーンデータを送り、変換が適用されます。 -4. **You select a [sink](https://substreams.streamingfast.io/developers-guide/sink-targets), a place where you want to send the transformed data** (a Postgres database or a Subgraph, for example). +4. **[sink](https://substreams.streamingfast.io/developers-guide/sink-targets)、つまり変換されたデータを送る場所**を選択します(例えば、PostgresデータベースやSubgraphなど)。 -## Substreams Documentation +## Substreams ドキュメンテーション -The official Substreams documentation is currently maintained by the StreamingFast team [on the StreamingFast website](https://substreams.streamingfast.io/). +サブストリームの公式ドキュメントは現在、StreamingFastチーム[によってStreamingFastウェブサイト](https://substreams.streamingfast.io/)で管理されています。 ### はじめに -- In order to develop and deploy a Substreams, [you must install the Substreams CLI](https://substreams.streamingfast.io/getting-started/installing-the-cli). -- Then, run your first Substreams by following the [Quickstart Tutorial](https://substreams.streamingfast.io/getting-started/quickstart). +- サブストリームを開発および展開するには、[サブストリームCLI](https://substreams.streamingfast.io/getting-started/installing-the-cli)をインストールする必要があります。 +- その後、[Quickstart Tutorial](https://substreams.streamingfast.io/getting-started/quickstart)に従って最初のサブストリームを実行します。 -### Expand Your Knowledge +### 知識を広げよう -- Take a look at the [Ethereum Explorer Tutorial](https://substreams.streamingfast.io/tutorials/overview/) to learn about the basic transformations you can create with Substreams. +- [Ethereum Explorer チュートリアル](https://substreams.streamingfast.io/tutorials/overview/)を見て、サブストリームで作成できる基本的な変換について学んでください。 From e0bf28ea926abadc0421693bdf44afaa50b9da48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:39 -0400 Subject: [PATCH 345/924] New translations substreams.mdx (Portuguese) --- website/pages/pt/substreams.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pt/substreams.mdx b/website/pages/pt/substreams.mdx index 48b2f7bc643e..17684b853dab 100644 --- a/website/pages/pt/substreams.mdx +++ b/website/pages/pt/substreams.mdx @@ -41,4 +41,4 @@ A documentação oficial do Substreams é mantida atualmente pela equipa do Stre ### Expanda o Seu Conhecimento -- Take a look at the [Ethereum Explorer Tutorial](https://substreams.streamingfast.io/tutorials/overview/) to learn about the basic transformations you can create with Substreams. +- Confira o [Tutorial de Explorador de Ethereum](https://substreams.streamingfast.io/tutorials/overview/) para aprender as transformações básicas que podes criar com o Substreams. From b5420d3e8b47dd2071041a974359ce6305a39b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:43 -0400 Subject: [PATCH 346/924] New translations substreams.mdx (Chinese Simplified) --- website/pages/zh/substreams.mdx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/pages/zh/substreams.mdx b/website/pages/zh/substreams.mdx index 5f9e111a089e..e43e59f76ac8 100644 --- a/website/pages/zh/substreams.mdx +++ b/website/pages/zh/substreams.mdx @@ -2,15 +2,15 @@ title: 子流 --- -![Substreams Logo](/img/substreams-logo.png) +![子流Logo](/img/substreams-logo.png) -Substreams is a powerful blockchain indexing technology, developed for The Graph Network. Substreams enables developers to write Rust modules, composing data streams alongside the community, and provides extremely high-performance indexing by virtue of parallelization, in a streaming-first fashion. +Substreams 是一项为 The Graph Network 开发的强大的区块链索引技术。Substreams 允许开发者编写 Rust 模块,与社区一同组成数据流,并通过并行化以流式优先的方式提供极高性能的索引功能。 -With Substreams, you can extract data from different blockchains (Ethereum, BNB, Solana...) ultra-fast! Then, you can send to data to several locations (a Postgres database, a Mongo database, or a Subgraph). +使用Substreams,您可以以超快的速度从不同的区块链(如以太坊、BNB、Solana等)提取数据!然后,您可以将数据发送到多个位置(如Postgres数据库、Mongo数据库或Subgraph)。 -## How Substreams Works in 4 Steps +## 子流的工作原理分为四个步骤 -1. **You write a Rust program, which defines the transformations that you want to apply to the blockchain data.** For example, the following Rust function extracts relevant information from an Ethereum block (number, hash, and parent hash). +1. **您编写了一个Rust程序,定义了要应用于区块链数据的转换操作。**例如,以下的Rust函数从以太坊区块中提取相关信息(区块号、哈希和父哈希)。 ```rust fn get_my_block(blk: Block) -> Result { @@ -24,21 +24,21 @@ fn get_my_block(blk: Block) -> Result { } ``` -2. **You wrap up your Rust program into a WASM module just by running a single CLI command.** +2. **您只需运行一个命令行命令,就可以将您的Rust程序打包成一个WASM模块。** -3. **The WASM container is sent to a Substreams endpoint for execution.** The Substreams provider feeds the WASM container with the blockchain data and the transformations are applied. +3. **WASM容器被发送到Substreams端点执行。** Substreams提供商将区块链数据传送给WASM容器,然后执行转换操作。 -4. **You select a [sink](https://substreams.streamingfast.io/developers-guide/sink-targets), a place where you want to send the transformed data** (a Postgres database or a Subgraph, for example). +4. **您选择一个[sink](https://substreams.streamingfast.io/developers-guide/sink-targets),即您希望将转换后的数据发送到的位置**(例如,一个Postgres数据库或一个Subgraph)。 -## Substreams Documentation +## 子流文档 -The official Substreams documentation is currently maintained by the StreamingFast team [on the StreamingFast website](https://substreams.streamingfast.io/). +Substreams的官方文档目前由StreamingFast团队[在StreamingFast的网站上](https://substreams.streamingfast.io/)维护。 ### 开始 -- In order to develop and deploy a Substreams, [you must install the Substreams CLI](https://substreams.streamingfast.io/getting-started/installing-the-cli). -- Then, run your first Substreams by following the [Quickstart Tutorial](https://substreams.streamingfast.io/getting-started/quickstart). +- 要开发和部署Substreams,[您必须安装Substreams CLI](https://substreams.streamingfast.io/getting-started/installing-the-cli)。 +- 接下来,您可以按照[快速入门教程](https://substreams.streamingfast.io/getting-started/quickstart). 中的步骤运行您的第一个子流。 -### Expand Your Knowledge +### 知识拓展 - Take a look at the [Ethereum Explorer Tutorial](https://substreams.streamingfast.io/tutorials/overview/) to learn about the basic transformations you can create with Substreams. From f3bcf270b226a7bb3c3ea5fd6475ad1426771e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:43 -0400 Subject: [PATCH 347/924] New translations substreams.mdx (Urdu (Pakistan)) --- website/pages/ur/substreams.mdx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/ur/substreams.mdx b/website/pages/ur/substreams.mdx index 01f9333f5460..eef9395d11d6 100644 --- a/website/pages/ur/substreams.mdx +++ b/website/pages/ur/substreams.mdx @@ -1,16 +1,16 @@ --- -title: سب اسٹریمز +title: سب سٹریمز --- -![Substreams Logo](/img/substreams-logo.png) +![سب سٹریمز لوگو](/img/substreams-logo.png) -Substreams is a powerful blockchain indexing technology, developed for The Graph Network. Substreams enables developers to write Rust modules, composing data streams alongside the community, and provides extremely high-performance indexing by virtue of parallelization, in a streaming-first fashion. +سب سٹریمز ایک طاقتور بلاکچین انڈیکسنگ ٹیکنالوجی ہے، جو گراف نیٹ ورک کے لیے تیار کی گئی ہے۔ سب سٹریمز ڈویلپرز کو رسٹ ماڈیولز لکھنے کے قابل بناتا ہے، کمیونٹی کے ساتھ ڈیٹا سٹریمز کمپوز کرتا ہے، اور سٹریمنگ کے پہلے انداز میں متوازی ہونے کی وجہ سے انتہائی اعلیٰ کارکردگی کی انڈیکسنگ فراہم کرتا ہے۔ -With Substreams, you can extract data from different blockchains (Ethereum, BNB, Solana...) ultra-fast! Then, you can send to data to several locations (a Postgres database, a Mongo database, or a Subgraph). +سب سٹریمز کے ساتھ، آپ مختلف بلاکچینز (ایتھیریم، بی این بی، سولانا...) سے انتہائی تیز رفتار ڈیٹا نکال سکتے ہیں! اس کے بعد، آپ ڈیٹا کو کئی مقامات پر بھیج سکتے ہیں (پوسٹگریس ڈیٹا بیس، مونگو ڈیٹا بیس، یا سب گراف)۔ -## How Substreams Works in 4 Steps +## سب سٹریمز 4 مراحل میں کیسے کام کرتا ہے۔ -1. **You write a Rust program, which defines the transformations that you want to apply to the blockchain data.** For example, the following Rust function extracts relevant information from an Ethereum block (number, hash, and parent hash). +1. **آپ ایک رسٹ پروگرام لکھتے ہیں، جو ان تبدیلیوں کی وضاحت کرتا ہے جو آپ بلاکچین ڈیٹا پر لاگو کرنا چاہتے ہیں۔** مثال کے طور پر، درج ذیل رسٹ فنکشن ایتھیریم بلاک (نمبر ، ہیش، اور پیرنٹ ہیش)۔ ```rust fn get_my_block(blk: Block) -> Result { @@ -24,21 +24,21 @@ fn get_my_block(blk: Block) -> Result { } ``` -2. **You wrap up your Rust program into a WASM module just by running a single CLI command.** +2. **آپ صرف ایک CLI کمانڈ چلا کر اپنے رسٹ پروگرام کو WASM ماڈیول میں سمیٹتے ہیں۔** -3. **The WASM container is sent to a Substreams endpoint for execution.** The Substreams provider feeds the WASM container with the blockchain data and the transformations are applied. +3. **WASM کنٹینر کو چلانے کے لیے سب سٹریم اینڈ پوائنٹ پر بھیجا جاتا ہے۔** سب سٹریم فراہم کنندہ WASM کنٹینر کو بلاکچین ڈیٹا کے ساتھ فیڈ کرتا ہے اور تبدیلیاں لاگو ہوتی ہیں۔ -4. **You select a [sink](https://substreams.streamingfast.io/developers-guide/sink-targets), a place where you want to send the transformed data** (a Postgres database or a Subgraph, for example). +4. **آپ ایک [سنک](https://substreams.streamingfast.io/developers-guide/sink-targets) منتخب کرتے ہیں، وہ جگہ جہاں آپ بھیجنا چاہتے ہیں تبدیل شدہ ڈیٹا** (مثال کے طور پر پوسٹگریس ڈیٹا بیس یا سب گراف)۔ -## Substreams Documentation +## سب سٹریمز دستاویزات -The official Substreams documentation is currently maintained by the StreamingFast team [on the StreamingFast website](https://substreams.streamingfast.io/). +فائر ہوز دستاویزات کو فی الحال سٹریمنگ فاسٹ ٹیم [سٹریمنگ فاسٹ ویب سائٹ پر](https://firehose.streamingfast.io/) کے ذریعے برقرار رکھا جاتا ہے۔ ### شروع ہوا چاہتا ہے -- In order to develop and deploy a Substreams, [you must install the Substreams CLI](https://substreams.streamingfast.io/getting-started/installing-the-cli). -- Then, run your first Substreams by following the [Quickstart Tutorial](https://substreams.streamingfast.io/getting-started/quickstart). +- سب سٹریمز کو تیار کرنے اور ان کو تعینات کرنے کے لیے، [آپ کو سب سٹریمز CLI انسٹال کرنا ہوگا](https://substreams.streamingfast.io/getting-started/installing-the-cli)۔ +- پھر، [کوئیک سٹارٹ ٹیوٹوریل](https://substreams.streamingfast.io/getting-started/quickstart) کی پیروی کرکے اپنے پہلے سب سٹریمز چلائیں۔ -### Expand Your Knowledge +### اپنے علم کو وسعت دیں -- Take a look at the [Ethereum Explorer Tutorial](https://substreams.streamingfast.io/tutorials/overview/) to learn about the basic transformations you can create with Substreams. +- ان بنیادی تبدیلیوں کے بارے میں جاننے کے لیے جو آپ سب سٹریمز کے ساتھ تخلیق کر سکتے ہیں، [ایتھیریم ایکسپلورر ٹیوٹوریل](https://substreams.streamingfast.io/tutorials/overview/) پر ایک نظر ڈالیں۔ From e3855428f674e2154e4cbb213f441c298277fe3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:47 -0400 Subject: [PATCH 348/924] New translations tokenomics.mdx (French) --- website/pages/fr/tokenomics.mdx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/fr/tokenomics.mdx b/website/pages/fr/tokenomics.mdx index adade52a8925..f130160f2a2b 100644 --- a/website/pages/fr/tokenomics.mdx +++ b/website/pages/fr/tokenomics.mdx @@ -1,35 +1,35 @@ --- title: Tokenomics of The Graph Network -description: The Graph Network is incentivized by powerful tokenomics. Here’s how GRT, The Graph’s native work utility token works. +description: Le réseau The Graph est encouragé par une puissante tokénomique. Voici comment fonctionne GRT, le jeton natif de l'utilitaire de travail du réseau The Graph. --- -- GRT Token Address: [0xc944e90c64b2c07662a292be6244bdf05cda44a7](https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) +- Adresse du jeton GRT: [0xc944e90c64b2c07662a292be6244bdf05cda44a7](https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) -- GRT Token Address on Arbitrum One: [0x9623063377AD1B27544C965cCd7342f7EA7e88C7](https://arbiscan.io/token/0x9623063377ad1b27544c965ccd7342f7ea7e88c7) +- Adresse du jeton GRT sur Arbitrum One: [0x9623063377AD1B27544C965cCd7342f7EA7e88C7](https://arbiscan.io/token/0x9623063377ad1b27544c965ccd7342f7ea7e88c7) The Graph est un protocole décentralisé qui facilite l'accès aux données de la blockchain. -It's similar to a B2B2C model, except it is powered by a decentralized network of participants. Network participants work together to provide data to end users in exchange for GRT rewards. GRT is the work utility token that coordinates data providers and consumers. GRT serves as a utility for coordinating data providers and consumers within the network and incentivizes protocol participants to organize data effectively. +Il s'agit d'un modèle similaire à celui du B2B2C, sauf qu'il est alimenté par un réseau décentralisé de participants. Les participants au réseau travaillent ensemble pour fournir des données aux utilisateurs finaux en échange de récompenses GRT. GRT est le jeton de travail utilitaire qui coordonne les fournisseurs de données et les consommateurs. Le GRT sert d'utilitaire pour coordonner les fournisseurs et les consommateurs de données au sein du réseau et incite les participants au protocole à organiser les données de manière efficace. By using The Graph, users can easily access data from the blockchain, paying only for the specific information they need. The Graph is used by many [popular dapps](https://thegraph.com/explorer) in the web3 ecosystem today. -The Graph indexes blockchain data similarly to how Google indexes the web. In fact, you may already be using The Graph without realizing it. If you've viewed the front end of a dapp that gets its data from a subgraph, you queried data from a subgraph! +The Graph indexe les données de la blockchain de la même manière que Google indexe le web. En fait, vous utilisez peut-être déjà The Graph sans vous en rendre compte. Si vous avez consulté le front-end d'une dapp qui obtient ses données à partir d'un subgraph, vous avez interrogé des données à partir d'un subgraph ! -The Graph plays a crucial role in making blockchain data more accessible and enabling a marketplace for its exchange. +The Graph joue un rôle crucial en rendant les données blockchain plus accessibles et en permettant un marché pour leur échange. -## The Roles of Network Participants +## Les rôles des participants au réseau -There are four primary network participants: +Les participants au réseau sont au nombre de quatre : 1. Delegators - Delegate GRT to Indexers & secure the network -2. Curators - Find the best subgraphs for Indexers +2. Curateurs - Trouver les meilleurs subgraphs pour les indexeurs 3. Developers - Build & query subgraphs 4. Indexers - Backbone of blockchain data -Fishermen and Arbitrators are also integral to the network’s success through other contributions, supporting the work of the other primary participant roles. For more information about network roles, [read this article](https://thegraph.com/blog/the-graph-grt-token-economics/). +Les pêcheurs et les arbitres font également partie intégrante du succès du réseau à travers d’autres contributions, soutenant le travail des autres principaux participants. Pour plus d'informations sur les rôles réseau, [lisez cet article](https://thegraph.com/blog/the-graph-grt-token-activitys/). ![Tokenomics diagram](/img/updated-tokenomics-image.png) @@ -47,7 +47,7 @@ If you're reading this, you're capable of becoming a Delegator right now by head Curators identify high-quality subgraphs, and "curate" them (i.e., signal GRT on them) to earn curation shares, which guarantee a percentage of all future query fees generated by the subgraph. While any independent network participant can be a Curator, typically subgraph developers are among the first Curators for their own subgraphs because they want to ensure their subgraph is indexed. -As of December 2022, subgraph developers are encouraged to curate their subgraph with at least 10,000 GRT. However, this number may be impacted by network activity and community participation. +À partir de décembre 2022, les développeurs de subgraphs sont encouragés à curer leur subgraph avec au moins 10 000 GRT. Toutefois, ce nombre peut être influencé par l'activité du réseau et la participation de la communauté. Curators pay a 1% curation tax when they curate a new subgraph. This curation tax is burned, decreasing the supply of GRT. From 1e9cf1b14fc5c51d00ab56642b39b2961012baab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:51 -0400 Subject: [PATCH 349/924] New translations tokenomics.mdx (Italian) --- website/pages/it/tokenomics.mdx | 110 ++++++++++++++++---------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/website/pages/it/tokenomics.mdx b/website/pages/it/tokenomics.mdx index b87200dc6b04..47597f1d5762 100644 --- a/website/pages/it/tokenomics.mdx +++ b/website/pages/it/tokenomics.mdx @@ -1,110 +1,110 @@ --- -title: Tokenomics of The Graph Network -description: The Graph Network is incentivized by powerful tokenomics. Here’s how GRT, The Graph’s native work utility token works. +title: Tokenomics di The Graph Network +description: The Graph Network è incentivato da una forte tokenomics. Ecco come funziona GRT, il token di utilità nativo di The Graph. --- -- GRT Token Address: [0xc944e90c64b2c07662a292be6244bdf05cda44a7](https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) +- Indirizzo del token GRT: [0xc944e90c64b2c07662a292be6244bdf05cda44a7](https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) -- GRT Token Address on Arbitrum One: [0x9623063377AD1B27544C965cCd7342f7EA7e88C7](https://arbiscan.io/token/0x9623063377ad1b27544c965ccd7342f7ea7e88c7) +- Indirizzo del token GRT su Arbitrum One: [0x9623063377AD1B27544C965cCd7342f7EA7e88C7](https://arbiscan.io/token/0x9623063377ad1b27544c965ccd7342f7ea7e88c7) -The Graph is a decentralized protocol that enables easy access to blockchain data. +The Graph è un protocollo decentralizzato che consente di accedere facilmente ai dati della blockchain. -It's similar to a B2B2C model, except it is powered by a decentralized network of participants. Network participants work together to provide data to end users in exchange for GRT rewards. GRT is the work utility token that coordinates data providers and consumers. GRT serves as a utility for coordinating data providers and consumers within the network and incentivizes protocol participants to organize data effectively. +È simile a un modello B2B2C, ma è alimentato da una rete decentralizzata di partecipanti. I partecipanti alla rete collaborano per fornire dati agli utenti finali in cambio di ricompense GRT. GRT è il token di utilità che coordina i fornitori e i consumatori di dati. Il GRT funge da utilità per coordinare i fornitori e i consumatori di dati all'interno della rete e incentiva i partecipanti al protocollo a organizzare i dati in modo efficace. -By using The Graph, users can easily access data from the blockchain, paying only for the specific information they need. The Graph is used by many [popular dapps](https://thegraph.com/explorer) in the web3 ecosystem today. +Utilizzando The Graph, gli utenti possono accedere facilmente ai dati della blockchain, pagando solo per le informazioni specifiche di cui hanno bisogno. The Graph è utilizzato da molte [dapp popolari](https://thegraph.com/explorer) nell'ecosistema web3. -The Graph indexes blockchain data similarly to how Google indexes the web. In fact, you may already be using The Graph without realizing it. If you've viewed the front end of a dapp that gets its data from a subgraph, you queried data from a subgraph! +The Graph indicizza i dati della blockchain in modo simile a come Google indicizza il web. In effetti, potreste già utilizzare The Graph senza rendervene conto. Se avete visualizzato il front-end di una dapp che ottiene i suoi dati da un subgraph, avete interrogato i dati di un subgraph! -The Graph plays a crucial role in making blockchain data more accessible and enabling a marketplace for its exchange. +The Graph svolge un ruolo cruciale nel rendere più accessibili i dati della blockchain e nel creare un mercato per il loro scambio. -## The Roles of Network Participants +## I ruoli dei partecipanti alla rete -There are four primary network participants: +I partecipanti alla rete sono quattro: -1. Delegators - Delegate GRT to Indexers & secure the network +1. Delegator - Delegare il GRT agli Indexer e proteggere la rete -2. Curators - Find the best subgraphs for Indexers +2. Curator - Trovare i migliori subgraph per gli Indexer -3. Developers - Build & query subgraphs +3. Sviluppatori - Costruire ed eseguire query del subgraph -4. Indexers - Backbone of blockchain data +4. Indexer - Struttura portante dei dati della blockchain -Fishermen and Arbitrators are also integral to the network’s success through other contributions, supporting the work of the other primary participant roles. For more information about network roles, [read this article](https://thegraph.com/blog/the-graph-grt-token-economics/). +I Fisherman e glii Arbitrator sono parte integrante del successo della rete anche attraverso altri contributi, che supportano il lavoro degli altri ruoli principali dei partecipanti. Per maggiori informazioni sui ruoli della rete, [leggere questo articolo](https://thegraph.com/blog/the-graph-grt-token-economics/). -![Tokenomics diagram](/img/updated-tokenomics-image.png) +![Diagramma della Tokenomics](/img/updated-tokenomics-image.png) -## Delegators (Passively earn GRT) +## Delegator (guadagnano GRT passivamente) -Indexers are delegated GRT by Delegators increasing the Indexer’s stake in subgraphs on the network. In return, Delegators earn a percentage of all query fees and indexing rewards from the Indexer. Each Indexer sets the cut that will be rewarded to Delegators independently, creating competition among Indexers to attract Delegators. Most Indexers offer between 9-12% annually. +Agli Indexer sono delegati GRT dai Delegator che aumentano lo stake dell'Indexer nei subgraph della rete. In cambio, i Delegator guadagnano una percentuale su tutte le tariffe di query e sui premi di indicizzazione dell'Indexer. Ogni Indexer stabilisce in modo indipendente la percentuale che verrà ricompensata ai Delegator, creando una concorrenza tra gli Indexer per attirare i Delegator. La maggior parte degli Indexer offre tra il 9 e il 12% annuo. -For example, if a Delegator were to delegate 15k GRT to an Indexer offering 10%, the Delegator would receive ~1500 GRT in rewards annually. +Ad esempio, se un Delegator dovesse delegare 15k GRT a un Indexer che offre il 10%, il Delegator riceverebbe annualmente ~1500 GRT in ricompense. -There is a 0.5% delegation tax which is burned whenever a Delegator delegates GRT on the network. If a Delegator chooses to withdraw their delegated GRT, the Delegator must wait for the 28-epoch unbonding period. Each epoch is 6,646 blocks, which means 28 epochs ends up being approximately 26 days. +Esiste una tassa di delega dello 0,5% che viene bruciata ogni volta che un Delegator delega GRT sulla rete. Se un Delegator sceglie di ritirare il proprio GRT delegato, deve attendere il periodo di unbonding di 28 epoche. Ogni epoca corrisponde a 6.646 blocchi, il che significa che 28 epoche corrispondono a circa 26 giorni. -If you're reading this, you're capable of becoming a Delegator right now by heading to the [network participants page](https://thegraph.com/explorer/participants/indexers), and delegating GRT to an Indexer of your choice. +Se state leggendo queste righe, potete diventare Delegator fin da ora andando alla pagina [participanti alla rete](https://thegraph.com/explorer/participants/indexers) e delegando GRT a un Indexer di vostra scelta. -## Curators (Earn GRT) +## Curator (guadagnano GRT) -Curators identify high-quality subgraphs, and "curate" them (i.e., signal GRT on them) to earn curation shares, which guarantee a percentage of all future query fees generated by the subgraph. While any independent network participant can be a Curator, typically subgraph developers are among the first Curators for their own subgraphs because they want to ensure their subgraph is indexed. +I Curator identificano i subgraph di alta qualità e li "curano" (cioè segnalano il GRT su di essi) per guadagnare quote di curation, che garantiscono una percentuale di tutte le future tariffe di query generate dal subgraph. Anche se qualsiasi partecipante indipendente alla rete può essere un Curator, di solito gli sviluppatori di subgraph sono tra i primi Curator dei loro subgraph, perché vogliono assicurarsi che il loro subgraph sia indicizzato. -As of December 2022, subgraph developers are encouraged to curate their subgraph with at least 10,000 GRT. However, this number may be impacted by network activity and community participation. +A partire dal dicembre 2022, gli sviluppatori di subgraph sono incoraggiati a fare curation di loro subgraph con almeno 10.000 GRT. Tuttavia, questo numero può essere influenzato dall'attività della rete e dalla partecipazione della comunità. -Curators pay a 1% curation tax when they curate a new subgraph. This curation tax is burned, decreasing the supply of GRT. +I Curator pagano una tassa di curation dell'1% quando curano un nuovo subgraph. Questa tassa di curation viene bruciata, diminuendo l'offerta di GRT. -## Developers +## Sviluppatori -Developers build and query subgraphs to retrieve blockchain data. Since subgraphs are open source, developers can query existing subgraphs to load blockchain data into their dapps. Developers pay for queries they make in GRT, which is distributed to network participants. +Gli sviluppatori costruiscono e eseguono i subgraph per recuperare i dati della blockchain. Poiché i subgraph sono open source, gli sviluppatori possono eseguire query di subgraph esistenti per caricare i dati della blockchain nelle loro dapp. Gli sviluppatori pagano per le query effettuate in GRT, che viene distribuito ai partecipanti alla rete. -### Creating a subgraph +### Creare un subgraph -Developers can [create a subgraph](/developing/creating-a-subgraph/) to index data on the blockchain. Subgraphs are instructions for Indexers about which data should be served to consumers. +Gli sviluppatori possono [creare un subgraph](/developing/creating-a-subgraph/) per indicizzare i dati sulla blockchain. I subgraph sono istruzioni per gli Indexer su quali dati devono essere serviti ai consumatori. -Once developers have built and tested their subgraph, they can [publish their subgraph](/publishing/publishing-a-subgraph/) on The Graph's decentralized network. +Una volta che gli sviluppatori hanno costruito e testato il loro subgraph, possono [pubblicare il loro subgraph](/publishing/publishing-a-subgraph/) sulla rete decentralizzata di The Graph. -### Querying an existing subgraph +### Eseguire query di un subgraph esistente -Once a subgraph is [published](https://thegraph.com/docs/en/publishing/publishing-a-subgraph/) to The Graph's decentralized network, anyone can create an API key, add GRT to their billing balance, and query the subgraph. +Una volta che un subgraph è [pubblicato](https://thegraph.com/docs/en/publishing/publishing-a-subgraph/) sulla rete decentralizzata di The Graph, chiunque può creare una chiave API, aggiungere GRT al proprio saldo di fatturazione ed eseguire query nel subgraph. -Subgraphs are [queried using GraphQL](/querying/querying-the-graph/), and the query fees are paid for with GRT in [Subgraph Studio](https://thegraph.com/studio/). Query fees are distributed to network participants based on their contributions to the protocol. +I subgraph [vengono interrogati utilizzando GraphQL](/querying/querying-the-graph/), e le tariffe di query vengono pagate con GRT nel [Subgraph Studio](https://thegraph.com/studio/). Le tariffe di query sono distribuite ai partecipanti alla rete in base ai loro contributi al protocollo. -1% of the query fees paid to the network are burned. +1% delle tariffe di query pagate alla rete viene bruciato. -## Indexers (Earn GRT) +## Indexer (Guadagnano GRT) -Indexers are the backbone of The Graph. They operate independent hardware and software powering The Graph’s decentralized network. Indexers serve data to consumers based on instructions from subgraphs. +Gli Indexer sono la spina dorsale di The Graph. Gestiscono hardware e software indipendenti che alimentano la rete decentralizzata di The Graph. Gli Indexer servono i dati ai consumatori in base alle istruzioni dei subgraph. -Indexers can earn GRT rewards in two ways: +Gli Indexer possono guadagnare premi GRT in due modi: -1. Query fees: GRT paid by developers or users for subgraph data queries. Query fees are directly distributed to Indexers according to the exponential rebate function (see GIP [here](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162)). +1. Tariffe di query: GRT pagato dagli sviluppatori o dagli utenti per le query sui dati del subgraph. Le tariffe di query sono distribuite direttamente agli Indexer secondo la funzione di sconto esponenziale (vedi GIP [qui](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162)). -2. Indexing rewards: the 3% annual issuance is distributed to Indexers based on the number of subgraphs they are indexing. These rewards incentivize Indexers to index subgraphs, occasionally before the query fees begin, to accrue and submit Proofs of Indexing (POIs) verifying that they have indexed data accurately. +2. Ricompense per l'indicizzazione: l'emissione annuale del 3% viene distribuita agli Indexer in base al numero di subgraph che stanno indicizzando. Queste ricompense incentivano gli Indexer a indicizzare i subgraph, occasionalmente prima dell'inizio delle tariffe di query, per accumulare e inviare Proofs of Indexing (POI) che verificano l'accuratezza dell'indicizzazione dei dati. -Each subgraph is allotted a portion of the total network token issuance, based on the amount of the subgraph’s curation signal. That amount is then rewarded to Indexers based on their allocated stake on the subgraph. +A ogni subgraph viene assegnata una parte dell'emissione totale di token della rete, in base all'importo del segnale di curation del subgraph. Tale importo viene poi ricompensato agli Indexer in base alla quota di partecipazione assegnata al subgraph. -In order to run an indexing node, Indexers must stake 100,000 GRT or more with the network. Indexers are incentivized to stake GRT in proportion to the amount of queries they serve. +Per gestire un nodo di indicizzazione, gli Indexer devono investire nella rete almeno 100.000 GRT. Gli Indexer sono incentivati a fare lo stake in GRT in proporzione alla quantità di query che servono. -Indexers can increase their GRT allocations on subgraphs by accepting GRT delegation from Delegators, and they can accept up to 16 times their initial stake. If an Indexer becomes "over-delegated" (i.e., more than 16 times their initial stake), they will not be able to use the additional GRT from Delegators until they increase their stake in the network. +Gli Indexer possono aumentare le loro allocazione di GRT sui subgraph accettando la delega di GRT da parte dei Delegator, e possono accettare fino a 16 volte la loro partecipazione iniziale. Se un Indexer diventa "sovra-delegato" (cioè, più di 16 volte la sua partecipazione iniziale), non sarà in grado di utilizzare il GRT aggiuntivo dei Delegator fino a quando non aumenterà la sua partecipazione alla rete. -The amount of rewards an Indexer receives can vary based on the initial stake, accepted delegation, quality of service, and many more factors. The following chart is publicly available data from an active Indexer on The Graph's decentralized network. +La quantità delle ricompense che un Indexer riceve può variare in base allo stake iniziale, al delega accettata, alla qualità del servizio e a molti altri fattori. Il grafico seguente è costituito dai dati pubblicamente disponibili di un Indexer attivo sulla rete decentralizzata di The Graph. -### The Indexer stake & reward of allnodes-com.eth +### L'Indexer stake e ricompensa di allnodes-com.eth -![Indexing stake and rewards](/img/indexing-stake-and-income.png) +![Stake e ricompense di indicizzazione](/img/indexing-stake-and-income.png) -This data is from February 2021 to September 2022. +I dati si riferiscono al periodo febbraio 2021-settembre 2022. -> Please note, this will improve when the [Arbitrum migration](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551) is complete, making gas costs a significantly lower burden for participating on the network. +> Si noti che questa situazione migliorerà quando la [migrazione di Arbitrum](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551) sarà completata, rendendo i costi del gas un onere significativamente inferiore per la partecipazione alla rete. -## Token Supply: Burning & Issuance +## Fornitura di token: Bruciatura e Emissione -The initial token supply is 10 billion GRT, with a target of 3% new issuance annually to reward Indexers for allocating stake on subgraphs. This means that the total supply of GRT tokens will increase by 3% each year as new tokens are issued to Indexers for their contribution to the network. +L'offerta iniziale di token è di 10 miliardi di GRT, con un obiettivo del 3% di nuove emissioni all'anno per ricompensare gli Indexer per per l'allocation dello stake nel subgraph. Ciò significa che l'offerta totale di token GRT aumenterà del 3% ogni anno, quando vengono emessi nuovi token agli Indexer per il loro contributo alla rete. -The Graph is designed with multiple burning mechanisms to offset new token issuance. Approximately 1% of the GRT supply is burned annually through various activities on the network, and this number has been increasing as network activity continues to grow. These burning activities include a 0.5% delegation tax whenever a Delegator delegates GRT to an Indexer, a 1% curation tax when Curators signal on a subgraph, and a 1% of query fees for blockchain data. +The Graph è progettato con meccanismi multipli di combustione per compensare l'emissione di nuovi token. Circa 1% della fornitura di GRT viene bruciato ogni anno attraverso varie attività sulla rete, e questo numero è aumentato con la continua crescita dell'attività della rete. Queste attività di combustione includono una tassa di delega di 0,5% ogni volta che un Delegator delega GRT a un Indexer, una tassa di curation di 1% quando i Curator segnalano un subgraph e 1% delle tariffe di query per i dati della blockchain. -![Total burned GRT](/img/total-burned-grt.jpeg) +![Totale GRT bruciati](/img/total-burned-grt.jpeg) -In addition to these regularly occurring burning activities, the GRT token also has a slashing mechanism in place to penalize malicious or irresponsible behavior by Indexers. If an Indexer is slashed, 50% of their indexing rewards for the epoch are burned (while the other half goes to the fisherman), and their self-stake is slashed by 2.5%, with half of this amount being burned. This helps to ensure that Indexers have a strong incentive to act in the best interests of the network and to contribute to its security and stability. +Oltre a queste attività di combustione che si svolgono regolarmente, il token GRT prevede anche un meccanismo di taglio per penalizzare i comportamenti dannosi o irresponsabili degli Indexer. Se un Indexer subisce un taglio, il 50% delle sue ricompense di indicizzazione per l'epoca viene bruciato (mentre l'altra metà va al fisherman), e la sua self-stake viene ridotta del 2,5%, con la metà di questo importo che viene bruciata. Ciò contribuisce a garantire che gli Indexer siano fortemente incentivati ad agire nell'interesse della rete e a contribuire alla sua sicurezza e stabilità. -## Improving the Protocol +## Miglioramento del protocollo -The Graph Network is ever-evolving and improvements to the economic design of the protocol are constantly being made to provide the best experience for all network participants. The Graph Council oversees protocol changes and community members are encouraged to participate. Get involved with protocol improvements in [The Graph Forum](https://forum.thegraph.com/). +La Rete di The Graph è in continua evoluzione e i miglioramenti al design economico del protocollo vengono costantemente apportati per fornire la migliore esperienza a tutti i partecipanti alla rete. Il Graph Council supervisiona le modifiche al protocollo e i membri della comunità sono incoraggiati a partecipare. Partecipate ai miglioramenti del protocollo nel [The Graph Forum](https://forum.thegraph.com/). From 2903dab73e5ed459f87bda3af28bc5fac6b26251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:52 -0400 Subject: [PATCH 350/924] New translations tokenomics.mdx (Japanese) --- website/pages/ja/tokenomics.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ja/tokenomics.mdx b/website/pages/ja/tokenomics.mdx index 384065acd920..45a65663e103 100644 --- a/website/pages/ja/tokenomics.mdx +++ b/website/pages/ja/tokenomics.mdx @@ -11,7 +11,7 @@ description: The Graph Networkは、強力なトークノミクスでインセ B2B2C モデルに似ていますが、参加者の分散型ネットワークによって強化されています。ネットワーク参加者は協力して、GRT 報酬と引き換えにエンド ユーザーにデータを提供します。 GRT は、データのプロバイダーとコンシューマーを調整するワーク ユーティリティ トークンです。 GRT は、ネットワーク内のデータ プロバイダーとコンシューマーを調整するためのユーティリティとして機能し、プロトコル参加者がデータを効果的に整理するように動機付けます。 -By using The Graph, users can easily access data from the blockchain, paying only for the specific information they need. The Graph is used by many [popular dapps](https://thegraph.com/explorer) in the web3 ecosystem today. +The Graphを利用することで、ユーザーはブロックチェーンのデータに簡単にアクセスでき、必要な特定の情報に対してのみ料金を支払うことができます。The Graphは、今日のweb3エコシステムにおける多くの[人気dapps](https://thegraph.com/explorer)によって使用されています。 The Graphは、Googleがウェブをインデックスするのと同様に、ブロックチェーンデータをインデックスします。実際、あなたは気づかないうちにすでにThe Graphを利用しているかもしれません。サブグラフからデータを取得するダップのフロントエンドを見たことがあるなら、サブグラフからデータを照会したことになります。 From d46aeb48a48278fae28ac1c7fd30ddb2c80d8fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:54 -0400 Subject: [PATCH 351/924] New translations tokenomics.mdx (Portuguese) --- website/pages/pt/tokenomics.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pt/tokenomics.mdx b/website/pages/pt/tokenomics.mdx index e01cfce19dd9..4bc08685ab3a 100644 --- a/website/pages/pt/tokenomics.mdx +++ b/website/pages/pt/tokenomics.mdx @@ -11,7 +11,7 @@ O The Graph é um protocolo descentralizado que permite o acesso fácil a dados É parecido com um modelo B2B2C, mas movido por uma rede descentralizada de participantes, que trabalham juntos para fornecer dados a utilizadores finais em troca de recompensas em GRT. O GRT é o token de utilidade que coordena provedores e consumidores de dados. O GRT serve como utilidade para a coordenação de provedores e consumidores de dados dentro da rede, e incentiva os participantes do protocolo a organizarem dados com eficácia. -By using The Graph, users can easily access data from the blockchain, paying only for the specific information they need. The Graph is used by many [popular dapps](https://thegraph.com/explorer) in the web3 ecosystem today. +Ao usar o The Graph, os utilizadores podem acessar dados da blockchain com facilidade e pagar apenas pelas informações de que precisam. O The Graph é usado por vários [dApps populares](https://thegraph.com/explorer) no ecossistema web3 hoje. O The Graph indexa dados de blockchain de forma parecida com a indexação da web pelo Google. De fato, pode já estar a usar o The Graph sem perceber. Se viu o frontend de um dApp que ganha os seus dados de um subgraph, já fez um query para dados de um subgraph! From 65e8f753949c9fc0ae18fb58f83dad709b674103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:57 -0400 Subject: [PATCH 352/924] New translations tokenomics.mdx (Turkish) --- website/pages/tr/tokenomics.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/tr/tokenomics.mdx b/website/pages/tr/tokenomics.mdx index 24759493565e..06edf0b33c4f 100644 --- a/website/pages/tr/tokenomics.mdx +++ b/website/pages/tr/tokenomics.mdx @@ -11,7 +11,7 @@ Graph, blockchain verilerine kolayca erişim sağlayan merkeziyetsiz bir protoko Merkeziyetsiz bir katılımcı ağı tarafından desteklenmesi dışında B2B2C modeline benzer. Ağ katılımcıları, GRT ödülleri karşılığında son kullanıcılara veri sağlamak için birlikte çalışır. GRT, veri sağlayıcıları ve tüketicileri koordine eden iş aracı simgesidir. GRT, ağ içindeki veri sağlayıcıları ve tüketicileri koordine etmek için bir yardımcı program olarak hizmet ederken, protokol katılımcılarını verileri etkili bir şekilde düzenlemeye de teşvik eder. -By using The Graph, users can easily access data from the blockchain, paying only for the specific information they need. The Graph is used by many [popular dapps](https://thegraph.com/explorer) in the web3 ecosystem today. +Kullanıcılar The Graph'i kullanarak blok zincirindeki verilere kolayca erişebilir ve yalnızca ihtiyaç duydukları belirli bilgiler için ödeme yapabilirler. Graph, bugün web3 ekosistemindeki birçok [popular dapps](https://thegraph.com/explorer) tarafından kullanılmaktadır. Graph, blockchain verilerini, Google'ın web'i indekslemesine benzer şekilde indeksler. Aslında, Graph'i farkında olmadan hali hazırda kullanıyor olabilirsiniz. Verilerini bir subgraph'ten alan merkeziyetsiz uygulamanın ön ucunu görüntülediyseniz, bu demek oluyor ki bir subgraph'ten veri sorgulamışsınız bile! From 79ba33f7fa4a1588414da6dcb634ddc9d657a720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:11:59 -0400 Subject: [PATCH 353/924] New translations tokenomics.mdx (Urdu (Pakistan)) --- website/pages/ur/tokenomics.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ur/tokenomics.mdx b/website/pages/ur/tokenomics.mdx index 87d3dcf6aefa..199ffa9ede9a 100644 --- a/website/pages/ur/tokenomics.mdx +++ b/website/pages/ur/tokenomics.mdx @@ -11,7 +11,7 @@ description: گراف نیٹ ورک کو طاقتور ٹوکنومکس کے ذر یہ ایک B2B2C ماڈل سے ملتا جلتا ہے، سوائے اس کے کہ یہ شرکا کے ڈیسینٹرالائزڈ نیٹ ورک سے چلتا ہے۔ نیٹ ورک کے شرکاء GRT انعامات کے بدلے اختتامی صارفین کو ڈیٹا فراہم کرنے کے لیے مل کر کام کرتے ہیں۔ GRT ورک یوٹیلیٹی ٹوکن ہے جو ڈیٹا فراہم کرنے والوں اور صارفین کو مربوط کرتا ہے۔ GRT نیٹ ورک کے اندر ڈیٹا فراہم کرنے والوں اور صارفین کو مربوط کرنے کے لیے ایک افادیت کے طور پر کام کرتا ہے اور پروٹوکول کے شرکاء کو ڈیٹا کو مؤثر طریقے سے ترتیب دینے کی ترغیب دیتا ہے. -By using The Graph, users can easily access data from the blockchain, paying only for the specific information they need. The Graph is used by many [popular dapps](https://thegraph.com/explorer) in the web3 ecosystem today. +گراف کا استعمال کرتے ہوئے، صارفین آسانی سے بلاکچین سے ڈیٹا تک رسائی حاصل کر سکتے ہیں، صرف اپنی ضرورت کی مخصوص معلومات کے لیے ادائیگی کر سکتے ہیں۔ گراف آج ویب 3 ایکو سسٹم میں بہت سے [مقبول ڈیپز](https://thegraph.com/explorer) کے ذریعہ استعمال کیا جاتا ہے. گراف اسی طرح بلاکچین ڈیٹا کو انڈیکس کرتا ہے جس طرح گوگل ویب کو انڈیکس کرتا ہے۔ درحقیقت، ہو سکتا ہے کہ آپ پہلے ہی گراف کو سمجھے بغیر استعمال کر رہے ہوں۔ اگر آپ نے ڈیپ کے سامنے والے حصے کو دیکھا ہے جو اس کا ڈیٹا سب گراف سے حاصل کرتا ہے، تو آپ نے سب گراف سے ڈیٹا دریافت کیا! @@ -75,7 +75,7 @@ By using The Graph, users can easily access data from the blockchain, paying onl انڈیکسرز دو طریقوں سے GRT انعامات حاصل کر سکتے ہیں: -1. Query fees: GRT paid by developers or users for subgraph data queries. Query fees are directly distributed to Indexers according to the exponential rebate function (see GIP [here](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162)). +1. کیوری فیس: ڈیلپرز یا صارفین کے ذریعے سب گراف ڈیٹا کے کیوریز کے لیے GRT ادا کیا جاتا ہے۔ کیوری فیس براہ راست انڈیکسرز میں ایکسپونینشل ریبیٹ فنکشن کے مطابق تقسیم کی جاتی ہیں (جی آئی پی [یہاں](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162) دیکھیں). 2. انڈیکسنگ کے انعامات: 3% سالانہ اجراء انڈیکسرز میں تقسیم کیا جاتا ہے اس بنیاد پر کہ وہ انڈیکس کر رہے ہیں۔ یہ انعامات انڈیکسرز کو انڈیکس سب گراف کی ترغیب دیتے ہیں، کبھی کبھار کیوری کی فیس شروع ہونے سے پہلے، انڈیکسنگ کے ثبوت (POIs) جمع کرنے اور جمع کروانے کے لیے اس بات کی تصدیق کرتے ہیں کہ انھوں نے ڈیٹا کو درست طریقے سے ترتیب دیا ہے. From 77881ba81f68c6acd0b1667bde1f23bcad6a85fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:03 -0400 Subject: [PATCH 354/924] New translations operating-graph-node.mdx (Romanian) --- website/pages/ro/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ro/operating-graph-node.mdx b/website/pages/ro/operating-graph-node.mdx index 4f0f856db111..a7dd15e7a84c 100644 --- a/website/pages/ro/operating-graph-node.mdx +++ b/website/pages/ro/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From 50488c1150294188a009271fdacbbe85b309057c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:04 -0400 Subject: [PATCH 355/924] New translations operating-graph-node.mdx (French) --- website/pages/fr/operating-graph-node.mdx | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/website/pages/fr/operating-graph-node.mdx b/website/pages/fr/operating-graph-node.mdx index 677f17908d8e..60e9383e74c0 100644 --- a/website/pages/fr/operating-graph-node.mdx +++ b/website/pages/fr/operating-graph-node.mdx @@ -32,9 +32,9 @@ Les métadonnées de déploiement de subgraphs sont stockées sur le réseau IPF Pour activer la surveillance et la création de rapports, Graph Node peut éventuellement enregistrer les métriques sur un serveur de métriques Prometheus. -### Getting started from source +### Commencer à partir des sources -#### Install prerequisites +#### Conditions préalables à l'installation - **Rust** @@ -42,13 +42,13 @@ Pour activer la surveillance et la création de rapports, Graph Node peut évent - **IPFS** -- **Additional Requirements for Ubuntu users** - To run a Graph Node on Ubuntu a few additional packages may be needed. +- **Exigences supplémentaires pour les utilisateurs d'Ubuntu** - Pour exécuter un nœud graphique sur Ubuntu, quelques packages supplémentaires peuvent être nécessaires. ```sh sudo apt-get install -y clang libpg-dev libssl-dev pkg-config ``` -#### Setup +#### Installation 1. Start a PostgreSQL database server @@ -58,9 +58,9 @@ pg_ctl -D .postgres -l logfile start createdb graph-node ``` -2. Clone [Graph Node](https://github.com/graphprotocol/graph-node) repo and build the source by running `cargo build` +2. Clonez le dépôt [Graph Node](https://github.com/graphprotocol/graph-node) et créez la source en exécutant `cargo build` -3. Now that all the dependencies are setup, start the Graph Node: +3. Maintenant que toutes les dépendances sont configurées, démarrez le Graph Node : ```sh cargo run -p graph-node --release -- \ @@ -77,13 +77,13 @@ Un exemple complet de configuration de Kubernetes est disponible dans le [dépô Lorsqu'il est en cours d'exécution, Graph Node expose les ports suivants : -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important** : Soyez prudent lorsque vous exposez les ports publiquement : les **ports d'administration** doivent rester verrouillés. Cela inclut le point de terminaison Graph Node JSON-RPC. @@ -227,7 +227,7 @@ Les utilisateurs qui utilisent une configuration d'indexation à grande échelle Étant donné un nœud de graph en cours d'exécution (ou des nœuds de graph !), le défi consiste alors à gérer les subgraphs déployés sur ces nœuds. Graph Node propose une gamme d'outils pour vous aider à gérer les subgraphs. -#### Logging +#### Journal de bord Les journaux de Graph Node peuvent fournir des informations utiles pour le débogage et l'optimisation de Graph Node et de subgraphs spécifiques. Graph Node prend en charge différents niveaux de journalisation via la variable d'environnement `GRAPH_LOG`, avec les niveaux suivants : erreur, avertissement, information, débogage ou trace. From ffe909e3a65ba629c62390638e38790f6c085a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:05 -0400 Subject: [PATCH 356/924] New translations operating-graph-node.mdx (Spanish) --- website/pages/es/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/es/operating-graph-node.mdx b/website/pages/es/operating-graph-node.mdx index 759184d08cd7..4f31998c3146 100644 --- a/website/pages/es/operating-graph-node.mdx +++ b/website/pages/es/operating-graph-node.mdx @@ -77,13 +77,13 @@ Puedes encontrar un ejemplo completo de configuración de Kubernetes en el [Inde Cuando está funcionando, Graph Node muestra los siguientes puertos: -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| --- | --- | --- | --- | --- | -| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | -| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | -| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| ------ | -------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------- | +| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | +| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | +| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | > **Importante**: Ten cuidado con exponer puertos públicamente - los **puertos de administración** deben mantenerse bloqueados. Esto incluye el punto final JSON-RPC de Graph Node. From 6b6f1c1628c4e68600d29a387a20177cee99d995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:06 -0400 Subject: [PATCH 357/924] New translations operating-graph-node.mdx (Arabic) --- website/pages/ar/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ar/operating-graph-node.mdx b/website/pages/ar/operating-graph-node.mdx index 646ec2d5dffd..b467b1fc0395 100644 --- a/website/pages/ar/operating-graph-node.mdx +++ b/website/pages/ar/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | -| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | -| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| ------ | ------------------------------------------------------- | ------------------------------------------------------------------- | ----------------- | -------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | +| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | +| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From 8fef33d202be19eb123af7d0655bce39706220c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:07 -0400 Subject: [PATCH 358/924] New translations operating-graph-node.mdx (Czech) --- website/pages/cs/operating-graph-node.mdx | 248 +++++++++++----------- 1 file changed, 124 insertions(+), 124 deletions(-) diff --git a/website/pages/cs/operating-graph-node.mdx b/website/pages/cs/operating-graph-node.mdx index 4f0f856db111..504a6b22ad8c 100644 --- a/website/pages/cs/operating-graph-node.mdx +++ b/website/pages/cs/operating-graph-node.mdx @@ -1,40 +1,40 @@ --- -title: Operating Graph Node +title: Uzel provozního graf --- -Graph Node is the component which indexes subgraphs, and makes the resulting data available to query via a GraphQL API. As such it is central to the indexer stack, and correct operation of Graph Node is crucial to running a successful indexer. +Graf Uzel je komponenta, která indexuje podgrafy a zpřístupňuje výsledná data k dotazování prostřednictvím rozhraní GraphQL API. Jako taková je ústředním prvkem zásobníku indexeru a její správná činnost je pro úspěšný provoz indexeru klíčová. -This provides a contextual overview of Graph Node, and some of the more advanced options available to indexers. Detailed documentation and instructions can be found in the [Graph Node repository](https://github.com/graphprotocol/graph-node). +Tato část poskytuje kontextový přehled o uzlu Graf a o některých pokročilejších možnostech, které jsou indexátorům k dispozici. Podrobnou dokumentaci a pokyny najdete v úložišti [Graf Uzel](https://github.com/graphprotocol/graph-node). -## Graph Node +## Uzel grafu -[Graph Node](https://github.com/graphprotocol/graph-node) is the reference implementation for indexing Subgraphs on The Graph Network, connecting to blockchain clients, indexing subgraphs and making indexed data available to query. +[Graf Uzel](https://github.com/graphprotocol/graph-node) je referenční implementace pro indexování podgrafů v síti Graf, připojení ke klientům blockchainu, indexování podgrafů a zpřístupnění indexovaných dat k dotazování. -Graph Node (and the whole indexer stack) can be run on bare metal, or in a cloud environment. This flexibility of the central indexing component is crucial to the robustness of The Graph Protocol. Similarly, Graph Node can be [built from source](https://github.com/graphprotocol/graph-node), or indexers can use one of the [provided Docker Images](https://hub.docker.com/r/graphprotocol/graph-node). +Graf Uzel (a celý indexer stack) lze provozovat na holém železe nebo v cloudovém prostředí. Tato flexibilita centrální indexovací komponenty je klíčová pro robustnost protokolu v Graf Protocol. Stejně tak může být Graf Uzel [postaven ze zdrojového kódu](https://github.com/graphprotocol/graph-node), nebo mohou indexátory používat jeden z [poskytovaných obrazů Docker](https://hub.docker.com/r/graphprotocol/graph-node). -### PostgreSQL database +### Databáze PostgreSQL -The main store for the Graph Node, this is where subgraph data is stored, as well as metadata about subgraphs, and subgraph-agnostic network data such as the block cache, and eth_call cache. +Hlavní úložiště pro uzel Graf Uzel, kde jsou uložena data podgrafů, metadata o podgraf a síťová data týkající se podgrafů, jako je bloková cache a cache eth_call. -### Network clients +### Síťoví klienti -In order to index a network, Graph Node needs access to a network client via an EVM-compatible JSON-RPC API. This RPC may connect to a single client or it could be a more complex setup that load balances across multiple. +Aby mohl uzel Graph Node indexovat síť, potřebuje přístup k síťovému klientovi prostřednictvím rozhraní API JSON-RPC kompatibilního s EVM. Toto RPC se může připojit k jedinému klientovi nebo může jít o složitější nastavení, které vyrovnává zátěž mezi více klienty. -While some subgraphs may just require a full node, some may have indexing features which require additional RPC functionality. Specifically subgraphs which make `eth_calls` as part of indexing will require an archive node which supports [EIP-1898](https://eips.ethereum.org/EIPS/eip-1898), and subgraphs with `callHandlers`, or `blockHandlers` with a `call` filter, require `trace_filter` support ([see trace module documentation here](https://openethereum.github.io/JSONRPC-trace-module)). +Zatímco některé podgrafy mohou vyžadovat pouze plný uzel, některé mohou mít indexovací funkce, které vyžadují další funkce RPC. Konkrétně podgrafy, které v rámci indexování provádějí `eth_calls`, budou vyžadovat archivní uzel, který podporuje [EIP-1898](https://eips.ethereum.org/EIPS/eip-1898), a podgrafy s `callHandlers` nebo `blockHandlers` s filtrem `call` vyžadují podporu `trace_filter` ([viz dokumentace modulu trace zde](https://openethereum.github.io/JSONRPC-trace-module)). -**Network Firehoses** - a Firehose is a gRPC service providing an ordered, yet fork-aware, stream of blocks, developed by The Graph's core developers to better support performant indexing at scale. This is not currently an Indexer requirement, but Indexers are encouraged to familiarise themselves with the technology, ahead of full network support. Learn more about the Firehose [here](https://firehose.streamingfast.io/). +**Network Firehoses** - Firehose je služba gRPC poskytující uspořádaný, ale vidlicově orientovaný proud bloků, vyvinutá hlavními vývojáři Grafu pro lepší podporu výkonného indexování v měřítku. V současné době to není požadavek na indexátor, ale doporučujeme indexátorům, aby se s touto technologií seznámili ještě před plnou podporou sítě. Více informací o Firehose [zde](https://firehose.streamingfast.io/). -### IPFS Nodes +### IPFS uzly -Subgraph deployment metadata is stored on the IPFS network. The Graph Node primarily accesses the IPFS node during subgraph deployment to fetch the subgraph manifest and all linked files. Network indexers do not need to host their own IPFS node. An IPFS node for the network is hosted at https://ipfs.network.thegraph.com. +Metadata nasazení podgrafů jsou uložena v síti IPFS. Uzel Graf přistupuje během nasazení podgrafu především k uzlu IPFS, aby načetl manifest podgrafu a všechny propojené soubory. Síťové indexery nemusí hostit vlastní uzel IPFS. Uzel IPFS pro síť je hostován na adrese https://ipfs.network.thegraph.com. -### Prometheus metrics server +### Metrický server Prometheus -To enable monitoring and reporting, Graph Node can optionally log metrics to a Prometheus metrics server. +Aby bylo možné monitorovat a podávat zprávy, může uzel Graf volitelně zaznamenávat metriky na metrický server Prometheus. -### Getting started from source +### Začínáme od zdroje -#### Install prerequisites +#### Instalace předpokladů - **Rust** @@ -42,15 +42,15 @@ To enable monitoring and reporting, Graph Node can optionally log metrics to a P - **IPFS** -- **Additional Requirements for Ubuntu users** - To run a Graph Node on Ubuntu a few additional packages may be needed. +- **Další požadavky pro uživatele Ubuntu** - Pro spuštění Uzel Graf v Ubuntu může být potřeba několik dalších balíčků. ```sh sudo apt-get install -y clang libpg-dev libssl-dev pkg-config ``` -#### Setup +#### Nastavení -1. Start a PostgreSQL database server +1. Spuštění databázového serveru PostgreSQL ```sh initdb -D .postgres @@ -58,9 +58,9 @@ pg_ctl -D .postgres -l logfile start createdb graph-node ``` -2. Clone [Graph Node](https://github.com/graphprotocol/graph-node) repo and build the source by running `cargo build` +2. Klonujte repozitář [Uzel Graf](https://github.com/graphprotocol/graph-node) a sestavte zdrojový kód spuštěním příkazu `cargo build` -3. Now that all the dependencies are setup, start the Graph Node: +3. Nyní, když jsou všechny závislosti nastaveny, spusťte uzel Graf: ```sh cargo run -p graph-node --release -- \ @@ -69,37 +69,37 @@ cargo run -p graph-node --release -- \ --ipfs https://ipfs.network.thegraph.com ``` -### Getting started with Kubernetes +### Začínáme s Kubernetes -A complete Kubernetes example configuration can be found in the [indexer repository](https://github.com/graphprotocol/indexer/tree/main/k8s). +Kompletní příklad konfigurace Kubernetes naleznete v úložišti [indexer](https://github.com/graphprotocol/indexer/tree/main/k8s). ### Ports -When it is running Graph Node exposes the following ports: +Když je Graf Uzel spuštěn, zpřístupňuje následující ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| ---- | ---------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | +| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | +| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | +| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | -> **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. +> **Důležité**: Dávejte pozor na veřejné vystavování portů - **administrační porty** by měly být uzamčeny. To se týká i koncového bodu JSON-RPC uzlu Graf. -## Advanced Graph Node configuration +## Pokročilá konfigurace uzlu Graf -At its simplest, Graph Node can be operated with a single instance of Graph Node, a single PostgreSQL database, an IPFS node, and the network clients as required by the subgraphs to be indexed. +V nejjednodušším případě lze Graf Uzel provozovat s jednou instancí Graf Uzel, jednou databází PostgreSQL, uzlem IPFS a síťovými klienty podle potřeby indexovaných podgrafů. -This setup can be scaled horizontally, by adding multiple Graph Nodes, and multiple databases to support those Graph Nodes. Advanced users may want to take advantage of some of the horizontal scaling capabilities of Graph Node, as well as some of the more advanced configuration options, via the `config.toml` file and Graph Node's environment variables. +Toto nastavení lze horizontálně škálovat přidáním více graf uzlů a více databází pro podporu těchto graf uzlů. Pokročilí uživatelé mohou chtít využít některé možnosti horizontálního škálování Graf Uzel a také některé pokročilejší možnosti konfigurace prostřednictvím souboru `config.toml` a proměnných prostředí Graph Node. ### `config.toml` -A [TOML](https://toml.io/en/) configuration file can be used to set more complex configurations than those exposed in the CLI. The location of the file is passed with the --config command line switch. +Konfigurační soubor [TOML](https://toml.io/en/) lze použít k nastavení složitějších konfigurací, než jaké jsou dostupné v CLI. Umístění souboru se předává pomocí přepínače příkazového řádku --config. -> When using a configuration file, it is not possible to use the options --postgres-url, --postgres-secondary-hosts, and --postgres-host-weights. +> Při použití konfiguračního souboru není možné použít volby --postgres-url, --postgres-secondary-hosts a --postgres-host-weights. -A minimal `config.toml` file can be provided; the following file is equivalent to using the --postgres-url command line option: +Lze zadat minimální soubor `config.toml`; následující soubor je ekvivalentní použití volby příkazového řádku --postgres-url: ```toml [store] @@ -110,19 +110,19 @@ connection="<.. postgres-url argument ..>" indexers = [ "<.. list of all indexing nodes ..>" ] ``` -Full documentation of `config.toml` can be found in the [Graph Node docs](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md). +Úplnou dokumentaci `config.toml` lze nalézt v [dokumentech Graf Uzel](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md). -#### Multiple Graph Nodes +#### Více uzlů graf -Graph Node indexing can scale horizontally, running multiple instances of Graph Node to split indexing and querying across different nodes. This can be done simply by running Graph Nodes configured with a different `node_id` on startup (e.g. in the Docker Compose file), which can then be used in the `config.toml` file to specify [dedicated query nodes](#dedicated-query-nodes), [block ingestors](#dedicated-block-ingestor), and splitting subgraphs across nodes with [deployment rules](#deployment-rules). +Indexování Graf Uzel lze horizontálně škálovat, přičemž lze spustit více instancí Graf Uzel a rozdělit indexování a dotazování mezi různé uzly. To lze provést jednoduše spuštěním uzlu Graf nakonfigurovaného s jiným `id uzlu` při spuštění (např. v souboru Docker Compose), který lze poté použít v souboru `config.toml` k určení [dedikovaných uzlů pro dotazování](#dedicated-query-nodes), [blokových ingestorů](#dedicated-block-ingestor) a rozdělení podgrafů mezi uzly pomocí [pravidel nasazení](#deployment-rules). -> Note that multiple Graph Nodes can all be configured to use the same database, which itself can be horizontally scaled via sharding. +> Všimněte si, že více graf uzlů lze nakonfigurovat tak, aby používaly stejnou databázi, kterou lze horizontálně škálovat pomocí sharding. -#### Deployment rules +#### Pravidla nasazení -Given multiple Graph Nodes, it is necessary to manage deployment of new subgraphs so that the same subgraph isn't being indexed by two different nodes, which would lead to collisions. This can be done by using deployment rules, which can also specify which `shard` a subgraph's data should be stored in, if database sharding is being used. Deployment rules can match on the subgraph name and the network that the deployment is indexing in order to make a decision. +Při více uzlech graf je nutné řídit nasazení nových podgrafů tak, aby stejný podgraf nebyl indexován dvěma různými uzly, což by vedlo ke kolizím. To lze provést pomocí pravidel nasazení, která mohou také určit, do kterého `shardu` mají být data podgrafu uložena, pokud se používá rozdělení databáze. Pravidla nasazení mohou odpovídat názvu podgrafu a síti, kterou nasazení indexuje, aby bylo možné učinit rozhodnutí. -Example deployment rule configuration: +Příklad konfigurace pravidla nasazení: ```toml [deployment] @@ -150,51 +150,51 @@ indexers = [ ] ``` -Read more about deployment rules [here](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#controlling-deployment). +Více informací o pravidlech nasazení [zde](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#controlling-deployment). -#### Dedicated query nodes +#### Vyhrazené dotazovací uzly -Nodes can be configured to explicitly be query nodes by including the following in the configuration file: +Uzly lze nakonfigurovat tak, aby byly explicitně dotazovacími uzly, a to tak, že do konfiguračního souboru vložíte následující údaje: ```toml [general] query = "" ``` -Any node whose --node-id matches the regular expression will be set up to only respond to queries. +Každý uzel, jehož --node-id odpovídá regulárnímu výrazu, bude nastaven tak, aby odpovídal pouze na dotazy. -#### Database scaling via sharding +#### Škálování databáze pomocí sharding -For most use cases, a single Postgres database is sufficient to support a graph-node instance. When a graph-node instance outgrows a single Postgres database, it is possible to split the storage of graph-node's data across multiple Postgres databases. All databases together form the store of the graph-node instance. Each individual database is called a shard. +Pro většinu případů použití postačuje k podpoře instance graf uzlu jedna databáze Postgres. Pokud instance graf uzlu přeroste rámec jedné databáze Postgres, je možné rozdělit ukládání dat grafového uzlu do více databází Postgres. Všechny databáze dohromady tvoří úložiště instance graf uzlu. Každá jednotlivá databáze se nazývá shard. -Shards can be used to split subgraph deployments across multiple databases, and can also be used to use replicas to spread query load across databases. This includes configuring the number of available database connections each `graph-node` should keep in its connection pool for each database, which becomes increasingly important as more subgraphs are being indexed. +Střepy lze použít k rozdělení nasazení dílčích graf do více databází a lze je také použít k použití replik k rozložení zátěže dotazů mezi databázemi. To zahrnuje konfiguraci počtu dostupných databázových připojení, které by měl každý `graf-node` udržovat ve svém fondu připojení pro každou databázi, což je stále důležitější, když se indexuje více podgrafů. -Sharding becomes useful when your existing database can't keep up with the load that Graph Node puts on it, and when it's not possible to increase the database size anymore. +Sharding se stává užitečným, když vaše stávající databáze nedokáže udržet krok se zátěží, kterou na ni Graf Uzel vyvíjí, a když už není možné zvětšit velikost databáze. -> It is generally better make a single database as big as possible, before starting with shards. One exception is where query traffic is split very unevenly between subgraphs; in those situations it can help dramatically if the high-volume subgraphs are kept in one shard and everything else in another because that setup makes it more likely that the data for the high-volume subgraphs stays in the db-internal cache and doesn't get replaced by data that's not needed as much from low-volume subgraphs. +> Obecně je lepší vytvořit jednu co největší databázi, než začít s oddíly. Jednou z výjimek jsou případy, kdy je provoz dotazů rozdělen velmi nerovnoměrně mezi dílčí podgrafy; v těchto situacích může výrazně pomoci, pokud jsou dílčí podgrafy s velkým objemem uchovávány v jednom shardu a vše ostatní v jiném, protože toto nastavení zvyšuje pravděpodobnost, že data pro dílčí podgrafu s velkým objemem zůstanou v interní cache db a nebudou nahrazena daty, která nejsou tolik potřebná z dílčích podgrafů s malým objemem. -In terms of configuring connections, start with max_connections in postgresql.conf set to 400 (or maybe even 200) and look at the store_connection_wait_time_ms and store_connection_checkout_count Prometheus metrics. Noticeable wait times (anything above 5ms) is an indication that there are too few connections available; high wait times there will also be caused by the database being very busy (like high CPU load). However if the database seems otherwise stable, high wait times indicate a need to increase the number of connections. In the configuration, how many connections each graph-node instance can use is an upper limit, and Graph Node will not keep connections open if it doesn't need them. +Pokud jde o konfiguraci připojení, začněte s max_connections v souboru postgresql.conf nastaveným na 400 (nebo možná dokonce 200) a podívejte se na metriky store_connection_wait_time_ms a store_connection_checkout_count Prometheus. Výrazné čekací doby (cokoli nad 5 ms) jsou známkou toho, že je k dispozici příliš málo připojení; vysoké čekací doby tam budou také způsobeny tím, že databáze je velmi vytížená (například vysoké zatížení procesoru). Pokud se však databáze jinak jeví jako stabilní, vysoké čekací doby naznačují potřebu zvýšit počet připojení. V konfiguraci je horní hranicí, kolik připojení může každá instance graf uzlu používat, a graf uzel nebude udržovat otevřená připojení, pokud je nepotřebuje. -Read more about store configuration [here](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-multiple-databases). +Více informací o konfiguraci obchodu [zde](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-multiple-databases). -#### Dedicated block ingestion +#### Vyhrazené zpracování bloků -If there are multiple nodes configured, it will be necessary to specify one node which is responsible for ingestion of new blocks, so that all configured index nodes aren't polling the chain head. This is done as part of the `chains` namespace, specifying the `node_id` to be used for block ingestion: +Pokud je nakonfigurováno více uzlů, je nutné určit jeden uzel, který je zodpovědný za přijímání nových bloků, aby všechny nakonfigurované indexové uzly neprováděly dotazování hlavy řetězce. To se provádí v rámci jmenného prostoru `chains`, kde se zadává `id_uzlu`, který se má používat pro přijímání bloků: ```toml [chains] ingestor = "block_ingestor_node" ``` -#### Supporting multiple networks +#### Podpora více sítí -The Graph Protocol is increasing the number of networks supported for indexing rewards, and there exist many subgraphs indexing unsupported networks which an indexer would like to process. The `config.toml` file allows for expressive and flexible configuration of: +Graf protokol zvyšuje počet sítí podporovaných pro indexaci odměn a existuje mnoho podgrafů indexujících nepodporované sítě, které by indexátor rád zpracoval. Soubor `config.toml` umožňuje expresivní a flexibilní konfiguraci: -- Multiple networks -- Multiple providers per network (this can allow splitting of load across providers, and can also allow for configuration of full nodes as well as archive nodes, with Graph Node preferring cheaper providers if a given workload allows). -- Additional provider details, such as features, authentication and the type of provider (for experimental Firehose support) +- Více sítí +- Více poskytovatelů na síť (to může umožnit rozdělení zátěže mezi poskytovatele a také konfiguraci plných uzlů i archivních uzlů, přičemž Graph Node může preferovat levnější poskytovatele, pokud to daná pracovní zátěž umožňuje). +- Další údaje o poskytovateli, jako jsou funkce, ověřování a typ poskytovatele (pro experimentální podporu Firehose) -The `[chains]` section controls the ethereum providers that graph-node connects to, and where blocks and other metadata for each chain are stored. The following example configures two chains, mainnet and kovan, where blocks for mainnet are stored in the vip shard and blocks for kovan are stored in the primary shard. The mainnet chain can use two different providers, whereas kovan only has one provider. +Sekce `[chains]` řídí, ke kterým poskytovatelům ethereum se graf uzel připojuje a kde jsou uloženy bloky a další metadata pro jednotlivé řetězce. Následující příklad konfiguruje dva řetězce, mainnet a kovan, přičemž bloky pro mainnet jsou uloženy ve shard vip a bloky pro kovan jsou uloženy v primárním shard. Řetězec mainnet může používat dva různé poskytovatele, zatímco kovan má pouze jednoho poskytovatele. ```toml [chains] @@ -210,109 +210,109 @@ shard = "primary" provider = [ { label = "kovan", url = "http://..", features = [] } ] ``` -Read more about provider configuration [here](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-ethereum-providers). +Více informací o konfiguraci poskytovatele [zde](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-ethereum-providers). -### Environment variables +### Proměnná prostředí -Graph Node supports a range of environment variables which can enable features, or change Graph Node behaviour. These are documented [here](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md). +Graf Uzel podporuje řadu proměnných prostředí, které mohou povolit funkce nebo změnit chování Graf Uzel. Jsou zdokumentovány [zde](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md). -### Continuous deployment +### Průběžné nasazování -Users who are operating a scaled indexing setup with advanced configuration may benefit from managing their Graph Nodes with Kubernetes. +Uživatelé, kteří provozují škálované nastavení indexování s pokročilou konfigurací, mohou využít správu svých graf uzlů pomocí Kubernetes. -- The indexer repository has an [example Kubernetes reference](https://github.com/graphprotocol/indexer/tree/main/k8s) -- [Launchpad](https://docs.graphops.xyz/launchpad/intro) is a toolkit for running a Graph Protocol Indexer on Kubernetes maintained by GraphOps. It provides a set of Helm charts and a CLI to manage a Graph Node deployment. +- V úložišti indexeru je [příklad odkazu Kubernetes](https://github.com/graphprotocol/indexer/tree/main/k8s) +- [Launchpad](https://docs.graphops.xyz/launchpad/intro) je sada nástrojů pro provozování Graf Protocol Indexeru v Kubernetes, kterou spravuje společnost GraphOps. Poskytuje sadu grafů Helm a CLI pro správu nasazení uzlu Graf. -### Managing Graph Node +### Správa uzlu graf -Given a running Graph Node (or Graph Nodes!), the challenge is then to manage deployed subgraphs across those nodes. Graph Node surfaces a range of tools to help with managing subgraphs. +Vzhledem k běžícímu uzlu Graf (nebo uzlům Graf Uzel!) je pak úkolem spravovat rozmístěné podgrafy v těchto uzlech. Graf Uzel nabízí řadu nástrojů, které pomáhají se správou podgrafů. -#### Logging +#### Protokolování -Graph Node's logs can provide useful information for debugging and optimisation of Graph Node and specific subgraphs. Graph Node supports different log levels via the `GRAPH_LOG` environment variable, with the following levels: error, warn, info, debug or trace. +Protokoly Graf Uzel mohou poskytnout užitečné informace pro ladění a optimalizaci Graf Uzel a konkrétních podgrafů. Graf Uzel podporuje různé úrovně protokolů prostřednictvím proměnné prostředí `GRAPH_LOG` s následujícími úrovněmi: error, warn, info, debug nebo trace. -In addition setting `GRAPH_LOG_QUERY_TIMING` to `gql` provides more details about how GraphQL queries are running (though this will generate a large volume of logs). +Kromě toho nastavení `GRAPH_LOG_QUERY_TIMING` na `gql` poskytuje více podrobností o tom, jak dotazy GraphQL probíhají (i když to bude generovat velký objem protokolů). -#### Monitoring & alerting +#### Monitorování & upozornění -Graph Node provides the metrics via Prometheus endpoint on 8040 port by default. Grafana can then be used to visualise these metrics. +Graf Uzel poskytuje metriky prostřednictvím koncového bodu Prometheus na portu 8040 ve výchozím nastavení. K vizualizaci těchto metrik lze pak použít nástroj Grafana. -The indexer repository provides an [example Grafana configuration](https://github.com/graphprotocol/indexer/blob/main/k8s/base/grafana.yaml). +Úložiště indexeru poskytuje [příklad konfigurace Grafana](https://github.com/graphprotocol/indexer/blob/main/k8s/base/grafana.yaml). #### Graphman -`graphman` is a maintenance tool for Graph Node, helping with diagnosis and resolution of different day-to-day and exceptional tasks. +`graphman` je nástroj pro údržbu Graf Uzel, který pomáhá s diagnostikou a řešením různých každodenních i výjimečných úloh. -The graphman command is included in the official containers, and you can docker exec into your graph-node container to run it. It requires a `config.toml` file. +Příkaz graphman je součástí oficiálních kontejnerů a můžete jej spustit pomocí docker exec do kontejneru graph-node. Vyžaduje soubor `config.toml`. -Full documentation of `graphman` commands is available in the Graph Node repository. See \[/docs/graphman.md\] (https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md) in the Graph Node `/docs` +Úplná dokumentace příkazů `graphman` je k dispozici v úložišti Graf Uzel. Viz \[/docs/graphman.md\] (https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md) v Graf Uzel `/docs` -### Working with subgraphs +### Práce s podgrafy -#### Indexing status API +#### Stav indexování API -Available on port 8030/graphql by default, the indexing status API exposes a range of methods for checking indexing status for different subgraphs, checking proofs of indexing, inspecting subgraph features and more. +API pro stav indexování, které je ve výchozím nastavení dostupné na portu 8030/graphql, nabízí řadu metod pro kontrolu stavu indexování pro různé podgrafy, kontrolu důkazů indexování, kontrolu vlastností podgrafů a další. -The full schema is available [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). +Úplné schéma je k dispozici [zde](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). -#### Indexing performance +#### Výkonnost indexování -There are three separate parts of the indexing process: +Proces indexování má tři samostatné části: -- Fetching events of interest from the provider -- Processing events in order with the appropriate handlers (this can involve calling the chain for state, and fetching data from the store) -- Writing the resulting data to the store +- Získávání zajímavých událostí od zprostředkovatele +- Zpracování událostí v pořadí pomocí příslušných obslužných (to může zahrnovat volání řetězce pro zjištění stavu a načtení dat z úložiště) +- Zápis výsledných dat do úložiště -These stages are pipelined (i.e. they can be executed in parallel), but they are dependent on one another. Where subgraphs are slow to index, the underlying cause will depend on the specific subgraph. +Tyto fáze jsou spojeny do potrubí (tj. mohou být prováděny paralelně), ale jsou na sobě závislé. Pokud se podgrafy indexují pomalu, bude příčina záviset na konkrétním podgrafu. -Common causes of indexing slowness: +Běžné příčiny pomalého indexování: -- Time taken to find relevant events from the chain (call handlers in particular can be slow, given the reliance on `trace_filter`) -- Making large numbers of `eth_calls` as part of handlers -- A large amount of store interaction during execution -- A large amount of data to save to the store -- A large number of events to process -- Slow database connection time, for crowded nodes -- The provider itself falling behind the chain head -- Slowness in fetching new receipts at the chain head from the provider +- Čas potřebný k nalezení relevantních událostí z řetězce (zejména obsluhy volání mohou být pomalé vzhledem k závislosti na `trace_filter`) +- Vytváření velkého počtu `eth_calls` jako součást obslužných +- Velké množství interakcí s úložištěm během provádění +- Velké množství dat k uložení do úložiště +- Velký počet událostí ke zpracování +- Pomalá doba připojení k databázi u přeplněných uzlů +- Samotný poskytovatel se dostává za hlavu řetězu +- Pomalé načítání nových účtenek od poskytovatele v hlavě řetězce -Subgraph indexing metrics can help diagnose the root cause of indexing slowness. In some cases, the problem lies with the subgraph itself, but in others, improved network providers, reduced database contention and other configuration improvements can markedly improve indexing performance. +Metriky indexování podgrafů mohou pomoci diagnostikovat hlavní příčinu pomalého indexování. V některých případech spočívá problém v samotném podgrafu, ale v jiných případech mohou zlepšení síťových poskytovatelů, snížení konfliktů v databázi a další zlepšení konfigurace výrazně zlepšit výkon indexování. -#### Failed subgraphs +#### Neúspěšné podgrafy -During indexing subgraphs might fail, if they encounter data that is unexpected, some component not working as expected, or if there is some bug in the event handlers or configuration. There are two general types of failure: +Během indexování mohou dílčí graf selhat, pokud narazí na neočekávaná data, pokud některá komponenta nefunguje podle očekávání nebo pokud je chyba ve zpracovatelích událostí nebo v konfiguraci. Existují dva obecné typy selhání: -- Deterministic failures: these are failures which will not be resolved with retries -- Non-deterministic failures: these might be down to issues with the provider, or some unexpected Graph Node error. When a non-deterministic failure occurs, Graph Node will retry the failing handlers, backing off over time. +- Deterministická selhání: jedná se o selhání, která nebudou vyřešena opakovanými pokusy +- Nedeterministická selhání: mohou být způsobena problémy se zprostředkovatelem nebo neočekávanou chybou grafického uzlu. Pokud dojde k nedeterministickému selhání, uzel Graf zopakuje selhání obsluhy a postupně se vrátí zpět. -In some cases a failure might be resolvable by the indexer (for example if the error is a result of not having the right kind of provider, adding the required provider will allow indexing to continue). However in others, a change in the subgraph code is required. +V některých případech může být chyba řešitelná indexátorem (například pokud je chyba důsledkem toho, že není k dispozici správný typ zprostředkovatele, přidání požadovaného zprostředkovatele umožní pokračovat v indexování). V jiných případech je však nutná změna v kódu podgrafu. -> Deterministic failures are considered "final", with a Proof of Indexing generated for the failing block, while non-determinstic failures are not, as the subgraph may manage to "unfail" and continue indexing. In some cases, the non-deterministic label is incorrect, and the subgraph will never overcome the error; such failures should be reported as issues on the Graph Node repository. +> Deterministická selhání jsou považována za "konečná" a pro selhávající blok je vygenerován důkaz indexace, zatímco nedeterministická selhání nikoli, protože podgraf může selhat a pokračovat v indexaci. V některých případech je nedeterministické označení nesprávné a podgraf chybu nikdy nepřekoná; taková selhání by měla být hlášena jako problémy v úložišti Uzel Graf. -#### Block and call cache +#### Bloková a volací mezipaměť -Graph Node caches certain data in the store in order to save refetching from the provider. Blocks are cached, as are the results of `eth_calls` (the latter being cached as of a specific block). This caching can dramatically increase indexing speed during "resyncing" of a slightly altered subgraph. +Uzel Graf ukládá určitá data do mezipaměti v úložišti, aby se ušetřilo opětovné načítání od zprostředkovatele. Bloky jsou ukládány do mezipaměti, stejně jako výsledky `eth_calls` (ty jsou ukládány do mezipaměti jako konkrétní blok). Toto ukládání do mezipaměti může výrazně zvýšit rychlost indexování při "resynchronizaci" mírně pozměněného podgrafu. -However, in some instances, if an Ethereum node has provided incorrect data for some period, that can make its way into the cache, leading to incorrect data or failed subgraphs. In this case indexers can use `graphman` to clear the poisoned cache, and then rewind the affected subgraphs, which will then fetch fresh data from the (hopefully) healthy provider. +Pokud však uzel Etherea po určitou dobu poskytoval nesprávná data, mohou se v některých případech dostat do mezipaměti, což může vést k nesprávným datům nebo neúspěšným podgrafům. V takovém případě mohou indexery použít `graphman` k vymazání otrávené cache a následnému přetočení postižených podgrafů, které pak načtou čerstvá data od (doufejme) zdravého poskytovatele. -If a block cache inconsistency is suspected, such as a tx receipt missing event: +Pokud existuje podezření na nekonzistenci blokové mezipaměti, například chybějící událost tx receipt: -1. `graphman chain list` to find the chain name. -2. `graphman chain check-blocks by-number ` will check if the cached block matches the provider, and deletes the block from the cache if it doesn’t. - 1. If there is a difference, it may be safer to truncate the whole cache with `graphman chain truncate `. - 2. If the block matches the provider, then the issue can be debugged directly against the provider. +1. `graphman chain list` pro zjištění názvu řetězce. +2. `graphman chain check-blocks by-number ` zkontroluje, zda blok uložený v mezipaměti odpovídá poskytovateli, a pokud ne, odstraní blok z mezipaměti. + 1. Pokud existuje rozdíl, může být bezpečnější zkrátit celou mezipaměť pomocí `graphman chain truncate `. + 2. Pokud se blok shoduje s poskytovatelem, lze problém ladit přímo proti poskytovateli. -#### Querying issues and errors +#### Problémy a chyby při dotazování -Once a subgraph has been indexed, indexers can expect to serve queries via the subgraph's dedicated query endpoint. If the indexer is hoping to serve significant query volume, a dedicated query node is recommended, and in case of very high query volumes, indexers may want to configure replica shards so that queries don't impact the indexing process. +Jakmile je podgraf indexován, lze očekávat, že indexery budou obsluhovat dotazy prostřednictvím koncového bodu vyhrazeného pro dotazy podgrafu. Pokud indexátor doufá, že bude obsluhovat značný objem dotazů, doporučuje se použít vyhrazený uzel pro dotazy a v případě velmi vysokého objemu dotazů mohou indexátory chtít nakonfigurovat oddíly replik tak, aby dotazy neovlivňovaly proces indexování. -However, even with a dedicated query node and replicas, certain queries can take a long time to execute, and in some cases increase memory usage and negatively impact the query time for other users. +I s vyhrazeným dotazovacím uzlem a replikami však může provádění některých dotazů trvat dlouho a v některých případech může zvýšit využití paměti a negativně ovlivnit dobu dotazování ostatních uživatelů. -There is not one "silver bullet", but a range of tools for preventing, diagnosing and dealing with slow queries. +Neexistuje jedna "stříbrná kulka", ale celá řada nástrojů pro prevenci, diagnostiku a řešení pomalých dotazů. -##### Query caching +##### Ukládání dotazů do mezipaměti -Graph Node caches GraphQL queries by default, which can significantly reduce database load. This can be further configured with the `GRAPH_QUERY_CACHE_BLOCKS` and `GRAPH_QUERY_CACHE_MAX_MEM` settings - read more [here](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md#graphql-caching). +Graf Uzel ve výchozím nastavení ukládá dotazy GraphQL do mezipaměti, což může výrazně snížit zatížení databáze. To lze dále konfigurovat pomocí nastavení `GRAPH_QUERY_CACHE_BLOCKS` a `GRAPH_QUERY_CACHE_MAX_MEM` - více informací [zde](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md#graphql-caching). ##### Analysing queries From 0fa9afb805bce858d18aee71eb583864461a7b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:08 -0400 Subject: [PATCH 359/924] New translations operating-graph-node.mdx (German) --- website/pages/de/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/de/operating-graph-node.mdx b/website/pages/de/operating-graph-node.mdx index 0e24f48252df..25767bd3fa65 100644 --- a/website/pages/de/operating-graph-node.mdx +++ b/website/pages/de/operating-graph-node.mdx @@ -77,13 +77,13 @@ Eine vollständige Kubernetes-Beispielkonfiguration finden Sie im [Indexer-Repos Wenn es ausgeführt wird, stellt Graph Node die folgenden Ports zur Verfügung: -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | -| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | ----------------- | +| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | +| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | > **Wichtig**: Seien Sie vorsichtig, wenn Sie Ports öffentlich zugänglich machen - **Administrationsports** sollten gesperrt bleiben. Dies schließt den JSON-RPC-Endpunkt des Graph-Knotens ein. From 0f4df103c8236ead570e5a4cd005d21e8bdb9b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:09 -0400 Subject: [PATCH 360/924] New translations operating-graph-node.mdx (Italian) --- website/pages/it/operating-graph-node.mdx | 284 +++++++++++----------- 1 file changed, 142 insertions(+), 142 deletions(-) diff --git a/website/pages/it/operating-graph-node.mdx b/website/pages/it/operating-graph-node.mdx index 7ce2a0076965..de919de98b04 100644 --- a/website/pages/it/operating-graph-node.mdx +++ b/website/pages/it/operating-graph-node.mdx @@ -1,36 +1,36 @@ --- -title: Operating Graph Node +title: Come lavorare con Graph Node --- -Graph Node is the component which indexes subgraphs, and makes the resulting data available to query via a GraphQL API. As such it is central to the indexer stack, and correct operation of Graph Node is crucial to running a successful indexer. +Graph Node è il componente che indica i subgraph e rende i dati risultanti disponibili per l'interrogazione tramite API GraphQL. È quindi centrale per lo stack degli indexer, ed inoltre il corretto funzionamento di Graph Node è cruciale per il buon funzionamento di un indexer di successo. -This provides a contextual overview of Graph Node, and some of the more advanced options available to indexers. Detailed documentation and instructions can be found in the [Graph Node repository](https://github.com/graphprotocol/graph-node). +Questo fornisce una panoramica contestuale di Graph Node e alcune delle opzioni più avanzate disponibili per gli Indexer. La documentazione e le istruzioni dettagliate si trovano nel [repository di Graph Node](https://github.com/graphprotocol/graph-node). ## Graph Node -[Graph Node](https://github.com/graphprotocol/graph-node) is the reference implementation for indexing Subgraphs on The Graph Network, connecting to blockchain clients, indexing subgraphs and making indexed data available to query. +[Graph Node](https://github.com/graphprotocol/graph-node) è l'implementazione di riferimento per l'indicizzazione dei subgraph su Graph Network, la connessione ai client blockchain, l'indicizzazione dei subgraph e la disponibilità dei dati indicizzati per le query. -Graph Node (and the whole indexer stack) can be run on bare metal, or in a cloud environment. This flexibility of the central indexing component is crucial to the robustness of The Graph Protocol. Similarly, Graph Node can be [built from source](https://github.com/graphprotocol/graph-node), or indexers can use one of the [provided Docker Images](https://hub.docker.com/r/graphprotocol/graph-node). +Graph Node (e l'intero stack di indicizzatori) può essere eseguito su metallo nudo o in un ambiente cloud. Questa flessibilità della componente centrale di indicizzazione è fondamentale per la robustezza del protocollo The Graph. Allo stesso modo, Graph Node può essere [costruito dai sorgenti](https://github.com/graphprotocol/graph-node), oppure gli indexer possono usare una delle [immagini Docker fornite](https://hub.docker.com/r/graphprotocol/graph-node). -### PostgreSQL database +### Database PostgreSQL -The main store for the Graph Node, this is where subgraph data is stored, as well as metadata about subgraphs, and subgraph-agnostic network data such as the block cache, and eth_call cache. +È l'archivio principale del Graph Node, in cui vengono memorizzati i dati dei subgraph, i metadati sui subgraph e i dati di rete che non dipendono dal subgraph, come la cache dei blocchi e la cache eth_call. -### Network clients +### Clienti della rete -In order to index a network, Graph Node needs access to a network client via an EVM-compatible JSON-RPC API. This RPC may connect to a single client or it could be a more complex setup that load balances across multiple. +Per indicizzare una rete, Graph Node deve accedere a un cliente di rete tramite un'API JSON-RPC compatibile con EVM. Questo RPC può connettersi a un singolo cliente o può essere una configurazione più complessa che bilancia il carico su più clienti. -While some subgraphs may just require a full node, some may have indexing features which require additional RPC functionality. Specifically subgraphs which make `eth_calls` as part of indexing will require an archive node which supports [EIP-1898](https://eips.ethereum.org/EIPS/eip-1898), and subgraphs with `callHandlers`, or `blockHandlers` with a `call` filter, require `trace_filter` support ([see trace module documentation here](https://openethereum.github.io/JSONRPC-trace-module)). +Mentre alcuni subgraph possono richiedere solo un nodo completo, alcuni possono avere caratteristiche di indicizzazione che richiedono funzionalità RPC aggiuntive. In particolare, i subgraph che effettuano `eth_call` come parte dell'indicizzazione richiedono un nodo archivio che supporti [EIP-1898](https://eips.ethereum.org/EIPS/eip-1898) e i subgraph con `callHandlers` o `blockHandlers` con filtro `call` richiedono il supporto `trace_filter` ([vedere la documentazione del modulo trace qui](https://openethereum.github.io/JSONRPC-trace-module)). -**Network Firehoses** - a Firehose is a gRPC service providing an ordered, yet fork-aware, stream of blocks, developed by The Graph's core developers to better support performant indexing at scale. This is not currently an Indexer requirement, but Indexers are encouraged to familiarise themselves with the technology, ahead of full network support. Learn more about the Firehose [here](https://firehose.streamingfast.io/). +**Firehose di rete** - un Firehose è un servizio gRPC che fornisce un flusso ordinato, ma consapevole dei blocchi, sviluppato dagli sviluppatori di The Graph per supportare meglio l'indicizzazione performante su scala. Al momento non è un requisito per gli Indexer, ma questi ultimi sono incoraggiati a familiarizzare con la tecnologia, prima del supporto completo della rete. Per saperne di più sul Firehose [qui](https://firehose.streamingfast.io/). -### IPFS Nodes +### Nodi IPFS -Subgraph deployment metadata is stored on the IPFS network. The Graph Node primarily accesses the IPFS node during subgraph deployment to fetch the subgraph manifest and all linked files. Network indexers do not need to host their own IPFS node. An IPFS node for the network is hosted at https://ipfs.network.thegraph.com. +I metadati di distribuzione del subgraph sono memorizzati sulla rete IPFS. The Graph Node accede principalmente al nodo IPFS durante la distribuzione del subgraph per recuperare il manifest del subgraph e tutti i file collegati. Gli indexer di rete non devono ospitare un proprio nodo IPFS. Un nodo IPFS per la rete è ospitato su https://ipfs.network.thegraph.com. -### Prometheus metrics server +### Server di metriche Prometheus -To enable monitoring and reporting, Graph Node can optionally log metrics to a Prometheus metrics server. +Per consentire il monitoraggio e la creazione di report, Graph Node può opzionalmente registrare le metriche su un server di metriche Prometheus. ### Iniziare dalla sorgente @@ -69,37 +69,37 @@ cargo run -p graph-node --release -- \ --ipfs https://ipfs.network.thegraph.com ``` -### Getting started with Kubernetes +### Come iniziare con Kubernetes -A complete Kubernetes example configuration can be found in the [indexer repository](https://github.com/graphprotocol/indexer/tree/main/k8s). +Un esempio completo di configurazione Kubernetes si trova nel [repository indexer](https://github.com/graphprotocol/indexer/tree/main/k8s). -### Ports +### Porti -When it is running Graph Node exposes the following ports: +Quando è in funzione, Graph Node espone le seguenti porte: -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| ----- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | -> **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. +> **Importante**: fare attenzione a esporre le porte pubblicamente - le porte di **amministrazione** devono essere tenute sotto chiave. Questo include l'endpoint JSON-RPC del Graph Node. -## Advanced Graph Node configuration +## Configurazione avanzata del Graph Node -At its simplest, Graph Node can be operated with a single instance of Graph Node, a single PostgreSQL database, an IPFS node, and the network clients as required by the subgraphs to be indexed. +Nella sua forma più semplice, Graph Node può essere utilizzato con una singola istanza di Graph Node, un singolo database PostgreSQL, un nodo IPFS e i client di rete richiesti dai subgraph da indicizzare. -This setup can be scaled horizontally, by adding multiple Graph Nodes, and multiple databases to support those Graph Nodes. Advanced users may want to take advantage of some of the horizontal scaling capabilities of Graph Node, as well as some of the more advanced configuration options, via the `config.toml` file and Graph Node's environment variables. +Questa configurazione può essere scalata orizzontalmente, aggiungendo più Graph Node e più database per supportare tali Graph Node. Gli utenti avanzati potrebbero voler sfruttare alcune delle capacità di scalatura orizzontale di Graph Node, nonché alcune delle opzioni di configurazione più avanzate, tramite il file `config.toml` e le variabili d'ambiente di Graph Node. ### `config.toml` -A [TOML](https://toml.io/en/) configuration file can be used to set more complex configurations than those exposed in the CLI. The location of the file is passed with the --config command line switch. +Un file di configurazione [TOML](https://toml.io/en/) può essere usato per impostare configurazioni più complesse di quelle esposte nella CLI. Il percorso del file viene passato con l'opzione --config della riga di comando. -> When using a configuration file, it is not possible to use the options --postgres-url, --postgres-secondary-hosts, and --postgres-host-weights. +> Quando si usa un file di configurazione, non è possibile usare le opzioni --postgres-url, --postgres-secondary-hosts e --postgres-host-weights. -A minimal `config.toml` file can be provided; the following file is equivalent to using the --postgres-url command line option: +È possibile fornire un file `config.toml` minimo; il file seguente è equivalente all'uso dell'opzione della riga di comando --postgres-url: ```toml [store] @@ -110,236 +110,236 @@ connection="<.. postgres-url argument ..>" indexers = [ "<.. list of all indexing nodes ..>" ] ``` -Full documentation of `config.toml` can be found in the [Graph Node docs](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md). +La documentazione completa di `config.toml` si trova nei documenti di [Graph Node](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md). -#### Multiple Graph Nodes +#### Graph Node multipli -Graph Node indexing can scale horizontally, running multiple instances of Graph Node to split indexing and querying across different nodes. This can be done simply by running Graph Nodes configured with a different `node_id` on startup (e.g. in the Docker Compose file), which can then be used in the `config.toml` file to specify [dedicated query nodes](#dedicated-query-nodes), [block ingestors](#dedicated-block-ingestor), and splitting subgraphs across nodes with [deployment rules](#deployment-rules). +L'indicizzazione di Graph Node può scalare orizzontalmente, eseguendo più istanze di Graph Node per suddividere l'indicizzazione e l'interrogazione su diversi nodi. Questo può essere fatto semplicemente eseguendo i Graph Node configurati con un diverso `node_id` all'avvio (ad esempio nel file Docker Compose), che può essere usato nel file `config.toml` per specificare [nodi di interrogazione dedicati](#dedicated-query-nodes), [ingestori di blocchi](#dedicated-block-ingestor) e la suddivisione dei subgraph tra i nodi con [regole di distribuzione](#deployment-rules). -> Note that multiple Graph Nodes can all be configured to use the same database, which itself can be horizontally scaled via sharding. +> Si noti che più Graph Node possono essere configurati per utilizzare lo stesso database, che può essere scalato orizzontalmente tramite sharding. -#### Deployment rules +#### Regole di distribuzione -Given multiple Graph Nodes, it is necessary to manage deployment of new subgraphs so that the same subgraph isn't being indexed by two different nodes, which would lead to collisions. This can be done by using deployment rules, which can also specify which `shard` a subgraph's data should be stored in, if database sharding is being used. Deployment rules can match on the subgraph name and the network that the deployment is indexing in order to make a decision. +Dati più Graph Node, è necessario gestire la distribuzione di nuovi subgraph in modo che lo stesso subgraph non venga indicizzato da due nodi diversi, il che porterebbe a collisioni. Questo può essere fatto usando le regole di distribuzione, che possono anche specificare in quale `shard` devono essere memorizzati i dati di un subgraph, se si usa lo sharding del database. Deployment rules can match on the subgraph name and the network that the deployment is indexing in order to make a decision. -Example deployment rule configuration: +Esempio di configurazione della regola di distribuzione: ```toml [deployment] [[deployment.rule]] -match = { name = "(vip|important)/.*" } +match = { name = "(vip|importante)/.*" } shard = "vip" indexers = [ "index_node_vip_0", "index_node_vip_1" ] [[deployment.rule]] match = { network = "kovan" } -# No shard, so we use the default shard called 'primary' -indexers = [ "index_node_kovan_0" ] +# Nessun shard, quindi usiamo lo shard predefinito chiamato "primario". +indicizzatori = [ "index_node_kovan_0" ] [[deployment.rule]] match = { network = [ "xdai", "poa-core" ] } indexers = [ "index_node_other_0" ] [[deployment.rule]] -# There's no 'match', so any subgraph matches -shards = [ "sharda", "shardb" ] -indexers = [ +# Non c'è nessun "match", quindi qualsiasi sottografo corrisponde +shard = [ "sharda", "shardb" ] +indicizzatori = [ "index_node_community_0", "index_node_community_1", "index_node_community_2", "index_node_community_3", "index_node_community_4", - "index_node_community_5" + "indice_nodo_comunità_5" ] ``` -Read more about deployment rules [here](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#controlling-deployment). +Per saperne di più sulle regole di distribuzione [qui](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#controlling-deployment). -#### Dedicated query nodes +#### Nodi di query dedicati -Nodes can be configured to explicitly be query nodes by including the following in the configuration file: +I nodi possono essere configurati per essere esplicitamente nodi di query includendo quanto segue nel file di configurazione: ```toml [general] query = "" ``` -Any node whose --node-id matches the regular expression will be set up to only respond to queries. +Ogni nodo il cui --node-id corrisponde all'espressione regolare sarà impostato per rispondere solo alle query. -#### Database scaling via sharding +#### Scalabilità del database tramite sharding -For most use cases, a single Postgres database is sufficient to support a graph-node instance. When a graph-node instance outgrows a single Postgres database, it is possible to split the storage of graph-node's data across multiple Postgres databases. All databases together form the store of the graph-node instance. Each individual database is called a shard. +Per la maggior parte dei casi d'uso, un singolo database Postgres è sufficiente per supportare un'istanza del graph-node. Quando un'istanza del graph-node supera un singolo database Postgres, è possibile suddividere l'archiviazione dei dati del graph-node su più database Postgres. Tutti i database insieme formano lo store dell'istanza del graph-node. Ogni singolo database è chiamato shard. -Shards can be used to split subgraph deployments across multiple databases, and can also be used to use replicas to spread query load across databases. This includes configuring the number of available database connections each `graph-node` should keep in its connection pool for each database, which becomes increasingly important as more subgraphs are being indexed. +Gli shard possono essere utilizzati per suddividere le distribuzioni di subgraph su più database e per utilizzare le repliche per distribuire il carico delle query tra i database. Questo include la configurazione del numero di connessioni al database disponibili che ogni `graph-node` deve mantenere nel suo pool di connessioni per ogni database, cosa che diventa sempre più importante quando si indicizzano più subgraph. -Sharding becomes useful when your existing database can't keep up with the load that Graph Node puts on it, and when it's not possible to increase the database size anymore. +Lo sharding diventa utile quando il database esistente non riesce a reggere il carico che Graph Node gli impone e quando non è più possibile aumentare le dimensioni del database. -> It is generally better make a single database as big as possible, before starting with shards. One exception is where query traffic is split very unevenly between subgraphs; in those situations it can help dramatically if the high-volume subgraphs are kept in one shard and everything else in another because that setup makes it more likely that the data for the high-volume subgraphs stays in the db-internal cache and doesn't get replaced by data that's not needed as much from low-volume subgraphs. +> In genere è meglio creare un singolo database il più grande possibile, prima di iniziare con gli shard. Un'eccezione è rappresentata dai casi in cui il traffico di query è suddiviso in modo molto disomogeneo tra i subgraph; in queste situazioni può essere di grande aiuto tenere i subgraph ad alto volume in uno shard e tutto il resto in un altro, perché questa configurazione rende più probabile che i dati per i subgraph ad alto volume rimangano nella cache interna del database e non vengano sostituiti da dati non necessari per i subgraph a basso volume. -In terms of configuring connections, start with max_connections in postgresql.conf set to 400 (or maybe even 200) and look at the store_connection_wait_time_ms and store_connection_checkout_count Prometheus metrics. Noticeable wait times (anything above 5ms) is an indication that there are too few connections available; high wait times there will also be caused by the database being very busy (like high CPU load). However if the database seems otherwise stable, high wait times indicate a need to increase the number of connections. In the configuration, how many connections each graph-node instance can use is an upper limit, and Graph Node will not keep connections open if it doesn't need them. +Per quanto riguarda la configurazione delle connessioni, iniziare con max_connections in postgresql.conf impostato a 400 (o forse anche a 200) e osservare le metriche di Prometheus store_connection_wait_time_ms e store_connection_checkout_count. Tempi di attesa notevoli (qualsiasi cosa superiore a 5 ms) indicano che le connessioni disponibili sono troppo poche; tempi di attesa elevati possono anche essere causati da un database molto occupato (come un elevato carico della CPU). Tuttavia, se il database sembra altrimenti stabile, tempi di attesa elevati indicano la necessità di aumentare il numero di connessioni. Nella configurazione, il numero di connessioni che ogni istanza del graph-node può utilizzare è un limite massimo e Graph Node non manterrà aperte le connessioni se non ne ha bisogno. -Read more about store configuration [here](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-multiple-databases). +Per saperne di più sulla configurazione dell'archivio [qui](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-multiple-databases). -#### Dedicated block ingestion +#### Ingestione di blocchi dedicati -If there are multiple nodes configured, it will be necessary to specify one node which is responsible for ingestion of new blocks, so that all configured index nodes aren't polling the chain head. This is done as part of the `chains` namespace, specifying the `node_id` to be used for block ingestion: +Se sono stati configurati più nodi, sarà necessario specificare un nodo responsabile dell'ingestione dei nuovi blocchi, in modo che tutti i nodi indice configurati non eseguano il polling della testa della chain. Questo viene fatto come parte dello spazio dei nomi `chains`, specificando il `node_id` da usare per l'ingestione dei blocchi: ```toml [chains] ingestor = "block_ingestor_node" ``` -#### Supporting multiple networks +#### Supporto di più reti -The Graph Protocol is increasing the number of networks supported for indexing rewards, and there exist many subgraphs indexing unsupported networks which an indexer would like to process. The `config.toml` file allows for expressive and flexible configuration of: +Il Graph Protocol sta aumentando il numero di reti supportate per l'indicizzazione delle ricompense ed esistono molti subgraph che indicizzano reti non supportate che un indexer vorrebbe elaborare. Il file `config.toml` consente una configurazione espressiva e flessibile di: -- Multiple networks -- Multiple providers per network (this can allow splitting of load across providers, and can also allow for configuration of full nodes as well as archive nodes, with Graph Node preferring cheaper providers if a given workload allows). -- Additional provider details, such as features, authentication and the type of provider (for experimental Firehose support) +- Reti multiple +- Fornitori multipli per rete (questo può consentire di suddividere il carico tra i fornitori e di configurare nodi completi e nodi di archivio, con Graph Node che preferisce i fornitori più economici se un determinato carico di lavoro lo consente). +- Ulteriori dettagli sul provider, come le caratteristiche, l'autenticazione e il tipo di provider (per il supporto sperimentale di Firehose) -The `[chains]` section controls the ethereum providers that graph-node connects to, and where blocks and other metadata for each chain are stored. The following example configures two chains, mainnet and kovan, where blocks for mainnet are stored in the vip shard and blocks for kovan are stored in the primary shard. The mainnet chain can use two different providers, whereas kovan only has one provider. +La sezione `[chains]` controlla i fornitori di ethereum a cui graph-node si connette e dove vengono memorizzati i blocchi e altri metadati per ogni chain. L'esempio seguente configura due chain, mainnet e kovan, dove i blocchi per mainnet sono memorizzati nello shard vip e quelli per kovan nello shard primario. La chain mainnet può utilizzare due diversi provider, mentre kovan ha un solo provider. ```toml -[chains] +[catene] ingestor = "block_ingestor_node" [chains.mainnet] shard = "vip" provider = [ { label = "mainnet1", url = "http://..", features = [], headers = { Authorization = "Bearer foo" } }, - { label = "mainnet2", url = "http://..", features = [ "archive", "traces" ] } + { label = "mainnet2", url = "http://..", features = [ "archivio", "tracce" ] } } ] -[chains.kovan] +[catene.kovan] shard = "primary" provider = [ { label = "kovan", url = "http://..", features = [] } ] ``` -Read more about provider configuration [here](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-ethereum-providers). +Per saperne di più sulla configurazione dei provider [qui](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-ethereum-providers). -### Environment variables +### Variabili d'ambiente -Graph Node supports a range of environment variables which can enable features, or change Graph Node behaviour. These are documented [here](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md). +Graph Node supporta una serie di variabili d'ambiente che possono abilitare funzioni o modificare il comportamento di Graph Node. Queste sono documentate [qui](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md). -### Continuous deployment +### Distribuzione continua -Users who are operating a scaled indexing setup with advanced configuration may benefit from managing their Graph Nodes with Kubernetes. +Gli utenti che gestiscono una configurazione di indicizzazione scalare con una configurazione avanzata possono trarre vantaggio dalla gestione dei Graph Node con Kubernetes. -- The indexer repository has an [example Kubernetes reference](https://github.com/graphprotocol/indexer/tree/main/k8s) -- [Launchpad](https://docs.graphops.xyz/launchpad/intro) is a toolkit for running a Graph Protocol Indexer on Kubernetes maintained by GraphOps. It provides a set of Helm charts and a CLI to manage a Graph Node deployment. +- Il repository dell'indexer ha un [esempio di riferimento Kubernetes](https://github.com/graphprotocol/indexer/tree/main/k8s) +- [Launchpad](https://docs.graphops.xyz/launchpad/intro) è un kit di strumenti per l'esecuzione di un Graph Protocol Indexer su Kubernetes, gestito da GraphOps. Fornisce una serie di grafici Helm e una CLI per gestire una distribuzione di Graph Node. -### Managing Graph Node +### Gestione del Graph Node -Given a running Graph Node (or Graph Nodes!), the challenge is then to manage deployed subgraphs across those nodes. Graph Node surfaces a range of tools to help with managing subgraphs. +Dato un Graph Node (o più Graph Nodes!) in funzione, la sfida consiste nel gestire i subgraph distribuiti tra i nodi. Graph Node offre una serie di strumenti che aiutano a gestire i subgraph. -#### Logging +#### Registrazione -Graph Node's logs can provide useful information for debugging and optimisation of Graph Node and specific subgraphs. Graph Node supports different log levels via the `GRAPH_LOG` environment variable, with the following levels: error, warn, info, debug or trace. +I registri di Graph Node possono fornire informazioni utili per il debug e l'ottimizzazione di Graph Node e di specifici subgraph. Graph Node supporta diversi livelli di log tramite la variabile d'ambiente `GRAPH_LOG`, con i seguenti livelli: error, warn, info, debug o trace. -In addition setting `GRAPH_LOG_QUERY_TIMING` to `gql` provides more details about how GraphQL queries are running (though this will generate a large volume of logs). +Inoltre, impostando `GRAPH_LOG_QUERY_TIMING` su `gql` si ottengono maggiori dettagli sull'esecuzione delle query GraphQL (anche se questo genera un grande volume di log). -#### Monitoring & alerting +#### Monitoraggio e allerta -Graph Node provides the metrics via Prometheus endpoint on 8040 port by default. Grafana can then be used to visualise these metrics. +Graph Node fornisce le metriche tramite l'endpoint Prometheus sulla porta 8040. È possibile utilizzare Grafana per visualizzare queste metriche. -The indexer repository provides an [example Grafana configuration](https://github.com/graphprotocol/indexer/blob/main/k8s/base/grafana.yaml). +Il repository dell'indexer fornisce un [esempio di configurazione di Grafana](https://github.com/graphprotocol/indexer/blob/main/k8s/base/grafana.yaml). #### Graphman -`graphman` is a maintenance tool for Graph Node, helping with diagnosis and resolution of different day-to-day and exceptional tasks. +`graphman` è uno strumento di manutenzione per Graph Node, che aiuta nella diagnosi e nella risoluzione di diversi compiti quotidiani ed eccezionali. -The graphman command is included in the official containers, and you can docker exec into your graph-node container to run it. It requires a `config.toml` file. +Il comando graphman è incluso nei contenitori ufficiali e si può eseguire con docker exec nel contenitore graph-node. Richiede un file `config.toml`. -Full documentation of `graphman` commands is available in the Graph Node repository. See \[/docs/graphman.md\] (https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md) in the Graph Node `/docs` +La documentazione completa dei comandi di `graphman` è disponibile nel repository di Graph Node. Vedere \[/docs/graphman.md\] (https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md) nel Graph Node `/docs` -### Working with subgraphs +### Lavorare con i subgraph -#### Indexing status API +#### Stato dell'indicizzazione API -Available on port 8030/graphql by default, the indexing status API exposes a range of methods for checking indexing status for different subgraphs, checking proofs of indexing, inspecting subgraph features and more. +Disponibile sulla porta 8030/graphql per impostazione predefinita, l'API dello stato di indicizzazione espone una serie di metodi per verificare lo stato di indicizzazione di diversi subgraph, controllare le prove di indicizzazione, ispezionare le caratteristiche dei subgraph e altro ancora. -The full schema is available [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). +Lo schema completo è disponibile [qui](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). -#### Indexing performance +#### Prestazioni di indicizzazione -There are three separate parts of the indexing process: +Il processo di indicizzazione si articola in tre parti distinte: -- Fetching events of interest from the provider -- Processing events in order with the appropriate handlers (this can involve calling the chain for state, and fetching data from the store) -- Writing the resulting data to the store +- Recuperare gli eventi di interesse dal provider +- Elaborare gli eventi in ordine con i gestori appropriati (questo può comportare la chiamata alla chain per lo stato e il recupero dei dati dall'archivio) +- Scrivere i dati risultanti nell'archivio -These stages are pipelined (i.e. they can be executed in parallel), but they are dependent on one another. Where subgraphs are slow to index, the underlying cause will depend on the specific subgraph. +Questi stadi sono collegati tra loro (cioè possono essere eseguiti in parallelo), ma dipendono l'uno dall'altro. Se i subgraph sono lenti da indicizzare, la causa dipende dal subgraph specifico. -Common causes of indexing slowness: +Cause comuni di lentezza dell'indicizzazione: -- Time taken to find relevant events from the chain (call handlers in particular can be slow, given the reliance on `trace_filter`) -- Making large numbers of `eth_calls` as part of handlers -- A large amount of store interaction during execution -- A large amount of data to save to the store -- A large number of events to process -- Slow database connection time, for crowded nodes -- The provider itself falling behind the chain head -- Slowness in fetching new receipts at the chain head from the provider +- Tempo impiegato per trovare eventi rilevanti dalla chain (i gestori di chiamate in particolare possono essere lenti, dato che si affidano a `trace_filter`) +- Effettuare un gran numero di `eth_calls` come parte dei gestori +- Una grande quantità di interazioni con l'archivio durante l'esecuzione +- Una grande quantità di dati da salvare nell'archivio +- Un numero elevato di eventi da elaborare +- Tempo di connessione al database lento, per i nodi affollati +- Il fornitore stesso è in ritardo rispetto alla testa della chain +- Lentezza nell'acquisizione di nuove ricevute dal fornitore alla testa della chain -Subgraph indexing metrics can help diagnose the root cause of indexing slowness. In some cases, the problem lies with the subgraph itself, but in others, improved network providers, reduced database contention and other configuration improvements can markedly improve indexing performance. +Le metriche di indicizzazione dei subgraph possono aiutare a diagnosticare la causa principale della lentezza dell'indicizzazione. In alcuni casi, il problema risiede nel subgraph stesso, ma in altri, il miglioramento dei provider di rete, la riduzione della contesa del database e altri miglioramenti della configurazione possono migliorare notevolmente le prestazioni dell'indicizzazione. -#### Failed subgraphs +#### I subgraph falliti -During indexing subgraphs might fail, if they encounter data that is unexpected, some component not working as expected, or if there is some bug in the event handlers or configuration. There are two general types of failure: +Durante l'indicizzazione, i subgraph possono fallire se incontrano dati inaspettati, se qualche componente non funziona come previsto o se c'è un bug nei gestori di eventi o nella configurazione. Esistono due tipi generali di errore: -- Deterministic failures: these are failures which will not be resolved with retries -- Non-deterministic failures: these might be down to issues with the provider, or some unexpected Graph Node error. When a non-deterministic failure occurs, Graph Node will retry the failing handlers, backing off over time. +- Guasti deterministici: si tratta di guasti che non possono essere risolti con tentativi di risposta +- Fallimenti non deterministici: potrebbero essere dovuti a problemi con il provider o a qualche errore imprevisto di Graph Node. Quando si verifica un errore non deterministico, Graph Node riprova i gestori che non hanno funzionato, riducendo il tempo a disposizione. -In some cases a failure might be resolvable by the indexer (for example if the error is a result of not having the right kind of provider, adding the required provider will allow indexing to continue). However in others, a change in the subgraph code is required. +In alcuni casi, un errore può essere risolto dall'indexer (ad esempio, se l'errore è dovuto alla mancanza del tipo di provider giusto, l'aggiunta del provider richiesto consentirà di continuare l'indicizzazione). In altri casi, invece, è necessario modificare il codice del subgraph. -> Deterministic failures are considered "final", with a Proof of Indexing generated for the failing block, while non-determinstic failures are not, as the subgraph may manage to "unfail" and continue indexing. In some cases, the non-deterministic label is incorrect, and the subgraph will never overcome the error; such failures should be reported as issues on the Graph Node repository. +> I fallimenti deterministici sono considerati "definitivi", con la generazione di una Prova di Indicizzazione per il blocco fallito, mentre i fallimenti non deterministici non lo sono, in quanto il subgraph può riuscire a "non fallire" e continuare l'indicizzazione. In alcuni casi, l'etichetta non deterministica non è corretta e il subgraph non supererà mai l'errore; tali fallimenti devono essere segnalati come problemi sul repository di Graph Node. -#### Block and call cache +#### Cache dei blocchi e delle chiamate -Graph Node caches certain data in the store in order to save refetching from the provider. Blocks are cached, as are the results of `eth_calls` (the latter being cached as of a specific block). This caching can dramatically increase indexing speed during "resyncing" of a slightly altered subgraph. +Graph Node memorizza nella cache alcuni dati nell'archiivio, per risparmiare il refetching dal provider. I blocchi sono memorizzati nella cache, così come i risultati delle chiamate `eth_call` (queste ultime sono memorizzate nella cache a partire da un blocco specifico). Questa cache può aumentare notevolmente la velocità di indicizzazione durante la "risincronizzazione" di un subgraph leggermente modificato. -However, in some instances, if an Ethereum node has provided incorrect data for some period, that can make its way into the cache, leading to incorrect data or failed subgraphs. In this case indexers can use `graphman` to clear the poisoned cache, and then rewind the affected subgraphs, which will then fetch fresh data from the (hopefully) healthy provider. +Tuttavia, in alcuni casi, se un nodo Ethereum ha fornito dati non corretti per un certo periodo, questi possono entrare nella cache, causando dati errati o subgraph falliti. In questo caso gli indexer possono usare `graphman` per cancellare la cache avvelenata e quindi riavvolgere i subgraph interessati, che recupereranno quindi dati freschi dal provider (auspicabilmente) sano. -If a block cache inconsistency is suspected, such as a tx receipt missing event: +Se si sospetta un'incongruenza nella cache a blocchi, come ad esempio un evento di ricezione tx mancante: -1. `graphman chain list` to find the chain name. -2. `graphman chain check-blocks by-number ` will check if the cached block matches the provider, and deletes the block from the cache if it doesn’t. - 1. If there is a difference, it may be safer to truncate the whole cache with `graphman chain truncate `. - 2. If the block matches the provider, then the issue can be debugged directly against the provider. +1. `elenco chain di graphman` per trovare il nome della chain. +2. `chain graphman check-blocks by-number ` controlla se il blocco in cache corrisponde al fornitore e, in caso contrario, lo cancella dalla cache. + 1. Se c'è una differenza, può essere più sicuro troncare l'intera cache con `graphman chain truncate `. + 2. Se il blocco corrisponde al provider, è possibile eseguire il debug del problema direttamente sul provider. -#### Querying issues and errors +#### Problemi ed errori di query -Once a subgraph has been indexed, indexers can expect to serve queries via the subgraph's dedicated query endpoint. If the indexer is hoping to serve significant query volume, a dedicated query node is recommended, and in case of very high query volumes, indexers may want to configure replica shards so that queries don't impact the indexing process. +Una volta che un subgraph è stato indicizzato, gli indexer possono aspettarsi di servire le query attraverso l'endpoint di query dedicato al subgraph. Se l'indexer spera di servire un volume significativo di query, è consigliabile un nodo di query dedicato; in caso di volumi di query molto elevati, gli indexer potrebbero voler configurare shard di replica in modo che le query non abbiano un impatto sul processo di indicizzazione. -However, even with a dedicated query node and replicas, certain queries can take a long time to execute, and in some cases increase memory usage and negatively impact the query time for other users. +Tuttavia, anche con un nodo di query dedicato e le repliche, alcune query possono richiedere molto tempo per essere eseguite e, in alcuni casi, aumentare l'utilizzo della memoria e avere un impatto negativo sul tempo di query per gli altri utenti. -There is not one "silver bullet", but a range of tools for preventing, diagnosing and dealing with slow queries. +Non esiste una "pallottola d'argento", ma una serie di strumenti per prevenire, diagnosticare e gestire le query lente. -##### Query caching +##### Caching delle query -Graph Node caches GraphQL queries by default, which can significantly reduce database load. This can be further configured with the `GRAPH_QUERY_CACHE_BLOCKS` and `GRAPH_QUERY_CACHE_MAX_MEM` settings - read more [here](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md#graphql-caching). +Graph Node memorizza nella cache le query GraphQL per impostazione predefinita, riducendo in modo significativo il carico del database. Questo può essere ulteriormente configurato con impostazioni `GRAPH_QUERY_CACHE_BLOCKS` e `GRAPH_QUERY_CACHE_MAX_MEM` - per saperne di più [qui](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md#graphql-caching). -##### Analysing queries +##### Analisi delle query -Problematic queries most often surface in one of two ways. In some cases, users themselves report that a given query is slow. In that case the challenge is to diagnose the reason for the slowness - whether it is a general issue, or specific to that subgraph or query. And then of course to resolve it, if possible. +Le query problematiche emergono spesso in due modi. In alcuni casi, sono gli stessi utenti a segnalare la lentezza di una determinata query. In questo caso, la sfida consiste nel diagnosticare la ragione della lentezza, sia che si tratti di un problema generale, sia che si tratti di un problema specifico di quel subgraph o di quella query. E poi, naturalmente, risolverlo, se possibile. -In other cases, the trigger might be high memory usage on a query node, in which case the challenge is first to identify the query causing the issue. +In altri casi, il fattore scatenante potrebbe essere l'elevato utilizzo della memoria su un nodo di query, nel qual caso la sfida consiste nell'identificare la query che causa il problema. -Indexers can use [qlog](https://github.com/graphprotocol/qlog/) to process and summarize Graph Node's query logs. `GRAPH_LOG_QUERY_TIMING` can also be enabled to help identify and debug slow queries. +Gli indexer possono usare [qlog](https://github.com/graphprotocol/qlog/) per elaborare e riassumere i log delle query di Graph Node. Si può anche attivare `GRAPH_LOG_QUERY_TIMING` per aiutare a identificare e debuggare le query lente. -Given a slow query, indexers have a few options. Of course they can alter their cost model, to significantly increase the cost of sending the problematic query. This may result in a reduction in the frequency of that query. However this often doesn't resolve the root cause of the issue. +Con una query lenta, gli indexer hanno alcune opzioni. Naturalmente possono modificare il loro modello di costo, aumentando in modo significativo il costo di invio della query problematica. Questo può portare a una riduzione della frequenza della query. Tuttavia, questo spesso non risolve la causa principale del problema. -##### Account-like optimisation +##### Ottimizzazione di tipo account -Database tables that store entities seem to generally come in two varieties: 'transaction-like', where entities, once created, are never updated, i.e., they store something akin to a list of financial transactions, and 'account-like' where entities are updated very often, i.e., they store something like financial accounts that get modified every time a transaction is recorded. Account-like tables are characterized by the fact that they contain a large number of entity versions, but relatively few distinct entities. Often, in such tables the number of distinct entities is 1% of the total number of rows (entity versions) +Le tabelle di database che memorizzano le entità sembrano essere generalmente di due tipi: "tipo transazioni", in cui le entità, una volta create, non vengono mai aggiornate, cioè memorizzano qualcosa di simile a un elenco di transazioni finanziarie, e "tipo account", in cui le entità vengono aggiornate molto spesso, cioè memorizzano qualcosa di simile a conti finanziari che vengono modificati ogni volta che viene registrata una transazione. Le tabelle di tipo account sono caratterizzate dal fatto di contenere un gran numero di versioni di entità, ma relativamente poche entità distinte. Spesso, in queste tabelle il numero di entità distinte è pari all'1% del numero totale di righe (versioni di entità) -For account-like tables, `graph-node` can generate queries that take advantage of details of how Postgres ends up storing data with such a high rate of change, namely that all of the versions for recent blocks are in a small subsection of the overall storage for such a table. +Per le tabelle di tipo account, `graph-node` può generare query che sfruttano i dettagli del modo in cui Postgres finisce per memorizzare i dati con un tasso di modifica così elevato, ovvero che tutte le versioni per i blocchi recenti si trovano in una piccola sottosezione dello spazio di archiviazione complessivo di una tabella. -The command `graphman stats show shows, for each entity type/table in a deployment, how many distinct entities, and how many entity versions each table contains. That data is based on Postgres-internal estimates, and is therefore necessarily imprecise, and can be off by an order of magnitude. A `-1` in the `entities` column means that Postgres believes that all rows contain a distinct entity. +Il comando `graphman stats show mostra, per ogni tipo di entità/tabella in una distribuzione, quante entità distinte e quante versioni di entità contiene ogni tabella. Questi dati si basano su stime interne a Postgres e sono quindi necessariamente imprecisi e possono essere sbagliati di un ordine di grandezza. Un `-1` nella colonna `entità` significa che Postgres ritiene che tutte le righe contengano un'entità distinta. -In general, tables where the number of distinct entities are less than 1% of the total number of rows/entity versions are good candidates for the account-like optimization. When the output of `graphman stats show` indicates that a table might benefit from this optimization, running `graphman stats show ` will perform a full count of the table - that can be slow, but gives a precise measure of the ratio of distinct entities to overall entity versions. +In generale, le tabelle in cui il numero di entità distinte è inferiore all'1% del numero totale di righe/versioni di entità sono buone candidate per l'ottimizzazione di tipo account. Quando l'output di `graphman stats show` indica che una tabella potrebbe beneficiare di questa ottimizzazione, l'esecuzione di `graphman stats show
    ` eseguirà un conteggio completo della tabella - che può essere lento, ma fornisce una misura precisa del rapporto tra entità distinte e versioni complessive delle entità. -Once a table has been determined to be account-like, running `graphman stats account-like .
    ` will turn on the account-like optimization for queries against that table. The optimization can be turned off again with `graphman stats account-like --clear .
    ` It takes up to 5 minutes for query nodes to notice that the optimization has been turned on or off. After turning the optimization on, it is necessary to verify that the change does not in fact make queries slower for that table. If you have configured Grafana to monitor Postgres, slow queries would show up in `pg_stat_activity`in large numbers, taking several seconds. In that case, the optimization needs to be turned off again. +Una volta che una tabella è stata determinata come tipo account, l'esecuzione di `graphman stats tipo account .
    ` attiverà l'ottimizzazione tipo account per le query contro quella tabella. L'ottimizzazione può essere nuovamente disattivata con `graphman stats tipo account --clear .
    `. Ci vogliono fino a 5 minuti prima che i nodi delle query notino che l'ottimizzazione è stata attivata o disattivata. Dopo aver attivato l'ottimizzazione, è necessario verificare che la modifica non renda effettivamente più lente le query per quella tabella. Se si è configurato Grafana per monitorare Postgres, le query lente verrebbero visualizzate in `pg_stat_activity` in gran numero, impiegando diversi secondi. In questo caso, l'ottimizzazione deve essere nuovamente disattivata. -For Uniswap-like subgraphs, the `pair` and `token` tables are prime candidates for this optimization, and can have a dramatic effect on database load. +Per i subgraph simili a Uniswap, le tabelle `pair` e `token` sono le prime candidate per questa ottimizzazione e possono avere un effetto drammatico sul carico del database. -#### Removing subgraphs +#### Rimozione dei subgraph -> This is new functionality, which will be available in Graph Node 0.29.x +> Si tratta di una nuova funzionalità, che sarà disponibile in Graph Node 0.29.x -At some point an indexer might want to remove a given subgraph. This can be easily done via `graphman drop`, which deletes a deployment and all it's indexed data. The deployment can be specified as either a subgraph name, an IPFS hash `Qm..`, or the database namespace `sgdNNN`. Further documentation is available [here](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). +A un certo punto un indexer potrebbe voler rimuovere un determinato subgraph. Questo può essere fatto facilmente tramite `graphman drop`, che cancella una distribuzione e tutti i suoi dati indicizzati. La distribuzione può essere specificata come un nome di subgraph, un hash IPFS `Qm..`, o lo spazio dei nomi del database `sgdNNN`. È disponibile ulteriore documentazione [qui](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop). From 15542c02a683df0c07273ee29470f6c2f5ad2893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:10 -0400 Subject: [PATCH 361/924] New translations operating-graph-node.mdx (Japanese) --- website/pages/ja/operating-graph-node.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/pages/ja/operating-graph-node.mdx b/website/pages/ja/operating-graph-node.mdx index d491c6607c34..cec1b7f2f4fa 100644 --- a/website/pages/ja/operating-graph-node.mdx +++ b/website/pages/ja/operating-graph-node.mdx @@ -22,11 +22,11 @@ title: オペレーティンググラフノード 一部のサブグラフは完全なノードのみを必要とする場合がありますが、一部のサブグラフには追加の RPC 機能を必要とするインデックス機能が含まれる場合があります。具体的には、インデックス作成の一部として `eth_calls` を作成するサブグラフには、[EIP-1898](https://eips.ethereum.org/EIPS/eip-1898) をサポートするアーカイブ ノードが必要になります。、および `callHandlers` を持つサブグラフ、または `call` フィルタを持つ `blockHandlers` には、`trace_filter` サポートが必要です ([トレース モジュールのドキュメントはこちら](https://openethereum.github.io/JSONRPC-trace-module))。 -**Network Firehoses** - a Firehose is a gRPC service providing an ordered, yet fork-aware, stream of blocks, developed by The Graph's core developers to better support performant indexing at scale. This is not currently an Indexer requirement, but Indexers are encouraged to familiarise themselves with the technology, ahead of full network support. Learn more about the Firehose [here](https://firehose.streamingfast.io/). +**近日公開です。Network Firehoses** - Firehose は、順序付けられた、しかしフォークを意識したブロックのストリームを提供する gRPC サービスで、The Graph のコア開発者により、大規模で高性能なインデックス作成をより良くサポートするために開発されました。これは現在、インデクサーの要件ではありませんが、インデクサーは、ネットワークの完全サポートに先立って、この技術に慣れることが推奨されています。Firehose の詳細については、[こちら](https://firehose.streamingfast.io/)を参照してください。 ### IPFSノード -IPFS ノード(バージョン 未満) - サブグラフのデプロイメタデータは IPFS ネットワーク上に保存されます。 グラフノードは、サブグラフのデプロイ時に主に IPFS ノードにアクセスし、サブグラフマニフェストと全てのリンクファイルを取得します。 ネットワーク・インデクサーは独自の IPFS ノードをホストする必要はありません。 ネットワーク用の IPFS ノードは、https://ipfs.network.thegraph.com でホストされています。 +IPFS ノード(バージョン 未満) - サブグラフのデプロイメタデータは IPFS ネットワーク上に保存されます。 グラフノードは、サブグラフのデプロイ時に主に IPFS ノードにアクセスし、サブグラフマニフェストと全てのリンクファイルを取得します。 ネットワーク・インデクサーは独自の IPFS ノードをホストする必要はありません。 ネットワーク用の IPFS ノードは、https://ipfs.network.thegraph.com でホストされています。 ### Prometheus メトリクスサーバー @@ -77,13 +77,13 @@ Kubernetesの完全な設定例は、[indexerリポジトリ](https://github.com グラフノードは起動時に以下のポートを公開します。 -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ------------------------------------------------------- | ------------------------------------------------------ | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **重要**: ポートを公に公開する場合は注意してください。**管理ポート**はロックしておく必要があります。ノードの JSON-RPC エンドポイント From 0eee50aa639dc4801623e3a9792151ac29b4c111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:11 -0400 Subject: [PATCH 362/924] New translations operating-graph-node.mdx (Korean) --- website/pages/ko/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ko/operating-graph-node.mdx b/website/pages/ko/operating-graph-node.mdx index 4f0f856db111..a7dd15e7a84c 100644 --- a/website/pages/ko/operating-graph-node.mdx +++ b/website/pages/ko/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From 31f8b873579afbd47be0f74557762b38eddc9485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:12 -0400 Subject: [PATCH 363/924] New translations operating-graph-node.mdx (Dutch) --- website/pages/nl/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/nl/operating-graph-node.mdx b/website/pages/nl/operating-graph-node.mdx index 4f0f856db111..a7dd15e7a84c 100644 --- a/website/pages/nl/operating-graph-node.mdx +++ b/website/pages/nl/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From 5fc8e7e4d648f47f6656749a1c195057290aaeba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:13 -0400 Subject: [PATCH 364/924] New translations operating-graph-node.mdx (Polish) --- website/pages/pl/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/pl/operating-graph-node.mdx b/website/pages/pl/operating-graph-node.mdx index 4f0f856db111..a7dd15e7a84c 100644 --- a/website/pages/pl/operating-graph-node.mdx +++ b/website/pages/pl/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From a09dedde99b05bb94ce4ce24172c75d84b0e29a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:14 -0400 Subject: [PATCH 365/924] New translations operating-graph-node.mdx (Portuguese) --- website/pages/pt/operating-graph-node.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/pt/operating-graph-node.mdx b/website/pages/pt/operating-graph-node.mdx index 507e1706e067..c0267166d1be 100644 --- a/website/pages/pt/operating-graph-node.mdx +++ b/website/pages/pt/operating-graph-node.mdx @@ -22,7 +22,7 @@ Para indexar uma rede, o Graph Node precisa de acesso a um cliente de rede atrav Enquanto alguns subgraphs exigem apenas um node completo, alguns podem ter recursos de indexing que exijam funcionalidades adicionais de RPC. Especificamente, subgraphs que usam o `eth_calls` como parte do indexing exigirão um node de arquivo que apoie o [EIP-1898](https://eips.ethereum.org/EIPS/eip-1898); e subgraphs com `callHandlers`, ou `blockHandlers` com um filtro `call`, exigem apoio ao `trace_filter` ([veja a documentação sobre o trace module (módulo de rastreio) aqui](https://openethereum.github.io/JSONRPC-trace-module)). -**Network Firehoses** - a Firehose is a gRPC service providing an ordered, yet fork-aware, stream of blocks, developed by The Graph's core developers to better support performant indexing at scale. This is not currently an Indexer requirement, but Indexers are encouraged to familiarise themselves with the technology, ahead of full network support. Learn more about the Firehose [here](https://firehose.streamingfast.io/). +**Firehoses de Rede** - um Firehose é um serviço gRPC que providencia uma transmissão ordenada, mas consciente de forks, de blocos, feito pelos programadores centrais do The Graph para melhorar o apoio a indexing eficiente em escala. Isto não é um requisito atual para Indexadores, mas vale os mesmos se familiarizarem com a tecnologia, antes do apoio total à rede. Leia mais sobre o Firehose [aqui](https://firehose.streamingfast.io/). ### Nodes IPFS @@ -77,13 +77,13 @@ Veja uma configuração de exemplo completa do Kubernetes no [repositório de in Durante a execução, o Graph Node expõe as seguintes portas: -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| --- | --- | --- | --- | --- | -| 8000 | Servidor HTTP GraphQL
    (para queries de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | -| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | -| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| ----- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | Servidor HTTP GraphQL
    (para queries de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | +| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | +| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | > **Importante:** Cuidado ao expor portas publicamente; as **portas de administração** devem ser trancadas a sete chaves. Isto inclui o endpoint JSON-RPC do Graph Node. From 64c646fcbb8a5e603f61370ee64fb146ab618f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:15 -0400 Subject: [PATCH 366/924] New translations operating-graph-node.mdx (Russian) --- website/pages/ru/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ru/operating-graph-node.mdx b/website/pages/ru/operating-graph-node.mdx index dd51cc588968..22601fc637b7 100644 --- a/website/pages/ru/operating-graph-node.mdx +++ b/website/pages/ru/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ Во время работы Graph Node предоставляет следующие порты: -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| --- | --- | --- | --- | --- | -| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | -| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | -| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| ---- | ------------------------------------------------------------ | ---------------------------------------------------- | ----------------- | ---------------- | +| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | +| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | +| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | > **Важно**. Будьте осторожны, открывая порты для общего доступа — **порты администрирования** должны быть заблокированы. Это касается конечных точек Graph Node JSON-RPC. From a38766319770a0ea40f40156328863123da71a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:16 -0400 Subject: [PATCH 367/924] New translations operating-graph-node.mdx (Swedish) --- website/pages/sv/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/sv/operating-graph-node.mdx b/website/pages/sv/operating-graph-node.mdx index 20fe3667765e..203e83bab78a 100644 --- a/website/pages/sv/operating-graph-node.mdx +++ b/website/pages/sv/operating-graph-node.mdx @@ -77,13 +77,13 @@ En komplett exempelkonfiguration för Kubernetes finns i [indexer repository](ht När Graph Node är igång exponerar den följande portar: -| Port | Syfte | Rutter | Argument för CLI | Miljö Variabel | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP-server
    (för frågor om undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (för prenumerationer på undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | -| 8030 | Status för indexering av undergrafer API | /graphql | --index-node-port | - | -| 8040 | Prometheus mätvärden | /metrics | --metrics-port | - | +| Port | Syfte | Rutter | Argument för CLI | Miljö Variabel | +| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------- | +| 8000 | GraphQL HTTP-server
    (för frågor om undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (för prenumerationer på undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | +| 8030 | Status för indexering av undergrafer API | /graphql | --index-node-port | - | +| 8040 | Prometheus mätvärden | /metrics | --metrics-port | - | > **Viktigt**: Var försiktig med att exponera portar offentligt - **administrationsportar** bör hållas säkra. Detta inkluderar JSON-RPC-slutpunkten för Graph Node. From 5e5e2069ecddedc774e8432ddc0c67051398d781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:17 -0400 Subject: [PATCH 368/924] New translations operating-graph-node.mdx (Turkish) --- website/pages/tr/operating-graph-node.mdx | 88 +++++++++++++++++++---- 1 file changed, 75 insertions(+), 13 deletions(-) diff --git a/website/pages/tr/operating-graph-node.mdx b/website/pages/tr/operating-graph-node.mdx index 2ce8c3b707eb..ebd935a64695 100644 --- a/website/pages/tr/operating-graph-node.mdx +++ b/website/pages/tr/operating-graph-node.mdx @@ -22,7 +22,7 @@ Bir ağı dizine eklemek için Graph Node'un EVM uyumlu bir JSON-RPC API aracıl Bazı subgraph'ler yalnızca tam bir node gerektirebilirken, bazıları ek RPC işlevselliği gerektiren indeksleme özelliklerine sahip olabilir. Spesifik olarak, indekslemenin bir parçası olarak `eth_calls` yapan subgraph'ler, [EIP-1898](https://eips.ethereum.org/EIPS/eip-1898)'yi destekleyen bir arşiv node'u gerektirir ve `callHandlers`'li subgraph'ler veya `call` filtreli `blockHandlers`, `trace_filter` desteği ([izleme modülü belgelerine buradan göz atın](https://openethereum.github.io/JSONRPC-trace-module)) gerektirir. -**Network Firehoses** - a Firehose is a gRPC service providing an ordered, yet fork-aware, stream of blocks, developed by The Graph's core developers to better support performant indexing at scale. This is not currently an Indexer requirement, but Indexers are encouraged to familiarise themselves with the technology, ahead of full network support. Learn more about the Firehose [here](https://firehose.streamingfast.io/). +**Network Firehoses** - Firehose, Graph'in çekirdek geliştiricileri tarafından büyük ölçekte performanslı indekslemeyi daha iyi desteklemek için geliştirilmiş, sıralı ancak çatal farkındalığı olan bir blok akışı sağlayan bir gRPC hizmetidir. Bu şu anda bir indeksleyici gereksinimi değildir, ancak indeksleyicilerin tam ağ desteğinden önce bu teknolojiyi tanımaları teşvik edilmektedir. Firehose [here](https://firehose.streamingfast.io/) hakkında daha fazla bilgi edinin. ### IPFS Düğümleri @@ -77,13 +77,13 @@ Tam Kubernetes örnek yapılandırması [indeksleyici Github deposunda](https:// Graph Düğümü çalışırken aşağıdaki portları açar: -| Port | Amaç | Routes | CLI Argümanı | Ortam Değişkeni | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP sunucusu
    (subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | -| 8030 | Subgraph indeksleme durumu API'ı | /graphql | --index-node-port | - | -| 8040 | Prometheus ölçümleri | /metrics | --metrics-port | - | +| Port | Amaç | Routes | CLI Argümanı | Ortam Değişkeni | +| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | +| 8000 | GraphQL HTTP sunucusu
    (subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | +| 8030 | Subgraph indeksleme durumu API'ı | /graphql | --index-node-port | - | +| 8040 | Prometheus ölçümleri | /metrics | --metrics-port | - | > **Önemli**: Bağlantı noktalarını herkese açık olarak açarken dikkatli olun - **yönetim portları** kilitli tutulmalıdır. Bu, Graph Düğümü JSON-RPC uç noktasını içerir. @@ -91,7 +91,7 @@ Graph Düğümü çalışırken aşağıdaki portları açar: En basit haliyle, Graph Düğümü tek bir Graph Düğüm örneği, bir PostgreSQL veritabanı, bir IPFS düğümü ve indekslenecek subgraphlar tarafından gerektirilen ağ istemcileri ile çalıştırılabilir. -Bu yapı birden fazla Graph Düğümü ekleyerek ve bu Graph Düğümlerini desteklemek için birden fazla veritabanı ekleyerek yatay olarak ölçeklenebilir. Gelişmiş kullanıcılar,`config.toml` dosyası ve Graph Düğümü ortam değişkenleri aracılığıyla bazı yatay ölçekleme yeteneklerinden ve daha gelişmiş yapılandırma seçeneklerinden faydalanmak isteyebilirler. +Bu yapı birden fazla Graph Düğümü ekleyerek ve bu Graph Düğümlerini desteklemek için birden fazla veritabanı ekleyerek yatay olarak ölçeklenebilir. Gelişmiş kullanıcılar, `config.toml` dosyası ve Graph Düğümü ortam değişkenleri aracılığıyla bazı yatay ölçekleme yeteneklerinden ve daha gelişmiş yapılandırma seçeneklerinden faydalanmak isteyebilirler. ### `config.toml` @@ -114,18 +114,24 @@ indexers = [ "<.. list of all indexing nodes ..>" ] #### Birden Fazla Graph Düğümü -Graph Düğümü indeksleme farklı düğümler arasında indekslemeyi ve sorgulamayı ayırmak için birden fazla Graph Düğüm örneği çalıştırarak yatay olarak ölçeklenebilir. Bu, daha sonra `config.toml` dosyasında [özel sorgu düğümleri](#dedicated-query-nodes), +Graph Düğümü indeksleme farklı düğümler arasında indekslemeyi ve sorgulamayı ayırmak için birden fazla Graph Düğüm örneği çalıştırarak yatay olarak ölçeklenebilir. Bu, daha sonra `config.toml` dosyasında [özel sorgu düğümleri](#dedicated-query-nodes) , + +blok alıcıları ve [dağıtım kuralları](#deployment-rules) ile düğümler arasında subgrapları bölmek için kullanılmak üzere, farklı bir `node_id` ile yapılandırılmış Graph Düğümü başlatarak yapılabilir (örneğin Docker Compose dosyasında).

    + -blok alıcıları ve [dağıtım kuralları](#deployment-rules) ile düğümler arasında subgrapları bölmek için kullanılmak üzere, farklı bir `node_id` ile yapılandırılmış Graph Düğümü başlatarak yapılabilir (örneğin Docker Compose dosyasında). > Birden fazla Graph Düğümü, aynı veritabanını kullanacak şekilde yapılandırılabilir ve veritabanı sharding kullanılarak yatay olarak ölçeklenebilir. + + #### Dağıtım kuralları Birden fazla Graph Düğümü verildiğinde, aynı subgraph'ın çarpışmalara yol açacak şekilde iki farklı düğüm tarafından indekslenmesinin önüne geçmek için yeni subgraphlar'ın dağıtımını yönetmek gereklidir. Bu, veritabanı sharding kullanılıyorsa bir subgraph'ın verilerinin hangi `shard`'da saklanması gerektiğini de belirtebilen dağıtım kurallarını kullanılarak yapılabilir. Dağıtım kuralları, karar vermek için subgraph adı ve dağıtımın indekslediği ağ ile eşleşebilir. Örnek dağıtım kuralı yapılandırması: + + ```toml [deployment] [[deployment.rule]] @@ -152,19 +158,27 @@ indexers = [ ] ``` + Dağıtım kuralları hakkında daha fazlasını [buradan](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#controlling-deployment) okuyun. + + #### Özelleştirilmiş sorgu düğümleri Düğümler, yapılandırma dosyasına aşağıdakini dahil ederek açıkça sorgu düğümleri olarak yapılandırılabilir: + + ```toml [general] query = "" ``` + --node-id'si düzenli ifade ile eşleşen herhangi bir düğüm, sadece sorgulara yanıt vermek üzere ayarlanacaktır. + + #### Sharding ile veritabanı ölçeklendirme Çoğu kullanım durumu için, tek bir Postgres veritabanı bir graph-düğümü örneğini desteklemek için yeterlidir. Bir graph-düğümü örneği tek bir Postgres veritabanından daha büyük hale geldiğinde, bu graph düğümü verilerinin depolanmasını birden fazla Postgres veritabanına yaymak mümkündür. Tüm veritabanları birlikte, graph-düğümü örneğinin deposunu oluşturur. Her tekil veritabanına bir shard denir. @@ -173,21 +187,30 @@ Shard'lar, subgraph dağıtımlarını birden çok veritabanına bölmek için k Sharding, Graph Düğümü'nün üzerine koyduğu yükü mevcut veritabanınıza koyamadığınızda ve veritabanı boyutunu artıramayacağınızda faydalı hale gelir. + + > Genellikle, shard'larla başlamadan önce tek bir veritabanını mümkün olduğunca büyük hale getirmek daha mantıklıdır. Tek bir istisna, sorgu trafiği subgraphlar arasında çokta eşit olmayan bir şekilde bölünmesidir. Bu durumda, yüksek-hacimli subgraphlar'ın bir shard'da tutulması ve geriye kalan her şeyin diğer bir shard'da tutulması, yüksek hacimli subgraphlar için verinin veritabanı dahili önbellekte kalması ve düşük hacimli subgraphlar'daki daha az ihtiyaç duyulan veriler tarafından değiştirilmemesi daha olası olduğu için çok yardımcı olabilir. Bağlantı yapılandırması açısından postgresql.conf'da max_connections değerinin 400 (veya belki de 200) olarak ayarlanması ve store_connection_wait_time_ms ve store_connection_checkout_count Prometheus metriklerine bakılması önerilir. Belirgin bekleme süreleri (5 milisaniye'nin üzerinde herhangi bir değer) yetersiz bağlantıların mevcut olduğunun bir işaretidir; yüksek bekleme süreleri veritabanının çok yoğun olması gibi sebeplerden de kaynaklanabilir. Ancak, veritabanı genel olarak stabil görünüyorsa, yüksek bekleme süreleri bağlantı sayısını arttırma ihtiyacını belirtir. Yapılandırmada her graph-düğümü örneğinin ne kadar bağlantı kullanabileceği bir üst sınırdır ve Graph Düğümü bunları gereksiz bulmadığı sürece açık tutmaz. Depolama yapılandırması hakkında daha fazla bilgi için [burayı](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-multiple-databases) okuyabilirsiniz. + + #### Özelleştirilmiş blok alınması Birden fazla düğüm yapılandırılmışsa yeni blokları işleme sorumluluğu olan bir düğüm belirtmek gerekecektir, böylece yapılandırılmış tüm dizin düğümleri zincir başını sorgulamaz. Bu, zincir (`chains`) ad alanının bir parçası olarak yapılır ve blok yüklemek için kullanılacak düğüm kimliği(`node_id`) belirtilir: + + ```toml [chains] ingestor = "block_ingestor_node" ``` + + + #### Birden fazla ağın desteklenmesi Graph Protokolü, indeksleme ödülleri için desteklenen ağların sayısını arttırıyor ve bir indekleyicinin işlemek isteyebileceği desteklenmeyen ağları indeksleyen birçok subgraph mevcut. c`config.toml` dosyası şunlar gibi anlamlı ve esnek yapılandırmaları destekler: @@ -198,6 +221,8 @@ Graph Protokolü, indeksleme ödülleri için desteklenen ağların sayısını `[chains]` bölümü, graph-düğümü'nün bağlandığı ethereum sağlayıcılarını ve her zincir için blokların ve diğer üst verilerin nerede depolandığını kontrol eder. Aşağıdaki örnek, mainnet için blokların vip shard'da depolandığı ve kovan için blokların primary shard'da depolandığı olmak üzere iki zinciri, mainnet ve kovan'ı yapılandırır. Mainnet zinciri iki farklı sağlayıcı kullanabilirken, kovan yalnızca bir sağlayıcıya sahiptir. + + ```toml [chains] ingestor = "block_ingestor_node" @@ -212,12 +237,17 @@ shard = "primary" provider = [ { label = "kovan", url = "http://..", features = [] } ] ``` + Sağlayıcı yapılandırması hakkında daha fazla bilgi için [burayı](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-ethereum-providers) okuyabilirsiniz. + + ### Ortam değişkenleri Graph Düğümü, özellikleri etkinleştirebilen veya Graph Düğümü davranışını değiştirebilen bir dizi çevre değişkeni destekler. Bunlar [burada](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md) belgelenmiştir. + + ### Sürekli dağıtım Gelişmiş yapılandırmaya sahip ölçeklendirilmiş bir dizinleme kurulumu işleten kullanıcılar, Graph Düğümler'ini Kubernetes ile yönetmekten faydalanabilirler. @@ -225,22 +255,30 @@ Gelişmiş yapılandırmaya sahip ölçeklendirilmiş bir dizinleme kurulumu iş - İndeksleyici github deposunda bir [Kubernetes referansı örneği](https://github.com/graphprotocol/indexer/tree/main/k8s) bulunmaktadır - [Launchpad](https://docs.graphops.xyz/launchpad/intro), GraphOps tarafından yönetilen Kubernetes üzerinde Graph Protokol indeksleyicisi çalıştırmak için kullanılan bir araç setidir. Graph Düğümü dağıtımını yönetmek için bir dizi Helm şeması ve bir CLI sağlar. + + ### Graph Düğümü Yönetimi Çalışan bir Graph Düğümüne (veya Graph Düğümlerine) sahip olunduktan sonra, dağıtılan subgraplar'ın bu düğümler üzerinde yönetilmesi zorluğu ortaya çıkar. Subgraphlar'ı yönetmeye yardımcı olmak için Graph Düğümü, bir dizi araç sunar. + + #### Kayıt tutma Graph Düğümü'nün kayıtları, Graph Düğümü ve belirli subgraphlar'ın hata ayıklanması ve optimizasyonu için faydalı bilgiler sağlayabilir. Graph Düğümü, `GRAPH_LOG` ortam değişkeni aracılığıyla farklı kayıt seviyelerini destekler ve şu seviyeleri içerir: error, warn, info, debug veya trace. Ek olarak, `GRAPH_LOG_QUERY_TIMING` `gql` olarak ayarlanması GraphQL sorgularının nasıl çalıştığı hakkında daha fazla ayrıntı sağlar (ancak bu, büyük bir kayıt hacmi oluşturacaktır). + + #### Görüntüleme & uyarma Graph Düğümü, varsayılan olarak 8040 port'undaki Prometheus uç noktası aracılığıyla metrikleri sağlar. Ardından Grafana, bu metrikleri görselleştirmek için kullanılabilir. İndeksleyici github deposu [Grafana yapılandırmasına bir örnek](https://github.com/graphprotocol/indexer/blob/main/k8s/base/grafana.yaml) sağlar. + + #### Graphman `graphman`, Graph Düğümü'nün bakım aracıdır ve farklı günlük görevlerinin teşhis ve çözümüne yardımcı olur. @@ -249,14 +287,20 @@ Graphman komutu, resmi konteynerlara dahil edilmiştir ve graph-düğümü konte `graphman` komutlarının tam belgeleri Graph Düğümü github deposunda mevcuttur. Graph Düğümü `/docs`'da bulunan \[/docs/graphman.md\] (https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md) bağlantısına bakın + + ### Subgraphlarla çalışma + + #### İndeksleme durum API'si Varsayılan olarak 8030/graphql port'unda mevcut olan indeksleme durumu API'si, farklı subgraphlar için indeksleme durumunu ve ispatlarını kontrol etmek, subgraph özelliklerini incelemek ve daha fazlasını yapmak için çeşitli yöntemler sunar. Tam şema [burada](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql) mevcut. + + #### Endeksleme performansı İndeksleme sürecinin üç ayrı parçası bulunmaktadır: @@ -280,6 +324,8 @@ Bu aşamalar boru hattında (yani eşzamanlı olarak yürütülebilir), ancak bi Subgraph indeksleme metrikleri, indeksleme yavaşlığının temel nedenini teşhis etmede yardımcı olabilir. Bazı durumlarda, sorun subgraph'ın kendisiyle ilgilidir, ancak diğer durumlarda, geliştirilmiş ağ sağlayıcıları, azaltılmış veritabanı çekişmesi ve diğer yapılandırma iyileştirmeleri indeksleme performansını belirgin şekilde artırabilir. + + #### Başarısıız subgraphlar İndekslemesi sırasında subgraphlar beklenmedik veri, beklendiği gibi çalışmayan bir bileşen veya olay işleyicilerinde veya yapılandırmada bir hata olması durumunda başarısız olabilir. İki genel başarısızlık türü mevcuttur: @@ -289,8 +335,12 @@ Subgraph indeksleme metrikleri, indeksleme yavaşlığının temel nedenini teş Bazı durumlarda, başarısızlık indeksleyici tarafından çözülebilir (örneğin, hatanın doğru türde sağlayıcıya sahip olmamasından kaynaklanması durumunda, gerekli sağlayıcı eklenirse indeksleme devam ettirilebilir). Ancak diğer durumlarda, subgraph kodunda bir değişiklik gereklidir. + + > Belirleyici başarısızlıklar, başarısız blok için oluşturulan İndeksleme Kanıtı ile "final" olarak kabul edilirken, deterministik olmayan başarısızlıklar subgraph'ın "unfail"i idare edip indekslememye devam edebileceğinden "final" olarak kabul edilmez. Bazı durumlarda, deterministik olmayan etiketi yanlış olabilir ve subgraph hatayı asla aşamayabilir. Bu tür başarısızlıklar, Graph Düğümü github deposunda bir sorun olarak bildirilmelidir. + + #### Blok ve çağrı önbelleği Graph Düğümü, sağlayıcıdan tekrar alma işlemini kaydetmek için depoda belirli verileri önbelleğe alır. Bloklar ve `eth_calls` sonuçları önbelleğe alınır (bu sonuncusu belirli bir bloktan itibaren önbelleğe alınır). Bu önbellekleme, azca değiştirilmiş bir subgraph'ın "yeniden senkronizasyonu" sırasında indeksleme hızını büyük ölçüde artırabilir. @@ -300,10 +350,12 @@ Ancak bazı örneklerde, Ethereum düğümü bir süre boyunca yanlış veri sa Örneğin tx makbuzu etkinlik eksikliği gibi bir blok önbellek tutarsızlığı şüphesi varsa: 1. zincir ismini bulmak için `graphman chain list`. -2. `graphman chain check-blocks by-number `, önbelleğe alınan bloğun sağlayıcıyla eşleşip eşleşmediğini kontrol edecek ve eşleşmiyorsa bloğu önbellekten silecek. - 1. Bir fark varsa, tüm önbelleği `graphman chain truncate ` ile kesmek daha güvenli olabilir. +2. `graphman chain check-blocks by-number `, önbelleğe alınan bloğun sağlayıcıyla eşleşip eşleşmediğini kontrol edecek ve eşleşmiyorsa bloğu önbellekten silecek. + 1. Bir fark varsa, tüm önbelleği `graphman chain truncate ` ile kesmek daha güvenli olabilir. 2. Blok sağlayıcıyla eşleşirse, sorun doğrudan sağlayıcıya karşı hata ayıklanabilir. + + #### Sorgulama sorunları ve hataları Bir subgraph indekslendikten sonra, indeksleyiciler subgraph'ın ayrılmış sorgu son noktası aracılığıyla sorguları sunmayı bekleyebilirler. İndeksleyiciler önemli sorgu hacmi sunmayı umuyorlarsa, bunun için ayrılmış bir sorgu düğümü önerilir ve çok yüksek sorgu hacimleri durumunda indeksleyiciler sorguların indeksleme sürecini etkilememesi için replika shardlar yapılandırmak isteyebilirler. @@ -312,10 +364,14 @@ Bununla birlikte, özel bir sorgu düğümü ve replikalarda bile, belirli sorgu Tek bir "sihirli çözüm" yoktur, ancak yavaş sorguların önlenmesi, teşhisi ve işlenmesi için bir dizi araç bulunmaktadır. + + ##### Sorgu önbellekleme Graph Düğümü, varsayılan olarak GraphQL sorgularını önbelleğe alarak veritabanı yükünü önemli ölçüde azaltabilir. Bu, `GRAPH_QUERY_CACHE_BLOCKS` ve `GRAPH_QUERY_CACHE_MAX_MEM` ayarları ile daha da yapılandırılabilir - [buradan](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md#graphql-caching) daha fazla bilgi edinin. + + ##### Sorguların analizi Sorunlu sorgular genellikle iki şekilde ortaya çıkar. Bazı durumlarda, kullanıcılar kendileri belirli bir sorgunun yavaş olduğunu bildirirler. Bu durumda zorluk, yavaşlığın nedenini teşhis etmektir - genel bir sorun mu, yoksa subgraph'a veya sorguya özgü mü olduğunu belirlemek ve tabii ki mümkünse sonra çözmek olacaktır. @@ -326,6 +382,8 @@ Diğer durumlarda, tetikleyici sorgu düğümündee yüksek bellek kullanımı o Yavaş bir sorgu verildiğinde, indeksleyicilerin birkaç seçeneği vardır. Tabii ki, sorunlu sorgunun gönderilme maliyetini önemli ölçüde artırmak için maliyet modelini değiştirebilirler. Bu, o sorgunun sıklığında azalmaya neden olabilir. Ancak, genellikle sorunun temek nedenini çözmez. + + ##### Hesabımsı optimizasyon Varlıkları depolayan veritabanı tablolarının genellikle iki çeşit olduğu görünmektedir: oluşturulduktan sonra hiçbir zaman güncellenmeyen mesela finansal işlemler listesine benzer şeyler saklayan olan 'işlemimsi' ve varlıkların çok sık güncellendiği, mesela her işlem kaydedildiğinde değiştirilen finansal hesaplar gibi şeyler saklayan 'hesabımsı'. Hesabımsı tablolar, birçok varlık sürümünü içermelerine rağmen, nispeten az sayıda farklı varlığa sahip olmasıyla bilinir. Çoğu durumda, böyle bir tabloda farklı varlık sayısı, toplam satır (varlık sürümleri) sayısının %1'ine eşittir @@ -340,8 +398,12 @@ Bir tablonun hesabımsı olduğu belirlendikten sonra `graphman stats account-li Uniswapımsı subgraplar için, çift (`pair`) ve `token` tabloları bu optimizasyon için en uygun adaylardır ve veritabanı yükü üzerinde etkili bir etkiye sahip olabilirler. + + #### Subgraphları kaldırma + + > Bu, Graph Node 0.29.x sürümünde kullanılabilir olan yeni bir fonksiyonelliktir Bir noktada indeksleyici, belirli bir subgraph'ı kaldırmak isteyebilir. Bu, tüm indekslenmiş verileri ve bir dağıtımı silen `graphman drop` komutuyla kolayca gerçekleştirilebilir. Dağıtım, subgraph adı, bir IPFS hash `Qm..` veya veritabanı ad alanı `sgdNNN` olarak belirtilebilir. Daha fazla belgeye [buradan](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop) erişilebilir. From 569659b4612b5305e30ad1bfae0511ad4b9830f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:18 -0400 Subject: [PATCH 369/924] New translations operating-graph-node.mdx (Ukrainian) --- website/pages/uk/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/uk/operating-graph-node.mdx b/website/pages/uk/operating-graph-node.mdx index 7bcb6ac9dab6..b198c70ca3ed 100644 --- a/website/pages/uk/operating-graph-node.mdx +++ b/website/pages/uk/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| --- | --- | --- | --- | --- | -| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | -| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | -| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | -| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | +| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | +| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | +| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | +| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From cc332d96418651f112a2fab23ec3452f12dcb889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:19 -0400 Subject: [PATCH 370/924] New translations operating-graph-node.mdx (Chinese Simplified) --- website/pages/zh/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/zh/operating-graph-node.mdx b/website/pages/zh/operating-graph-node.mdx index 78fa738fcf22..9ed79ffbde45 100644 --- a/website/pages/zh/operating-graph-node.mdx +++ b/website/pages/zh/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ 当运行Graph Node时,会暴露以下端口: -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...

    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | -| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | -| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| ---- | ------------------------------------ | ------------------------------------------------------------------- | ----------------- | ----- | +| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...

    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | +| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | +| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | > **重要**: 公开暴露端口时要小心 - **管理端口** 应保持锁定。 这包括下面详述的 Graph 节点 JSON-RPC 和索引人管理端点。 From ee0499ff38dc8e1fa29af100cee0ec0fe900c7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:20 -0400 Subject: [PATCH 371/924] New translations operating-graph-node.mdx (Urdu (Pakistan)) --- website/pages/ur/operating-graph-node.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/ur/operating-graph-node.mdx b/website/pages/ur/operating-graph-node.mdx index 91ace3b3a74f..a5434224e20b 100644 --- a/website/pages/ur/operating-graph-node.mdx +++ b/website/pages/ur/operating-graph-node.mdx @@ -22,7 +22,7 @@ title: گراف نوڈ کو آپریٹ کرنا اگرچہ کچھ سب گراف کو صرف ایک مکمل نوڈ کی ضرورت ہو سکتی ہے، کچھ میں انڈیکسنگ کی خصوصیات ہوسکتی ہیں جن کے لیے اضافی RPC فعالیت کی ضرورت ہوتی ہے۔ خاص طور پر سب گراف جو `eth_calls` کو انڈیکسنگ کے حصے کے طور پر بناتے ہیں ان کے لیے آرکائیو نوڈ کی ضرورت ہوگی جو [EIP-1898](https://eips.ethereum.org/EIPS/eip-1898) کو سپورٹ کرتا ہو، اور `callHandlers`، یا `blockHandlers` کے ساتھ `call` فلٹر کے ساتھ سب گراف، `trace_filter` سپورٹ کی ضرورت ہے ([ٹریس ماڈیول کی دستاویزات یہاں دیکھیں](https://openethereum.github.io/JSONRPC-trace-module)). -**Network Firehoses** - a Firehose is a gRPC service providing an ordered, yet fork-aware, stream of blocks, developed by The Graph's core developers to better support performant indexing at scale. This is not currently an Indexer requirement, but Indexers are encouraged to familiarise themselves with the technology, ahead of full network support. Learn more about the Firehose [here](https://firehose.streamingfast.io/). +**نیٹ ورک فائر ہوزز** - ایک فائر ہوز ایک gRPC سروس ہے جو ایک ترتیب شدہ، ابھی تک فورک-آگاہ، بلاکس کا سلسلہ فراہم کرتی ہے، جس کو گراف کے کور ڈویلپرز نے پیمانے پر پرفارمنس انڈیکسنگ کو بہتر طریقے سے سپورٹ کرنے کے لیے تیار کیا ہے۔ یہ فی الحال انڈیکسر کی ضرورت نہیں ہے، لیکن انڈیکسرز کو مکمل نیٹ ورک سپورٹ سے پہلے ٹیکنالوجی سے آشنا ہونے کی ترغیب دی جاتی ہے۔ فائر ہوز کے بارے میں مزید جانیں [یہاں](https://firehose.streamingfast.io/). ### IPFS نوڈس @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ جب یہ چل رہا ہوتا ہے گراف نوڈ مندرجہ ذیل پورٹس کو بے نقاب کرتا ہے: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | -| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | -| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | +| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | +| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | > **اہم**: پورٹس کو عوامی طور پر ظاہر کرنے میں محتاط رہیں - **انتظامی پورٹس** کو بند رکھا جانا چاہیے. اس میں گراف نوڈ کا JSON-RPC اینڈ پوائنٹ شامل ہے. From 33baa260de860d0b792aabed123ad062f80ab7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:21 -0400 Subject: [PATCH 372/924] New translations operating-graph-node.mdx (Vietnamese) --- website/pages/vi/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/vi/operating-graph-node.mdx b/website/pages/vi/operating-graph-node.mdx index 7112da586680..a600e22c0a05 100644 --- a/website/pages/vi/operating-graph-node.mdx +++ b/website/pages/vi/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| --- | --- | --- | --- | --- | -| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | -| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | -| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | +| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | +| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | +| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From 267bc2df83e9ba5ab8e03d452da3345ddaa496f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:22 -0400 Subject: [PATCH 373/924] New translations operating-graph-node.mdx (Marathi) --- website/pages/mr/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/mr/operating-graph-node.mdx b/website/pages/mr/operating-graph-node.mdx index fe9e6c5fb9f3..598d94037dae 100644 --- a/website/pages/mr/operating-graph-node.mdx +++ b/website/pages/mr/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **महत्त्वाचे**: पोर्ट सार्वजनिकपणे उघड करण्याबाबत सावधगिरी बाळगा - **प्रशासन पोर्ट** लॉक डाउन ठेवले पाहिजेत. यामध्ये ग्राफ नोड JSON-RPC एंडपॉइंटचा समावेश आहे. From 300c0696e3c0b1dccf2712431c4490e728e16316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:23 -0400 Subject: [PATCH 374/924] New translations operating-graph-node.mdx (Hindi) --- website/pages/hi/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/hi/operating-graph-node.mdx b/website/pages/hi/operating-graph-node.mdx index 5d53c0fe05a7..6dbe487e2a81 100644 --- a/website/pages/hi/operating-graph-node.mdx +++ b/website/pages/hi/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ जब यह चल रहा होता है तो ग्राफ़ नोड निम्नलिखित पोर्ट को उजागर करता है: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | -------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **महत्वपूर्ण**: बंदरगाहों को सार्वजनिक रूप से उजागर करने के बारे में सावधान रहें - **प्रशासन बंदरगाहों** को बंद रखा जाना चाहिए। इसमें ग्राफ़ नोड JSON-RPC समापन बिंदु शामिल है। From 95eb4b3cec196b352eb23ddce2bc4777176d55b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:24 -0400 Subject: [PATCH 375/924] New translations operating-graph-node.mdx (Yoruba) --- website/pages/yo/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/yo/operating-graph-node.mdx b/website/pages/yo/operating-graph-node.mdx index 4f0f856db111..a7dd15e7a84c 100644 --- a/website/pages/yo/operating-graph-node.mdx +++ b/website/pages/yo/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From c4dce55b5a5081332a8f80391020ae2387c5089f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:25 -0400 Subject: [PATCH 376/924] New translations glossary.mdx (Romanian) --- website/pages/ro/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ro/glossary.mdx b/website/pages/ro/glossary.mdx index ef24dc0178e0..cdd4e402240c 100644 --- a/website/pages/ro/glossary.mdx +++ b/website/pages/ro/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From ef3f6d897f343f32f2495eee42c3476d6158cead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:26 -0400 Subject: [PATCH 377/924] New translations glossary.mdx (French) --- website/pages/fr/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/fr/glossary.mdx b/website/pages/fr/glossary.mdx index ac4a6d3f3a63..2859336295c5 100644 --- a/website/pages/fr/glossary.mdx +++ b/website/pages/fr/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From d20041557d067a8db18e77bbf5d6a73c2053171c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:27 -0400 Subject: [PATCH 378/924] New translations glossary.mdx (Spanish) --- website/pages/es/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/es/glossary.mdx b/website/pages/es/glossary.mdx index 836a92c487c3..e77efc2a09b6 100644 --- a/website/pages/es/glossary.mdx +++ b/website/pages/es/glossary.mdx @@ -10,7 +10,7 @@ title: Glosario - **Endpoint**: Una URL que se puede utilizar para consultar un subgrafo. El endpoint de prueba para Subgraph Studio es `https://api.studio.thegraph.com/query///` y el endpoint de Graph Explorer es `https://gateway.thegraph.com/api//subgraphs/id/`. El endpoint de Graph Explorer se utiliza para consultar subgrafos en la red descentralizada de The Graph. -- **Subgrafo (Subgraph)**: Una API personalizada basada en datos de la blockchain que puede consultarse mediante [GraphQL](https://graphql.org/). Los developers pueden crear, deployar y publicar subgrafos en la red descentralizada de The Graph. Luego, los Indexadores pueden empezar a indexar los subgrafos para que los consumidores de subgrafos puedan consultarlos. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From 05749985ed16515d6cfbef1de770cd7d1b12abee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:28 -0400 Subject: [PATCH 379/924] New translations glossary.mdx (Arabic) --- website/pages/ar/glossary.mdx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/ar/glossary.mdx b/website/pages/ar/glossary.mdx index ef24dc0178e0..b426a4b74d06 100644 --- a/website/pages/ar/glossary.mdx +++ b/website/pages/ar/glossary.mdx @@ -1,24 +1,24 @@ --- -title: Glossary +title: قائمة المصطلحات --- -- **The Graph**: A decentralized protocol for indexing and querying data. +- **الغراف**: بروتوكول لامركزي لفهرسة البيانات والاستعلام عنها. -- **Query**: A request for data. In the case of The Graph, a query is a request for data from a subgraph that will be answered by an Indexer. +- **الاستعلام**: طلب للحصول على البيانات. في حالة الغراف، الاستعلام هو طلب للحصول على البيانات من غراف فرعي ما وسيتم الرد عليه بواسطة مفهرس ما. -- **GraphQL**: A query language for APIs and a runtime for fulfilling those queries with your existing data. The Graph uses GraphQL to query subgraphs. +- GraphQL : لغة استعلام لواجهات برمجة التطبيقات (APIs) يستخدم GraphQL للاستعلام عن السوبغرافات. -- **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. +- **نقطة النهاية (Endpoint)**: عنوان URL يمكن استخدامه للاستعلام عن سبغراف. نقطة الاختبار لـ سبغراف استوديو هي: `https://api.studio.thegraph.com/query///` ونقطة نهاية مستكشف الغراف هي: `https://gateway.thegraph.com/api//subgraphs/id/` تُستخدم نقطة نهاية مستكشف الغراف للاستعلام عن سبغرافات على شبكة الغراف اللامركزية. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **غراف فرعي (Subgraph)**: واجهة برمجة تطبيقات مفتوحة تستخلص البيانات من سلسلة الكتل، ومعالجتها، وتخزينها ليكون من السهل الاستعلام عنها من خلال لغة استعلام GraphQL. يمكن للمطورين بناء ونشر الغرافات الفرعية على شبكة الغراف اللامركزية. بعد ذلك، يمكن للمفهرسين البدء في فهرسة الغرافات الفرعية لتكون متاحة للاستعلام من قبل أي كان. -- **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. +- **الخدمة المستضافة (Hosted Service)**: هي خدمة مؤقتة تعمل كبنية تحتية لبناء واستعلام الغرافات الفرعية، حيث تقوم شبكة الغراف اللامركزية بتحسين تكاليف الخدمة وجودة الخدمة وتجربة المطور. - **Indexers**: Network participants that run indexing nodes to index data from blockchains and serve GraphQL queries. - **Indexer Revenue Streams**: Indexers are rewarded in GRT with two components: query fee rebates and indexing rewards. - 1. **Query Fee Rebates**: Payments from subgraph consumers for serving queries on the network. + 1. **خصومات رسوم الاستعلام**: هي المدفوعات التي يتلقاها مستهلكو الغرافات الفرعية مقابل تقديم الاستعلامات على الشبكة. 2. **Indexing Rewards**: The rewards that Indexers receive for indexing subgraphs. Indexing rewards are generated via new issuance of 3% GRT annually. @@ -34,13 +34,13 @@ title: Glossary - **Curation Tax**: A 1% fee paid by Curators when they signal GRT on subgraphs. The GRT used to pay the fee is burned. -- **Subgraph Consumer**: Any application or user that queries a subgraph. +- **مستهلك الغراف الفرعي**: أي تطبيق أو مستخدم يستعلم عن غراف فرعي معين. -- **Subgraph Developer**: A developer who builds and deploys a subgraph to The Graph's decentralized network. +- **مطور السوبغراف**: هو المطور الذي يقوم ببناء ونشر السوبغراف على شبكة الغراف اللامركزية. -- **Subgraph Manifest**: A JSON file that describes the subgraph's GraphQL schema, data sources, and other metadata. [Here](https://ipfs.io/ipfs/QmVQdzeGdPUiLiACeqXRpKAYpyj8Z1yfWLMUq7A7WundUf) is an example. +- **وصف السبغراف (Subgraph Manifest) **: هو ملف JSON يصف مخطط GraphQL للسبغراف ومصادر البيانات والبيانات الوصفية الأخرى. [هنا](https://ipfs.io/ipfs/QmVQdzeGdPUiLiACeqXRpKAYpyj8Z1yfWLMUq7A7WundUf) مثال. -- **Epoch**: A unit of time within the network. Currently, one epoch is 6,646 blocks or approximately 1 day. +- **الحقبة (Epoch)**: وحدة زمنية داخل الشبكة. حاليًا، تتألف الحقبة من 6,646 كتلة أو تقريبًا يوم واحد. - **Allocation**: An Indexer can allocate their total GRT stake (including Delegators' stake) towards subgraphs that have been published on The Graph's decentralized network. Allocations exist in one of four phases. From 36d7d5193bccb9f9fd376967053a5c829770f062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:29 -0400 Subject: [PATCH 380/924] New translations glossary.mdx (Czech) --- website/pages/cs/glossary.mdx | 82 +++++++++++++++++------------------ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/website/pages/cs/glossary.mdx b/website/pages/cs/glossary.mdx index ef24dc0178e0..0de3579e3a9f 100644 --- a/website/pages/cs/glossary.mdx +++ b/website/pages/cs/glossary.mdx @@ -1,85 +1,85 @@ --- -title: Glossary +title: Glosář --- -- **The Graph**: A decentralized protocol for indexing and querying data. +- **Graf**: Decentralizovaný protokol pro indexování a dotazování dat. -- **Query**: A request for data. In the case of The Graph, a query is a request for data from a subgraph that will be answered by an Indexer. +- **Dotaz**: Požadavek na data. V případě Grafu je dotaz požadavek na data z podgrafu, na který odpoví indexer. -- **GraphQL**: A query language for APIs and a runtime for fulfilling those queries with your existing data. The Graph uses GraphQL to query subgraphs. +- **GraphQL**: Je to dotazovací jazyk pro API a runtime pro plnění těchto dotazů s existujícími daty. Graf používá GraphQL k dotazování dílčích grafů. -- **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. +- **Koncový bod**: URL, které lze použít k dotazu na podgraf. Testovací koncový bod pro Podgraf Studio je `https://api.studio.thegraph.com/query///` a koncový bod Graf Exploreru je `https://gateway.thegraph.com/api//subgraphs/id/`. Koncový bod Graf Explorer se používá k dotazování podgrafů v decentralizované síti Graf. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Podgraf**: Otevřené API, které získává data z blockchainu, zpracovává je a ukládá tak, aby bylo možné se na ně snadno dotazovat prostřednictvím GraphQL. Vývojáři mohou vytvářet, nasazovat a publikovat podgrafy v síti Graf Poté mohou indexátoři začít indexovat podgrafy, aby je kdokoli mohl vyhledávat. -- **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. +- **Hostovaná služba**: Dočasná lešenářská služba pro vytváření a dotazování podgrafů v době, kdy decentralizovaná síť Graf dozrává v oblasti nákladů na služby, kvality služeb a zkušeností vývojářů. -- **Indexers**: Network participants that run indexing nodes to index data from blockchains and serve GraphQL queries. +- **Indexery**: Účastníci sítě, kteří provozují indexovací uzly pro indexování dat z blockchainů a obsluhu dotazů GraphQL. -- **Indexer Revenue Streams**: Indexers are rewarded in GRT with two components: query fee rebates and indexing rewards. +- **Příjmy indexátorů**: Indexátoři jsou v GRT odměňováni dvěma složkami: slevami z poplatků za dotazy a odměnami za indexování. - 1. **Query Fee Rebates**: Payments from subgraph consumers for serving queries on the network. + 1. **Vrácení poplatků za dotaz**: Platby od konzumentů podgrafů za obsluhu dotazů v síti. - 2. **Indexing Rewards**: The rewards that Indexers receive for indexing subgraphs. Indexing rewards are generated via new issuance of 3% GRT annually. + 2. **Odměny za indexování**: Odměny, které indexátory obdrží za indexování podgrafů. Odměny za indexování jsou generovány prostřednictvím nové emise 3% GRT ročně. -- **Indexer's Self Stake**: The amount of GRT that Indexers stake to participate in the decentralized network. The minimum is 100,000 GRT, and there is no upper limit. +- **Vlastní vklad indexátora**: Částka GRT, kterou indexátoři vkládají, aby se mohli účastnit decentralizované sítě. Minimum je 100,000 GRT a horní hranice není stanovena. -- **Upgrade Indexer**: A temporary Indexer designed to act as a fallback for subgraph queries not serviced by other Indexers on the network. It ensures a seamless transition for subgraphs upgrading from the hosted service by readily serving their queries upon being published. The upgrade Indexer is not competitive with other Indexers. It supports numerous blockchains that were previously only available on the hosted service. +- **Upgrade indexeru**: Dočasný indexer určený jako záložní pro dotazy na podgrafy, které nejsou obsluhovány jinými indexery v síti. Zajišťuje bezproblémový přechod pro podgrafy aktualizované z hostované služby tím, že po zveřejnění snadno obslouží jejich dotazy. Upgrade Indexer není konkurenční vůči ostatním Indexerům. Podporuje řadu blokových řetězců, které byly dříve dostupné pouze v hostované službě. -- **Delegators**: Network participants who own GRT and delegate their GRT to Indexers. This allows Indexers to increase their stake in subgraphs on the network. In return, Delegators receive a portion of the Indexing Rewards that Indexers receive for processing subgraphs. +- **Delegátoři**: Účastníci sítě, kteří vlastní GRT a delegují své GRT na indexátory. To umožňuje Indexerům zvýšit svůj podíl v podgrafech v síti. Delegáti na oplátku dostávají část odměn za indexování, které indexátoři dostávají za zpracování podgrafů. -- **Delegation Tax**: A 0.5% fee paid by Delegators when they delegate GRT to Indexers. The GRT used to pay the fee is burned. +- **Delegační daň**: 0.5% poplatek, který platí delegáti, když delegují GRT na indexátory. GRT použitý k úhradě poplatku se spálí. -- **Curators**: Network participants that identify high-quality subgraphs, and “curate” them (i.e., signal GRT on them) in exchange for curation shares. When Indexers claim query fees on a subgraph, 10% is distributed to the Curators of that subgraph. Indexers earn indexing rewards proportional to the signal on a subgraph. We see a correlation between the amount of GRT signalled and the number of Indexers indexing a subgraph. +- **Kurátoři**: Účastníci sítě, kteří identifikují vysoce kvalitní podgrafy a "kurátorují" je (tj. signalizují na nich GRT) výměnou za kurátorské podíly. Když indexátoři požadují poplatky za dotaz na podgraf, 10% se rozdělí kurátorům tohoto podgrafu. Indexátoři získávají indexační odměny úměrné signálu na podgrafu. Vidíme korelaci mezi množstvím signalizovaných GRT a počtem indexátorů indexujících podgraf. -- **Curation Tax**: A 1% fee paid by Curators when they signal GRT on subgraphs. The GRT used to pay the fee is burned. +- **Curation Tax**: Kurátoři platí 1% poplatek, když signalizují GRT na podgraf GRT použitý k zaplacení poplatku se spálí. -- **Subgraph Consumer**: Any application or user that queries a subgraph. +- **Podgraf Spotřebitel**: Jakákoli aplikace nebo uživatel, který se dotazuje na podgraf. -- **Subgraph Developer**: A developer who builds and deploys a subgraph to The Graph's decentralized network. +- **Vývojář podgrafů**: Vývojář, který vytváří a nasazuje subgraf do decentralizované sítě Grafu. -- **Subgraph Manifest**: A JSON file that describes the subgraph's GraphQL schema, data sources, and other metadata. [Here](https://ipfs.io/ipfs/QmVQdzeGdPUiLiACeqXRpKAYpyj8Z1yfWLMUq7A7WundUf) is an example. +- **Manifest podgrafů**: Soubor JSON, který popisuje schéma podgrafu v GraphQL, zdroje dat a další metadata. [Tady](https://ipfs.io/ipfs/QmVQdzeGdPUiLiACeqXRpKAYpyj8Z1yfWLMUq7A7WundUf) je příklad. -- **Epoch**: A unit of time within the network. Currently, one epoch is 6,646 blocks or approximately 1 day. +- **Epoch**: Časová jednotka v rámci sítě. V současné době je jedna epocha 6,646 bloků nebo přibližně 1 den. -- **Allocation**: An Indexer can allocate their total GRT stake (including Delegators' stake) towards subgraphs that have been published on The Graph's decentralized network. Allocations exist in one of four phases. +- **Přidělení**: Indexer může alokovat svůj celkový podíl GRT (včetně podílu delegátů) na podgrafy, které byly zveřejněny v decentralizované síti Graf. Alokace existují v jedné ze čtyř fází. - 1. **Active**: An allocation is considered active when it is created on-chain. This is called opening an allocation, and indicates to the network that the Indexer is actively indexing and serving queries for a particular subgraph. Active allocations accrue indexing rewards proportional to the signal on the subgraph, and the amount of GRT allocated. + 1. **Aktivní**: Alokace je považována za aktivní, když je vytvořena v řetězci. Tomu se říká otevření alokace a signalizuje síti, že indexátor aktivně indexuje a obsluhuje dotazy pro daný podgraf. Aktivní alokace získávají odměny za indexování úměrné signálu na podgrafu a množství alokovaného GRT. - 2. **Closed**: An Indexer may claim the accrued indexing rewards on a given subgraph by submitting a recent, and valid, Proof of Indexing (POI). This is known as closing an allocation. An allocation must have been open for a minimum of one epoch before it can be closed. The maximum allocation period is 28 epochs. If an indexer leaves an allocation open beyond 28 epochs, it is known as a stale allocation. When an allocation is in the **Closed** state, a Fisherman can still open a dispute to challenge an Indexer for serving false data. + 2. **Zavřeno**: Indexátor si může nárokovat odměny za indexaci daného podgrafu předložením aktuálního a platného dokladu o indexaci (POI). Tomuto postupu se říká uzavření přídělu. Alokace musí být otevřena minimálně jednu epochu, aby mohla být uzavřena. Maximální doba přidělení je 28 epoch. Pokud indexátor ponechá alokaci otevřenou déle než 28 epoch, je tato alokace označována jako zastaralá. Když je alokace ve stavu **uzavřeno**, může rybář stále otevřít spor a napadnout indexátor za podávání falešných dat. - **Subgraph Studio**: A powerful dapp for building, deploying, and publishing subgraphs. -- **Fishermen**: A role within The Graph Network held by participants who monitor the accuracy and integrity of data served by Indexers. When a Fisherman identifies a query response or a POI they believe to be incorrect, they can initiate a dispute against the Indexer. If the dispute rules in favor of the Fisherman, the Indexer is slashed. Specifically, the Indexer will lose 2.5% of their self-stake of GRT. Of this amount, 50% is awarded to the Fisherman as a bounty for their vigilance, and the remaining 50% is removed from circulation (burned). This mechanism is designed to encourage Fishermen to help maintain the reliability of the network by ensuring that Indexers are held accountable for the data they provide. +- **Rybáři**: Úloha v rámci sítě Grafu, kterou zastávají účastníci, kteří sledují přesnost a integritu dat poskytovaných indexátory. Pokud Rybář identifikuje odpověď na dotaz nebo POI, o které se domnívá, že je nesprávná, může iniciovat spor s Indexátorem. Pokud spor rozhodne ve prospěch Rybáře, je Indexátor vyřazen. Konkrétně indexátor přijde o 2.5 % svého vlastního podílu na GRT. Z této částky je 50% přiznáno Rybáři jako odměna za jeho bdělost a zbývajících 50% je staženo z oběhu (spáleno). Tento mechanismus je navržen tak, aby Rybáře motivoval k tomu, aby pomáhali udržovat spolehlivost sítě tím, že zajistí, aby Indexátoři nesli odpovědnost za data, která poskytují. -- **Arbitrators**: Arbitrators are network participants appointed through a governance process. The role of the Arbitrator is to decide the outcome of indexing and query disputes. Their goal is to maximize the utility and reliability of The Graph Network. +- **Rozhodčí**: Rozhodci jsou účastníci sítě jmenovaní v rámci procesu řízení. Úkolem arbitra je rozhodovat o výsledku sporů týkajících se indexace a dotazů. Jejich cílem je maximalizovat užitečnost a spolehlivost sítě Graf. -- **Slashing**: Indexers can have their self-staked GRT slashed for providing an incorrect POI or for serving inaccurate data. or for serving inaccurate data. The slashing percentage is a protocol parameter currently set to 2.5% of an Indexer's self stake. 50% of the slashed GRT goes to the Fisherman that disputed the inaccurate data or incorrect POI. The other 50% is burned. +- **Slashing**: Indexerům může být sníženo jejich vlastní GRT za poskytnutí nesprávného POI nebo za poskytnutí nepřesných dat. nebo za poskytnutí nepřesných dat. Procento slashingu je parametr protokolu, který je v současné době nastaven na 2.5 % vlastního podílu indexátora. 50% z kráceného GRT připadne rybáři, který nepřesná data nebo nesprávné POI zpochybnil. Zbývajících 50% se spálí. -- **Indexing Rewards**: The rewards that Indexers receive for indexing subgraphs. Indexing rewards are distributed in GRT. +- **Odměny za indexování**: Odměny, které indexátory obdrží za indexování podgrafů. Odměny za indexování se rozdělují v GRT. -- **Delegation Rewards**: The rewards that Delegators receive for delegating GRT to Indexers. Delegation rewards are distributed in GRT. +- **Odměny za delegování**: Odměny, které delegáti obdrží za delegování GRT na indexátory. Odměny za delegování se rozdělují v GRT. -- **GRT**: The Graph's work utility token. GRT provides economic incentives to network participants for contributing to the network. +- **GRT**: Token pracovního nástroje Grafu. GRT poskytuje účastníkům sítě ekonomické pobídky za přispívání do sítě. -- **POI or Proof of Indexing**: When an Indexer closes their allocation and wants to claim their accrued indexing rewards on a given subgraph, they must provide a valid and recent Proof of Indexing (POI). Fishermen may dispute the POI provided by an Indexer. A dispute resolved in the Fisherman's favor will result in slashing of the Indexer. +- **POI nebo Doklad o indexování**: Když indexátor uzavře svůj příděl a chce si nárokovat své naběhlé odměny za indexování na daném podgrafu, musí předložit platný a aktuální doklad o indexování (POI). Rybáři mohou POI poskytnuté indexátorem zpochybnit. Spor vyřešený ve prospěch lovce bude mít za následek snížení indexátoru. -- **Graph Node**: Graph Node is the component which indexes subgraphs, and makes the resulting data available to query via a GraphQL API. As such it is central to the indexer stack, and correct operation of Graph Node is crucial to running a successful indexer. +- **Uzel grafu**: Uzel grafu je komponenta, která indexuje podgrafy a zpřístupňuje výsledná data pro dotazování prostřednictvím rozhraní GraphQL API. Jako takový je ústředním prvkem zásobníku indexátoru a správná činnost Uzel grafu je pro úspěšný provoz indexátoru klíčová. -- **Indexer agent**: The Indexer agent is part of the indexer stack. It facilitates the Indexer's interactions on-chain, including registering on the network, managing subgraph deployments to its Graph Node(s), and managing allocations. +- **Agent indexátoru**: Agent indexeru je součástí zásobníku indexeru. Usnadňuje interakce indexeru v řetězci, včetně registrace v síti, správy rozmístění podgrafů do jeho grafových uzlů a správy alokací. -- **The Graph Client**: A library for building GraphQL-based dapps in a decentralized way. +- **Klient grafu**: Knihovna pro decentralizované vytváření dapps na bázi GraphQL. -- **Graph Explorer**: A dapp designed for network participants to explore subgraphs and interact with the protocol. +- **Průzkumník grafů**: dapp určená pro účastníky sítě k prozkoumávání podgrafů a interakci s protokolem. -- **Graph CLI**: A command line interface tool for building and deploying to The Graph. +- **Graf CLI**: Nástroj rozhraní příkazového řádku pro vytváření a nasazování do Grapfu. -- **Cooldown Period**: The time remaining until an Indexer who changed their delegation parameters can do so again. +- **Období vychladnutí**: Doba, která zbývá do doby, než indexátor, který změnil své parametry delegování, může tuto změnu provést znovu. -- **L2 Transfer Tools**: Smart contracts and UI that enable network participants to transfer network related assets from Ethereum mainnet to Arbitrum One. Network participants can transfer delegated GRT, subgraphs, curation shares, and Indexer's self stake. +- **Nástroje pro přenos L2**: Chytré smlouvy a UI, které umožňují účastníkům sítě převádět aktiva související se sítí z mainnetu Ethereum do Arbitrum One. Účastníci sítě mohou převádět delegované GRT, podgrafy, kurátorské podíly a vlastní podíl Indexera. -- **_Upgrading_ a subgraph to The Graph Network**: The process of moving a subgraph from the hosted service to The Graph Network. +- **_Vylepšit_ podgrafu do Sítě grafů**: Proces přesunu podgrafu z hostované služby do Sítě grafů. -- **_Updating_ a subgraph**: The process of releasing a new subgraph version with updates to the subgraph's manifest, schema, or mappings. +- **_Aktualizace_ podgrafu**: Proces vydání nové verze podgrafu s aktualizacemi manifestu, schématu nebo mapování podgrafu. -- **Migrating**: The process of curation shares moving from an old version of a subgraph to a new version of a subgraph (e.g. when v0.0.1 is updated to v0.0.2). +- **Migrace**: Proces sdílení kurátorů, při kterém se přechází ze staré verze podgrafu na novou verzi podgrafu (např. při aktualizaci verze v0.0.1 na verzi v0.0.2). From eb205d5d66517ec203cffa77ef72bedddc930243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:30 -0400 Subject: [PATCH 381/924] New translations glossary.mdx (German) --- website/pages/de/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/de/glossary.mdx b/website/pages/de/glossary.mdx index ef24dc0178e0..cdd4e402240c 100644 --- a/website/pages/de/glossary.mdx +++ b/website/pages/de/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From 0af48d7e666c1192508bb1a41de68f13ccec7b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:31 -0400 Subject: [PATCH 382/924] New translations glossary.mdx (Italian) --- website/pages/it/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/it/glossary.mdx b/website/pages/it/glossary.mdx index ef24dc0178e0..cdd4e402240c 100644 --- a/website/pages/it/glossary.mdx +++ b/website/pages/it/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From ab08b88ca772670e7c166583576d327a1e865a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:32 -0400 Subject: [PATCH 383/924] New translations glossary.mdx (Japanese) --- website/pages/ja/glossary.mdx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/pages/ja/glossary.mdx b/website/pages/ja/glossary.mdx index 36fe211e3c6c..abee880b8eb3 100644 --- a/website/pages/ja/glossary.mdx +++ b/website/pages/ja/glossary.mdx @@ -10,9 +10,9 @@ title: 用語集 - **エンドポイント**: サブグラフのクエリに使用できる URL。 Subgraph Studio のテスト エンドポイントは `https://api.studio.thegraph.com/query///` であり、Graph Explorer エンドポイントは `https: //gateway.thegraph.com/api//subgraphs/id/`. Graph Explorer エンドポイントは、The Graph の分散型ネットワーク上のサブグラフをクエリするために使用されます。 -- **Subgraph**:[GraphQL](https://graphql.org/)を使ってクエリできる、ブロックチェーンデータ上に構築されたカスタムAPIです。開発者は、The Graphの分散型ネットワークにサブグラフを構築、デプロイ、公開することができます。その後、インデクサーはサブグラフのインデックス作成を開始し、サブグラフコンシューマーがクエリできるようにすることができます。 +- **サブグラフ**: ブロックチェーンからデータを抽出し、処理し、GraphQLで簡単にクエリできるように保存するオープンAPIです。開発者はサブグラフを構築し、デプロイし、グラフネットワークに公開することができます。その後、インデクサーはサブグラフのインデックス作成を開始して、誰でもクエリできるようにします。 -- **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. +- **ホスティングサービス**: The Graphの分散型ネットワークが、サービスコスト、サービス品質、開発者エクスペリエンスを成熟させつつある中、サブグラフの構築とクエリのための一時的な足場となるサービスです。 - **インデクサー**:ブロックチェーンからデータをインデックスし、GraphQLクエリを提供するためにインデックスノードを実行するネットワーク参加者です。 @@ -24,7 +24,7 @@ title: 用語集 - **インデクサーのセルフステーク**:インデクサーが分散型ネットワークに参加するためにステークするGRTの金額です。最低額は100,000GRTで、上限はありません。 -- **Upgrade Indexer**: A temporary Indexer designed to act as a fallback for subgraph queries not serviced by other Indexers on the network. It ensures a seamless transition for subgraphs upgrading from the hosted service by readily serving their queries upon being published. The upgrade Indexer is not competitive with other Indexers. It supports numerous blockchains that were previously only available on the hosted service. +- **アップグレード・インデクサー**: ネットワーク上の他のIndexerによってサービスされないサブグラフのクエリのフォールバックとして機能するように設計された一時的なインデクサーです。ホスティングサービスからアップグレードされたサブグラフが、公開されたときにそのクエリに対応することで、シームレスな移行を保証します。アップグレードインデクサーは他のインデクサーと競合しません。以前はホスティングサービスでのみ利用可能だった多数のブロックチェーンをサポートしています。 - **デリゲーター**:GRTを所有し、そのGRTをインデクサーに委任するネットワーク参加者です。これにより、インデクサーはネットワーク上のサブグラフへの出資比率を高めることができます。デリゲーターは、インデクサーがサブグラフを処理する際に受け取るインデクサー報酬の一部を受け取ります。 @@ -40,21 +40,21 @@ title: 用語集 - **Subgraph Manifest**:サブグラフの GraphQL スキーマ、データ ソース、およびその他のメタデータを記述する JSON ファイルです。[こちら](https://ipfs.io/ipfs/QmVQdzeGdPUiLiACeqXRpKAYpyj8Z1yfWLMUq7A7WundUf)がその例です。 -- **Epoch**: A unit of time within the network. Currently, one epoch is 6,646 blocks or approximately 1 day. +- **エポック**: ネットワーク内の時間の単位。現在、1エポックは6,646ブロック、または約1日です。 - **アロケーション**:インデクサは、GRTのステーク(デリゲータのステークを含む)を、The Graphの分散型ネットワークで公開されているサブグラフに割り当てることができます。アロケーションは、4つの段階のうちの1つです。 1. **アクティブ**:アロケーションは、オンチェーンで作成されたときにアクティブとみなされます。これはアロケーションを開くと呼ばれ、インデクサーが特定のサブグラフのために積極的にインデックスを作成し、クエリを提供していることをネットワークに示しています。アクティブなアロケーションは、サブグラフ上のシグナルと割り当てられたGRTの量に比例してインデックス作成報酬を発生させます。 - 2. **Closed**: An Indexer may claim the accrued indexing rewards on a given subgraph by submitting a recent, and valid, Proof of Indexing (POI). This is known as closing an allocation. An allocation must have been open for a minimum of one epoch before it can be closed. The maximum allocation period is 28 epochs. If an indexer leaves an allocation open beyond 28 epochs, it is known as a stale allocation. When an allocation is in the **Closed** state, a Fisherman can still open a dispute to challenge an Indexer for serving false data. + 2. **クローズ**: インデックス作成者は、最近の有効なインデックス証明(POI) を提出することで、 与えられたサブグラフに発生したインデックス報酬を要求することができる。これは割り当てを終了することとして知られている。割り当てを閉じるには、最低1エポック開いていなければなりません。最大割当期間は28エポックです。もしインデクサが28エポックを超えて割り当てを開いたままにしておくと、その割り当ては古くなった割り当てとして知られています。割り当てが**クローズ**状態にあるときでも、 フィッシャーマンは、虚偽のデータを提供したとして、 インデクサーに異議を申し立てるために紛争を開くことができます。 - **Subgraph Studio**:サブグラフの構築、デプロイ、公開のための強力なDAPです。 -- **Fishermen**: A role within The Graph Network held by participants who monitor the accuracy and integrity of data served by Indexers. When a Fisherman identifies a query response or a POI they believe to be incorrect, they can initiate a dispute against the Indexer. If the dispute rules in favor of the Fisherman, the Indexer is slashed. Specifically, the Indexer will lose 2.5% of their self-stake of GRT. Of this amount, 50% is awarded to the Fisherman as a bounty for their vigilance, and the remaining 50% is removed from circulation (burned). This mechanism is designed to encourage Fishermen to help maintain the reliability of the network by ensuring that Indexers are held accountable for the data they provide. +- **フィッシャーマン**: The Graph Networkの中で、Indexersが提供するデータの正確性と完全性を監視する参加者が持つ役割。フィッシャーマンは、不正確であると思われるクエリ応答やPOIを特定した場合、インデクサに対して論争を開始することができる。もし紛争がフィッシャーマンに有利な裁定を下した場合、 インデックサーは切り捨てられます。具体的には、インデクサーのGRTの2.5%を失う。この額のうち、50%は警戒に対する報奨金としてフィッシャーマンに与えられ、残りの50%は流通から外される(燃やされる)。この仕組みは、インデクサーの提供するデータに対する責任を保証することで、ネットワークの信頼性維持に貢献するようフィッシャーマンを奨励するためのものです。 -- **Arbitrators**: Arbitrators are network participants appointed through a governance process. The role of the Arbitrator is to decide the outcome of indexing and query disputes. Their goal is to maximize the utility and reliability of The Graph Network. +- **アービトレーター(仲裁人)**: 仲裁人は、ガバナンスプロセスを通じて任命されるネットワーク参加者です。仲裁人の役割は、インデックス作成とクエリの論争の結果を決定することです。その目的は、グラフネットワークの実用性と信頼性を最大化することです。 -- **Slashing**: Indexers can have their self-staked GRT slashed for providing an incorrect POI or for serving inaccurate data. or for serving inaccurate data. The slashing percentage is a protocol parameter currently set to 2.5% of an Indexer's self stake. 50% of the slashed GRT goes to the Fisherman that disputed the inaccurate data or incorrect POI. The other 50% is burned. +- **スラッシング**: インデクサーは、不正確な POI を提供したり、不正確なデータを提供したりした場合に、 自己ステークの GRT をスラッシングされることがあります。スラッシングのパーセンテージはプロトコルのパラメータで、 現在はインデクサーのセルフステークの2.5%に設定されています。削減されたGRTの50%は、不正確なデータや不正確なPOIに異議を唱えたフィッシャーマンに支払われます。残りの50%はバーンされます。 - **インデックス作成報酬**:インデクサーがサブグラフのインデックス作成に対して受け取る報酬です。インデックス作成報酬はGRTで分配されます。 @@ -62,7 +62,7 @@ title: 用語集 - **GRT**: Graphのワークユーティリティトークン。GRTは、ネットワーク参加者にネットワークへの貢献に対する経済的インセンティブを提供します。 -- **POI or Proof of Indexing**: When an Indexer closes their allocation and wants to claim their accrued indexing rewards on a given subgraph, they must provide a valid and recent Proof of Indexing (POI). Fishermen may dispute the POI provided by an Indexer. A dispute resolved in the Fisherman's favor will result in slashing of the Indexer. +- **POIまたはインデックス証明**: インデクサーが割り当てを終了し、与えられたサブグラフについて発生したインデックス報酬を要求する場合、有効で最近のインデックスの証明(POI)を提出しなければなりません。フィッシャーマンは、インデクサーの提示した POI に異議を唱えることができます。フィッシャーマンに有利に解決された論争は、そのインデクサーのスラッシュに繋がります。 - **グラフノード**:Graph Nodeは、サブグラフにインデックスを付け、その結果得られたデータをGraphQL APIを介してクエリに利用できるようにするコンポーネントです。そのため、インデクサースタックの中心であり、グラフノードの正しい動作は、成功するインデクサを実行するために重要です。 @@ -76,10 +76,10 @@ title: 用語集 - **クールダウン期間**:デリゲーションパラメータを変更したインデクサが再度デリゲーションできるようになるまでの残り時間。 -- **L2 Transfer Tools**: Smart contracts and UI that enable network participants to transfer network related assets from Ethereum mainnet to Arbitrum One. Network participants can transfer delegated GRT, subgraphs, curation shares, and Indexer's self stake. +- **L2転送ツール**:ネットワーク参加者がイーサリアムメインネットからArbitrum Oneにネットワーク関連資産を転送できるようにするスマートコントラクトとUIです。ネットワーク参加者は、委任されたGRT、サブグラフ、キュレーションシェア、およびインデクサーのセルフステークを転送できます。 -- **サブグラフを Graph Network にアップグレードする**: サブグラフをホストされたサービスから Graph Network に移動するプロセス。 +- サブグラフを Graph Network に**_アップグレード_する**: サブグラフをホストされたサービスから Graph Network に移動するプロセス。 -- **サブグラフの*更新***: サブグラフのマニフェスト、スキーマ、または更新を含む新しいサブグラフ バージョンをリリースするプロセス。マッピング。 +- サブグラフ**の_更新_**: サブグラフのマニフェスト、スキーマ、または更新を含む新しいサブグラフ バージョンをリリースするプロセス。マッピング。 -- **Migrating**: The process of curation shares moving from an old version of a subgraph to a new version of a subgraph (e.g. when v0.0.1 is updated to v0.0.2). +- **移行**:サブグラフの古いバージョンから新しいバージョンに移行するキュレーション共有のプロセスです(例えば、v0.0.1がv0.0.2に更新される場合)。 From fff05ec1c02c6dd5be1f6123bb743d500b98b8b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:32 -0400 Subject: [PATCH 384/924] New translations glossary.mdx (Korean) --- website/pages/ko/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ko/glossary.mdx b/website/pages/ko/glossary.mdx index ef24dc0178e0..cdd4e402240c 100644 --- a/website/pages/ko/glossary.mdx +++ b/website/pages/ko/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From 30ce44ea50876925bbecb55b59c1fe1aa0d37a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:33 -0400 Subject: [PATCH 385/924] New translations glossary.mdx (Dutch) --- website/pages/nl/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/nl/glossary.mdx b/website/pages/nl/glossary.mdx index ef24dc0178e0..cdd4e402240c 100644 --- a/website/pages/nl/glossary.mdx +++ b/website/pages/nl/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From 515df1ca300fb19dd18f9268f36b40a43b61ee4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:34 -0400 Subject: [PATCH 386/924] New translations glossary.mdx (Polish) --- website/pages/pl/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pl/glossary.mdx b/website/pages/pl/glossary.mdx index ef24dc0178e0..cdd4e402240c 100644 --- a/website/pages/pl/glossary.mdx +++ b/website/pages/pl/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From 0fc908584fb40e0e11ccf5dfc627f8a3a8596a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:35 -0400 Subject: [PATCH 387/924] New translations glossary.mdx (Portuguese) --- website/pages/pt/glossary.mdx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/pt/glossary.mdx b/website/pages/pt/glossary.mdx index 8930e0e88efc..c94db7b95e0c 100644 --- a/website/pages/pt/glossary.mdx +++ b/website/pages/pt/glossary.mdx @@ -10,9 +10,9 @@ title: Glossário - **Endpoint** (ponto final): Um URL para consultar um subgraph. O endpoint de testes para o Subgraph Studio é `https://api.studio.thegraph.com/query///` e o endpoint do Graph Explorer é `https://gateway.thegraph.com/api//subgraphs/id/`. O endpoint do Graph Explorer é utilizado para consultar subgraphs na rede descentralizada do The Graph. -- **Subgraph**: Uma API personalizada construída com dados de blockchain, que pode ser consultada usando o [GraphQL](https://graphql.org/). Os programadores podem construir, lançar e editar subgraphs na rede descentralizada do The Graph. Depois, os Indexadores podem começar a indexar subgraphs para abri-los a queries por consumidores de subgraphs. +- **Subgraph**: Uma API aberta que extrai dados de uma blockchain, os processa e os armazena para que possem ser consultados com facilidade via GraphQL. Programadores podem construir e editar subgraphs à Graph Network. Depois, os Indexadores podem começar a indexar subgraphs para disponibilizá-los para queries por qualquer pessoa. -- **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. +- **Serviço hospedado**: Um suporte temporário para construir e consultar subgraphs, enquanto a rede descentralizada do The Graph amadurece o seu custo e qualidade de serviço e experiência de programação. - **Indexadores**: Participantes da rede que executam nodes de indexação para indexar dados de blockchains e servir consultas em GraphQL. @@ -24,7 +24,7 @@ title: Glossário - **Auto-Stake (Stake Próprio) do Indexador**: A quantia de GRT que os Indexadores usam para participar na rede descentralizada. A quantia mínima é 100.000 GRT, e não há limite máximo. -- **Upgrade Indexer**: A temporary Indexer designed to act as a fallback for subgraph queries not serviced by other Indexers on the network. It ensures a seamless transition for subgraphs upgrading from the hosted service by readily serving their queries upon being published. The upgrade Indexer is not competitive with other Indexers. It supports numerous blockchains that were previously only available on the hosted service. +- **Indexador de Atualização**: Um Indexador temporário feito para agir como uma reserva para queries de subgraphs não servidos por outros Indexadores na rede. Ele garante uma transição suave para subgraphs que atualizam do serviço hospedado, para servir os seus queries ao ser editado. O Indexador de atualização não é competitivo com outros Indexadores. Ele apoia várias blockchains que antes estavam disponíveis apenas no serviço hospedado. - **Delegantes**: Participantes na rede que são titulares de GRT, e delegam o seu GRT aos Indexadores. Isto permite aos Indexadores aumentar o seu stake nos subgraphs da rede. Em troca, os Delegantes recebem uma porção das Recompensas de Indexação que os Indexadores recebem por processar subgraphs. @@ -40,21 +40,21 @@ title: Glossário - **Manifest de Subgraph**: Um arquivo JSON que descreve o schema GraphQL, as fontes de dados, e outros metadados. [Veja um exemplo](https://ipfs.io/ipfs/QmVQdzeGdPUiLiACeqXRpKAYpyj8Z1yfWLMUq7A7WundUf). -- **Epoch**: A unit of time within the network. Currently, one epoch is 6,646 blocks or approximately 1 day. +- **Epoch**: Uma unidade de tempo na rede. Um epoch atualmente dura 6.646 blocos, ou cerca de um dia. - **Alocação**: Um indexador pode alocar o seu stake total em GRT (incluindo o stake dos Delegantes) em subgraphs editados na rede descentralizada do The Graph. As alocações existem em uma de quatro fases. 1. **Ativa**: Uma alocação é considerada ativa quando é criada on-chain. Isto se chama abrir de uma alocação, e indica à rede que o Indexador está a indexar e servir consultas ativamente para um subgraph particular. Alocações ativas acumulam recompensas de indexação proporcionais ao sinal no subgraph, e à quantidade de GRT alocada. - 2. **Closed**: An Indexer may claim the accrued indexing rewards on a given subgraph by submitting a recent, and valid, Proof of Indexing (POI). This is known as closing an allocation. An allocation must have been open for a minimum of one epoch before it can be closed. The maximum allocation period is 28 epochs. If an indexer leaves an allocation open beyond 28 epochs, it is known as a stale allocation. When an allocation is in the **Closed** state, a Fisherman can still open a dispute to challenge an Indexer for serving false data. + 2. **Fechada**: Um Indexador pode resgatar as recompensas acumuladas em um subgraph selecionado ao enviar uma Prova de Indexação (POI) recente e válida. Isto se chama "fechar uma alocação". Uma alocação deve ter ficado aberta por, no mínimo, um epoch antes que possa ser fechada. O período máximo de alocação é de 28 epochs; se um indexador deixar uma alocação aberta por mais que isso, ela se torna uma alocação obsoleta. Quando uma alocação está **Fechada**, um Pescador ainda pode abrir uma disputa contra um Indexador por servir dados falsos. - **Subgraph Studio**: um dApp poderoso para a construção, lançamento e edição de subgraphs. -- **Fishermen**: A role within The Graph Network held by participants who monitor the accuracy and integrity of data served by Indexers. When a Fisherman identifies a query response or a POI they believe to be incorrect, they can initiate a dispute against the Indexer. If the dispute rules in favor of the Fisherman, the Indexer is slashed. Specifically, the Indexer will lose 2.5% of their self-stake of GRT. Of this amount, 50% is awarded to the Fisherman as a bounty for their vigilance, and the remaining 50% is removed from circulation (burned). This mechanism is designed to encourage Fishermen to help maintain the reliability of the network by ensuring that Indexers are held accountable for the data they provide. +- **Pescadores**: Um papel na Graph Network cumprido por participantes que monitoram a precisão e integridade dos dados servidos pelos Indexadores. Quando um Pescador identifica uma resposta de query ou uma POI que acreditam ser incorreta, ele pode iniciar uma disputa contra o Indexador. Se a disputa der um veredito a favor do Pescador, o Indexador é cortado, ou seja, perderá 2.5% do seu auto-stake de GRT. Desta quantidade, 50% é dado ao Pescador como recompensa pela sua vigilância, e os 50% restantes são retirados da circulação (queimados). Este mecanismo é desenhado para encorajar Pescadores a ajudar a manter a confiança na rede ao garantir que Indexadores sejam responsabilizados pelos dados que providenciam. -- **Arbitrators**: Arbitrators are network participants appointed through a governance process. The role of the Arbitrator is to decide the outcome of indexing and query disputes. Their goal is to maximize the utility and reliability of The Graph Network. +- **Árbitros**: Participantes da rede apontados por um processo de governança. O papel do Árbitro é decidir o resultado de disputas de indexação e consultas, e a sua meta é maximizar a utilidade e confiança da Graph Network. -- **Slashing**: Indexers can have their self-staked GRT slashed for providing an incorrect POI or for serving inaccurate data. or for serving inaccurate data. The slashing percentage is a protocol parameter currently set to 2.5% of an Indexer's self stake. 50% of the slashed GRT goes to the Fisherman that disputed the inaccurate data or incorrect POI. The other 50% is burned. +- **Corte**: Os Indexadores podem tomar cortes em seu GRT em auto-stake por fornecer uma prova de indexação (POI) incorreta ou por servir dados imprecisos. A porcentagem de corte é um parâmetro do protocolo, atualmente configurado em 2.5% do auto-stake de um Indexador. 50% do GRT cortado vai ao Pescador que disputou os dados ou POI incorretos. Os outros 50% são queimados. - **Recompensas de Indexação**: As recompensas que os Indexadores recebem por indexar subgraphs, distribuídas em GRT. @@ -62,7 +62,7 @@ title: Glossário - **GRT**: O token de utilidade do The Graph, que oferece incentivos económicos a participantes da rede por contribuir. -- **POI or Proof of Indexing**: When an Indexer closes their allocation and wants to claim their accrued indexing rewards on a given subgraph, they must provide a valid and recent Proof of Indexing (POI). Fishermen may dispute the POI provided by an Indexer. A dispute resolved in the Fisherman's favor will result in slashing of the Indexer. +- **POI ou Prova de Indexação**: Quando um Indexador fecha a sua alocação e quer reivindicar as suas recompensas de indexação acumuladas em um certo subgraph, ele deve providenciar uma Prova de Indexação (POI) válida e recente. Os Pescadores podem disputar a POI providenciada por um Indexador; disputas resolvidas a favor do Pescador causam um corte para o Indexador. - **Graph Node**: O componente que indexa subgraphs e disponibiliza os dados resultantes abertos a queries através de uma API GraphQL. Assim ele é essencial ao stack de indexadores, e operações corretas de um Graph Node são cruciais para executar um indexador com êxito. @@ -76,10 +76,10 @@ title: Glossário - **Período de Tempo de Recarga**: O tempo restante até que um Indexador que mudou os seus parâmetros de delegação possa fazê-lo novamente. -- **L2 Transfer Tools**: Smart contracts and UI that enable network participants to transfer network related assets from Ethereum mainnet to Arbitrum One. Network participants can transfer delegated GRT, subgraphs, curation shares, and Indexer's self stake. +- **Ferramentas de Transferência para L2**: Contratos inteligentes e interfaces que permitem que os participantes na rede transfiram ativos relacionados à rede da mainnet da Ethereum ao Arbitrum One. Os participantes podem transferir GRT delegado, subgraphs, ações de curadoria, e o autostake do Indexador. - **_Atualização_ de um subgraph à Graph Network**: O processo de migrar um subgraph do serviço hospedado à Graph Network. - **_Atualização_ de um subgraph**: O processo de lançar uma nova versão de subgraph com atualizações ao manifest, schema e mapeamentos do subgraph. -- **Migrating**: The process of curation shares moving from an old version of a subgraph to a new version of a subgraph (e.g. when v0.0.1 is updated to v0.0.2). +- **Migração**: O processo de movimentar ações de curadoria da versão antiga de um subgraph a uma versão nova de um subgraph (por ex., quando a v.0.0.1 é atualizada à v.0.0.2). From 6e1389ca3ad5bcec5c95ebf8e579e04b05105217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:36 -0400 Subject: [PATCH 388/924] New translations glossary.mdx (Russian) --- website/pages/ru/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ru/glossary.mdx b/website/pages/ru/glossary.mdx index ef24dc0178e0..cdd4e402240c 100644 --- a/website/pages/ru/glossary.mdx +++ b/website/pages/ru/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From eff7697eb785e065a432fd258d708733e6724504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:37 -0400 Subject: [PATCH 389/924] New translations glossary.mdx (Swedish) --- website/pages/sv/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/glossary.mdx b/website/pages/sv/glossary.mdx index 229067f7c910..b52948de2ce6 100644 --- a/website/pages/sv/glossary.mdx +++ b/website/pages/sv/glossary.mdx @@ -10,7 +10,7 @@ title: Ordlista - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraf**: Ett anpassat API som bygger på blockchain-data och som kan frågas med hjälp av [GraphQL](https://graphql.org/). Utvecklare kan bygga, distribuera och publicera subgrafer på The Graph's decentraliserade nätverk. Därefter kan Indexer börja indexera subgrafer för att göra dem tillgängliga att fråga av subgrafkonsumenter. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From defaa8b233febd906a91a95540b1ef0acf4905d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:38 -0400 Subject: [PATCH 390/924] New translations glossary.mdx (Turkish) --- website/pages/tr/glossary.mdx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/tr/glossary.mdx b/website/pages/tr/glossary.mdx index 20b1a9ca12ba..2e3b1c2d74e0 100644 --- a/website/pages/tr/glossary.mdx +++ b/website/pages/tr/glossary.mdx @@ -10,9 +10,9 @@ title: Sözlük - **Uç Nokta**: Bir subgraph'ı sorgulamak için kullanılabilecek bir URL'dir. Subgraph Stüdyo için test uç noktası `https://api.studio.thegraph.com/query///` ve Graph Gezgini uç noktası `https://gateway.thegraph.com/api//subgraphs/id/` şeklindedir. Graph Gezgini uç noktası, Graph'ın merkeziyetsiz ağındaki subgraphları sorgulamak için kullanılır. -- **Subgraph**: [GraphQL](https://graphql.org/) kullanılarak sorgulanabilen blok zinciri verileri üzerine kurulu özel bir API. Geliştiriciler, Graph'ın merkeziyetsiz ağında subgraph'ler inşa edebilir, deploy edebilir ve yayınlayabilir. Ardından indeksleyiciler, subgraph tüketicileri tarafından sorgulanmak üzere kullanılabilir hale getirmek için subgraph'leri indekslemeye başlayabilir. +- **Subgraph**: Bir blok zincirden veri çıkaran, işleyen ve GraphQL aracılığıyla kolayca sorgulanabilecek şekilde saklayan açık bir API. Geliştiriciler, Graph Network'te subgraph'ler oluşturabilir, deploy edebilir ve yayınlayabilir. Daha sonra indeksleyiciler, subgraph'leri herkes tarafından sorgulanabilecek hale getirmek için indekslemeye başlayabilir. -- **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. +- **Barındırılan Hizmet**: Graph'in merkeziyetsiz ağı hizmet maliyetini, hizmet kalitesini ve geliştirici deneyimini olgunlaştırırken subgraph'leri oluşturmak ve sorgulamak için geçici bir iskele hizmeti. - **İndeksleyiciler**: Blok zincirlerinden gelen verileri indekslemek ve GraphQL sorguları sunmak için indeksleme node'larını çalıştıran ağ katılımcıları. @@ -24,7 +24,7 @@ title: Sözlük - **İndeksleyicinin Kendi Stake'i**: İndeksleyicilerin merkeziyetsiz ağa katılmak için stake ettikleri GRT miktarıdır. Minimum 100.000 GRT'dir ve üst sınır yoktur. -- **Upgrade Indexer**: A temporary Indexer designed to act as a fallback for subgraph queries not serviced by other Indexers on the network. It ensures a seamless transition for subgraphs upgrading from the hosted service by readily serving their queries upon being published. The upgrade Indexer is not competitive with other Indexers. It supports numerous blockchains that were previously only available on the hosted service. +- **Yükseltme İndeksleyicisi**: Ağdaki diğer indeksleyiciler tarafından hizmet verilmeyen subgraph sorguları için bir geri dönüş görevi görmek üzere tasarlanmış geçici bir indeksleyici. Yayınlandıktan sonra sorgularını kolayca sunarak, barındırılan hizmetten yükseltilen subgraph'ler için sorunsuz bir geçiş sağlar. Yükseltme indeksleyicisi diğer indeksleyiciler ile rekabet edemez. Daha önce yalnızca barındırılan hizmette mevcut olan çok sayıda blok zincirini destekler. - **Delegatörler**: GRT'ye sahip olan ve GRT'lerini indeksleyicilere stake eden ağ katılımcıları. Bu, indeksleyicilerin ağdaki subgraph'lerde mevcut paylarını artırmalarına olanak tanır. Buna karşılık, delegatörler, indeksleyicilerin subgraph'leri işlemek için aldıkları indeksleme ödüllerinin bir kısmını alırlar. @@ -40,21 +40,21 @@ title: Sözlük - **Subgraph Manifestosu**: Subgraph'in GraphQL şemasını, veri kaynaklarını ve diğer meta verileri açıklayan bir JSON dosyası. [Burada bir örneğini](https://ipfs.io/ipfs/QmVQdzeGdPUiLiACeqXRpKAYpyj8Z1yfWLMUq7A7WundUf) bulabilirsiniz. -- **Epoch**: A unit of time within the network. Currently, one epoch is 6,646 blocks or approximately 1 day. +- **Dönem**: Ağ içinde bir zaman birimi. Şu anda bir epoch 6.646 blok veya yaklaşık 1 gündür. - **Tahsis**: Bir indeksleyici, toplam GRT payını (delegatörlerin payı dahil) Graph'in merkeziyetsiz ağında yayınlanan subgraph'lere tahsis edebilir. Tahsisler dört aşamadan birinde mevcuttur. 1. **Aktif**: Bir tahsis, zincir üzerinde oluşturulduğunda aktif kabul edilir. Buna tahsis açma denir ve ağa, indeksleyicinin belirli bir subgraph için sorguları aktif olarak indekslediğini ve sunduğunu gösterir. Aktif tahsisler, subgraph'teki sinyal ve tahsis edilen GRT miktarı ile orantılı olarak indeksleme ödülleri tahakkuk ettirir. - 2. **Closed**: An Indexer may claim the accrued indexing rewards on a given subgraph by submitting a recent, and valid, Proof of Indexing (POI). This is known as closing an allocation. An allocation must have been open for a minimum of one epoch before it can be closed. The maximum allocation period is 28 epochs. If an indexer leaves an allocation open beyond 28 epochs, it is known as a stale allocation. When an allocation is in the **Closed** state, a Fisherman can still open a dispute to challenge an Indexer for serving false data. + 2. **Kapalı**: Bir indeksleyici, güncel ve geçerli bir İndeksleme Kanıtı (POI) göndererek belirli bir subgraph'te tahakkuk eden indeksleme ödüllerini talep edebilir. Buna tahsisin kapatılması denir. Bir tahsisin kapatılabilmesi için en az bir dönem boyunca açık olması gerekir. Maksimum tahsis süresi 28 dönemdir. İndeksleyicinin bir tahsisi 28 dönemin ötesinde açık bırakması, eski tahsis olarak bilinir. Bir tahsis **Kapalı** durumunda olduğunda, fishermen yine de yanlış veri sunduğu için indeksleyiciye itiraz etmek üzere bir anlaşmazlık açabilir. - **Subgraph Stüdyo**: Subgraph'ler oluşturmak, deploy etmek ve yayınlamak için güçlü bir merkeziyetsiz uygulamadır. -- **Fishermen**: A role within The Graph Network held by participants who monitor the accuracy and integrity of data served by Indexers. When a Fisherman identifies a query response or a POI they believe to be incorrect, they can initiate a dispute against the Indexer. If the dispute rules in favor of the Fisherman, the Indexer is slashed. Specifically, the Indexer will lose 2.5% of their self-stake of GRT. Of this amount, 50% is awarded to the Fisherman as a bounty for their vigilance, and the remaining 50% is removed from circulation (burned). This mechanism is designed to encourage Fishermen to help maintain the reliability of the network by ensuring that Indexers are held accountable for the data they provide. +- **Fishermen**: İndeksleyiciler tarafından sunulan verilerin doğruluğunu ve bütünlüğünü izleyen katılımcılar tarafından Graph Network içinde üstlenilen bir rol. Bir fishermen, yanlış olduğuna inandığı bir sorgu yanıtı veya POI tespit ettiğinde indeksleyici karşı bir anlaşmazlık başlatabilir. İtiraz fishermen lehine sonuçlanırsa, indeksleyicinin puanı düşürülür. Spesifik olarak, indeksleyici kendi GRT payının %2,5'ini kaybedecektir. Bu miktarın %50'si fishermen'a uyanıklığı için bir ödül olarak verilir ve kalan %50'si dolaşımdan kaldırılır (yakılır). Bu mekanizma, indeksleyicilerin sağladıkları verilerden sorumlu tutulmalarını sağlayarak fishermen'ları ağın güvenilirliğini korumaya yardımcı olmaya teşvik etmek için tasarlanmıştır. -- **Arbitrators**: Arbitrators are network participants appointed through a governance process. The role of the Arbitrator is to decide the outcome of indexing and query disputes. Their goal is to maximize the utility and reliability of The Graph Network. +- **Hakemler**: Hakemler, bir yönetişim süreci aracılığıyla atanan ağ katılımcılarıdır. Hakemin rolü, indeksleme ve sorgu anlaşmazlıklarının sonucuna karar vermektir. Amaçları Graph Network'ün faydasını ve güvenilirliğini en üst düzeye çıkarmaktır. -- **Slashing**: Indexers can have their self-staked GRT slashed for providing an incorrect POI or for serving inaccurate data. or for serving inaccurate data. The slashing percentage is a protocol parameter currently set to 2.5% of an Indexer's self stake. 50% of the slashed GRT goes to the Fisherman that disputed the inaccurate data or incorrect POI. The other 50% is burned. +- **Slashing**: İndeksleyiciler, yanlış bir POI sağladıkları veya yanlış veri sundukları ya da yanlış veri sundukları için kendi paylarına düşen GRT'yi kesebilirler. Kesinti yüzdesi, şu anda bir indeksleyicinin kendi hissesinin %2,5'i olarak ayarlanmış bir protokol parametresidir. Kesilen GRT'nin %50'si yanlış veriye veya yanlış POI'ye itiraz eden fishermen'a gider. Diğer %50'si ise yakılır. - **İndeksleme Ödülleri**: İndeksleyicilerin subgraph'leri indeksleme karşılığında aldığı ödüllerdir. İndeksleme ödülleri GRT şeklinde dağıtılır. @@ -62,7 +62,7 @@ title: Sözlük - **GRT**: Graph'in çalışma yardımcı programı belirtecidir. GRT, ağ katılımcılarına ağa katkıda bulunmaları için ekonomik teşvikler sağlar. -- **POI or Proof of Indexing**: When an Indexer closes their allocation and wants to claim their accrued indexing rewards on a given subgraph, they must provide a valid and recent Proof of Indexing (POI). Fishermen may dispute the POI provided by an Indexer. A dispute resolved in the Fisherman's favor will result in slashing of the Indexer. +- **POI veya İndeksleme Kanıtı**: Bir indeksleyici tahsisini kapattığında ve belirli bir subgraph'te tahakkuk eden indeksleme ödüllerini talep etmek istediğinde, geçerli ve güncel bir indeksleme kanıtı sağlamalıdır (POI). Fishermen, indeksleyici tarafından sağlanan POI'ye itiraz edebilir. Fishermen'in lehine çözülen bir anlaşmazlık, indeksleyicinin cezalandırılması ile sonuçlanacaktır. - **Graph Node**: Graph Node, subgraph'leri indeksleyen ve elde edilen verileri bir GraphQL API aracılığıyla sorgulanabilir hale getiren bileşendir. Bu nedenle, indeksleyici yığınının merkezinde yer alır ve Graph node'unun doğru çalışması, başarılı bir indeksleyici olabilmek için çok önemlidir. @@ -76,10 +76,10 @@ title: Sözlük - **Soğuma Süresi**: Yetki parametrelerini değiştiren indeksleyicinin bunu tekrar yapabilmesi için kalan süre. -- **L2 Transfer Tools**: Smart contracts and UI that enable network participants to transfer network related assets from Ethereum mainnet to Arbitrum One. Network participants can transfer delegated GRT, subgraphs, curation shares, and Indexer's self stake. +- **L2 Aktarım Araçları**: Ağ katılımcılarının ağla ilgili varlıkları Ethereum ana ağından Arbitrum One'a aktarmasına olanak tanıyan akıllı sözleşmeler ve kullanıcı arayüzü. Ağ katılımcıları, yetkilendirilmiş GRT'yi, subgraph'leri, kürasyon paylaşımlarını ve indeksleyicinin kendi payını aktarabilir. - **Bir subgraph'ı Graph Ağı'na _yükseltme_**: Bir subgraph'ı barındırılan hizmetten Graph Ağı'na taşıma işlemi. - **Bir subgraph'ın _güncellenmesi_**: Subgraph manifestosunda, şemasında veya eşleştirmelerinde yapılan güncellemelerle yeni bir subgraph sürümü yayınlama işlemi. -- **Migrating**: The process of curation shares moving from an old version of a subgraph to a new version of a subgraph (e.g. when v0.0.1 is updated to v0.0.2). +- **Geçiş**: Bir subgraph'in eski bir sürümünden bir subgrap'in yeni bir sürümüne geçiş yapan kürasyon paylaşımları süreci (örneğin, v0.0.1, v0.0.2'ye güncellendiğinde). From 50cfb180e656e19168c7e8e1c7f750eff8564227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:39 -0400 Subject: [PATCH 391/924] New translations glossary.mdx (Ukrainian) --- website/pages/uk/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/uk/glossary.mdx b/website/pages/uk/glossary.mdx index 2b202bd836aa..87557350629b 100644 --- a/website/pages/uk/glossary.mdx +++ b/website/pages/uk/glossary.mdx @@ -10,7 +10,7 @@ title: Глосарій - **Кінцева точка**: URL-адреса, яку можна використовувати для запиту підграфа. Кінцевою точкою тестування для Subgraph Studio є `https://api.studio.thegraph.com/query///`, а кінцевою точкою для Graph Explorer є `https://gateway.thegraph.com/api//subgraphs/id/`. Кінцева точка Graph Explorer використовується для запиту підграфів у децентралізованій мережі The Graph. -- **Підграф**: Спеціальний API, побудований на даних блокчейну, які можна запитувати за допомогою [GraphQL](https://graphql.org/). Розробники можуть створювати, розгортати та публікувати підграфи в децентралізованій мережі The Graph. Після цього індексатори можуть почати індексувати підграфи, щоб зробити їх доступними для запитів зі сторони користувачів підграфів. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From 21e17efd56388f580f4fdc375c9d8f964ad85a93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:40 -0400 Subject: [PATCH 392/924] New translations glossary.mdx (Chinese Simplified) --- website/pages/zh/glossary.mdx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/website/pages/zh/glossary.mdx b/website/pages/zh/glossary.mdx index e29a9d8cd58a..3593974794f0 100644 --- a/website/pages/zh/glossary.mdx +++ b/website/pages/zh/glossary.mdx @@ -10,9 +10,9 @@ title: 术语汇编 - **Endpoint**: 可以用来查询子图的URL。Subgraph Studio的测试端点是`https://api.studio.thegraph.com/query///`,Graph浏览器端点`为https://gateway.thegraph.com/api//subgraphs/id/`。Graph浏览器端点用于查询Graph的去中心化网络上的子图。 -- **Subgraph**: 基于区块链数据构建的定制 API,可以使用 [GraphQL](https://graphql.org/) 进行查询。开发人员可以在 Graph 的去中心化网络中构建、部署和发布子图。然后,索引人可以开始索引子图,以便子图使用者可以查询它们。 +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. -- **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. +- **Hosted Service**: 作为 The Graph 分布式网络成熟的一个临时支架服务,用于构建和查询子图,以提高服务成本、服务质量和开发者体验。 - **Indexers**:网络参与者运行索引节点,从区块链索引数据并提供 GraphQL 查询。 @@ -40,21 +40,21 @@ title: 术语汇编 - **Subgraph Manifest**: 描述子图的 GraphQL 模式、数据源和其他元数据的 JSON 文件。[此处](https://ipfs.io/ipfs/QmVQdzeGdPUiLiACeqXRpKAYpyj8Z1yfWLMUq7A7WundUf)示例。 -- **Epoch**: A unit of time within the network. Currently, one epoch is 6,646 blocks or approximately 1 day. +- **Epoch**: 网络中的时间单位。一个时期目前为6,646个区块或大约1天。 - **Allocation**: 一个索引人可以分配他们的总 GRT 份额(包括委托人的股份) 到已经部署在Graph去中心化网络的子图。分配存在于四个阶段之一。 1. **Active**: 分配在链上创建时被认为是活动的。这称为打开一个分配,并向网络表明索引人正在为特定子图建立索引并提供查询服务。主动分配的增值索引奖励与子图上的信号以及分配的 GRT 的数量成比例。 - 2. **Closed**: An Indexer may claim the accrued indexing rewards on a given subgraph by submitting a recent, and valid, Proof of Indexing (POI). This is known as closing an allocation. An allocation must have been open for a minimum of one epoch before it can be closed. The maximum allocation period is 28 epochs. If an indexer leaves an allocation open beyond 28 epochs, it is known as a stale allocation. When an allocation is in the **Closed** state, a Fisherman can still open a dispute to challenge an Indexer for serving false data. + 2. **Closed**: 索引人可以通过提交最近的、有效的索引证明(POI)来领取在给定子图上累积的索引奖励。这被称为关闭分配。在关闭之前,分配必须至少开放一个纪元。最大分配期为 28 个纪元。如果索引人在 28 个纪元之后仍然保持分配开放状态,则被称为过时分配。当分配处于 **Closed** 状态时,渔夫仍然可以提出异议,挑战索引人提供虚假数据。 - **Subgraph Studio**: 用于构建、部署和发布子图的强大 dapp。 -- **Fishermen**: A role within The Graph Network held by participants who monitor the accuracy and integrity of data served by Indexers. When a Fisherman identifies a query response or a POI they believe to be incorrect, they can initiate a dispute against the Indexer. If the dispute rules in favor of the Fisherman, the Indexer is slashed. Specifically, the Indexer will lose 2.5% of their self-stake of GRT. Of this amount, 50% is awarded to the Fisherman as a bounty for their vigilance, and the remaining 50% is removed from circulation (burned). This mechanism is designed to encourage Fishermen to help maintain the reliability of the network by ensuring that Indexers are held accountable for the data they provide. +- **Fishermen**: The Graph Network 中的一个角色,由监视索引人提供的数据的准确性和完整性的参与者担任。当渔夫发现他们认为是不正确的查询响应或 POI 时,他们可以对索引人提起争议。如果争议裁定有利于渔夫,索引人将被削减。具体而言,索引人将失去他们的 GRT 自有股份的 2.5%。其中,50%作为对渔夫的奖励,以表彰他们的警惕性,剩下的50%将被从流通中移除(销毁)。这个机制旨在鼓励渔夫通过确保索引人对他们提供的数据负责来帮助维护网络的可靠性。 -- **Arbitrators**: Arbitrators are network participants appointed through a governance process. The role of the Arbitrator is to decide the outcome of indexing and query disputes. Their goal is to maximize the utility and reliability of The Graph Network. +- **Arbitrators**: 仲裁员是通过治理设置的网络参与者。仲裁员的作用是决定索引和查询争议的结果。他们的目标是最大限度地提高Graph网络的效用和可靠性。 -- **Slashing**: Indexers can have their self-staked GRT slashed for providing an incorrect POI or for serving inaccurate data. or for serving inaccurate data. The slashing percentage is a protocol parameter currently set to 2.5% of an Indexer's self stake. 50% of the slashed GRT goes to the Fisherman that disputed the inaccurate data or incorrect POI. The other 50% is burned. +- **Slashing**: 索引人可能因为提供了不正确的索引证明(POI) 或提供了不准确的数据而削减它们所占的 GRT。削减百分比是一个协议参数,目前设置为索引人自身权益的2.5% 。50% 的削减后的总注册税收归Fisherman,他们对不准确的数据或不正确的 POI 提出异议。剩下的50% 被消耗了。 - **Indexing Rewards**: 索引人因为索引子图而获得的奖励。索引奖励是通过GRT 来分配的。 @@ -62,7 +62,7 @@ title: 术语汇编 - **GRT**: Graph的工作效用代币。 GRT 为网络参与者提供经济激励,鼓励他们为网络做出贡献。 -- **POI or Proof of Indexing**: When an Indexer closes their allocation and wants to claim their accrued indexing rewards on a given subgraph, they must provide a valid and recent Proof of Indexing (POI). Fishermen may dispute the POI provided by an Indexer. A dispute resolved in the Fisherman's favor will result in slashing of the Indexer. +- **POI or Proof of Indexing**: 当一个索引人关闭他们的分配,并希望要求他们的累积索引人奖励在一个给定的子图,他们必须提供一个有效的和最近的索引证明(POI)。Fishermen可以对索引人提供的 POI 提出异议。Fisherman胜出的争端将导致索引人被惩罚。 - **Graph Node**: Graph节点是索引子图的组件,并使生成的数据可通过GraphQL API进行查询。因此,它是索引人堆栈的中心,Graph节点的正确操作对于运行成功的索引人至关重要。 @@ -76,10 +76,10 @@ title: 术语汇编 - **Cooldown Period**: 直到更改其委托参数的索引人可以再次进行此操作之前的剩余时间。 -- **L2 Transfer Tools**: Smart contracts and UI that enable network participants to transfer network related assets from Ethereum mainnet to Arbitrum One. Network participants can transfer delegated GRT, subgraphs, curation shares, and Indexer's self stake. +- **L2 Transfer Tools**: 智能合约和UI,使网络参与者能够从以太坊主网转移到Arbitrum One。网络参与者可以转移委托的GRT、子图、策展股份和索引者自己的股份。 - **_升级_ 子图到 Graph网络中**: 将子图从托管服务移动到Graph网络的过程. - **_更新_ 子图**: 发布新子图版本的过程,其中包含对子图的清单、模式或映射的更新。 -- **Migrating**: The process of curation shares moving from an old version of a subgraph to a new version of a subgraph (e.g. when v0.0.1 is updated to v0.0.2). +- **Migrating**: 策展份额从子图的旧版本移动到子图的新版本的过程(例如,从 v0.0.1 更新到 v0.0.2)。 From 74d1e78590db2003702825271d7697dbd6d7d1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:41 -0400 Subject: [PATCH 393/924] New translations glossary.mdx (Urdu (Pakistan)) --- website/pages/ur/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ur/glossary.mdx b/website/pages/ur/glossary.mdx index c6e26d302757..813780fc2ae9 100644 --- a/website/pages/ur/glossary.mdx +++ b/website/pages/ur/glossary.mdx @@ -10,7 +10,7 @@ title: لغت - **اینڈ پوائنٹ**: ایک URL جسے سب گراف سے کیوری کرنے کے لیے استعمال کیا جا سکتا ہے۔ سب گراف سٹوڈیو کے لیے ٹیسٹنگ اینڈ پوائنٹ ہے `https://api.studio.thegraph.com/query///` اور گراف ایکسپلورر اینڈ پوائنٹ ہے `https: //gateway.thegraph.com/api//subgraphs/id/`۔ گراف ایکسپلورر اینڈ پوائنٹ کا استعمال گراف کے ڈیسینٹرالائزڈ نیٹ ورک پر سب گراف کے بارے میں کیوری کرنے کے لیے کیا جاتا ہے. -- **سب گراف**: ایک حسب ضرورت API جو بلاکچین ڈیٹا پر بنایا گیا ہے جس سے [GraphQL](https://graphql.org/) کا استعمال کر کے کیوری کیا جا سکتا ہے۔ ڈویلپرز گراف کے ڈیسینٹرالائزڈ نیٹ ورک پر سب گراف بنا، تعینات اور شائع کر سکتے ہیں۔ اس کے بعد، انڈیکسرز سب گرافس کو انڈیکس کرنا شروع کر سکتے ہیں تاکہ انہیں سب گراف صارفین کی طرف سے کیوری کرنے کے لیے دستیاب ہو سکے. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From cc77430cd62e489a8339ba874c59fb96a86e7762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:42 -0400 Subject: [PATCH 394/924] New translations glossary.mdx (Vietnamese) --- website/pages/vi/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/vi/glossary.mdx b/website/pages/vi/glossary.mdx index ef24dc0178e0..cdd4e402240c 100644 --- a/website/pages/vi/glossary.mdx +++ b/website/pages/vi/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From aeef4cd1ae3c23340638daa8d076e0a6b437ae2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:43 -0400 Subject: [PATCH 395/924] New translations glossary.mdx (Marathi) --- website/pages/mr/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/mr/glossary.mdx b/website/pages/mr/glossary.mdx index 92efb9cc0a2a..33627e52b406 100644 --- a/website/pages/mr/glossary.mdx +++ b/website/pages/mr/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **सबग्राफ**: ब्लॉकचेन डेटावर तयार केलेला सानुकूल API जो [GraphQL](https://graphql.org/) वापरून विचारला जाऊ शकतो. डेव्हलपर द ग्राफच्या विकेंद्रित नेटवर्कवर सबग्राफ तयार, तैनात आणि प्रकाशित करू शकतात. त्यानंतर, इंडेक्सर्स सबग्राफचे अनुक्रमणिका सुरू करू शकतात जेणेकरून ते सबग्राफ ग्राहकांकडून विचारले जातील. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From 383cbae1d3693e0e51e8bef9327d4803cb4fd47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:44 -0400 Subject: [PATCH 396/924] New translations glossary.mdx (Hindi) --- website/pages/hi/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/hi/glossary.mdx b/website/pages/hi/glossary.mdx index 455310a82342..f94753b65b8f 100644 --- a/website/pages/hi/glossary.mdx +++ b/website/pages/hi/glossary.mdx @@ -10,7 +10,7 @@ title: शब्दकोष - **समाप्ति बिंदु**: एक URL जिसका उपयोग किसी सबग्राफ को क्वेरी करने के लिए किया जा सकता है। सबग्राफ स्टूडियो के लिए टेस्टिंग एंडपॉइंट `https://api.studio.thegraph.com/query///` है और ग्राफ एक्सप्लोरर एंडपॉइंट `https है: //gateway.thegraph.com/api//subgraphs/id/`। ग्राफ़ एक्सप्लोरर समापन बिंदु का उपयोग ग्राफ़ के विकेन्द्रीकृत नेटवर्क पर उप-अनुच्छेदों को क्वेरी करने के लिए किया जाता है। -- **सबग्राफ**: ब्लॉकचैन डेटा पर निर्मित एक कस्टम एपीआई जिसे [ग्राफक्यूएल](https://graphql.org/) का उपयोग करके क्वेरी की जा सकती है। डेवलपर ग्राफ़ के विकेन्द्रीकृत नेटवर्क के लिए सबग्राफ बना, तैनात और प्रकाशित कर सकते हैं। फिर, इंडेक्सर्स सबग्राफ उपभोक्ताओं द्वारा पूछताछ के लिए उन्हें उपलब्ध कराने के लिए सबग्राफ को इंडेक्स करना शुरू कर सकते हैं। +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From 8c1bb9d4c4f642a9846f0b6d5ec5cbd0ad70b097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:44 -0400 Subject: [PATCH 397/924] New translations glossary.mdx (Yoruba) --- website/pages/yo/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/yo/glossary.mdx b/website/pages/yo/glossary.mdx index ef24dc0178e0..cdd4e402240c 100644 --- a/website/pages/yo/glossary.mdx +++ b/website/pages/yo/glossary.mdx @@ -10,7 +10,7 @@ title: Glossary - **Endpoint**: A URL that can be used to query a subgraph. The testing endpoint for Subgraph Studio is `https://api.studio.thegraph.com/query///` and the Graph Explorer endpoint is `https://gateway.thegraph.com/api//subgraphs/id/`. The Graph Explorer endpoint is used to query subgraphs on The Graph's decentralized network. -- **Subgraph**: A custom API built on blockchain data that can be queried using [GraphQL](https://graphql.org/). Developers can build, deploy and publish subgraphs to The Graph's decentralized network. Then, Indexers can begin indexing subgraphs to make them available to be queried by subgraph consumers. +- **Subgraph**: An open API that extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. Developers can build, deploy, and publish subgraphs to The Graph Network. Then, Indexers can begin indexing subgraphs to make them available to be queried by anyone. - **Hosted service**: A temporary scaffold service for building and querying subgraphs as The Graph's decentralized network is maturing its cost of service, quality of service, and developer experience. From 9e7adec8eec85b31841147817a489e3cda6aec69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:46 -0400 Subject: [PATCH 398/924] New translations subgraph-uncrashable.mdx (French) --- website/pages/fr/cookbook/subgraph-uncrashable.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/fr/cookbook/subgraph-uncrashable.mdx b/website/pages/fr/cookbook/subgraph-uncrashable.mdx index 2dfddd8d2cc2..56b166b1056f 100644 --- a/website/pages/fr/cookbook/subgraph-uncrashable.mdx +++ b/website/pages/fr/cookbook/subgraph-uncrashable.mdx @@ -1,5 +1,5 @@ --- -title: Safe Subgraph Code Generator +title: Générateur de code de subgraph sécurisé --- [Subgraph Uncrashable](https://float-capital.github.io/float-subgraph-uncrashable/) est un outil de génération de code qui génère un ensemble de fonctions d'assistance à partir du schéma graphql d'un projet.Il garantit que toutes les interactions avec les entités de votre subgraph sont totalement sûres et cohérentes. @@ -12,15 +12,15 @@ title: Safe Subgraph Code Generator - **Configurable par l'utilisateur** Définissez les valeurs par défaut et configurez le niveau de contrôles de sécurité qui convient aux besoins de votre projet individuel. Des journaux d'avertissement sont enregistrés indiquant où il y a une violation de la logique de subgraph pour aider à corriger le problème afin d'assurer l'exactitude des données. -**Key Features** +**Fonctionnalités principales** -- The code generation tool accommodates **all** subgraph types and is configurable for users to set sane defaults on values. The code generation will use this config to generate helper functions that are to the users specification. +- L'outil de génération de code prend en charge **tous** les types de subgraphs et est configurable pour permettre aux utilisateurs de définir des valeurs par défaut raisonnables. La génération de code utilisera cette configuration pour générer des fonctions d'assistance conformes aux spécifications de l'utilisateur. -- The framework also includes a way (via the config file) to create custom, but safe, setter functions for groups of entity variables. This way it is impossible for the user to load/use a stale graph entity and it is also impossible to forget to save or set a variable that is required by the function. +- Le cadre comprend également un moyen (via le fichier de configuration) de créer des fonctions de définition personnalisées, mais sûres, pour des groupes de variables d'entité. De cette façon, il est impossible pour l'utilisateur de charger/utiliser une entité de graph obsolète et il est également impossible d'oublier de sauvegarder ou définissez une variable requise par la fonction. - Les journaux d'avertissement sont enregistrés sous forme de journaux indiquant où il y a une violation de la logique de subgraph pour aider à corriger le problème afin de garantir l'exactitude des données. Ces journaux peuvent être consultés dans le service hébergé de The Graph dans la section "Journaux". -Subgraph Uncrashable can be run as an optional flag using the Graph CLI codegen command. +Subgraph Uncrashable peut être exécuté en tant qu'indicateur facultatif à l'aide de la commande Graph CLI codegen. ```sh graphe codegen -u [options] [] From 52507a55d99b82b695c7306208e06136e1539560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:48 -0400 Subject: [PATCH 399/924] New translations subgraph-uncrashable.mdx (Czech) --- .../cs/cookbook/subgraph-uncrashable.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/cs/cookbook/subgraph-uncrashable.mdx b/website/pages/cs/cookbook/subgraph-uncrashable.mdx index 989310a3f9a0..1c2b3d9e4dad 100644 --- a/website/pages/cs/cookbook/subgraph-uncrashable.mdx +++ b/website/pages/cs/cookbook/subgraph-uncrashable.mdx @@ -1,29 +1,29 @@ --- -title: Safe Subgraph Code Generator +title: Generátor kódu bezpečného podgrafu --- -[Subgraph Uncrashable](https://float-capital.github.io/float-subgraph-uncrashable/) is a code generation tool that generates a set of helper functions from the graphql schema of a project. It ensures that all interactions with entities in your subgraph are completely safe and consistent. +[Subgraph Uncrashable](https://float-capital.github.io/float-subgraph-uncrashable/) je nástroj pro generování kódu, který generuje sadu pomocných funkcí ze schématu graphql projektu. Zajišťuje, že všechny interakce s entitami v podgrafu jsou zcela bezpečné a konzistentní. -## Why integrate with Subgraph Uncrashable? +## Proč se integrovat s aplikací Subgraph Uncrashable? -- **Continuous Uptime**. Mishandled entities may cause subgraphs to crash, which can be disruptive for projects that are dependent on The Graph. Set up helper functions to make your subgraphs “uncrashable” and ensure business continuity. +- **Plynulá doba provozu**. Nesprávně zpracované entity mohou způsobit pád dílčích grafů, což může narušit projekty, které jsou na Grafu závislé. Nastavte pomocné funkce, které zajistí, aby vaše podgrafy "nepadaly" a zajistily nepřetržitost provozu. -- **Completely Safe**. Common problems seen in subgraph development are issues of loading undefined entities, not setting or initializing all values of entities, and race conditions on loading and saving entities. Ensure all interactions with entities are completely atomic. +- **Úplně bezpečné**. Mezi běžné problémy, které se při vývoji podgrafů vyskytují, patří problémy s načítáním nedefinovaných entit, nenastavením nebo inicializací všech hodnot entit a závodní podmínky při načítání a ukládání entit. Zajistěte, aby všechny interakce s entitami byly zcela atomické. -- **User Configurable** Set default values and configure the level of security checks that suits your individual project's needs. Warning logs are recorded indicating where there is a breach of subgraph logic to help patch the issue to ensure data accuracy. +- **Uživatelsky konfigurovatelné** Nastavte výchozí hodnoty a nakonfigurujte úroveň bezpečnostních kontrol, která vyhovuje potřebám vašeho projektu. Zaznamenávají se výstražné protokoly, které uvádějí, kde došlo k porušení logiky dílčího grafu, aby bylo možné problém opravit a zajistit přesnost dat. -**Key Features** +**Klíčové vlastnosti** -- The code generation tool accommodates **all** subgraph types and is configurable for users to set sane defaults on values. The code generation will use this config to generate helper functions that are to the users specification. +- Nástroj pro generování kódu vyhovuje **všem** typům podgrafů a je konfigurovatelný, aby uživatelé mohli nastavit rozumné výchozí hodnoty. Generování kódu použije tuto konfiguraci k vygenerování pomocných funkcí, které odpovídají zadání uživatele specifikace. -- The framework also includes a way (via the config file) to create custom, but safe, setter functions for groups of entity variables. This way it is impossible for the user to load/use a stale graph entity and it is also impossible to forget to save or set a variable that is required by the function. +- Framework také obsahuje způsob (prostřednictvím konfiguračního souboru), jak vytvořit vlastní, ale bezpečné funkce setteru pro skupiny proměnných entit. Tímto způsobem není možné, aby uživatel načetl/použil zastaralou entitu grafu, a také není možné zapomenout uložit nebo nastavit proměnnou, kterou funkce vyžaduje. -- Warning logs are recorded as logs indicating where there is a breach of subgraph logic to help patch the issue to ensure data accuracy. These logs can be viewed in the The Graph's hosted service under the 'Logs' section. +- Varovné protokoly se zaznamenávají jako protokoly označující místa, kde došlo k porušení logiky podgrafu, aby bylo možné problém opravit a zajistit přesnost dat. Tyto protokoly lze zobrazit v hostované službě The Graph v části 'Logs' sekce. -Subgraph Uncrashable can be run as an optional flag using the Graph CLI codegen command. +Podgraf Uncrashable lze spustit jako volitelný příznak pomocí příkazu Graph CLI codegen. ```sh graph codegen -u [options] [] ``` -Visit the [subgraph uncrashable documentation](https://float-capital.github.io/float-subgraph-uncrashable/docs/) or watch this [video tutorial](https://float-capital.github.io/float-subgraph-uncrashable/docs/tutorial) to learn more and to get started with developing safer subgraphs. +Navštivte [dokumentaci k subgrafů bez možnosti havárie](https://float-capital.github.io/float-subgraph-uncrashable/docs/) nebo se podívejte na tento [video tutoriál](https://float-capital.github.io/float-subgraph-uncrashable/docs/tutorial), kde se dozvíte více a můžete začít s vývojem bezpečnějších subgrafů. From d8e96fa8413afbf4a34d495f7ba1cf723018b5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:12:59 -0400 Subject: [PATCH 400/924] New translations base-testnet.mdx (French) --- website/pages/fr/cookbook/base-testnet.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/fr/cookbook/base-testnet.mdx b/website/pages/fr/cookbook/base-testnet.mdx index 362dbe8c34f8..51bb55cd3554 100644 --- a/website/pages/fr/cookbook/base-testnet.mdx +++ b/website/pages/fr/cookbook/base-testnet.mdx @@ -1,5 +1,5 @@ --- -title: Building Subgraphs on Base +title: Construction de subgraphs sur Base --- Ce guide vous montrera rapidement comment initialiser, créer et déployer votre subgraph sur le réseau de test de la base. @@ -16,11 +16,11 @@ Ce dont vous avez besoin : La CLI Graph (>=v0.41.0) est écrite en JavaScript et vous devrez avoir installé « npm » ou « yarn » pour l'utiliser. ```sh -# NPM +# NPM npm install -g @graphprotocol/graph-cli -# Fil -fil global ajouter @graphprotocol/graph-clio +# Yarn +yarn global add @graphprotocol/graph-cli ``` ### 2. Créez votre subgraph dans Subgraph Studio @@ -53,7 +53,7 @@ Votre nom de subgraph est un identifiant pour votre subgraph. L'outil CLI vous g - Subgraph slug: `` - Répertoire dans lequel créer le subgraph : `` - Réseau Ethereum : base-testnet \_ Adresse du contrat : `` -- Start block (optional) +- Bloc de départ (optionnel) - Nom du contrat : `` - Oui/non à l'indexation des événements (oui signifie que votre subgraph sera amorcé avec des entités dans le schéma et des mappings simples pour les événements émis) @@ -78,7 +78,7 @@ Avant de pouvoir déployer votre subgraph, vous devrez vous authentifier auprès Authentifier le subgraph sur studio ``` -authentification graph --studio +graph auth --studio ``` Ensuite, entrez le répertoire de votre subgraph. @@ -91,7 +91,7 @@ Construisez votre subgraph avec la commande suivante: ```` ``` -codegen graph && construction de graph +graph codegen && graph build ``` ```` From 72c30b4e834ab0016b9e270c61453f92add9e886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:01 -0400 Subject: [PATCH 401/924] New translations base-testnet.mdx (Czech) --- website/pages/cs/cookbook/base-testnet.mdx | 80 +++++++++++----------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/website/pages/cs/cookbook/base-testnet.mdx b/website/pages/cs/cookbook/base-testnet.mdx index b1e3a4fc7c6d..bfadb08bd30a 100644 --- a/website/pages/cs/cookbook/base-testnet.mdx +++ b/website/pages/cs/cookbook/base-testnet.mdx @@ -1,19 +1,19 @@ --- -title: Building Subgraphs on Base +title: Budování podgrafů na základně --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph on Base testnet. +Tento průvodce vás rychle provede inicializací, vytvořením a nasazením subgrafu v testovací síti Base (testnet). -What you'll need: +Požadavky: -- A Base testnet contract address -- A crypto wallet (e.g. MetaMask or Coinbase Wallet) +- Základní adresa testovací sítě +- Kryptopeněženka (např. MetaMask nebo Coinbase Wallet) ## Subgraph Studio -### 1. Install the Graph CLI +### 1. Nainstalujte Graph CLI -The Graph CLI (>=v0.41.0) is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. +Graph CLI (>=v0.41.0) je napsáno v jazyce JavaScript a k jeho použití je třeba mít nainstalovaný buď `npm`, nebo `yarn`. ```sh # NPM @@ -23,71 +23,71 @@ npm install -g @graphprotocol/graph-cli yarn global add @graphprotocol/graph-cli ``` -### 2. Create your subgraph in the Subgraph Studio +### 2. Vytvořte podgraf ve Studiu podgrafů -Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your crypto wallet. +Přejděte do [Subgraph Studio](https://thegraph.com/studio/) a připojte svou kryptopeněženku. -Once connected, click "Create a Subgraph" and enter a name for your subgraph. +Po připojení klikněte na tlačítko "Create a Subgraph" a zadejte název podgrafu. -Select "Base (testnet)" as the indexed blockchain and click Create Subgraph. +Jako indexovaný blockchain vyberte "Base (testnet)" a klikněte na tlačítko Create Subgraph. -### 3. Initialize your Subgraph +### 3. Inicializujte podgraf -> You can find specific commands for your subgraph in the Subgraph Studio. +> Konkrétní příkazy pro svůj podgraf najdete ve Studiu podgrafů. -Make sure that the graph-cli is updated to latest (above 0.41.0) +Ujistěte se, že graph-cli je aktualizován na nejnovější verzi (nad 0.41.0) ```sh graph --version ``` -Initialize your subgraph from an existing contract. +Inicializujte podgraf z existující smlouvy. ```sh graph init --studio ``` -Your subgraph slug is an identifier for your subgraph. The CLI tool will walk you through the steps for creating a subgraph, including: +Váš podgraf slug je identifikátor vašeho podgrafu. Nástroj CLI vás provede kroky pro vytvoření podgrafu, včetně: -- Protocol: ethereum +- Protokol: ethereum - Subgraph slug: `` -- Directory to create the subgraph in: `` -- Ethereum network: base-testnet \_ Contract address: `` -- Start block (optional) -- Contract name: `` -- Yes/no to indexing events (yes means your subgraph will be bootstrapped with entities in the schema and simple mappings for emitted events) +- Adresář, ve kterém se má podgraf vytvořit: `` +- Síť Ethereum: base-testnet \_ Adresa smlouvy: \ +- Startovní blok (nepovinné) +- Název smlouvy: `` +- Ano/ne pro indexování událostí (ano znamená, že váš podgraf bude založen na entitách ve schématu a jednoduchých mapováních pro emitované události) -### 3. Write your Subgraph +### 3. Napište svůj podgraf -> If emitted events are the only thing you want to index, then no additional work is required, and you can skip to the next step. +> Pokud jsou emitované události jedinou věcí, kterou chcete indexovat, není třeba provádět žádnou další práci a můžete přejít k dalšímu kroku. -The previous command creates a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: +Předchozí příkaz vytvoří podgraf lešení, který můžete použít jako výchozí bod pro sestavení podgrafu. Při provádění změn v podgrafu budete pracovat především se třemi soubory: -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. Make sure to add `base-testnet` as the network name in manifest file to deploy your subgraph on Base testnet. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retreive from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. +- Manifest (subgraph.yaml) - Manifest definuje, jaké datové zdroje budou vaše podgrafy indexovat. Nezapomeňte do souboru manifestu přidat jako název sítě `base-testnet`, abyste mohli svůj podgraf nasadit na Base testnet. +- Schéma (schema.graphql) - Schéma GraphQL definuje, jaká data chcete z podgrafu získat. +- AssemblyScript Mapování (mapping.ts) - Jedná se o kód, který převádí data z datových zdrojů na entity definované ve schématu. -If you want to index additional data, you will need extend the manifest, schema and mappings. +Pokud chcete indexovat další data, musíte rozšířit manifest, schéma a mapování. -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). +Další informace o zápisu podgrafu naleznete v části [Creating a Subgraph](/developing/creating-a-subgraph). -### 4. Deploy to the Subgraph Studio +### 4. Nasazení do studia Subgraph Studio -Before you can deploy your subgraph, you will need to authenticate with the Subgraph Studio. You can do this by running the following command: +Před nasazením subgrafu se musíte ověřit ve Studiu subgrafu. To provedete spuštěním následujícího příkazu: -Authenticate the subgraph on studio +Ověření podgrafu ve studiu ``` graph auth --studio ``` -Next, enter your subgraph's directory. +Dále zadejte adresář podgrafu. ``` cd ``` -Build your subgraph with the following command: +Vytvořte podgraf pomocí následujícího příkazu: ```` ``` @@ -95,7 +95,7 @@ graph codegen && graph build ``` ```` -Finally, you can deploy your subgraph using this command: +Nakonec můžete subgraf nasadit pomocí tohoto příkazu: ```` ``` @@ -103,10 +103,10 @@ graph deploy --studio ``` ```` -### 5. Query your subgraph +### 5. Dotaz na podgraf -Once your subgraph is deployed, you can query it from your dapp using the `Development Query URL` in the Subgraph Studio. +Jakmile je podgraf nasazen, můžete se na něj ze své aplikace dotazovat pomocí `Development Query URL` v Subgraph Studiu. -Note - Studio API is rate-limited. Hence should preferably be used for development and testing. +Poznámka - rozhraní Studio API je omezeno rychlostí. Proto by mělo být přednostně používáno pro vývoj a testování. -To learn more about querying data from your subgraph, see the [Querying a Subgraph](/querying/querying-the-graph) page. +Další informace o dotazování na data z podgrafu naleznete na stránce [Dotazování podgrafu](/querying/querying-the-graph). From a67290d244bdb073d87a795dbffc4315f928324a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:04 -0400 Subject: [PATCH 402/924] New translations base-testnet.mdx (Dutch) --- website/pages/nl/cookbook/base-testnet.mdx | 78 +++++++++++----------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/website/pages/nl/cookbook/base-testnet.mdx b/website/pages/nl/cookbook/base-testnet.mdx index b1e3a4fc7c6d..d96024e22531 100644 --- a/website/pages/nl/cookbook/base-testnet.mdx +++ b/website/pages/nl/cookbook/base-testnet.mdx @@ -1,19 +1,19 @@ --- -title: Building Subgraphs on Base +title: Bouwen van Subgraphs op Arweave --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph on Base testnet. +Deze handleiding leidt je snel door hoe je jouw subgraph op Base testnet kunt initialiseren, creëren en implementeren. -What you'll need: +Wat je nodig hebt: -- A Base testnet contract address -- A crypto wallet (e.g. MetaMask or Coinbase Wallet) +- Een Base test contractadres +- Een crypto wallet (bijvoorbeeld MetaMask of Coinbase Wallet) ## Subgraph Studio -### 1. Install the Graph CLI +### 1. Installeer de Graph CLI -The Graph CLI (>=v0.41.0) is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. +De Graph CLI (>=v0.41.0) is geschreven in JavaScript en je zult npm of yarn geïnstalleerd moeten hebben om het te gebruiken. ```sh # NPM @@ -23,71 +23,71 @@ npm install -g @graphprotocol/graph-cli yarn global add @graphprotocol/graph-cli ``` -### 2. Create your subgraph in the Subgraph Studio +### 2. Creëer je subgraph in de Subgraph Studio -Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your crypto wallet. +Ga naar de [Subgraph Studio](https://thegraph.com/studio/) en verbind je crypto wallet. -Once connected, click "Create a Subgraph" and enter a name for your subgraph. +Eenmaal verbonden, klik op "Create a Subgraph" en voer een naam in voor jouw subgraph. -Select "Base (testnet)" as the indexed blockchain and click Create Subgraph. +Selecteer "Base (testnet)" als de geïndexeerde blockchain en klik op Create Subgraph. -### 3. Initialize your Subgraph +### 3. Initialiseer je Subgraph -> You can find specific commands for your subgraph in the Subgraph Studio. +> Specifieke commando's voor je subgraph kun je vinden in Subgraph Studio. -Make sure that the graph-cli is updated to latest (above 0.41.0) +Zorg ervoor dat de graph-cli is bijgewerkt naar de nieuwste versie (boven 0.41.0) ```sh graph --version ``` -Initialize your subgraph from an existing contract. +Initialiseer je subgraph vanuit een bestaand contract. ```sh graph init --studio ``` -Your subgraph slug is an identifier for your subgraph. The CLI tool will walk you through the steps for creating a subgraph, including: +Je subgraph slug is een identificator voor je subgraph. De CLI tool zal je door de stappen leiden om een subgraph te creëren, inclusief: - Protocol: ethereum - Subgraph slug: `` -- Directory to create the subgraph in: `` -- Ethereum network: base-testnet \_ Contract address: `` -- Start block (optional) -- Contract name: `` -- Yes/no to indexing events (yes means your subgraph will be bootstrapped with entities in the schema and simple mappings for emitted events) +- Directory om de subgraph in te creëren: `` +- Ethereum netwerk: base-testnet \_ Contractadres: `` +- Start block (optioneel) +- Contractnaam: `` +- Yes/No voor het indexeren van events (Yes betekent dat je subgraph zal worden opgezet met entiteiten in het schema en eenvoudige mappings voor uitgestuurde events) -### 3. Write your Subgraph +### 3. Schrijf je Subgraph -> If emitted events are the only thing you want to index, then no additional work is required, and you can skip to the next step. +> Als uitgezonden events het enige is wat je wilt indexeren, dan is er geen extra werk nodig en kun je naar de volgende stap. -The previous command creates a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: +Het vorige commando creëert een basis subgraph die je kunt gebruiken als startpunt voor het maken van je subgraph. Bij het aanbrengen van wijzigingen aan de subgraph zul je voornamelijk werken met drie bestanden: -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. Make sure to add `base-testnet` as the network name in manifest file to deploy your subgraph on Base testnet. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retreive from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. +- Manifest (subgraph.yaml) - Het manifest definieert welke databron je subgraphs zullen indexeren. Zorg ervoor dat je `base-testnet` toevoegt als netwerknaam in het manifestbestand om je subgraph op Base testnet uit te brengen. +- Schema (schema.graphql) - Het GraphQL schema definieert welke gegevens je wilt ophalen met de subgraph. +- AssemblyScript Mappings (mapping.ts) - Dit is de code die gegevens van je databron vertaalt naar de entiteiten die in het schema zijn gedefinieerd. -If you want to index additional data, you will need extend the manifest, schema and mappings. +Als je aanvullende gegevens wilt indexeren, moet je het manifest, schema en de mappings uitbreiden. -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). +Voor meer informatie over hoe je je subgraph kunt schrijven, zie [Creating a Subgraph](/developing/creating-a-subgraph). -### 4. Deploy to the Subgraph Studio +### 4. Implementeren in Subgraph Studio -Before you can deploy your subgraph, you will need to authenticate with the Subgraph Studio. You can do this by running the following command: +Voordat je je subgraph kunt uitbrengen, moet je je authenticeren bij de Subgraph Studio. Dit kun je doen door het volgende commando uit te voeren: -Authenticate the subgraph on studio +Authenticeer de subgraph in studio ``` graph auth --studio ``` -Next, enter your subgraph's directory. +Ga vervolgens naar de directory van je subgraph. ``` cd ``` -Build your subgraph with the following command: +Bouw je subgraph met het volgende commando: ```` ``` @@ -95,7 +95,7 @@ graph codegen && graph build ``` ```` -Finally, you can deploy your subgraph using this command: +Ten slotte kun je je subgraph uitbrengen met dit commando: ```` ``` @@ -103,10 +103,10 @@ graph deploy --studio ``` ```` -### 5. Query your subgraph +### 5. Een query versturen naar je subgraph -Once your subgraph is deployed, you can query it from your dapp using the `Development Query URL` in the Subgraph Studio. +Zodra je subgraph is uitgebracht, kun je er query's naar sturen vanuit je dapp met behulp van de `Development Query URL` in de Subgraph Studio. -Note - Studio API is rate-limited. Hence should preferably be used for development and testing. +Opmerking - Studio API heeft een beperkte capaciteit. Het moet daarom bij voorkeur worden gebruikt voor ontwikkeling en testen. -To learn more about querying data from your subgraph, see the [Querying a Subgraph](/querying/querying-the-graph) page. +Om meer te leren over het versturen van query's over gegevens uit je subgraph zie de [Querying a Subgraph](/querying/querying-the-graph) pagina. From 9788df225b34c5925394acddc9d587610f9440db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:07 -0400 Subject: [PATCH 403/924] New translations base-testnet.mdx (Swedish) --- website/pages/sv/cookbook/base-testnet.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/cookbook/base-testnet.mdx b/website/pages/sv/cookbook/base-testnet.mdx index 575853d3afa4..317821897fb3 100644 --- a/website/pages/sv/cookbook/base-testnet.mdx +++ b/website/pages/sv/cookbook/base-testnet.mdx @@ -25,7 +25,7 @@ yarn global add @graphprotocol/graph-cli ### 2. Skapa din subgraf i Subgraf Studio -Gå till [Subgraf Studio] \(https://thegraph.com/studio/) och anslut din kryptoplånbok. +Gå till [Subgraf Studio] (https://thegraph.com/studio/) och anslut din kryptoplånbok. När du är ansluten klickar du på "Skapa en subgraf" och anger ett namn för din subgraf. From 6b974da748bfb746d735eed57a79402aff0da466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:09 -0400 Subject: [PATCH 404/924] New translations base-testnet.mdx (Chinese Simplified) --- website/pages/zh/cookbook/base-testnet.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/zh/cookbook/base-testnet.mdx b/website/pages/zh/cookbook/base-testnet.mdx index b0aeec77b196..9239fc067653 100644 --- a/website/pages/zh/cookbook/base-testnet.mdx +++ b/website/pages/zh/cookbook/base-testnet.mdx @@ -107,4 +107,4 @@ graph deploy --studio 注意:Studio API受速率限制。因此,最好仅用于开发和测试。 -想了解更多有关从子图中查询数据的信息,请参阅[查询子图]\(/querying/querying the graph) 页面。 +想了解更多有关从子图中查询数据的信息,请参阅[查询子图](/querying/querying the graph) 页面。 From f9e95f5b9355dec98fec73897f0baec6bcf2b46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:11 -0400 Subject: [PATCH 405/924] New translations base-testnet.mdx (Marathi) --- website/pages/mr/cookbook/base-testnet.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/mr/cookbook/base-testnet.mdx b/website/pages/mr/cookbook/base-testnet.mdx index 0e4633beb989..fe64f06f33f9 100644 --- a/website/pages/mr/cookbook/base-testnet.mdx +++ b/website/pages/mr/cookbook/base-testnet.mdx @@ -33,7 +33,7 @@ npm install -g @graphprotocol/graph-cli ### 3. तुमचा सबग्राफ सुरू करा -> सबग्राफ स्टुडिओमध्ये तुम्ही तुमच्या सबग्राफसाठी विशिष्ट कमांड शोधू शकता. +> Subgraph subgraph मध्ये तुम्ही तुमच्या subgraph साठी specific commands शोधू शकता. आलेख-क्ली नवीनतम (०.४१.० च्या वर) अद्यतनित केल्याची खात्री करा. @@ -41,13 +41,13 @@ npm install -g @graphprotocol/graph-cli आलेख --आवृत्ती ``` -विद्यमान करारातून तुमचा सबग्राफ सुरू करा. +Existing करारातून तुमचा subgraph सुरू करा. ```sh graph init --studio ``` -तुमचा सबग्राफ स्लग तुमच्या सबग्राफसाठी एक ओळखकर्ता आहे. CLI टूल तुम्हाला सबग्राफ तयार करण्याच्या पायऱ्यांमधून मार्गदर्शन करेल, यासह: +तुमचा subgraph slug तुमच्या subgraph साठी एक ओळखकर्ता आहे. CLI tool तुम्हाला subgraph तयार करण्याच्या through the steps मार्गदर्शन करेल, including: - प्रोटोकॉल: इथरियम - सबग्राफ स्लग: `` From 4140320eda6fb54af488026a03b112c5fdf10815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:15 -0400 Subject: [PATCH 406/924] New translations mips-faqs.mdx (Czech) --- website/pages/cs/mips-faqs.mdx | 84 +++++++++++++++++----------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/website/pages/cs/mips-faqs.mdx b/website/pages/cs/mips-faqs.mdx index ae460989f96e..82eaf0c0fe5d 100644 --- a/website/pages/cs/mips-faqs.mdx +++ b/website/pages/cs/mips-faqs.mdx @@ -2,89 +2,89 @@ title: MIPs FAQs --- -## Introduction +## Úvod -> Note: the MIPs program is closed as of May 2023. Thank you to all the Indexers who participated! +> Poznámka: program MIPs je od května 2023 uzavřen. Děkujeme všem indexátorům, kteří se programu zúčastnili! -It's an exciting time to be participating in The Graph ecosystem! During [Graph Day 2022](https://thegraph.com/graph-day/2022/) Yaniv Tal announced the [sunsetting of the hosted service](https://thegraph.com/blog/sunsetting-hosted-service/), a moment The Graph ecosystem has been working towards for many years. +Účast v ekosystému Grafu je vzrušující! Během [Dne Grafu 2022](https://thegraph.com/graph-day/2022/) Yaniv Tal oznámil [ukončení hostované služby](https://thegraph.com/blog/sunsetting-hosted-service/), což je okamžik, na kterém ekosystém Graf pracoval mnoho let. -To support the sunsetting of the hosted service and the migration of all of it's activity to the decentralized network, The Graph Foundation has announced the [Migration Infrastructure Providers (MIPs) program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program). +Nadace The Graph Foundation vyhlásila program [Migration Infrastructure Providers (MIPs)](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program), který má podpořit ukončení hostované služby a migraci všech jejích aktivit do decentralizované sítě. -The MIPs program is an incentivization program for Indexers to support them with resources to index chains beyond Ethereum mainnet and help The Graph protocol expand the decentralized network into a multi-chain infrastructure layer. +Program MIPs je motivační program pro indexátory, který je podporuje zdroji pro indexování řetězců mimo mainnet Ethereum a pomáhá protokolu The Graph rozšířit decentralizovanou síť na infrastrukturní vrstvu s více řetězci. -The MIPs program has allocated 0.75% of the GRT supply (75M GRT), with 0.5% to reward Indexers who contribute to bootstrapping the network and 0.25% allocated to Network Grants for subgraph developers using multi-chain subgraphs. +Program MIPs vyčlenil 0.75% zásoby GRT (75M GRT), přičemž 0.5% je určeno na odměnu indexátorům, kteří přispívají k zavádění sítě, a 0.25% na síťové granty pro vývojáře podgrafů využívajících víceřetězcové podgrafy. -### Useful Resources +### Užitečné zdroje - [Indexer 2ools from Vincent (Victor) Taglia](https://indexer-2ools.vincenttaglia.com/#/) -- [How to Become an Effective Indexer on The Graph Network](https://thegraph.com/blog/how-to-become-indexer/) +- [Jak se stát efektivním indexátorem v síti Graf](https://thegraph.com/blog/how-to-become-indexer/) - [Indexer Knowledge Hub](https://thegraph.academy/indexers/) -- [Allocation Optimiser](https://github.com/graphprotocol/allocationopt.jl) -- [Allocation Optimization Tooling](https://github.com/anyblockanalytics/thegraph-allocation-optimization/) +- [Optimalizátor přidělování](https://github.com/graphprotocol/allocationopt.jl) +- [Nástroje pro optimalizaci přidělování](https://github.com/anyblockanalytics/thegraph-allocation-optimization/) -### 1. Is it possible to generate a valid proof of indexing (POI) even if a subgraph has failed? +### 1. Je možné vygenerovat platný důkaz indexace (POI), i když podgraf selhal? -Yes, it is indeed. +Ano, je to tak. -For context, the arbitration charter, [learn more about the charter here](https://hackmd.io/@4Ln8SAS4RX-505bIHZTeRw/BJcHzpHDu#Abstract), specifies the methodology for generating a POI for a failed subgraph. +Pro představu, charta rozhodčího řízení [více informací o chartě naleznete zde](https://hackmd.io/@4Ln8SAS4RX-505bIHZTeRw/BJcHzpHDu#Abstract) specifikuje metodiku generování POI pro neúspěšný podgraf. -A community member, [SunTzu](https://github.com/suntzu93), has created a script to automate this process in compliance with the arbitration charter's methodology. Check out the repo [here](https://github.com/suntzu93/get_valid_poi_subgraph). +Člen komunity [SunTzu](https://github.com/suntzu93) vytvořil skript, který tento proces automatizuje v souladu s metodikou charty rozhodčího řízení. Podívejte se na repo [zde](https://github.com/suntzu93/get_valid_poi_subgraph). -### 2. Which chain will the MIPs program incentivise first? +### 2. Který řetězec bude program MIPs motivovat jako první? -The first chain that will be supported on the decentralized network is Gnosis Chain! Formerly known as xDAI, Gnosis Chain is an EVM-based chain. Gnosis Chain was selected as the first given its user-friendliness of running nodes, Indexer readiness, alignment with The Graph and adoption within web3. +Prvním řetězcem, který bude v decentralizované síti podporován, je Gnosis Chain! Gnosis Chain, dříve známý jako xDAI, je řetězec založený na EVM. Gnosis Chain byl vybrán jako první vzhledem k uživatelské přívětivosti běžících uzlů, připravenosti Indexeru, souladu s Graf a přijetí v rámci web3. -### 3. How will new chains be added to the MIPs program? +### 3. Jak budou do programu MIP přidávány nové řetězce? -New chains will be announced throughout the MIPs program, based on Indexer readiness, demand, and community sentiment. Chains will firstly be supported on the testnet and, subsequently, a GIP will be passed to support that chain on mainnet. Indexers participating in the MIPs program will choose which chains they are interested in supporting and will earn rewards per chain, in addition to earning query fees and indexing rewards on the network for serving subgraphs. MIPs participants will be scored based on their performance, ability to serve network needs, and community support. +Nové řetězce budou vyhlašovány v průběhu programu MIPs na základě připravenosti indexátorů, poptávky a nálady komunity. Řetězce budou nejprve podporovány v testnetu a následně bude schválen GIP, který bude daný řetězec podporovat v mainnetu. Indexátoři účastnící se programu MIPs si vyberou, které řetězce mají zájem podporovat, a budou získávat odměny za každý řetězec, kromě toho budou získávat poplatky za dotazy a odměny za indexování v síti za obsluhu podgrafů. Účastníci programu MIPs budou hodnoceni na základě svého výkonu, schopnosti sloužit potřebám sítě a podpory komunity. -### 4. How will we know when the network is ready for a new chain? +### 4. Jak poznáme, že je síť připravena na nový řetězec? -The Graph Foundation will be monitoring QoS performance metrics, network performance and community channels to best assess readiness. The priority is ensuring the network meets performance needs for those multi-chain dapps to be able to migrate their subgraphs. +Nadace Graf bude sledovat výkonnostní metriky QoS, výkonnost sítě a komunitní kanály, aby mohla co nejlépe posoudit připravenost. Prioritou je zajistit, aby síť splňovala výkonnostní potřeby těch víceřetězcových dapů, které budou moci migrovat své podgrafy. -### 5. How are rewards divided per chain? +### 5. Jak jsou odměny rozděleny do jednotlivých řetězců? -Given that chains vary in their requirements for syncing nodes, and they differ in query volume and adoption, rewards per chain will be decided at the end of that chain's cycle to ensure that all feedback and learnings are captured. However, at all times Indexers will also be able to earn query fees and indexing rewards once the chain is supported on the network. +Vzhledem k tomu, že se řetězce liší svými požadavky na sync uzly a liší se i objemem dotazů a jejich přijetím, bude o odměnách pro každý řetězec rozhodnuto na konci cyklu daného řetězce, aby se zajistilo, že budou zachyceny všechny zpětné vazby a poznatky. V každém okamžiku však budou moci indexátoři získávat také odměny za dotazy a indexaci, jakmile bude řetězec v síti podporován. -### 6. Do we need to index all the chains in the MIPs program or can we pick just one chain and index that? +### 6. Musíme indexovat všechny řetězce v programu MIPs, nebo můžeme vybrat jen jeden řetězec a indexovat ho? -You are welcome to index whichever chain you'd like! The goal of the MIPs program is to equip Indexers with the tools & knowledge to index the chains they desire and support the web3 ecosystems they are interested in. However, for every chain, there are phases from testnet to mainnet. Make sure to complete all the phases for the chains you are indexing. See [The MIPs notion page](https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059) to learn more about the phases. +Můžete indexovat libovolný řetězec! Cílem programu MIPs je vybavit indexátory nástroji a znalostmi, aby mohli indexovat řetězce, které si přejí, a podporovat ekosystémy web3, o které mají zájem. Pro každý řetězec však existují fáze od testnet po mainnet. Ujistěte se, že jste absolvovali všechny fáze pro řetězce, které indexujete. Více informací o fázích naleznete na stránce [The MIPs notion page](https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059). -### 7. When will rewards be distributed? +### 7. Kdy budou odměny rozděleny? -MIPs rewards will be distributed per chain once performance metrics are met and migrated subgraphs are supported by those Indexers. Look out for info about the total rewards per chain mid-way through that chain's cycle. +Odměny MIP budou rozděleny na řetězce, jakmile budou splněny výkonnostní metriky a migrované podgrafy budou těmito indexéry podporovány. Informace o celkových odměnách za řetězec najdete v polovině cyklu daného řetězce. -### 8. How does scoring work? +### jak funguje bodování? -Indexers will compete for rewards based on scoring throughout the program on the leaderboard. Program scoring will be based on: +Indexátoři budou soutěžit o odměny na základě bodového hodnocení v průběhu celého programu na žebříčku. Bodování programu bude založeno na: -**Subgraph Coverage** +**pokrytí podgraf** -- Are you providing maximal support for subgraphs per chain? +- Poskytujete maximální podporu podgrafů na řetězec? -- During MIPs, large Indexers are expected to stake 50%+ of subgraphs per chain they support. +- Během MIP se od velkých indexátorů očekává, že budou sázet více než 50% podgrafů na řetězec, který podporují. -**Quality Of Service** +**Kvalita služeb** -- Is the Indexer serving the chain with good Quality of Service (latency, fresh data, uptime, etc.)? +- Obsluhuje indexer řetězec s dobrou kvalitou služby (latence, čerstvá data, provozuschopnost atd.)? -- Is the Indexer supporting dapp developers being reactive to their needs? +- Podporuje Indexer vývojáře dapp a reaguje na jejich potřeby? -Is Indexer allocating efficiently, contributing to the overall health of the network? +Přiděluje indexer efektivně a přispívá k celkovému stavu sítě? -**Community Support** +**Podpora komunity** -- Is Indexer collaborating with fellow Indexers to help them get set up for multi-chain? +- Spolupracuje Indexer s ostatními Indexery, aby jim pomohl s nastavením pro multi-chain? -- Is Indexer providing feedback to core devs throughout the program or sharing information with Indexers in the Forum? +- Poskytuje Indexer v průběhu programu zpětnou vazbu hlavním vývojářům nebo sdílí informace s Indexery na fórum? -### 9. How will the Discord role be assigned? +### 9. Jak bude přidělena role Discord? -Moderators will assign the roles in the next few days. +Moderátoři přidělí role v následujících dnech. -### 10. Is it okay to start the program on a testnet and then switch to Mainnet? Will you be able to identify my node and take it into account while distributing rewards? +### 10. Je v pořádku spustit program v testovací síti a poté přepnout na Mainnet? Budete schopni identifikovat můj uzel a zohlednit ho při rozdělování odměn? -Yes, it is actually expected of you to do so. Several phases are on Görli and one is on the mainnet. +Ano, ve skutečnosti se to od vás očekává. Několik fází je na Görli a jedna je na mainnetu. ### 11. At what point do you expect participants to add a mainnet deployment? From 2b538ca1621d4b0defc753620f5a6a31a6a531c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:16 -0400 Subject: [PATCH 407/924] New translations mips-faqs.mdx (Italian) --- website/pages/it/mips-faqs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/it/mips-faqs.mdx b/website/pages/it/mips-faqs.mdx index ae460989f96e..69bc785ee5ef 100644 --- a/website/pages/it/mips-faqs.mdx +++ b/website/pages/it/mips-faqs.mdx @@ -2,7 +2,7 @@ title: MIPs FAQs --- -## Introduction +## Introduzione > Note: the MIPs program is closed as of May 2023. Thank you to all the Indexers who participated! From f68bdda0419172e68893247394ea3ebf38348375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:17 -0400 Subject: [PATCH 408/924] New translations mips-faqs.mdx (Japanese) --- website/pages/ja/mips-faqs.mdx | 108 ++++++++++++++++----------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/website/pages/ja/mips-faqs.mdx b/website/pages/ja/mips-faqs.mdx index c82399db143f..b9d0538f7fa5 100644 --- a/website/pages/ja/mips-faqs.mdx +++ b/website/pages/ja/mips-faqs.mdx @@ -4,17 +4,17 @@ title: MIPs FAQs ## イントロダクション -> Note: the MIPs program is closed as of May 2023. Thank you to all the Indexers who participated! +> 注意:2023年5月をもって、MIPsプログラムは終了しました。参加してくれたすべてのインデクサーに感謝します! -It's an exciting time to be participating in The Graph ecosystem! During [Graph Day 2022](https://thegraph.com/graph-day/2022/) Yaniv Tal announced the [sunsetting of the hosted service](https://thegraph.com/blog/sunsetting-hosted-service/), a moment The Graph ecosystem has been working towards for many years. +The Graph エコシステムに参加できるのは今がエキサイティングな時期です。 [Graph Day 2022](https://thegraph.com/graph-day/2022/) 中に、Yaniv Tal は [sunsetting of the hosted service](https://thegraph.com/blog/sunsetting-hosted-service/) を発表しました。 )、グラフ エコシステムが長年にわたって取り組んできた瞬間です。 To support the sunsetting of the hosted service and the migration of all of it's activity to the decentralized network, The Graph Foundation has announced the [Migration Infrastructure Providers (MIPs) program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program). -The MIPs program is an incentivization program for Indexers to support them with resources to index chains beyond Ethereum mainnet and help The Graph protocol expand the decentralized network into a multi-chain infrastructure layer. +MIPsプログラムは、Indexersをサポートするためのインセンティブプログラムで、Ethereumメインネット以外のチェーンをインデックスするためのリソースを提供し、The Graphプロトコルを分散型ネットワークを多チェーンのインフラストラクチャレイヤーに拡張するのを支援します。 -The MIPs program has allocated 0.75% of the GRT supply (75M GRT), with 0.5% to reward Indexers who contribute to bootstrapping the network and 0.25% allocated to Network Grants for subgraph developers using multi-chain subgraphs. +MIPsプログラムは、GRT供給量の0.75%(75M GRT)を割り当てており、ネットワークをブートストラップするのに貢献するIndexersに0.5%が割り当てられ、マルチチェーンサブグラフを使用するサブグラフ開発者向けのネットワークグラントに0.25%が割り当てられています。 -### Useful Resources +### 役立つリソース - [Indexer 2ools from Vincent (Victor) Taglia](https://indexer-2ools.vincenttaglia.com/#/) - [How to Become an Effective Indexer on The Graph Network](https://thegraph.com/blog/how-to-become-indexer/) @@ -22,106 +22,106 @@ The MIPs program has allocated 0.75% of the GRT supply (75M GRT), with 0.5% to r - [Allocation Optimiser](https://github.com/graphprotocol/allocationopt.jl) - [Allocation Optimization Tooling](https://github.com/anyblockanalytics/thegraph-allocation-optimization/) -### 1. Is it possible to generate a valid proof of indexing (POI) even if a subgraph has failed? +### 1. サブグラフが失敗した場合でも、有効なインデックス付け証明 (POI) を生成することは可能ですか? -Yes, it is indeed. +はい、確かにそうです。 -For context, the arbitration charter, [learn more about the charter here](https://hackmd.io/@4Ln8SAS4RX-505bIHZTeRw/BJcHzpHDu#Abstract), specifies the methodology for generating a POI for a failed subgraph. +文脈としては、仲裁憲章 [learn more about the charter here](https://hackmd.io/@4Ln8SAS4RX-505bIHZTeRw/BJcHzpHDu#Abstract) では、失敗したサブグラフの POI を生成する方法が指定されています。 -A community member, [SunTzu](https://github.com/suntzu93), has created a script to automate this process in compliance with the arbitration charter's methodology. Check out the repo [here](https://github.com/suntzu93/get_valid_poi_subgraph). +コミュニティ メンバーである [SunTzu](https://github.com/suntzu93) は、仲裁憲章の方法論に準拠してこのプロセスを自動化するスクリプトを作成しました。 リポジトリは [here](https://github.com/suntzu93/get_valid_poi_subgraph) をご覧ください。 -### 2. Which chain will the MIPs program incentivise first? +### 2. MIP プログラムはどのチェーンを最初に奨励しますか? -The first chain that will be supported on the decentralized network is Gnosis Chain! Formerly known as xDAI, Gnosis Chain is an EVM-based chain. Gnosis Chain was selected as the first given its user-friendliness of running nodes, Indexer readiness, alignment with The Graph and adoption within web3. +分散型ネットワークでサポートされる最初のチェーンはGnosis Chainです!以前はxDAIとして知られていましたが、Gnosis ChainはEVMベースのチェーンです。Gnosis Chainは、ノードの実行のユーザーフレンドリーさ、Indexerの準備度、The Graphとの整合性、およびweb3内での採用に基づいて、最初に選ばれました。 -### 3. How will new chains be added to the MIPs program? +### 3. 新しいチェーンはどのようにして MIP プログラムに追加されますか? -New chains will be announced throughout the MIPs program, based on Indexer readiness, demand, and community sentiment. Chains will firstly be supported on the testnet and, subsequently, a GIP will be passed to support that chain on mainnet. Indexers participating in the MIPs program will choose which chains they are interested in supporting and will earn rewards per chain, in addition to earning query fees and indexing rewards on the network for serving subgraphs. MIPs participants will be scored based on their performance, ability to serve network needs, and community support. +新しいチェーンはMIPsプログラムを通じて発表され、Indexerの準備度、需要、およびコミュニティの意向に基づいています。チェーンはまずテストネットでサポートされ、その後、そのチェーンをメインネットでサポートするためのGIPが承認されます。MIPsプログラムに参加するIndexersは、どのチェーンをサポートしたいかを選択し、サブグラフの提供に対するネットワークでのクエリ料金やインデックスの報酬に加えて、各チェーンごとに報酬を獲得します。MIPsの参加者は、パフォーマンス、ネットワークのニーズへの対応能力、およびコミュニティの支持に基づいて評価されます。 -### 4. How will we know when the network is ready for a new chain? +### 4. ネットワークが新しいチェーンの準備ができたことをどのようにして知ることができますか? -The Graph Foundation will be monitoring QoS performance metrics, network performance and community channels to best assess readiness. The priority is ensuring the network meets performance needs for those multi-chain dapps to be able to migrate their subgraphs. +The Graph Foundationは、QoSパフォーマンスメトリクス、ネットワークのパフォーマンス、およびコミュニティチャネルを監視し、最適な準備状況を評価します。最優先事項は、マルチチェーンのdappがサブグラフを移行できるように、ネットワークがパフォーマンスの要件を満たすことです。 -### 5. How are rewards divided per chain? +### 5. 報酬はチェーンごとにどのように分割されますか? -Given that chains vary in their requirements for syncing nodes, and they differ in query volume and adoption, rewards per chain will be decided at the end of that chain's cycle to ensure that all feedback and learnings are captured. However, at all times Indexers will also be able to earn query fees and indexing rewards once the chain is supported on the network. +各チェーンは、ノードの同期に必要な要件やクエリのボリューム、採用度に違いがあるため、各チェーンごとの報酬はそのチェーンのサイクルの最後に決定されます。これにより、すべてのフィードバックと学びを収集できます。ただし、いつでもIndexersはネットワークでサポートされると、クエリ料金とインデックスの報酬を獲得できるようになります。 -### 6. Do we need to index all the chains in the MIPs program or can we pick just one chain and index that? +### 6. MIP プログラム内のすべてのチェーンにインデックスを付ける必要がありますか、それとも 1 つのチェーンだけを選択してインデックスを付けることができますか? -You are welcome to index whichever chain you'd like! The goal of the MIPs program is to equip Indexers with the tools & knowledge to index the chains they desire and support the web3 ecosystems they are interested in. However, for every chain, there are phases from testnet to mainnet. Make sure to complete all the phases for the chains you are indexing. See [The MIPs notion page](https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059) to learn more about the phases. +どのチェーンでもインデックスを行うことができます!MIPsプログラムの目標は、Indexersに希望するチェーンをインデックスし、興味を持つweb3エコシステムをサポートするためのツールと知識を提供することです。ただし、すべてのチェーンにはテストネットからメインネットまでのフェーズがあります。インデックスを行うチェーンのすべてのフェーズを完了するようにしてください。フェーズについて詳しくは[The MIPs notion page](https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059)をご覧ください。 -### 7. When will rewards be distributed? +### 7. 報酬はいつ配布されますか? -MIPs rewards will be distributed per chain once performance metrics are met and migrated subgraphs are supported by those Indexers. Look out for info about the total rewards per chain mid-way through that chain's cycle. +MIPsの報酬は、パフォーマンスメトリクスが達成され、移行されたサブグラフがそれらのIndexersによってサポートされると、チェーンごとに分配されます。チェーンのサイクルの中間点を通じて、各チェーンごとの総報酬に関する情報をお待ちください。 -### 8. How does scoring work? +### 8. スコアリングはどのように行われますか? -Indexers will compete for rewards based on scoring throughout the program on the leaderboard. Program scoring will be based on: +インデクサーは、プログラム全体のリーダーボードのスコアに基づいて報酬を求めて競い合います。 プログラムの採点は以下に基づいて行われます。 **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. +- MIP 中に、大規模なインデクサーは、サポートするチェーンごとに 50% 以上のサブグラフをステークすることが期待されます。 **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? +- インデクサーは dapp 開発者をサポートし、彼らのニーズに対応していますか? -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? +- Indexer は他の Indexer と協力して、マルチチェーンのセットアップを支援していますか? -- Is Indexer providing feedback to core devs throughout the program or sharing information with Indexers in the Forum? +- インデクサーはプログラム全体を通じてコア開発者にフィードバックを提供していますか、それともフォーラムでインデクサーと情報を共有していますか? -### 9. How will the Discord role be assigned? +### 9. Discord の役割はどのように割り当てられますか? -Moderators will assign the roles in the next few days. +モデレータは数日以内に役割を割り当てます。 -### 10. Is it okay to start the program on a testnet and then switch to Mainnet? Will you be able to identify my node and take it into account while distributing rewards? +### 10. テストネットでプログラムを開始してからメインネットに切り替えても問題ありませんか? 私のノードを特定して、報酬を配布する際に考慮してもらえますか? -Yes, it is actually expected of you to do so. Several phases are on Görli and one is on the mainnet. +はい、実際にそれを行うことが期待されています。いくつかのフェーズはGörliで行われ、1つはメインネットで行われます。 -### 11. At what point do you expect participants to add a mainnet deployment? +### 11. どの時点で参加者がメインネットのデプロイメントを追加すると予想されますか? -There will be a requirement to have a mainnet indexer during phase 3. More infomation on this will be [shared in this notion page soon.](https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059) +フェーズ 3 では、メインネット インデクサーが必要になります。これに関する詳細は、[shared in this notion page soon.](https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059) -### 12. Will rewards be subject to vesting? +### 12. 報酬は権利確定の対象になりますか? -The percentage to be distributed at the end of the program will be subject to vesting. More on this will be shared in the Indexer Agreement. +プログラムの最後に分配される割合はベスティングの対象となります。詳細についてはインデクサー契約で共有されます。 -### 13. For teams with more than one member, will all the team members be given a MIPs Discord role? +### 13. 複数のメンバーがいるチームの場合、チームメンバー全員に MIPs Discord の役割が与えられますか? -Yes +はい -### 14. Is it possible to use the locked tokens from the graph curator program to participate in the MIPs testnet? +### 14. グラフ キュレーター プログラムのロックされたトークンを使用して MIP テストネットに参加することはできますか? -Yes +はい -### 15. During the MIPs program, will there be a period to dispute invalid POI? +### 15. MIP プログラム中に、無効な POI に対して異議を申し立てる期間はありますか? -To be decided. Please return to this page periodically for more details on this or if your request is urgent, please email info@thegraph.foundation +決まっていません。詳細については定期的にこのページを確認するか、緊急の場合はinfo@thegraph.foundationまでメールでお問い合わせください。 -### 17. Can we combine two vesting contracts? +### 17. 2 つの権利確定契約を組み合わせることはできますか? -No. The options are: you can delegate one to the other one or run two separate indexers. +いいえ。選択肢は以下の通りです:どちらか一方に委任するか、2つの別々のインデクサを実行することができます。 -### 18. KYC Questions? +### 18. KYCに関する質問? -Please email info@thegraph.foundation +Info@thegraph.foundation にメールしてください。 -### 19. I am not ready to index Gnosis chain, can I jump in and start indexing from another chain when I am ready? +### 19. Gnosis チェーンにインデックスを付ける準備ができていません。準備ができたら、すぐに別のチェーンからインデックスを作成できますか? -Yes +はい -### 20. Are there recommended regions to run the servers? +### 20. サーバーを実行するのに推奨されるリージョンはありますか? -We do not give recommendations on regions. When picking locations you might want to think about where the major markets are for cryptocurrencies. +地域についての推奨事項は提供していません。場所を選ぶ際に考慮すべきポイントとして、仮想通貨の主要な市場がどこにあるかを考えることができます。 -### 21. What is “handler gas cost”? +### 21.「ハンドラーガスコスト」とは何ですか? -It is the deterministic measure of the cost of executing a handler. Contrary to what the name might suggest, it is not related to the gas cost on blockchains. +これはハンドラを実行するためのコストの決定論的な尺度です。名前から連想されるかもしれませんが、これはブロックチェーン上のガスコストとは関係ありません。 From c5d59009ba93fadf916f77f085aee71cc18bffc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:20 -0400 Subject: [PATCH 409/924] New translations mips-faqs.mdx (Swedish) --- website/pages/sv/mips-faqs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/mips-faqs.mdx b/website/pages/sv/mips-faqs.mdx index 0613c6c3d7c1..2f53debe4124 100644 --- a/website/pages/sv/mips-faqs.mdx +++ b/website/pages/sv/mips-faqs.mdx @@ -88,7 +88,7 @@ Ja, det förväntas faktiskt av dig att göra det. Flera faser är på Görli oc ### 11. När förväntar du dig att deltagarna lägger till en distribution av ett mainnet? -Det kommer att finnas ett krav på att ha en mainnet indexerare under fas 3. Mer information om detta kommer att [delas på denna begreppssida inom kort] \(https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059) +Det kommer att finnas ett krav på att ha en mainnet indexerare under fas 3. Mer information om detta kommer att [delas på denna begreppssida inom kort] (https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059) ### 12. Kommer belöningar att bli föremål för intjänande? From 1e470791c57d03a5dd3442e3cc2898520945a38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:21 -0400 Subject: [PATCH 410/924] New translations mips-faqs.mdx (Turkish) --- website/pages/tr/mips-faqs.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/tr/mips-faqs.mdx b/website/pages/tr/mips-faqs.mdx index 9b0c4451e9b6..adc8c63a6485 100644 --- a/website/pages/tr/mips-faqs.mdx +++ b/website/pages/tr/mips-faqs.mdx @@ -8,7 +8,7 @@ title: MIP SSS Graph ekosistemine katılmak için heyecan verici bir zaman! Yaniv Tal, Graph Day 2022](https://thegraph.com/graph-day/2022/) sırasında Graph ekosisteminin uzun yıllardır üzerinde çalıştığı bir an olan [barındırılan hizmetin kullanımdan kaldırılacağını](https://thegraph.com/blog/sunsetting-hosted-service/) duyurdu. -Barındırılan hizmetin kullanımdan kaldırılması ve tüm faaliyetlerinin merkeziyetsiz ağa taşınmasını desteklemek için Graph Vakfı [Geçiş Altyapısı Sağlayıcıları (MIPs) programını] \(https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program) duyurdu. +Barındırılan hizmetin kullanımdan kaldırılması ve tüm faaliyetlerinin merkeziyetsiz ağa taşınmasını desteklemek için Graph Vakfı [Geçiş Altyapısı Sağlayıcıları (crwd)lbracketdwrcMIPs programını] (https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program) duyurdu. MIPs programı, Ethereum ana ağının dışındaki zincirleri indekslemek ve Graph protokolü'nün merkeziyetsiz ağı çok zincirli bir altyapı katmanına genişletmesine yardımcı olmak için kaynaklarla İndeksleyicilere desteklemeyi amaçlayan bir teşvik programıdır. @@ -26,7 +26,7 @@ MIPs programı, GRT arzının %0,75'inin (75 milyon GRT), %0,5'ini ağın önyü Evet, gerçekten de öyle. -Bağlam için, tahkim tüzüğü [tüzük hakkında daha fazla bilgiyi buradan edinebilirsiniz] \(https://hackmd.io/@4Ln8SAS4RX-505bIHZTeRw/BJcHzpHDu#Abstract), başarısız bir subgraph için POI oluşturma metodolojisini belirtir. +Bağlam için, tahkim tüzüğü [tüzük hakkında daha fazla bilgiyi buradan edinebilirsiniz] (https://hackmd.io/@4Ln8SAS4RX-505bIHZTeRw/BJcHzpHDu#Abstract), başarısız bir subgraph için POI oluşturma metodolojisini belirtir. Topluluk üyelerinden [SunTzu](https://github.com/suntzu93), bu süreci tahkim tüzüğünün metodolojisine uygun olarak otomatikleştirmek için bir script oluşturdu. Github deposuna göz atın [here](https://github.com/suntzu93/get_valid_poi_subgraph). @@ -48,7 +48,7 @@ Zincirlerin düğümleri senkronize etme gereksinimleri, sorgu hacmi ve benimsem ### 6. MIPs programındaki tüm zincirleri indekslememiz mi gerekiyor yoksa sadece bir zincir seçip onu indeksleyebilir miyiz? -İstediğiniz zinciri indeksleyebilirsiniz! MIPs programının amacı, İndeksleyicileri istedikleri zincirleri indekslemeleri ve ilgilendikleri web3 ekosistemlerini desteklemeleri için ihtiyaç duydukları araç ve bilgilerle donatmaktır. Bununla birlikte, her zincir için test ağından ana ağa kadar aşamalar bulunmaktadır. İndekslediğiniz zincirler için tüm aşamaları tamamladığınızdan emin olun. Aşamalar hakkında daha fazla bilgi edinmek için [MIPs notion sayfasına] \(https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059) göz atın. +İstediğiniz zinciri indeksleyebilirsiniz! MIPs programının amacı, İndeksleyicileri istedikleri zincirleri indekslemeleri ve ilgilendikleri web3 ekosistemlerini desteklemeleri için ihtiyaç duydukları araç ve bilgilerle donatmaktır. Bununla birlikte, her zincir için test ağından ana ağa kadar aşamalar bulunmaktadır. İndekslediğiniz zincirler için tüm aşamaları tamamladığınızdan emin olun. Aşamalar hakkında daha fazla bilgi edinmek için [MIPs notion sayfasına] (https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059) göz atın. ### 7. Ödüller ne zaman dağıtılacak? From 55b3228a85c7e3af1089ec38ca055c76e9899703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:22 -0400 Subject: [PATCH 411/924] New translations mips-faqs.mdx (Ukrainian) --- website/pages/uk/mips-faqs.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/uk/mips-faqs.mdx b/website/pages/uk/mips-faqs.mdx index 0388446d07d1..7f39862c23ec 100644 --- a/website/pages/uk/mips-faqs.mdx +++ b/website/pages/uk/mips-faqs.mdx @@ -6,9 +6,9 @@ title: MIPs FAQs > Примітка: програма MIPs закрита з травня 2023 року. Дякуємо всім індексаторам, які взяли участь! -Це чудовий час для того, щоб взяти участь в екосистемі The graph. Протягом [Graph Day 2022] \(https://thegraph.com/graph-day/2022/) Yaniv Tal анонсував [sunsetting of the hosted service](https://thegraph.com/blog/sunsetting-hosted-service/), момент, для якого екосистема The Graph працювала протягом багатьох років. +Це чудовий час для того, щоб взяти участь в екосистемі The graph. Протягом [Graph Day 2022] (https://thegraph.com/graph-day/2022/) Yaniv Tal анонсував [sunsetting of the hosted service](https://thegraph.com/blog/sunsetting-hosted-service/), момент, для якого екосистема The Graph працювала протягом багатьох років. -Щоб підтримати завершення роботи хостингового сервісу та перенесення всієї активності в децентралізовану мережу, The Graph Foundation оголосив про [Migration Infrastructure Providers (MIPs) program] \(https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program). +Щоб підтримати завершення роботи хостингового сервісу та перенесення всієї активності в децентралізовану мережу, The Graph Foundation оголосив про [Migration Infrastructure Providers (crwd)lbracketdwrcMIPs program] (https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program). Програма MIPs - це оплачувана програма для Індексаторів, яка надає їм необхідні ресурси для індексації різних мереж, за межами мережі Ethereum і допомагає протоколу The Graph розширити децентралізовану мережу до рівня мультичейн інфраструктури. @@ -28,7 +28,7 @@ title: MIPs FAQs Для довідки, arbitration charter \[дізнатися більше про charter можете тут (https://hackmd.io/@4Ln8SAS4RX-505bIHZTeRw/BJcHzpHDu#Abstract) визначає методологію генерації POI для невдалого підграфа. -Учасник спільноти [SunTzu] \(https://github.com/suntzu93) створив скрипт для автоматизації цього процесу відповідно до методології arbitration charter. Ознайомтеся з ним [here](https://github.com/suntzu93/get_valid_poi_subgraph). +Учасник спільноти [SunTzu] (https://github.com/suntzu93) створив скрипт для автоматизації цього процесу відповідно до методології arbitration charter. Ознайомтеся з ним [here](https://github.com/suntzu93/get_valid_poi_subgraph). ### 2. Яка мережа буде стимулюватись програмою MIPs в першу чергу? From 7f6bbfb93f6b792a490447a3c7324ea411eff635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:23 -0400 Subject: [PATCH 412/924] New translations mips-faqs.mdx (Chinese Simplified) --- website/pages/zh/mips-faqs.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/zh/mips-faqs.mdx b/website/pages/zh/mips-faqs.mdx index 7c3d594dd78b..b99b7aabbfd2 100644 --- a/website/pages/zh/mips-faqs.mdx +++ b/website/pages/zh/mips-faqs.mdx @@ -4,9 +4,9 @@ title: MIP常见问题解答 ## 介绍 -> Note: the MIPs program is closed as of May 2023. Thank you to all the Indexers who participated! +> 注意:自2023年5月起,MIPs项目已关闭。感谢所有参与的索引人! -It's an exciting time to be participating in The Graph ecosystem! During [Graph Day 2022](https://thegraph.com/graph-day/2022/) Yaniv Tal announced the [sunsetting of the hosted service](https://thegraph.com/blog/sunsetting-hosted-service/), a moment The Graph ecosystem has been working towards for many years. +这是一个可以参与Graph生态系统,激动人心的时刻!2022年[Graph日]期间(https://thegraph.com/graph-day/2022/)Yaniv Tal宣布[即将结束托管服务](https://thegraph.com/blog/sunsetting-hosted-service/),这是Graph生态系统多年来一直致力于的一刻。 To support the sunsetting of the hosted service and the migration of all of it's activity to the decentralized network, The Graph Foundation has announced the [Migration Infrastructure Providers (MIPs) program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program). From be726a0d5a9e9b29c37cf20ef417a6d1cac16108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:25 -0400 Subject: [PATCH 413/924] New translations mips-faqs.mdx (Marathi) --- website/pages/mr/mips-faqs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/mr/mips-faqs.mdx b/website/pages/mr/mips-faqs.mdx index b15170173b84..ae460989f96e 100644 --- a/website/pages/mr/mips-faqs.mdx +++ b/website/pages/mr/mips-faqs.mdx @@ -2,7 +2,7 @@ title: MIPs FAQs --- -## परिचय +## Introduction > Note: the MIPs program is closed as of May 2023. Thank you to all the Indexers who participated! From 9550bb9cf27c8f19e932ca6f1c6aab34b15a29e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:28 -0400 Subject: [PATCH 414/924] New translations graphcast.mdx (French) --- website/pages/fr/graphcast.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/fr/graphcast.mdx b/website/pages/fr/graphcast.mdx index ad65e428d144..d77344729d13 100644 --- a/website/pages/fr/graphcast.mdx +++ b/website/pages/fr/graphcast.mdx @@ -4,18 +4,18 @@ title: Graphcast ## Présentation -Is there something you'd like to learn from or share with your fellow Indexers in an automated manner, but it's too much hassle or costs too much gas? +Y a-t-il quelque chose que vous aimeriez apprendre ou partager avec vos collègues indexeurs de manière automatisée, mais c'est trop compliqué ou coûte trop cher ? -Currently, the cost to broadcast information to other network participants is determined by gas fees on the Ethereum blockchain. Graphcast solves this problem by acting as an optional decentralized, distributed peer-to-peer (P2P) communication tool that allows Indexers across the network to exchange information in real time. The cost of exchanging P2P messages is near zero, with the tradeoff of no data integrity guarantees. Nevertheless, Graphcast aims to provide message validity guarantees (i.e. that the message is valid and signed by a known protocol participant) with an open design space of reputation models. +Actuellement, le coût de diffusion d’informations vers d’autres participants au réseau est déterminé par les frais de gaz sur la blockchain Ethereum. Graphcast résout ce problème en agissant comme un outil de communication peer-to-peer (P2P) décentralisé et distribué en option qui permet aux indexeurs du réseau d'échanger des informations en temps réel. Le coût de l’échange de messages P2P est proche de zéro, sans aucune garantie d’intégrité des données. Néanmoins, Graphcast vise à fournir des garanties de validité du message (c'est-à-dire que le message est valide et signé par un participant au protocole connu) avec un espace de conception ouvert de modèles de réputation. -The Graphcast SDK (Software Development Kit) allows developers to build Radios, which are gossip-powered applications that Indexers can run to serve a given purpose. We also intend to create a few Radios (or provide support to other developers/teams that wish to build Radios) for the following use cases: +Le SDK Graphcast (Software Development Kit) permet aux développeurs de créer des radios, qui sont des applications basées sur les potins que les indexeurs peuvent exécuter dans un but donné. Nous avons également l'intention de créer quelques radios (ou de fournir une assistance à d'autres développeurs/équipes qui souhaitent créer des radios) pour les cas d'utilisation suivants : - Real-time cross-checking of subgraph data integrity ([Subgraph Radio](https://docs.graphops.xyz/graphcast/radios/subgraph-radio)). - Conducting auctions and coordination for warp syncing subgraphs, substreams, and Firehose data from other Indexers. -- Self-reporting on active query analytics, including subgraph request volumes, fee volumes, etc. -- Self-reporting on indexing analytics, including subgraph indexing time, handler gas costs, indexing errors encountered, etc. +- Auto-rapport sur l'analyse des requêtes actives, y compris les volumes de requêtes de subgraphs, les volumes de frais, etc. +- Auto-rapport sur l'analyse de l'indexation, y compris le temps d'indexation des subgraphs, les coûts des gaz de traitement, les erreurs d'indexation rencontrées, etc. - Self-reporting on stack information including graph-node version, Postgres version, Ethereum client version, etc. -### Learn More +### En savoir plus -If you would like to learn more about Graphcast, [check out the documentation here.](https://docs.graphops.xyz/graphcast/intro) +Si vous souhaitez en savoir plus sur Graphcast, [consultez la documentation ici] (https://docs.graphops.xyz/graphcast/intro) From b9722ec8791bd50d8b707d8b9a6bf61a2fa2f604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:29 -0400 Subject: [PATCH 415/924] New translations graphcast.mdx (Czech) --- website/pages/cs/graphcast.mdx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/website/pages/cs/graphcast.mdx b/website/pages/cs/graphcast.mdx index 28a374637e81..be24a24a117f 100644 --- a/website/pages/cs/graphcast.mdx +++ b/website/pages/cs/graphcast.mdx @@ -2,20 +2,20 @@ title: Graphcast --- -## Introduction +## Úvod -Is there something you'd like to learn from or share with your fellow Indexers in an automated manner, but it's too much hassle or costs too much gas? +Rádi byste se něco naučili nebo se o to podělili s ostatními indexátory automatizovaným způsobem, ale je to příliš náročné nebo to stojí příliš mnoho plyn? -Currently, the cost to broadcast information to other network participants is determined by gas fees on the Ethereum blockchain. Graphcast solves this problem by acting as an optional decentralized, distributed peer-to-peer (P2P) communication tool that allows Indexers across the network to exchange information in real time. The cost of exchanging P2P messages is near zero, with the tradeoff of no data integrity guarantees. Nevertheless, Graphcast aims to provide message validity guarantees (i.e. that the message is valid and signed by a known protocol participant) with an open design space of reputation models. +V současné době jsou náklady na vysílání informací ostatním účastníkům sítě určovány poplatky za plyn v blockchainu Ethereum. Graphcast tento problém řeší tím, že funguje jako volitelný decentralizovaný, distribuovaný komunikační nástroj peer-to-peer (P2P), který umožňuje indexerům v celé síti vyměňovat si informace v reálném čase. Náklady na výměnu P2P zpráv jsou téměř nulové, kompromisem je absence záruk integrity dat. Nicméně Graphcast si klade za cíl poskytovat záruky platnosti zpráv (tj. že zpráva je platná a podepsaná známým účastníkem protokolu) s otevřeným prostorem pro návrh reputačních modelů. -The Graphcast SDK (Software Development Kit) allows developers to build Radios, which are gossip-powered applications that Indexers can run to serve a given purpose. We also intend to create a few Radios (or provide support to other developers/teams that wish to build Radios) for the following use cases: +Graphcast SDK (Vývoj softwaru Kit) umožňuje vývojářům vytvářet rádia, což jsou aplikace napájené drby, které mohou indexery spouštět k danému účelu. Máme také v úmyslu vytvořit několik Radios (nebo poskytnout podporu jiným vývojářům/týmům, které chtějí Radios vytvořit) pro následující případy použití: -- Real-time cross-checking of subgraph data integrity ([Subgraph Radio](https://docs.graphops.xyz/graphcast/radios/subgraph-radio)). -- Conducting auctions and coordination for warp syncing subgraphs, substreams, and Firehose data from other Indexers. -- Self-reporting on active query analytics, including subgraph request volumes, fee volumes, etc. -- Self-reporting on indexing analytics, including subgraph indexing time, handler gas costs, indexing errors encountered, etc. -- Self-reporting on stack information including graph-node version, Postgres version, Ethereum client version, etc. +- Křížová kontrola integrity dat podgrafu v reálném čase ([Podgraf Radio](https://docs.graphops.xyz/graphcast/radios/subgraph-radio)). +- Provádění aukcí a koordinace pro warp synchronizaci podgrafů, substreamů a dat Firehose z jiných Indexerů. +- Vlastní hlášení o analýze aktivních dotazů, včetně objemů požadavků na dílčí grafy, objemů poplatků atd. +- Vlastní hlášení o analýze indexování, včetně času indexování podgrafů, nákladů na plyn obsluhy, zjištěných chyb indexování atd. +- Vlastní hlášení informací o zásobníku včetně verze grafového uzlu, verze Postgres, verze klienta Ethereum atd. -### Learn More +### Dozvědět se více If you would like to learn more about Graphcast, [check out the documentation here.](https://docs.graphops.xyz/graphcast/intro) From 600f210984bd4768e1738208fc90d17dc8874f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:31 -0400 Subject: [PATCH 416/924] New translations graphcast.mdx (Italian) --- website/pages/it/graphcast.mdx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/it/graphcast.mdx b/website/pages/it/graphcast.mdx index 28a374637e81..b30e09152a79 100644 --- a/website/pages/it/graphcast.mdx +++ b/website/pages/it/graphcast.mdx @@ -2,20 +2,20 @@ title: Graphcast --- -## Introduction +## Introduzione -Is there something you'd like to learn from or share with your fellow Indexers in an automated manner, but it's too much hassle or costs too much gas? +C'è qualcosa che vorreste imparare o condividere con i vostri colleghi Indexer in modo automatico, ma è troppo fastidioso o costa troppo gas? -Currently, the cost to broadcast information to other network participants is determined by gas fees on the Ethereum blockchain. Graphcast solves this problem by acting as an optional decentralized, distributed peer-to-peer (P2P) communication tool that allows Indexers across the network to exchange information in real time. The cost of exchanging P2P messages is near zero, with the tradeoff of no data integrity guarantees. Nevertheless, Graphcast aims to provide message validity guarantees (i.e. that the message is valid and signed by a known protocol participant) with an open design space of reputation models. +Attualmente, il costo per trasmettere informazioni ad altri partecipanti alla rete è determinato dalle tariffe del gas sulla blockchain di Ethereum. Graphcast risolve questo problema agendo come strumento di comunicazione decentralizzato e distribuito peer-to-peer (P2P) opzionale che consente agli indexer della rete di scambiare informazioni in tempo reale. Il costo dello scambio di messaggi P2P è prossimo allo zero, con lo svantaggio di non avere garanzie di integrità dei dati. Tuttavia, Graphcast mira a fornire garanzie di validità dei messaggi (cioè che il messaggio sia valido e firmato da un partecipante noto al protocollo) con uno spazio di progettazione aperto di modelli di reputazione. -The Graphcast SDK (Software Development Kit) allows developers to build Radios, which are gossip-powered applications that Indexers can run to serve a given purpose. We also intend to create a few Radios (or provide support to other developers/teams that wish to build Radios) for the following use cases: +L'SDK (Software Development Kit) di Graphcast consente agli sviluppatori di creare radio, che sono applicazioni alimentate da gossip che gli indexer possono eseguire per servire un determinato scopo. Intendiamo inoltre creare alcune radio (o fornire supporto ad altri sviluppatori/team che desiderano creare radio) per i seguenti casi d'uso: -- Real-time cross-checking of subgraph data integrity ([Subgraph Radio](https://docs.graphops.xyz/graphcast/radios/subgraph-radio)). -- Conducting auctions and coordination for warp syncing subgraphs, substreams, and Firehose data from other Indexers. -- Self-reporting on active query analytics, including subgraph request volumes, fee volumes, etc. -- Self-reporting on indexing analytics, including subgraph indexing time, handler gas costs, indexing errors encountered, etc. -- Self-reporting on stack information including graph-node version, Postgres version, Ethereum client version, etc. +- Controllo incrociato in tempo reale dell'integrità dei dati del subgraph ([Subgraph Radio] (https://docs.graphops.xyz/graphcast/radios/subgraph-radio)). +- Conduzione di aste e coordinamento per la sincronizzazione warp di subgraph, substream e dati Firehose da altri indexer. +- Autodichiarazione sulle analisi delle query attive, compresi i volumi delle richieste di subgraph, i volumi delle commissioni, ecc. +- Autodichiarazione sull'analisi dell'indicizzazione, compresi i tempi di indicizzazione dei subgraph, i costi del gas per i gestori, gli errori di indicizzazione riscontrati, ecc. +- Autodichiarazione delle informazioni sullo stack, tra cui la versione del graph-node, la versione di Postgres, la versione del client Ethereum, ecc. -### Learn More +### Scopri di più -If you would like to learn more about Graphcast, [check out the documentation here.](https://docs.graphops.xyz/graphcast/intro) +Se volete saperne di più su Graphcast, [consultate la documentazione qui.](https://docs.graphops.xyz/graphcast/intro) From ff5ee754729e07056e31e032163bf6af23c9e1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:38 -0400 Subject: [PATCH 417/924] New translations graphcast.mdx (Marathi) --- website/pages/mr/graphcast.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/mr/graphcast.mdx b/website/pages/mr/graphcast.mdx index 53dcf8cd25c7..b50f34eaa707 100644 --- a/website/pages/mr/graphcast.mdx +++ b/website/pages/mr/graphcast.mdx @@ -2,7 +2,7 @@ title: Graphcast --- -## परिचय +## Introduction Is there something you'd like to learn from or share with your fellow Indexers in an automated manner, but it's too much hassle or costs too much gas? From 6549256b3f8b028fcff8c79556f0bbabcc7b8d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:40 -0400 Subject: [PATCH 418/924] New translations graphql-validations-migration-guide.mdx (French) --- .../graphql-validations-migration-guide.mdx | 180 +++++++++--------- 1 file changed, 89 insertions(+), 91 deletions(-) diff --git a/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx b/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx index 86d4f151207b..c3ce4f6a32f5 100644 --- a/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx @@ -4,35 +4,35 @@ title: GraphQL Validations migration guide Soon `graph-node` will support 100% coverage of the [GraphQL Validations specification](https://spec.graphql.org/June2018/#sec-Validation). -Previous versions of `graph-node` did not support all validations and provided more graceful responses - so, in cases of ambiguity, `graph-node` was ignoring invalid GraphQL operations components. +Les versions précédentes de `graph-node` ne prenaient pas en charge toutes les validations et fournissaient des réponses plus gracieuses - ainsi, en cas d'ambiguïté, `graph-node` ignorait les composants d'opérations GraphQL non valides. -GraphQL Validations support is the pillar for the upcoming new features and the performance at scale of The Graph Network. +La prise en charge de GraphQL Validations est le pilier des nouvelles fonctionnalités à venir et des performances à grande échelle de The Graph Network. -It will also ensure determinism of query responses, a key requirement on The Graph Network. +Il garantira également le déterminisme des réponses aux requêtes, une exigence clé sur The Graph Network. -**Enabling the GraphQL Validations will break some existing queries** sent to The Graph API. +**L'activation des validations GraphQL interrompra certaines requêtes existantes** envoyées à l'API Graph. -To be compliant with those validations, please follow the migration guide. +Pour être conforme à ces validations, veuillez suivre le guide de migration. -> ⚠️ If you do not migrate your queries before the validations are rolled out, they will return errors and possibly break your frontends/clients. +> ⚠️ Si vous ne migrez pas vos requêtes avant le déploiement des validations, elles renverront des erreurs et éventuellement casseront vos frontends/clients. ## Migration guide -You can use the CLI migration tool to find any issues in your GraphQL operations and fix them. Alternatively you can update the endpoint of your GraphQL client to use the `https://api-next.thegraph.com/subgraphs/name/$GITHUB_USER/$SUBGRAPH_NAME` endpoint. Testing your queries against this endpoint will help you find the issues in your queries. +Vous pouvez utiliser l'outil de migration CLI pour rechercher tous les problèmes dans vos opérations GraphQL et les résoudre. Vous pouvez également mettre à jour le point de terminaison de votre client GraphQL pour utiliser le point de terminaison « https://api-next.thegraph.com/subgraphs/name/$GITHUB_USER/$SUBGRAPH_NAME ». Tester vos requêtes sur ce point de terminaison vous aidera à trouver les problèmes dans vos requêtes. -> Not all subgraphs will need to be migrated, if you are using [GraphQL ESlint](https://the-guild.dev/graphql/eslint/docs) or [GraphQL Code Generator](https://the-guild.dev/graphql/codegen), they already ensure that your queries are valid. +> Tous les subgraphs n'auront pas besoin d'être migrés si vous utilisez [GraphQL ESlint](https://the-guild.dev/graphql/eslint/docs) ou [GraphQL Code Generator](https://the-guild.dev /graphql/codegen), ils garantissent déjà que vos requêtes sont valides. ## Migration CLI tool -**Most of the GraphQL operations errors can be found in your codebase ahead of time.** +**La plupart des erreurs d'opérations GraphQL peuvent être trouvées à l'avance dans votre base de code.** -For this reason, we provide a smooth experience for validating your GraphQL operations during development or in CI. +Pour cette raison, nous offrons une expérience fluide pour valider vos opérations GraphQL pendant le développement ou dans CI. -[`@graphql-validate/cli`](https://github.com/saihaj/graphql-validate) is a simple CLI tool that helps validate GraphQL operations against a given schema. +[`@graphql-validate/cli`](https://github.com/saihaj/graphql-validate) est un outil CLI simple qui permet de valider les opérations GraphQL par rapport à un schéma donné. -### **Getting started** +### **Commencer** -You can run the tool as follows: +Vous pouvez exécuter l'outil comme suit : ```bash npx @graphql-validate/cli -s https://api-next.thegraph.com/subgraphs/name/$GITHUB_USER/$SUBGRAPH_NAME -o *.graphql @@ -40,23 +40,23 @@ npx @graphql-validate/cli -s https://api-next.thegraph.com/subgraphs/name/$GITHU **Notes:** -- Set or replace $GITHUB_USER, $SUBGRAPH_NAME with the appropriate values. Like: [`artblocks/art-blocks`](https://api.thegraph.com/subgraphs/name/artblocks/art-blocks) -- The preview schema URL (https://api-next.thegraph.com/) provided is heavily rate-limited and will be sunset once all users have migrated to the new version. **Do not use it in production.** -- Operations are identified in files with the following extensions [`.graphql`,](https://www.graphql-tools.com/docs/schema-loading#graphql-file-loader)[`.ts`, `.tsx`, `.js`, `jsx`](https://www.graphql-tools.com/docs/schema-loading#code-file-loader) (`-o` option). +- Définissez ou remplacez $GITHUB_USER, $SUBGRAPH_NAME par les valeurs appropriées. Comme : [`artblocks/art-blocks`](https://api.thegraph.com/subgraphs/name/artblocks/art-blocks) +- L'URL du schéma d'aperçu (https://api-next.thegraph.com/) fournie est fortement limitée en débit et sera supprimée une fois que tous les utilisateurs auront migré vers la nouvelle version. **Ne l'utilisez pas en production.** +- Les opérations sont identifiées dans les fichiers avec les extensions suivantes [`.graphql`,](https://www.graphql-tools.com/docs/schema-loading#graphql-file-loader)[`.ts`, `.tsx `, `.js`, `jsx`](https://www.graphql-tools.com/docs/schema-loading#code-file-loader) (option `-o`). ### CLI output -The `[@graphql-validate/cli](https://github.com/saihaj/graphql-validate)` CLI tool will output any GraphQL operations errors as follows: +L'outil CLI `[@graphql-validate/cli](https://github.com/saihaj/graphql-validate)` affichera toutes les erreurs d'opérations GraphQL comme suit : ![Error output from CLI](https://i.imgur.com/x1cBdhq.png) -For each error, you will find a description, file path and position, and a link to a solution example (see the following section). +Pour chaque erreur, vous trouverez une description, le chemin et la position du fichier, ainsi qu'un lien vers un exemple de solution (voir la section suivante). -## Run your local queries against the preview schema +## Exécutez vos requêtes locales sur le schéma d'aperçu -We provide an endpoint `https://api-next.thegraph.com/` that runs a `graph-node` version that has validations turned on. +Nous fournissons un point de terminaison « https://api-next.thegraph.com/ » qui exécute une version « graph-node » dont les validations sont activées. -You can try out queries by sending them to: +Vous pouvez tester des requêtes en les envoyant à : - `https://api-next.thegraph.com/subgraphs/id/` @@ -64,28 +64,28 @@ ou bien - `https://api-next.thegraph.com/subgraphs/name//` -To work on queries that have been flagged as having validation errors, you can use your favorite GraphQL query tool, like Altair or [GraphiQL](https://cloud.hasura.io/public/graphiql), and try your query out. Those tools will also mark those errors in their UI, even before you run it. +Pour travailler sur des requêtes signalées comme comportant des erreurs de validation, vous pouvez utiliser votre outil de requête GraphQL préféré, comme Altair ou [GraphiQL](https://cloud.hasura.io/public/graphiql), et essayer votre requête. Ces outils marqueront également ces erreurs dans leur interface utilisateur, avant même que vous ne l'exécutiez. -## How to solve issues +## Comment résoudre les problèmes -Below, you will find all the GraphQL validations errors that could occur on your existing GraphQL operations. +Ci-dessous, vous trouverez toutes les erreurs de validation GraphQL qui pourraient survenir sur vos opérations GraphQL existantes. -### GraphQL variables, operations, fragments, or arguments must be unique +### Les variables, opérations, fragments ou arguments GraphQL doivent être uniques -We applied rules for ensuring that an operation includes a unique set of GraphQL variables, operations, fragments, and arguments. +Nous avons appliqué des règles pour garantir qu'une opération inclut un ensemble unique de variables, d'opérations, de fragments et d'arguments GraphQL. -A GraphQL operation is only valid if it does not contain any ambiguity. +Une opération GraphQL n'est valide que si elle ne contient aucune ambiguïté. -To achieve that, we need to ensure that some components in your GraphQL operation must be unique. +Pour y parvenir, nous devons nous assurer que certains composants de votre opération GraphQL doivent être uniques. -Here's an example of a few invalid operations that violates these rules: +Voici un exemple de quelques opérations non valides qui enfreignent ces règles : -**Duplicate Query name (#UniqueOperationNamesRule)** +**Nom de requête en double (#UniqueOperationNamesRule)** ```graphql -# The following operation violated the UniqueOperationName -# rule, since we have a single operation with 2 queries -# with the same name +# L'opération suivante a violé UniqueOperationName +# règle, puisque nous avons une seule opération avec 2 requêtes +# avec le même nom query myData { id } @@ -103,7 +103,7 @@ query myData { } query myData2 { - # rename the second query + # renommer la deuxième requête name } ``` @@ -111,8 +111,7 @@ query myData2 { **Duplicate Fragment name (#UniqueFragmentNamesRule)** ```graphql -# The following operation violated the UniqueFragmentName -# rule. +# L'opération suivante a violé la règle UniqueFragmentName query myData { id ...MyFields @@ -136,19 +135,19 @@ query myData { ...MyFieldsMetadata } -fragment MyFieldsMetadata { # assign a unique name to fragment +fragment MyFieldsMetadata { # assigner un nom unique au fragment metadata } -fragment MyFieldsName { # assign a unique name to fragment - name +fragment MyFieldsName { # assigner un nom unique au fragment + nom } ``` **Duplicate variable name (#UniqueVariableNamesRule)** ```graphql -# The following operation violates the UniqueVariables +# L'opération suivante viole le UniqueVariables query myData($id: String, $id: Int) { id ...MyFields @@ -159,7 +158,7 @@ _Solution:_ ```graphql query myData($id: String) { - # keep the relevant variable (here: `$id: String`) + # conserver la variable pertinente (ici : `$id: String`) id ...MyFields } @@ -168,7 +167,7 @@ query myData($id: String) { **Duplicate argument name (#UniqueArgument)** ```graphql -# The following operation violated the UniqueArguments +# L'opération suivante a violé les UniqueArguments query myData($id: ID!) { userById(id: $id, id: "1") { id @@ -188,11 +187,11 @@ query myData($id: ID!) { **Duplicate anonymous query (#LoneAnonymousOperationRule)** -Also, using two anonymous operations will violate the `LoneAnonymousOperation` rule due to conflict in the response structure: +De plus, l'utilisation de deux opérations anonymes violera la règle « LoneAnonymousOperation » en raison d'un conflit dans la structure de réponse : ```graphql -# This will fail if executed together in -# a single operation with the following two queries: +# Cela échouera s'il est exécuté ensemble dans +# une seule opération avec les deux requêtes suivantes : query { someField } @@ -211,7 +210,7 @@ query { } ``` -Or name the two queries: +Ou nommez les deux requêtes : ```graphql query FirstQuery { @@ -225,18 +224,18 @@ query SecondQuery { ### Overlapping Fields -A GraphQL selection set is considered valid only if it correctly resolves the eventual result set. +Un jeu de sélection GraphQL n'est considéré comme valide que s'il résout correctement l'éventuel jeu de résultats. -If a specific selection set, or a field, creates ambiguity either by the selected field or by the arguments used, the GraphQL service will fail to validate the operation. +Si un ensemble de sélection spécifique, ou un champ, crée une ambiguïté soit par le champ sélectionné, soit par les arguments utilisés, le service GraphQL ne parviendra pas à valider l'opération. -Here are a few examples of invalid operations that violate this rule: +Voici quelques exemples d'opérations non valides qui enfreignent cette règle : **Conflicting fields aliases (#OverlappingFieldsCanBeMergedRule)** ```graphql -# Aliasing fields might cause conflicts, either with -# other aliases or other fields that exist on the -# GraphQL schema. +# L'alias des champs peut provoquer des conflits, soit avec +# d'autres alias ou d'autres champs qui existent sur le +# Schéma GraphQL. query { dogs { name: nickname @@ -250,8 +249,8 @@ _Solution:_ ```graphql query { dogs { - name: nickname - originalName: name # alias the original `name` field + nickname: name + originalName: name # alias du champ `name` original } } ``` @@ -259,8 +258,8 @@ query { \*_Champs en conflit avec des arguments (#OverlappingFieldsCanBeMergedRule)_ ```graphql -# Different arguments might lead to different data, -# so we can't assume the fields will be the same. +# Différents arguments peuvent conduire à des données différentes, +# donc nous ne pouvons pas supposer que les champs seront les mêmes. query { dogs { doesKnowCommand(dogCommand: SIT) @@ -280,12 +279,12 @@ query { } ``` -Also, in more complex use-cases, you might violate this rule by using two fragments that might cause a conflict in the eventually expected set: +De plus, dans des cas d'utilisation plus complexes, vous pourriez enfreindre cette règle en utilisant deux fragments susceptibles de provoquer un conflit dans l'ensemble finalement attendu : ```graphql query { - # Eventually, we have two "x" definitions, pointing - # to different fields! + # Finalement, nous avons deux définitions de "x", pointant + # vers des champs différents ! ...A ...B } @@ -299,27 +298,26 @@ fragment B on Type { } ``` -In addition to that, client-side GraphQL directives like `@skip` and `@include` might lead to ambiguity, for example: +En plus de cela, les directives GraphQL côté client comme `@skip` et `@include` peuvent conduire à une ambiguïté, par exemple : ```graphql fragment mergeSameFieldsWithSameDirectives on Dog { name @include(if: true) name @include(if: false) -} ``` -[You can read more about the algorithm here.](https://spec.graphql.org/June2018/#sec-Field-Selection-Merging) +[Vous pouvez en savoir plus sur l'algorithme ici.](https://spec.graphql.org/June2018/#sec-Field-Selection-Merging) ### Unused Variables or Fragments -A GraphQL operation is also considered valid only if all operation-defined components (variables, fragments) are used. +Une opération GraphQL n'est également considérée comme valide que si tous les composants définis par l'opération (variables, fragments) sont utilisés. -Here are a few examples for GraphQL operations that violates these rules: +Voici quelques exemples d'opérations GraphQL qui enfreignent ces règles : **Unused variable** (#NoUnusedVariablesRule) ```graphql -# Invalid, because $someVar is never used. +# Invalide, car $someVar n'est jamais utilisé. query something($someVar: String) { someData } @@ -358,14 +356,14 @@ query something { # remove the `AllFields` fragment ``` -### Invalid or missing Selection-Set (#ScalarLeafsRule) +### Ensemble de sélection invalide ou manquant (#ScalarLeafsRule) -Also, a GraphQL field selection is only valid if the following is validated: +De plus, une sélection de champ GraphQL n'est valide que si les éléments suivants sont validés : -- An object field must-have selection set specified. -- An edge field (scalar, enum) must not have a selection set specified. +- Un champ d'objet doit avoir un ensemble de sélection spécifié. +- Un champ de bord (scalaire, énumération) ne doit pas avoir de jeu de sélection spécifié. -Here are a few examples of violations of these rules with the following Schema: +Voici quelques exemples de violations de ces règles avec le schéma suivant : ```graphql schema { @@ -384,7 +382,7 @@ schema { } ``` -**Invalid Selection-Set** +**Ensemble de sélection invalide** ```graphql query { @@ -432,9 +430,9 @@ query { ### Incorrect Arguments values (#VariablesInAllowedPositionRule) -GraphQL operations that pass hard-coded values to arguments must be valid, based on the value defined in the schema. +Les opérations GraphQL qui transmettent des valeurs codées en dur aux arguments doivent être valides, en fonction de la valeur définie dans le schéma. -Here are a few examples of invalid operations that violate these rules: +Voici quelques exemples d'opérations non valides qui enfreignent ces règles : ```graphql query purposes { @@ -459,20 +457,20 @@ query purposes($name: Int!) { ### Unknown Type, Variable, Fragment, or Directive (#UnknownX) -The GraphQL API will raise an error if any unknown type, variable, fragment, or directive is used. +L'API GraphQL générera une erreur si un type, une variable, un fragment ou une directive inconnu est utilisé. -Those unknown references must be fixed: +Ces références inconnues doivent être corrigées : -- rename if it was a typo -- otherwise, remove +- renommer si c'était une faute de frappe +- sinon, supprimez -### Fragment: invalid spread or definition +### Fragment : diffusion ou définition non valide -**Invalid Fragment spread (#PossibleFragmentSpreadsRule)** +**Propagation de fragments non valide (#PossibleFragmentSpreadsRule)** -A Fragment cannot be spread on a non-applicable type. +Un Fragment ne peut pas être réparti sur un type non applicable. -Example, we cannot apply a `Cat` fragment to the `Dog` type: +Exemple, nous ne pouvons pas appliquer un fragment `Cat` au type `Dog` : ```graphql query { @@ -486,11 +484,11 @@ fragment CatSimple on Cat { } ``` -**Invalid Fragment definition (#FragmentsOnCompositeTypesRule)** +**Définition de fragment non valide (#FragmentsOnCompositeTypesRule)** -All Fragment must be defined upon (using `on ...`) a composite type, in short: object, interface, or union. +Tout Fragment doit être défini sur (en utilisant `on ...`) un type composite, en bref : objet, interface ou union. -The following examples are invalid, since defining fragments on scalars is invalid. +Les exemples suivants ne sont pas valides, car la définition de fragments sur des scalaires n'est pas valide. ```graphql fragment fragOnScalar on Int { @@ -508,11 +506,11 @@ fragment inlineFragOnScalar on Dog { ### Directives usage -**Directive cannot be used at this location (#KnownDirectivesRule)** +**La directive ne peut pas être utilisée à cet emplacement (#KnownDirectivesRule)** -Only GraphQL directives (`@...`) supported by The Graph API can be used. +Seules les directives GraphQL (« @... ») prises en charge par l'API Graph peuvent être utilisées. -Here is an example with The GraphQL supported directives: +Voici un exemple avec les directives prises en charge par GraphQL : ```graphql query { @@ -523,13 +521,13 @@ query { } ``` -_Note: `@stream`, `@live`, `@defer` are not supported._ +_Remarque : `@stream`, `@live`, `@defer` ne sont pas pris en charge._ -**Directive can only be used once at this location (#UniqueDirectivesPerLocationRule)** +**La directive ne peut être utilisée qu'une seule fois à cet emplacement (#UniqueDirectivesPerLocationRule)** -The directives supported by The Graph can only be used once per location. +Les directives prises en charge par The Graph ne peuvent être utilisées qu'une seule fois par emplacement. -The following is invalid (and redundant): +Ce qui suit n'est pas valide (et redondant) : ```graphql query { From 9c9315d2ab39ba70fb3c246e03dc251a5b217ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:41 -0400 Subject: [PATCH 419/924] New translations graphql-validations-migration-guide.mdx (Spanish) --- .../es/release-notes/graphql-validations-migration-guide.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/website/pages/es/release-notes/graphql-validations-migration-guide.mdx b/website/pages/es/release-notes/graphql-validations-migration-guide.mdx index fefc282fe99e..5bdf39587e84 100644 --- a/website/pages/es/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/es/release-notes/graphql-validations-migration-guide.mdx @@ -408,6 +408,7 @@ query { user { id image # 'image' requiere un conjunto de selección para subcampos! + } } ``` From 1b81808bef910032d91431af419b99f7a0405f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:47 -0400 Subject: [PATCH 420/924] New translations graphql-validations-migration-guide.mdx (Czech) --- .../cs/release-notes/graphql-validations-migration-guide.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/cs/release-notes/graphql-validations-migration-guide.mdx b/website/pages/cs/release-notes/graphql-validations-migration-guide.mdx index f8cf8a3c2ed3..13fb523b6432 100644 --- a/website/pages/cs/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/cs/release-notes/graphql-validations-migration-guide.mdx @@ -60,7 +60,7 @@ You can try out queries by sending them to: - `https://api-next.thegraph.com/subgraphs/id/` -or +nebo - `https://api-next.thegraph.com/subgraphs/name//` From e171bfbd1b90150bce07098c434f463dbd01e5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:51 -0400 Subject: [PATCH 421/924] New translations graphql-validations-migration-guide.mdx (Portuguese) --- .../graphql-validations-migration-guide.mdx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx b/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx index 3103ee0c6de5..0bb187eb6fc0 100644 --- a/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx @@ -256,7 +256,8 @@ query { } ``` -**Conflicting fields with arguments (#OverlappingFieldsCanBeMergedRule)** (Campos em conflito com argumentos) +**Conflicting fields with arguments (#OverlappingFieldsCanBeMergedRule)** +(Campos em conflito com argumentos) ```graphql # Argumentos diferentes podem levar a dados diferentes, @@ -467,10 +468,10 @@ Estas referências desconhecidas devem ser consertadas: - caso contrário, remova ### Fragment: invalid spread or definition - (Fragment: espalhamento ou definição inválidos) -**Invalid Fragment spread (#PossibleFragmentSpreadsRule)** (Espalhamento de fragment inválido) +**Invalid Fragment spread (#PossibleFragmentSpreadsRule)** +(Espalhamento de fragment inválido) Um Fragment não pode ser espalhado em um tipo não aplicável. @@ -510,7 +511,8 @@ fragment inlineFragOnScalar on Dog { ### Uso de Diretivas -**Directive cannot be used at this location (#KnownDirectivesRule)** (A diretiva não pode ser usada neste local) +**Directive cannot be used at this location (#KnownDirectivesRule)** +(A diretiva não pode ser usada neste local) Apenas diretivas GraphQL (`@...`) apoiadas pela API do The Graph podem ser usadas. @@ -527,7 +529,8 @@ query { _Nota: `@stream`, `@live`, e `@defer` não têm apoio._ -**Directive can only be used once at this location (#UniqueDirectivesPerLocationRule)** (A diretiva só pode ser usada neste local uma vez) +**Directive can only be used once at this location (#UniqueDirectivesPerLocationRule)** +(A diretiva só pode ser usada neste local uma vez) As diretivas apoiadas pelo The Graph só podem ser usadas uma vez por local. From aac0592e3a11147d370856b51d3f0cab00639244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:52 -0400 Subject: [PATCH 422/924] New translations graphql-validations-migration-guide.mdx (Russian) --- .../graphql-validations-migration-guide.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx b/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx index 1b815a5aaf06..3a7f9b2fe642 100644 --- a/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx @@ -2,7 +2,7 @@ title: Руководство по переходу на валидацию GraphQL --- -Вскоре `graph-node` будет поддерживать 100-процентное покрытие [спецификации GraphQL Validation] \(https://spec.graphql.org/June2018/#sec-Validation). +Вскоре `graph-node` будет поддерживать 100-процентное покрытие [спецификации GraphQL Validation] (https://spec.graphql.org/June2018/#sec-Validation). Предыдущие версии `graph-node` не поддерживали все валидации и предоставляли более обтекаемые ответы, поэтому в случаях неоднозначности `graph-node` игнорировал недопустимые компоненты операций GraphQL. @@ -42,7 +42,7 @@ npx @graphql-validate/cli -s https://api-next.thegraph.com/subgraphs/name/$GITHU - Установите или замените $GITHUB_USER, $SUBGRAPH_NAME соответствующими значениями. Например: [`artblocks/art-blocks`](https://api.thegraph.com/subgraphs/name/artblocks/art-blocks) - Предоставленный URL-адрес схемы предварительного просмотра (https://api-next.thegraph.com/) сильно ограничен по скорости и будет удален после того, как все пользователи перейдут на новую версию. **Не используйте его в рабочей среде.** -- Операции идентифицируются в файлах со следующими расширениями [`.graphql`,] \(https://www.graphql-tools.com/docs/schema-loading#graphql-file-loader) [`.ts`, `.tsx`, `.js`, `jsx`](https://www.graphql-tools.com/docs/schema-loading#code-file-loader) (`-o` option). +- Операции идентифицируются в файлах со следующими расширениями [`.graphql`,] (https://www.graphql-tools.com/docs/schema-loading#graphql-file-loader) [`.ts`, `.tsx`, `.js`, `jsx`](https://www.graphql-tools.com/docs/schema-loading#code-file-loader) (`-o` option). ### Вывод CLI @@ -284,8 +284,8 @@ query { ```graphql query { - # В конце концов, у нас есть два определения "x", указывающие - # на разные поля! + # В конце концов, у нас есть два определения "x", указывающие + # на разные поля! ...A ...B } @@ -439,7 +439,7 @@ query { ```graphql query purposes { # Если в схеме "name" определено как "String", - # этот запрос не пройдёт валидацию. + # этот запрос не пройдёт валидацию. purpose(name: 1) { id } @@ -449,8 +449,8 @@ query purposes { query purposes($name: Int!) { # Если "name" определено в схеме как `String`, - # этот запрос не пройдёт валидацию, потому что - # используемая переменная имеет тип `Int` + # этот запрос не пройдёт валидацию, потому что + # используемая переменная имеет тип `Int` purpose(name: $name) { id } From 5279d8154060a135c4a4d5e5b600b2d4f20c1e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:53 -0400 Subject: [PATCH 423/924] New translations graphql-validations-migration-guide.mdx (Swedish) --- .../sv/release-notes/graphql-validations-migration-guide.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/release-notes/graphql-validations-migration-guide.mdx b/website/pages/sv/release-notes/graphql-validations-migration-guide.mdx index b95f0916c0bb..d9f301352c8a 100644 --- a/website/pages/sv/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/sv/release-notes/graphql-validations-migration-guide.mdx @@ -308,7 +308,7 @@ fragment mergeSameFieldsWithSameDirectives on Dog { } ``` -[Du kan läsa mer om algoritmen här] \(https://spec.graphql.org/June2018/#sec-Field-Selection-Merging) +[Du kan läsa mer om algoritmen här] (https://spec.graphql.org/June2018/#sec-Field-Selection-Merging) ### Oanvända variabler eller fragment From c3527250d0d10d5f3d2802acd03432c639fa0e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:55 -0400 Subject: [PATCH 424/924] New translations graphql-validations-migration-guide.mdx (Chinese Simplified) --- .../zh/release-notes/graphql-validations-migration-guide.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/zh/release-notes/graphql-validations-migration-guide.mdx b/website/pages/zh/release-notes/graphql-validations-migration-guide.mdx index 1afc10c67221..a86b79249425 100644 --- a/website/pages/zh/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/zh/release-notes/graphql-validations-migration-guide.mdx @@ -42,7 +42,7 @@ npx@graphql验证/cli-shttps://api-npx @graphql-validate/cli -s https://api-next - \-使用适当的值设置或替换$GITHUB_USER、$SUBGRAPH_NAME。类似:[`artblocks/artblocks`](https://api.thegraph.com/subgraphs/name/artblocks/art-blocks) - \-预览架构URL(https://api-next.thegraph.com/)所提供的是速率严重受限,并且一旦所有用户都迁移到新版本,就将是逐步关闭期。**不要在生产中使用它** -- \-操作在具有以下扩展名的文件中标识[`.graphql`,]\(https://www.graphql-tools.com/docs/schema-loading#graphql-文件加载器)[`.ts`,`.tsx`,`.js`,`jsx`]\(https://www.graphql-tools.com/docs/schema-loading#code-文件加载程序)(“-o”选项)。 +- \-操作在具有以下扩展名的文件中标识[`.graphql`,](https://www.graphql-tools.com/docs/schema-loading#graphql-文件加载器)[`.ts`,`.tsx`,`.js`,`jsx`](https://www.graphql-tools.com/docs/schema-loading#code-文件加载程序)(“-o”选项)。 ### CLI输出 @@ -308,7 +308,7 @@ fragment mergeSameFieldsWithSameDirectives on Dog { } ``` -[您可以在此处阅读有关算法的更多信息。]\(https://spec.graphql.org/June2018/#sec-字段选择合并) +[您可以在此处阅读有关算法的更多信息。](https://spec.graphql.org/June2018/#sec-字段选择合并) ### 未使用的变量或片段 From 3a35ab7f23f1bd5a7010e22c7682f1846246dd88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:56 -0400 Subject: [PATCH 425/924] New translations graphql-validations-migration-guide.mdx (Urdu (Pakistan)) --- .../ur/release-notes/graphql-validations-migration-guide.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx b/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx index 4b17c33d3f78..fb46d352b6b9 100644 --- a/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx @@ -4,7 +4,8 @@ title: GraphQL کی توثیق کی منتقلی گائیڈ جلد ہی `گراف نوڈ` [GraphQL توثیق کی تفصیلات](https://spec.graphql.org/June2018/#sec-Validation) کی 100% کوریج کو سپورٹ کرے گا. -`گراف نوڈ` کے پچھلے ورژن تمام توثیقوں کی حمایت نہیں کرتے تھے اور زیادہ خوبصورت جوابات فراہم کرتے تھے - لہذا، ابہام کی صورت میں، `گراف نوڈ` غلط گراف کیو ایل آپریشن کے اجزاء کو نظر انداز کر رہا تھا. +`گراف نوڈ` کے پچھلے ورژن تمام توثیقوں کی حمایت نہیں کرتے تھے اور زیادہ خوبصورت جوابات فراہم کرتے تھے - لہذا، ابہام کی صورت میں، `گراف نوڈ` غلط گراف کیو ایل + آپریشن کے اجزاء کو نظر انداز کر رہا تھا. GraphQL ویلیڈیشن سپورٹ آنے والی نئی خصوصیات اور گراف نیٹ ورک کے پیمانے پر کارکردگی کا ایک ستون ہے. @@ -20,7 +21,7 @@ GraphQL ویلیڈیشن سپورٹ آنے والی نئی خصوصیات اور آپ اپنے GraphQL آپریشنز میں کسی بھی مسئلے کو تلاش کرنے اور انہیں ٹھیک کرنے کے لیے CLI مائیگریشن ٹول استعمال کر سکتے ہیں۔ متبادل طور پر آپ `https://api-next.thegraph.com/subgraphs/name/$GITHUB_USER/$SUBGRAPH_NAME` اینڈ پوائنٹ استعمال کرنے کے لیے اپنے GraphQL کلائنٹ کے اینڈ پوائنٹ کو اپ ڈیٹ کر سکتے ہیں۔ اس اختتامی نقطہ کے خلاف اپنے کیوریز کی جانچ کرنے سے آپ کو اپنے کیوریز میں مسائل تلاش کرنے میں مدد ملے گی. -> اگر آپ [GraphQL ESlint](https://the-guild.dev/graphql/eslint/docs) یا [ GraphQL کوڈ جنریٹر] \(//https://the-guild.dev) استعمال کر رہے ہیں تو تمام سب گراف کو منتقل کرنے کی ضرورت نہیں ہوگی۔ /graphql/codegen، وہ پہلے ہی اس بات کو یقینی بناتے ہیں کہ آپ کے کیوریز درست ہیں. +> اگر آپ [GraphQL ESlint](https://the-guild.dev/graphql/eslint/docs) یا [ GraphQL کوڈ جنریٹر] (//https://the-guild.dev) استعمال کر رہے ہیں تو تمام سب گراف کو منتقل کرنے کی ضرورت نہیں ہوگی۔ /graphql/codegen، وہ پہلے ہی اس بات کو یقینی بناتے ہیں کہ آپ کے کیوریز درست ہیں. ## مائیگریشن CLI ٹول From 1d1bbd21701896cff724f5d271bf7fddc4a1e5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:57 -0400 Subject: [PATCH 426/924] New translations graphql-validations-migration-guide.mdx (Hindi) --- .../hi/release-notes/graphql-validations-migration-guide.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/hi/release-notes/graphql-validations-migration-guide.mdx b/website/pages/hi/release-notes/graphql-validations-migration-guide.mdx index 8a3a71fd956e..82ad335fbc29 100644 --- a/website/pages/hi/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/hi/release-notes/graphql-validations-migration-guide.mdx @@ -2,7 +2,7 @@ title: ग्राफक्यूएल सत्यापन माइग्रेशन गाइड --- -जल्द ही `ग्राफ़-नोड` [ग्राफ़क्यूएल सत्यापन विनिर्देश] \(https://spec.graphql.org/June2018/#sec-Validation) के 100% कवरेज का समर्थन करेगा। +जल्द ही `ग्राफ़-नोड` [ग्राफ़क्यूएल सत्यापन विनिर्देश] (https://spec.graphql.org/June2018/#sec-Validation) के 100% कवरेज का समर्थन करेगा। `ग्राफ़-नोड` के पिछले संस्करण सभी सत्यापनों का समर्थन नहीं करते थे और अधिक सुंदर प्रतिक्रियाएँ प्रदान करते थे - इसलिए, अस्पष्टता के मामलों में, `ग्राफ़-नोड` अमान्य ग्राफ़क्यूएल संचालन घटकों की अनदेखी कर रहा था। From ed5efa7c8646f01cf20db4a8a564cef5e7f57911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:13:59 -0400 Subject: [PATCH 427/924] New translations arbitrum-faq.mdx (French) --- website/pages/fr/arbitrum/arbitrum-faq.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/fr/arbitrum/arbitrum-faq.mdx b/website/pages/fr/arbitrum/arbitrum-faq.mdx index 2ce099660ee3..fb008a5e72b6 100644 --- a/website/pages/fr/arbitrum/arbitrum-faq.mdx +++ b/website/pages/fr/arbitrum/arbitrum-faq.mdx @@ -2,7 +2,7 @@ title: FAQ d'Arbitrum --- -Cliquez [ici] \(#billing-on-arbitrum-faqs) si vous souhaitez passer à la FAQ sur la facturation Arbitrum. +Cliquez [ici] (#billing-on-arbitrum-faqs) si vous souhaitez passer à la FAQ sur la facturation Arbitrum. ## Pourquoi The Graph met-il en place une solution L2 ? @@ -47,7 +47,7 @@ Veuillez aider à [tester le réseau](https://testnet.thegraph.com/explorer) sur Tous les contrats intelligents ont été minutieusement [audités](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). -Tout a été testé minutieusement et un plan d’urgence est en place pour assurer une transition sûre et fluide. Les détails peuvent être trouvés [here]\(https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and- considérations de sécurité-20). +Tout a été testé minutieusement et un plan d’urgence est en place pour assurer une transition sûre et fluide. Les détails peuvent être trouvés [here](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and- considérations de sécurité-20). ## Les subgraphs existants sur Ethereum continueront-ils à fonctionner ? From 994b0a89d1ccbd26d92ec790b21878442ea30654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:01 -0400 Subject: [PATCH 428/924] New translations arbitrum-faq.mdx (Czech) --- website/pages/cs/arbitrum/arbitrum-faq.mdx | 66 +++++++++++----------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/website/pages/cs/arbitrum/arbitrum-faq.mdx b/website/pages/cs/arbitrum/arbitrum-faq.mdx index 849d08c92b93..b7897084810a 100644 --- a/website/pages/cs/arbitrum/arbitrum-faq.mdx +++ b/website/pages/cs/arbitrum/arbitrum-faq.mdx @@ -2,77 +2,77 @@ title: Arbitrum FAQ --- -Click [here](#billing-on-arbitrum-faqs) if you would like to skip to the Arbitrum Billing FAQs. +Pokud chcete přejít na často ptal dotazy k účtování Arbitrum, klikněte na [here](#billing-on-arbitrum-faqs). -## Why is The Graph implementing an L2 Solution? +## Proč The Graph implementuje řešení L2? -By scaling The Graph on L2, network participants can expect: +Škálováním The Graph na L2, sítě účastníci mohou očekávat: -- Upwards of 26x savings on gas fees +- Až 26x úspora na poplatcích za plyn -- Faster transaction speed +- Rychlejší transakce -- Security inherited from Ethereum +- Zabezpečení zděděné po Ethereum -Scaling the protocol smart contracts onto L2 allows network participants to interact more frequently at a reduced cost in gas fees. For example, Indexers could open and close allocations to index a greater number of subgraphs with greater frequency, developers could deploy and update subgraphs with greater ease, Delegators could delegate GRT with increased frequency, and Curators could add or remove signal to a larger number of subgraphs–actions previously considered too cost-prohibitive to perform frequently due to gas. +Škálování chytrých smluv protokolu na L2 umožňuje účastníkům sítě interakci častěji při snížených nákladech na plyn. Například, indexéry by mohly otevírat a zavírat alokace pro indexování většího počtu podgrafů s větší frekvencí, vývojáři mohli snadněji zavádět a aktualizovat podgrafy s větší lehkostí, Delegátor by mohli častěji delegovat GRT, Kurátoři by mohli přidávat nebo odebírat signály do většího počtu podgrafů–akcí dříve považovány za příliš nákladné dělat často kvůli nákladům. -The Graph community decided to move forward with Arbitrum last year after the outcome of the [GIP-0031](https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) discussion. +Komunita Graf se v loňském roce rozhodla pokračovat v Arbitrum po výsledku diskuze [GIP-0031] (https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305). -## What do I need to do to use The Graph on L2? +## Co musím udělat, abych mohl používat The Graph na serveru L2? -Users bridge their GRT and ETH  using one of the following methods: +Uživatelé mostují své GRT a ETH pomocí jednoho z následujících postupů: - [The Graph Bridge on Arbitrum](https://bridge.arbitrum.io/?l2ChainId=42161) - [TransferTo](https://transferto.xyz/swap) - [Connext Bridge](https://bridge.connext.network/) - [Hop Exchange](https://app.hop.exchange/#/send?token=ETH) -To take advantage of using The Graph on L2, use this dropdown switcher to toggle between chains. +Pro využití výhod používání a Graf na L2 použijte rozevírací přepínač k přepínání mezi řetězci. ![Dropdown switcher to toggle Arbitrum](/img/arbitrum-screenshot-toggle.png) -## As a subgraph developer, data consumer, Indexer, Curator, or Delegator, what do I need to do now? +## Jako vývojář podgrafů, Spotřebitel dat, indexer, kurátor, nebo delegátor, co mám nyní udělat? -There is no immediate action required, however, network participants are encouraged to begin moving to Arbitrum to take advantage of the benefits of L2. +Není třeba přijímat žádná okamžitá opatření, nicméně vyzýváme účastníky sítě, aby začali přecházet na Arbitrum a využívali výhod L2. -Core developer teams are working to create L2 transfer tools that will make it significantly easier to move delegation, curation, and subgraphs to Arbitrum. Network participants can expect L2 transfer tools to be available by summer of 2023. +Týmy hlavních vývojářů pracují na vytvoření nástrojů pro přenos L2, které usnadní přesun delegování, kurátorství a podgrafů do služby Arbitrum. Účastníci sítě mohou očekávat, že nástroje pro přenos L2 budou k dispozici do léta 2023. -As of April 10th, 2023, 5% of all indexing rewards are being minted on Arbitrum. As network participation increases, and as the Council approves it, indexing rewards will gradually shift from Ethereum to Arbitrum, eventually moving entirely to Arbitrum. +Od 10. dubna 2023 se na Arbitrum razí 5 % všech indexačních odměn. S rostoucí účastí v síti a se souhlasem Rady, odměny za indexování se postupně přesunou z Etherea na Arbitrum a nakonec zcela na Arbitrum. -## If I would like to participate in the network on L2, what should I do? +## Co mám udělat, pokud se chci zapojit do sítě L2? -Please help [test the network](https://testnet.thegraph.com/explorer) on L2 and report feedback about your experience in [Discord](https://discord.gg/graphprotocol). +Pomozte prosím [otestovat síť](https://testnet.thegraph.com/explorer) na L2 a nahlaste své zkušenosti na [Discord](https://discord.gg/graphprotocol). -## Are there any risks associated with scaling the network to L2? +## Existují nějaká rizika spojená s rozšiřováním sítě na L2? -All smart contracts have been thoroughly [audited](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Všechny chytré smlouvy byly důkladně [audited](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). -Everything has been tested thoroughly, and a contingency plan is in place to ensure a safe and seamless transition. Details can be found [here](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20). +Vše bylo důkladně otestováno, a je připraven pohotovostní plán, který zajistí bezpečný a bezproblémový přechod. Podrobnosti naleznete [here](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20). -## Will existing subgraphs on Ethereum continue to work? +## Budou stávající subgrafy na Ethereum fungovat i nadále? -Yes, The Graph Network contracts will operate in parallel on both Ethereum and Arbitrum until moving fully to Arbitrum at a later date. +Ano, smlouvy Graf síť budou fungovat paralelně na platformě Ethereum i Arbitrum, dokud se později plně nepřesunou na Arbitrum. -## Will GRT have a new smart contract deployed on Arbitrum? +## Bude mít GRT na Arbitrum nasazen nový chytrý kontrakt? -Yes, GRT has an additional [smart contract on Arbitrum](https://arbiscan.io/address/0x9623063377ad1b27544c965ccd7342f7ea7e88c7). However, the Ethereum mainnet [GRT contract](https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) will remain operational. +Ano, GRT má další [smart contract na Arbitrum](https://arbiscan.io/address/0x9623063377ad1b27544c965ccd7342f7ea7e88c7). Mainnetový [kontrakt GRT](https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) na Ethereum však zůstane v provozu. ## Billing on Arbitrum FAQs -## What do I need to do about the GRT in my billing balance? +## Co je třeba udělat s GRT ve vyúčtování zůstatku? -Nothing! Your GRT has been securely migrated to Arbitrum and is being used to pay for queries as you read this. +Nic! Váš GRT byl bezpečně převeden do společnosti Arbitrum a v době, kdy čtete tyto řádky, je používán k platit dotazů. -## How do I know my funds have migrated securely to Arbitrum? +## Jak poznám, že mé prostředky byly bezpečně převedeny do společnosti Arbitrum? -All GRT billing balances have already been successfully migrated to Arbitrum. You can view the billing contract on Arbitrum [here](https://arbiscan.io/address/0x1B07D3344188908Fb6DEcEac381f3eE63C48477a). +Všechny zůstatky GRT byly úspěšně převedeny na Arbitrum. Zobrazit fakturační smlouvu na Arbitrum [here] (https://arbiscan.io/address/0x1B07D3344188908Fb6DEcEac381f3eE63C48477a). -## How do I know the Arbitrum bridge is secure? +## Jak poznám, že je most Arbitrum bezpečný? -The bridge has been [heavily audited](https://code4rena.com/contests/2022-10-the-graph-l2-bridge-contest) to ensure safety and security for all users. +Most byl [podroben důkladnému auditu](https://code4rena.com/contests/2022-10-the-graph-l2-bridge-contest), aby byla zajištěna bezpečnost pro všechny uživatele. -## What do I need to do if I'm adding fresh GRT from my Ethereum mainnet wallet? +## Co musím udělat, když přidávám čerstvé GRT ze své peněženky v mainnetu Ethereum? -Adding GRT to your Arbitrum billing balance can be done with a one-click experience in [Subgraph Studio](https://thegraph.com/studio/). You'll be able to easily bridge your GRT to Arbitrum and fill your API keys in one transaction. +Přidání GRT do vašeho zúčtovacího zůstatku Arbitrum lze provést jedním kliknutím v aplikaci [Subgraph Studio](https://thegraph.com/studio/). Budete moci snadno propojit své GRT s Arbitrum a vyplnit své klíče API v rámci jedné transakce. -Visit the [Billing page](https://thegraph.com/docs/en/billing/) for more detailed instructions on adding, withdrawing, or acquiring GRT. +Podrobnější pokyny k přidání, výběru nebo získání GRT naleznete zde [Billing page](https://thegraph.com/docs/en/billing/). From 776781f86a30050bacd0ceaa0b22e480c2100cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:02 -0400 Subject: [PATCH 429/924] New translations arbitrum-faq.mdx (German) --- website/pages/de/arbitrum/arbitrum-faq.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/de/arbitrum/arbitrum-faq.mdx b/website/pages/de/arbitrum/arbitrum-faq.mdx index 23fc14587397..1ec15187606a 100644 --- a/website/pages/de/arbitrum/arbitrum-faq.mdx +++ b/website/pages/de/arbitrum/arbitrum-faq.mdx @@ -45,7 +45,7 @@ Bitte helfen Sie [test the network](https://testnet.thegraph.com/explorer) auf L ## Sind mit der Skalierung des Netzes auf L2 irgendwelche Risiken verbunden? -Alle Smart Contracts wurden gründlich [audited] \(https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Alle Smart Contracts wurden gründlich [audited] (https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). Alles wurde gründlich getestet, und es gibt einen Notfallplan, um einen sicheren und nahtlosen Übergang zu gewährleisten. Einzelheiten finden Sie [here](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20). @@ -55,7 +55,7 @@ Ja, die The Graph Netzwerk-Verträge werden parallel sowohl auf Ethereum als auc ## Wird GRT einen neuen Smart Contract auf Arbitrum bereitstellen? -Ja, GRT hat einen zusätzlichen [Smart Contract auf Arbitrum] \(https://arbiscan.io/address/0x9623063377ad1b27544c965ccd7342f7ea7e88c7). Der Ethereum-Hauptnetz-[GRT-Vertrag](https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) wird jedoch weiterhin funktionieren. +Ja, GRT hat einen zusätzlichen [Smart Contract auf Arbitrum] (https://arbiscan.io/address/0x9623063377ad1b27544c965ccd7342f7ea7e88c7). Der Ethereum-Hauptnetz-[GRT-Vertrag](https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) wird jedoch weiterhin funktionieren. ## Abrechnung auf Arbitrum FAQs @@ -69,10 +69,10 @@ Alle GRT-Abrechnungssalden wurden bereits erfolgreich auf Arbitrum migriert. Sie ## Woher weiß ich, dass die Arbitrum-Brücke sicher ist? -Die Brücke wurde [umfangreich geprüft] \(https://code4rena.com/contests/2022-10-the-graph-l2-bridge-contest), um die Sicherheit für alle Nutzer zu gewährleisten. +Die Brücke wurde [umfangreich geprüft] (https://code4rena.com/contests/2022-10-the-graph-l2-bridge-contest), um die Sicherheit für alle Nutzer zu gewährleisten. ## Was muss ich tun, wenn ich neue GRT von meiner Ethereum Mainnet Wallet hinzufüge? -Das Hinzufügen von GRT zu Ihrem Arbitrum-Abrechnungssaldo kann mit nur einem Klick in [Subgraph Studio] \(https://thegraph.com/studio/) erfolgen. Sie können Ihr GRT ganz einfach mit Arbitrum verbinden und Ihre API-Schlüssel in einer einzigen Transaktion füllen. +Das Hinzufügen von GRT zu Ihrem Arbitrum-Abrechnungssaldo kann mit nur einem Klick in [Subgraph Studio] (https://thegraph.com/studio/) erfolgen. Sie können Ihr GRT ganz einfach mit Arbitrum verbinden und Ihre API-Schlüssel in einer einzigen Transaktion füllen. -Besuchen Sie die [Abrechnungsseite] \(https://thegraph.com/docs/en/billing/) für detaillierte Anweisungen zum Hinzufügen, Abheben oder Erwerben von GRT. +Besuchen Sie die [Abrechnungsseite] (https://thegraph.com/docs/en/billing/) für detaillierte Anweisungen zum Hinzufügen, Abheben oder Erwerben von GRT. From 578e9714707bc70333447b13f0b88d47aab2467a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:04 -0400 Subject: [PATCH 430/924] New translations arbitrum-faq.mdx (Japanese) --- website/pages/ja/arbitrum/arbitrum-faq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ja/arbitrum/arbitrum-faq.mdx b/website/pages/ja/arbitrum/arbitrum-faq.mdx index f4504380dd8e..13f6a27c2591 100644 --- a/website/pages/ja/arbitrum/arbitrum-faq.mdx +++ b/website/pages/ja/arbitrum/arbitrum-faq.mdx @@ -41,7 +41,7 @@ L2でのThe Graphの活用には、このドロップダウンスイッチャー ## L2でのネットワークに参加したい場合は、どうすればいいのでしょうか? -Please help [test the network](https://testnet.thegraph.com/explorer) on L2 and report feedback about your experience in [Discord](https://discord.gg/graphprotocol). +L2 の [test the network](https://testnet.thegraph.com/explorer) にご協力いただき、[Discord](https://discord.gg/graphprotocol) でのエクスペリエンスに関するフィードバックを報告してください。 ## L2へのネットワーク拡張に伴うリスクはありますか? From 59733df3435f9bc0645ea5713eb756ae7bd866f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:05 -0400 Subject: [PATCH 431/924] New translations arbitrum-faq.mdx (Dutch) --- website/pages/nl/arbitrum/arbitrum-faq.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/pages/nl/arbitrum/arbitrum-faq.mdx b/website/pages/nl/arbitrum/arbitrum-faq.mdx index a9e47e65b6ba..457f2a55409b 100644 --- a/website/pages/nl/arbitrum/arbitrum-faq.mdx +++ b/website/pages/nl/arbitrum/arbitrum-faq.mdx @@ -2,7 +2,7 @@ title: Arbitrum FAQ --- -Klik [hier] \(#billing-on-arbitrum-faqs) als je de Arbitrum facturering FAQ wilt overslaan. +Klik [hier] (#billing-on-arbitrum-faqs) als je de Arbitrum facturering FAQ wilt overslaan. ## Waarom is The Graph een L2 oplossing aan het implementeren? @@ -45,7 +45,8 @@ Please help [test the network](https://testnet.thegraph.com/explorer) on L2 and ## Zijn er risico's verbonden met het schalen van het netwerk naar L2? -Alle smart contracts zijn grondig [ge-audit] (https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Alle smart contracts zijn grondig [ge-audit] +(https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). Alles is grondig getest, en een eventualiteiten plan is gemaakt en klaargezet voor een veilige en naadloze transitie. Details kunnen [hier](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20) gevonden worden. From 10d186357935a3e5ce50a5ccfc7d3f5fb17ace92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:06 -0400 Subject: [PATCH 432/924] New translations arbitrum-faq.mdx (Polish) --- website/pages/pl/arbitrum/arbitrum-faq.mdx | 50 +++++++++++----------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/website/pages/pl/arbitrum/arbitrum-faq.mdx b/website/pages/pl/arbitrum/arbitrum-faq.mdx index 4381ac1286cd..395fcc13723e 100644 --- a/website/pages/pl/arbitrum/arbitrum-faq.mdx +++ b/website/pages/pl/arbitrum/arbitrum-faq.mdx @@ -2,60 +2,60 @@ title: Arbitrum - najczęściej zadawane pytania --- -Click [here](#billing-on-arbitrum-faqs) if you would like to skip to the Arbitrum Billing FAQs. +Kliknij [tutaj](#billing-on-Arbitrum-faqs), jeśli chcesz przejść do najczęściej zadawanych pytań dotyczących rozliczeń w sieci Arbitrum. ## Dlaczego The Graph implementuje rozwiązanie L2 (ang. Layer 2)? Dzięki procesowi skalowania protokołu The Graph na L2, uczestnicy ekosystemu mogą liczyć na: -- Upwards of 26x savings on gas fees +- Ponad 26-krotną oszczędność na opłatach za gaz -- Szybsza prędkość transakcji +- Szybszą prędkość transakcji -- Security inherited from Ethereum +- Bezpieczeństwo jako spuścizna sieci Ethereum -Scaling the protocol smart contracts onto L2 allows network participants to interact more frequently at a reduced cost in gas fees. For example, Indexers could open and close allocations to index a greater number of subgraphs with greater frequency, developers could deploy and update subgraphs with greater ease, Delegators could delegate GRT with increased frequency, and Curators could add or remove signal to a larger number of subgraphs–actions previously considered too cost-prohibitive to perform frequently due to gas. +Skalowanie smart kontraktów protokołu na L2 pozwala uczestnikom sieci na częstsze interakcje przy niższych opłatach za gaz. Na przykład, Indekserzy mogą otwierać i zamykać alokacje w celu indeksowania większej liczby subgrafów z większą częstotliwością, Deweloperzy mogą wdrażać i aktualizować subgrafy z większą łatwością, delegatorzy mogą delegować GRT ze zwiększoną częstotliwością, a kuratorzy mogą dodawać lub usuwać sygnał do większej liczby subgrafów - działania wcześniej uważane za zbyt kosztowne do częstego wykonywania ze względu na gaz. -The Graph community decided to move forward with Arbitrum last year after the outcome of the [GIP-0031](https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) discussion. +W zeszłym roku społeczność The Graph postanowiła pójść o krok do przodu z Arbitrum po wynikach dyskusji [GIP-0031](https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305). ## Co należy zrobić by móc używać protokołu The Graph w L2? Użytkownicy muszą najpierw przenieść swoje tokeny GRT i ETH między sieciami L1 i L2 (ang. bridge tokens), używając do tego jednej z trzech poniższych metod: -- [The Graph Bridge on Arbitrum](https://bridge.arbitrum.io/?l2ChainId=42161) -- [TransferTo](https://transferto.xyz/swap) -- [Connext Bridge](https://bridge.connext.network/) -- [Hop Exchange](https://app.hop.exchange/#/send?token=ETH) +- [Most (ang.Bridge) The Graph na Arbitrum](https://bridge.arbitrum.io/?l2ChainId=42161) +- [Przeniesienie do](https://transferto.xyz/swap) +- [Most projektu Connext](https://bridge.connext.network/) +- [Giełda Hop](https://app.hop.exchange/#/send?token=ETH) -By w pełni wykorzystać wszystkie zalety używania protokołu The Graph w L2 warto używać rozwijanej listy aby przełączać się między łańcuchami. +By w pełni wykorzystać wszystkie zalety używania protokołu The Graph na L2 warto używać rozwijanej listy aby przełączać się między łańcuchami. -![Dropdown switcher to toggle Arbitrum](/img/arbitrum-screenshot-toggle.png) +![Przejście do listy zawierającej Arbitrum](/img/arbitrum-screenshot-toggle.png) ## Co powinien wiedzieć na ten temat subgraf developer, konsument danych, indekser, kurator lub delegator? -There is no immediate action required, however, network participants are encouraged to begin moving to Arbitrum to take advantage of the benefits of L2. +Nie jest wymagane natychmiastowe podjęcie działań, jednak uczestnicy sieci są zachęcani do rozpoczęcia przenoszenia się do sieci Arbitrum, aby skorzystać z zalet L2. -Core developer teams are working to create L2 transfer tools that will make it significantly easier to move delegation, curation, and subgraphs to Arbitrum. Network participants can expect L2 transfer tools to be available by summer of 2023. +Główne zespoły programistów pracują nad stworzeniem narzędzi do transferu L2, które znacznie ułatwią przeniesienie delegowania, kuratorowania i subgrafów do Arbitrum. Uczestnicy sieci mogą liczyć na dostęp do narzędzi transferu L2 do lata 2023 roku. Od 10 kwietnia 2023 roku 5% wszystkich nagród za indeksowanie jest emitowane w sieci Arbitrum. W miarę wzrostu udziału w sieci i zatwierdzenia przez Radę Fundacji The Graph, nagrody za indeksowanie stopniowo będą przenoszone z sieci Ethereum (L1) do sieci Arbitrum (L2), a ostatecznie całkowicie przeniosą się na Arbitrum. ## Co trzeba zrobić by zacząć uczestniczyć w sieci Arbitrum (L2)? -Please help [test the network](https://testnet.thegraph.com/explorer) on L2 and report feedback about your experience in [Discord](https://discord.gg/graphprotocol). +Prosimy o pomoc w [testowaniu sieci](https://testnet.thegraph.com/explorer) na L2 i zgłaszanie opinii na temat swoich doświadczeń na platformie [Discord](https://discord.gg/graphprotocol). ## Czy w związku ze skalowaniem sieci do L2 wiąże się jakieś ryzyko? -All smart contracts have been thoroughly [audited](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Wszystkie smart kontrakty przeszły dokładny [audyt] (https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). -Everything has been tested thoroughly, and a contingency plan is in place to ensure a safe and seamless transition. Details can be found [here](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20). +Wszystko zostało dokładnie przetestowane i przygotowano plan awaryjny, aby zapewnić bezpieczne i płynne przeniesienie. Szczegóły można znaleźć [tutaj](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20). -## Czy subgrafy, funkcjonujące już w sieci Ethereum, będą dalej działać? +## Czy subgrafy funkcjonujące już w sieci Ethereum, będą dalej działać? -Tak. kontrakty z The Graph Network będą funkcjonować równolegle w sieciach Ethereum i Arbitrum dopóki nie nastąpi całkowite przeniesienie do sieci Arbitrum w późniejszym etapie. +Tak. kontrakty z The Graph Network będą funkcjonować równolegle w sieciach Ethereum i Arbitrum dopóki nie nastąpi całkowite przeniesienie do sieci Arbitrum na późniejszym etapie. -## Czy GRT będzie miało nowy smart kontrakt wdrożony w sieci Arbitrum? +## Czy dla tokenu GRT zostanie wdrożony nowy smart kontrakt w sieci Arbitrum? -Yes, GRT has an additional [smart contract on Arbitrum](https://arbiscan.io/address/0x9623063377ad1b27544c965ccd7342f7ea7e88c7). However, the Ethereum mainnet [GRT contract](https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) will remain operational. +Tak, GRT ma dodatkowy [smart kontrakt na Arbitrum](https://arbiscan.io/address/0x9623063377ad1b27544c965ccd7342f7ea7e88c7). Jednak główna sieć Ethereum [kontrakt GRT](https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) będzie nadal funkcjonować. ## Najczęstsze pytania o: płatności w sieci Arbitrum @@ -65,14 +65,14 @@ Nie jest wymagana żadna akcja. Tokeny GRT zostały bezpiecznie zmigrowane do si ## Skąd mam wiedzieć, czy moje środki zostały bezpiecznie zmigrowane do sieci Arbitrum? -All GRT billing balances have already been successfully migrated to Arbitrum. You can view the billing contract on Arbitrum [here](https://arbiscan.io/address/0x1B07D3344188908Fb6DEcEac381f3eE63C48477a). +Wszystkie salda rozliczeniowe GRT zostały już pomyślnie przeniesione do Arbitrum. Możesz zobaczyć kontrakt rozliczeniowy na Arbitrum [tutaj] (https://arbiscan.io/address/0x1B07D3344188908Fb6DEcEac381f3eE63C48477a). ## Skąd mam wiedzieć że używanie "Arbitrum bridge" jest bezpieczne? -The bridge has been [heavily audited](https://code4rena.com/contests/2022-10-the-graph-l2-bridge-contest) to ensure safety and security for all users. +Most został poddany [szczegółowemu audytowi](https://code4rena.com/contests/2022-10-the-graph-l2-bridge-contest) w celu zapewnienia bezpieczeństwa wszystkim użytkownikom. ## O czym muszę pamiętać dodając nowe tokeny GRT z mojego portfela Ethereum? -Adding GRT to your Arbitrum billing balance can be done with a one-click experience in [Subgraph Studio](https://thegraph.com/studio/). You'll be able to easily bridge your GRT to Arbitrum and fill your API keys in one transaction. +Dodanie GRT do salda rozliczeniowego Arbitrum można wykonać jednym kliknięciem w [Subgraph Studio](https://thegraph.com/studio/). To właśnie tam można łatwo przenieść swoje GRT do Arbitrum i uzupełnić klucze API w jednej transakcji. -Visit the [Billing page](https://thegraph.com/docs/en/billing/) for more detailed instructions on adding, withdrawing, or acquiring GRT. +Odwiedź [stronę rozliczeniową] (https://thegraph.com/docs/en/billing/), aby uzyskać bardziej szczegółowe instrukcje dotyczące dodawania, wypłacania lub nabywania GRT. From 79bd0be1613465a94b94f78a91d5a8ecb0e3063d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:10 -0400 Subject: [PATCH 433/924] New translations arbitrum-faq.mdx (Urdu (Pakistan)) --- website/pages/ur/arbitrum/arbitrum-faq.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ur/arbitrum/arbitrum-faq.mdx b/website/pages/ur/arbitrum/arbitrum-faq.mdx index cf04e2f7ce74..b9c3c551e8dc 100644 --- a/website/pages/ur/arbitrum/arbitrum-faq.mdx +++ b/website/pages/ur/arbitrum/arbitrum-faq.mdx @@ -55,7 +55,7 @@ L2 پر گراف استعمال کرنے کا فائدہ اٹھانے کے لی ## کیا GRT کے پاس آربٹرم پر ایک نیا سمارٹ کنٹریکٹ تعینات ہوگا؟ -ہاں، GRT کے پاس ایک اضافی [Arbitrum پر سمارٹ کنٹریکٹ] \(https://arbiscan.io/address/0x9623063377ad1b27544c965ccd7342f7ea7e88c7)۔ تاہم، ایتھیریم مین نیٹ [GRT کنٹریکٹ] \(https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) کا کام جاری رہے گا۔ +ہاں، GRT کے پاس ایک اضافی [Arbitrum پر سمارٹ کنٹریکٹ] (https://arbiscan.io/address/0x9623063377ad1b27544c965ccd7342f7ea7e88c7)۔ تاہم، ایتھیریم مین نیٹ [GRT کنٹریکٹ] (https://etherscan.io/token/0xc944e90c64b2c07662a292be6244bdf05cda44a7) کا کام جاری رہے گا۔ ## آربٹرم اکثر پوچھے گئے سوالات پر بلنگ @@ -69,7 +69,7 @@ L2 پر گراف استعمال کرنے کا فائدہ اٹھانے کے لی ## میں کیسے جان سکتا ہوں کہ آربٹرم بریج محفوظ ہے؟ -تمام صارفین کے لیے حفاظت اور تحفظ کو یقینی بنانے کے لیے اس بریج کو [بھاری طرح سے آڈٹ] \(https://code4rena.com/contest/2022-10-the-graph-l2-bridge-contest) کیا گیا ہے۔ +تمام صارفین کے لیے حفاظت اور تحفظ کو یقینی بنانے کے لیے اس بریج کو [بھاری طرح سے آڈٹ] (https://code4rena.com/contest/2022-10-the-graph-l2-bridge-contest) کیا گیا ہے۔ ## اگر میں اپنے ایتھیریم مینیٹ والیٹ سے تازہ GRT شامل کر رہا ہوں تو مجھے کیا کرنے کی ضرورت ہے؟ From ee4afc52edd92beab74a84c1fe88ba27523efa68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:11 -0400 Subject: [PATCH 434/924] New translations arbitrum-faq.mdx (Hindi) --- website/pages/hi/arbitrum/arbitrum-faq.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/hi/arbitrum/arbitrum-faq.mdx b/website/pages/hi/arbitrum/arbitrum-faq.mdx index b15e01146e35..0b529205f465 100644 --- a/website/pages/hi/arbitrum/arbitrum-faq.mdx +++ b/website/pages/hi/arbitrum/arbitrum-faq.mdx @@ -47,7 +47,7 @@ Please help [test the network](https://testnet.thegraph.com/explorer) on L2 and सभी स्मार्ट अनुबंधों का पूरी तरह से [audited](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf) किया गया है। -हर चीज़ का पूरी तरह से परीक्षण किया गया है, और एक सुरक्षित और निर्बाध संक्रमण सुनिश्चित करने के लिए एक आकस्मिक योजना बनाई गई है। विवरण यहां पाया जा सकता है [here] \(https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and- सुरक्षा-विचार-20). +हर चीज़ का पूरी तरह से परीक्षण किया गया है, और एक सुरक्षित और निर्बाध संक्रमण सुनिश्चित करने के लिए एक आकस्मिक योजना बनाई गई है। विवरण यहां पाया जा सकता है [here] (https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and- सुरक्षा-विचार-20). ## क्या एथेरियम पर मौजूदा सबग्राफ काम करना जारी रखेंगे? @@ -73,6 +73,6 @@ The bridge has been [heavily audited](https://code4rena.com/contests/2022-10-the ## अगर मैं अपने एथेरियम मेननेट वॉलेट से ताजा जीआरटी जोड़ रहा हूं तो मुझे क्या करना होगा? -आपके आर्बिट्रम बिलिंग बैलेंस में जीआरटी जोड़ना [सबग्राफ स्टूडियो] \(https://thegraph.com/studio/) में एक-क्लिक अनुभव के साथ किया जा सकता है। आप आसानी से अपने जीआरटी को आर्बिट्रम से जोड़ सकेंगे और एक लेनदेन में अपनी एपीआई कुंजी भर सकेंगे। +आपके आर्बिट्रम बिलिंग बैलेंस में जीआरटी जोड़ना [सबग्राफ स्टूडियो] (https://thegraph.com/studio/) में एक-क्लिक अनुभव के साथ किया जा सकता है। आप आसानी से अपने जीआरटी को आर्बिट्रम से जोड़ सकेंगे और एक लेनदेन में अपनी एपीआई कुंजी भर सकेंगे। Visit the [Billing page](https://thegraph.com/docs/en/billing/) for more detailed instructions on adding, withdrawing, or acquiring GRT. From eece5a105bb21d6be5efb6cdecaae9ae5b6a12ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:12 -0400 Subject: [PATCH 435/924] New translations arbitrum-faq.mdx (Yoruba) --- website/pages/yo/arbitrum/arbitrum-faq.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/yo/arbitrum/arbitrum-faq.mdx b/website/pages/yo/arbitrum/arbitrum-faq.mdx index 41f7ca653d30..7c0e94324e40 100644 --- a/website/pages/yo/arbitrum/arbitrum-faq.mdx +++ b/website/pages/yo/arbitrum/arbitrum-faq.mdx @@ -2,7 +2,7 @@ title: Arbitrum FAQ --- -Te [ibi yìí]\(#ìwé ọ̀rọ̀ lórí àwọn Ìbéèrè loorekoore tí Arbitrum) Tí ó ba fe jásí Àwọn ìbéèrè tí àwọn ènìyàn sáábà máa ń Béèrè Lórí Arbitrum. +Te [ibi yìí](#ìwé ọ̀rọ̀ lórí àwọn Ìbéèrè loorekoore tí Arbitrum) Tí ó ba fe jásí Àwọn ìbéèrè tí àwọn ènìyàn sáábà máa ń Béèrè Lórí Arbitrum. ## Kíni ìdí tí The Graph ń ṣé ìmúṣẹ ojútùú L2? @@ -16,7 +16,7 @@ Nípa wí wọn The Graph lórí L2, àwọn olukopa nẹtiwọọki lè nírèt Gidiwọn àwọn àdéhùn jíjáfáfá ìlànà lórí L2 ngbanilaaye àwọn olukopa nẹtiwọọki làti ṣé ajọṣepọ nígbà gbogbo ní ìdíyelé idinku nínú àwọn ìdíyelé gaasi. Fún àpẹẹrẹ, Àwọn alatọka lè kopa ninu ṣíṣí ati títí awọn ipin si atọ́ka nọmba ti o tóbi ju ti àwọn Subgrafu pẹlu igbohunsafẹfẹ nla, àwọn olupilẹṣẹ lè ràn lọ àti imudojuiwọn àwọn Subgrafu pẹ̀lú irọrun ńlá, Àwọn aṣojú lè ṣé aṣojú GRT pẹ̀lú igbohunsafẹfẹ ti o pọ si, ati Awọn olutọpa le ṣafikun tabi yọ ami ifihan kuro si nọmba nla ti awọn Subgrafu-awọn iṣe ti a ti ro tẹlẹ ju iye owo idinamọ lati ṣe nigbagbogbo nitori gaasi. -Agbegbe The Graph pinnu lati lọ siwaju pẹlu Arbitrum ni ọdun to kọja lẹhin abajade ti ijiroro [GIP-0031] \(https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) +Agbegbe The Graph pinnu lati lọ siwaju pẹlu Arbitrum ni ọdun to kọja lẹhin abajade ti ijiroro [GIP-0031] (https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) ## Kini mo nilo lati se lati lo The Graph lori L2? @@ -45,7 +45,8 @@ Jọwọ ṣe iranlọwọ [ṣe idanwo netiwọki](https://testnet.thegraph.com ## Ṣe awọn ewu eyikeyi wa ni nkan ṣe pẹlu iwọn nẹtiwọọki si L2? -Gbogbo awọn adehun ọlọgbọn ti jẹ daradara [ayewo pipe](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Gbogbo awọn adehun ọlọgbọn ti jẹ daradara +[ayewo pipe](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). Ohùn gbogbo tí ní ìdánwò dáradára, àti pé èrò airotẹlẹ kàn wá ní ayé láti ríi dájú wípé ìyípadà ailewu àti ailẹgbẹ. Àwọn àlàyé lè ṣé rí [níbi yìí](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20). From 54d281b09c273a95955072d85d75fd920e7e0a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:13 -0400 Subject: [PATCH 436/924] New translations l2-transfer-tools-faq.mdx (Romanian) --- .../ro/arbitrum/l2-transfer-tools-faq.mdx | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/ro/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/ro/arbitrum/l2-transfer-tools-faq.mdx index 43f96152931a..b075b7548fb8 100644 --- a/website/pages/ro/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/ro/arbitrum/l2-transfer-tools-faq.mdx @@ -42,15 +42,15 @@ If you have the L1 transaction hash (which you can find by looking at the recent To transfer your subgraph, you will need to complete the following steps: -1. Initiate the transfer on Ethereum mainnet +1. Initiate the transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation +2. Wait 20 minutes for confirmation -3. Confirm subgraph transfer on Arbitrum\* +3. Confirm subgraph transfer on Arbitrum\* -4. Finish publishing subgraph on Arbitrum +4. Finish publishing subgraph on Arbitrum -5. Update Query URL (recommended) +5. Update Query URL (recommended) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ Gas fees on Arbitrum One are paid using bridged ETH (i.e. ETH that has been brid To transfer your delegation, you will need to complete the following steps: -1. Initiate delegation transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation -3. Confirm delegation transfer on Arbitrum +1. Initiate delegation transfer on Ethereum mainnet +2. Wait 20 minutes for confirmation +3. Confirm delegation transfer on Arbitrum \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans To transfer your curation, you will need to complete the following steps: -1. Initiate signal transfer on Ethereum mainnet +1. Initiate signal transfer on Ethereum mainnet -2. Specify an L2 Curator address\* +2. Specify an L2 Curator address\* -3. Wait 20 minutes for confirmation +3. Wait 20 minutes for confirmation \*If necessary - i.e. you are using a contract address. @@ -232,11 +232,11 @@ There is no bulk transfer option at this time. To transfer your stake, you will need to complete the following steps: -1. Initiate stake transfer on Ethereum mainnet +1. Initiate stake transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation +2. Wait 20 minutes for confirmation -3. Confirm stake transfer on Arbitrum +3. Confirm stake transfer on Arbitrum \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Yes! The process is a bit different, because vesting contracts can't forward the To transfer your vesting, you will need to complete the following steps: -1. Initiate the vesting transfer on Ethereum mainnet +1. Initiate the vesting transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation +2. Wait 20 minutes for confirmation -3. Confirm vesting transfer on Arbitrum +3. Confirm vesting transfer on Arbitrum ### How do I transfer my vesting contract if I am only partially vested? -1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) +1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) -2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. +2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. -3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. +3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. -4. Withdraw any remaining ETH from the transfer tool contract +4. Withdraw any remaining ETH from the transfer tool contract ### How do I transfer my vesting contract if I am fully vested? @@ -314,13 +314,13 @@ To transfer your vesting, you will need to complete the following steps: For those that are fully vested, the process is similar: -1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) +1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) -2. Set your L2 address with a call to the transfer tool contract +2. Set your L2 address with a call to the transfer tool contract -3. Send your stake/delegation to L2 through the "locked" transfer tool functions in the L1 Staking contract. +3. Send your stake/delegation to L2 through the "locked" transfer tool functions in the L1 Staking contract. -4. Withdraw any remaining ETH from the transfer tool contract +4. Withdraw any remaining ETH from the transfer tool contract ### Can I transfer my vesting contract to Arbitrum? @@ -360,17 +360,17 @@ These steps only apply if your contract is still vesting, or if you've used this To transfer your vesting contract to L2, you will send any GRT balance to L2 using the transfer tools, which will initialize your L2 vesting contract: -1. Deposit some ETH into the transfer tool contract (this will be used to pay for L2 gas) +1. Deposit some ETH into the transfer tool contract (this will be used to pay for L2 gas) -2. Revoke protocol access to the vesting contract (needed for the next step) +2. Revoke protocol access to the vesting contract (needed for the next step) -3. Give protocol access to the vesting contract (will allow your contract to interact with the transfer tool) +3. Give protocol access to the vesting contract (will allow your contract to interact with the transfer tool) -4. Specify an L2 beneficiary address\* and initiate the balance transfer on Ethereum mainnet +4. Specify an L2 beneficiary address\* and initiate the balance transfer on Ethereum mainnet -5. Wait 20 minutes for confirmation +5. Wait 20 minutes for confirmation -6. Confirm the balance transfer on L2 +6. Confirm the balance transfer on L2 \*If necessary - i.e. you are using a contract address. From 3157828a8071835d229f42dda691965639552620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:14 -0400 Subject: [PATCH 437/924] New translations l2-transfer-tools-faq.mdx (French) --- .../fr/arbitrum/l2-transfer-tools-faq.mdx | 100 +++++++++--------- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx index 9203f9d967dd..d43463682da5 100644 --- a/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx @@ -14,7 +14,7 @@ Ces outils vous obligeront à suivre un ensemble d'étapes spécifiques en fonct ### Puis-je utiliser le même portefeuille que celui que j'utilise sur le réseau principal Ethereum ? -Si vous utilisez un portefeuille [EOA](https://ethereum.org/en/developers/docs/accounts/#types-of-account), vous pouvez utiliser la même adresse. Si votre portefeuille du mainnet Ethereum est un contrat (par exemple un multisig), vous devez alors spécifier une [adresse du portefeuille Arbitrum]\(/arbitrum/arbitrum-faq/#what-do-i-deed-to-do-to-use-the- graph-on-l2) où votre virement sera envoyé. Veuillez vérifier attentivement l'adresse car tout transfert vers une adresse incorrecte peut entraîner une perte permanente. Si vous souhaitez utiliser un multisig sur L2, veillez à déployer un contrat multisig sur Arbitrum One. +Si vous utilisez un portefeuille [EOA](https://ethereum.org/en/developers/docs/accounts/#types-of-account), vous pouvez utiliser la même adresse. Si votre portefeuille du mainnet Ethereum est un contrat (par exemple un multisig), vous devez alors spécifier une [adresse du portefeuille Arbitrum](/arbitrum/arbitrum-faq/#what-do-i-deed-to-do-to-use-the- graph-on-l2) où votre virement sera envoyé. Veuillez vérifier attentivement l'adresse car tout transfert vers une adresse incorrecte peut entraîner une perte permanente. Si vous souhaitez utiliser un multisig sur L2, veillez à déployer un contrat multisig sur Arbitrum One. Les portefeuilles sur les blockchains EVM comme Ethereum et Arbitrum sont une paire de clés (publiques et privées) que vous créez sans avoir besoin d'interagir avec la blockchain. Ainsi, tout portefeuille créé pour Ethereum fonctionnera également sur Arbitrum sans action supplémentaire. @@ -42,21 +42,21 @@ Si vous disposez du hachage de transaction L1 (que vous pouvez trouver en consul Pour transférer votre subgraph, suivez les étapes qui suivent : -1. Initier le transfert sur le mainnet Ethereum +1. Initier le transfert sur le mainnet Ethereum -2. Attendre 20 minutes pour une confirmation +2. Attendre 20 minutes pour une confirmation -3. Vérifier le transfert de subgraph sur Arbitrum\* +3. Vérifier le transfert de subgraph sur Arbitrum\* -4. Terminer la publication du sous-graphe sur Arbitrum +4. Terminer la publication du sous-graphe sur Arbitrum -5. Mettre à jour l’URL de requête (recommandé) +5. Mettre à jour l’URL de requête (recommandé) \*Notez que vous devez confirmer le transfert dans un délai de 7 jours, faute de quoi votre subgraph pourrait être perdu. Dans la plupart des cas, cette étape s'exécutera automatiquement, mais une confirmation manuelle peut être nécessaire en cas de hausse du prix du gaz sur Arbitrum. En cas de problème au cours de ce processus, des ressources seront disponibles pour vous aider : contactez le service d'assistance à l'adresse support@thegraph.com ou sur [Discord](https://discord.gg/graphprotocol). ### D’où dois-je initier mon transfert ? -Vous pouvez effectuer votre transfert à partir de la [Subgraph Studio] \(https://thegraph.com/studio/), [Explorer,] \(https://thegraph.com/explorer) ou de n’importe quelle page de détails de subgraph. Cliquez sur le bouton "Transférer le subgraph" dans la page de détails du subgraph pour démarrer le transfert. +Vous pouvez effectuer votre transfert à partir de la [Subgraph Studio] (https://thegraph.com/studio/), [Explorer,] (https://thegraph.com/explorer) ou de n’importe quelle page de détails de subgraph. Cliquez sur le bouton "Transférer le subgraph" dans la page de détails du subgraph pour démarrer le transfert. ### Combien de temps dois-je attendre avant que mon subgraph soit transféré ? @@ -108,9 +108,9 @@ Les frais de gaz sur Arbitrum One sont payés en utilisant l'ETH bridgé (c'est- Pour transférer votre délégation, complétez les étapes suivantes : -1. Lancer un transfert de délégation sur le mainnet Ethereum -2. Attender 20 minutes pour la confirmation -3. Confirmer le transfert de délégation sur Arbitrum +1. Lancer un transfert de délégation sur le mainnet Ethereum +2. Attender 20 minutes pour la confirmation +3. Confirmer le transfert de délégation sur Arbitrum \*\*\*\*Vous devez confirmer la transaction pour compléter le transfert de la délégation sur Arbitrum. Cette étape doit être réalisée dans les 7 jours, sinon la délégation pourrait être perdue. Dans la plupart des cas, cette étape se déroule automatiquement, mais une confirmation manuelle peut être nécessaire en cas de hausse du prix du gaz sur Arbitrum. Si vous rencontrez des problèmes au cours de ce processus, il y aura des ressources pour vous aider : contactez le support à support@thegraph.com ou sur [Discord](https://discord.gg/graphprotocol). @@ -154,7 +154,7 @@ Oui! Le processus est un peu différent car les contrats d'acquisition ne peuven Non, le contrat d'acquisition créé sur Arbitrum ne permettra pas de libérer de GRT avant la fin du délai d'acquisition, c'est-à-dire jusqu'à ce que votre contrat soit entièrement acquis. L’objectif est d’éviter une double dépense, sinon il serait possible de débloquer les mêmes montants sur les deux niveaux. -If you'd like to release GRT from the vesting contract, you can transfer them back to the L1 vesting contract using Explorer: in your Arbitrum One profile, you will see a banner saying you can transfer GRT back to the mainnet vesting contract. This requires a transaction on Arbitrum One, waiting 7 days, and a final transaction on mainnet, as it uses the same native bridging mechanism from the GRT bridge. +Si vous souhaitez libérer les GRT du contrat d'acquisition, vous pouvez les retransférer vers le contrat d'acquisition L1 à l'aide d'Explorer : dans votre profil Arbitrum One, vous verrez une bannière indiquant que vous pouvez retransférer les GRT vers le contrat de vesting du mainnet. Cela nécessite une transaction sur Arbitrum One, en attente de 7 jours, et une transaction finale sur le mainnet, car elle utilise le même mécanisme de pontage natif que celui du pont GRT. ### Y a-t-il une taxe de délégation ? @@ -168,27 +168,27 @@ Au niveau du smart contract, les récompenses non réalisées font déjà partie ### Le déplacement des délégations en L2 est-il obligatoire ? Y a-t-il un délai ? -​Moving delegation to L2 is not mandatory, but indexing rewards are increasing on L2 following the timeline described in [GIP-0052](https://forum.thegraph.com/t/gip-0052-timeline-and-requirements-to-increase-rewards-in-l2/4193). Eventually, if the Council keeps approving the increases, all rewards will be distributed in L2 and there will be no indexing rewards for Indexers and Delegators on L1. ​ +Le déplacement de la délégation vers L2 n'est pas obligatoire, mais les récompenses d'indexation augmentent en L2 selon le calendrier décrit dans [GIP-0052](https://forum.thegraph.com/t/gip-0052-timeline-and-requirements-to- augmentation-récompenses-en-l2/4193). À terme, si le Conseil continue d'approuver les augmentations, toutes les récompenses seront distribuées en L2 et il n'y aura aucune récompense d'indexation pour les indexeurs et les délégués en L1. ​ -### If I am delegating to an Indexer that has already transferred stake to L2, do I stop receiving rewards on L1? +### Si je délègue à un indexeur qui a déjà transféré sa participation en L2, est-ce que je cesse de recevoir des récompenses sur L1 ? -​Many Indexers are transferring stake gradually so Indexers on L1 will still be earning rewards and fees on L1, which are then shared with Delegators. Once an Indexer has transferred all of their stake, then they will stop operating on L1, so Delegators will not receive any more rewards unless they transfer to L2. +De nombreux indexeurs transfèrent progressivement leur participation, de sorte que les indexeurs sur L1 continueront de gagner des récompenses et des frais sur L1, qui seront ensuite partagés avec les délégués. Une fois qu'un indexeur a transféré la totalité de sa participation, il cessera de fonctionner sur L1, de sorte que les délégués ne recevront plus de récompenses à moins qu'ils ne soient transférés vers L2. Finalement, si le Conseil continue d'approuver les augmentations des récompenses d'indexation en L2, toutes les récompenses seront distribuées sur L2 et il n'y aura aucune récompense d'indexation pour les indexeurs et les délégués en L1. ​ ### Je ne vois pas de bouton pour transférer ma délégation. Pourquoi donc? -​Your Indexer has probably not used the L2 transfer tools to transfer stake yet. +Votre indexeur n'a probablement pas encore activé les outils de transfert L2 pour transférer les participations. -If you can contact the Indexer, you can encourage them to use the L2 Transfer Tools so that Delegators can transfer delegations to their L2 Indexer address. ​ +Si vous pouvez contacter l'indexeur, vous pouvez l'encourager à utiliser les outils de transfert L2 afin que les délégués puissent transférer des délégations vers leur adresse d'indexeur L2. ​ ### Mon Indexeur est également sur Arbitrum, mais je ne vois pas de bouton pour transférer la délégation dans mon profil. Pourquoi donc? -​It is possible that the Indexer has set up operations on L2, but hasn't used the L2 transfer tools to transfer stake. The L1 smart contracts will therefore not know about the Indexer's L2 address. If you can contact the Indexer, you can encourage them to use the transfer tool so that Delegators can transfer delegations to their L2 Indexer address. ​ +Il est possible que l'indexeur ait mis en place des opérations sur L2, mais qu'il n'ait pas activé les outils de transfert L2 pour transférer des participations. Les smart contracts L1 ne connaîtront donc pas l'adresse L2 de l'indexeur. Si vous pouvez contacter l'indexeur, vous pouvez l'encourager à activer l'outil de transfert afin que les délégués puissent transférer des délégations à l'adresse de l'indexeur L2 ### Puis-je transférer ma délégation à L2 si j'ai entamé la procédure de dé-délégation et que je ne l'ai pas encore retirée ? -​No. If your delegation is thawing, you have to wait the 28 days and withdraw it. +Non. Si votre délégation dégèle, vous devez attendre 28 jours et la retirer. Les jetons en cours de dé-délégation sont « verrouillés » et ne peuvent donc pas être transférés vers L2. @@ -198,11 +198,11 @@ Les jetons en cours de dé-délégation sont « verrouillés » et ne peuvent do Pour transférer votre curation, vous devrez compléter les étapes suivantes : -1. Initier le transfert de signal sur le mainnet Ethereum +1. Initier le transfert de signal sur le mainnet Ethereum -2. Spécifiez une adresse de curateur L2\* +2. Spécifiez une adresse de curateur L2\* -3. Attendez 20 minutes pour confirmer +3. Attendez 20 minutes pour confirmer \*Si nécessaire, c'est-à-dire que vous utilisez une adresse contractuelle. @@ -232,11 +232,11 @@ Il n’existe actuellement aucune option de transfert groupé. Pour transférer votre participation, vous devrez suivre les étapes suivantes : -1. Initier un transfert de participation sur Ethereum mainnet +1. Initier un transfert de participation sur Ethereum mainnet -2. Attendre 20 minutes pour confirmer +2. Attendre 20 minutes pour confirmer -3. Confirmer le transfert de participation sur Arbitrum +3. Confirmer le transfert de participation sur Arbitrum \*Notez que vous devez confirmer le transfert dans les 7 jours, sinon votre mise pourrait être perdue. Dans la plupart des cas, cette étape s'exécutera automatiquement, mais une confirmation manuelle peut être nécessaire en cas de hausse du prix du gaz sur Arbitrum. Si vous rencontrez des problèmes au cours de ce processus, des ressources seront disponibles pour vous aider : contactez l'assistance à support@thegraph.com ou sur [Discord](https://discord.gg/graphprotocol). @@ -276,11 +276,11 @@ Non, pour que les délégataires puissent transférer leur GRT délégué à Arb Oui! Le processus est un peu différent, car les contrats d'acquisition ne peuvent pas transmettre l'ETH nécessaire pour payer le gaz L2, vous devez donc le déposer au préalable. Si votre contrat d'acquisition n'est pas entièrement acquis, vous devrez également initialiser au préalable un contrat d'acquisition contrepartie sur L2 et ne pourrez transférer la participation que sur ce contrat d'acquisition L2. L'interface utilisateur d'Explorer peut vous guider tout au long de ce processus lorsque vous êtes connecté à Explorer à l'aide du portefeuille de verrouillage d'acquisition. -### I already have stake on L2. Do I still need to send 100k GRT when I use the transfer tools the first time? +### J'ai déjà des participations en L2. Dois-je toujours envoyer 100 000 GRT lorsque j'utilise les outils de transfert pour la première fois ? -​Yes. The L1 smart contracts will not be aware of your L2 stake, so they will require you to transfer at least 100k GRT when you transfer for the first time. ​ +Oui. Les smart contracts L1 ne connaissent pas vos participations en L2, ils vous exigeront donc de transférer au moins 100 000 GRT lors de votre premier transfert. ​ -### Can I transfer my stake to L2 if I am in the process of unstaking GRT? +### Puis-je transférer ma participation vers L2 si je suis en train de retirer du GRT ? Non. Si une fraction de votre mise est en train de dégeler, vous devez attendre les 28 jours et la retirer avant de pouvoir transférer votre mise. Les jetons mis en jeu sont "verrouillés" et empêchent tout transfert ou mise vers L2. @@ -290,23 +290,23 @@ Non. Si une fraction de votre mise est en train de dégeler, vous devez attendre Pour transférer votre vesting, vous devez suivre les étapes suivantes : -1. Initier le transfert de vesting sur Ethereum mainnet +1. Initier le transfert de vesting sur Ethereum mainnet -2. Attendre 20 minutes pour confirmer +2. Attendre 20 minutes pour confirmer -3. Confirmer le transfert de vesting dans Arbitrum +3. Confirmer le transfert de vesting dans Arbitrum ### Comment puis-je transférer mon contrat de vesting si je ne suis que partiellement investi? -1. Déposez quelques ETH dans le contrat de l'outil de transfert (l'interface utilisateur peut vous aider à estimer un montant raisonnable) +1. Déposez quelques ETH dans le contrat de l'outil de transfert (l'interface utilisateur peut vous aider à estimer un montant raisonnable) -2. Envoyez une partie de la GRT verrouillée au moyen du contrat de l’outil de transfert au L2 pour initialiser le verrou d’acquisition L2, ce qui établira également l’adresse du bénéficiaire L2. +2. Envoyez une partie de la GRT verrouillée au moyen du contrat de l’outil de transfert au L2 pour initialiser le verrou d’acquisition L2, ce qui établira également l’adresse du bénéficiaire L2. -3. Envoyer leur enjeu/délégation à L2 via les fonctions de l’outil de transfert "verrouillé" du contrat L1Staking. +3. Envoyer leur enjeu/délégation à L2 via les fonctions de l’outil de transfert "verrouillé" du contrat L1Staking. -4. Retirer tout ETH restant du contrat d’outil de transfert +4. Retirer tout ETH restant du contrat d’outil de transfert ### Comment puis-je transférer mon contrat d’acquisition si je suis entièrement investi? @@ -314,13 +314,13 @@ Pour transférer votre vesting, vous devez suivre les étapes suivantes : Pour ceux qui ont acquis la totalité de leurs droits, le processus est similaire : -1. Déposez quelques ETH dans le contrat de l'outil de transfert (l'interface utilisateur peut vous aider à estimer un montant raisonnable) +1. Déposez quelques ETH dans le contrat de l'outil de transfert (l'interface utilisateur peut vous aider à estimer un montant raisonnable) -2. Paramétrez votre adresse L2 en appelant le contrat outil de transfert +2. Paramétrez votre adresse L2 en appelant le contrat outil de transfert -3. Envoyez votre participation/délégation à L2 via les fonctions de l'outil de transfert « verrouillées » dans le contrat de Staking L1. +3. Envoyez votre participation/délégation à L2 via les fonctions de l'outil de transfert « verrouillées » dans le contrat de Staking L1. -4. Retirez tout ETH restant du contrat de l'outil de transfert +4. Retirez tout ETH restant du contrat de l'outil de transfert ### Puis-je transférer mon contrat de vesting à Arbitrum ? @@ -336,11 +336,13 @@ Si vous n’avez transféré aucun solde de contrat de vesting à L2 et que votr ### J’utilise mon contrat de vesting pour investir dans mainnet. Puis-je transférer ma participation à Arbitrum? -Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat d’acquisition L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat d’acquisition dans Explorer. Si votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. +Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat d’acquisition L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat d’acquisition dans Explorer. Si +votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. ### J’utilise mon contrat de vesting pour déléguer sur mainnet. Puis-je transférer mes délégations à Arbitrum? -Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat de vesting L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat de vesting dans Explorer. Si votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. +Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat de vesting L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat de vesting dans Explorer. Si +votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. ### Puis-je spécifier un bénéficiaire différent pour mon contrat de vesting sur L2? @@ -360,31 +362,31 @@ Ces étapes ne s'appliquent que si votre contrat est encore en cours de vesting Pour transférer votre contrat de vesting à L2, vous enverrez tout solde de TRB à L2 à l’aide des outils de transfert, ce qui initialisera votre contrat de vesting à L2 : -1. Déposez de l'ETH dans le contrat de l'outil de transfert (cela sera utilisé pour payer le gaz L2) +1. Déposez de l'ETH dans le contrat de l'outil de transfert (cela sera utilisé pour payer le gaz L2) -2. Révoquer l'accès au protocole au contrat de vesting (nécessaire pour l'étape suivante) +2. Révoquer l'accès au protocole au contrat de vesting (nécessaire pour l'étape suivante) -3. Donner au protocole l'accès au contrat de vesting (pour permettre à votre contrat d'interagir avec l'outil de transfert) +3. Donner au protocole l'accès au contrat de vesting (pour permettre à votre contrat d'interagir avec l'outil de transfert) -4. Spécifiez une adresse de bénéficiaire L2\* et lancez le transfert de solde sur le mainnet Ethereum +4. Spécifiez une adresse de bénéficiaire L2\* et lancez le transfert de solde sur le mainnet Ethereum -5. Attendre 20 minutes pour une confirmation +5. Attendre 20 minutes pour une confirmation -6. Confirmation du transfert de solde à L2 +6. Confirmation du transfert de solde à L2 \*Si nécessaire, c'est-à-dire que vous utilisez une adresse contractuelle. \*\*\*\*Vous devez confirmer votre transaction pour terminer le transfert de solde sur Arbitrum. Cette étape doit être complétée dans un délai de 7 jours sinon le solde pourrait être perdu. Dans la plupart des cas, cette étape s'exécutera automatiquement, mais une confirmation manuelle peut être nécessaire en cas de hausse du prix du gaz sur Arbitrum. Si vous rencontrez des problèmes au cours de ce processus, des ressources seront disponibles pour vous aider : contactez l'assistance à support@thegraph.com ou sur [Discord](https://discord.gg/graphprotocol). -### My vesting contract shows 0 GRT so I cannot transfer it, why is this and how do I fix it? +### Mon contrat de vesting indique 0 GRT donc je ne peux pas le transférer - pourquoi et comment régler ça ? -​To initialize your L2 vesting contract, you need to transfer a nonzero amount of GRT to L2. This is required by the Arbitrum GRT bridge that is used by the L2 Transfer Tools. The GRT must come from the vesting contract's balance, so it does not include staked or delegated GRT. +Pour initialiser votre contrat de vesting en L2, vous devez transférer un montant non nul de GRT en L2. Cette opération est requise par le pont Arbitrum GRT utilisé par les outils de transfert L2. Les GRT doivent provenir du solde du contrat de vesting, n'incluant donc pas les GRT stackés ou délégués. Si vous avez stacké ou délégué tous vos GRT à partir du contrat de vesting, vous pouvez envoyer manuellement un petit montant (1 GRT) à l'adresse du contrat de vesting à partir de n'importe quel autre endroit (exemple : à partir d'un autre portefeuille ou d'un échange) ### J'utilise un contrat de vesting pour mettre en jeu ou déléguer, mais je ne vois pas de bouton pour transférer ma mise en jeu ou ma délégation à L2, que dois-je faire ? -​If your vesting contract hasn't finished vesting, you need to first create an L2 vesting contract that will receive your stake or delegation on L2. This vesting contract will not allow releasing tokens in L2 until the end of the vesting timeline, but will allow you to transfer GRT back to the L1 vesting contract to be released there. +Si votre contrat de vesting n'a pas fini d'être acquis, vous devez d'abord créer un contrat de vesting L2 qui recevra votre mise ou votre délégation sur L2. Ce contrat de vesting ne permettra pas de libérer des jetons en L2 avant la fin de la période de vesting, mais il vous permettra de transférer des GRT vers le contrat de vesting en L1 pour les y libérer. Lorsque vous êtes connecté au contrat de vesting sur Explorer, vous devriez voir un bouton pour initialiser votre contrat de vesting L2. Suivez d'abord cette procédure et vous verrez ensuite les boutons pour transférer votre participation ou votre délégation dans votre profil From 4470aa6650e4755a1f68ad924bdf11f5c018cd15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:15 -0400 Subject: [PATCH 438/924] New translations l2-transfer-tools-faq.mdx (Spanish) --- .../es/arbitrum/l2-transfer-tools-faq.mdx | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/es/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/es/arbitrum/l2-transfer-tools-faq.mdx index f52e0179c45b..b13db10c2ca7 100644 --- a/website/pages/es/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/es/arbitrum/l2-transfer-tools-faq.mdx @@ -42,15 +42,15 @@ Si tienes el hash de la transacción en L1 (que puedes encontrar revisando las t Para transferir tu subgrafo, tendrás que completar los siguientes pasos: -1. Inicia la transferencia en Ethereum mainnet +1. Inicia la transferencia en Ethereum mainnet -2. Espera 20 minutos para la confirmación +2. Espera 20 minutos para la confirmación -3. Confirma la transferencia del subgrafo en Arbitrum +3. Confirma la transferencia del subgrafo en Arbitrum -4. Termina de publicar el subgrafo en Arbitrum +4. Termina de publicar el subgrafo en Arbitrum -5. Actualiza la URL de consulta (recomendado) +5. Actualiza la URL de consulta (recomendado) \*Ten en cuenta que debes confirmar la transferencia dentro de los 7 días, de lo contrario, es posible que se pierda tu subgrafo. En la mayoría de los casos, este paso se ejecutará automáticamente, pero puede ser necesaria una confirmación manual si hay un aumento en el precio del gas en Arbitrum. Si surgen problemas durante este proceso, habrá recursos disponibles para ayudarte: ponte en contacto con el soporte en support@thegraph.com o en [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ Las tarifas de gas en Arbitrum One se pagan utilizando ETH bridgeado (es decir, Para transferir tu delegación, deberás seguir los siguientes pasos: -1. Inicia la transferencia de delegación en Ethereum mainnet -2. Espera 20 minutos para la confirmación -3. Confirma la transferencia de delegación en Arbitrum +1. Inicia la transferencia de delegación en Ethereum mainnet +2. Espera 20 minutos para la confirmación +3. Confirma la transferencia de delegación en Arbitrum \*\*\*\*Debes confirmar la transacción para completar la transferencia de la delegación en Arbitrum. Este paso debe completarse dentro de los 7 días o la delegación podría perderse. En la mayoría de los casos, este paso se ejecutará automáticamente, pero puede ser necesaria una confirmación manual si hay un aumento en el precio del gas en Arbitrum. Si surgen problemas durante este proceso, habrá recursos disponibles para ayudarte: contacta con el soporte en support@thegraph.com o en [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ Los tokens que se están desdelegando están "bloqueados" y, por lo tanto, no se Para transferir tu curación, deberás completar los siguientes pasos: -1. Iniciar la transferencia de señal en Ethereum mainnet +1. Iniciar la transferencia de señal en Ethereum mainnet -2. Especifica una dirección L2 de Curador +2. Especifica una dirección L2 de Curador -3. Espera 20 minutos para la confirmación +3. Espera 20 minutos para la confirmación \*Si es necesario - i.e. si estás utilizando una dirección de contrato. @@ -232,11 +232,11 @@ En este momento no existe la opción de transferencia masiva. Para transferir tu stake, deberás seguir los siguientes pasos: -1. Inicia la transferencia de stake en Ethereum mainnet +1. Inicia la transferencia de stake en Ethereum mainnet -2. Espera 20 minutos para la confirmación +2. Espera 20 minutos para la confirmación -3. Confirma la transferencia de stake en Arbitrum +3. Confirma la transferencia de stake en Arbitrum \*Ten en cuenta que debes confirmar la transferencia dentro de los 7 días; de lo contrario, tu participación podría perderse. En la mayoría de los casos, este paso se ejecutará automáticamente, pero puede ser necesaria una confirmación manual si hay un aumento en el precio del gas en Arbitrum. Si surgen problemas durante este proceso, habrá recursos disponibles para ayudarte: ponte en contacto con el soporte en support@thegraph.com o en [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ No. Si alguna fracción de tu participación se encuentra desbloqueandose, debes Para transferir tu contrato de vesting, deberás completar los siguientes pasos: -1. Inicia la transferencia del vesting en Ethereum mainnet +1. Inicia la transferencia del vesting en Ethereum mainnet -2. Espera 20 minutos para la confirmación +2. Espera 20 minutos para la confirmación -3. Confirma la transferencia del contrato de vesting en Arbitrum +3. Confirma la transferencia del contrato de vesting en Arbitrum ### ¿Cómo transfiero mi contrato de vesting si solo está parcialmente adquirido? -1. Deposita una cantidad de ETH en el contrato de la herramienta de transferencia (la interfaz de usuario puede ayudar a estimar una cantidad razonable) +1. Deposita una cantidad de ETH en el contrato de la herramienta de transferencia (la interfaz de usuario puede ayudar a estimar una cantidad razonable) -2. Envía un poco de GRT bloqueado a través del contrato de la herramienta de transferencia, a L2 para inicializar el bloqueo de vesting en L2. Esto también establecerá su dirección de beneficiario en L2. +2. Envía un poco de GRT bloqueado a través del contrato de la herramienta de transferencia, a L2 para inicializar el bloqueo de vesting en L2. Esto también establecerá su dirección de beneficiario en L2. -3. Envía tu stake/delegación a L2 a través de las funciones de transferencia "bloqueada" en el contrato L1Staking. +3. Envía tu stake/delegación a L2 a través de las funciones de transferencia "bloqueada" en el contrato L1Staking. -4. Retira cualquier ETH restante del contrato de la herramienta de transferencia +4. Retira cualquier ETH restante del contrato de la herramienta de transferencia ### ¿Cómo transfiero mi contrato de vesting si está completamente adquirido? @@ -314,13 +314,13 @@ Para transferir tu contrato de vesting, deberás completar los siguientes pasos: Para aquellos que están completamente adquiridos, el proceso es similar: -1. Deposita una cantidad de ETH en el contrato de la herramienta de transferencia (la interfaz de usuario puede ayudar a estimar una cantidad razonable) +1. Deposita una cantidad de ETH en el contrato de la herramienta de transferencia (la interfaz de usuario puede ayudar a estimar una cantidad razonable) -2. Establece tu dirección de L2 con una llamada al contrato de la herramienta de transferencia +2. Establece tu dirección de L2 con una llamada al contrato de la herramienta de transferencia -3. Envía tu stake/delegación a L2 a través de las funciones de transferencia "bloqueada" en el contrato de Staking de L1. +3. Envía tu stake/delegación a L2 a través de las funciones de transferencia "bloqueada" en el contrato de Staking de L1. -4. Retira cualquier ETH restante del contrato de la herramienta de transferencia +4. Retira cualquier ETH restante del contrato de la herramienta de transferencia ### ¿Puedo transferir mi contrato de vesting a Arbitrum? @@ -360,17 +360,17 @@ Estos pasos solo se aplican si tu contrato todavía tiene vesting o si has utili Para transferir tu contrato de vesting a L2, enviarás cualquier saldo de GRT a L2 utilizando las herramientas de transferencia, lo que inicializará tu contrato de vesting en L2: -1. Deposita algo de ETH en el contrato de la herramienta de transferencia (esto se usará para pagar el gas de L2) +1. Deposita algo de ETH en el contrato de la herramienta de transferencia (esto se usará para pagar el gas de L2) -2. Revoca el acceso del protocolo al contrato de vesting (necesario para el siguiente paso) +2. Revoca el acceso del protocolo al contrato de vesting (necesario para el siguiente paso) -3. Otorga acceso del protocolo al contrato de vesting (permitirá que tu contrato interactúe con la herramienta de transferencia) +3. Otorga acceso del protocolo al contrato de vesting (permitirá que tu contrato interactúe con la herramienta de transferencia) -4. Especifica una dirección de beneficiario en L2\* e inicia la transferencia de saldo en Ethereum mainnet +4. Especifica una dirección de beneficiario en L2\* e inicia la transferencia de saldo en Ethereum mainnet -5. Espera 20 minutos para la confirmación +5. Espera 20 minutos para la confirmación -6. Confirma la transferencia de saldo en L2 +6. Confirma la transferencia de saldo en L2 \*Si es necesario - i.e. si estás utilizando una dirección de contrato. From caaa15f4ddb261a87c499085fa7d02b13a80d429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:16 -0400 Subject: [PATCH 439/924] New translations l2-transfer-tools-faq.mdx (Arabic) --- .../ar/arbitrum/l2-transfer-tools-faq.mdx | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/website/pages/ar/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/ar/arbitrum/l2-transfer-tools-faq.mdx index ce87a0888ae8..22b4d7efd398 100644 --- a/website/pages/ar/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/ar/arbitrum/l2-transfer-tools-faq.mdx @@ -14,7 +14,7 @@ These tools will require you to follow a specific set of steps depending on what ### هل يمكنني استخدام نفس المحفظة التي استخدمها في Ethereum mainnet؟ -إذا كنت تستخدم محفظة [EOA] \(https://ethereum.org/en/developers/docs/accounts/#types-of-account) ، فيمكنك استخدام نفس العنوان. إذا كانت محفظة Ethereum mainnet الخاصة بك عبارة عن عقد (مثل multisig) ، فيجب عليك تحديد [Arbitrum wallet address](/arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the-graph-on-l2) حيث سيتم إرسال التحويل الخاص بك. يرجى التحقق من العنوان بعناية لأن أي تحويلات إلى عنوان غير صحيح يمكن أن تؤدي إلى خسارة غير قابلة للرجوع. إذا كنت ترغب في استخدام multisig على L2 ، فتأكد من نشر عقد multisig على Arbitrum One. +إذا كنت تستخدم محفظة [EOA] (https://ethereum.org/en/developers/docs/accounts/#types-of-account) ، فيمكنك استخدام نفس العنوان. إذا كانت محفظة Ethereum mainnet الخاصة بك عبارة عن عقد (مثل multisig) ، فيجب عليك تحديد [Arbitrum wallet address](/arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the-graph-on-l2) حيث سيتم إرسال التحويل الخاص بك. يرجى التحقق من العنوان بعناية لأن أي تحويلات إلى عنوان غير صحيح يمكن أن تؤدي إلى خسارة غير قابلة للرجوع. إذا كنت ترغب في استخدام multisig على L2 ، فتأكد من نشر عقد multisig على Arbitrum One. Wallets on EVM blockchains like Ethereum and Arbitrum are a pair of keys (public and private), that you create without any need to interact with the blockchain. So any wallet that was created for Ethereum will also work on Arbitrum without having to do anything else. @@ -42,21 +42,21 @@ If you have the L1 transaction hash (which you can find by looking at the recent لنقل الـ subgraph الخاص بك ، ستحتاج إلى إكمال الخطوات التالية: -1. ابدأ التحويل على شبكة Ethereum mainnet +1. ابدأ التحويل على شبكة Ethereum mainnet -2. انتظر 20 دقيقة للتأكيد +2. انتظر 20 دقيقة للتأكيد -3. قم بتأكيد نقل الـ subgraph على Arbitrum \\ \* +3. قم بتأكيد نقل الـ subgraph على Arbitrum \\ \* -4. قم بإنهاء نشر الـ subgraph على Arbitrum +4. قم بإنهاء نشر الـ subgraph على Arbitrum -5. جدث عنوان URL للاستعلام (مستحسن) +5. جدث عنوان URL للاستعلام (مستحسن) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). ### من أين يجب أن أبدأ التحويل ؟ -يمكنك بدء عملية النقل من [Subgraph Studio] \(https://thegraph.com/studio/) ، [Explorer ،] \(https://thegraph.com/explorer) أو من أي صفحة تفاصيل subgraph. انقر فوق الزر "Transfer Subgraph" في صفحة تفاصيل الرسم الـ subgraph لبدء النقل. +يمكنك بدء عملية النقل من [Subgraph Studio] (https://thegraph.com/studio/) ، [Explorer ،] (https://thegraph.com/explorer) أو من أي صفحة تفاصيل subgraph. انقر فوق الزر "Transfer Subgraph" في صفحة تفاصيل الرسم الـ subgraph لبدء النقل. ### كم من الوقت سأنتظر حتى يتم نقل الـ subgraph الخاص بي @@ -108,9 +108,9 @@ Yes. Select Arbitrum One as your published network when publishing in Subgraph S لنقل تفويضك ، ستحتاج إلى إكمال الخطوات التالية: -1. ابدأ نقل التفويض على شبكة Ethereum mainnet -2. انتظر 20 دقيقة للتأكيد -3. قم بتأكيد نقل التفويض على Arbitrum +1. ابدأ نقل التفويض على شبكة Ethereum mainnet +2. انتظر 20 دقيقة للتأكيد +3. قم بتأكيد نقل التفويض على Arbitrum \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans لنقل التنسيق الخاص بك ، ستحتاج إلى إكمال الخطوات التالية: -1. ابدأ نقل الإشارة على شبكة Ethereum mainnet +1. ابدأ نقل الإشارة على شبكة Ethereum mainnet -2. حدد عنوان L2 للمنسق \\ \* +2. حدد عنوان L2 للمنسق \\ \* -3. انتظر 20 دقيقة للتأكيد +3. انتظر 20 دقيقة للتأكيد \\ \* إذا لزم الأمر -أنت تستخدم عنوان عقد. @@ -232,11 +232,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans لتحويل حصتك ، ستحتاج إلى إكمال الخطوات التالية: -1. ابدأ تحويل الحصص على شبكة Ethereum mainnet +1. ابدأ تحويل الحصص على شبكة Ethereum mainnet -2. انتظر 20 دقيقة للتأكيد +2. انتظر 20 دقيقة للتأكيد -3. Confirm stake transfer on Arbitrum +3. Confirm stake transfer on Arbitrum \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Yes! The process is a bit different, because vesting contracts can't forward the لتحويل استحقاقك ، ستحتاج إلى إكمال الخطوات التالية: -1. ابدأ تحويل الاستحقاق على شبكة Ethereum mainnet +1. ابدأ تحويل الاستحقاق على شبكة Ethereum mainnet -2. انتظر 20 دقيقة للتأكيد +2. انتظر 20 دقيقة للتأكيد -3. قم بالتأكيد على نقل الاستحقاق على Arbitrum +3. قم بالتأكيد على نقل الاستحقاق على Arbitrum ### كيف يمكنني تحويل عقد الاستحقاق الخاص بي إذا كنت مخولًا جزئيًا فقط؟ -1. قم بإيداع بعض ETH في عقد أداة النقل (يمكن أن تساعد واجهة المستخدم في تقدير مبلغ معقول) +1. قم بإيداع بعض ETH في عقد أداة النقل (يمكن أن تساعد واجهة المستخدم في تقدير مبلغ معقول) -2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. +2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. -3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. +3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. -4. سحب أي ETH متبقي من عقد أداة النقل(transfer tool contract) +4. سحب أي ETH متبقي من عقد أداة النقل(transfer tool contract) ### كيف يمكنني تحويل عقد الاستحقاق الخاص بي إذا كنت مخولًا بالكامل؟ @@ -314,13 +314,13 @@ Yes! The process is a bit different, because vesting contracts can't forward the بالنسبة لمن يتمتعون بكامل الصلاحيات ، فإن العملية مماثلة: -1. قم بإيداع بعض ETH في عقد أداة النقل (يمكن أن تساعد واجهة المستخدم في تقدير مبلغ معقول) +1. قم بإيداع بعض ETH في عقد أداة النقل (يمكن أن تساعد واجهة المستخدم في تقدير مبلغ معقول) -2. قم بتعيين عنوان L2 الخاص بك من خلال استدعاء عقد أداة النقل +2. قم بتعيين عنوان L2 الخاص بك من خلال استدعاء عقد أداة النقل -3. أرسل حصتك / تفويضك إلى L2 من خلال وظائف أداة التحويل "locked" في L1 Staking contract. +3. أرسل حصتك / تفويضك إلى L2 من خلال وظائف أداة التحويل "locked" في L1 Staking contract. -4. سحب أي ETH متبقي من عقد أداة النقل(transfer tool contract) +4. سحب أي ETH متبقي من عقد أداة النقل(transfer tool contract) ### هل يمكنني نقل عقد الاستحقاق الخاص بي إلى Arbitrum؟ @@ -360,17 +360,17 @@ Yes! The process is a bit different, because vesting contracts can't forward the لتحويل عقد الاستحقاق الخاص بك إلى L2 ، سوف ترسل أي رصيد GRT إلى L2 باستخدام أدوات التحويل ، والتي ستعمل على تهيئة عقد استحقاق L2 الخاص بك: -1. قم بإيداع بعض ETH في عقد أداة النقل (سيتم استخدام هذا لدفع ثمن غاز L2) +1. قم بإيداع بعض ETH في عقد أداة النقل (سيتم استخدام هذا لدفع ثمن غاز L2) -2. إبطال وصول البروتوكول إلى عقد الاستحقاق (مطلوب للخطوة التالية) +2. إبطال وصول البروتوكول إلى عقد الاستحقاق (مطلوب للخطوة التالية) -3. امنح البروتوكول حق الوصول إلى عقد الاستحقاق (سيسمح لعقدك بالتفاعل مع أداة التحويل) +3. امنح البروتوكول حق الوصول إلى عقد الاستحقاق (سيسمح لعقدك بالتفاعل مع أداة التحويل) -4. حدد عنوان المستفيد على L2 \\ \* وابدأ في تحويل الرصيد على Ethereum mainnet +4. حدد عنوان المستفيد على L2 \\ \* وابدأ في تحويل الرصيد على Ethereum mainnet -5. انتظر 20 دقيقة للتأكيد +5. انتظر 20 دقيقة للتأكيد -6. قم بتأكيد تحويل الرصيد على L2 +6. قم بتأكيد تحويل الرصيد على L2 \\ \* إذا لزم الأمر -أنت تستخدم عنوان عقد. From 0e178675efe598f33955025d7817836cdaff24a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:17 -0400 Subject: [PATCH 440/924] New translations l2-transfer-tools-faq.mdx (Czech) --- .../cs/arbitrum/l2-transfer-tools-faq.mdx | 396 +++++++++--------- 1 file changed, 198 insertions(+), 198 deletions(-) diff --git a/website/pages/cs/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/cs/arbitrum/l2-transfer-tools-faq.mdx index 43f96152931a..72e6d476e485 100644 --- a/website/pages/cs/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/cs/arbitrum/l2-transfer-tools-faq.mdx @@ -2,410 +2,410 @@ title: L2 Transfer Tools FAQ --- -## General +## Obecný -### What are L2 Transfer Tools? +### Co jsou nástroje pro přenos L2? -The Graph has made it 26x cheaper for contributors to participate in the network by deploying the protocol to Arbitrum One. The L2 Transfer Tools were created by core devs to make it easy to move to L2. +Graph zlevnila náklady na účast přispěvatelů v síti 26krát tím, že nasadila protokol Arbitrum One. Nástroje pro přechod na L2 byly vytvořeny hlavními vývojáři, aby usnadnily a zjednodušily přechod na L2. -For each network participant, a set of L2 Transfer Tools are available to make the experience seamless when moving to L2, avoiding thawing periods or having to manually withdraw and bridge GRT. +Každý účastník sítě má k dispozici sadu nástrojů pro přenos L2, což umožňuje bezproblémový přechod na L2, Vyhněte se období rozmrazování nebo potřeby ručně odebrat a přemosťovat GRT. -These tools will require you to follow a specific set of steps depending on what your role is within The Graph and what you are transferring to L2. +Tyto nástroje vyžadují, abyste provedli určitý soubor kroků v závislosti na tom, jaká je vaše role v systému The Graph a co přenášíte do L2. -### Can I use the same wallet I use on Ethereum mainnet? +### Mohu používat stejnou peněženku, kterou používám na mainnet Ethereum? -If you are using an [EOA](https://ethereum.org/en/developers/docs/accounts/#types-of-account) wallet you can use the same address. If your Ethereum mainnet wallet is a contract (e.g. a multisig) then you must specify an [Arbitrum wallet address](/arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the-graph-on-l2) where your transfer will be sent. Please check the address carefully as any transfers to an incorrect address can result in permanent loss. If you'd like to use a multisig on L2, make sure you deploy a multisig contract on Arbitrum One. +Pokud používáte peněženku [EOA](https://ethereum.org/en/developers/docs/accounts/#types-of-account), můžete použít stejnou adresu. Pokud je vaše peněženka Ethereum mainnet kontraktem (např. multisig), musíte zadat adresu [Arbitrum wallet address](/arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the-graph-on-l2), kam bude váš převod odeslán. Pečlivě zkontrolujte adresu, protože převody na nesprávnou adresu mohou mít za následek trvalou ztrátu. Pokud chcete používat multisig na L2, ujistěte se, že jste nasadili multisig smlouvu na Arbitrum One. -Wallets on EVM blockchains like Ethereum and Arbitrum are a pair of keys (public and private), that you create without any need to interact with the blockchain. So any wallet that was created for Ethereum will also work on Arbitrum without having to do anything else. +Peněženky na blockchainech EVM, jako jsou Ethereum a Arbitrum, představují dvojici klíčů (veřejný a soukromý), které vytvoříte bez nutnosti interakce s blockchainem. Takže jakákoli peněženka vytvořená pro Ethereum bude fungovat i pro Arbitrum, aniž byste museli dělat cokoli jiného. -The exception is with smart contract wallets like multisigs: these are smart contracts that are deployed separately on each chain, and get their address when they are deployed. If a multisig was deployed to Ethereum, it won't exist with the same address on Arbitrum. A new multisig must be created first on Arbitrum, and may get a different address. +Výjimkou jsou peněženky s chytrými smlouvami, jako je multisigs: jedná se o chytré smlouvy, které jsou nasazeny v každém řetězci zvlášť a při nasazení získávají svou adresu. Pokud byl multisig nasazen na Ethereum, nebude existovat se stejnou adresou na Arbitrum. Nový multisig musí být nejprve vytvořen v Arbitrum a může dostat jinou adresu. -### What happens if I don’t finish my transfer in 7 days? +### Co se stane, když převod nedokončím do 7 dnů? -The L2 Transfer Tools use Arbitrum’s native mechanism to send messages from L1 to L2. This mechanism is called a “retryable ticket” and is used by all native token bridges, including the Arbitrum GRT bridge. You can read more about retryable tickets in the [Arbitrum docs](https://docs.arbitrum.io/arbos/l1-to-l2-messaging). +Nástroje pro přenos L2 používají k odesílání zpráv z L1 do L2 nativní mechanismus Arbitrum. Tento mechanismus se nazývá 'retryable ticket,' a všechny nativní tokenové můstky, včetně můstku Arbitrum GRT, ho používají. Další informace o opakovatelných ticketch naleznete v části [Arbitrum docs](https://docs.arbitrum.io/arbos/l1-to-l2-messaging). -When you transfer your assets (subgraph, stake, delegation or curation) to L2, a message is sent through the Arbitrum GRT bridge which creates a retryable ticket in L2. The transfer tool includes some ETH value in the transaction, that is used to 1) pay to create the ticket and 2) pay for the gas to execute the ticket in L2. However, because gas prices might vary in the time until the ticket is ready to execute in L2, it is possible that this auto-execution attempt fails. When that happens, the Arbitrum bridge will keep the retryable ticket alive for up to 7 days, and anyone can retry “redeeming” the ticket (which requires a wallet with some ETH bridged to Arbitrum). +Při přenosu aktiv (podgraf, podíl, delegace nebo kurátorství) do L2 se odešle zpráva přes můstek Arbitrum GRT, která vytvoří opakovatelný tiket v L2. Nástroj pro převod zahrnuje v transakci určitou hodnotu ETH, která se použije na 1) zaplacení vytvoření tiketu a 2) zaplacení plynu pro provedení tiketu v L2. Se však ceny plynu mohou v době, než je ticket připraven k provedení v režimu L2, měnit. Je možné, že se tento pokus o automatické provedení nezdaří. Když se tak stane, most Arbitrum udrží opakovatelný tiket naživu až 7 dní a kdokoli se může pokusit o jeho "vykoupení" (což vyžaduje peněženku s určitým množstvím ETH propojenou s mostem Arbitrum). -This is what we call the “Confirm” step in all the transfer tools - it will run automatically in most cases, as the auto-execution is most often successful, but it is important that you check back to make sure it went through. If it doesn’t succeed and there are no successful retries in 7 days, the Arbitrum bridge will discard the ticket, and your assets (subgraph, stake, delegation or curation) will be lost and can’t be recovered. The Graph core devs have a monitoring system in place to detect these situations and try to redeem the tickets before it’s too late, but it is ultimately your responsibility to ensure your transfer is completed in time. If you’re having trouble confirming your transaction, please reach out using [this form](https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms) and core devs will be there help you. +Tomuto kroku říkáme 'Potvrzení' ve všech nástrojích pro přenos - ve většině případů se spustí automaticky, protože automatické provedení je většinou úspěšné, ale je důležité, abyste se ujistili, že proběhlo. Pokud se to nepodaří a během 7 dnů nedojde k žádnému úspěšnému opakování, můstek Arbitrum tiket zahodí a vaše aktiva (podgraf, podíl, delegace nebo kurátorství) budou ztracena a nebude možné je obnovit. Vývojáři The Graph jádra mají k dispozici monitorovací systém, který tyto situace odhaluje a snaží se lístky uplatnit dříve, než bude pozdě, ale v konečném důsledku je vaší odpovědností zajistit, aby byl váš přenos dokončen včas. Pokud máte potíže s potvrzením transakce, obraťte se na nás pomocí [tohoto formuláře](https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms) a hlavní vývojáři vám pomohou. -### I started my delegation/stake/curation transfer and I'm not sure if it made it through to L2, how can I confirm that it was transferred correctly? +### Zahájil jsem přenos delegace/podílů/kurátorství a nejsem si jistý, zda se to dostalo do L2. Jak mohu potvrdit, že to bylo přeneseno správně? -If you don't see a banner on your profile asking you to finish the transfer, then it's likely the transaction made it safely to L2 and no more action is needed. If in doubt, you can check if Explorer shows your delegation, stake or curation on Arbitrum One. +Pokud se na vašem profilu nezobrazí banner s výzvou k dokončení převodu, je pravděpodobné, že transakce proběhla bezpečně na server L2 a není třeba provádět další kroky. Pokud máte pochybnosti, můžete zkontrolovat, zda Průzkumník zobrazuje vaši delegaci, podíl nebo kurátorství na Arbitrum One. -If you have the L1 transaction hash (which you can find by looking at the recent transactions in your wallet), you can also confirm if the "retryable ticket" that carried the message to L2 was redeemed here: https://retryable-dashboard.arbitrum.io/ - if the auto-redeem failed, you can also connect your wallet there and redeem it. Rest assured that core devs are also monitoring for messages that get stuck, and will attempt to redeem them before they expire. +Pokud máte k dispozici hash transakce L1 (který zjistíte, když se podíváte na poslední transakce ve své peněžence), můžete si také ověřit, zda byl "retryable ticket", který přenesl zprávu na L2, vykoupen zde: https://retryable-dashboard.arbitrum.io/ - pokud automatické vykoupení selhalo, můžete svou peněženku připojit i tam a vykoupit ji. Můžete si být jisti, že vývojáři jádra také sledují zprávy, které se zaseknou, a pokusí se je vyplatit před vypršením jejich platnosti. -## Subgraph Transfer +## Podgraf přenos -### How do I transfer my subgraph? +### Jak mohu přenést svůj podgraf? -To transfer your subgraph, you will need to complete the following steps: +Chcete-li přenést svůj podgraf, musíte provést následující kroky: -1. Initiate the transfer on Ethereum mainnet +1. Zahájení převodu v mainnet Ethereum -2. Wait 20 minutes for confirmation +2. Počkejte 20 minut na potvrzení -3. Confirm subgraph transfer on Arbitrum\* +3. Potvrzení přenosu podgrafů na Arbitrum\* -4. Finish publishing subgraph on Arbitrum +4. Úplné zveřejnění podgrafu na arbitrum -5. Update Query URL (recommended) +5. Aktualizovat adresu URL dotazu (doporučeno) -\*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). +\*Upozorňujeme, že převod musíte potvrdit do 7 dnů, jinak může dojít ke ztrátě vašeho podgrafu. Ve většině případů se tento krok provede automaticky, ale v případě prudkého nárůstu cen plynu na Arbitru může být nutné ruční potvrzení. Pokud se během tohoto procesu vyskytnou nějaké problémy, budou k dispozici zdroje, které vám pomohou: kontaktujte podporu na adrese support@thegraph.com nebo na [Discord](https://discord.gg/graphprotocol). -### Where should I initiate my transfer from? +### Odkud mám iniciovat převod? -You can initiate your transfer from the [Subgraph Studio](https://thegraph.com/studio/), [Explorer,](https://thegraph.com/explorer) or any subgraph details page. Click the "Transfer Subgraph" button in the subgraph details page to start the transfer. +Přenos můžete zahájit v [Subgraph Studio](https://thegraph.com/studio/), [Explorer,](https://thegraph.com/explorer) nebo na libovolné stránce s detaily subgrafu. "Kliknutím na tlačítko 'Transfer Subgraph' na stránce s podrobnostmi o podgrafu zahájíte přenos. -### How long do I need to wait until my subgraph is transferred +### Jak dlouho musím čekat, než bude můj podgraf přenesen -The transfer time takes approximately 20 minutes. The Arbitrum bridge is working in the background to complete the bridge transfer automatically. In some cases, gas costs may spike and you will need to confirm the transaction again. +Přenos trvá přibližně 20 minut. Most Arbitrum pracuje na pozadí a automaticky dokončí přenos mostu. V některých případech může dojít ke zvýšení nákladů na plyn a transakci bude nutné potvrdit znovu. -### Will my subgraph still be discoverable after I transfer it to L2? +### Bude můj podgraf zjistitelný i poté, co jej přenesu do L2? -Your subgraph will only be discoverable on the network it is published to. For example, if your subgraph is on Arbitrum One, then you can only find it in Explorer on Arbitrum One and will not be able to find it on Ethereum. Please ensure that you have Arbitrum One selected in the network switcher at the top of the page to ensure you are on the correct network.  After the transfer, the L1 subgraph will appear as deprecated. +Váš podgraf bude zjistitelný pouze v síti, ve které je publikován. Pokud se například váš subgraf nachází na Arbitrum One, pak jej najdete pouze v Průzkumníku na Arbitrum One a na Ethereum jej nenajdete. Ujistěte se, že máte v přepínači sítí v horní části stránky vybranou možnost Arbitrum One, abyste se ujistili, že jste ve správné síti. Po přenosu se podgraf L1 zobrazí jako zastaralý. -### Does my subgraph need to be published to transfer it? +### Musí být můj podgraf zveřejněn, abych ho mohl přenést? -To take advantage of the subgraph transfer tool, your subgraph must be already published to Ethereum mainnet and must have some curation signal owned by the wallet that owns the subgraph. If your subgraph is not published, it is recommended you simply publish directly on Arbitrum One - the associated gas fees will be considerably lower. If you want to transfer a published subgraph but the owner account hasn't curated any signal on it, you can signal a small amount (e.g. 1 GRT) from that account; make sure to choose "auto-migrating" signal. +Abyste mohli využít nástroj pro přenos subgrafů, musí být váš subgraf již zveřejněn v mainnet Ethereum a musí mít nějaký kurátorský signál vlastněný peněženkou, která subgraf vlastní. Pokud váš subgraf není zveřejněn, doporučujeme vám jednoduše publikovat přímo na Arbitrum One - související poplatky za plyn budou podstatně nižší. Pokud chcete přenést publikovaný podgraf, ale účet vlastníka na něm nemá kurátorský signál, můžete z tohoto účtu signalizovat malou částku (např. 1 GRT); nezapomeňte zvolit "auto-migrating" signál. -### What happens to the Ethereum mainnet version of my subgraph after I transfer to Arbitrum? +### Co se stane s verzí mého subgrafu na ethereum mainnet po převodu na Arbitrum? -After transferring your subgraph to Arbitrum, the Ethereum mainnet version will be deprecated. We recommend you update your query URL within 48 hours. However, there is a grace period in place that keeps your mainnet URL functioning so that any third-party dapp support can be updated. +Po převedení vašeho subgrafu na Arbitrum bude verze mainnet Ethereum zastaralá. Doporučujeme vám aktualizovat adresu URL dotazu do 48 hodin. Je však zavedena ochranná lhůta, která udržuje adresu URL mainnet funkční, aby bylo možné aktualizovat podporu dapp třetích stran. -### After I transfer, do I also need to re-publish on Arbitrum? +### Musím po převodu také znovu publikovat na Arbitrum? -After the 20 minute transfer window, you will need to confirm the transfer with a transaction in the UI to finish the transfer, but the transfer tool will guide you through this. Your L1 endpoint will continue to be supported during the transfer window and a grace period after. It is encouraged that you update your endpoint when convenient for you. +Po uplynutí 20minutového okna pro převod budete muset převod potvrdit transakcí v UI, abyste převod dokončili, ale nástroj pro převod vás tímto úkonem provede. Koncový bod L1 bude i nadále podporován během okna pro převody a po něm po dobu odkladu. doporučujeme, abyste svůj koncový bod aktualizovali, jakmile se vám to bude hodit. -### Will my endpoint experience downtime while re-publishing? +### Dojde při opětovném publikování k výpadku mého koncového bodu? -It is unlikely, but possible to experience a brief downtime depending on which Indexers are supporting the subgraph on L1 and whether they keep indexing it until the subgraph is fully supported on L2. +Je nepravděpodobné, ale je možné, že dojde ke krátkému výpadku v závislosti na tom, které indexátory podporují podgraf na L1 a zda jej indexují, dokud není podgraf plně podporován na L2. -### Is publishing and versioning the same on L2 as Ethereum Ethereum mainnet? +### Je publikování a verzování na L2 stejné jako na mainnet Ethereum Ethereum? -Yes. Select Arbitrum One as your published network when publishing in Subgraph Studio. In the Studio, the latest endpoint will be available which points to the latest updated version of the subgraph. +Ano. Při publikování v aplikaci Subgraph Studio vyberte jako publikovanou síť Arbitrum One. Ve Studiu bude k dispozici nejnovější koncový bod, který odkazuje na nejnovější aktualizovanou verzi podgrafu. -### Will my subgraph's curation move with my subgraph? +### Bude se kurátorství mého podgrafu pohybovat spolu s mým podgrafem? -If you've chosen auto-migrating signal, 100% of your own curation will move with your subgraph to Arbitrum One. All of the subgraph's curation signal will be converted to GRT at the time of the transfer, and the GRT corresponding to your curation signal will be used to mint signal on the L2 subgraph. +Pokud jste zvolili automatickou migraci signálu, 100 % vaší vlastní kurátorství se přesune spolu s vaším subgrafem do Arbitrum One. Veškerý signál kurátorství podgrafu bude v okamžiku převodu převeden na GRT a GRT odpovídající vašemu signálu kurátorství bude použit k ražbě signálu na podgrafu L2. -Other Curators can choose whether to withdraw their fraction of GRT, or also transfer it to L2 to mint signal on the same subgraph. +Ostatní kurátoři se mohou rozhodnout, zda stáhnou svou část GRT, nebo ji také převedou na L2, aby vyrazili signál na stejném podgraf. -### Can I move my subgraph back to Ethereum mainnet after I transfer? +### Mohu svůj subgraf po převodu přesunout zpět do mainnet Ethereum? -Once transferred, your Ethereum mainnet version of this subgraph will be deprecated. If you would like to move back to mainnet, you will need to redeploy and publish back to mainnet. However, transferring back to Ethereum mainnet is strongly discouraged as indexing rewards will eventually be distributed entirely on Arbitrum One. +Po přenosu bude vaše verze tohoto podgrafu v síti Ethereum mainnet zneplatněna. Pokud se chcete přesunout zpět do mainnetu, musíte provést nové nasazení a publikovat zpět do mainnet. Převod zpět do mainnetu Etherea se však důrazně nedoporučuje, protože odměny za indexování budou nakonec distribuovány výhradně na Arbitrum One. -### Why do I need bridged ETH to complete my transfer? +### Proč potřebuji k dokončení převodu překlenovací ETH? -Gas fees on Arbitrum One are paid using bridged ETH (i.e. ETH that has been bridged to Arbitrum One). However, the gas fees are significantly lower when compared to Ethereum mainnet. +Poplatky za plyn na Arbitrum One se platí pomocí přemostěného ETH (tj. ETH, který byl přemostěn na Arbitrum One). Poplatky za plyn jsou však ve srovnání s mainnet Ethereum výrazně nižší. -## Delegation +## Delegace -### How do I transfer my delegation? +### Jak mohu přenést svou delegaci? -To transfer your delegation, you will need to complete the following steps: +Chcete-li přenést své delegování, musíte provést následující kroky: -1. Initiate delegation transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation -3. Confirm delegation transfer on Arbitrum +1. Zahájení přenosu delegace v mainnet Ethereum +2. Počkejte 20 minut na potvrzení +3. Potvrzení přenosu delegace na Arbitrum -\*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). +\*\*\*\*\*Pro dokončení převodu delegování na Arbitrum musíte transakci potvrdit. Tento krok musí být dokončen do 7 dnů, jinak by mohlo dojít ke ztrátě delegace. Ve většině případů se tento krok provede automaticky, ale v případě prudkého nárůstu cen plynu na platformě Arbitrum může být nutné provést ruční potvrzení. Pokud se během tohoto procesu vyskytnou nějaké problémy, budou k dispozici zdroje, které vám pomohou: kontaktujte podporu na support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). -### What happens to my rewards if I initiate a transfer with an open allocation on Ethereum mainnet? +### Co se stane s mými odměnami, pokud iniciuji převod s otevřenou alokací v mainnet Ethereum? -If the Indexer to whom you're delegating is still operating on L1, when you transfer to Arbitrum you will forfeit any delegation rewards from open allocations on Ethereum mainnet. This means that you will lose the rewards from, at most, the last 28-day period. If you time the transfer right after the Indexer has closed allocations you can make sure this is the least amount possible. If you have a communication channel with your Indexer(s), consider discussing with them to find the best time to do your transfer. +Pokud Indexer, na kterého delegujete, stále funguje na L1, při přechodu na Arbitrum ztratíte veškeré odměny za delegování z otevřených alokací v mainnet Ethereum. To znamená, že přijdete o odměny maximálně za posledních 28 dní. Pokud převod načasujete ihned po uzavření alokací indexeru, můžete zajistit, aby to bylo co nejméně. Pokud se svým indexátorem (indexátory) komunikujete, zvažte, zda s ním (nimi) neprojednáte nejvhodnější dobu pro převod. -### What happens if the Indexer I currently delegate to isn't on Arbitrum One? +### Co se stane, když indexátor, na kterého právě deleguju, není v Arbitrum One? -The L2 transfer tool will only be enabled if the Indexer you have delegated to has transferred their own stake to Arbitrum. +Nástroj pro převod L2 se aktivuje pouze v případě, že indexátor, kterého jste delegovali, převedl svůj vlastní podíl na Arbitrum. -### Do Delegators have the option to delegate to another Indexer? +### Mají delegáti možnost delegovat na jiného indexátora? -If you wish to delegate to another Indexer, you can transfer to the same Indexer on Arbitrum, then undelegate and wait for the thawing period. After this, you can select another active Indexer to delegate to. +Pokud chcete delegovat na jiného indexátora, můžete převést na stejného indexátora na Arbitrum, poté odeberte a počkejte na dobu odmrazování. Poté můžete vybrat jiného aktivního indexátora, na kterého můžete delegovat. -### What if I can't find the Indexer I'm delegating to on L2? +### Co když nemohu na L2 najít indexátora, kterého deleguji? -The L2 transfer tool will automatically detect the Indexer you previously delegated to. +Nástroj pro přenos L2 automaticky zjistí indexátor, který jste předtím delegovali. -### Will I be able to mix and match or 'spread' my delegation across new or several Indexers instead of the prior Indexer? +### Budu moci své delegace kombinovat nebo "rozložit" mezi nové nebo více indexátorů namísto předchozího indexátoru? -The L2 transfer tool will always move your delegation to the same Indexer you delegated to previously. Once you have moved to L2, you can undelegate, wait for the thawing period, and decide if you'd like to split up your delegation. +Nástroj pro přenos L2 vždy přesune vaše delegování do stejného indexátora, do kterého jste delegovali dříve. Po přesunu na L2 můžete delegaci zrušit, počkat na dobu rozmrazení a rozhodnout se, zda chcete delegaci rozdělit. -### Am I subject to the cooldown period or can I withdraw immediately after using the L2 delegation transfer tool? +### Vztahuje se na mě období chladnutí, nebo mohu vyjmout ihned po použití nástroje pro přenos delegací L2? -The transfer tool allows you to immediately move to L2. If you would like to undelegate you will have to wait for the thawing period. However, if an Indexer has transferred all of their stake to L2, you can withdraw on Ethereum mainnet immediately. +Nástroj pro přenos umožňuje okamžitý přesun na úroveň L2. Pokud chcete přenesení zrušit, musíte počkat na dobu rozmrazení. Pokud však indexer převedl celý svůj podíl na L2, můžete okamžitě vybírat v mainnet Ethereum. -### Can my rewards be negatively impacted if I do not transfer my delegation? +### Mohou být mé odměny negativně ovlivněny, pokud nepřevedu svou delegaci? -It is anticipated that all network participation will move to Arbitrum One in the future. +Předpokládá se, že veškerá účast v síti se v budoucnu přesune do Arbitrum One. -### How long does it take to complete the transfer of my delegation to L2? +### Jak dlouho trvá dokončení převodu mé delegace do L2? -A 20-minute confirmation is required for delegation transfer. Please note that after the 20-minute period, you must come back and complete step 3 of the transfer process within 7 days. If you fail to do this, then your delegation may be lost. Note that in most cases the transfer tool will complete this step for you automatically. In case of a failed auto-attempt, you will need to complete it manually. If any issues arise during this process, don't worry, we'll be here to help: contact us at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). +Pro delegování je nutné 20minutové potvrzení. Upozorňujeme, že po uplynutí 20minutové lhůty se musíte vrátit a do 7 dnů dokončit 3. krok procesu převodu. Pokud tak neučiníte, může být vaše delegace ztracena. Všimněte si, že ve většině případů nástroj pro přenos provede tento krok automaticky za vás.V případě neúspěšného automatického pokusu je třeba jej dokončit ručně. Pokud se během tohoto procesu vyskytnou nějaké problémy, nemějte obavy, budeme vám k dispozici: support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). -### Can I transfer my delegation if I'm using a GRT vesting contract/token lock wallet? +### Mohu přenést svou delegaci, pokud používám peněženku se smlouvou o převodu práv/zámkem na tokeny GRT? -Yes! The process is a bit different because vesting contracts can't forward the ETH needed to pay for the L2 gas, so you need to deposit it beforehand. If your vesting contract is not fully vested, you will also have to first initialize a counterpart vesting contract on L2 and will only be able to transfer the delegation to this L2 vesting contract. The UI on Explorer can guide you through this process when you've connected to Explorer using the vesting lock wallet. +Ano! Proces je trochu odlišný, protože vestingové smlouvy nemohou přeposílat ETH potřebné k zaplacení plynu L2, takže je třeba je uložit předem. Pokud vaše vestingová smlouva není plně vestingová, budete muset také nejprve inicializovat protějškovou vestingovou smlouvu na L2 a delegaci budete moci převést pouze na tuto vestingovou smlouvu na L2. Uživatelské rozhraní Průzkumníka vás tímto procesem provede, pokud jste se k Průzkumníkovi připojili pomocí peněženky s vestingovým zámkem. -### Does my Arbitrum vesting contract allow releasing GRT just like on mainnet? +### Umožňuje moje smlouva o převodu práv na Arbitrum uvolnění GRT stejně jako na mainnet? -No, the vesting contract that is created on Arbitrum will not allow releasing any GRT until the end of the vesting timeline, i.e. until your contract is fully vested. This is to prevent double spending, as otherwise it would be possible to release the same amounts on both layers. +Ne, vestingová smlouva vytvořená na platformě Arbitrum neumožňuje uvolnění GRT až do konce časové osy vestingu, tj. dokud není vaše smlouva plně vestingová. Je to proto, aby se zabránilo dvojímu utrácení, protože jinak by bylo možné uvolnit stejné částky na obou vrstvách. If you'd like to release GRT from the vesting contract, you can transfer them back to the L1 vesting contract using Explorer: in your Arbitrum One profile, you will see a banner saying you can transfer GRT back to the mainnet vesting contract. This requires a transaction on Arbitrum One, waiting 7 days, and a final transaction on mainnet, as it uses the same native bridging mechanism from the GRT bridge. -### Is there any delegation tax? +### Existuje nějaká delegační daň? -No. Received tokens on L2 are delegated to the specified Indexer on behalf of the specified Delegator without charging a delegation tax. +Ne. Přijaté tokeny na L2 jsou delegovány zadanému indexátorovi jménem zadaného delegáta bez účtování daně z delegování. -### Will my unrealized rewards be transferred when I transfer my delegation? +### Budou mé nerealizované odměny převedeny při převodu delegace? -​Yes! The only rewards that can't be transferred are the ones for open allocations, as those won't exist until the Indexer closes the allocations (usually every 28 days). If you've been delegating for a while, this is likely only a small fraction of rewards. +Ano! Jediné odměny, které nelze převést, jsou odměny za otevřené alokace, protože ty nebudou existovat, dokud indexátor alokace neuzavře (obvykle každých 28 dní). Pokud delegujete již delší dobu, jedná se pravděpodobně jen o malý zlomek odměn. -At the smart contract level, unrealized rewards are already part of your delegation balance, so they will be transferred when you transfer your delegation to L2. ​ +Na úrovni chytrého kontraktu jsou nerealizované odměny již součástí vašeho zůstatku delegace, takže budou převedeny při převodu delegace na L2, -### Is moving delegations to L2 mandatory? Is there a deadline? +### Je přesun delegací na úroveň L2 povinný? Existuje nějaká lhůta? -​Moving delegation to L2 is not mandatory, but indexing rewards are increasing on L2 following the timeline described in [GIP-0052](https://forum.thegraph.com/t/gip-0052-timeline-and-requirements-to-increase-rewards-in-l2/4193). Eventually, if the Council keeps approving the increases, all rewards will be distributed in L2 and there will be no indexing rewards for Indexers and Delegators on L1. ​ +Přesun delegování na L2 není povinný, ale odměny za indexování se na L2 zvyšují podle časového plánu popsaného v [GIP-0052](https://forum.thegraph.com/t/gip-0052-timeline-and-requirements-to-increase-rewards-in-l2/4193). Pokud bude Rada zvyšování odměn i nadále schvalovat, budou nakonec všechny odměny rozdělovány v L2 a indexátoři a delegáti nebudou mít na L1 žádné odměny za indexování -### If I am delegating to an Indexer that has already transferred stake to L2, do I stop receiving rewards on L1? +### Pokud deleguji na indexátora, který již převedl podíl na L2, přestanu dostávat odměny na L1? -​Many Indexers are transferring stake gradually so Indexers on L1 will still be earning rewards and fees on L1, which are then shared with Delegators. Once an Indexer has transferred all of their stake, then they will stop operating on L1, so Delegators will not receive any more rewards unless they transfer to L2. +Mnoho indexátorů převádí podíly postupně, takže indexátoři na L1 budou stále získávat odměny a poplatky na L1, které jsou pak sdíleny s delegáty. Jakmile indexátor převede celý svůj podíl, přestane působit na L1, takže delegáti již nedostanou žádnou odměnu, pokud nepřevedou na L2. -Eventually, if the Council keeps approving the indexing rewards increases in L2, all rewards will be distributed on L2 and there will be no indexing rewards for Indexers and Delegators on L1. ​ +Pokud Rada bude i nadále schvalovat zvyšování odměn za indexaci na L2, budou nakonec všechny odměny rozděleny na L2 a na L1 nebudou žádné odměny za indexaci pro indexátory a delegáty. -### I don't see a button to transfer my delegation. Why is that? +### Nevidím tlačítko pro přenos delegace. Proč tomu tak je? -​Your Indexer has probably not used the L2 transfer tools to transfer stake yet. +Váš indexovač pravděpodobně ještě nepoužil nástroje pro přenos L2 k přenosu kůl. -If you can contact the Indexer, you can encourage them to use the L2 Transfer Tools so that Delegators can transfer delegations to their L2 Indexer address. ​ +Pokud se vám podaří kontaktovat indexátora, můžete ho vyzvat, aby použil nástroje pro přenos L2, aby delegáti mohli přenášet delegace na adresu indexátora L2. -### My Indexer is also on Arbitrum, but I don't see a button to transfer the delegation in my profile. Why is that? +### Můj Indexer je také na Arbitrum, ale v profilu nevidím tlačítko pro přenos delegování. Proč tomu tak je? -​It is possible that the Indexer has set up operations on L2, but hasn't used the L2 transfer tools to transfer stake. The L1 smart contracts will therefore not know about the Indexer's L2 address. If you can contact the Indexer, you can encourage them to use the transfer tool so that Delegators can transfer delegations to their L2 Indexer address. ​ +Je možné, že indexátor nastavil operace na L2, ale nepoužil nástroje pro přenos L2 k přenosu sázek. Chytré kontrakty L1 proto nebudou znát adresu L2 indexátoru. Pokud se vám podaří Indexera kontaktovat, můžete ho vyzvat, aby použil nástroj pro přenos, aby mohli Delegáti přenést delegace na adresu Indexera L2. -### Can I transfer my delegation to L2 if I have started the undelegating process and haven't withdrawn it yet? +### Mohu své pověření převést na L2, pokud jsem zahájil proces odebrání pověření a ještě jsem ho neodebral? -​No. If your delegation is thawing, you have to wait the 28 days and withdraw it. +Ne. Pokud vaše delegace rozmrazuje, musíte počkat 28 dní a stáhnout ji. -The tokens that are being undelegated are "locked" and therefore cannot be transferred to L2. +Tokeny, které nejsou delegovány, jsou "uzamčeny", a proto je nelze přenést na L2. -## Curation Signal +## Kurátorský signál -### How do I transfer my curation? +### Jak mohu přenést své kurátorství? -To transfer your curation, you will need to complete the following steps: +Chcete-li přenést své kurátorství, musíte provést následující kroky: -1. Initiate signal transfer on Ethereum mainnet +1. Zahájení přenosu signálu v mainnet Ethereum -2. Specify an L2 Curator address\* +2. Zadejte adresu kurátora L2\* -3. Wait 20 minutes for confirmation +3. Počkejte 20 minut na potvrzení -\*If necessary - i.e. you are using a contract address. +\*Pokud je to nutné - tj. používáte smluvní adresu. -### How will I know if the subgraph I curated has moved to L2? +### Jak se dozvím, že se mnou kurátorovaný podgraf přesunul do L2? -When viewing the subgraph details page, a banner will notify you that this subgraph has been transferred. You can follow the prompt to transfer your curation. You can also find this information on the subgraph details page of any subgraph that has moved. +Při zobrazení stránky s podrobnostmi podgrafu se zobrazí banner s upozorněním, že tento podgraf byl přenesen. Můžete následovat výzvu k přenosu kurátorství. Tyto informace najdete také na stránce s podrobnostmi o podgrafu, který se přesunul. -### What if I do not wish to move my curation to L2? +### Co když si nepřeji přesunout své kurátorství do L2? -When a subgraph is deprecated you have the option to withdraw your signal. Similarly, if a subgraph has moved to L2, you can choose to withdraw your signal in Ethereum mainnet or send the signal to L2. +Pokud je podgraf vyřazen, máte možnost stáhnout svůj signál. Stejně tak pokud se podgraf přesunul do L2, můžete si vybrat, zda chcete stáhnout svůj signál v mainnet Ethereum, nebo signál poslat do L2. -### How do I know my curation successfully transferred? +### Jak poznám, že se moje kurátorství úspěšně přeneslo? -Signal details will be accessible via Explorer approximately 20 minutes after the L2 transfer tool is initiated. +Podrobnosti o signálu budou k dispozici prostřednictvím Průzkumníka přibližně 20 minut po spuštění nástroje pro přenos L2. -### Can I transfer my curation on more than one subgraph at a time? +### Mohu přenést své kurátorství na více než jeden podgraf najednou? -There is no bulk transfer option at this time. +V současné době není k dispozici možnost hromadného přenosu. -## Indexer Stake +## Podíl indexátoru -### How do I transfer my stake to Arbitrum? +### Jak mohu převést svůj podíl do společnosti Arbitrum? -> Disclaimer: If you are currently unstaking any portion of your GRT on your Indexer, you will not be able to use L2 Transfer Tools. +> Odmítnutí odpovědnosti: Pokud v současné době na svém indexovači rozkládáte jakoukoli část GRT, nebudete moci používat nástroje pro přenos L2. -To transfer your stake, you will need to complete the following steps: +Chcete-li svůj podíl převést, musíte provést následující kroky: -1. Initiate stake transfer on Ethereum mainnet +1. Zahájení převodu podílu v mainnet Ethereum -2. Wait 20 minutes for confirmation +2. Počkejte 20 minut na potvrzení -3. Confirm stake transfer on Arbitrum +3. Potvrzení převodu podílu na Arbitrum -\*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). +\*Upozorňujeme, že převod musíte potvrdit do 7 dnů, jinak může váš vklad propadnout. Ve většině případů tento krok proběhne automaticky, ale v případě prudkého nárůstu ceny plynu na Arbitrum může být nutné ruční potvrzení. Pokud se během tohoto procesu vyskytnou nějaké problémy, budou k dispozici zdroje, které vám pomohou: kontaktujte podporu na adrese support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). -### Will all of my stake transfer? +### Bude převeden celý můj podíl? -You can choose how much of your stake to transfer. If you choose to transfer all of your stake at once, you will need to close any open allocations first. +Můžete si vybrat, jakou část svého vkladu chcete převést. Pokud se rozhodnete převést celý svůj podíl najednou, musíte nejprve uzavřít všechny otevřené alokace. -If you plan on transferring parts of your stake over multiple transactions, you must always specify the same beneficiary address. +Pokud plánujete převést část svého podílu ve více transakcích, musíte vždy zadat stejnou adresu příjemce. -Note: You must meet the minimum stake requirements on L2 the first time you use the transfer tool. Indexers must send the minimum 100k GRT (when calling this function the first time). If leaving a portion of stake on L1, it must also be over the 100k GRT minimum and be sufficient (together with your delegations) to cover your open allocations. +Poznámka: Při prvním použití nástroje pro převod musíte splnit požadavky na minimální vklad na serveru L2. Indexátoři musí odeslat minimálně 100 tisíc GRT (při prvním volání této funkce). Pokud ponecháváte část podílu na L1, musí být také vyšší než minimální hodnota 100 000 GRT a musí být dostatečná (spolu s vašimi delegacemi) k pokrytí vašich otevřených přídělů. -### How much time do I have to confirm my stake transfer to Arbitrum? +### Kolik času mám na potvrzení převodu podílu na společnost Arbitrum? -\*\*\* You must confirm your transaction to complete the stake transfer on Arbitrum. This step must be completed within 7 days or stake could be lost. +\*\*\* Pro dokončení převodu sázek na Arbitrum musíte transakci potvrdit. Tento krok musí být dokončen do 7 dnů, jinak může dojít ke ztrátě podílu. -### What if I have open allocations? +### Co když mám otevřené příděly? -If you are not sending all of your stake, the L2 transfer tool will validate that at least the minimum 100k GRT remains in Ethereum mainnet and your remaining stake and delegation is enough to cover any open allocations. You may need to close open allocations if your GRT balance does not cover the minimums + open allocations. +Pokud neposíláte celý svůj podíl, nástroj pro převod L2 ověří, že v mainnet Ethereum zůstává alespoň minimální 100k GRT a že váš zbývající podíl a delegace stačí na pokrytí všech otevřených alokací. Pokud váš zůstatek GRT nepokrývá minima + otevřené alokace, může být nutné otevřené alokace uzavřít. -### Using the transfer tools, is it necessary to wait 28 days to unstake on Ethereum mainnet before transferring? +### Je nutné při použití nástrojů pro převod čekat 28 dní na unstake v mainnet Ethereum před převodem? -No, you can transfer your stake to L2 immediately, there's no need to unstake and wait before using the transfer tool. The 28-day wait only applies if you'd like to withdraw the stake back to your wallet, on Ethereum mainnet or L2. +Ne, svůj vklad můžete na L2 převést ihned, není třeba ho vybírat a čekat, než použijete nástroj pro převod. 28denní čekací lhůta platí pouze v případě, že chcete vybrat vklad zpět do své peněženky v mainnet Ethereum nebo L2. -### How long will it take to transfer my stake? +### Jak dlouho bude trvat převod mého podílu? -It will take approximately 20 minutes for the L2 transfer tool to complete transferring your stake. +Nástroj pro převod L2 dokončí převod vašeho podílu přibližně za 20 minut. -### Do I have to index on Arbitrum before I transfer my stake? +### Musím před převodem svého podílu indexovat na Arbitrum? -You can effectively transfer your stake first before setting up indexing, but you will not be able to claim any rewards on L2 until you allocate to subgraphs on L2, index them, and present POIs. +Před nastavením indexování můžete nejprve efektivně převést svůj podíl, ale nebudete si moci nárokovat žádné odměny na L2, dokud nepřidělíte podgrafy na L2, neindexujete je a nepředložíte POIs. -### Can Delegators move their delegation before I move my indexing stake? +### Mohou delegáti přesunout svou delegaci dříve, než přesunu svůj indexovací podíl? -No, in order for Delegators to transfer their delegated GRT to Arbitrum, the Indexer they are delegating to must be active on L2. +Ne, aby mohli delegáti přenést své delegované GRT do společnosti Arbitrum, musí být indexátor, na kterého delegují, aktivní na L2. -### Can I transfer my stake if I'm using a GRT vesting contract / token lock wallet? +### Mohu převést svůj podíl, pokud používám smlouvu o převodu GRT / peněženku se zámkem token? -Yes! The process is a bit different, because vesting contracts can't forward the ETH needed to pay for the L2 gas, so you need to deposit it beforehand. If your vesting contract is not fully vested, you will also have to first initialize a counterpart vesting contract on L2 and will only be able to transfer the stake to this L2 vesting contract. The UI on Explorer can guide you through this process when you've connected to Explorer using the vesting lock wallet. +Ano! Proces je trochu jiný, protože vestingové smlouvy nemohou přeposílat ETH potřebné k zaplacení plynu L2, takže je třeba je vložit předem. Pokud vaše smlouva o převodu podílu není plně vestovaná, budete muset také nejprve inicializovat protějšek smlouvy o převodu podílu na L2 a podíl budete moci převést pouze na tuto smlouvu o převodu podílu na L2. Uživatelské rozhraní Průzkumníka vás tímto procesem provede, pokud jste se k Průzkumníkovi připojili pomocí peněženky s vestingovým zámkem. -### I already have stake on L2. Do I still need to send 100k GRT when I use the transfer tools the first time? +### Na L2 už mám podíl. Musím ještě poslat 100k GRT, když poprvé použiji převodní nástroje? -​Yes. The L1 smart contracts will not be aware of your L2 stake, so they will require you to transfer at least 100k GRT when you transfer for the first time. ​ +Ano, chytré kontrakty L1 nebudou znát váš podíl L2, takže budou vyžadovat, abyste při prvním převodu převedli alespoň 100 tisíc GRT. -### Can I transfer my stake to L2 if I am in the process of unstaking GRT? +### Mohu poslat svůj podíl do L2, pokud jsem v procesu odebírání podílu GRT? -​No. If any fraction of your stake is thawing, you have to wait the 28 days and withdraw it before you can transfer stake. The tokens that are being staked are "locked" and will prevent any transfers or stake to L2. +Ne Pokud dojde k rozmrazení jakékoli části vaší sázky, musíte počkat 28 dní a vybrat ji, než budete moci sázku převést. Tokeny, které jsou vsazeny, jsou „uzamčeny“ a zabrání jakémukoli převodu nebo vkladu do L2. -## Vesting Contract Transfer +## Přenos vestovací smlouvy -### How do I transfer my vesting contract? +### Jak mohu převést svou smlouvu o vestování? -To transfer your vesting, you will need to complete the following steps: +Chcete-li převést své nároky, musíte provést následující kroky: -1. Initiate the vesting transfer on Ethereum mainnet +1. Zahájení vesting v mainnet Ethereum -2. Wait 20 minutes for confirmation +2. Počkejte 20 minut na potvrzení -3. Confirm vesting transfer on Arbitrum +3. Potvrzení vesting na Arbitrum -### How do I transfer my vesting contract if I am only partially vested? +### Ak mohu převést svou smlouvu o vesting, pokud mám pouze částečná práva? -1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) +1. Vložte nějaký ETH do smlouvy o převodním nástroji (uživatelské rozhraní může pomoci odhadnout rozumnou částku) -2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. +2. Odeslání některých uzamčených GRT prostřednictvím smlouvy nástroje pro přenos do L2, aby se inicializoval zámek vestingu L2. Tím se také nastaví jejich adresa příjemce L2. -3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. +3. Odeslat svůj podíl/delegaci na L2 prostřednictvím funkce "uzamčeného" převodního nástroje ve smlouvě L1Staking. -4. Withdraw any remaining ETH from the transfer tool contract +4. Vybrat zbývající ETH ze smlouvy o převodním nástroji -### How do I transfer my vesting contract if I am fully vested? +### Jak mohu převést svou smlouvu o vesting práv, pokud jsem získal/a plná práva? -For those that are fully vested, the process is similar: +U těch, kteří jsou plně vested, je postup podobný: -1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) +1. Vložte nějaký ETH do smlouvy o převodním nástroji (uživatelské rozhraní může pomoci odhadnout rozumnou částku) -2. Set your L2 address with a call to the transfer tool contract +2. Set your L2 address with a call to the transfer tool contract -3. Send your stake/delegation to L2 through the "locked" transfer tool functions in the L1 Staking contract. +3. Svůj vklad/delegaci odešlete na L2 pomocí funkce "uzamčeného" převodního nástroje ve smlouvě o sázkách L1. -4. Withdraw any remaining ETH from the transfer tool contract +4. Vybrat zbývající ETH ze smlouvy o převodním nástroji -### Can I transfer my vesting contract to Arbitrum? +### Mohu svou smlouvu o převodu vesting převést na společnost Arbitrum? -You can transfer your vesting contract's GRT balance to a vesting contract in L2. This is a prerequisite for transferring stake or delegation from your vesting contract to L2. The vesting contract must hold a nonzero amount of GRT (you can transfer a small amount like 1 GRT to it if needed). +Je možné převést zůstatek GRT ze smlouvy o vesting na smlouvu o vesting v L2. Toto je předpokladem pro převod sázky nebo delegace ze smlouvy o vesting do L2. Smlouva o převodu musí obsahovat nenulové množství GRT (v případě potřeby do ní můžete převést malé množství, například 1 GRT). -When you transfer GRT from your L1 vesting contract to L2, you can choose the amount to send and you can do this as many times as you like. The L2 vesting contract will be initialized the first time you transfer GRT. +Při převodu GRT ze smlouvy L1 do L2 si můžete zvolit částku, kterou chcete poslat, a můžete to udělat tolikrát, kolikrát chcete. Při prvním převodu GRT bude inicializována vesting smlouva L2. -The transfers are done using a Transfer Tool that will be visible on your Explorer profile when you connect with the vesting contract account. +Převody se provádějí pomocí nástroje pro převody, který se zobrazí ve vašem profilu Průzkumníka po připojení k účtu se smlouvou o vestingu. -Please note that you will not be able to release/withdraw GRT from the L2 vesting contract until the end of your vesting timeline when your contract is fully vested. If you need to release GRT before then, you can transfer the GRT back to the L1 vesting contract using another transfer tool that is available for that purpose. +Mějte na paměti, že nebudete moci uvolnit/vyjmout GRT z vesting smlouvy L2 až do konce vaší vesting časové osy, kdy bude vaše smlouva plně vested. Pokud potřebujete uvolnit GRT před tímto termínem, můžete převést GRT zpět do L1 vesting smlouvy pomocí jiného převodního nástroje, který je k dispozici pro tento účel. -If you haven't transferred any vesting contract balance to L2, and your vesting contract is fully vested, you should not transfer your vesting contract to L2. Instead, you can use the transfer tools to set an L2 wallet address, and directly transfer your stake or delegation to this regular wallet on L2. +Pokud jste nepřevedli žádný zůstatek z vesting smlouvy do L2 a vaše vesting smlouva je plně vested, neměli byste převádět vaši vesting smlouvu do L2. Místo toho můžete použít nástroje pro převod k nastavení L2 adresy peněženky a přímo převést svůj vklad nebo delegaci na tuto běžnou peněženku na L2. -### I'm using my vesting contract to stake on mainnet. Can I transfer my stake to Arbitrum? +### Používám svou vestingovou smlouvu ke sázení v mainnet. Mohu převést svůj podíl na Arbitrum? -Yes, but if your contract is still vesting, you can only transfer the stake so that it is owned by your L2 vesting contract. You must first initialize this L2 contract by transferring some GRT balance using the vesting contract transfer tool on Explorer. If your contract is fully vested, you can transfer your stake to any address in L2, but you must set it beforehand and deposit some ETH for the L2 transfer tool to pay for L2 gas. +Ano, ale pokud je vaše smlouva stále ve fázi vesting, můžete převést pouze podíl tak, aby byl vlastněn vaší vesting smlouvou L2. Musíte nejprve inicializovat tuto smlouvu L2 převodem nějakého zůstatku GRT pomocí nástroje pro převod vestingové smlouvy v Průzkumníku. Pokud je vaše smlouva plně vesting, můžete převést svůj podíl na libovolnou adresu v L2, ale musíte ji nastavit předem a vložit nějaký ETH pro nástroj převodu na L2, aby mohl platit za L2 plyn. -### I'm using my vesting contract to delegate on mainnet. Can I transfer my delegations to Arbitrum? +### K delegování na mainnet používám smlouvu o vesting. Mohu své delegace přenést na Arbitrum? -Yes, but if your contract is still vesting, you can only transfer the delegation so that it is owned by your L2 vesting contract. You must first initialize this L2 contract by transferring some GRT balance using the vesting contract transfer tool on Explorer. If your contract is fully vested, you can transfer your delegation to any address in L2, but you must set it beforehand and deposit some ETH for the L2 transfer tool to pay for L2 gas. +Ano, ale pokud je vaše smlouva stále ve fázi delegace, mohli jste převést pouze podíl tak, aby byl vlastněn vaší delegační smlouvou L2. Museli jste nejprve inicializovat tuto smlouvu L2 převodem nějakého zůstatku GRT pomocí nástroje pro převod delegační smlouvy v Průzkumníku. Pokud je vaše smlouva plně delegovalo, mohli jste převést svůj podíl na libovolnou adresu v L2, ale museli jste ji nastavit předem a vložit nějaký ETH pro nástroj převodu na L2, aby mohl platit za L2 plyn. -### Can I specify a different beneficiary for my vesting contract on L2? +### Mohu na L2 zadat jiného příjemce pro smlouvu o převodu vesting? -Yes, the first time you transfer a balance and set up your L2 vesting contract, you can specify an L2 beneficiary. Make sure this beneficiary is a wallet that can perform transactions on Arbitrum One, i.e. it must be an EOA or a multisig deployed to Arbitrum One. +Ano, poprvé, když převedete zůstatek a nastavíte svou smlouvu o vesting na L2, můžete specifikovat L2 příjemce. Ujistěte se, že tento příjemce je peněženka, která může provádět transakce na Arbitrum One, tj. musí to být EOA nebo multisig nasazený na Arbitrum One. -If your contract is fully vested, you will not set up a vesting contract on L2; instead, you will set an L2 wallet address and this will be the receiving wallet for your stake or delegation on Arbitrum. +Pokud je vaše smlouva plně vested, nebudete nastavovat vesting smlouvu na L2; místo toho nastavíte adresu peněženky na L2 a tato adresa bude příjmovou peněženkou pro váš podíl nebo delegaci na Arbitrum. -### My contract is fully vested. Can I transfer my stake or delegation to another address that is not an L2 vesting contract? +### Moje smlouva je plně vested. Mohu převést svůj podíl nebo delegaci na jinou adresu, která není vesting smlouvou na L2? -Yes. If you haven't transferred any vesting contract balance to L2, and your vesting contract is fully vested, you should not transfer your vesting contract to L2. Instead, you can use the transfer tools to set an L2 wallet address, and directly transfer your stake or delegation to this regular wallet on L2. +Ano. Pokud jste do L2 nepřevedli žádný zůstatek na smlouvě s nárokem na vesting a vaše smlouva s nárokem na vesting je plně vested, neměli byste smlouvu s nárokem na vesting převádět do L2. Místo toho můžete pomocí nástrojů pro převod nastavit adresu peněženky L2 a přímo převést svůj podíl nebo delegaci do této běžné peněženky na L2. -This allows you to transfer your stake or delegation to any L2 address. +Díky tomu můžete svůj podíl nebo delegaci převést na libovolnou adresu L2. -### My vesting contract is still vesting. How do I transfer my vesting contract balance to L2? +### Moje vesting smlouva stále vestuje. Jak převedu zůstatek mé vesting smlouvy na L2? -These steps only apply if your contract is still vesting, or if you've used this process before when your contract was still vesting. +Tyto kroky platí pouze v případě, že je vaše smlouva stále vesting, nebo pokud jste tento postup použili již dříve, když byla vaše smlouva stále vesting. -To transfer your vesting contract to L2, you will send any GRT balance to L2 using the transfer tools, which will initialize your L2 vesting contract: +Chcete-li převést svou vesting smlouvu na L2, odešlete veškerý zůstatek GRT na L2 pomocí nástrojů pro převod, čímž se inicializuje vaše vesting smlouva na L2: -1. Deposit some ETH into the transfer tool contract (this will be used to pay for L2 gas) +1. Vložte nějaký ETH do smlouvy o převodním nástroji (bude použit na zaplacení plynu L2) -2. Revoke protocol access to the vesting contract (needed for the next step) +2. Zrušení přístupu protokolu k vestingové smlouvě (nutné pro další krok) -3. Give protocol access to the vesting contract (will allow your contract to interact with the transfer tool) +3. Poskytněte protokol přístup ke smlouvě o vesting (umožní vaší smlouvě komunikovat s nástrojem pro převod) -4. Specify an L2 beneficiary address\* and initiate the balance transfer on Ethereum mainnet +4. Zadejte adresu příjemce L2\* a iniciujte převod zůstatku v mainnet Ethereum -5. Wait 20 minutes for confirmation +5. Počkejte 20 minut na potvrzení -6. Confirm the balance transfer on L2 +6. Potvrzení převodu zůstatku na L2 -\*If necessary - i.e. you are using a contract address. +\*Pokud je to nutné - tj. používáte smluvní adresu. \*\*\*\*You must confirm your transaction to complete the balance transfer on Arbitrum. This step must be completed within 7 days or the balance could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). -### My vesting contract shows 0 GRT so I cannot transfer it, why is this and how do I fix it? +### Moje smlouva o vesting ukazuje 0 GRT, takže ji nemohu převést. Proč tomu tak je a jak to mohu napravit? -​To initialize your L2 vesting contract, you need to transfer a nonzero amount of GRT to L2. This is required by the Arbitrum GRT bridge that is used by the L2 Transfer Tools. The GRT must come from the vesting contract's balance, so it does not include staked or delegated GRT. +Abyste mohli inicializovat smlouvu o převodu vesting L2, musíte do L2 převést nenulovou částku GRT. To vyžaduje můstek Arbitrum GRT, který používají nástroje pro převod L2. GRT musí pocházet ze zůstatku smlouvy o vesting převodu práv, takže nezahrnuje vsazené nebo delegované GRT. -If you've staked or delegated all your GRT from the vesting contract, you can manually send a small amount like 1 GRT to the vesting contract address from anywhere else (e.g. from another wallet, or an exchange). ​ +Pokud jste vsadili nebo delegovali všechny GRT z vesting kontraktu, můžete na adresu vesting kontraktu ručně poslat malou částku, například 1 GRT, odkudkoli jinde (např. z jiné peněženky nebo burzy). -### I am using a vesting contract to stake or delegate, but I don't see a button to transfer my stake or delegation to L2, what do I do? +### Používám smlouvu s vesting právy k podílu nebo delegování, ale nemohu nalézt tlačítko pro převod podílu nebo delegování na L2. Jak mám postupovat? -​If your vesting contract hasn't finished vesting, you need to first create an L2 vesting contract that will receive your stake or delegation on L2. This vesting contract will not allow releasing tokens in L2 until the end of the vesting timeline, but will allow you to transfer GRT back to the L1 vesting contract to be released there. +Pokud vaše smlouva o vesting převodu práv ještě nedokončila převod práv, musíte nejprve vytvořit smlouvu o vesting převodu práv na L2, která obdrží váš podíl nebo delegaci na L2. Tato vesting smlouva neumožní uvolnění tokenů na L2 až do konce časové osy vesting, ale umožní vám převést GRT zpět na vesting smlouvu L1, abyste je mohli uvolnit tam. -When connected with the vesting contract on Explorer, you should see a button to initialize your L2 vesting contract. Follow that process first, and you will then see the buttons to transfer your stake or delegation in your profile. ​ +Po připojení k vesting smlouvě v Průzkumníku by se mělo zobrazit tlačítko pro inicializaci vesting smlouvy L2. Nejprve proveďte tento proces a poté se ve vašem profilu zobrazí tlačítka pro převod podílu nebo delegování -### If I initialize my L2 vesting contract, will this also transfer my delegation to L2 automatically? +### Pokud inicializuji smlouvu o převodu vesting práv L2, přenesou se tím automaticky i mé delegace do L2? -​No, initializing your L2 vesting contract is a prerequisite for transferring stake or delegation from the vesting contract, but you still need to transfer these separately. +Ne, inicializace vesting smlouvy L2 je předpokladem pro převod podílu nebo delegování z vestingové smlouvy, ale i tak je třeba je převést samostatně. -You will see a banner on your profile prompting you to transfer your stake or delegation after you have initialized your L2 vesting contract. +Po inicializaci smlouvy o vesting na L2 uvidíte na svém profilu banner s výzvou k převodu svého podílu nebo delegace. -### Can I move my vesting contract back to L1? +### Mohu přesunout svou vesting smlouvu zpět na L1? -There is no need to do so because your vesting contract is still in L1. When you use the transfer tools, you just create a new contract in L2 that is connected with your L1 vesting contract, and you can send GRT back and forth between the two. +Není to nutné, protože vaše vesting smlouva stále zůstává v L1. Při používání nástrojů pro převod vytvoříte pouze novou smlouvu v L2, která je propojená s vaší vesting smlouvou v L1, a můžete posílat GRT tam a zpět mezi oběma. -### Why do I need to move my vesting contract to begin with? +### Proč vůbec potřebuji přesunout vesting smlouvu? -You need to set up an L2 vesting contract so that this account can own your stake or delegation on L2. Otherwise, there'd be no way for you to transfer the stake/delegation to L2 without "escaping" the vesting contract. +Je třeba nastavit vesting smlouvu na L2, aby tento účet mohl vlastnit váš podíl nebo delegaci na L2. Jinak byste neměli možnost převést podíl/delegaci na L2, aniž byste 'unikli' vesting smlouvě. -### What happens if I try to cash out my contract when it is only partially vested? Is this possible? +### Co se stane, když se pokusím vyplatit svoji vesting smlouvu, když je pouze částečně vested? Je to možné? -This is not a possibility. You can move funds back to L1 and withdraw them there. +To není možné. Prostředky můžete přesunout zpět na účet L1 a vybrat je tam. -### What if I don't want to move my vesting contract to L2? +### Co když nechci přesunout svoji vesting smlouvu do L2? -You can keep staking/delegating on L1. Over time, you may want to consider moving to L2 to enable rewards there as the protocol scales on Arbitrum. Note that these transfer tools are for vesting contracts that are allowed to stake and delegate in the protocol. If your contract does not allow staking or delegating, or is revocable, then there is no transfer tool available. You will still be able to withdraw your GRT from L1 when available. +Na L1 můžete pokračovat ve sázkách/delegaci. Časem možná budete chtít zvážit přesun na L2, abyste tam umožnili odměny, protože protokol se na Arbitru škáluje. Všimněte si, že tyto přenosové nástroje jsou určeny pro smlouvy s právy, které mají v protokolu povoleno sázet a delegovat. Pokud vaše smlouva neumožňuje sázení nebo delegování nebo je odvolatelná, pak není k dispozici žádný nástroj pro přenos. I tak budete moci vybrat svůj GRT z L1, jakmile bude k dispozici. From 6fb111a1e4bb81fe3339bfaffb5c38ea2034adca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:18 -0400 Subject: [PATCH 441/924] New translations l2-transfer-tools-faq.mdx (German) --- .../de/arbitrum/l2-transfer-tools-faq.mdx | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx index 47bc07a3d2a7..cdb3cd27b4e1 100644 --- a/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx @@ -26,7 +26,7 @@ Die L2-Transfer-Tools verwenden den nativen Mechanismus von Arbitrum, um Nachric Wenn Sie Ihre Vermögenswerte (Subgraph, Anteil, Delegation oder Kuration) an L2 übertragen, wird eine Nachricht über die Arbitrum GRT-Brücke gesendet, die ein wiederholbares Ticket in L2 erstellt. Das Transfer-Tool beinhaltet einen gewissen ETH-Wert in der Transaktion, der verwendet wird, um 1) die Erstellung des Tickets und 2) das Gas für die Ausführung des Tickets in L2 zu bezahlen. Da jedoch die Gaspreise in der Zeit, bis das Zertifikat zur Ausführung in L2 bereit ist, schwanken können, ist es möglich, dass dieser automatische Ausführungsversuch fehlschlägt. Wenn das passiert, hält die Arbitrum-Brücke das wiederholbare Zertifikat für bis zu 7 Tage am Leben, und jeder kann versuchen, das Ticket erneut "einzulösen" (was eine Geldbörse mit etwas ETH erfordert, die mit Arbitrum verbunden ist). -Dies ist der so genannte "Bestätigungsschritt" in allen Übertragungswerkzeugen - er wird in den meisten Fällen automatisch ausgeführt, da die automatische Ausführung meist erfolgreich ist, aber es ist wichtig, dass Sie sich vergewissern, dass die Übertragung erfolgreich war. Wenn dies nicht gelingt und es innerhalb von 7 Tagen keine erfolgreichen Wiederholungsversuche gibt, verwirft die Arbitrum-Brücke das Ticket, und Ihre Assets (Subgraph, Pfahl, Delegation oder Kuration) gehen verloren und können nicht wiederhergestellt werden. Die Entwickler des Graph-Kerns haben ein Überwachungssystem eingerichtet, um diese Situationen zu erkennen und zu versuchen, die Tickets einzulösen, bevor es zu spät ist, aber es liegt letztendlich in Ihrer Verantwortung, sicherzustellen, dass Ihr Transfer rechtzeitig abgeschlossen wird. Wenn Sie Probleme mit der Bestätigung Ihrer Transaktion haben, wenden Sie sich bitte an [dieses Formular] \(https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms) und die Entwickler des Kerns werden Ihnen helfen. +Dies ist der so genannte "Bestätigungsschritt" in allen Übertragungswerkzeugen - er wird in den meisten Fällen automatisch ausgeführt, da die automatische Ausführung meist erfolgreich ist, aber es ist wichtig, dass Sie sich vergewissern, dass die Übertragung erfolgreich war. Wenn dies nicht gelingt und es innerhalb von 7 Tagen keine erfolgreichen Wiederholungsversuche gibt, verwirft die Arbitrum-Brücke das Ticket, und Ihre Assets (Subgraph, Pfahl, Delegation oder Kuration) gehen verloren und können nicht wiederhergestellt werden. Die Entwickler des Graph-Kerns haben ein Überwachungssystem eingerichtet, um diese Situationen zu erkennen und zu versuchen, die Tickets einzulösen, bevor es zu spät ist, aber es liegt letztendlich in Ihrer Verantwortung, sicherzustellen, dass Ihr Transfer rechtzeitig abgeschlossen wird. Wenn Sie Probleme mit der Bestätigung Ihrer Transaktion haben, wenden Sie sich bitte an [dieses Formular] (https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms) und die Entwickler des Kerns werden Ihnen helfen. ### I started my delegation/stake/curation transfer and I'm not sure if it made it through to L2, how can I confirm that it was transferred correctly? @@ -42,21 +42,21 @@ If you have the L1 transaction hash (which you can find by looking at the recent Um Ihren Subgraphen zu übertragen, müssen Sie die folgenden Schritte ausführen: -1. Starten Sie den Transfer im Ethereum-Mainnet +1. Starten Sie den Transfer im Ethereum-Mainnet -2. 20 Minuten auf Bestätigung warten +2. 20 Minuten auf Bestätigung warten -3. Bestätigung der Übertragung von Subgraphen auf Arbitrum\* +3. Bestätigung der Übertragung von Subgraphen auf Arbitrum\* -4. Veröffentlichung des Subgraphen auf Arbitrum beenden +4. Veröffentlichung des Subgraphen auf Arbitrum beenden -5. Abfrage-URL aktualisieren (empfohlen) +5. Abfrage-URL aktualisieren (empfohlen) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). ### Von wo aus soll ich meine Übertragung veranlassen? -Sie können die Übertragung vom [Subgraph Studio] \(https://thegraph.com/studio/), vom [Explorer] \(https://thegraph.com/explorer) oder von einer beliebigen Subgraph-Detailseite aus starten. Klicken Sie auf die Schaltfläche "Subgraph übertragen" auf der Detailseite des Subgraphen, um die Übertragung zu starten. +Sie können die Übertragung vom [Subgraph Studio] (https://thegraph.com/studio/), vom [Explorer] (https://thegraph.com/explorer) oder von einer beliebigen Subgraph-Detailseite aus starten. Klicken Sie auf die Schaltfläche "Subgraph übertragen" auf der Detailseite des Subgraphen, um die Übertragung zu starten. ### Wie lange muss ich warten, bis mein Subgraph übertragen wird? @@ -64,7 +64,7 @@ Die Übertragungszeit beträgt etwa 20 Minuten. Die Arbitrum-Brücke arbeitet im ### Wird mein Subgraph noch auffindbar sein, nachdem ich ihn auf L2 übertragen habe? -Ihr Subgraph ist nur in dem Netzwerk auffindbar, in dem er veröffentlicht ist. Wenn Ihr Subgraph zum Beispiel auf Arbitrum One ist, können Sie ihn nur im Explorer auf Arbitrum One finden und nicht auf Ethereum. Bitte vergewissern Sie sich, dass Sie Arbitrum One in der Netzwerkumschaltung oben auf der Seite ausgewählt haben, um sicherzustellen, dass Sie sich im richtigen Netzwerk befinden. Nach der Übertragung wird der L1-Subgraph als veraltet angezeigt. +Ihr Subgraph ist nur in dem Netzwerk auffindbar, in dem er veröffentlicht ist. Wenn Ihr Subgraph zum Beispiel auf Arbitrum One ist, können Sie ihn nur im Explorer auf Arbitrum One finden und nicht auf Ethereum. Bitte vergewissern Sie sich, dass Sie Arbitrum One in der Netzwerkumschaltung oben auf der Seite ausgewählt haben, um sicherzustellen, dass Sie sich im richtigen Netzwerk befinden. Nach der Übertragung wird der L1-Subgraph als veraltet angezeigt. ### Muss mein Subgraph ( Teilgraph ) veröffentlicht werden, um ihn zu übertragen? @@ -108,9 +108,9 @@ Gasgebühren auf Arbitrum One werden mit überbrückter ETH bezahlt (d.h. ETH, d Um Ihre Delegation zu übertragen, müssen Sie die folgenden Schritte ausführen: -1. Initiieren einer Delegationsübertragung im Ethereum-Mainnet -2. 20 Minuten auf Bestätigung warten -3. Bestätigung der Delegationsübertragung auf Arbitrum +1. Initiieren einer Delegationsübertragung im Ethereum-Mainnet +2. 20 Minuten auf Bestätigung warten +3. Bestätigung der Delegationsübertragung auf Arbitrum \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans Um Ihre Kuration zu übertragen, müssen Sie die folgenden Schritte ausführen: -1. Signalübertragung im Ethereum-Mainnet einleiten +1. Signalübertragung im Ethereum-Mainnet einleiten -2. Spezifizieren Sie eine L2-Kurator-Adresse\* +2. Spezifizieren Sie eine L2-Kurator-Adresse\* -3. 20 Minuten auf Bestätigung warten +3. 20 Minuten auf Bestätigung warten \* Falls erforderlich - d.h. wenn Sie eine Vertragsadresse verwenden. @@ -232,11 +232,11 @@ Zurzeit gibt es keine Option für Massenübertragungen. Um Ihren Einsatz zu übertragen, müssen Sie die folgenden Schritte ausführen: -1. Initiieren Sie den Stake-Transfer im Ethereum-Mainnet +1. Initiieren Sie den Stake-Transfer im Ethereum-Mainnet -2. 20 Minuten auf Bestätigung warten +2. 20 Minuten auf Bestätigung warten -3. Bestätigen Sie die Übertragung von Anteilen auf Arbitrum +3. Bestätigen Sie die Übertragung von Anteilen auf Arbitrum \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Ja! Der Prozess ist ein wenig anders, weil Vesting-Verträge die ETH, die für d Um Ihren Einsatz zu übertragen, müssen Sie die folgenden Schritte ausführen: -1. Initiieren Sie die Vesting-Übertragung im Ethereum-Mainnet +1. Initiieren Sie die Vesting-Übertragung im Ethereum-Mainnet -2. 20 Minuten auf Bestätigung warten +2. 20 Minuten auf Bestätigung warten -3. Bestätigen Sie die Übertragung von Anteilen auf Arbitrum +3. Bestätigen Sie die Übertragung von Anteilen auf Arbitrum ### Wie übertrage ich meinen unverfallbaren Vertrag, wenn ich nur teilweise unverfallbar bin? -1. Zahlen Sie etwas ETH in den Transfer-Tool-Vertrag ein (UI kann helfen, einen angemessenen Betrag zu schätzen) +1. Zahlen Sie etwas ETH in den Transfer-Tool-Vertrag ein (UI kann helfen, einen angemessenen Betrag zu schätzen) -2. Senden Sie einige gesperrte GRT über den Transfer-Tool-Vertrag an L2, um die L2-Freizügigkeitssperre zu initialisieren. Dadurch wird auch die Adresse des L2-Begünstigten festgelegt. +2. Senden Sie einige gesperrte GRT über den Transfer-Tool-Vertrag an L2, um die L2-Freizügigkeitssperre zu initialisieren. Dadurch wird auch die Adresse des L2-Begünstigten festgelegt. -3. Senden Sie Ihren Einsatz bzw. Ihre Delegation über die "gesperrten" Transfer-Tool-Funktionen im L1-Einsatzvertrag an L2. +3. Senden Sie Ihren Einsatz bzw. Ihre Delegation über die "gesperrten" Transfer-Tool-Funktionen im L1-Einsatzvertrag an L2. -4. Restliche ETH aus dem Transfer-Tool-Vertrag abziehen +4. Restliche ETH aus dem Transfer-Tool-Vertrag abziehen ### Wie übertrage ich meinen Freizügigkeitsvertrag, wenn ich eine vollständige Freizügigkeit erlangt habe? @@ -314,13 +314,13 @@ Um Ihren Einsatz zu übertragen, müssen Sie die folgenden Schritte ausführen: Für diejenigen, die voll berechtigt sind, ist das Verfahren ähnlich: -1. Zahlen Sie etwas ETH in den Transfer-Tool-Vertrag ein (UI kann helfen, einen angemessenen Betrag zu schätzen) +1. Zahlen Sie etwas ETH in den Transfer-Tool-Vertrag ein (UI kann helfen, einen angemessenen Betrag zu schätzen) -2. Stellen Sie Ihre L2-Adresse mit einem Aufruf des Transfer-Tool-Vertrags ein +2. Stellen Sie Ihre L2-Adresse mit einem Aufruf des Transfer-Tool-Vertrags ein -3. Senden Sie Ihren Einsatz bzw. Ihre Delegation über die "gesperrten" Transfer-Tool-Funktionen im L1-Einsatzvertrag an L2. +3. Senden Sie Ihren Einsatz bzw. Ihre Delegation über die "gesperrten" Transfer-Tool-Funktionen im L1-Einsatzvertrag an L2. -4. Restliche ETH aus dem Transfer-Tool-Vertrag abziehen +4. Restliche ETH aus dem Transfer-Tool-Vertrag abziehen ### Kann ich meinen Vesting-Vertrag auf Arbitrum übertragen? @@ -360,17 +360,17 @@ Diese Schritte gelten nur, wenn Ihr Vertrag noch unverfallbar ist, oder wenn Sie Um Ihren Vesting-Vertrag auf L2 zu übertragen, senden Sie ein eventuelles GRT-Guthaben mit Hilfe der Transfer-Tools an L2, wodurch Ihr L2-Vesting-Vertrag initialisiert wird: -1. Zahlen Sie einige ETH in den Transfer-Tool-Vertrag ein (diese werden zur Bezahlung von L2-Gas verwendet) +1. Zahlen Sie einige ETH in den Transfer-Tool-Vertrag ein (diese werden zur Bezahlung von L2-Gas verwendet) -2. Widerruf des Protokollzugriffs auf den Vesting-Vertrag (erforderlich für den nächsten Schritt) +2. Widerruf des Protokollzugriffs auf den Vesting-Vertrag (erforderlich für den nächsten Schritt) -3. Geben Sie dem Protokoll Zugriff auf den Vesting-Vertrag (damit Ihr Vertrag mit dem Übertragungstool interagieren kann) +3. Geben Sie dem Protokoll Zugriff auf den Vesting-Vertrag (damit Ihr Vertrag mit dem Übertragungstool interagieren kann) -4. Geben Sie eine Empfängeradresse L2\* an und initiieren Sie den Guthaben-Transfer im Ethereum-Mainnet +4. Geben Sie eine Empfängeradresse L2\* an und initiieren Sie den Guthaben-Transfer im Ethereum-Mainnet -5. 20 Minuten auf Bestätigung warten +5. 20 Minuten auf Bestätigung warten -6. Bestätigen Sie die Übertragung des Saldos auf L2 +6. Bestätigen Sie die Übertragung des Saldos auf L2 \* Falls erforderlich - d.h. wenn Sie eine Vertragsadresse verwenden. From 4ecae6255f8f659875252946a1e59b4a384d7534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:19 -0400 Subject: [PATCH 442/924] New translations l2-transfer-tools-faq.mdx (Italian) --- .../it/arbitrum/l2-transfer-tools-faq.mdx | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/website/pages/it/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/it/arbitrum/l2-transfer-tools-faq.mdx index 1c4edce5199b..a5252f121a00 100644 --- a/website/pages/it/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/it/arbitrum/l2-transfer-tools-faq.mdx @@ -2,7 +2,7 @@ title: L2 Transfer Tools FAQ --- -## General +## Generale ### Cosa sono gli Strumenti di Trasferimento L2? @@ -42,15 +42,15 @@ If you have the L1 transaction hash (which you can find by looking at the recent Per fare un trasferimento del tuo subgraph, dovrai completare i seguenti passaggi: -1. Inizializza il trasferimento su Ethereum mainnet +1. Inizializza il trasferimento su Ethereum mainnet -2. Aspetta 20 minuti per la conferma +2. Aspetta 20 minuti per la conferma -3. Conferma il trasferimento del subgraph su Arbitrum\* +3. Conferma il trasferimento del subgraph su Arbitrum\* -4. Termina la pubblicazione del subgraph su Arbitrum +4. Termina la pubblicazione del subgraph su Arbitrum -5. Aggiorna l'URL della Query (raccomandato) +5. Aggiorna l'URL della Query (raccomandato) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ Gas fees on Arbitrum One are paid using bridged ETH (i.e. ETH that has been brid To transfer your delegation, you will need to complete the following steps: -1. Initiate delegation transfer on Ethereum mainnet -2. Aspetta 20 minuti per la conferma -3. Confirm delegation transfer on Arbitrum +1. Initiate delegation transfer on Ethereum mainnet +2. Aspetta 20 minuti per la conferma +3. Confirm delegation transfer on Arbitrum \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans To transfer your curation, you will need to complete the following steps: -1. Initiate signal transfer on Ethereum mainnet +1. Initiate signal transfer on Ethereum mainnet -2. Specify an L2 Curator address\* +2. Specify an L2 Curator address\* -3. Aspetta 20 minuti per la conferma +3. Aspetta 20 minuti per la conferma \*If necessary - i.e. you are using a contract address. @@ -232,11 +232,11 @@ There is no bulk transfer option at this time. To transfer your stake, you will need to complete the following steps: -1. Initiate stake transfer on Ethereum mainnet +1. Initiate stake transfer on Ethereum mainnet -2. Aspetta 20 minuti per la conferma +2. Aspetta 20 minuti per la conferma -3. Confirm stake transfer on Arbitrum +3. Confirm stake transfer on Arbitrum \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Yes! The process is a bit different, because vesting contracts can't forward the To transfer your vesting, you will need to complete the following steps: -1. Initiate the vesting transfer on Ethereum mainnet +1. Initiate the vesting transfer on Ethereum mainnet -2. Aspetta 20 minuti per la conferma +2. Aspetta 20 minuti per la conferma -3. Confirm vesting transfer on Arbitrum +3. Confirm vesting transfer on Arbitrum ### How do I transfer my vesting contract if I am only partially vested? -1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) +1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) -2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. +2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. -3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. +3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. -4. Withdraw any remaining ETH from the transfer tool contract +4. Withdraw any remaining ETH from the transfer tool contract ### How do I transfer my vesting contract if I am fully vested? @@ -314,13 +314,13 @@ To transfer your vesting, you will need to complete the following steps: For those that are fully vested, the process is similar: -1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) +1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) -2. Set your L2 address with a call to the transfer tool contract +2. Set your L2 address with a call to the transfer tool contract -3. Send your stake/delegation to L2 through the "locked" transfer tool functions in the L1 Staking contract. +3. Send your stake/delegation to L2 through the "locked" transfer tool functions in the L1 Staking contract. -4. Withdraw any remaining ETH from the transfer tool contract +4. Withdraw any remaining ETH from the transfer tool contract ### Can I transfer my vesting contract to Arbitrum? @@ -360,17 +360,17 @@ These steps only apply if your contract is still vesting, or if you've used this To transfer your vesting contract to L2, you will send any GRT balance to L2 using the transfer tools, which will initialize your L2 vesting contract: -1. Deposit some ETH into the transfer tool contract (this will be used to pay for L2 gas) +1. Deposit some ETH into the transfer tool contract (this will be used to pay for L2 gas) -2. Revoke protocol access to the vesting contract (needed for the next step) +2. Revoke protocol access to the vesting contract (needed for the next step) -3. Give protocol access to the vesting contract (will allow your contract to interact with the transfer tool) +3. Give protocol access to the vesting contract (will allow your contract to interact with the transfer tool) -4. Specify an L2 beneficiary address\* and initiate the balance transfer on Ethereum mainnet +4. Specify an L2 beneficiary address\* and initiate the balance transfer on Ethereum mainnet -5. Aspetta 20 minuti per la conferma +5. Aspetta 20 minuti per la conferma -6. Confirm the balance transfer on L2 +6. Confirm the balance transfer on L2 \*If necessary - i.e. you are using a contract address. From 57d92b671e5cc975fedf9af15e4ab42ebfb50c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:20 -0400 Subject: [PATCH 443/924] New translations l2-transfer-tools-faq.mdx (Japanese) --- .../ja/arbitrum/l2-transfer-tools-faq.mdx | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/website/pages/ja/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/ja/arbitrum/l2-transfer-tools-faq.mdx index af2478e5ff99..06814d41c7c3 100644 --- a/website/pages/ja/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/ja/arbitrum/l2-transfer-tools-faq.mdx @@ -4,25 +4,25 @@ title: L2 転送ツールに関するよくある質問 ## General -### What are L2 Transfer Tools? +### L2転送ツールとは何ですか? -The Graph has made it 26x cheaper for contributors to participate in the network by deploying the protocol to Arbitrum One. The L2 Transfer Tools were created by core devs to make it easy to move to L2. +The Graphは、プロトコルをArbitrum Oneに展開することで、コントリビューターがネットワークに参加するのが26倍安くなりました。L2 Transfer Toolsはコア開発者によって作成され、L2への移行を簡単にするためのツールです。 -For each network participant, a set of L2 Transfer Tools are available to make the experience seamless when moving to L2, avoiding thawing periods or having to manually withdraw and bridge GRT. +各ネットワーク参加者には、L2へ移行する際にシームレスな体験を提供するための一連のL2トランスファーツールが利用可能です。これにより、解凍期間を回避したり、GRTを手動で引き出したりブリッジを構築する手間が省けます。 -These tools will require you to follow a specific set of steps depending on what your role is within The Graph and what you are transferring to L2. +これらのツールを使用するには、The Graph内でのあなたの役割とL2への転送内容に応じて特定のステップに従う必要があります。 -### Can I use the same wallet I use on Ethereum mainnet? +### イーサリアムメインネットで使用しているのと同じウォレットを使用できますか? -If you are using an [EOA](https://ethereum.org/en/developers/docs/accounts/#types-of-account) wallet you can use the same address. If your Ethereum mainnet wallet is a contract (e.g. a multisig) then you must specify an [Arbitrum wallet address](/arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the-graph-on-l2) where your transfer will be sent. Please check the address carefully as any transfers to an incorrect address can result in permanent loss. If you'd like to use a multisig on L2, make sure you deploy a multisig contract on Arbitrum One. +[EOA](https://ethereum.org/en/developers/docs/accounts/#types-of-account) ウォレットを使用している場合は、同じアドレスを使用できます。 Ethereum メインネット ウォレットがコントラクト (マルチシグなど) の場合、[Arbitrum wallet address](/arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the- graph-on-l2) 転送が送信される場所。 間違ったアドレスへの転送は永久的な損失につながる可能性があるため、アドレスを注意深く確認してください。 L2 でマルチシグを使用したい場合は、必ず Arbitrum One にマルチシグ コントラクトを展開してください。 -Wallets on EVM blockchains like Ethereum and Arbitrum are a pair of keys (public and private), that you create without any need to interact with the blockchain. So any wallet that was created for Ethereum will also work on Arbitrum without having to do anything else. +EthereumやArbitrumのようなEVMブロックチェーン上のウォレットは、ブロックチェーンとやり取りすることなく作成できる一対の鍵(公開鍵と秘密鍵)です。そのため、イーサリアム用に作成されたウォレットは、Arbitrum上でも何もすることなく動作します。 -The exception is with smart contract wallets like multisigs: these are smart contracts that are deployed separately on each chain, and get their address when they are deployed. If a multisig was deployed to Ethereum, it won't exist with the same address on Arbitrum. A new multisig must be created first on Arbitrum, and may get a different address. +マルチシグのようなスマートコントラクトのウォレットは例外です。これらのスマートコントラクトは各チェーンに別々にデプロイされ、デプロイ時にアドレスを取得します。マルチシグがイーサリアムにデプロイされた場合、Arbitrum上に同じアドレスで存在することはありません。新しいマルチシグはまずArbitrum上で作成する必要があり、異なるアドレスを取得する可能性があります。 ### 7日以内に転送を完了しないとどうなりますか? -L2転送ツールは、アービトラムのネイティブメカニズムを使用してL1からL2にメッセージを送信します。このメカニズムは「再試行可能チケット」と呼ばれ、Arbitrum GRTブリッジを含むすべてのネイティブトークンブリッジで使用されます。再試行可能なチケットの詳細については、[アービトラムドキュメント]\(https://docs.arbitrum.io/arbos/l1 からl2へのメッセージング)を参照してください。 +L2転送ツールは、アービトラムのネイティブメカニズムを使用してL1からL2にメッセージを送信します。このメカニズムは「再試行可能チケット」と呼ばれ、Arbitrum GRTブリッジを含むすべてのネイティブトークンブリッジで使用されます。再試行可能なチケットの詳細については、[アービトラムドキュメント](https://docs.arbitrum.io/arbos/l1 からl2へのメッセージング)を参照してください。 資産(サブグラフ、ステーク、委任、またはキュレーション)をL2に転送する際、Arbitrum GRTブリッジを介してメッセージが送信され、L2でretryable ticketが作成されます。転送ツールにはトランザクションに一部のETHが含まれており、これは1)チケットの作成に支払われ、2)L2でのチケットの実行に必要なガスに使用されます。ただし、チケットがL2で実行可能になるまでの時間でガス料金が変動する可能性があるため、この自動実行試行が失敗することがあります。その場合、Arbitrumブリッジはretryable ticketを最大7日間保持し、誰でもそのチケットを「償還」しようと再試行できます(これにはArbitrumにブリッジされた一部のETHを持つウォレットが必要です)。 @@ -42,15 +42,15 @@ L1トランザクションのハッシュを持っている場合(これはウ サブグラフを転送するには、次の手順を完了する必要があります。 -1. イーサリアムメインネットで転送を開始する +1. イーサリアムメインネットで転送を開始する -2. 確認を待つために20分お待ちください。 +2. 確認を待つために20分お待ちください。 -3. Arbitrum でサブグラフ転送を確認します\* +3. Arbitrum でサブグラフ転送を確認します\* -4. Arbitrum でサブグラフの公開を完了する +4. Arbitrum でサブグラフの公開を完了する -5. クエリ URL を更新 (推奨) +5. クエリ URL を更新 (推奨) \*注意:7日以内に転送を確認する必要があります。それ以外の場合、サブグラフが失われる可能性があります。ほとんどの場合、このステップは自動的に実行されますが、Arbitrumでガス価格が急上昇した場合には手動で確認する必要があるかもしれません。このプロセス中に問題が発生した場合、サポートを受けるためのリソースが用意されています:support@thegraph.com に連絡するか、[Discord](https://discord.gg/graphprotocol)でお問い合わせください\\。 @@ -108,9 +108,9 @@ Arbitrum One上のガス料金は、ブリッジを介してArbitrum Oneにブ 委任を転送するには、次の手順を完了する必要があります。 -1. イーサリアムメインネットで委任転送を開始する -2. 確認を待つために20分お待ちください。 -3. アービトラムでの委任転送の確認 +1. イーサリアムメインネットで委任転送を開始する +2. 確認を待つために20分お待ちください。 +3. アービトラムでの委任転送の確認 \*\*\*\*Arbitrum上での委任トランスファーを完了するには、トランザクションを確認する必要があります。このステップは7日以内に完了する必要があり、それ以外の場合、委任が失われる可能性があります。ほとんどの場合、このステップは自動的に実行されますが、Arbitrumでガス価格が急上昇した場合、手動の確認が必要になることがあります。このプロセス中に問題が発生した場合、サポートを受けるためのリソースが用意されています:support@thegraph.com または[Discord](https://discord.gg/graphprotocol)でサポートに連絡してください。 @@ -150,11 +150,11 @@ L2トランスファーツールは常に、以前に委任した同じインデ はい!プロセスは少し異なります。ベスティングコントラクトはL2ガスの支払いに必要なETHを転送できないため、事前にそれを預ける必要があります。ベスティングコントラクトが完全にベスティングされていない場合、まずL2上でカウンターパートのベスティングコントラクトを初期化する必要があり、委任をこのL2ベスティングコントラクトにのみ転送できます。Explorerを使用してベスティングロックウォレットに接続した場合、UIがこのプロセスを案内することができます。 -### Does my Arbitrum vesting contract allow releasing GRT just like on mainnet? +### Arbitrumの権利確定契約では、メインネットと同じようにGRTをリリースできますか? -No, the vesting contract that is created on Arbitrum will not allow releasing any GRT until the end of the vesting timeline, i.e. until your contract is fully vested. This is to prevent double spending, as otherwise it would be possible to release the same amounts on both layers. +いいえ、Arbitrumで作成された権利確定契約では、権利確定タイムラインが終了するまで、つまりコントラクトが完全に権利確定されるまで、GRTを放出することはできません。これは、二重消費を防ぐためです。そうしないと、両方のレイヤーで同じ金額を放出することが可能になってしまうからです。 -If you'd like to release GRT from the vesting contract, you can transfer them back to the L1 vesting contract using Explorer: in your Arbitrum One profile, you will see a banner saying you can transfer GRT back to the mainnet vesting contract. This requires a transaction on Arbitrum One, waiting 7 days, and a final transaction on mainnet, as it uses the same native bridging mechanism from the GRT bridge. +Arbitrum Oneのプロファイルに、GRTをメインネットの権利確定契約に戻すことができるというバナーが表示されます。この場合、GRTブリッジと同じネイティブブリッジメカニズムを使用するため、Arbitrum One上でトランザクションを行い、7日間待ち、メインネット上で最終トランザクションを行う必要があります。 ### 委任税はありますか? @@ -198,11 +198,11 @@ Indexerに連絡できる場合、彼らにL2トランスファーツールを キュレーションを転送するには、次の手順を完了する必要があります。 -1. イーサリアムメインネットでシグナル転送を開始する +1. イーサリアムメインネットでシグナル転送を開始する -2. イーサリアムメインネットでシグナル転送を開始する +2. イーサリアムメインネットでシグナル転送を開始する -3. 確認を待つために20分お待ちください。 +3. 確認を待つために20分お待ちください。 \*必要な場合 - つまり、契約アドレスを使用している場合。 @@ -232,11 +232,11 @@ L2トランスファーツールを開始してから約20分後、Explorerを ステークを譲渡するには、次の手順を完了する必要があります。 -1. イーサリアムメインネットでのステーク転送を開始してください。 +1. イーサリアムメインネットでのステーク転送を開始してください。 -2. 確認を待つために20分お待ちください。 +2. 確認を待つために20分お待ちください。 -3. Arbitrumでのステーク転送を確認してください。 +3. Arbitrumでのステーク転送を確認してください。 \*注意:7日以内に転送を確認する必要があります。それ以外の場合、あなたのステークが失われる可能性があります。ほとんどの場合、このステップは自動的に実行されますが、Arbitrumでガス価格が急上昇した場合には手動で確認が必要な場合があります。このプロセス中に問題が発生した場合、サポートを受けるためのリソースが用意されています:support@thegraph.com に連絡するか、[Discord](https://discord.gg/graphprotocol)でお問い合わせください。 @@ -290,23 +290,23 @@ L2トランスファーツールがステークの転送を完了するのに約 権利確定を譲渡するには、次の手順を完了する必要があります: -1. イーサリアムメインネットで権利確定転送を開始する +1. イーサリアムメインネットで権利確定転送を開始する -2. 確認を待つために20分お待ちください。 +2. 確認を待つために20分お待ちください。 -3. アービトラムでの権利確定転送の確認 +3. アービトラムでの権利確定転送の確認 ### 部分的にしか権利が与えられていない場合、権利確定契約を譲渡するにはどうすればよいですか? -1. 転送ツール契約にETHを入金します(UIは妥当な金額を見積もるのに役立ちます) +1. 転送ツール契約にETHを入金します(UIは妥当な金額を見積もるのに役立ちます) -2. ロックされたGRTを転送ツールコントラクトを介してL2に送信して、L2ベスティングロックを初期化します。これにより、L2の受益者アドレスも設定されます。 +2. ロックされたGRTを転送ツールコントラクトを介してL2に送信して、L2ベスティングロックを初期化します。これにより、L2の受益者アドレスも設定されます。 -3. ステーク/委任をL2に送信するには、L1Staking契約内の「ロックされた」トランスファーツール機能を使用します。 +3. ステーク/委任をL2に送信するには、L1Staking契約内の「ロックされた」トランスファーツール機能を使用します。 -4. 転送ツール契約から残りの ETH を引き出します +4. 転送ツール契約から残りの ETH を引き出します ### 完全に権利が確定している場合、権利確定契約を譲渡するにはどうすればよいですか? @@ -314,13 +314,13 @@ L2トランスファーツールがステークの転送を完了するのに約 完全に権利が与えられているものの場合、プロセスは似ています: -1. 転送ツール契約にETHを入金します(UIは妥当な金額を見積もるのに役立ちます) +1. 転送ツール契約にETHを入金します(UIは妥当な金額を見積もるのに役立ちます) -2. 転送ツール契約への呼び出しでL2アドレスを設定する +2. 転送ツール契約への呼び出しでL2アドレスを設定する -3. あなたのステーク/委任をL2に送信するには、L1ステーキング契約内の「ロック」されたトランスファーツール機能を使用してください。 +3. あなたのステーク/委任をL2に送信するには、L1ステーキング契約内の「ロック」されたトランスファーツール機能を使用してください。 -4. 転送ツール契約から残りの ETH を引き出します +4. 転送ツール契約から残りの ETH を引き出します ### 私のベスティング契約をアービトラムに転送できますか? @@ -360,17 +360,17 @@ L2のベスティングコントラクトからGRTを解放または引き出す 権利確定契約をL2に転送するには、L2権利確定契約を初期化する転送ツールを使用してGRT残高をL2に送信します。 -1. 転送ツール契約にETHを入金します(これはL2ガスの支払いに使用されます) +1. 転送ツール契約にETHを入金します(これはL2ガスの支払いに使用されます) -2. 権利確定契約へのプロトコルアクセスを取り消す(次のステップで必要) +2. 権利確定契約へのプロトコルアクセスを取り消す(次のステップで必要) -3. 権利確定契約へのプロトコルアクセスを許可します(契約が転送ツールと対話できるようにします) +3. 権利確定契約へのプロトコルアクセスを許可します(契約が転送ツールと対話できるようにします) -4. L2受取人アドレス\*を指定し、イーサリアムメインネットで残高転送を開始します +4. L2受取人アドレス\*を指定し、イーサリアムメインネットで残高転送を開始します -5. 確認を待つために20分お待ちください。 +5. 確認を待つために20分お待ちください。 -6. L2での残高転送の確認 +6. L2での残高転送の確認 \*必要な場合 - つまり、契約アドレスを使用している場合。 From ec8ea7e77f7fd05d6005afc8ce009790bda2288a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:21 -0400 Subject: [PATCH 444/924] New translations l2-transfer-tools-faq.mdx (Korean) --- .../ko/arbitrum/l2-transfer-tools-faq.mdx | 71 ++++++++++--------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx index fa428219ae8e..602b2a2c3aa2 100644 --- a/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx @@ -14,7 +14,7 @@ These tools will require you to follow a specific set of steps depending on what ### 이더리움 메인넷에서 사용하는 지갑을 그대로 사용할 수 있나요? -당신이 사용하는 경우 [EOA](https://ethereum.org/ko/개발자/문서/계정/#계정-유형) 만약 당신의 이더리움 메인넷 지갑이 단순한 지갑이라면, 당신은 동일한 주소를 사용할 수 있습니다. 만약 당신의 이더리움 메인넷 지갑이 계약(예: 다중 서명 지갑)인 경우, 당신은 당신의 이체가 전송될 Arbitrum 지갑 주소: /arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the-graph-on-l2를 지정해야 합니다. 잘못된 주소로의 이체는 영구적인 손실을 초래할 수 있으므로 주소를 주의깊게 확인하십시오. 만약 당신이 L2에서 다중 서명 지갑을 사용하고 싶다면, 반드시 Arbitrum One에 다중 서명 계약을 배포하십시오. +당신이 사용하는 경우 [EOA] (https://ethereum.org/ko/개발자/문서/계정/#계정-유형) 만약 당신의 이더리움 메인넷 지갑이 단순한 지갑이라면, 당신은 동일한 주소를 사용할 수 있습니다. 만약 당신의 이더리움 메인넷 지갑이 계약(예: 다중 서명 지갑)인 경우, 당신은 당신의 이체가 전송될 Arbitrum 지갑 주소: /arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the-graph-on-l2를 지정해야 합니다. 잘못된 주소로의 이체는 영구적인 손실을 초래할 수 있으므로 주소를 주의깊게 확인하십시오. 만약 당신이 L2에서 다중 서명 지갑을 사용하고 싶다면, 반드시 Arbitrum One에 다중 서명 계약을 배포하십시오. Wallets on EVM blockchains like Ethereum and Arbitrum are a pair of keys (public and private), that you create without any need to interact with the blockchain. So any wallet that was created for Ethereum will also work on Arbitrum without having to do anything else. @@ -22,11 +22,12 @@ The exception is with smart contract wallets like multisigs: these are smart con ### 만약 7일 안에 이체를 완료하지 못하면 어떻게 되나요? -L2 전송 도구는 Arbitrum의 기본 메커니즘을 사용하여 L1에서 L2로 메시지를 보냅니다. 이 메커니즘은 "재시도 가능한 티켓"이라고 하며 Arbitrum GRT 브리지를 포함한 모든 네이티브 토큰 브리지를 사용하여 사용됩니다. 재시도 가능한 티켓에 대해 자세히 읽을 수 있습니다 [Arbitrum 문서](https://docs.arbitrum.io/arbos/l1-to-l2-messaging). +L2 전송 도구는 Arbitrum의 기본 메커니즘을 사용하여 L1에서 L2로 메시지를 보냅니다. 이 메커니즘은 "재시도 가능한 티켓"이라고 하며 Arbitrum GRT 브리지를 포함한 모든 네이티브 토큰 브리지를 사용하여 사용됩니다. 재시도 가능한 티켓에 대해 자세히 읽을 수 있습니다 [Arbitrum 문서] +(https://docs.arbitrum.io/arbos/l1-to-l2-messaging). 자산(하위 그래프, 스테이크, 위임 또는 큐레이션) 을 L2로 이전하면 L2에서 재시도 가능한 티켓을 생성하는 Arbitrum GRT 브리지를 통해 메시지가 전송됩니다. 전송 도구에는 거래에 일부 ETH 값이 포함되어 있으며, 이는 1) 티켓 생성 비용을 지불하고 2) L2에서 티켓을 실행하기 위해 가스 비용을 지불하는 데 사용됩니다. 그러나 티켓이 L2에서 실행될 준비가 될 때까지 가스 가격이 시간에 따라 달라질 수 있으므로 이 자동 실행 시도가 실패할 수 있습니다. 그런 일이 발생하면 Arbitrum 브릿지는 재시도 가능한 티켓을 최대 7일 동안 유지하며 누구나 티켓 "사용"을 재시도할 수 있습니다(Arbitrum에 브릿지된 일부 ETH가 있는 지갑이 필요함). -이것이 모든 전송 도구에서 '확인' 단계라고 부르는 것입니다. 자동 실행이 성공하는 경우가 가장 많기 때문에 대부분의 경우 자동으로 실행되지만 제대로 진행되었는지 다시 확인하는 것이 중요합니다. 성공하지 못하고 7일 이내에 성공적인 재시도가 없으면 Arbitrum 브릿지는 티켓을 폐기하며 귀하의 자산(하위 그래프, 지분, 위임 또는 큐레이션)은 손실되어 복구할 수 없습니다. Graph 코어 개발자는 이러한 상황을 감지하고 너무 늦기 전에 티켓을 교환하기 위해 모니터링 시스템을 갖추고 있지만 전송이 제 시간에 완료되도록 하는 것은 궁극적으로 귀하의 책임입니다. 거래를 확인하는 데 문제가 있는 경우 [이 양식을 사용하여 문의하세요](https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms) 핵심 개발자들이 도와드릴 것입니다. +이것이 모든 전송 도구에서 '확인' 단계라고 부르는 것입니다. 자동 실행이 성공하는 경우가 가장 많기 때문에 대부분의 경우 자동으로 실행되지만 제대로 진행되었는지 다시 확인하는 것이 중요합니다. 성공하지 못하고 7일 이내에 성공적인 재시도가 없으면 Arbitrum 브릿지는 티켓을 폐기하며 귀하의 자산(하위 그래프, 지분, 위임 또는 큐레이션)은 손실되어 복구할 수 없습니다. Graph 코어 개발자는 이러한 상황을 감지하고 너무 늦기 전에 티켓을 교환하기 위해 모니터링 시스템을 갖추고 있지만 전송이 제 시간에 완료되도록 하는 것은 궁극적으로 귀하의 책임입니다. 거래를 확인하는 데 문제가 있는 경우 [이 양식]을 사용하여 문의하세요 (https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms) 핵심 개발자들이 도와드릴 것입니다. ### I started my delegation/stake/curation transfer and I'm not sure if it made it through to L2, how can I confirm that it was transferred correctly? @@ -40,17 +41,17 @@ If you have the L1 transaction hash (which you can find by looking at the recent -동영상YouTube 삽입 -1. 이더리움 메인넷에서 전송 시작 -2. 확인을 위해 20분 정도 기다리세요 +1. 이더리움 메인넷에서 전송 시작 -3. Arbitrum에서 하위 그래프 전송 확인\* +2. 확인을 위해 20분 정도 기다리세요 -4. Arbitrum에 하위 그래프 게시 완료 +3. Arbitrum에서 하위 그래프 전송 확인\* -5. 쿼리 URL 업데이트(권장) +4. Arbitrum에 하위 그래프 게시 완료 + +5. 쿼리 URL 업데이트(권장) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -108,9 +109,9 @@ Arbitrum One의 가스 요금은 브리지된 ETH(즉, Arbitrum One에 브리지 위임을 이전하려면 다음 단계를 완료해야 합니다. -1. 이더리움 메인넷에서 위임 이전 시작 -2. 확인을 위해 20분 정도 기다리세요 -3. Arbitrum에서 위임 이전 확인 +1. 이더리움 메인넷에서 위임 이전 시작 +2. 확인을 위해 20분 정도 기다리세요 +3. Arbitrum에서 위임 이전 확인 \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +199,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans 큐레이션을 전송하려면 다음 단계를 완료해야 합니다. -1. 이더리움 메인넷에서 신호 전송 시작 +1. 이더리움 메인넷에서 신호 전송 시작 -2. L2 큐레이터 주소 지정\* +2. L2 큐레이터 주소 지정\* -3. 확인을 위해 20분 정도 기다리세요 +3. 확인을 위해 20분 정도 기다리세요 \*필요한 경우 - 즉, 계약 주소를 사용하고 있습니다. @@ -232,11 +233,11 @@ L2 전송 도구가 시작된 후 약 20분 후에 Explorer를 통해 신호 세 지분을 양도하려면 다음 단계를 완료해야 합니다. -1. 이더리움 메인넷에서 지분 이전 시작 +1. 이더리움 메인넷에서 지분 이전 시작 -2. 확인을 위해 20분 정도 기다리세요 +2. 확인을 위해 20분 정도 기다리세요 -3. Arbitrum에서 지분 이전 확인 +3. Arbitrum에서 지분 이전 확인 \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +291,23 @@ L2 전송 도구가 지분 전송을 완료하는 데 약 20분이 소요됩니 베스팅을 이전하려면 다음 단계를 완료해야 합니다. -1. 이더리움 메인넷에서 베스팅 전송을 시작합니다. +1. 이더리움 메인넷에서 베스팅 전송을 시작합니다. -2. 확인을 위해 20분 정도 기다리세요 +2. 확인을 위해 20분 정도 기다리세요 -3. Arbitrum에서 베스팅 양도 확인 +3. Arbitrum에서 베스팅 양도 확인 ### 부분적으로만 베스팅된 경우 베스팅 계약을 어떻게 이전합니까? -1. 이체 도구 계약에 일부 ETH를 입금하십시오. (UI는 합리적인 금액을 추정하는 데 도움이 될 수 있습니다.) +1. 이체 도구 계약에 일부 ETH를 입금하십시오. (UI는 합리적인 금액을 추정하는 데 도움이 될 수 있습니다.) -2. L2 베스팅 잠금을 초기화하기 위해 전송 도구 계약을 통해 일부 잠긴 GRT를 L2로 보냅니다. 그러면 L2 수취인 주소도 설정됩니다. +2. L2 베스팅 잠금을 초기화하기 위해 전송 도구 계약을 통해 일부 잠긴 GRT를 L2로 보냅니다. 그러면 L2 수취인 주소도 설정됩니다. -3. L1Stake 계약의 "잠긴" 전송 도구 기능을 통해 스테이크/위임권을 L2로 보냅니다. +3. L1Stake 계약의 "잠긴" 전송 도구 기능을 통해 스테이크/위임권을 L2로 보냅니다. -4. 전송 도구 계약에서 남은 ETH를 인출하세요. +4. 전송 도구 계약에서 남은 ETH를 인출하세요. ### 완전히 베스팅된 경우 베스팅 계약을 어떻게 이전합니까? @@ -314,13 +315,13 @@ L2 전송 도구가 지분 전송을 완료하는 데 약 20분이 소요됩니 완전히 베스팅된 경우 프로세스는 유사합니다. -1. 이체 도구 계약에 일부 ETH를 입금하십시오. (UI는 합리적인 금액을 추정하는 데 도움이 될 수 있습니다.) +1. 이체 도구 계약에 일부 ETH를 입금하십시오. (UI는 합리적인 금액을 추정하는 데 도움이 될 수 있습니다.) -2. 전송 도구 계약을 호출하여 L2 주소를 설정하세요. +2. 전송 도구 계약을 호출하여 L2 주소를 설정하세요. -3. L1 스테이킹 계약의 "잠긴" 전송 도구 기능을 통해 스테이크/위임금을 L2로 보냅니다. +3. L1 스테이킹 계약의 "잠긴" 전송 도구 기능을 통해 스테이크/위임금을 L2로 보냅니다. -4. 전송 도구 계약에서 남은 ETH를 인출하세요. +4. 전송 도구 계약에서 남은 ETH를 인출하세요. ### 베스팅 계약을 Arbitrum으로 이전할 수 있나요? @@ -360,17 +361,17 @@ L1 베스팅 계약에서 L2로 GRT를 전송할 때 보낼 금액을 선택할 베스팅 계약을 L2로 이전하려면 L2 베스팅 계약을 초기화하는 이전 도구를 사용하여 GRT 잔액을 L2로 보내십시오. -1. 일부 ETH를 전송 도구 계약에 입금하십시오. (이는 L2 가스 비용을 지불하는 데 사용됩니다.) +1. 일부 ETH를 전송 도구 계약에 입금하십시오. (이는 L2 가스 비용을 지불하는 데 사용됩니다.) -2. 베스팅 계약에 대한 프로토콜 액세스 취소(다음 단계에 필요) +2. 베스팅 계약에 대한 프로토콜 액세스 취소(다음 단계에 필요) -3. 베스팅 계약에 프로토콜 액세스 권한을 부여합니다(귀하의 계약이 전송 도구와 상호 작용할 수 있도록 허용합니다). +3. 베스팅 계약에 프로토콜 액세스 권한을 부여합니다(귀하의 계약이 전송 도구와 상호 작용할 수 있도록 허용합니다). -4. L2 수취인 주소\*를 지정하고 이더리움 메인넷에서 잔액 이체를 시작하세요. +4. L2 수취인 주소\*를 지정하고 이더리움 메인넷에서 잔액 이체를 시작하세요. -5. 확인을 위해 20분 정도 기다리세요 +5. 확인을 위해 20분 정도 기다리세요 -6. L2 잔액 이체 확인 +6. L2 잔액 이체 확인 \*필요한 경우 - 즉, 계약 주소를 사용하고 있습니다. From aae17ab43471ced12a29d71569ee3ee242dce9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:22 -0400 Subject: [PATCH 445/924] New translations l2-transfer-tools-faq.mdx (Dutch) --- .../nl/arbitrum/l2-transfer-tools-faq.mdx | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/nl/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/nl/arbitrum/l2-transfer-tools-faq.mdx index 32dfb5ca98a7..70eadd534422 100644 --- a/website/pages/nl/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/nl/arbitrum/l2-transfer-tools-faq.mdx @@ -42,15 +42,15 @@ Als je de L1 transactie-hash hebt (die je kunt vinden door naar de recente trans Om je subgraph te verplaatsen, moet je de volgende stappen volgen: -1. Start de overdracht op het Ethereum mainnet +1. Start de overdracht op het Ethereum mainnet -2. Wacht 20 minuten op bevestiging +2. Wacht 20 minuten op bevestiging -3. Bevestig subgraph overdracht op Arbitrum\* +3. Bevestig subgraph overdracht op Arbitrum\* -4. Maak het publiceren van subrgaph op Arbitrum af +4. Maak het publiceren van subrgaph op Arbitrum af -5. Update Query URL (aanbevolen) +5. Update Query URL (aanbevolen) \*Let op dat je de overdracht binnen 7 dagen moet bevestigen, anders kan je subgraph verloren gaan. In de meeste gevallen zal deze stap automatisch verlopen, maar een handmatige bevestiging kan nodig zijn als er een gasprijsstijging is op Arbitrum. Als er tijdens dit proces problemen zijn, zijn er bronnen beschikbaar om te helpen: neem contact op met de ondersteuning via support@thegraph.com of op [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ Gas fees op Arbitrum One zijn betaald door middel van gebrugd ETH (bv. ETH dat n Om je delegatie over te dragen moet je de volgende stappen volgen: -1. Start delegatie overdracht op Ethereum mainnet -2. Wacht 20 minuten op bevestiging -3. Bevestig delegatie overdracht op Arbitrum +1. Start delegatie overdracht op Ethereum mainnet +2. Wacht 20 minuten op bevestiging +3. Bevestig delegatie overdracht op Arbitrum \*\*\*\*Je moet de transactie bevestigen om de delegatie overdracht te voltooien op Arbitrum. Deze stap moet binnen 7 dagen voltooid worden of de delegatie kan verloren gaan. In de meeste gevallen, zal deze stap automatisch verlopen, maar een handmatige bevestiging kan nodig zijn als er een gasprijsstijging is op Arbitrum. Als er problemen zijn tijdens dit process, zijn er hier hulpmiddelen: neem contact op met support via support@thegraph.com op op [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans Om je curatie over te dragen, moet je de volgende stappen volgen: -1. Start de signaal overdracht op het Ethereum mainnet +1. Start de signaal overdracht op het Ethereum mainnet -2. Specifieer een L2 Curator address\* +2. Specifieer een L2 Curator address\* -3. Wacht 20 minuten op bevestiging +3. Wacht 20 minuten op bevestiging \*indien nodig - bv. als je een contract adres gebruikt hebt. @@ -232,11 +232,11 @@ Op dit moment is er geen bulk overdracht optie. Om je inzet over te dragen, moet je de volgende stappen volgen: -1. Start de inzet overdracht op Ethereum mainnet +1. Start de inzet overdracht op Ethereum mainnet -2. Wacht 20 minuten op bevestiging +2. Wacht 20 minuten op bevestiging -3. Bevestig inzet overdracht op Arbitrum +3. Bevestig inzet overdracht op Arbitrum \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Ja! Het proces is een beetje anders, omdat toekenningscontract de benodigde ETH Om je toekenning over te dragen, moet je de volgende stappen volgen: -1. Start de toekennings transfer op Ethereum mainnet +1. Start de toekennings transfer op Ethereum mainnet -2. Wacht 20 minuten op bevestiging +2. Wacht 20 minuten op bevestiging -3. Bevestig toekenning transfer op Arbitrum +3. Bevestig toekenning transfer op Arbitrum ### Hoe draag ik mijn toekenningscontract over als ik alleen deels toegekend ben? -1. Stort wat ETH in de transfer tool contract (UI kan helpen met het schatten van een redelijke hoeveelheid) +1. Stort wat ETH in de transfer tool contract (UI kan helpen met het schatten van een redelijke hoeveelheid) -2. Stuur wat gesloten GRT via de transfer tool contract naar L3 om de L2 vesting lock te starten. Deze zal ook de begunstigde adres instellen. +2. Stuur wat gesloten GRT via de transfer tool contract naar L3 om de L2 vesting lock te starten. Deze zal ook de begunstigde adres instellen. -3. Stuur de inzet/delegering naar L2 door de "gesloten" transfer tool functies in de L1Staking contract. +3. Stuur de inzet/delegering naar L2 door de "gesloten" transfer tool functies in de L1Staking contract. -4. Neem overgebleven ETH op van de transfer tool contract +4. Neem overgebleven ETH op van de transfer tool contract ### Hoe draag ik mijn vesting contract over als ik volledig gevest ben? @@ -314,13 +314,13 @@ Om je toekenning over te dragen, moet je de volgende stappen volgen: Voor die volledig toegekend zijn is het proces vergelijkbaar: -1. Stort wat ETH in de transfer tool contract (UI kan helpen met het schatten van een redelijke hoeveelheid) +1. Stort wat ETH in de transfer tool contract (UI kan helpen met het schatten van een redelijke hoeveelheid) -2. Stel jouw L2 adres in met een vraag aan de transfer tool contract +2. Stel jouw L2 adres in met een vraag aan de transfer tool contract -3. Stuur jouw inzet/delegering naar L2 door de "gesloten" transfer tool functies in de L1 Staking contract. +3. Stuur jouw inzet/delegering naar L2 door de "gesloten" transfer tool functies in de L1 Staking contract. -4. Neem overgebleven ETH op van de transfer tool contract +4. Neem overgebleven ETH op van de transfer tool contract ### Kan ik mijn toekenningscontract overdragen naar Arbitrum? @@ -360,17 +360,17 @@ Deze stappen zijn alleen van toepassing als je contract nog steeds toe aan het k Om je toekenning contract over te dragen naar L2, zul je elke GRT-balans naar L2 sturen door middel van de transfer tools die je L2 toekenning contract zullen starten: -1. Stort wat ETH in de transfer tool contract (deze zal gebruikt worden om je L2 gas te financieren) +1. Stort wat ETH in de transfer tool contract (deze zal gebruikt worden om je L2 gas te financieren) -2. Hef protocol toegang naar de toekenning contract op (benodigd voor de volgende stap) +2. Hef protocol toegang naar de toekenning contract op (benodigd voor de volgende stap) -3. Geef protocol toegang aan het toekenningscontract (laat jouw contract interactie te hebben met de overdracht tool) +3. Geef protocol toegang aan het toekenningscontract (laat jouw contract interactie te hebben met de overdracht tool) -4. Specifieer een L2 begunstigde adres\* en start de balans overdracht op Ethereum mainnet +4. Specifieer een L2 begunstigde adres\* en start de balans overdracht op Ethereum mainnet -5. Wacht 20 minuten op bevestiging +5. Wacht 20 minuten op bevestiging -6. Bevestig de balans overdracht op L2 +6. Bevestig de balans overdracht op L2 \*indien nodig - bv. als je een contract adres gebruikt hebt. From 8bbe56191fe7e16995f8add95be9a8a0ec3cdf1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:23 -0400 Subject: [PATCH 446/924] New translations l2-transfer-tools-faq.mdx (Polish) --- .../pl/arbitrum/l2-transfer-tools-faq.mdx | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/website/pages/pl/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/pl/arbitrum/l2-transfer-tools-faq.mdx index b3d8571455ab..e74cfdb59413 100644 --- a/website/pages/pl/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/pl/arbitrum/l2-transfer-tools-faq.mdx @@ -1,5 +1,5 @@ --- -title: L2 Transfer Tools FAQ +title: Narzędzia przesyłania L2 - najczęściej zadawane pytania --- ## General @@ -24,9 +24,9 @@ The exception is with smart contract wallets like multisigs: these are smart con Narzędzia przesyłania L2 używają natywnego mechanizmu Arbitrum do wysyłania wiadomości z L1 do L2. Mechanizm ten nazywany jest "ponowny bilet" i jest używany przez wszystkie natywne mosty tokenowe, w tym most Arbitrum GRT. Więcej informacji na temat "ponownych biletów" można znaleźć w [dokumentacji Arbitrum](https://docs.arbitrum.io/arbos/l1-to-l2-messaging). -Kiedy przesyłasz swoje aktywa (subgraf, stake, delegowanie lub kuratorstwo) do L2, wiadomość jest wysyłana przez most Arbitrum GRT, który tworzy bilet z możliwością ponownej próby w L2. Narzędzie transferu zawiera pewną wartość ETH w transakcji, która jest wykorzystywana do 1) zapłaty za utworzenie biletu i 2) zapłaty za gaz do wykonania biletu w L2. Ponieważ jednak ceny gazu mogą się różnić w czasie do momentu, gdy bilet będzie gotowy do zrealizowania w L2, możliwe jest, że ta próba automatycznego wykonania zakończy się niepowodzeniem. Gdy tak się stanie, most Arbitrum utrzyma ten bilet aktywnym przez maksymalnie 7 dni, i każdy może ponowić próbę "zrealizowania" biletu (co wymaga portfela z pewną ilością ETH pzesłanego do Arbitrum). +Kiedy przenosisz swoje aktywa (subgraph, stake, delegowanie lub kuratorstwo) do L2, wiadomość jest wysyłana przez most Arbitrum GRT, który tworzy bilet z możliwością ponownej próby w L2. Narzędzie transferu zawiera pewną wartość ETH w transakcji, która jest wykorzystywana do 1) zapłaty za utworzenie biletu i 2) zapłaty za gaz do wykonania biletu w L2. Ponieważ jednak ceny gazu mogą się różnić w czasie do momentu, gdy bilet będzie gotowy do zrealizowania w L2, możliwe jest, że ta próba automatycznego wykonania zakończy się niepowodzeniem. Gdy tak się stanie, most Arbitrum utrzyma ten bilet aktywnym przez maksymalnie 7 dni, i każdy może ponowić próbę "zrealizowania" biletu (co wymaga portfela z pewną ilością ETH pzesłanego do Arbitrum). -Nazywamy to etapem "Potwierdzenia" we wszystkich narzędziach do przesyłania - w większości przypadków będzie on wykonywany automatycznie, ponieważ najczęściej kończy się sukcesem, ale ważne jest, aby sprawdzić i upewnić się, że się powiódł. Jeśli się nie powiedzie i w ciągu 7 dni nie będzie skutecznych ponownych prób, most Arbitrum odrzuci bilet, a twoje zasoby ( subgraf, stake, delegowanie lub kuratorstwo) zostaną utracone i nie będzie można ich odzyskać. Główni programiści Graph mają system monitorowania, który wykrywa takie sytuacje i próbuje zrealizować bilety, zanim będzie za późno, ale ostatecznie to ty jesteś odpowiedzialny za zapewnienie, że przesyłanie zostanie zakończone na czas. Jeśli masz problemy z potwierdzeniem transakcji, skontaktuj się z nami za pomocą [tego formularza] \(https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms), a nasi deweloperzy udzielą Ci pomocy. +Nazywamy to etapem "Potwierdzenia" we wszystkich narzędziach do przesyłania - w większości przypadków będzie on wykonywany automatycznie, ponieważ najczęściej kończy się sukcesem, ale ważne jest, aby sprawdzić i upewnić się, że się powiódł. Jeśli się nie powiedzie i w ciągu 7 dni nie będzie skutecznych ponownych prób, most Arbitrum odrzuci bilet, a twoje zasoby ( subgraf, stake, delegowanie lub kuratorstwo) zostaną utracone i nie będzie można ich odzyskać. Główni programiści Graph mają system monitorowania, który wykrywa takie sytuacje i próbuje zrealizować bilety, zanim będzie za późno, ale ostatecznie to ty jesteś odpowiedzialny za zapewnienie, że przesyłanie zostanie zakończone na czas. Jeśli masz problemy z potwierdzeniem transakcji, skontaktuj się z nami za pomocą [tego formularza] (https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms), a nasi deweloperzy udzielą Ci pomocy. ### I started my delegation/stake/curation transfer and I'm not sure if it made it through to L2, how can I confirm that it was transferred correctly? @@ -34,23 +34,23 @@ If you don't see a banner on your profile asking you to finish the transfer, the If you have the L1 transaction hash (which you can find by looking at the recent transactions in your wallet), you can also confirm if the "retryable ticket" that carried the message to L2 was redeemed here: https://retryable-dashboard.arbitrum.io/ - if the auto-redeem failed, you can also connect your wallet there and redeem it. Rest assured that core devs are also monitoring for messages that get stuck, and will attempt to redeem them before they expire. -## Przesyłanie Subgrafu +## Subgraph Transfer -### Jak mogę przesłać swój subgraf? +### Jak mogę przenieść swój subgraph? Aby przesłać swój subgraf, należy wykonać następujące kroki: -1. Zainicjuj przesyłanie w sieci głównej Ethereum +1. Zainicjuj przesyłanie w sieci głównej Ethereum -2. Poczekaj 20 minut na potwierdzenie +2. Poczekaj 20 minut na potwierdzenie -3. Potwierdź przesyłanie subgrafu na Arbitrum\* +3. Potwierdź przesyłanie subgrafu na Arbitrum\* -4. Zakończ publikowanie subgrafu na Arbitrum +4. Zakończ publikowanie subgrafu na Arbitrum -5. Zaktualizuj adres URL zapytania (zalecane) +5. Zaktualizuj adres URL zapytania (zalecane) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ Opłaty za gaz w Arbitrum One są uiszczane za pomocą bridgowanego ETH (tj. ETH Aby przesłać delegację, należy wykonać następujące kroki: -1. Zainicjuj przesyłanie delegacji w sieci głównej Ethereum -2. Poczekaj 20 minut na potwierdzenie -3. Potwierdź przesyłanie delegacji na Arbitrum +1. Zainicjuj przesyłanie delegacji w sieci głównej Ethereum +2. Poczekaj 20 minut na potwierdzenie +3. Potwierdź przesyłanie delegacji na Arbitrum \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans Aby przesłać swoje kuratorstwo, należy wykonać następujące kroki: -1. Zainicjuj przesyłanie sygnału w sieci głównej Ethereum +1. Zainicjuj przesyłanie sygnału w sieci głównej Ethereum -2. Podaj adres kuratora L2\* +2. Podaj adres kuratora L2\* -3. Poczekaj 20 minut na potwierdzenie +3. Poczekaj 20 minut na potwierdzenie \*Jeżeli będzie wymagane - np. w przypadku korzystania z adresu kontraktu. @@ -232,11 +232,11 @@ Obecnie nie ma opcji zbiorczego przesyłania. Aby przesłać swój stake, należy wykonać następujące kroki: -1. Zainicjuj przesłanie stake'u w sieci głównej Ethereum +1. Zainicjuj przesłanie stake'u w sieci głównej Ethereum -2. Poczekaj 20 minut na potwierdzenie +2. Poczekaj 20 minut na potwierdzenie -3. Potwierdź przesyłanie stake'u na Arbitrum +3. Potwierdź przesyłanie stake'u na Arbitrum \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Tak! Proces jest nieco inny, ponieważ kontrakty vestingowe nie mogą przesyła Aby przesłać vesting, należy wykonać następujące kroki: -1. Zainicjuj przesyłanie vestingu w sieci głównej Ethereum +1. Zainicjuj przesyłanie vestingu w sieci głównej Ethereum -2. Poczekaj 20 minut na potwierdzenie +2. Poczekaj 20 minut na potwierdzenie -3. Potwierdź przesłanie vestingu na Arbitrum +3. Potwierdź przesłanie vestingu na Arbitrum ### W jaki sposób mogę przesłać swój kontrakt vestingowy, jeśli mam tylko część vestingu? -1. Wpłać trochę ETH do kontraktu narzędzia przesyłania (UI pomoże oszacować odpowiednią kwotę) +1. Wpłać trochę ETH do kontraktu narzędzia przesyłania (UI pomoże oszacować odpowiednią kwotę) -2. Wyślij zablokowane GRT za pośrednictwem kontraktu narzędzia przesyłania do L2, aby zainicjować blokadę vestingu L2. Ustawi to również adres beneficjenta L2. +2. Wyślij zablokowane GRT za pośrednictwem kontraktu narzędzia przesyłania do L2, aby zainicjować blokadę vestingu L2. Ustawi to również adres beneficjenta L2. -3. Wyślij swój stake/delegację do L2 poprzez "zablokowane" funkcje narzędzia przesyłania w kontrakcie stakingu L1. +3. Wyślij swój stake/delegację do L2 poprzez "zablokowane" funkcje narzędzia przesyłania w kontrakcie stakingu L1. -4. Wycofaj pozostałe ETH z kontraktu narzędzia przesyłania +4. Wycofaj pozostałe ETH z kontraktu narzędzia przesyłania ### W jaki sposób mogę przesłać kontrakt vestingowy, jeśli mam pełny vesting? @@ -314,13 +314,13 @@ Aby przesłać vesting, należy wykonać następujące kroki: Dla tych, którzy mają pełny vesting, proces wygląda podobnie: -1. Wpłać trochę ETH do kontraktu narzędzia przesyłania (UI pomoże oszacować odpowiednią kwotę) +1. Wpłać trochę ETH do kontraktu narzędzia przesyłania (UI pomoże oszacować odpowiednią kwotę) -2. Ustaw adres L2 za pomocą wywołania kontraktu narzędzia przesyłania +2. Ustaw adres L2 za pomocą wywołania kontraktu narzędzia przesyłania -3. Wyślij swój stake/delegację do L2 poprzez "zablokowane" funkcje narzędzia przesyłania w kontrakcie stakingu L1. +3. Wyślij swój stake/delegację do L2 poprzez "zablokowane" funkcje narzędzia przesyłania w kontrakcie stakingu L1. -4. Wycofaj pozostałe ETH z kontraktu narzędzia przesyłania +4. Wycofaj pozostałe ETH z kontraktu narzędzia przesyłania ### Czy mogę przesłać swój kontrakt vestingowy do Arbitrum? @@ -360,17 +360,17 @@ Kroki te mają zastosowanie tylko wtedy, gdy Twój kontrakt jest nadal vestowany Aby przesłać kontrakt vestingowy do L2, należy przesłać saldo GRT do L2 za pomocą narzędzi przesyłania, co spowoduje zainicjowanie kontraktu vestingowego L2: -1. Wpłać trochę ETH do kontraktu narzędzia przesyłania (zostanie to wykorzystane do zapłaty za gaz L2) +1. Wpłać trochę ETH do kontraktu narzędzia przesyłania (zostanie to wykorzystane do zapłaty za gaz L2) -2. Anuluj dostęp protokołu do kontraktu vestingowego (potrzebne do następnego kroku) +2. Anuluj dostęp protokołu do kontraktu vestingowego (potrzebne do następnego kroku) -3. Udziel protokołowi dostępu do kontraktu vestingowego (pozwoli to na interakcję kontraktu z narzędziem przesyłania) +3. Udziel protokołowi dostępu do kontraktu vestingowego (pozwoli to na interakcję kontraktu z narzędziem przesyłania) -4. Określ adres beneficjenta L2\* i zainicjuj przesyłanie salda w sieci głównej Ethereum +4. Określ adres beneficjenta L2\* i zainicjuj przesyłanie salda w sieci głównej Ethereum -5. Poczekaj 20 minut na potwierdzenie +5. Poczekaj 20 minut na potwierdzenie -6. Potwierdź przesłanie salda na L2 +6. Potwierdź przesłanie salda na L2 \*Jeżeli będzie wymagane - np. w przypadku korzystania z adresu kontraktu. From 03c36fa06db3de45e2b2ca00168fbd80c9ff8c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:23 -0400 Subject: [PATCH 447/924] New translations l2-transfer-tools-faq.mdx (Portuguese) --- .../pt/arbitrum/l2-transfer-tools-faq.mdx | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/pt/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/pt/arbitrum/l2-transfer-tools-faq.mdx index d060247cbfad..8b113f4edffa 100644 --- a/website/pages/pt/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/pt/arbitrum/l2-transfer-tools-faq.mdx @@ -42,15 +42,15 @@ Se tiver o hash de transação da L1 (confira as transações recentes na sua ca Para transferir o seu subgraph, complete os seguintes passos: -1. Inicie a transferência na mainnet Ethereum +1. Inicie a transferência na mainnet Ethereum -2. Espere 20 minutos pela confirmação +2. Espere 20 minutos pela confirmação -3. Confirme a transferência do subgraph no Arbitrum\* +3. Confirme a transferência do subgraph no Arbitrum\* -4. Termine de editar o subgraph no Arbitrum +4. Termine de editar o subgraph no Arbitrum -5. Atualize o URL de Query (recomendado) +5. Atualize o URL de Query (recomendado) \*Você deve confirmar a transferência dentro de 7 dias, ou o seu subgraph poderá ser perdido. Na maioria dos casos, este passo será executado automaticamente, mas pode ser necessário confirmar manualmente caso haja um surto no preço de gas no Arbitrum. Caso haja quaisquer dificuldades neste processo, contacte o suporte em support@thegraph.com ou no [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ As taxas de gás no Arbitrum One são pagas com ETH em bridge (por ex. ETH que f Para transferir a sua delegação, complete os seguintes passos: -1. Inicie a transferência de delegação na mainnet Ethereum -2. Espere 20 minutos pela confirmação -3. Confirme a transferência da delegação no Arbitrum +1. Inicie a transferência de delegação na mainnet Ethereum +2. Espere 20 minutos pela confirmação +3. Confirme a transferência da delegação no Arbitrum \*\*\*\*Confirme a transferência dentro de 7 dias, ou o seu subgraph poderá ser perdido. Na maioria dos casos, este passo será executado automaticamente, mas pode ser necessário confirmar manualmente caso haja um surto no preço de gas no Arbitrum. Caso haja quaisquer dificuldades neste processo, contacte o suporte em support@thegraph.com ou no [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ Os tokens a serem desdelegados estão "trancados", e assim, não podem ser trans Para transferir a sua curadoria, complete os seguintes passos: -1. Inicie a transferência de sinal na mainnet Ethereum +1. Inicie a transferência de sinal na mainnet Ethereum -2. Especifique um endereço de Curador na L2\* +2. Especifique um endereço de Curador na L2\* -3. Espere 20 minutos pela confirmação +3. Espere 20 minutos pela confirmação \*Se necessário - por ex. se você usar um endereço de contrato. @@ -232,11 +232,11 @@ Não há opção de transferências em conjunto no momento. Para transferir o seu stake, complete os seguintes passos: -1. Inicie a transferência de stake na mainnet Ethereum +1. Inicie a transferência de stake na mainnet Ethereum -2. Espere 20 minutos pela confirmação +2. Espere 20 minutos pela confirmação -3. Confirme a transferência do stake no Arbitrum +3. Confirme a transferência do stake no Arbitrum \*Confirme a transferência dentro de 7 dias, ou o seu stake poderá ser perdido. Na maioria dos casos, este passo será executado automaticamente, mas pode ser necessário confirmar manualmente se houver um aumento repentino no preço de gas no Arbitrum. Caso haja quaisquer dificuldades neste processo, contacte o suporte em support@thegraph.com ou no [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Não. Se qualquer fração do seu stake estiver em degelo, espere os 28 dias e a Para transferir o seu vesting, complete os seguintes passos: -1. Inicie a transferência de vesting na mainnet Ethereum +1. Inicie a transferência de vesting na mainnet Ethereum -2. Espere 20 minutos pela confirmação +2. Espere 20 minutos pela confirmação -3. Confirme a transferência do vesting no Arbitrum +3. Confirme a transferência do vesting no Arbitrum ### Como transfiro o meu contrato de vesting se estiver vestido apenas parcialmente? -1. Deposite ETH no contrato da ferramenta de transferência (a interface pode ajudar a estimar uma quantia razoável) +1. Deposite ETH no contrato da ferramenta de transferência (a interface pode ajudar a estimar uma quantia razoável) -2. Envie um pouco de GRT através do contrato da ferramenta de transferência, para que a L2 inicialize o contrato de vesting na L2. Isto também configurará o endereço beneficiário na L2. +2. Envie um pouco de GRT através do contrato da ferramenta de transferência, para que a L2 inicialize o contrato de vesting na L2. Isto também configurará o endereço beneficiário na L2. -3. Envie o seu stake/a sua delegação à L2 através das funções "bloqueadas" da ferramenta de transferência no contrato de staking na L1. +3. Envie o seu stake/a sua delegação à L2 através das funções "bloqueadas" da ferramenta de transferência no contrato de staking na L1. -4. Saque qualquer quantia restante de ETH do contrato da ferramenta de transferência +4. Saque qualquer quantia restante de ETH do contrato da ferramenta de transferência ### Como transfiro o meu contrato de vesting, se eu estiver totalmente vestido? @@ -314,13 +314,13 @@ Para transferir o seu vesting, complete os seguintes passos: Para quem estiver totalmente vestido, o processo não é muito diferente: -1. Deposite ETH no contrato da ferramenta de transferência (a interface pode estimar uma quantidade razoável) +1. Deposite ETH no contrato da ferramenta de transferência (a interface pode estimar uma quantidade razoável) -2. Determine o seu endereço na L2 com uma chamada ao contrato da ferramenta de transferência +2. Determine o seu endereço na L2 com uma chamada ao contrato da ferramenta de transferência -3. Envie o seu stake/a sua delegação à L2 através das funções "bloqueadas" da ferramenta de transferência no contrato de staking na L1. +3. Envie o seu stake/a sua delegação à L2 através das funções "bloqueadas" da ferramenta de transferência no contrato de staking na L1. -4. Saque qualquer quantia de ETH que restar do contrato da ferramenta de transferência +4. Saque qualquer quantia de ETH que restar do contrato da ferramenta de transferência ### Posso transferir o meu contrato de vesting ao Arbitrum? @@ -360,17 +360,17 @@ Estes passos só se aplicam se o seu contrato ainda estiver em processo de vesti Para transferir o seu contrato de vesting à L2, envie qualquer saldo de GRT à L2 com as ferramentas de transferência. Isto iniciará o seu contrato de vesting na L2: -1. Deposite ETH no contrato da ferramenta de transferência (isto será usado para pagar gás na L2) +1. Deposite ETH no contrato da ferramenta de transferência (isto será usado para pagar gás na L2) -2. Revogue o acesso protocolar ao contrato de vesting (necessário para o próximo passo) +2. Revogue o acesso protocolar ao contrato de vesting (necessário para o próximo passo) -3. Conceda acesso protocolar ao contrato de vesting (isto permitirá que o seu contrato interaja com a ferramenta de transferência) +3. Conceda acesso protocolar ao contrato de vesting (isto permitirá que o seu contrato interaja com a ferramenta de transferência) -4. Especifique um endereço beneficiário na L2\* e inicie a transferência do saldo na mainnet Ethereum +4. Especifique um endereço beneficiário na L2\* e inicie a transferência do saldo na mainnet Ethereum -5. Espere 20 minutos pela confirmação +5. Espere 20 minutos pela confirmação -6. Confirme a transferência do saldo na L2 +6. Confirme a transferência do saldo na L2 \*Se necessário - por ex. se você usar um endereço de contrato. From f10680aa3c7666eb3d9293d34bd4912c24601893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:24 -0400 Subject: [PATCH 448/924] New translations l2-transfer-tools-faq.mdx (Russian) --- .../ru/arbitrum/l2-transfer-tools-faq.mdx | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/website/pages/ru/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/ru/arbitrum/l2-transfer-tools-faq.mdx index 14d4d9a90c12..b0a76d482e74 100644 --- a/website/pages/ru/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/ru/arbitrum/l2-transfer-tools-faq.mdx @@ -26,7 +26,7 @@ The exception is with smart contract wallets like multisigs: these are smart con Когда Вы переносите свои активы (субграф, стейк, делегирование или курирование) на L2, через мост Arbitrum GRT отправляется сообщение, которое создает повторный тикет на L2. Инструмент переноса включает в транзакцию некоторую стоимость ETH, которая используется для 1) оплаты создания тикета и 2) оплаты стоимости газа для выполнения тикета на L2. Однако, поскольку стоимость газа может измениться за время, пока тикет будет готов к исполнению на L2, возможна ситуация, когда попытка автоматического исполнения не удастся. В этом случае мост Arbitrum сохранит повторный тикет в течение 7 дней, и любой желающий может повторить попытку "погасить" тикет (для этого необходимо иметь кошелек с некоторым количеством ETH, подключенный к мосту Arbitrum). -Это так называемый шаг "Подтверждение" во всех инструментах переноса - в большинстве случаев он выполняется автоматически, поскольку автоисполнение чаще всего бывает успешным, но важно, чтобы Вы проверили, прошел ли он. Если он не исполнился и в течение 7 дней не будет повторных успешных попыток, мост Arbitrum отменит тикет, и Ваши активы (субграф, стейк, делегирование или курирование) будут потеряны и не смогут быть восстановлены. У разработчиков ядра The Graph есть система мониторинга, позволяющая выявлять такие ситуации и пытаться погасить тикеты, пока не стало слишком поздно, но в конечном итоге ответственность за своевременное завершение переноса лежит на Вас. Если у Вас возникли проблемы с подтверждением переноса, пожалуйста, свяжитесь с нами через [эту форму] \(https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms), и разработчики ядра помогут Вам. +Это так называемый шаг "Подтверждение" во всех инструментах переноса - в большинстве случаев он выполняется автоматически, поскольку автоисполнение чаще всего бывает успешным, но важно, чтобы Вы проверили, прошел ли он. Если он не исполнился и в течение 7 дней не будет повторных успешных попыток, мост Arbitrum отменит тикет, и Ваши активы (субграф, стейк, делегирование или курирование) будут потеряны и не смогут быть восстановлены. У разработчиков ядра The Graph есть система мониторинга, позволяющая выявлять такие ситуации и пытаться погасить тикеты, пока не стало слишком поздно, но в конечном итоге ответственность за своевременное завершение переноса лежит на Вас. Если у Вас возникли проблемы с подтверждением переноса, пожалуйста, свяжитесь с нами через [эту форму] (https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms), и разработчики ядра помогут Вам. ### Я начал передачу делегирования/стейка/курирования и не уверен, что она дошла до уровня L2. Как я могу убедиться, что она была передана правильно? @@ -42,15 +42,15 @@ The exception is with smart contract wallets like multisigs: these are smart con Чтобы перенести Ваш субграф, необходимо выполнить следующие действия: -1. Инициировать перенос в основной сети Ethereum +1. Инициировать перенос в основной сети Ethereum -2. Подождать 20 минут для получения подтверждения +2. Подождать 20 минут для получения подтверждения -3. Подтвердить перенос субграфа в Arbitrum\* +3. Подтвердить перенос субграфа в Arbitrum\* -4. Завершить публикацию субграфа в Arbitrum +4. Завершить публикацию субграфа в Arbitrum -5. Обновить URL-адрес запроса (рекомендуется) +5. Обновить URL-адрес запроса (рекомендуется) \* Обратите внимание, что Вы должны подтвердить перенос в течение 7 дней, иначе Ваш субграф может быть потерян. В большинстве случаев этот шаг выполнится автоматически, но в случае скачка стоимости комиссии сети в Arbitrum может потребоваться ручное подтверждение. Если в ходе этого процесса возникнут какие-либо проблемы, Вам помогут: обратитесь в службу поддержки по адресу support@thegraph.com или в [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ The exception is with smart contract wallets like multisigs: these are smart con Для переноса делегирования необходимо выполнить следующие действия: -1. Инициировать перенос делегирования в основной сети Ethereum -2. Подождать 20 минут для получения подтверждения -3. Подтвердить перенос делегирования на Arbitrum +1. Инициировать перенос делегирования в основной сети Ethereum +2. Подождать 20 минут для получения подтверждения +3. Подтвердить перенос делегирования на Arbitrum \*\*\*\*Для завершения передачи делегирования на Arbitrum необходимо подтвердить транзакцию. Этот шаг должен быть выполнен в течение 7 дней, иначе делегирование может быть потеряно. В большинстве случаев этот этап выполняется автоматически, однако в случае скачка цен на комиссию сети в Arbitrum может потребоваться ручное подтверждение. Если в ходе этого процесса возникнут какие-либо проблемы, Вам будет оказана помощь: обращайтесь в службу поддержки по адресу support@thegraph.com или в [Discord](https://discord.gg/graphprotocol). @@ -168,7 +168,7 @@ If you'd like to release GRT from the vesting contract, you can transfer them ba ### Обязателен ли перенос делегирования на уровень L2? Есть ли крайний срок? -Перенос делегирования на уровень L2 не является обязательным, но вознаграждение за индексирование увеличивается на уровне L2 в соответствии с графиком, описанным в [GIP-0052] \(https://forum.thegraph.com/t/gip-0052-timeline-and-requirements-to-increase-rewards-in-l2/4193). В конечном итоге, если Совет продолжит одобрять увеличение, все вознаграждения будут распределены на уровне L2, и индексаторы и делегаторы не будут получать вознаграждения за индексацию на уровне L1. +Перенос делегирования на уровень L2 не является обязательным, но вознаграждение за индексирование увеличивается на уровне L2 в соответствии с графиком, описанным в [GIP-0052] (https://forum.thegraph.com/t/gip-0052-timeline-and-requirements-to-increase-rewards-in-l2/4193). В конечном итоге, если Совет продолжит одобрять увеличение, все вознаграждения будут распределены на уровне L2, и индексаторы и делегаторы не будут получать вознаграждения за индексацию на уровне L1. ### Если я передам полномочия индексатору, который уже перевел ставку на уровень L2, перестану ли я получать вознаграждения на уровне L1? @@ -198,11 +198,11 @@ If you'd like to release GRT from the vesting contract, you can transfer them ba Для переноса своего курирования необходимо выполнить следующие действия: -1. Инициировать перенос сигнала в основной сети Ethereum +1. Инициировать перенос сигнала в основной сети Ethereum -2. Указать L2 адрес куратора\* +2. Указать L2 адрес куратора\* -3. Подождать 20 минут для получения подтверждения +3. Подождать 20 минут для получения подтверждения \*При необходимости - т.е. если Вы используете контрактный адрес. @@ -232,11 +232,11 @@ If you'd like to release GRT from the vesting contract, you can transfer them ba Чтобы передать свою ставку, Вам необходимо выполнить следующие шаги: -1. Инициировать передачу ставок в сети Ethereum +1. Инициировать передачу ставок в сети Ethereum -2. Подождать 20 минут для получения подтверждения +2. Подождать 20 минут для получения подтверждения -3. Подтвердить передачу ставки на Arbitrum +3. Подтвердить передачу ставки на Arbitrum \*Обратите внимание, что Вы должны подтвердить перевод в течение 7 дней, в противном случае Ваша ставка может быть потеряна. В большинстве случаев этот шаг выполняется автоматически, но может потребоваться подтверждение вручную, если на Arbitrum произойдет скачок цен стоимости комиссии сети. Если во время этого процесса возникнут какие-либо проблемы, Вам помогут ресурсы: обратитесь в службу поддержки по адресу support@thegraph.com или в [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ If you'd like to release GRT from the vesting contract, you can transfer them ba Для переноса Вашего вестинга необходимо выполнить следующие действия: -1. Инициировать перенос вестинга в основной сети Ethereum +1. Инициировать перенос вестинга в основной сети Ethereum -2. Подождать 20 минут для получения подтверждения +2. Подождать 20 минут для получения подтверждения -3. Подтвердить перенос вестинга на Arbitrum +3. Подтвердить перенос вестинга на Arbitrum ### Как перенести вестинговый контракт, если я только частично вестирован? -1. Внесите некоторое количество ETH в контракт инструмента переноса (UI может помочь оценить разумную сумму) +1. Внесите некоторое количество ETH в контракт инструмента переноса (UI может помочь оценить разумную сумму) -2. Отправьте часть заблокированных GRT через контракт инструмента переноса на L2, чтобы инициализировать блокировку вестинга L2. При этом также будет установлен адрес бенефициара L2. +2. Отправьте часть заблокированных GRT через контракт инструмента переноса на L2, чтобы инициализировать блокировку вестинга L2. При этом также будет установлен адрес бенефициара L2. -3. Отправьте свой стейк/делегацию в L2 через "заблокированные" функции инструмента переноса в стейкинговом контракте L1. +3. Отправьте свой стейк/делегацию в L2 через "заблокированные" функции инструмента переноса в стейкинговом контракте L1. -4. Выведите оставшиеся ETH из контракта инструмента переноса +4. Выведите оставшиеся ETH из контракта инструмента переноса ### Как перенести вестинговый контракт, если я полностью вестирован? @@ -314,13 +314,13 @@ If you'd like to release GRT from the vesting contract, you can transfer them ba Для тех, кто полностью вестирован, процесс аналогичен: -1. Внесите некоторое количество ETH в контракт инструмента переноса (UI может помочь оценить разумную сумму) +1. Внесите некоторое количество ETH в контракт инструмента переноса (UI может помочь оценить разумную сумму) -2. Установите адрес L2, вызвав контракт инструмента переноса данных +2. Установите адрес L2, вызвав контракт инструмента переноса данных -3. Отправьте свои ставку/делегацию в L2 через "заблокированные" функции инструмента переноса в стейкинговом контракте L1. +3. Отправьте свои ставку/делегацию в L2 через "заблокированные" функции инструмента переноса в стейкинговом контракте L1. -4. Выведите оставшиеся ETH из контракта инструмента переноса +4. Выведите оставшиеся ETH из контракта инструмента переноса ### Могу ли я перенести свой вестинговый контракт на Arbitrum? @@ -360,17 +360,17 @@ If you'd like to release GRT from the vesting contract, you can transfer them ba Чтобы перенести свой вестинговый контракт в L2, необходимо отправить весь баланс GRT на L2 с помощью инструментов переноса, что приведет к инициализации вестингового контракта в L2: -1. Внести некоторое количество ETH на контракт инструмента переноса (они будут использованы для оплаты комиссии сети L2) +1. Внести некоторое количество ETH на контракт инструмента переноса (они будут использованы для оплаты комиссии сети L2) -2. Отозвать доступ протокола к вестинговому контракту (необходимо для следующего шага) +2. Отозвать доступ протокола к вестинговому контракту (необходимо для следующего шага) -3. Предоставить протоколу доступ к вестинговому контракту (позволит Вашему контракту взаимодействовать с инструментом переноса) +3. Предоставить протоколу доступ к вестинговому контракту (позволит Вашему контракту взаимодействовать с инструментом переноса) -4. Указать адрес бенефициара L2\* и инициировать перенос баланса в основной сети Ethereum +4. Указать адрес бенефициара L2\* и инициировать перенос баланса в основной сети Ethereum -5. Подождать 20 минут для получения подтверждения +5. Подождать 20 минут для получения подтверждения -6. Подтвердите перенос баланса на L2 +6. Подтвердите перенос баланса на L2 \*При необходимости - т.е. если Вы используете контрактный адрес. From 75efdfc82f0a71d20c504f1e3bfb4323a3db795d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:25 -0400 Subject: [PATCH 449/924] New translations l2-transfer-tools-faq.mdx (Swedish) --- .../sv/arbitrum/l2-transfer-tools-faq.mdx | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/sv/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/sv/arbitrum/l2-transfer-tools-faq.mdx index e3f54470bf34..c0c1a2dedcb6 100644 --- a/website/pages/sv/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/sv/arbitrum/l2-transfer-tools-faq.mdx @@ -42,15 +42,15 @@ Om du har L1-transaktionshashen (som du kan hitta genom att titta på de senaste För att överföra din subgraf måste du slutföra följande steg: -1. Initiera överföringen på Ethereum huvudnätet +1. Initiera överföringen på Ethereum huvudnätet -2. Vänta 20 minuter på bekräftelse +2. Vänta 20 minuter på bekräftelse -3. Bekräfta subgraföverföringen på Arbitrum\* +3. Bekräfta subgraföverföringen på Arbitrum\* -4. Slutför publiceringen av subgraf på Arbitrum +4. Slutför publiceringen av subgraf på Arbitrum -5. Uppdatera fråge-URL (rekommenderas) +5. Uppdatera fråge-URL (rekommenderas) \*Observera att du måste bekräfta överföringen inom 7 dagar, annars kan din subgraf gå förlorad. I de flesta fall kommer detta steg att köras automatiskt, men en manuell bekräftelse kan behövas om det finns en gasprisspike på Arbitrum. Om det uppstår några problem under denna process finns det resurser för att hjälpa: kontakta support på support@thegraph.com eller på [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ Gasavgifter på Arbitrum One betalas med bridged ETH (dvs. ETH som har broats ti För att överföra din delegation måste du följa följande steg: -1. Initiera överföring av delegationen på Ethereum huvudnät -2. Vänta 20 minuter på bekräftelse -3. Bekräfta överföring av delegationen på Arbitrum +1. Initiera överföring av delegationen på Ethereum huvudnät +2. Vänta 20 minuter på bekräftelse +3. Bekräfta överföring av delegationen på Arbitrum \*\*\*\*Du måste bekräfta transaktionen för att slutföra överföringen av delegationen på Arbitrum. Detta steg måste slutföras inom 7 dagar, annars kan delegationen gå förlorad. I de flesta fall kommer detta steg att köras automatiskt, men manuell bekräftelse kan behövas om det uppstår en gasprisökning på Arbitrum. Om det uppstår problem under denna process finns det resurser för att hjälpa: kontakta support på support@thegraph.com eller på [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ De tokens som avdelegeras är "låsta" och kan därför inte överföras till L2 För att överföra din kurering måste du följa följande steg: -1. Initiera signalöverföring på Ethereum huvudnät +1. Initiera signalöverföring på Ethereum huvudnät -2. Ange en L2-kuratorsadress\* +2. Ange en L2-kuratorsadress\* -3. Vänta 20 minuter på bekräftelse +3. Vänta 20 minuter på bekräftelse \*Om det behövs - dvs. du använder en kontraktadress. @@ -232,11 +232,11 @@ Det finns för närvarande ingen möjlighet till bulköverföring. För att överföra din insats måste du följa dessa steg: -1. Initiera insatsöverföring på Ethereum huvudnät +1. Initiera insatsöverföring på Ethereum huvudnät -2. Vänta 20 minuter på bekräftelse +2. Vänta 20 minuter på bekräftelse -3. Bekräfta insatsöverföring på Arbitrum. +3. Bekräfta insatsöverföring på Arbitrum. \*Observera att du måste bekräfta överföringen inom 7 dagar annars kan din insats gå förlorad. I de flesta fall kommer detta steg att köras automatiskt, men en manuell bekräftelse kan behövas om det är en gasprisspik på Arbitrum. Om det uppstår problem under processen finns det resurser för att hjälpa: kontakta support på support@thegraph.com eller på [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Ja! Processen är något annorlunda, eftersom vestingkontrakt inte kan vidarebef För att överföra ditt vestingkontrakt måste du följa dessa steg: -1. Initiera överföringen av vesting på Ethereum huvudnät +1. Initiera överföringen av vesting på Ethereum huvudnät -2. Vänta 20 minuter på bekräftelse +2. Vänta 20 minuter på bekräftelse -3. Bekräfta överföringen av vesting på Arbitrum +3. Bekräfta överföringen av vesting på Arbitrum ### Hur överför jag mitt vestingkontrakt om jag bara är delvis utdelad? -1. Sätt in lite ETH i överföringsverktygskontraktet (UI kan hjälpa till att uppskatta en rimlig summa) +1. Sätt in lite ETH i överföringsverktygskontraktet (UI kan hjälpa till att uppskatta en rimlig summa) -2. Skicka lite låst GRT genom överföringsverktygskontraktet till L2 för att initialisera låsningsmekanismen för L2. Detta kommer också att ange deras L2-förmånstagareadress. +2. Skicka lite låst GRT genom överföringsverktygskontraktet till L2 för att initialisera låsningsmekanismen för L2. Detta kommer också att ange deras L2-förmånstagareadress. -3. Skicka deras insats/delegering till L2 genom "låsta" överföringsverktygsfunktioner i L1Staking-kontraktet. +3. Skicka deras insats/delegering till L2 genom "låsta" överföringsverktygsfunktioner i L1Staking-kontraktet. -4. Ta ut eventuell kvarvarande ETH från överföringsverktygskontraktet +4. Ta ut eventuell kvarvarande ETH från överföringsverktygskontraktet ### Hur överför jag mitt vestingkontrakt om jag är fullständigt utdelad? @@ -314,13 +314,13 @@ För att överföra ditt vestingkontrakt måste du följa dessa steg: För de som är fullständigt utdelade är processen liknande: -1. Sätt in lite ETH i överföringsverktygskontraktet (UI kan hjälpa till att uppskatta en rimlig summa) +1. Sätt in lite ETH i överföringsverktygskontraktet (UI kan hjälpa till att uppskatta en rimlig summa) -2. Ange din L2-adress med ett anrop till överföringsverktygskontraktet +2. Ange din L2-adress med ett anrop till överföringsverktygskontraktet -3. Skicka din insats/delegering till L2 genom "låsta" överföringsverktygsfunktioner i L1-stake-kontraktet. +3. Skicka din insats/delegering till L2 genom "låsta" överföringsverktygsfunktioner i L1-stake-kontraktet. -4. Ta ut eventuell kvarvarande ETH från överföringsverktygskontraktet +4. Ta ut eventuell kvarvarande ETH från överföringsverktygskontraktet ### Kan jag överföra mitt vestingkontrakt till Arbitrum? @@ -360,17 +360,17 @@ Dessa steg gäller endast om ditt kontrakt fortfarande är utdelat eller om du h För att överföra ditt vestingkontrakt till L2 kommer du att skicka en viss GRT-saldo till L2 med hjälp av överföringsverktygen, vilket kommer att initialisera ditt L2-vestingkontrakt: -1. Sätt in lite ETH i överföringsverktygskontraktet (detta kommer att användas för att betala för L2-gas) +1. Sätt in lite ETH i överföringsverktygskontraktet (detta kommer att användas för att betala för L2-gas) -2. Återkalla protokollåtkomst till vestingkontraktet (nödvändigt för nästa steg) +2. Återkalla protokollåtkomst till vestingkontraktet (nödvändigt för nästa steg) -3. Ge protokollåtkomst till vestingkontraktet (möjliggör för ditt kontrakt att interagera med överföringsverktyget) +3. Ge protokollåtkomst till vestingkontraktet (möjliggör för ditt kontrakt att interagera med överföringsverktyget) -4. Ange en L2-förmånstagareadress\* och initiera saldöverföringen på Ethereum huvudnät +4. Ange en L2-förmånstagareadress\* och initiera saldöverföringen på Ethereum huvudnät -5. Vänta 20 minuter på bekräftelse +5. Vänta 20 minuter på bekräftelse -6. Bekräfta saldöverföringen på L2 +6. Bekräfta saldöverföringen på L2 \*Om det behövs - dvs. du använder en kontraktadress. From 7ed30514ab7f8d449e8f6accbd7ea431391cf300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:26 -0400 Subject: [PATCH 450/924] New translations l2-transfer-tools-faq.mdx (Turkish) --- .../tr/arbitrum/l2-transfer-tools-faq.mdx | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/website/pages/tr/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/tr/arbitrum/l2-transfer-tools-faq.mdx index b6975b53dc78..c960082401d2 100644 --- a/website/pages/tr/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/tr/arbitrum/l2-transfer-tools-faq.mdx @@ -14,7 +14,7 @@ Bu araçlar, Graph içindeki rolünüzün ne olduğuna ve Katman2'ye ne transfer ### Ethereum ana ağında kullandığım aynı cüzdanı kullanabilir miyim? -Eğer bir [EOA](https://ethereum.org/en/developers/docs/accounts/#types-of-account) (Harici Olarak Sahip Olunan Hesap) cüzdanı kullanıyorsanız aynı adresi kullanabilirsiniz. Ethereum ana ağ cüzdanınız bir sözleşme ise (örneğin bir çoklu imza), transferinizin gönderileceği bir [Arbitrum cüzdan adresi] \(/arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the-graph-on-l2) belirtmelisiniz. Yanlış bir adrese yapılan transferler kalıcı kayıplara neden olabileceğinden lütfen adresi dikkatlice kontrol edin. Katman2'de bir çoklu imza cüzdanı kullanmak istiyorsanız, Arbitrum One'da bir çoklu imza sözleşmesi kurduğunuzdan emin olun. +Eğer bir [EOA](https://ethereum.org/en/developers/docs/accounts/#types-of-account) (Harici Olarak Sahip Olunan Hesap) cüzdanı kullanıyorsanız aynı adresi kullanabilirsiniz. Ethereum ana ağ cüzdanınız bir sözleşme ise (örneğin bir çoklu imza), transferinizin gönderileceği bir [Arbitrum cüzdan adresi] (/arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the-graph-on-l2) belirtmelisiniz. Yanlış bir adrese yapılan transferler kalıcı kayıplara neden olabileceğinden lütfen adresi dikkatlice kontrol edin. Katman2'de bir çoklu imza cüzdanı kullanmak istiyorsanız, Arbitrum One'da bir çoklu imza sözleşmesi kurduğunuzdan emin olun. Ethereum ve Arbitrum gibi EVM blok zincirlerindeki cüzdanlar, blok zinciri ile etkileşime girmenize gerek kalmadan oluşturduğunuz bir çift anahtardır (genel ve özel). Dolayısıyla, Ethereum için oluşturulan herhangi bir cüzdan, başka bir işlem yapmanıza gerek kalmadan Arbitrum üzerinde de çalışacaktır. @@ -22,7 +22,7 @@ Bunun istisnası çoklu imza gibi akıllı sözleşme cüzdanlarıdır. Bunlar h ### Transferimi 7 gün içinde tamamlayamazsam ne olur? -L2 Transfer Araçları, Katman1'den Katman2'ye mesaj göndermek için Arbitrum'un yerel mekanizmasını kullanır. Bu mekanizma "yeniden denenebilir bilet" olarak adlandırılır ve Arbitrum GRT köprüsü de dahil olmak üzere tüm yerel token köprüleri tarafından kullanılır. Tekrar denenebilir biletler hakkında daha fazla bilgiyi [Arbitrum dökümantasyonunda] \(https://docs.arbitrum.io/arbos/l1-to-l2-messaging) okuyabilirsiniz. +L2 Transfer Araçları, Katman1'den Katman2'ye mesaj göndermek için Arbitrum'un yerel mekanizmasını kullanır. Bu mekanizma "yeniden denenebilir bilet" olarak adlandırılır ve Arbitrum GRT köprüsü de dahil olmak üzere tüm yerel token köprüleri tarafından kullanılır. Tekrar denenebilir biletler hakkında daha fazla bilgiyi [Arbitrum dökümantasyonunda] (https://docs.arbitrum.io/arbos/l1-to-l2-messaging) okuyabilirsiniz. Varlıklarınızı (subgraph, stake, delegasyon veya kürasyon) Katman2'ye aktardığınızda, Katman2'de yeniden denenebilir bir bilet oluşturan Arbitrum GRT köprüsü aracılığıyla bir mesaj gönderilir. Transfer aracı, işlemde 1) bileti oluşturmak için ödeme yapmak ve 2) bileti Katman2'de yürütmek üzere gas için ödeme yapmak amacıyla kullanılan bir miktar ETH içerir. Ancak, bilet Katman2'de yürütülmeye hazır olana kadar geçen sürede gas fiyatları değişebileceğinden ötürü, bu otomatik yürütme girişiminin başarısız olma ihtimali vardır. Bu durumda, Arbitrum köprüsü yeniden denenebilir bileti 7 güne kadar kullanılabilir tutacaktır ve herkes bileti "kullanmayı" yeniden deneyebilir (bunun için Arbitrum'a köprülenmiş bir miktar ETH'ye sahip bir cüzdan gereklidir). @@ -42,15 +42,15 @@ Katman1 işlem hash'ına sahipseniz (cüzdanınızdaki son işlemlere bakarak bu Subgraph'ınızı transfer etmek için aşağıdaki adımları tamamlamanız gerekecektir: -1. Ethereum ana ağında transferi başlatın +1. Ethereum ana ağında transferi başlatın -2. Onaylanması için 20 dakika bekleyin +2. Onaylanması için 20 dakika bekleyin -3. Arbitrum\* üzerinde subgraph transferini onaylayın +3. Arbitrum\* üzerinde subgraph transferini onaylayın -4. Arbitrum üzerinde subgraph'ı yayınlamayı bitirin +4. Arbitrum üzerinde subgraph'ı yayınlamayı bitirin -5. Sorgu URL'sini Güncelle (önerilir) +5. Sorgu URL'sini Güncelle (önerilir) \*Transferi 7 gün içinde onaylamanız gerektiğini unutmayın, aksi takdirde subgraph'ınız kaybolabilir. Çoğunlukla, bu adım otomatik olarak çalışacaktır, ancak Arbitrum'da gas fiyatlarında bir artış varsa manuel bir onay gerekebilir. Bu süreç sırasında herhangi bir sorun yaşanırsa, yardımcı olacak kaynaklar olacaktır: support@thegraph.com veya [Discord](https://discord.gg/graphprotocol) üzerinden destek ile iletişime geçin. @@ -108,9 +108,9 @@ Arbitrum One'daki gas ücretleri köprülenmiş ETH (yani Arbitrum One'a köprü Delegasyonunuzu transfer etmek için aşağıdaki adımları tamamlamanız gerekecektir: -1. Ethereum ana ağında delegasyon transferi başlatın -2. Onaylanması için 20 dakika bekleyin -3. Arbitrum\* üzerinde delegasyon transferini onaylayın +1. Ethereum ana ağında delegasyon transferi başlatın +2. Onaylanması için 20 dakika bekleyin +3. Arbitrum\* üzerinde delegasyon transferini onaylayın \*\*\*\*Arbitrum üzerinde delegasyon transferini tamamlamak için işlemi onaylamanız gerekir. Bu adım 7 gün içinde tamamlanmalıdır, aksi takdirde delegasyon kaybolabilir. Çoğunlukla, bu adım otomatik olarak çalışacaktır, ancak Arbitrum'da gas fiyatlarında bir artış varsa manuel bir onay gerekebilir. Bu süreç sırasında herhangi bir sorun yaşanırsa, yardımcı olacak kaynaklar olacaktır: support@thegraph.com veya [Discord](https://discord.gg/graphprotocol) üzerinden destek ile iletişime geçin. @@ -198,11 +198,11 @@ Delegeden çıkarılmış statüsünde olan tokenler "kilitli" durumdadır ve bu Kürasyonunuzu transfer etmek için aşağıdaki adımları tamamlamanız gerekecektir: -1. Ethereum ana ağında sinyal transferini başlatın +1. Ethereum ana ağında sinyal transferini başlatın -2. Bir Katman2 Kürasyon adresi belirleyin\* +2. Bir Katman2 Kürasyon adresi belirleyin\* -3. Onaylanması için 20 dakika bekleyin +3. Onaylanması için 20 dakika bekleyin \*Gerekliyse - yani bir sözleşme adresi kullanıyorsanız. @@ -232,11 +232,11 @@ Sinyal ayrıntıları, Katman2 transfer aracı başlatıldıktan yaklaşık 20 d Stake'inizi transfer etmek için aşağıdaki adımları tamamlamanız gerekecektir: -1. Ethereum ana ağında stake transferi başlatın +1. Ethereum ana ağında stake transferi başlatın -2. Onaylanması için 20 dakika bekleyin +2. Onaylanması için 20 dakika bekleyin -3. Arbitrum\* üzerinde stake transferini onaylayın +3. Arbitrum\* üzerinde stake transferini onaylayın \*Transferi 7 gün içinde onaylamanız gerektiğini unutmayın, aksi takdirde stake'iniz kaybolabilir. Çoğunlukla, bu adım otomatik olarak çalışacaktır, ancak Arbitrum'da gas fiyatlarında bir artış varsa manuel bir onay gerekebilir. Bu süreç sırasında herhangi bir sorun yaşanırsa, yardımcı olacak kaynaklar olacaktır: support@thegraph.com veya [Discord](https://discord.gg/graphprotocol) üzerinden destek ile iletişime geçin. @@ -290,23 +290,23 @@ Hayır. Stake'inizin herhangi bir kısmı serbest kalma sürecindeyse, 28 gün b Hak edişinizi transfer etmek için aşağıdaki adımları tamamlamanız gerekecektir: -1. Ethereum ana ağında hak ediş transferi başlatın +1. Ethereum ana ağında hak ediş transferi başlatın -2. Onaylanması için 20 dakika bekleyin +2. Onaylanması için 20 dakika bekleyin -3. Arbitrum\* üzerinde hak ediş transferini onaylayın +3. Arbitrum\* üzerinde hak ediş transferini onaylayın ### Sadece kısmen hak kazanmışsam hak ediş sözleşmemi nasıl transfer edebilirim? -1. Transfer aracı sözleşmesine bir miktar ETH yatırın (kullanıcı arayüzü makul bir miktar tahmin etmenize yardımcı olabilir) +1. Transfer aracı sözleşmesine bir miktar ETH yatırın (kullanıcı arayüzü makul bir miktar tahmin etmenize yardımcı olabilir) -2. Katman2 hak ediş kilidini başlatmak için transfer aracı sözleşmesi aracılığıyla bir miktar kilitli GRT'yi Katman2'ye gönderin. Bu aynı zamanda Katman2 faydalanıcı adresini de belirleyecektir. +2. Katman2 hak ediş kilidini başlatmak için transfer aracı sözleşmesi aracılığıyla bir miktar kilitli GRT'yi Katman2'ye gönderin. Bu aynı zamanda Katman2 faydalanıcı adresini de belirleyecektir. -3. Katman1 Stake etme sözleşmesindeki "kilitli" transfer aracı fonksiyonları aracılığıyla onların stake/delegasyonlarını Katman2'ye gönderin. +3. Katman1 Stake etme sözleşmesindeki "kilitli" transfer aracı fonksiyonları aracılığıyla onların stake/delegasyonlarını Katman2'ye gönderin. -4. Transfer aracı sözleşmesinde kalan ETH'yi geri çekin +4. Transfer aracı sözleşmesinde kalan ETH'yi geri çekin ### Tamamen hak kazanmışsam hak ediş sözleşmemi nasıl transfer edebilirim? @@ -314,13 +314,13 @@ Hak edişinizi transfer etmek için aşağıdaki adımları tamamlamanız gereke Tamamen hak sahibi olanlar için süreç benzerdir: -1. Transfer aracı sözleşmesine bir miktar ETH yatırın (kullanıcı arayüzü makul bir miktar tahmin etmenize yardımcı olabilir) +1. Transfer aracı sözleşmesine bir miktar ETH yatırın (kullanıcı arayüzü makul bir miktar tahmin etmenize yardımcı olabilir) -2. Transfer aracı sözleşmesine bir çağrı yaparak Katman2 adresinizi ayarlayın +2. Transfer aracı sözleşmesine bir çağrı yaparak Katman2 adresinizi ayarlayın -3. Katman1 Stake etme sözleşmesindeki "kilitli" transfer aracı fonksiyonları aracılığıyla stake/delegasyonlarınızı Katman2'ye gönderin. +3. Katman1 Stake etme sözleşmesindeki "kilitli" transfer aracı fonksiyonları aracılığıyla stake/delegasyonlarınızı Katman2'ye gönderin. -4. Transfer aracı sözleşmesinde kalan ETH'yi geri çekin +4. Transfer aracı sözleşmesinde kalan ETH'yi geri çekin ### Hak ediş sözleşmemi Arbitrum'a transfer edebilir miyim? @@ -360,17 +360,17 @@ Bu adımlar yalnızca sözleşmeniz hala devam ediyorsa veya bu süreci daha ön Hak ediş sözleşmenizi Katman2'ye transfer etmek için, Katman2 hak ediş sözleşmenizi başlatacak olan transfer araçlarını kullanarak herhangi bir GRT bakiyesini Katman2'ye göndereceksiniz: -1. Transfer aracı sözleşmesine bir miktar ETH yatırın (bu Katman2 gas'ını ödemek için kullanılacaktır) +1. Transfer aracı sözleşmesine bir miktar ETH yatırın (bu Katman2 gas'ını ödemek için kullanılacaktır) -2. Hak ediş sözleşmesine protokol erişimini kaldırın (bir sonraki adım için gereklidir) +2. Hak ediş sözleşmesine protokol erişimini kaldırın (bir sonraki adım için gereklidir) -3. Hak ediş sözleşmesine protokol erişimi verin (sözleşmenizin transfer aracıyla etkileşime girmesini sağlayacaktır) +3. Hak ediş sözleşmesine protokol erişimi verin (sözleşmenizin transfer aracıyla etkileşime girmesini sağlayacaktır) -4. Bir Katman2 faydalanıcı adresi\* belirleyin ve Ethereum ana ağında bakiye transferini başlatın +4. Bir Katman2 faydalanıcı adresi\* belirleyin ve Ethereum ana ağında bakiye transferini başlatın -5. Onaylanması için 20 dakika bekleyin +5. Onaylanması için 20 dakika bekleyin -6. Katman2'de bakiye transferini onaylayın +6. Katman2'de bakiye transferini onaylayın \*Gerekliyse - yani bir sözleşme adresi kullanıyorsanız. From 2e601d796cd5c66b98a806ff910ff8ca63d63bd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:27 -0400 Subject: [PATCH 451/924] New translations l2-transfer-tools-faq.mdx (Ukrainian) --- .../uk/arbitrum/l2-transfer-tools-faq.mdx | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/uk/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/uk/arbitrum/l2-transfer-tools-faq.mdx index 43f96152931a..b075b7548fb8 100644 --- a/website/pages/uk/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/uk/arbitrum/l2-transfer-tools-faq.mdx @@ -42,15 +42,15 @@ If you have the L1 transaction hash (which you can find by looking at the recent To transfer your subgraph, you will need to complete the following steps: -1. Initiate the transfer on Ethereum mainnet +1. Initiate the transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation +2. Wait 20 minutes for confirmation -3. Confirm subgraph transfer on Arbitrum\* +3. Confirm subgraph transfer on Arbitrum\* -4. Finish publishing subgraph on Arbitrum +4. Finish publishing subgraph on Arbitrum -5. Update Query URL (recommended) +5. Update Query URL (recommended) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ Gas fees on Arbitrum One are paid using bridged ETH (i.e. ETH that has been brid To transfer your delegation, you will need to complete the following steps: -1. Initiate delegation transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation -3. Confirm delegation transfer on Arbitrum +1. Initiate delegation transfer on Ethereum mainnet +2. Wait 20 minutes for confirmation +3. Confirm delegation transfer on Arbitrum \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans To transfer your curation, you will need to complete the following steps: -1. Initiate signal transfer on Ethereum mainnet +1. Initiate signal transfer on Ethereum mainnet -2. Specify an L2 Curator address\* +2. Specify an L2 Curator address\* -3. Wait 20 minutes for confirmation +3. Wait 20 minutes for confirmation \*If necessary - i.e. you are using a contract address. @@ -232,11 +232,11 @@ There is no bulk transfer option at this time. To transfer your stake, you will need to complete the following steps: -1. Initiate stake transfer on Ethereum mainnet +1. Initiate stake transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation +2. Wait 20 minutes for confirmation -3. Confirm stake transfer on Arbitrum +3. Confirm stake transfer on Arbitrum \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Yes! The process is a bit different, because vesting contracts can't forward the To transfer your vesting, you will need to complete the following steps: -1. Initiate the vesting transfer on Ethereum mainnet +1. Initiate the vesting transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation +2. Wait 20 minutes for confirmation -3. Confirm vesting transfer on Arbitrum +3. Confirm vesting transfer on Arbitrum ### How do I transfer my vesting contract if I am only partially vested? -1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) +1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) -2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. +2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. -3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. +3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. -4. Withdraw any remaining ETH from the transfer tool contract +4. Withdraw any remaining ETH from the transfer tool contract ### How do I transfer my vesting contract if I am fully vested? @@ -314,13 +314,13 @@ To transfer your vesting, you will need to complete the following steps: For those that are fully vested, the process is similar: -1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) +1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) -2. Set your L2 address with a call to the transfer tool contract +2. Set your L2 address with a call to the transfer tool contract -3. Send your stake/delegation to L2 through the "locked" transfer tool functions in the L1 Staking contract. +3. Send your stake/delegation to L2 through the "locked" transfer tool functions in the L1 Staking contract. -4. Withdraw any remaining ETH from the transfer tool contract +4. Withdraw any remaining ETH from the transfer tool contract ### Can I transfer my vesting contract to Arbitrum? @@ -360,17 +360,17 @@ These steps only apply if your contract is still vesting, or if you've used this To transfer your vesting contract to L2, you will send any GRT balance to L2 using the transfer tools, which will initialize your L2 vesting contract: -1. Deposit some ETH into the transfer tool contract (this will be used to pay for L2 gas) +1. Deposit some ETH into the transfer tool contract (this will be used to pay for L2 gas) -2. Revoke protocol access to the vesting contract (needed for the next step) +2. Revoke protocol access to the vesting contract (needed for the next step) -3. Give protocol access to the vesting contract (will allow your contract to interact with the transfer tool) +3. Give protocol access to the vesting contract (will allow your contract to interact with the transfer tool) -4. Specify an L2 beneficiary address\* and initiate the balance transfer on Ethereum mainnet +4. Specify an L2 beneficiary address\* and initiate the balance transfer on Ethereum mainnet -5. Wait 20 minutes for confirmation +5. Wait 20 minutes for confirmation -6. Confirm the balance transfer on L2 +6. Confirm the balance transfer on L2 \*If necessary - i.e. you are using a contract address. From 94f4c866d1cbfceb2aa9c9c068b3a9e277eb476b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:28 -0400 Subject: [PATCH 452/924] New translations l2-transfer-tools-faq.mdx (Chinese Simplified) --- .../zh/arbitrum/l2-transfer-tools-faq.mdx | 160 +++++++++--------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/website/pages/zh/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/zh/arbitrum/l2-transfer-tools-faq.mdx index 2d71141c48e8..86bc85f54653 100644 --- a/website/pages/zh/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/zh/arbitrum/l2-transfer-tools-faq.mdx @@ -6,19 +6,19 @@ title: L2转移工具常见问题解答 ### 什么是L2转移工具? -The Graph has made it 26x cheaper for contributors to participate in the network by deploying the protocol to Arbitrum One. The L2 Transfer Tools were created by core devs to make it easy to move to L2. +The Graph 在将协议部署到 Arbitrum One 后,使参与者参与网络的成本降低了 26 倍。L2 转账工具是核心开发人员创建的,旨在简化转移到 Layer 2(二层网络)的过程。 -For each network participant, a set of L2 Transfer Tools are available to make the experience seamless when moving to L2, avoiding thawing periods or having to manually withdraw and bridge GRT. +对于每个网络参与者,都提供了一套L2转账工具,以实现无缝的L2转移体验,避免解冻期或手动提取和桥接GRT代币。 -These tools will require you to follow a specific set of steps depending on what your role is within The Graph and what you are transferring to L2. +这些工具将要求您根据您在 The Graph 中的角色以及您要转移到 Layer 2 的内容,遵循一套特定的步骤。 ### 我可以在以太坊主网上使用相同的钱包吗? 如果您使用的是 [EOA](https://ethereum.org/en/developers/docs/accounts/#types-of-account)钱包,则可以使用相同的地址。如果您在以太坊主网上的钱包是智能合约钱包(例如多签钱包),那么您必须指定一个Arbitrum钱包地址,用于接收您的转账。请仔细检查地址,因为发送到错误地址的任何转账都可能导致永久丢失。如果您希望在L2上使用多签钱包,请确保在Arbitrum One上部署一个多签合约。 -Wallets on EVM blockchains like Ethereum and Arbitrum are a pair of keys (public and private), that you create without any need to interact with the blockchain. So any wallet that was created for Ethereum will also work on Arbitrum without having to do anything else. +在像以太坊和 Arbitrum 这样的 EVM 区块链上,钱包是一对密钥(公钥和私钥),您可以在不需要与区块链进行任何交互的情况下创建。因此,任何在以太坊上创建的钱包也将在 Arbitrum 上运作,而无需采取其他任何行动。 -The exception is with smart contract wallets like multisigs: these are smart contracts that are deployed separately on each chain, and get their address when they are deployed. If a multisig was deployed to Ethereum, it won't exist with the same address on Arbitrum. A new multisig must be created first on Arbitrum, and may get a different address. +唯一的例外是智能合约钱包,比如多重签名钱包:这些是分别在每条链上部署的智能合约,并在部署时获得它们的地址。如果一个多重签名钱包部署在以太坊上,在 Arbitrum 上不会以相同的地址存在。首先必须在 Arbitrum 上创建一个新的多重签名钱包,而且可能会获得一个不同的地址。 ### 如果我没有在 7 天内完成转账,会发生什么情况? @@ -28,11 +28,11 @@ L2 传输工具使用 Arbitrum 的原生机制将信息从 L1 发送至 L2。这 这就是我们在所有传输工具中所说的 "确认 "步骤--在大多数情况下,它会自动运行,因为自动执行通常都会成功,但重要的是,您要回过头来检查,以确保它成功了。如果没有成功,并且在 7 天内没有成功的重试,Arbitrum 桥接器将丢弃该票据,您的资产(子图、股权、委托或管理)将丢失且无法恢复。The Graph核心开发人员有一个监控系统来检测这些情况,并尝试在为时已晚之前赎回门票,但确保您的转让及时完成最终还是您的责任。如果您在确认交易时遇到困难,请使用[此表单](https://noteforms.com/forms/notionform-l2-transfer-tooling-issues-0ogqfu?notionforms=1&utm_source=notionforms)联系我们,核心开发人员将为您提供帮助。 -### I started my delegation/stake/curation transfer and I'm not sure if it made it through to L2, how can I confirm that it was transferred correctly? +### 我开始了我的委托/质押/策展转移,但不确定是否成功转移到了 Layer 2(L2),我如何确认转移是否正确进行了? -If you don't see a banner on your profile asking you to finish the transfer, then it's likely the transaction made it safely to L2 and no more action is needed. If in doubt, you can check if Explorer shows your delegation, stake or curation on Arbitrum One. +如果您在个人资料中没有看到要求完成转移的横幅,那么很可能交易已经安全地转移到了 Layer 2(L2),无需采取更多操作。如果仍有疑问,您可以检查资源浏览器(Explorer),查看您在 Arbitrum One 上的委托、质押或筛选情况。 -If you have the L1 transaction hash (which you can find by looking at the recent transactions in your wallet), you can also confirm if the "retryable ticket" that carried the message to L2 was redeemed here: https://retryable-dashboard.arbitrum.io/ - if the auto-redeem failed, you can also connect your wallet there and redeem it. Rest assured that core devs are also monitoring for messages that get stuck, and will attempt to redeem them before they expire. +如果您有 L1 交易哈希(您可以在钱包的最近交易记录中找到),您也可以确认“可重试票据”是否已在此处兑现传递到 L2 的信息:https://retryable-dashboard.arbitrum.io/ - 如果自动兑现失败,您也可以在那里连接您的钱包并兑现它。请放心,核心开发人员也在监控因某些原因被卡住的信息,并会在其到期前尝试兑现它们。 ## 子图转移 @@ -42,17 +42,17 @@ If you have the L1 transaction hash (which you can find by looking at the recent 要转移您的子图,您需要完成以下步骤: -1. 在以太坊主网上启动转移过程 +1. 在以太坊主网上启动转移过程 -2. 等待20分钟进行确认 +2. 等待20分钟进行确认 -3. 在Arbitrum上确认子图转移\* +3. 在Arbitrum上确认子图转移\* -4. 在Arbitrum上完成子图发布 +4. 在Arbitrum上完成子图发布 -5. 更新查询URL(推荐) +5. 更新查询URL(推荐) -\*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). +\*请注意,您必须在7天内确认转移,否则您的子图可能会丢失。在大多数情况下,此步骤将自动运行,但如果Arbitrum的燃气价格飙升,则可能需要手动确认。如果在此过程中遇到任何问题,我们将提供帮助:请通过support@thegraph.com或[Discord](https://discord.gg/graphprotocol)与我们联系。 ### 我应该从哪里发起转移? @@ -78,13 +78,13 @@ If you have the L1 transaction hash (which you can find by looking at the recent 在20分钟的转移窗口之后,您需要通过UI中的交易确认来完成转移,但转移工具将指导您完成此过程。在转移窗口和宽限期期间,您的L1端点将继续受到支持。鼓励您在方便的时候更新您的端点。 -### Will my endpoint experience downtime while re-publishing? +### 重新发布期间,您的端点会经历停机时间吗? -It is unlikely, but possible to experience a brief downtime depending on which Indexers are supporting the subgraph on L1 and whether they keep indexing it until the subgraph is fully supported on L2. +这是不太可能的,但取决于在 L1 上支持子图的索引人以及他们是否一直进行索引直到子图在 L2 上完全受支持,可能会经历短暂的停机时间。 ### L2上的发布和版本控制与以太坊主网上相同吗? -Yes. Select Arbitrum One as your published network when publishing in Subgraph Studio. In the Studio, the latest endpoint will be available which points to the latest updated version of the subgraph. +是的。请确保在Subgraph Studio中选择Arbitrum One作为您的发布网络。在Studio中,将提供最新的端点,指向子图的最新更新版本。 ### 我的子图的策展是否会随着子图一起转移? @@ -108,15 +108,15 @@ Yes. Select Arbitrum One as your published network when publishing in Subgraph S 要转移你的委托,你需要完成以下步骤: -1. 在以太坊主网上启动委托转移 -2. 等待20分钟进行确认 -3. 在Arbitrum上确认委托转移 +1. 在以太坊主网上启动委托转移 +2. 等待20分钟进行确认 +3. 在Arbitrum上确认委托转移 -\*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). +\*\*\*\*请注意,您必须在7天内确认转移,否则您的子图可能会丢失。在大多数情况下,此步骤将自动运行,但如果Arbitrum的燃气价格飙升,则可能需要手动确认。如果在此过程中遇到任何问题,我们将提供帮助:请通过support@thegraph.com或[Discord](https://discord.gg/graphprotocol)与我们联系。 ### 如果我在以太坊主网上有未完成的分配,我的奖励会怎样? -If the Indexer to whom you're delegating is still operating on L1, when you transfer to Arbitrum you will forfeit any delegation rewards from open allocations on Ethereum mainnet. This means that you will lose the rewards from, at most, the last 28-day period. If you time the transfer right after the Indexer has closed allocations you can make sure this is the least amount possible. If you have a communication channel with your Indexer(s), consider discussing with them to find the best time to do your transfer. +如果你将委托转移到 Arbitrum 时,你将放弃来自以太坊主网上的未完成分配的委托奖励。这意味着你将失去最多最近28天的奖励。如果你在索引人关闭分配后的合适时间转移,你可以确保损失的奖励最少。如果你与你的索引人保持沟通,可以考虑与他们讨论以找到最佳转移时间。 ### 如果我当前委托的索引人不在 Arbitrum One 上怎么办? @@ -124,7 +124,7 @@ If the Indexer to whom you're delegating is still operating on L1, when you tran ### 委托人是否可以选择委托给其他索引人? -If you wish to delegate to another Indexer, you can transfer to the same Indexer on Arbitrum, then undelegate and wait for the thawing period. After this, you can select another active Indexer to delegate to. +如果您希望将委派权转移给另一个索引人,您可以将其转移到 Arbitrum 上的同一索引人,然后取消委派并等待解冻期。在此之后,您可以选择另一个活跃的索引人进行委派。 ### 如果我在 L2 上找不到要委派的索引人怎么办? @@ -144,53 +144,53 @@ L2 转移工具将始终将您的委托转移到您先前委托的同一索引 ### 完成委托转移到 L2 需要多长时间? -A 20-minute confirmation is required for delegation transfer. Please note that after the 20-minute period, you must come back and complete step 3 of the transfer process within 7 days. If you fail to do this, then your delegation may be lost. Note that in most cases the transfer tool will complete this step for you automatically. In case of a failed auto-attempt, you will need to complete it manually. If any issues arise during this process, don't worry, we'll be here to help: contact us at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). +委托转移需要 20 分钟的确认时间。请注意,在 20 分钟的时间结束后,您必须返回并在 7 天内完成转移过程的第三步。如果未能这样做,您的委托可能会丢失。大多数情况下,转移工具将自动完成此步骤。如果自动尝试失败,您将需要手动完成。如果在此过程中遇到任何问题,不要担心,我们会在这里提供帮助:通过电子邮件 (support email address) 或 [Discord](https://discord.gg/vtvv7FP)上的 (channel) 渠道与我们联系。 ### 如果我使用的是 GRT 质押合约/代币锁定钱包,我可以转移委托吗? 可以!由于解锁合约(vesting contracts)无法转发用于支付 L2 交易费用的 ETH,所以流程略有不同,你需要事先存入所需的 ETH。如果你的解锁合约尚未完全解锁,你还需要在 L2 上先初始化一个对应的解锁合约,并且只能将质押转移到此 L2 解锁合约。Explorer 上的用户界面可以指导你在使用解锁钱包(vesting lock wallet)连接到 Explorer 时完成这个过程。 -### Does my Arbitrum vesting contract allow releasing GRT just like on mainnet? +### 您的 Arbitrum 解锁合约是否允许像在主网上一样释放 GRT 呢? -No, the vesting contract that is created on Arbitrum will not allow releasing any GRT until the end of the vesting timeline, i.e. until your contract is fully vested. This is to prevent double spending, as otherwise it would be possible to release the same amounts on both layers. +不,Arbitrum 上创建的解锁合约不会允许释放任何 GRT,直到到达解锁时间轴的结束,也就是直到您的合约完全解锁。这是为了防止双重支出,否则同样的金额可以在两个层级上释放。 -If you'd like to release GRT from the vesting contract, you can transfer them back to the L1 vesting contract using Explorer: in your Arbitrum One profile, you will see a banner saying you can transfer GRT back to the mainnet vesting contract. This requires a transaction on Arbitrum One, waiting 7 days, and a final transaction on mainnet, as it uses the same native bridging mechanism from the GRT bridge. +如果您想要从解锁合约中释放 GRT,您可以使用资源管理器将其转移回 L1 的解锁合约:在您的 Arbitrum One 个人资料中,您会看到一个横幅,指示您可以将 GRT 转移回主网的解锁合约。这需要在 Arbitrum One 上进行一笔交易,等待 7 天,并在主网上进行最终交易,因为它使用了来自 GRT 跨链桥的相同本地桥接机制。 ### 是否需要支付任何委托税? 不需要。在 L2 上收到的代币将以指定的委托人名义委托给指定的索引人,而无需收取委托税。 -### Will my unrealized rewards be transferred when I transfer my delegation? +### 当我转移我的委托时,我的未实现奖励会被一起转移吗? -​Yes! The only rewards that can't be transferred are the ones for open allocations, as those won't exist until the Indexer closes the allocations (usually every 28 days). If you've been delegating for a while, this is likely only a small fraction of rewards. +是的!唯一无法转移的奖励是针对未结束的分配的奖励,因为这些奖励直到索引人关闭分配(通常每 28 天一次)后才会存在。如果您已经进行了一段时间的委托,这可能只是奖励的一小部分。 -At the smart contract level, unrealized rewards are already part of your delegation balance, so they will be transferred when you transfer your delegation to L2. ​ +在智能合约层面,未实现的奖励已经计入了您的委托余额,因此当您将委托转移到 L2 时,这些奖励将会一并转移。 -### Is moving delegations to L2 mandatory? Is there a deadline? +### 将委托转移到 L2 是否是强制性的?有截止日期吗? -​Moving delegation to L2 is not mandatory, but indexing rewards are increasing on L2 following the timeline described in [GIP-0052](https://forum.thegraph.com/t/gip-0052-timeline-and-requirements-to-increase-rewards-in-l2/4193). Eventually, if the Council keeps approving the increases, all rewards will be distributed in L2 and there will be no indexing rewards for Indexers and Delegators on L1. ​ +将委托转移到 L2 并非强制性的,但根据 [GIP-0052](https://forum.thegraph.com/t/gip-0052-timeline-and-requirements-to-increase-rewards-in-l2/4193),L2 上的索引奖励会逐步增加。最终,如果委员会继续批准这些增加,所有奖励将在 L2 上分发,而在 L1 上将不再有索引奖励供索引人和委托人获取。 -### If I am delegating to an Indexer that has already transferred stake to L2, do I stop receiving rewards on L1? +### 如果我正在委托给已经将质押转移到 L2 的索引人,那么我是否在 L1 上停止接收奖励? -​Many Indexers are transferring stake gradually so Indexers on L1 will still be earning rewards and fees on L1, which are then shared with Delegators. Once an Indexer has transferred all of their stake, then they will stop operating on L1, so Delegators will not receive any more rewards unless they transfer to L2. +许多索引人正在逐步转移质押,因此在 L1 上的索引人仍将在 L1 上赚取奖励和费用,然后与委托人分享。一旦索引人全部转移了他们的质押,那么他们将停止在 L1 上运行,因此委托人将不再收到任何奖励,除非他们转移到 L2。 -Eventually, if the Council keeps approving the indexing rewards increases in L2, all rewards will be distributed on L2 and there will be no indexing rewards for Indexers and Delegators on L1. ​ +最终,如果委员会继续批准在 L2 上增加索引奖励,所有奖励将在 L2 上分发,而在 L1 上将不再有索引人和委托人的索引奖励。 -### I don't see a button to transfer my delegation. Why is that? +### 我看不到转移我的委托的按钮。为什么会这样? -​Your Indexer has probably not used the L2 transfer tools to transfer stake yet. +很可能是您的索引人尚未使用 L2 转移工具来转移质押。 -If you can contact the Indexer, you can encourage them to use the L2 Transfer Tools so that Delegators can transfer delegations to their L2 Indexer address. ​ +如果您可以联系索引人,可以鼓励他们使用 L2 转移工具,以便委托人可以将委托转移到他们在 L2 上的索引人地址。 -### My Indexer is also on Arbitrum, but I don't see a button to transfer the delegation in my profile. Why is that? +### 我的索引人也在Arbitrum上,但我在个人资料中没有看到转移委托的按钮。为什么会这样呢? -​It is possible that the Indexer has set up operations on L2, but hasn't used the L2 transfer tools to transfer stake. The L1 smart contracts will therefore not know about the Indexer's L2 address. If you can contact the Indexer, you can encourage them to use the transfer tool so that Delegators can transfer delegations to their L2 Indexer address. ​ +可能是索引人在二层网络(L2)设置了操作,但尚未使用L2转账工具来转移质押。因此,一层网络(L1)的智能合约将不知晓索引人的L2地址。如果您可以联系到索引人,可以鼓励他们使用转账工具,以便委托人能够将委托转移到他们的L2索引人地址。 -### Can I transfer my delegation to L2 if I have started the undelegating process and haven't withdrawn it yet? +### 如果我已经开始取消委托流程但尚未撤回委托,我能将我的委托转移到二层吗? -​No. If your delegation is thawing, you have to wait the 28 days and withdraw it. +不可以。如果您的委托正在解冻,您必须等待 28 天并撤回委托。 -The tokens that are being undelegated are "locked" and therefore cannot be transferred to L2. +正在取消委托的代币是“锁定”的,因此无法转移到二层。 ## 策展信号 @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans 要转移您的策展信号,您需要完成以下步骤: -1. 在以太坊主网上启动信号转移 +1. 在以太坊主网上启动信号转移 -2. 指定L2策展者地址\* +2. 指定L2策展者地址\* -3. 等待20分钟进行确认 +3. 等待20分钟进行确认 \*如果需要-即您正在使用合约地址。 @@ -232,13 +232,13 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans 要转移您的质押,您需要完成以下步骤: -1. 在以太坊主网上启动转移过程 +1. 在以太坊主网上启动转移过程 -2. 等待20分钟进行确认 +2. 等待20分钟进行确认 -3. 在Arbitrum上确认质押转移 +3. 在Arbitrum上确认质押转移 -\*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). +\*请注意,您必须在7天内确认转移,否则您的子图可能会丢失。在大多数情况下,此步骤将自动运行,但如果Arbitrum的燃气价格飙升,则可能需要手动确认。如果在此过程中遇到任何问题,我们将提供帮助:请通过support@thegraph.com或[Discord](https://discord.gg/graphprotocol)与我们联系。 ### 我所有的质押都会转移吗 @@ -276,13 +276,13 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans 可以!由于解锁合约(vesting contracts)无法转发用于支付 L2 交易费用的 ETH,所以流程略有不同,你需要事先存入所需的 ETH。如果你的解锁合约尚未完全解锁,你还需要在 L2 上先初始化一个对应的解锁合约,并且只能将质押转移到此 L2 解锁合约。Explorer 上的用户界面可以指导你在使用解锁钱包(vesting lock wallet)连接到 Explorer 时完成这个过程。 -### I already have stake on L2. Do I still need to send 100k GRT when I use the transfer tools the first time? +### 我已经在L2有质押。当我第一次使用转移工具时,是否仍需要发送 100,000 GRT? -​Yes. The L1 smart contracts will not be aware of your L2 stake, so they will require you to transfer at least 100k GRT when you transfer for the first time. ​ +是的。L1的智能合约不会知晓你在L2的质押,因此当你第一次转移时,它们会要求你至少转移 100,000 GRT。 -### Can I transfer my stake to L2 if I am in the process of unstaking GRT? +### 如果我正在取消质押 GRT,是否可以同时将我的质押转移到L2? -​No. If any fraction of your stake is thawing, you have to wait the 28 days and withdraw it before you can transfer stake. The tokens that are being staked are "locked" and will prevent any transfers or stake to L2. +不行。如果您的任何一部分质押正在解冻,您必须等待 28 天并在转移质押之前将其撤回。正在质押的代币是“锁定”的,会阻止任何转移或质押到L2。 ## 解锁合约转移 @@ -290,23 +290,23 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans 要转移您的解锁合约,您需要完成以下步骤: -1. 在以太坊主网上发起解锁合约转移 +1. 在以太坊主网上发起解锁合约转移 -2. 等待20分钟进行确认 +2. 等待20分钟进行确认 -3. 在 Arbitrum 上确认解锁合约转移 +3. 在 Arbitrum 上确认解锁合约转移 ### 如果我只有部分解锁完成,如何转移我的解锁合约? -1. 向转移工具合约存入一些以太币(用户界面可以帮助估算合理的金额) +1. 向转移工具合约存入一些以太币(用户界面可以帮助估算合理的金额) -2. 通过转移工具合约将一些被锁定的 GRT 发送到 L2,以初始化 L2 解锁合约。这也将设置它们的 L2 受益人地址。 +2. 通过转移工具合约将一些被锁定的 GRT 发送到 L2,以初始化 L2 解锁合约。这也将设置它们的 L2 受益人地址。 -3. 通过 L1Staking 合约中的“locked”转移工具函数将质押/委托转移到 L2。 +3. 通过 L1Staking 合约中的“locked”转移工具函数将质押/委托转移到 L2。 -4. 从转移工具合约中提取剩余的以太币 +4. 从转移工具合约中提取剩余的以太币 ### 如果我的份额已经全部解锁,如何转移我的解锁合约? @@ -314,13 +314,13 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans 对于已完全完成解锁的用户,流程类似: -1. 向转移工具合约存入一些以太币(用户界面可以帮助估算合理的金额) +1. 向转移工具合约存入一些以太币(用户界面可以帮助估算合理的金额) -2. 通过调用转移工具合约设置您的 L2 地址 +2. 通过调用转移工具合约设置您的 L2 地址 -3. 通过 L1Staking 合约中的“locked”转移工具函数将质押/委托转移到 L2。 +3. 通过 L1Staking 合约中的“locked”转移工具函数将质押/委托转移到 L2。 -4. 从转移工具合约中提取剩余的以太币 +4. 从转移工具合约中提取剩余的以太币 ### 我可以将我的解锁合约转移到 Arbitrum 吗? @@ -360,39 +360,39 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans 要将解锁合约转移到 L2,您将使用转移工具将任何 GRT 余额发送到 L2,该工具将初始化您的 L2 解锁合约: -1. 向转移工具合约存入一些以太币(用于支付 L2 gas) +1. 向转移工具合约存入一些以太币(用于支付 L2 gas) -2. 撤销对解锁合约的协议访问权限(需要进行下一步) +2. 撤销对解锁合约的协议访问权限(需要进行下一步) -3. 授予解锁合约协议访问权限(将允许您的合约与转移工具进行交互) +3. 授予解锁合约协议访问权限(将允许您的合约与转移工具进行交互) -4. 指定 L2 受益人地址\*,并在以太坊主网上发起余额转移 +4. 指定 L2 受益人地址\*,并在以太坊主网上发起余额转移 -5. 等待20分钟进行确认 +5. 等待20分钟进行确认 -6. 在 L2 上确认余额转移 +6. 在 L2 上确认余额转移 \*如果需要-即您正在使用合约地址。 \*\*\*\*请注意,您必须在7天内确认转移,否则您的子图可能会丢失。在大多数情况下,此步骤将自动运行,但如果Arbitrum的燃气价格飙升,则可能需要手动确认。如果在此过程中遇到任何问题,我们将提供帮助:请通过support@thegraph.com或[Discord](https://discord.gg/graphprotocol)与我们联系。 -### My vesting contract shows 0 GRT so I cannot transfer it, why is this and how do I fix it? +### 我的解锁合约显示为 0 GRT,因此无法进行转移,请问是什么原因,以及如何解决? -​To initialize your L2 vesting contract, you need to transfer a nonzero amount of GRT to L2. This is required by the Arbitrum GRT bridge that is used by the L2 Transfer Tools. The GRT must come from the vesting contract's balance, so it does not include staked or delegated GRT. +为了初始化您的 L2 解锁合约,您需要将非零数量的 GRT 转移到 L2。这是由 L2 转移工具使用的 Arbitrum GRT 桥所要求的。GRT 必须来自解锁合约的余额,因此不包括质押或委托的 GRT。 -If you've staked or delegated all your GRT from the vesting contract, you can manually send a small amount like 1 GRT to the vesting contract address from anywhere else (e.g. from another wallet, or an exchange). ​ +如果您已经从解锁合约中质押或委托了所有的 GRT,您可以手动从其他地方(例如另一个钱包或交易所)向解锁合约地址发送小额资金,比如 1 GRT。 -### I am using a vesting contract to stake or delegate, but I don't see a button to transfer my stake or delegation to L2, what do I do? +### 我正在使用解锁合约进行质押或委托,但我没有看到将我的质押或委托转移到L2的按钮,我该怎么办? -​If your vesting contract hasn't finished vesting, you need to first create an L2 vesting contract that will receive your stake or delegation on L2. This vesting contract will not allow releasing tokens in L2 until the end of the vesting timeline, but will allow you to transfer GRT back to the L1 vesting contract to be released there. +如果您的解锁合约尚未完成解锁,您需要首先创建一个 L2 解锁合约,用于在二层接收您的质押或委托。该解锁合约在二层不允许在解锁时间段结束之前释放代币,但允许您将 GRT 转移回 L1 解锁合约以在那里释放。 -When connected with the vesting contract on Explorer, you should see a button to initialize your L2 vesting contract. Follow that process first, and you will then see the buttons to transfer your stake or delegation in your profile. ​ +当在资源管理平台(Explorer)中连接到解锁合约时,您应该会看到初始化您的 L2 解锁合约的按钮。首先按照该流程操作,然后您就能在个人资料中看到转移您的质押或委托的按钮。 -### If I initialize my L2 vesting contract, will this also transfer my delegation to L2 automatically? +### 初始化我的 L2 解锁合约会自动将我的委托转移到 L2 吗? -​No, initializing your L2 vesting contract is a prerequisite for transferring stake or delegation from the vesting contract, but you still need to transfer these separately. +不,初始化您的 L2 解锁合约是从解锁合约转移质押或委托的先决条件,但您仍需要分别进行这些转移。 -You will see a banner on your profile prompting you to transfer your stake or delegation after you have initialized your L2 vesting contract. +在您初始化了 L2 解锁合约后,您会在个人资料上看到一个提示横幅,指示您转移您的质押或委托。 ### 我可以将我的解锁合约转移到 L1 吗? From e534b117dc56eea5af27772cbf110f21ac4d540b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:29 -0400 Subject: [PATCH 453/924] New translations l2-transfer-tools-faq.mdx (Urdu (Pakistan)) --- .../ur/arbitrum/l2-transfer-tools-faq.mdx | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/ur/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/ur/arbitrum/l2-transfer-tools-faq.mdx index eb1a3cd20a2c..187e52042c74 100644 --- a/website/pages/ur/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/ur/arbitrum/l2-transfer-tools-faq.mdx @@ -43,15 +43,15 @@ L2 ٹرانسفر ٹول L1 کو پیغامات بھیجنے کے لیے Arbitru اپنے سب گراف کو منتقل کرنے کے لیے، آپ کو درج ذیل مراحل کو مکمل کرنے کی ضرورت ہو گی: -1. ایتھیریم مین نیٹ پر منتقلی شروع کریں +1. ایتھیریم مین نیٹ پر منتقلی شروع کریں -2. تصدیق کے لیے 20 منٹ انتظار کریں +2. تصدیق کے لیے 20 منٹ انتظار کریں -3. Arbitrum پر سب گراف منتقلی کی تصدیق کریں\* +3. Arbitrum پر سب گراف منتقلی کی تصدیق کریں\* -4. Arbitrum پر سب گراف کی اشاعت مکمل کریں +4. Arbitrum پر سب گراف کی اشاعت مکمل کریں -5. کیوری لنک اپ ڈیٹ کریں (تجویز کردہ) +5. کیوری لنک اپ ڈیٹ کریں (تجویز کردہ) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -109,9 +109,9 @@ Arbitrum One پر گیس فیس بریجڈ ایتھیریم (یعنی ایتھی اپنی ڈیلیگیشن منتقل کرنے کے لیے، آپ کو درج ذیل مراحل کو مکمل کرنے کی ضرورت ہو گی: -1. ایتھیریم مین نیٹ پر ڈیلیگیشن کی منتقلی شروع کریں -2. تصدیق کے لیے 20 منٹ انتظار کریں -3. Arbitrum پر ڈیلیگیشن کی منتقلی کی تصدیق کریں +1. ایتھیریم مین نیٹ پر ڈیلیگیشن کی منتقلی شروع کریں +2. تصدیق کے لیے 20 منٹ انتظار کریں +3. Arbitrum پر ڈیلیگیشن کی منتقلی کی تصدیق کریں \*\*\*\* Arbitrum پر ڈیلیگیشن کی منتقلی کو مکمل کرنے کے لیے آپ کو ٹرانزیکشن کی تصدیق کرنی ہوگی۔ یہ مرحلہ 7 دنوں کے اندر مکمل ہونا چاہیے ورنہ ڈیلیگیشن ضائع ہو سکتا ہے۔ زیادہ تر معاملات میں، یہ مرحلہ خود بخود چلے گا، لیکن اگر Arbitrum پر گیس کی قیمت میں اضافہ ہوتا ہے تو دستی تصدیق کی ضرورت ہو سکتی ہے۔ اگر اس عمل کے دوران کوئی مسئلہ درپیش ہے، تو مدد کے لیے وسائل موجود ہوں گے: support@thegraph.com پر یا [ڈسکورڈ](https://discord.gg/graphprotocol) پر سپورٹ سے رابطہ کریں۔. @@ -199,11 +199,11 @@ If you'd like to release GRT from the vesting contract, you can transfer them ba اپنی کیوریشن منتقل کرنے کے لیے، آپ کو درج ذیل مراحل کو مکمل کرنے کی ضرورت ہو گی: -1. ایتھیریم مین نیٹ پر سگنل کی منتقلی شروع کریں +1. ایتھیریم مین نیٹ پر سگنل کی منتقلی شروع کریں -2. L2 کیوریٹر ایڈریس کی وضاحت کریں\* +2. L2 کیوریٹر ایڈریس کی وضاحت کریں\* -3. تصدیق کے لیے 20 منٹ انتظار کریں +3. تصدیق کے لیے 20 منٹ انتظار کریں \*اگر ضروری ہو تو - یعنی آپ کنٹریکٹ ایڈریس استعمال کر رہے ہیں. @@ -233,11 +233,11 @@ L2 ٹرانسفر ٹول شروع ہونے کے تقریباً 20 منٹ بعد اپنا سٹیک منتقل کرنے کے لیے، آپ کو درج ذیل مراحل کو مکمل کرنے کی ضرورت ہو گی: -1. ایتھیریم مین نیٹ پر سٹیک کی منتقلی شروع کریں +1. ایتھیریم مین نیٹ پر سٹیک کی منتقلی شروع کریں -2. تصدیق کے لیے 20 منٹ انتظار کریں +2. تصدیق کے لیے 20 منٹ انتظار کریں -3. Arbitrum پر سٹیک کی منتقلی کی تصدیق کریں +3. Arbitrum پر سٹیک کی منتقلی کی تصدیق کریں \*نوٹ کریں کہ آپ کو 7 دنوں کے اندر منتقلی کی تصدیق کرنی چاہیے ورنہ آپ کا سٹیک ضائع ہو سکتا ہے۔ زیادہ تر معاملات میں، یہ مرحلہ خود بخود چلے گا، لیکن اگر Arbitrum پر گیس کی قیمت میں اضافہ ہوتا ہے تو دستی تصدیق کی ضرورت ہو سکتی ہے۔ اگر اس عمل کے دوران کوئی مسئلہ درپیش ہے، تو مدد کے لیے وسائل موجود ہوں گے: support@thegraph.com پر یا [ڈسکورڈ](https://discord.gg/graphprotocol) پر سپورٹ سے رابطہ کریں۔ @@ -291,23 +291,23 @@ L2 ٹرانسفر ٹول کو آپ کے سٹیک کی منتقلی مکمل ک اپنی ویسٹنگ منتقل کرنے کے لیے، آپ کو درج ذیل مراحل کو مکمل کرنے کی ضرورت ہو گی: -1. ایتھیریم مین نیٹ پر ویسٹنگ کی منتقلی شروع کریں +1. ایتھیریم مین نیٹ پر ویسٹنگ کی منتقلی شروع کریں -2. تصدیق کے لیے 20 منٹ انتظار کریں +2. تصدیق کے لیے 20 منٹ انتظار کریں -3. Arbitrum پر ویسٹنگ منتقلی کی تصدیق کرنا +3. Arbitrum پر ویسٹنگ منتقلی کی تصدیق کرنا ### اگر میں صرف جزوی طور پر ویسٹڈ ہوں تو میں اپنا ویسٹنگ کا کنٹریکٹ کیسے منتقل کروں؟ -1. ٹرانسفر ٹول کے کنٹریکٹ میں کچھ ایتھیریم جمع کریں (UI مناسب رقم کا تخمینہ لگانے میں مدد کر سکتا ہے) +1. ٹرانسفر ٹول کے کنٹریکٹ میں کچھ ایتھیریم جمع کریں (UI مناسب رقم کا تخمینہ لگانے میں مدد کر سکتا ہے) -2. L2 ویسٹنگ لاک کو شروع کرنے کے لیے کچھ لاک شدہ GRT ٹرانسفر ٹول کنٹریکٹ کے ذریعے L2 کو بھیجیں۔ یہ ان کا L2 بینیفیشری کا ایڈریس بھی ترتیب دے گا. +2. L2 ویسٹنگ لاک کو شروع کرنے کے لیے کچھ لاک شدہ GRT ٹرانسفر ٹول کنٹریکٹ کے ذریعے L2 کو بھیجیں۔ یہ ان کا L2 بینیفیشری کا ایڈریس بھی ترتیب دے گا. -3. L1 سٹیکنگ کنٹریکٹ میں "لاک" ٹرانسفر ٹول فنکشنز کے ذریعے اپنا سٹیک/ڈیلیگیشن L2 کو بھیجیں. +3. L1 سٹیکنگ کنٹریکٹ میں "لاک" ٹرانسفر ٹول فنکشنز کے ذریعے اپنا سٹیک/ڈیلیگیشن L2 کو بھیجیں. -4. ٹرانسفر ٹول کنٹریکٹ سے کوئی بھی بچا ہوا ایتھیریم نکال لیں +4. ٹرانسفر ٹول کنٹریکٹ سے کوئی بھی بچا ہوا ایتھیریم نکال لیں ### میں اپنا ویسٹنگ کنٹریکٹ کیسے منتقل کروں اگر میں مکمل طور پر ویسٹڈ ہوں؟ @@ -315,13 +315,13 @@ L2 ٹرانسفر ٹول کو آپ کے سٹیک کی منتقلی مکمل ک ان لوگوں کے لیے جو مکمل ویسٹڈ ہیں، یہ عمل ایک جیسا ہے: -1. ٹرانسفر ٹول کے کنٹریکٹ میں کچھ ایتھیریم جمع کریں (UI مناسب رقم کا تخمینہ لگانے میں مدد کر سکتا ہے) +1. ٹرانسفر ٹول کے کنٹریکٹ میں کچھ ایتھیریم جمع کریں (UI مناسب رقم کا تخمینہ لگانے میں مدد کر سکتا ہے) -2. ٹرانسفر ٹول کنٹریکٹ پر کال کے ساتھ اپنا L2 ایڈریس سیٹ کریں +2. ٹرانسفر ٹول کنٹریکٹ پر کال کے ساتھ اپنا L2 ایڈریس سیٹ کریں -3. L1 سٹیکنگ کنٹریکٹ میں "لاکڈ" ٹرانسفر ٹول فنکشنز کے ذریعے اپنا سٹیک/ڈیلیگیشن L2 کو بھیجیں. +3. L1 سٹیکنگ کنٹریکٹ میں "لاکڈ" ٹرانسفر ٹول فنکشنز کے ذریعے اپنا سٹیک/ڈیلیگیشن L2 کو بھیجیں. -4. ٹرانسفر ٹول کنٹریکٹ سے کوئی بھی بچا ہوا ایتھیریم نکال لیں +4. ٹرانسفر ٹول کنٹریکٹ سے کوئی بھی بچا ہوا ایتھیریم نکال لیں ### کیا میں اپنا ویسٹنگ کنٹریکٹ Arbitrum پر منتقل کر سکتا ہوں؟ @@ -361,17 +361,17 @@ L2 ٹرانسفر ٹول کو آپ کے سٹیک کی منتقلی مکمل ک اپنے ویسٹنگ کا کنٹریکٹ L2 میں منتقل کرنے کے لیے، آپ ٹرانسفر ٹولز کا استعمال کرتے ہوئے کوئی بھی GRT بیلنس L2 کو بھیجیں گے، جو آپ کے L2 ویسٹنگ کنٹریکٹ کو شروع کرے گا: -1. ٹرانسفر ٹول کنٹریکٹ میں کچھ ایتھیریم جمع کریں (یہ L2 گیس کی ادائیگی کے لیے استعمال کیا جائے گا) +1. ٹرانسفر ٹول کنٹریکٹ میں کچھ ایتھیریم جمع کریں (یہ L2 گیس کی ادائیگی کے لیے استعمال کیا جائے گا) -2. ویسٹنگ کنٹریکٹ تک پروٹوکول کی رسائی منسوخ کریں (اگلے مرحلے کے لیے درکار) +2. ویسٹنگ کنٹریکٹ تک پروٹوکول کی رسائی منسوخ کریں (اگلے مرحلے کے لیے درکار) -3. ویسٹنگ کنٹریکٹ تک پروٹوکول تک رسائی دیں (آپ کے کنٹریکٹ کو ٹرانسفر ٹول کے ساتھ تعامل کرنے کی اجازت دے گا) +3. ویسٹنگ کنٹریکٹ تک پروٹوکول تک رسائی دیں (آپ کے کنٹریکٹ کو ٹرانسفر ٹول کے ساتھ تعامل کرنے کی اجازت دے گا) -4. ایک L2 بینیفیشری کا ایڈریس بتائیں\* اور ایتھیریم مین نیٹ پر بیلنس کی منتقلی شروع کریں +4. ایک L2 بینیفیشری کا ایڈریس بتائیں\* اور ایتھیریم مین نیٹ پر بیلنس کی منتقلی شروع کریں -5. تصدیق کے لیے 20 منٹ انتظار کریں +5. تصدیق کے لیے 20 منٹ انتظار کریں -6. L2 پر بیلنس کی منتقلی کی تصدیق کریں +6. L2 پر بیلنس کی منتقلی کی تصدیق کریں \*اگر ضروری ہو تو - یعنی آپ کنٹریکٹ ایڈریس استعمال کر رہے ہیں. From b03f5fb6dddaa71d7fdbc66b0da60359c2b05ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:30 -0400 Subject: [PATCH 454/924] New translations l2-transfer-tools-faq.mdx (Vietnamese) --- .../vi/arbitrum/l2-transfer-tools-faq.mdx | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/vi/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/vi/arbitrum/l2-transfer-tools-faq.mdx index f92096a8a216..455a034a056d 100644 --- a/website/pages/vi/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/vi/arbitrum/l2-transfer-tools-faq.mdx @@ -42,15 +42,15 @@ If you have the L1 transaction hash (which you can find by looking at the recent To transfer your subgraph, you will need to complete the following steps: -1. Initiate the transfer on Ethereum mainnet +1. Initiate the transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation +2. Wait 20 minutes for confirmation -3. Confirm subgraph transfer on Arbitrum\* +3. Confirm subgraph transfer on Arbitrum\* -4. Finish publishing subgraph on Arbitrum +4. Finish publishing subgraph on Arbitrum -5. Update Query URL (recommended) +5. Update Query URL (recommended) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ Gas fees on Arbitrum One are paid using bridged ETH (i.e. ETH that has been brid To transfer your delegation, you will need to complete the following steps: -1. Initiate delegation transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation -3. Confirm delegation transfer on Arbitrum +1. Initiate delegation transfer on Ethereum mainnet +2. Wait 20 minutes for confirmation +3. Confirm delegation transfer on Arbitrum \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans To transfer your curation, you will need to complete the following steps: -1. Initiate signal transfer on Ethereum mainnet +1. Initiate signal transfer on Ethereum mainnet -2. Specify an L2 Curator address\* +2. Specify an L2 Curator address\* -3. Wait 20 minutes for confirmation +3. Wait 20 minutes for confirmation \*If necessary - i.e. you are using a contract address. @@ -232,11 +232,11 @@ There is no bulk transfer option at this time. To transfer your stake, you will need to complete the following steps: -1. Initiate stake transfer on Ethereum mainnet +1. Initiate stake transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation +2. Wait 20 minutes for confirmation -3. Confirm stake transfer on Arbitrum +3. Confirm stake transfer on Arbitrum \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Yes! The process is a bit different, because vesting contracts can't forward the To transfer your vesting, you will need to complete the following steps: -1. Initiate the vesting transfer on Ethereum mainnet +1. Initiate the vesting transfer on Ethereum mainnet -2. Wait 20 minutes for confirmation +2. Wait 20 minutes for confirmation -3. Confirm vesting transfer on Arbitrum +3. Confirm vesting transfer on Arbitrum ### How do I transfer my vesting contract if I am only partially vested? -1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) +1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) -2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. +2. Send some locked GRT through the transfer tool contract, to L2 to initialize the L2 vesting lock. This will also set their L2 beneficiary address. -3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. +3. Send their stake/delegation to L2 through the "locked" transfer tool functions in the L1Staking contract. -4. Withdraw any remaining ETH from the transfer tool contract +4. Withdraw any remaining ETH from the transfer tool contract ### How do I transfer my vesting contract if I am fully vested? @@ -314,13 +314,13 @@ To transfer your vesting, you will need to complete the following steps: For those that are fully vested, the process is similar: -1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) +1. Deposit some ETH into the transfer tool contract (UI can help estimate a reasonable amount) -2. Set your L2 address with a call to the transfer tool contract +2. Set your L2 address with a call to the transfer tool contract -3. Send your stake/delegation to L2 through the "locked" transfer tool functions in the L1 Staking contract. +3. Send your stake/delegation to L2 through the "locked" transfer tool functions in the L1 Staking contract. -4. Withdraw any remaining ETH from the transfer tool contract +4. Withdraw any remaining ETH from the transfer tool contract ### Can I transfer my vesting contract to Arbitrum? @@ -360,17 +360,17 @@ These steps only apply if your contract is still vesting, or if you've used this To transfer your vesting contract to L2, you will send any GRT balance to L2 using the transfer tools, which will initialize your L2 vesting contract: -1. Deposit some ETH into the transfer tool contract (this will be used to pay for L2 gas) +1. Deposit some ETH into the transfer tool contract (this will be used to pay for L2 gas) -2. Revoke protocol access to the vesting contract (needed for the next step) +2. Revoke protocol access to the vesting contract (needed for the next step) -3. Give protocol access to the vesting contract (will allow your contract to interact with the transfer tool) +3. Give protocol access to the vesting contract (will allow your contract to interact with the transfer tool) -4. Specify an L2 beneficiary address\* and initiate the balance transfer on Ethereum mainnet +4. Specify an L2 beneficiary address\* and initiate the balance transfer on Ethereum mainnet -5. Wait 20 minutes for confirmation +5. Wait 20 minutes for confirmation -6. Confirm the balance transfer on L2 +6. Confirm the balance transfer on L2 \*If necessary - i.e. you are using a contract address. From 1d1078570a7ffbb9243e7dadcf3e6764b5bf1230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:31 -0400 Subject: [PATCH 455/924] New translations l2-transfer-tools-faq.mdx (Marathi) --- .../mr/arbitrum/l2-transfer-tools-faq.mdx | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/website/pages/mr/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/mr/arbitrum/l2-transfer-tools-faq.mdx index 87576353e44b..96c2136b1915 100644 --- a/website/pages/mr/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/mr/arbitrum/l2-transfer-tools-faq.mdx @@ -42,15 +42,15 @@ If you have the L1 transaction hash (which you can find by looking at the recent तुमचा सबग्राफ हस्तांतरित करण्यासाठी, तुम्हाला खालील चरण पूर्ण करावे लागतील: -1. Ethereum mainnet वर हस्तांतरण सुरू करा +1. Ethereum mainnet वर हस्तांतरण सुरू करा -2. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा +2. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा -3. आर्बिट्रमवर सबग्राफ हस्तांतरणाची पुष्टी करा\* +3. आर्बिट्रमवर सबग्राफ हस्तांतरणाची पुष्टी करा\* -4. आर्बिट्रम वर सबग्राफ प्रकाशित करणे समाप्त करा +4. आर्बिट्रम वर सबग्राफ प्रकाशित करणे समाप्त करा -5. क्वेरी URL अपडेट करा (शिफारस केलेले) +5. क्वेरी URL अपडेट करा (शिफारस केलेले) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ Yes. Select Arbitrum One as your published network when publishing in Subgraph S तुमच्या प्रतिनियुक्तीची हस्तांतरण करण्यासाठी, तुम्हाला खालील प्रक्रिया पूर्ण करण्याची आवश्यकता आहे: -1. Ethereum mainnet वर शिष्टमंडळ हस्तांतरण सुरू करा -2. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा -3. आर्बिट्रमवर प्रतिनिधी मंडळाच्या हस्तांतरणाची पुष्टी करा +1. Ethereum mainnet वर शिष्टमंडळ हस्तांतरण सुरू करा +2. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा +3. आर्बिट्रमवर प्रतिनिधी मंडळाच्या हस्तांतरणाची पुष्टी करा \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans तुमच्या कुरेशनची हस्तांतरण करण्यासाठी, तुम्हाला खालील प्रक्रिया पूर्ण करण्याची आवश्यकता आहे: -1. इथरियम मेननेटवर सिग्नल ट्रान्सफर सुरू करा +1. इथरियम मेननेटवर सिग्नल ट्रान्सफर सुरू करा -2. L2 क्युरेटर पत्ता निर्दिष्ट करा\* +2. L2 क्युरेटर पत्ता निर्दिष्ट करा\* -3. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा +3. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा \*आवश्यक असल्यास - उदा. तुम्ही एक कॉन्ट्रॅक्ट पत्ता वापरत आहात. @@ -232,11 +232,11 @@ L2 हस्तांतरण साधन सुरू केल्यान तुमचा हिस्सा हस्तांतरित करण्यासाठी, तुम्हाला खालील चरण पूर्ण करावे लागतील: -1. इथरियम मेननेटवर स्टेक ट्रान्सफर सुरू करा +1. इथरियम मेननेटवर स्टेक ट्रान्सफर सुरू करा -2. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा +2. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा -3. आर्बिट्रमवर स्टेक ट्रान्सफरची पुष्टी करा +3. आर्बिट्रमवर स्टेक ट्रान्सफरची पुष्टी करा \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ L2 स्थानांतरण उपकरणाने आपल्याच तुमच्या वेस्टिंगची हस्तांतरण करण्यासाठी, तुम्हाला खालील प्रक्रिया पूर्ण करण्याची आवश्यकता आहे: -1. ईथेरियम मेननेटवर वेस्टिंग हस्तांतरण सुरू करा +1. ईथेरियम मेननेटवर वेस्टिंग हस्तांतरण सुरू करा -2. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा +2. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा -3. आर्बिट्रमवर वेस्टिंग ट्रांस्फरची पुष्टी करा +3. आर्बिट्रमवर वेस्टिंग ट्रांस्फरची पुष्टी करा ### मी केवळ अंशतः निहित असल्यास माझा वेस्टिंग करार कसा हस्तांतरित करू? -1. हस्तांतरण साधन संविदाच्या एकांत्रीत थेट ETH जमा करा (UI एक उचित मात्रा आकलन करण्यात मदत करू शकते) +1. हस्तांतरण साधन संविदाच्या एकांत्रीत थेट ETH जमा करा (UI एक उचित मात्रा आकलन करण्यात मदत करू शकते) -2. लॉक्ड GRT किंवा बंद झालेल्या GRTला स्थानांतरण उपकरण कॉन्ट्रॅक्टद्वारे L2ला पाठवा, ल2ला स्थानांतरित करण्यासाठी. ही प्रक्रिया त्यांना त्याच्या L2 वेस्टिंग लॉक ची सुरुवात करण्याचीची पर्याय देतेल. हे त्याच्या L2 लाभार्थ्याच्या पत्त्यासहही सेट करेल. +2. लॉक्ड GRT किंवा बंद झालेल्या GRTला स्थानांतरण उपकरण कॉन्ट्रॅक्टद्वारे L2ला पाठवा, ल2ला स्थानांतरित करण्यासाठी. ही प्रक्रिया त्यांना त्याच्या L2 वेस्टिंग लॉक ची सुरुवात करण्याचीची पर्याय देतेल. हे त्याच्या L2 लाभार्थ्याच्या पत्त्यासहही सेट करेल. -3. त्यांनी आपल्या स्थानिकीकरण/अधिग्रहाची धार लॉक केल्याशिवाय, "लॉक्ड" हस्तांतरण साधने L1Staking कर्मचेरीतील कार्य करून L2ला पाठवा. +3. त्यांनी आपल्या स्थानिकीकरण/अधिग्रहाची धार लॉक केल्याशिवाय, "लॉक्ड" हस्तांतरण साधने L1Staking कर्मचेरीतील कार्य करून L2ला पाठवा. -4. कोणत्याही शिल्लक ETH बाकी आहे त्याच्या ट्रांस्फर टूल कॉन्ट्रॅक्टमधून विचला +4. कोणत्याही शिल्लक ETH बाकी आहे त्याच्या ट्रांस्फर टूल कॉन्ट्रॅक्टमधून विचला ### मी पूर्ण निहित असल्यास माझा वेस्टिंग करार कसा हस्तांतरित करू? @@ -314,13 +314,13 @@ L2 स्थानांतरण उपकरणाने आपल्याच पूर्णपणे निहित असलेल्यांसाठी, प्रक्रिया समान आहे: -1. हस्तांतरण साधन संविदाच्या एकांत्रीत थेट ETH जमा करा (UI एक उचित मात्रा आकलन करण्यात मदत करू शकते) +1. हस्तांतरण साधन संविदाच्या एकांत्रीत थेट ETH जमा करा (UI एक उचित मात्रा आकलन करण्यात मदत करू शकते) -2. तुमचा L2 पत्ता ट्रांस्फर टूल कॉन्ट्रॅक्टला कॉल करून सेट करा +2. तुमचा L2 पत्ता ट्रांस्फर टूल कॉन्ट्रॅक्टला कॉल करून सेट करा -3. आपली शेअर/प्रतिनियुक्ती "लॉक" केलेल्या हस्तांतरण साधन फंक्शन्सद्वारे L1 Staking संविदातील L2 वर पाठवा. +3. आपली शेअर/प्रतिनियुक्ती "लॉक" केलेल्या हस्तांतरण साधन फंक्शन्सद्वारे L1 Staking संविदातील L2 वर पाठवा. -4. कोणत्याही शिल्लक ETH बाकी आहे त्याच्या ट्रांस्फर टूल कॉन्ट्रॅक्टमधून विचला +4. कोणत्याही शिल्लक ETH बाकी आहे त्याच्या ट्रांस्फर टूल कॉन्ट्रॅक्टमधून विचला ### मी माझा वेस्टिंग कॉन्ट्रॅक्ट आर्बिट्रमकडे हस्तांतरित करू शकतो का? @@ -360,17 +360,17 @@ L2 स्थानांतरण उपकरणाने आपल्याच तुमच्या वेस्टिंग करारपत्राचा L2 वर हस्तांतर करण्यासाठी, तुम्ही हस्तांतरण साधने वापरून लोटसपूर्ण L2 वर GRT शिल्लक हस्तांतरित करणार, ज्यामुळे तुमचा L2 वेस्टिंग करारपत्र प्रारंभ होईल: -1. हस्तांतरण साधनात ETH किंमती जमा करा (ह्यामुळे L2 गॅससाठी पैसे देण्यात येईल) +1. हस्तांतरण साधनात ETH किंमती जमा करा (ह्यामुळे L2 गॅससाठी पैसे देण्यात येईल) -2. प्रोटोकॉलला वेस्टिंग करारक्षमतेसाठी प्रवेश सुरक्षित करा (पुढील पायर्या साठी आवश्यक) +2. प्रोटोकॉलला वेस्टिंग करारक्षमतेसाठी प्रवेश सुरक्षित करा (पुढील पायर्या साठी आवश्यक) -3. करारपत्राच्या प्रोटोकॉलला प्रवेश परवानगी द्या (ह्यामुळे आपल्या करारपत्राने हस्तांतरण साधने संवाद साधू शकतील) +3. करारपत्राच्या प्रोटोकॉलला प्रवेश परवानगी द्या (ह्यामुळे आपल्या करारपत्राने हस्तांतरण साधने संवाद साधू शकतील) -4. L2 लाभार्थ्याचा पत्ता सूचीत करा\* आणि इथे Ethereum मुख्यनेटवर शिल्लक हस्तांतरण प्रारंभ करा +4. L2 लाभार्थ्याचा पत्ता सूचीत करा\* आणि इथे Ethereum मुख्यनेटवर शिल्लक हस्तांतरण प्रारंभ करा -5. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा +5. पुष्टीकरणासाठी 20 मिनिटे प्रतीक्षा करा -6. L2 वर शिल्लक हस्तांतरणाची पुष्टी करा +6. L2 वर शिल्लक हस्तांतरणाची पुष्टी करा \*आवश्यक असल्यास - उदा. तुम्ही एक कॉन्ट्रॅक्ट पत्ता वापरत आहात. From 6a074c872442f637990816f2552245a51bb80957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:32 -0400 Subject: [PATCH 456/924] New translations l2-transfer-tools-faq.mdx (Hindi) --- .../hi/arbitrum/l2-transfer-tools-faq.mdx | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/website/pages/hi/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/hi/arbitrum/l2-transfer-tools-faq.mdx index 890f8bb4628b..a1c4474d0cba 100644 --- a/website/pages/hi/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/hi/arbitrum/l2-transfer-tools-faq.mdx @@ -42,25 +42,25 @@ If you have the L1 transaction hash (which you can find by looking at the recent अपने सबग्राफ को स्थानांतरित करने के लिए, आपको निम्नलिखित चरणों को पूरा करने होंगे: -1. Ethereum mainnet वर हस्तांतरण सुरू करा +1. Ethereum mainnet वर हस्तांतरण सुरू करा -2. पुष्टि के लिए 20 मिनट का इंतजार करें: +2. पुष्टि के लिए 20 मिनट का इंतजार करें: -3. आर्बिट्रमवर सबग्राफ हस्तांतरणाची पुष्टी करा\* +3. आर्बिट्रमवर सबग्राफ हस्तांतरणाची पुष्टी करा\* -4. आर्बिट्रम पर सबग्राफ का प्रकाशन समाप्त करें +4. आर्बिट्रम पर सबग्राफ का प्रकाशन समाप्त करें -5. क्वेरी यूआरएल अपडेट करें (अनुशंसित) +5. क्वेरी यूआरएल अपडेट करें (अनुशंसित) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). ### मुझे अपना स्थानांतरण कहाँ से आरंभ करना चाहिए? -आप[Subgraph Studio](https://thegraph.com/studio/), [Explorer,](https://thegraph.com/explorer) या किसी भी सबग्राफ विवरण पृष्ठ से अपने अंतरण को प्रारंभ कर सकते हैं। सबग्राफ विवरण पृष्ठ में "Transfer Subgraph" बटन पर क्लिक करके अंतरण आरंभ करें। +आप[Subgraph Studio](https://thegraph.com/studio/), [Explorer,](https://thegraph.com/explorer) या किसी भी Subgraph विवरण पृष्ठ से अपने transfer को प्रारंभ कर सकते हैं। Subgraph विवरण पृष्ठ में "Transfer " button पर click करके transfer आरंभ करें। ### मेरा सबग्राफ़ स्थानांतरित होने तक मुझे कितने समय तक प्रतीक्षा करनी होगी? -अंतरण करने में लगभग 20 मिनट का समय लगता है। आर्बिट्रम सेतु स्वचालित रूप से सेतु अंतरण पूरा करने के लिए पृष्ठभूमि में काम कर रहा है। कुछ मामलों में, गैस लागत में वृद्धि हो सकती है और आपको लेन-देन की पुष्टि फिर से करनी होगी। +अंतरण करने में लगभग 20 मिनट का समय लगता है। Arbitrum bridge स्वचालित रूप से bridge अंतरण पूरा करने के लिए पृष्ठभूमि में काम कर रहा है। कुछ मामलों में, गैस लागत में spike हो सकती है और आपको transaction की पुष्टि फिर से करनी होगी। ### क्या मेरा सबग्राफ L2 में स्थानांतरित करने के बाद भी खोजा जा सकेगा? @@ -68,7 +68,7 @@ If you have the L1 transaction hash (which you can find by looking at the recent ### क्या मेरे सबग्राफ को स्थानांतरित करने के लिए इसे प्रकाशित किया जाना आवश्यक है? -सबग्राफ अंतरण उपकरण का लाभ उठाने के लिए, आपके सबग्राफ को पहले ही ईथेरियम मेननेट पर प्रकाशित किया जाना चाहिए और सबग्राफ के मालिक वॉलेट द्वारा स्वामित्व सिग्नल का कुछ होना चाहिए। यदि आपका सबग्राफ प्रकाशित नहीं है, तो सिफ़ारिश की जाती है कि आप सीधे आर्बिट्रम वन पर प्रकाशित करें - जुड़े गए गैस शुल्क काफी कम होंगे। यदि आप किसी प्रकाशित सबग्राफ को अंतरण करना चाहते हैं लेकिन मालिक खाता ने उस पर कोई सिग्नल क्यूरेट नहीं किया है, तो आप उस खाते से थोड़ी सी राशि (जैसे 1 GRT) के सिग्नल कर सकते हैं; सुनिश्चित करें कि आपने "ऑटो-माइग्रेटिंग" सिग्नल को चुना है। +सबग्राफ अंतरण उपकरण का लाभ उठाने के लिए, आपके सबग्राफ को पहले ही ईथेरियम मेननेट पर प्रकाशित किया जाना चाहिए और सबग्राफ के मालिक wallet द्वारा स्वामित्व signal subgraph का कुछ होना चाहिए। यदि आपका subgraph प्रकाशित नहीं है, तो सिफ़ारिश की जाती है कि आप सीधे Arbitrum One पर प्रकाशित करें - जुड़े गए gas fees काफी कम होंगे। यदि आप किसी प्रकाशित subgraph को अंतरण करना चाहते हैं लेकिन owner account ने उस पर कोई signal curate नहीं किया है, तो आप उस account से थोड़ी सी राशि (जैसे 1 GRT) के signal कर सकते हैं; सुनिश्चित करें कि आपने "auto-migrating" signal को चुना है। ### मी आर्बिट्रममध्ये हस्तांतरित केल्यानंतर माझ्या सबग्राफच्या इथरियम मेननेट आवृत्तीचे काय होते? @@ -86,9 +86,9 @@ It is unlikely, but possible to experience a brief downtime depending on which I Yes. Select Arbitrum One as your published network when publishing in Subgraph Studio. In the Studio, the latest endpoint will be available which points to the latest updated version of the subgraph. -### क्या मेरे सबग्राफ की संरचना उसके साथ चलेगी जब मैं सबग्राफ को स्थानांतरित करूँगा? +### क्या मेरे subgraph की curation उसके साथ चलेगी जब मैंsubgraph को स्थानांतरित करूँगा? -यदि आपने "ऑटो-माइग्रेटिंग" सिग्नल का चयन किया है, तो आपके खुद के क्यूरेशन का 100% आपके सबग्राफ के साथ आर्बिट्रम वन पर जाएगा। सबग्राफ के सभी क्यूरेशन सिग्नल को अंतरण के समय GRT में परिवर्तित किया जाएगा, और आपके क्यूरेशन सिग्नल के समर्थन में उत्पन्न होने वाले GRT का उपयोग L2 सबग्राफ पर सिग्नल मिंट करने के लिए किया जाएगा। +यदि आपने " auto-migrating" signal का चयन किया है, तो आपके खुद के curation का 100% आपकेsubgraph के साथ Arbitrum One पर जाएगा। subgraph के सभी curation signalको अंतरण के समय GRT में परिवर्तित किया जाएगा, और आपके curation signal के समर्थन में उत्पन्न होने वाले GRT का उपयोग L2 subgraph पर signal mint करने के लिए किया जाएगा। अन्य क्यूरेटर यह चुन सकते हैं कि जीआरटी का अपना अंश वापस लेना है या नहीं, या इसे उसी सबग्राफ पर मिंट सिग्नल के लिए एल2 में स्थानांतरित करना है या नहीं। @@ -108,9 +108,9 @@ Yes. Select Arbitrum One as your published network when publishing in Subgraph S अपनी समर्पण को स्थानांतरित करने के लिए, आपको निम्नलिखित चरणों को पूरा करने की आवश्यकता होगी: -1. ईथेरियम मेननेट पर समर्पण स्थानांतरण प्रारंभ करें: -2. पुष्टि के लिए 20 मिनट का इंतजार करें: -3. आर्बिट्रम पर समर्पण स्थानांतरण की पुष्टि करें: +1. ईथेरियम मेननेट पर समर्पण स्थानांतरण प्रारंभ करें: +2. पुष्टि के लिए 20 मिनट का इंतजार करें: +3. आर्बिट्रम पर समर्पण स्थानांतरण की पुष्टि करें: \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans तुमचे क्युरेशन हस्तांतरित करण्यासाठी, तुम्हाला खालील चरण पूर्ण करावे लागतील: -1. एथेरियम मेननेट पर सिग्नल ट्रांसफर शुरू करें +1. एथेरियम मेननेट पर सिग्नल ट्रांसफर शुरू करें -2. L2 क्यूरेटर पता निर्दिष्ट करें\* +2. L2 क्यूरेटर पता निर्दिष्ट करें\* -3. पुष्टि के लिए 20 मिनट का इंतजार करें: +3. पुष्टि के लिए 20 मिनट का इंतजार करें: \*यदि आवश्यक हो - अर्थात्, आप एक कॉन्ट्रैक्ट पते का उपयोग कर रहे हैं | @@ -232,11 +232,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans अपने स्टेक को स्थानांतरित करने के लिए, आपको निम्नलिखित चरणों को पूरा करने होंगे: -1. ईथेरियम मेननेट पर स्थानांतरण प्रारंभ करें: +1. ईथेरियम मेननेट पर स्थानांतरण प्रारंभ करें: -2. पुष्टि के लिए 20 मिनट का इंतजार करें: +2. पुष्टि के लिए 20 मिनट का इंतजार करें: -3. आर्बिट्रम पर स्थानांतरण की पुष्टि करें: +3. आर्बिट्रम पर स्थानांतरण की पुष्टि करें: \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ L2 ट्रान्स्फर टूलला तुमचा स्टे अपने वेस्टिंग को ट्रांसफर करने के लिए, आपको निम्नलिखित चरणों को पूरा करने की आवश्यकता होगी: -1. ईथिरियम मेननेट पर वेस्टिंग ट्रांसफर प्रारंभ करें। +1. ईथिरियम मेननेट पर वेस्टिंग ट्रांसफर प्रारंभ करें। -2. पुष्टि के लिए 20 मिनट का इंतजार करें: +2. पुष्टि के लिए 20 मिनट का इंतजार करें: -3. आर्बिट्रम पर वेस्टिंग ट्रांसफर की पुष्टि करें। +3. आर्बिट्रम पर वेस्टिंग ट्रांसफर की पुष्टि करें। ### यदि मैं केवल आंशिक रूप से निहित हूं तो मैं अपना निहित अनुबंध कैसे स्थानांतरित करूं? -1. स्थानांतरण उपकरण अनुबंध में कुछ ईटीएच जमा करें (यूआई उचित राशि का अनुमान लगाने में मदद कर सकता है) +1. स्थानांतरण उपकरण अनुबंध में कुछ ईटीएच जमा करें (यूआई उचित राशि का अनुमान लगाने में मदद कर सकता है) -2. L2 वेस्टिंग लॉक को आरंभ करने के लिए ट्रांसफर टूल अनुबंध के माध्यम से कुछ लॉक किए गए GRT को L2 पर भेजें। इससे उनका L2 लाभार्थी पता भी सेट हो जाएगा। +2. L2 वेस्टिंग लॉक को आरंभ करने के लिए ट्रांसफर टूल अनुबंध के माध्यम से कुछ लॉक किए गए GRT को L2 पर भेजें। इससे उनका L2 लाभार्थी पता भी सेट हो जाएगा। -3. "लॉक्ड" स्थानांतरण उपकरण कार्यों के माध्यम से उनका स्टेक/सहायकता एल2 में "L1Staking" अनुबंध के माध्यम से भेजें। +3. "लॉक्ड" स्थानांतरण उपकरण कार्यों के माध्यम से उनका स्टेक/सहायकता एल2 में "L1Staking" अनुबंध के माध्यम से भेजें। -4. ट्रांसफर उपकरण अनुबंध से शेषित ETH को निकालें। +4. ट्रांसफर उपकरण अनुबंध से शेषित ETH को निकालें। ### यदि मैं पूरी तरह से निहित हूं तो मैं अपने निहित अनुबंध को कैसे स्थानांतरित करूं? @@ -314,13 +314,13 @@ L2 ट्रान्स्फर टूलला तुमचा स्टे जो लोग पूरी तरह से निहित हैं, उनके लिए प्रक्रिया समान है: -1. स्थानांतरण उपकरण अनुबंध में कुछ ईटीएच जमा करें (यूआई उचित राशि का अनुमान लगाने में मदद कर सकता है) +1. स्थानांतरण उपकरण अनुबंध में कुछ ईटीएच जमा करें (यूआई उचित राशि का अनुमान लगाने में मदद कर सकता है) -2. ट्रांसफर उपकरण अनुबंध को कॉल करके अपना L2 पता सेट करें। +2. ट्रांसफर उपकरण अनुबंध को कॉल करके अपना L2 पता सेट करें। -3. आपके स्टेक/डिलीगेशन को "लॉक्ड" ट्रांसफर टूल के फ़ंक्शन के माध्यम से एल1 स्टेकिंग अनुबंध में एल2 में भेज दें। +3. आपके स्टेक/डिलीगेशन को "लॉक्ड" ट्रांसफर टूल के फ़ंक्शन के माध्यम से एल1 स्टेकिंग अनुबंध में एल2 में भेज दें। -4. ट्रांसफर उपकरण अनुबंध से शेषित ETH को निकालें। +4. ट्रांसफर उपकरण अनुबंध से शेषित ETH को निकालें। ### क्या मैं अपने निहित अनुबंध को आर्बिट्रम में स्थानांतरित कर सकता हूँ? @@ -360,17 +360,17 @@ L2 ट्रान्स्फर टूलला तुमचा स्टे अपने वेस्टिंग कॉन्ट्रैक्ट को L2 में हस्तांतरित करने के लिए, आप ट्रांसफर टूल्स का उपयोग करके L2 में किसी भी GRT बैलेंस को हस्तांतरित करेंगे, जिससे आपका L2 वेस्टिंग कॉन्ट्रैक्ट आरंभ होगा: -1. कृपया स्थानांतरण उपकरण अनुबंध में कुछ ईथर जमा करें (यह एल2 गैस के लिए भुगतान करने के लिए उपयोग किया जाएगा)। +1. कृपया स्थानांतरण उपकरण अनुबंध में कुछ ईथर जमा करें (यह एल2 गैस के लिए भुगतान करने के लिए उपयोग किया जाएगा)। -2. निहित अनुबंध तक प्रोटोकॉल पहुंच रद्द करें (अगले चरण के लिए आवश्यक) +2. निहित अनुबंध तक प्रोटोकॉल पहुंच रद्द करें (अगले चरण के लिए आवश्यक) -3. वेस्टिंग अनुबंध को प्रोटोकॉल एक्सेस दें (यह आपके अनुबंध को स्थानांतरण उपकरण के साथ इंटरैक्ट करने की अनुमति देगा)। +3. वेस्टिंग अनुबंध को प्रोटोकॉल एक्सेस दें (यह आपके अनुबंध को स्थानांतरण उपकरण के साथ इंटरैक्ट करने की अनुमति देगा)। -4. एक एल2 लाभार्थी पता निर्दिष्ट करें\* और इथेरियम मेननेट पर शेष राशि का ट्रांसफर प्रारंभ करें। +4. एक एल2 लाभार्थी पता निर्दिष्ट करें\* और इथेरियम मेननेट पर शेष राशि का ट्रांसफर प्रारंभ करें। -5. पुष्टि के लिए 20 मिनट का इंतजार करें: +5. पुष्टि के लिए 20 मिनट का इंतजार करें: -6. L2 पर बैलेंस ट्रांसफर की पुष्टि करें +6. L2 पर बैलेंस ट्रांसफर की पुष्टि करें \*यदि आवश्यक हो - अर्थात्, आप एक कॉन्ट्रैक्ट पते का उपयोग कर रहे हैं | From b0d8707b350cdd8360cdbfbb7b1dfbcc2594fd9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:33 -0400 Subject: [PATCH 457/924] New translations l2-transfer-tools-faq.mdx (Yoruba) --- .../yo/arbitrum/l2-transfer-tools-faq.mdx | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/website/pages/yo/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/yo/arbitrum/l2-transfer-tools-faq.mdx index c882f7db0bd8..42cd0644b5a5 100644 --- a/website/pages/yo/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/yo/arbitrum/l2-transfer-tools-faq.mdx @@ -14,7 +14,7 @@ These tools will require you to follow a specific set of steps depending on what ### Ṣe Mo le lo apamọwọ kanna ti Mo lo lori mainnet Ethereum? -Ti o ba nlo apamọwọ [EOA] \(https://ethereum.org/en/developers/docs/accounts/#types-of-account) o le lo adirẹsi kanna. Ti apamọwọ mainnet Ethereum jẹ adehun (fun apẹẹrẹ multisig) lẹhinna o gbọdọ pato [adirẹsi apamọwọ Arbitrum] \(/arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the- graph-on-l2) nibiti gbigbe rẹ yoo ti firanṣẹ. Jọwọ ṣayẹwo adirẹsi naa ni pẹkipẹki nitori eyikeyi gbigbe si adirẹsi ti ko tọ le ja si isonu ayeraye. Ti o ba fẹ lati lo multisig lori L2, rii daju pe o ran adehun multisig kan lori Arbitrum Ọkan. +Ti o ba nlo apamọwọ [EOA] (https://ethereum.org/en/developers/docs/accounts/#types-of-account) o le lo adirẹsi kanna. Ti apamọwọ mainnet Ethereum jẹ adehun (fun apẹẹrẹ multisig) lẹhinna o gbọdọ pato [adirẹsi apamọwọ Arbitrum] (/arbitrum/arbitrum-faq/#what-do-i-need-to-do-to-use-the- graph-on-l2) nibiti gbigbe rẹ yoo ti firanṣẹ. Jọwọ ṣayẹwo adirẹsi naa ni pẹkipẹki nitori eyikeyi gbigbe si adirẹsi ti ko tọ le ja si isonu ayeraye. Ti o ba fẹ lati lo multisig lori L2, rii daju pe o ran adehun multisig kan lori Arbitrum Ọkan. Wallets on EVM blockchains like Ethereum and Arbitrum are a pair of keys (public and private), that you create without any need to interact with the blockchain. So any wallet that was created for Ethereum will also work on Arbitrum without having to do anything else. @@ -22,7 +22,7 @@ The exception is with smart contract wallets like multisigs: these are smart con ### Kini yoo ṣẹlẹ ti Emi ko ba pari gbigbe mi ni awọn ọjọ meje? -Awọn Irinṣẹ Gbigbe L2 lo ẹrọ abinibi Arbitrum lati firanṣẹ awọn ifiranṣẹ lati L1 si L2. Ilana yii ni a pe ni “tiketi ti a tun le gbiyanju” ati pe gbogbo awọn afara ami abinibi lo, pẹlu Afara Arbitrum GRT. O le ka diẹ sii nipa awọn tikẹti atungbiyanju ninu [Arbitrum docs] \(https://docs.arbitrum.io/arbos/l1-to-l2-messaging). +Awọn Irinṣẹ Gbigbe L2 lo ẹrọ abinibi Arbitrum lati firanṣẹ awọn ifiranṣẹ lati L1 si L2. Ilana yii ni a pe ni “tiketi ti a tun le gbiyanju” ati pe gbogbo awọn afara ami abinibi lo, pẹlu Afara Arbitrum GRT. O le ka diẹ sii nipa awọn tikẹti atungbiyanju ninu [Arbitrum docs] (https://docs.arbitrum.io/arbos/l1-to-l2-messaging). Nigbati o ba gbe awọn ohun-ini rẹ (ipin-ilẹ, igi, aṣoju tabi itọju) si L2, ifiranṣẹ kan ni a firanṣẹ nipasẹ Afara Arbitrum GRT eyiti o ṣẹda tikẹti atunda ni L2. Ọpa gbigbe pẹlu diẹ ninu iye ETH ninu idunadura naa, ti o lo lati okan) sanwo lati ṣẹda tikẹti ati meji) sanwo fun gaasi lati ṣiṣẹ tikẹti ni L2. Bibẹẹkọ, nitori awọn idiyele gaasi le yatọ ni akoko titi tikẹti naa yoo ṣetan lati ṣiṣẹ ni L2, o ṣee ṣe pe igbiyanju ipaniyan adaṣe kuna. Nigbati iyẹn ba ṣẹlẹ, Afara Arbitrum yoo jẹ ki tikẹti atunwi laaye fun awọn ọjọ meje, ati pe ẹnikẹni le tun gbiyanju “rapada” tikẹti naa (eyiti o nilo apamọwọ pẹlu diẹ ninu ETH bridged si Arbitrum). @@ -42,15 +42,15 @@ If you have the L1 transaction hash (which you can find by looking at the recent Lati gbe subgraph rẹ, iwọ yoo nilo lati pari awọn igbesẹ wọnyi: -1. Bẹrẹ gbigbe lori mainnet Ethereum +1. Bẹrẹ gbigbe lori mainnet Ethereum -2. Duro ogun iṣẹju fun ìmúdájú +2. Duro ogun iṣẹju fun ìmúdájú -3. Jẹrisi gbigbe subgraph lori Arbitrum\* +3. Jẹrisi gbigbe subgraph lori Arbitrum\* -4. Pari titẹjade ipin lori Arbitrum +4. Pari titẹjade ipin lori Arbitrum -5. Ṣe imudojuiwọn URL ibeere (a ṣeduro) +5. Ṣe imudojuiwọn URL ibeere (a ṣeduro) \*Note that you must confirm the transfer within 7 days otherwise your subgraph may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -108,9 +108,9 @@ Awọn owo gaasi lori Arbitrum Ọkan ni a san ni lilo ETH ti o ni afara (ie ETH Lati gbe aṣoju rẹ, iwọ yoo nilo lati pari awọn igbesẹ wọnyi: -1. Pilẹṣẹ gbigbe aṣoju lori mainnet Ethereum -2. Duro ogun iṣẹju fun ìmúdájú -3. Jẹrisi gbigbe aṣoju lori Arbitrum +1. Pilẹṣẹ gbigbe aṣoju lori mainnet Ethereum +2. Duro ogun iṣẹju fun ìmúdájú +3. Jẹrisi gbigbe aṣoju lori Arbitrum \*\*\*\*You must confirm the transaction to complete the delegation transfer on Arbitrum. This step must be completed within 7 days or the delegation could be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -198,11 +198,11 @@ The tokens that are being undelegated are "locked" and therefore cannot be trans Lati gbe itọju rẹ, iwọ yoo nilo lati pari awọn igbesẹ wọnyi: -1. Bẹrẹ gbigbe ifihan agbara lori mainnet Ethereum +1. Bẹrẹ gbigbe ifihan agbara lori mainnet Ethereum -2. Pato adirẹsi L2 Curator kan \* +2. Pato adirẹsi L2 Curator kan \* -3. Duro ogun iṣẹju fun ìmúdájú +3. Duro ogun iṣẹju fun ìmúdájú \*Ti o ba jẹ dandan - ti o je o nlo adirẹsi adehun kan. @@ -232,11 +232,11 @@ Ko si aṣayan gbigbe lọpọlọpọ ni akoko yii. Lati gbe igi rẹ, iwọ yoo nilo lati pari awọn igbesẹ wọnyi: -1. Bẹrẹ gbigbe igi lori mainnet Ethereum +1. Bẹrẹ gbigbe igi lori mainnet Ethereum -2. Duro ogun iṣẹju fun ìmúdájú +2. Duro ogun iṣẹju fun ìmúdájú -3. Jẹrisi gbigbe igi lori Arbitrum +3. Jẹrisi gbigbe igi lori Arbitrum \*Note that you must confirm the transfer within 7 days otherwise your stake may be lost. In most cases, this step will run automatically, but a manual confirmation may be needed if there is a gas price spike on Arbitrum. If there are any issues during this process, there will be resources to help: contact support at support@thegraph.com or on [Discord](https://discord.gg/graphprotocol). @@ -290,23 +290,23 @@ Bẹẹni! Ilana naa yatọ si diẹ, nitori awọn iwe adehun gbigbe ko le fira Lati gbe gbigbe rẹ, iwọ yoo nilo lati pari awọn igbesẹ wọnyi: -1. Bẹrẹ gbigbe gbigbe lori ipilẹ Ethereum +1. Bẹrẹ gbigbe gbigbe lori ipilẹ Ethereum -2. Duro ogun iṣẹju fun ìmúdájú +2. Duro ogun iṣẹju fun ìmúdájú -3. Jẹrisi gbigbe gbigbe lori Arbitrum +3. Jẹrisi gbigbe gbigbe lori Arbitrum ### Bawo ni Mo ṣe gbe iwe adehun gbigbe mi ti o ba ni ẹtọ ni apakan nikan? -1. Fi diẹ ninu ETH sinu adehun ohun elo gbigbe (UI le ṣe iranlọwọ ṣe iṣiro iye to tọ) +1. Fi diẹ ninu ETH sinu adehun ohun elo gbigbe (UI le ṣe iranlọwọ ṣe iṣiro iye to tọ) -2. Firanṣẹ diẹ ninu awọn GRT titiipa nipasẹ iwe adehun irinṣẹ gbigbe, si L2 lati ṣe ipilẹṣẹ titiipa aṣọ-ikele L2. Eyi yoo tun ṣeto adirẹsi alanfani L2 wọn. +2. Firanṣẹ diẹ ninu awọn GRT titiipa nipasẹ iwe adehun irinṣẹ gbigbe, si L2 lati ṣe ipilẹṣẹ titiipa aṣọ-ikele L2. Eyi yoo tun ṣeto adirẹsi alanfani L2 wọn. -3. Firanṣẹ igi/aṣoju wọn si L2 nipasẹ awọn iṣẹ irinṣẹ gbigbe “titiipa” ni adehun L1Staking. +3. Firanṣẹ igi/aṣoju wọn si L2 nipasẹ awọn iṣẹ irinṣẹ gbigbe “titiipa” ni adehun L1Staking. -4. Yọọ kuro eyikeyi ETH ti o ku lati inu adehun irinṣẹ gbigbe +4. Yọọ kuro eyikeyi ETH ti o ku lati inu adehun irinṣẹ gbigbe ### Bawo ni Mo ṣe gbe iwe adehun gbigbe mi ti o ba ni ẹtọ ni kikun? @@ -314,13 +314,13 @@ Lati gbe gbigbe rẹ, iwọ yoo nilo lati pari awọn igbesẹ wọnyi: Fun awọn ti o ni ẹtọ ni kikun, ilana naa jẹ iru: -1. Fi diẹ ninu ETH sinu adehun ohun elo gbigbe (UI le ṣe iranlọwọ ṣe iṣiro iye to tọ) +1. Fi diẹ ninu ETH sinu adehun ohun elo gbigbe (UI le ṣe iranlọwọ ṣe iṣiro iye to tọ) -2. Ṣeto adirẹsi L2 rẹ pẹlu ipe si adehun ohun elo gbigbe +2. Ṣeto adirẹsi L2 rẹ pẹlu ipe si adehun ohun elo gbigbe -3. Firanṣẹ igi/aṣoju rẹ si L2 nipasẹ awọn iṣẹ irinṣẹ gbigbe “titiipa” ni adehun L1 Staking. +3. Firanṣẹ igi/aṣoju rẹ si L2 nipasẹ awọn iṣẹ irinṣẹ gbigbe “titiipa” ni adehun L1 Staking. -4. Yọọ kuro eyikeyi ETH ti o ku lati inu adehun irinṣẹ gbigbe +4. Yọọ kuro eyikeyi ETH ti o ku lati inu adehun irinṣẹ gbigbe ### Ṣe Mo le gbe iwe adehun ifọwọsi mi si Arbitrum? @@ -360,17 +360,17 @@ Awọn igbesẹ wọnyi kan nikan ti iwe adehun rẹ ba tun jẹ idawọle, tabi Lati gbe iwe adehun gbigbe rẹ lọ si L2, iwọ yoo fi iwọntunwọnsi GRT eyikeyi ranṣẹ si L2 ni lilo awọn irinṣẹ gbigbe, eyiti yoo ṣe ipilẹṣẹ adehun isọdọtun L2 rẹ: -1. Fi diẹ ninu ETH sinu adehun irinṣẹ gbigbe (eyi yoo ṣee lo lati sanwo fun gaasi L2) +1. Fi diẹ ninu ETH sinu adehun irinṣẹ gbigbe (eyi yoo ṣee lo lati sanwo fun gaasi L2) -2. Fagilee iraye si ilana si iwe adehun ifọwọyi (nilo fun igbesẹ ti nbọ) +2. Fagilee iraye si ilana si iwe adehun ifọwọyi (nilo fun igbesẹ ti nbọ) -3. Fun ni iraye si ilana si iwe adehun gbigbe (yoo gba adehun rẹ laaye lati ṣe ajọṣepọ pẹlu ohun elo gbigbe) +3. Fun ni iraye si ilana si iwe adehun gbigbe (yoo gba adehun rẹ laaye lati ṣe ajọṣepọ pẹlu ohun elo gbigbe) -4. Pato adirẹsi alanfani L2 kan \* ki o bẹrẹ gbigbe iwọntunwọnsi lori mainnet Ethereum +4. Pato adirẹsi alanfani L2 kan \* ki o bẹrẹ gbigbe iwọntunwọnsi lori mainnet Ethereum -5. Duro ogun iṣẹju fun ìmúdájú +5. Duro ogun iṣẹju fun ìmúdájú -6. Jẹrisi gbigbe iwọntunwọnsi lori L2 +6. Jẹrisi gbigbe iwọntunwọnsi lori L2 \*Ti o ba jẹ dandan - ti o je o nlo adirẹsi adehun kan. From f4f47058c1d35abc2990621c306e29ab0117aa02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:34 -0400 Subject: [PATCH 458/924] New translations l2-transfer-tools-guide.mdx (French) --- .../fr/arbitrum/l2-transfer-tools-guide.mdx | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/website/pages/fr/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/fr/arbitrum/l2-transfer-tools-guide.mdx index 39532e0f5f59..4a93d4d90186 100644 --- a/website/pages/fr/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/fr/arbitrum/l2-transfer-tools-guide.mdx @@ -10,21 +10,21 @@ Certaines questions fréquentes sur ces outils trouvent leur réponse dans la [F -## Benefits of transferring your subgraphs +## Avantages du transfert de vos subgraphs La communauté et les développeurs du Graph se sont préparés (https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) à passer à Arbitrum au cours de l'année écoulée. Arbitrum, une blockchain de couche 2 ou "L2", hérite de la sécurité d'Ethereum mais offre des frais de gaz considérablement réduits. Lorsque vous publiez ou mettez à niveau votre subgraph sur The Graph Network, vous interagissez avec des contrats intelligents sur le protocole, ce qui nécessite de payer le gaz avec ETH. En déplaçant vos subgraphs vers Arbitrum, toute mise à jour future de votre subgraph nécessitera des frais de gaz bien inférieurs. Les frais inférieurs et le fait que les courbes de liaison de curation sur L2 soient plates facilitent également la curation pour les autres conservateurs sur votre subgraph, augmentant ainsi les récompenses des indexeurs sur votre subgraph. Cet environnement moins coûteux rend également moins cher pour les indexeurs l'indexation et la diffusion de votre subgraph. Les récompenses d'indexation augmenteront sur Arbitrum et diminueront sur le réseau principal Ethereum au cours des prochains mois, de sorte que de plus en plus d'indexeurs transféreront leur participation et établiront leurs opérations sur L2. -## Understanding what happens with signal, your L1 subgraph and query URLs +## Comprendre ce qui se passe avec le signal, votre subgraph L1 et les URL de requête -Transferring a subgraph to Arbitrum uses the Arbitrum GRT bridge, which in turn uses the native Arbitrum bridge, to send the subgraph to L2. The "transfer" will deprecate the subgraph on mainnet and send the information to re-create the subgraph on L2 using the bridge. It will also include the subgraph owner's signaled GRT, which must be more than zero for the bridge to accept the transfer. +Le transfert d'un subgraph vers Arbitrum utilise le pont GRT sur Arbitrum, qui à son tour utilise le pont natif d'Arbitrum, pour envoyer le subgraph vers L2. Le 'transfert' va déprécier le subgraph sur le mainnet et envoyer les informations pour recréer le subgraph sur L2 en utilisant le pont. Il inclura également les GRT signalés par le propriétaire du subgraph, qui doivent être supérieurs à zéro pour que le pont accepte le transfert. -Lorsque vous choisissez de transférer le subgraph, cela convertira tous les signaux de curation du subgraph en GRT. Cela équivaut à "déprécier" le subgraph sur le mainnet. Les TRG correspondant à votre curation seront envoyés à L2 avec le subgraph, où ils seront utilisés pour monnayer des signaux en votre nom. +Lorsque vous choisissez de transférer le subgraph, cela convertira tous les signaux de curation du subgraph en GRT. Cela équivaut à "déprécier" le subgraph sur le mainnet. Les GRT correspondant à votre curation seront envoyés à L2 avec le subgraph, où ils seront utilisés pour monnayer des signaux en votre nom. Les autres curateurs peuvent choisir de retirer leur fraction de GRT ou de la transférer également à L2 pour le signal de monnayage sur le même subgraph. Si un propriétaire de subgraph ne transfère pas son subgraph à L2 et le déprécie manuellement via un appel de contrat, les curateurs en seront informés et pourront retirer leur curation. -Dès que le subgraph est transféré, puisque toute la curation est convertie en TRG, les indexeurs ne recevront plus de récompenses pour l'indexation du subgraph. Cependant, certains indexeurs 1) continueront à servir les subgraphs transférés pendant 24 heures et 2) commenceront immédiatement à indexer le subgraph sur L2. Comme ces indexeurs ont déjà indexé le subgraph, il ne devrait pas être nécessaire d'attendre la synchronisation du subgraph, et il sera possible d'interroger le subgraph L2 presque immédiatement. +Dès que le subgraph est transféré, puisque toute la curation est convertie en GRT, les indexeurs ne recevront plus de récompenses pour l'indexation du subgraph. Cependant, certains indexeurs 1) continueront à servir les subgraphs transférés pendant 24 heures et 2) commenceront immédiatement à indexer le subgraph sur L2. Comme ces indexeurs ont déjà indexé le subgraph, il ne devrait pas être nécessaire d'attendre la synchronisation du subgraph, et il sera possible d'interroger le subgraph L2 presque immédiatement. Les requêtes vers le subgraph L2 devront être effectuées vers une URL différente (sur `arbitrum-gateway.thegraph.com`), mais l'URL L1 continuera à fonctionner pendant au moins 48 heures. Après cela, la passerelle L1 transmettra les requêtes à la passerelle L2 (pendant un certain temps), mais cela augmentera la latence. Il est donc recommandé de basculer toutes vos requêtes vers la nouvelle URL dès que possible. @@ -36,7 +36,7 @@ Lors du transfert du subgraph vers Arbitrum, vous pouvez choisir un autre portef Si vous utilisez un portefeuille "normal" comme MetaMask (un Externally Owned Account ou EOA, c'est-à-dire un portefeuille qui n'est pas un smart contract), cette étape est facultative et il est recommandé de conserver la même adresse de propriétaire que dans L1.portefeuille. -If you're using a smart contract wallet, like a multisig (e.g. a Safe), then choosing a different L2 wallet address is mandatory, as it is most likely that this account only exists on mainnet and you will not be able to make transactions on Arbitrum using this wallet. If you want to keep using a smart contract wallet or multisig, create a new wallet on Arbitrum and use its address as the L2 owner of your subgraph. +Si vous utilisez un portefeuille de smart contrat, comme un multisig (par exemple un Safe), alors choisir une adresse de portefeuille L2 différente est obligatoire, car il est très probable que ce compte n'existe que sur le mainnet et vous ne pourrez pas faire de transactions sur Arbitrum en utilisant ce portefeuille. Si vous souhaitez continuer à utiliser un portefeuille de contrat intelligent ou un multisig, créez un nouveau portefeuille sur Arbitrum et utilisez son adresse comme propriétaire L2 de votre subgraph. **Il est très important d'utiliser une adresse de portefeuille que vous contrôlez, et qui peut effectuer des transactions sur Arbitrum. Dans le cas contraire, le subgraph sera perdu et ne pourra pas être récupéré** @@ -50,13 +50,13 @@ Vous pouvez acheter de l'ETH sur certains échanges et le retirer directement su Vous pouvez trouver l'outil de transfert L2 lorsque vous consultez la page de votre subgraph dans le Subgraph Studio : -![transfer tool](/img/L2-transfer-tool1.png) +![outil de transfert](/img/L2-transfer-tool1.png) Elle est également disponible sur Explorer si vous êtes connecté au portefeuille qui possède un subgraph et sur la page de ce subgraph sur Explorer : -![Transferring to L2](/img/transferToL2.png) +![Transfert vers L2](/img/transferToL2.png) -Clicking on the Transfer to L2 button will open the transfer tool where you can start the transfer process. +En cliquant sur le bouton Transférer vers L2, vous ouvrirez l'outil de transfert qui vous permettra de lancer la procédure de transfert. ## Étape 1 : Démarrer le transfert @@ -74,11 +74,11 @@ Si vous exécutez cette étape, **assurez-vous de continuer jusqu'à terminer l' After you start the transfer, the message that sends your L1 subgraph to L2 must propagate through the Arbitrum bridge. This takes approximately 20 minutes (the bridge waits for the mainnet block containing the transaction to be "safe" from potential chain reorgs). -Once this wait time is over, Arbitrum will attempt to auto-execute the transfer on the L2 contracts. +Une fois ce temps d'attente terminé, le réseau Arbitrum tentera d'exécuter automatiquement le transfert sur les contrats L2. -![Wait screen](/img/screenshotOfWaitScreenL2.png) +![Écran d'attente](/img/screenshotOfWaitScreenL2.png) -## Step 3: Confirming the transfer +## Étape 3 : Confirmer le transfert In most cases, this step will auto-execute as the L2 gas included in step 1 should be sufficient to execute the transaction that receives the subgraph on the Arbitrum contracts. In some cases, however, it is possible that a spike in gas prices on Arbitrum causes this auto-execution to fail. In this case, the "ticket" that sends your subgraph to L2 will be pending and require a retry within 7 days. @@ -86,9 +86,9 @@ If this is the case, you will need to connect using an L2 wallet that has some E [Confirmer le transfert vers L2](/img/confirmTransferToL2.png) -## Step 4: Finishing the transfer on L2 +## Étape 4 : Terminer le transfert sur L2 -À ce stade, votre subgraph et votre GRT ont été reçus sur Arbitrum, mais le subgraph n'est pas encore publié. Vous devrez vous connecter à l'aide du portefeuille L2 que vous avez choisi comme portefeuille de réception, basculer votre réseau de portefeuille sur Arbitrum et cliquer sur « Publier le subgraph » +À ce stade, votre subgraph et vos GRT ont été reçus sur Arbitrum, mais le subgraph n'est pas encore publié. Vous devrez vous connecter à l'aide du portefeuille L2 que vous avez choisi comme portefeuille de réception, basculer votre réseau de portefeuille sur Arbitrum et cliquer sur « Publier le subgraph.» ![Publier le subgraph](/img/publishSubgraphL2TransferTools.png) @@ -96,7 +96,7 @@ If this is the case, you will need to connect using an L2 wallet that has some E Cela permettra de publier le subgraph afin que les indexeurs opérant sur Arbitrum puissent commencer à le servir. Il va également modifier le signal de curation en utilisant les GRT qui ont été transférés de L1. -## Step 5: Updating the query URL +## Étape 5 : Mise à jour de l'URL de la requête Votre subgraph a été transféré avec succès vers Arbitrum ! Pour interroger le subgraph, la nouvelle URL sera : @@ -104,13 +104,13 @@ https://arbitrum-gateway.thegraph.com/api/[api-key]/subgraphs/id/[l2-subgraph-id Notez que l'ID du subgraph sur Arbitrum sera différent de celui que vous aviez sur le mainnet, mais vous pouvez toujours le trouver sur Explorer ou Studio. Comme mentionné ci-dessus (voir "Comprendre ce qui se passe avec le signal, votre subgraph L1 et les URL de requête"), l'ancienne URL L1 sera prise en charge pendant une courte période, mais vous devez basculer vos requêtes vers la nouvelle adresse dès que le subgraph aura été synchronisé. sur L2. -## How to transfer your curation to Arbitrum (L2) +## Comment transférer votre curation vers Arbitrum (L2) ## Comprendre ce qui arrive à la curation lors des transferts de subgraphs vers L2 Lorsque le propriétaire d'un subgraph transfère un subgraph vers Arbitrum, tout le signal du subgraph est converti en GRT en même temps. Cela s'applique au signal "auto-migré", c'est-à-dire au signal qui n'est pas spécifique à une version de subgraph ou à un déploiement, mais qui suit la dernière version d'un subgraph. -Cette conversion du signal en GRT est identique à ce qui se produirait si le propriétaire du subgraph dépréciait le subgraph en L1. Lorsque le subgraph est déprécié ou transféré, tout le signal de curation est "brûlé" simultanément (en utilisant la courbe de liaison de curation) et le TRG résultant est détenu par le contrat intelligent GNS (c'est-à-dire le contrat qui gère les mises à niveau des subgraphs et le signal auto-migré). Chaque curateur de ce subgraph a donc un droit sur cette TRG proportionnel à la quantité de parts qu'il avait pour le subgraph. +Cette conversion du signal en GRT est identique à ce qui se produirait si le propriétaire du subgraph dépréciait le subgraph en L1. Lorsque le subgraph est déprécié ou transféré, tout le signal de curation est "brûlé" simultanément (en utilisant la courbe de liaison de curation) et le GRT résultant est détenu par le contrat intelligent GNS (c'est-à-dire le contrat qui gère les mises à niveau des subgraphs et le signal auto-migré). Chaque Curateur de ce subgraph a donc droit à ce GRT de manière proportionnelle à la quantité de parts qu'il détenait pour le subgraph. Une fraction de ces GRT correspondant au propriétaire du subgraph est envoyée à L2 avec le subgraph. @@ -138,19 +138,19 @@ Signal de transfert](/img/transferSignalL2TransferTools.png) Après avoir ouvert l'outil de transfert, vous serez peut-être invité à ajouter de l'ETH à votre portefeuille si vous n'en avez pas. Vous pourrez ensuite saisir l'adresse du portefeuille L2 dans le champ "Adresse du portefeuille de réception" - **assurez-vous d'avoir saisi la bonne adresse ici**. En cliquant sur Transfer Signal, vous serez invité à exécuter la transaction sur votre portefeuille (notez qu'une certaine valeur ETH est incluse pour payer le gaz L2) ; cela lancera le transfert. -If you execute this step, **make sure you proceed until completing step 3 in less than 7 days, or your signal GRT will be lost.** This is due to how L1-L2 messaging works on Arbitrum: messages that are sent through the bridge are "retryable tickets" that must be executed within 7 days, and the initial execution might need a retry if there are spikes in the gas price on Arbitrum. +Si vous exécutez cette étape, **assurez-vous de procéder jusqu'à la complétion de l'étape 3 en moins de 7 jours, sinon vos GRT signalés seront perdus.** Cela est dû à la façon dont la messagerie L1-L2 fonctionne sur Arbitrum : les messages qui sont envoyés à travers le pont sont des "tickets à retenter" qui doivent être exécutés dans les 7 jours, et l'exécution initiale peut nécessiter une nouvelle tentative s'il y a des pics dans le prix du gaz sur Arbitrum. ## Envoi de la curation vers L2 : étape 2 -Starting the transfer: +Démarrage du transfert : -![Send signal to L2](/img/sendingCurationToL2Step2First.png) +![Envoyer un signal à L2](/img/sendingCurationToL2Step2First.png) Une fois que vous avez commencé le transfert, le message qui envoie votre curation L1 à L2 doit se propager à travers le pont Arbitrum. Cela prend environ 20 minutes (le pont attend que le bloc du mainnet contenant la transaction soit "à l'abri" d'une éventuelle réorganisation de la chaîne). -Once this wait time is over, Arbitrum will attempt to auto-execute the transfer on the L2 contracts. +Une fois ce temps d'attente passé, Arbitrum tentera d'exécuter automatiquement le transfert sur les contrats L2. -![Sending curation signal to L2](/img/sendingCurationToL2Step2Second.png) +![Envoi du signal de curation à L2](/img/sendingCurationToL2Step2Second.png) ## Envoi de la curation vers L2 : étape 3 @@ -158,7 +158,7 @@ Dans la plupart des cas, cette étape s'exécutera automatiquement car le gaz L2 Si c'est le cas, vous devrez vous connecter en utilisant un portefeuille L2 qui a quelques ETH sur Arbitrum, changer le réseau de votre portefeuille pour Arbitrum, et cliquer sur "Confirmer le transfert" pour réessayer la transaction. -![Send signal to L2](/img/L2TransferToolsFinalCurationImage.png) +![Envoyer un signal à L2](/img/L2TransferToolsFinalCurationImage.png) ## Retrait de la curation sur L1 From f2501913fbe694d2f35ab3d090472cc7cb02644e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:35 -0400 Subject: [PATCH 459/924] New translations l2-transfer-tools-guide.mdx (Spanish) --- website/pages/es/arbitrum/l2-transfer-tools-guide.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/es/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/es/arbitrum/l2-transfer-tools-guide.mdx index 42806d672130..8d7a80ff16cf 100644 --- a/website/pages/es/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/es/arbitrum/l2-transfer-tools-guide.mdx @@ -12,7 +12,7 @@ Algunas preguntas frecuentes sobre estas herramientas se responden en las [Pregu ## Beneficios de transferir tus subgrafos -La comunidad de The Graph y los core devs se han [estado preparando] \(https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) para migrar a Arbitrum durante el último año. Arbitrum, una blockchain de capa 2 o "L2", hereda la seguridad de Ethereum pero ofrece tarifas de gas considerablemente más bajas. +La comunidad de The Graph y los core devs se han [estado preparando] (https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) para migrar a Arbitrum durante el último año. Arbitrum, una blockchain de capa 2 o "L2", hereda la seguridad de Ethereum pero ofrece tarifas de gas considerablemente más bajas. Cuando publicas o actualizas tus subgrafos en The Graph Network, estás interactuando con contratos inteligentes en el protocolo, lo cual requiere pagar por gas utilizando ETH. Al mover tus subgrafos a Arbitrum, cualquier actualización futura de tu subgrafo requerirá tarifas de gas mucho más bajas. Las tarifas más bajas, y el hecho de que las bonding curves de curación en L2 son planas, también facilitan que otros Curadores realicen curación en tu subgrafo, aumentando las recompensas para los Indexadores en tu subgrafo. Este contexto con tarifas más económicas también hace que sea más barato para los Indexadores indexar y servir tu subgrafo. Las recompensas por indexación aumentarán en Arbitrum y disminuirán en Ethereum mainnet en los próximos meses, por lo que cada vez más Indexadores transferirán su stake y establecerán sus operaciones en L2. From b43d175a2ed586bc9a40edf8f73ea7040baffea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:36 -0400 Subject: [PATCH 460/924] New translations l2-transfer-tools-guide.mdx (Arabic) --- .../ar/arbitrum/l2-transfer-tools-guide.mdx | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/website/pages/ar/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/ar/arbitrum/l2-transfer-tools-guide.mdx index 6b4031767fb4..f88e5b58f0e9 100644 --- a/website/pages/ar/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/ar/arbitrum/l2-transfer-tools-guide.mdx @@ -1,10 +1,10 @@ --- -title: دليل أدوات نقل(Transfer Tools) L2 +title: L2 Transfer Tools Guide --- -جعل The Graph من السهل الانتقال إلى L2 على Arbitrum One. لكل مشارك في البروتوكول ، توجد مجموعة من أدوات نقل L2 لجعل النقل إلى L2 سلسًا لجميع المشاركين في الشبكة. ستطلب منك هذه الأدوات اتباع مجموعة محددة من الخطوات بناءً على ما تقوم بنقله. +يسهل الغراف الانتقال إلى الطبقة الثانبة على أربترم. لكل مشارك في البروتوكول ، توجد مجموعة من أدوات نقل الطبقة الثانبة لجعل النقل إليها سلسًا لجميع المشاركين في الشبكة. ستطلب منك هذه الأدوات اتباع مجموعة محددة من الخطوات بناءً على ما تقوم بنقله. -بعض الأسئلة المتكررة حول هذه الأدوات تمت الإجابة عليها في [الأسئلة الشائعة حول أدوات نقل الطبقة الثانية] \(/arbitrum/l2-transfer-tools-faq). تحتوي الأسئلة الشائعة على تفسيرات متعمقة لكيفية استخدام الأدوات وكيفية عملها والأمور التي يجب وضعها في الاعتبار عند إستخدامها. +بعض الأسئلة المتكررة حول هذه الأدوات تمت الإجابة عليها في [الأسئلة الشائعة حول أدوات نقل الطبقة الثانية] (/arbitrum/l2-transfer-tools-faq). تحتوي الأسئلة الشائعة على تفسيرات متعمقة لكيفية استخدام الأدوات وكيفية عملها والأمور التي يجب وضعها في الاعتبار عند إستخدامها. ## كيف تنقل الغراف الفرعي الخاص بك إلى شبكة آربترم (الطبقة الثانية) @@ -12,7 +12,7 @@ title: دليل أدوات نقل(Transfer Tools) L2 ## فوائد نقل الغراف الفرعي الخاصة بك -مجتمع الغراف والمطورون الأساسيون كانوا [يستعدون] \(https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) للإنتقال إلى آربترم على مدى العام الماضي. وتعتبر آربترم سلسلة كتل من الطبقة الثانية أو "L2"، حيث ترث الأمان من سلسلة الإيثيريوم ولكنها توفر رسوم غازٍ أقل بشكلٍ كبير. +مجتمع الغراف والمطورون الأساسيون كانوا [يستعدون] (https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) للإنتقال إلى آربترم على مدى العام الماضي. وتعتبر آربترم سلسلة كتل من الطبقة الثانية أو "L2"، حيث ترث الأمان من سلسلة الإيثيريوم ولكنها توفر رسوم غازٍ أقل بشكلٍ كبير. عندما تقوم بنشر أو ترقية الغرافات الفرعية الخاصة بك إلى شبكة الغراف، فأنت تتفاعل مع عقودٍ ذكيةٍ في البروتوكول وهذا يتطلب دفع رسوم الغاز باستخدام عملة الايثيريوم. من خلال نقل غرافاتك الفرعية إلى آربترم، فإن أي ترقيات مستقبلية لغرافك الفرعي ستتطلب رسوم غازٍ أقل بكثير. الرسوم الأقل، وكذلك حقيقة أن منحنيات الترابط التنسيقي على الطبقة الثانية مستقيمة، تجعل من الأسهل على المنسِّقين الآخرين تنسيق غرافك الفرعي، ممّا يزيد من مكافآت المفهرِسين على غرافك الفرعي. هذه البيئة ذات التكلفة-الأقل كذلك تجعل من الأرخص على المفهرسين أن يقوموا بفهرسة وخدمة غرافك الفرعي. سوف تزداد مكافآت الفهرسة على آربترم وتتناقص على شبكة إيثيريوم الرئيسية على مدى الأشهر المقبلة، لذلك سيقوم المزيد والمزيد من المُفَهرِسين بنقل ودائعهم المربوطة وتثبيت عملياتهم على الطبقة الثانية. @@ -42,35 +42,35 @@ title: دليل أدوات نقل(Transfer Tools) L2 ## التحضير لعملية النقل: إنشاء جسر لـبعض ETH -يتضمن نقل الرسم البياني الفرعي إرسال معاملة عبر الجسر ، ثم تنفيذ معاملة أخرى على Arbitrum. تستخدم المعاملة الأولى ETH على mainnet ، وتتضمن بعض ETH لدفع ثمن الغاز عند استلام الرسالة على L2. ومع ذلك ، إذا كان هذا الغاز غير كافٍ ، فسيتعين عليك إعادة إجراء المعاملة ودفع ثمن الغاز مباشرةً على L2 (هذه هي "الخطوة 3: تأكيد التحويل" أدناه). يجب تنفيذ هذه الخطوة ** في غضون 7 أيام من بدء التحويل **. علاوة على ذلك ، سيتم إجراء المعاملة الثانية مباشرة على Arbitrum ("الخطوة 4: إنهاء التحويل على L2"). لهذه الأسباب ، ستحتاج إلى بعض ETH في محفظة Arbitrum. إذا كنت تستخدم multisig أو عقداً ذكياً ، فيجب أن يكون ETH في المحفظة العادية (EOA) التي تستخدمها لتنفيذ المعاملات ، وليس على محفظة multisig نفسها. +يتضمن نقل الغراف الفرعي إرسال معاملة عبر الجسر ، ثم تنفيذ معاملة أخرى على شبكة أربترم. تستخدم المعاملة الأولى الإيثيريوم على الشبكة الرئيسية ، وتتضمن بعضًا من إيثيريوم لدفع ثمن الغاز عند استلام الرسالة على الطبقة الثانية. ومع ذلك ، إذا كان هذا الغاز غير كافٍ ، فسيتعين عليك إعادة إجراء المعاملة ودفع ثمن الغاز مباشرةً على الطبقة الثانية (هذه هي "الخطوة 3: تأكيد التحويل" أدناه). يجب تنفيذ هذه الخطوة ** في غضون 7 أيام من بدء التحويل **. علاوة على ذلك ، سيتم إجراء المعاملة الثانية مباشرة على شبكة أربترم ("الخطوة 4: إنهاء التحويل على الطبقة الثانية"). لهذه الأسباب ، ستحتاج بعضًا من إيثيريوم في محفظة أربترم. إذا كنت تستخدم متعدد التواقيع أو عقداً ذكياً ، فيجب أن يكون هناك بعضًا من إيثيريوم في المحفظة العادية (حساب مملوك خارجيا) التي تستخدمها لتنفيذ المعاملات ، وليس على محفظة متعددة التواقيع. -يمكنك شراء ETH من بعض المنصات وسحبها مباشرة إلى Arbitrum ، أو يمكنك استخدام جسر Arbitrum لإرسال ETH من محفظة mainnet إلى L2: [bridge.arbitrum.io] \(http://bridge.arbitrum.io). نظرًا لأن رسوم الغاز على Arbitrum أقل ، فستحتاج فقط إلى مبلغ صغير. من المستحسن أن تبدأ بمبلغ منخفض (0 على سبيل المثال ، 01 ETH) للموافقة على معاملتك. +يمكنك شراء إيثيريوم من بعض المنصات وسحبها مباشرة إلى أربترم، أو يمكنك استخدام جسر أربترم لإرسال إيثيريوم من محفظة الشبكة الرئيسيةإلى الطبقة الثانية: [bridge.arbitrum.io] (http://bridge.arbitrum.io). نظرًا لأن رسوم الغاز على أربترم أقل ، فستحتاج فقط إلى مبلغ صغير. من المستحسن أن تبدأ بمبلغ منخفض (0 على سبيل المثال ، 01 ETH) للموافقة على معاملتك. -## العثور على أداة نقل الرسم البياني الفرعي +## العثور على أداة نقل الغراف الفرعي يمكنك العثور على أداة نقل L2 في صفحة الرسم البياني الفرعي الخاص بك على Subgraph Studio: -![transfer tool](/img/L2-transfer-tool1.png) +![أداة النقل](/img/L2-transfer-tool1.png) -ويتوفر أيضًا على Explorer إذا كنت متصلاً بالمحفظة التي تمتلك رسمًا بيانيًا فرعيًا ويتوفر أيضًا في صفحة ذلك الرسم البياني الفرعي في Explorer: +إذا كنت متصلاً بالمحفظة التي تمتلك الغراف الفرعي، فيمكنك الوصول إليها عبر المستكشف، وذلك عن طريق الانتقال إلى صفحة الغراف الفرعي على المستكشف: ![Transferring to L2](/img/transferToL2.png) -سيؤدي النقر فوق الزر Transfer to L2 إلى فتح أداة النقل حيث يمكنك بدء عملية النقل. +سيؤدي النقر فوق زر النقل إلى الطبقة الثانية إلى فتح أداة النقل حيث يمكنك بدء عملية النقل. ## الخطوة 1: بدء عملية النقل -قبل بدء النقل ، يجب أن تقرر العنوان الذي سيمتلك الرسم البياني الفرعي على L2 (راجع "اختيار محفظة L2 الخاصة بك" أعلاه) ، ويوصى بشدة بالحصول على بعض ETH لرسوم الغاز الذي تم ربطه بالفعل على Arbitrum (راجع "التحضير للنقل: إنشاء جسر لبعض ETH "أعلاه). +قبل بدء عملية النقل، يجب أن تقرر أي عنوان سيكون مالكًا للغراف الفرعي على الطبقة الثانية (انظر "اختيار محفظة الطبقة الثانية" أعلاه)، ويُوصَى بشدة بأن يكون لديك بعضًا من الإيثيريوم لرسوم الغاز على أربترم. يمكنك الاطلاع على (التحضير لعملية النقل: تحويل بعضًا من إيثيريوم عبر الجسر." أعلاه). يرجى أيضًا ملاحظة أن نقل الرسم البياني الفرعي يتطلب وجود كمية غير صفرية من إشارة التنسيق عليه بنفس الحساب الذي يمتلك الرسم البياني الفرعي ؛ إذا لم تكن قد أشرت إلى الرسم البياني الفرعي ، فسيتعين عليك إضافة القليل من إشارة التنسيق (يكفي إضافة مبلغ صغير مثل 1 GRT). -بعد فتح أداة النقل ، ستتمكن من إدخال عنوان المحفظة L2 في حقل "Receiving wallet address" - ** تأكد من إدخال العنوان الصحيح هنا **. سيطالبك النقر فوق Transfer Subgraph بتنفيذ المعاملة على محفظتك (لاحظ أنه يتم تضمين مبلغ من ETH لدفع ثمن غاز L2) ؛ سيؤدي هذا إلى بدء النقل وإيقاف الرسم البياني الفرعي L1 (راجع "فهم ما يحدث للإشارة والرسم الفرعي L1 وعناوين URL للاستعلام" أعلاه لمزيد من التفاصيل حول ما يحدث وراء الكواليس). +بعد فتح أداة النقل، ستتمكن من إدخال عنوان المحفظة في الطبقة الثانية في حقل "عنوان محفظة الاستلام". تأكد من إدخال العنوان الصحيح هنا. بعد ذلك، انقر على "نقل الغراف الفرعي"، وسيتم طلب تنفيذ العملية في محفظتك. (يُرجى ملاحظة أنه يتم تضمين بعضًا من الإثيريوم لدفع رسوم الغاز في الطبقة الثانية). بعد تنفيذ العملية، سيتم بدء عملية النقل وإهمال الغراف الفرعي في الطبقة الأولى. (يمكنك الاطلاع على "فهم ما يحدث مع الإشارة والغراف الفرعي في الطبقة الأولى وعناوين الاستعلام" أعلاه لمزيد من التفاصيل حول ما يحدث خلف الكواليس). -إذا قمت بتنفيذ هذه الخطوة ، ** تأكد من المتابعة حتى إكمال الخطوة 3 في أقل من 7 أيام ، وإلا فسيتم فقد الرسم البياني الفرعي وإشارة GRT. ** هذا بسبب كيفية عمل رسائل L1-L2 على Arbitrum: الرسائل التي يتم إرسالها عبر الجسر وهي "retry-able tickets" يجب تنفيذها في غضون 7 أيام ، وقد يحتاج التنفيذ الأولي إلى إعادة المحاولة إذا كانت هناك ارتفاع في سعر الغاز على Arbitrum. +إذا قمت بتنفيذ هذه الخطوة، \*\*يجب عليك التأكد من أنك ستستكمل الخطوة 3 في غضون 7 أيام، وإلا فإنك ستفقد الغراف الفرعي والإشارة GRT الخاصة بك. يرجع ذلك إلى آلية التواصل بين الطبقة الأولى والطبقة الثانية في أربترم: الرسائل التي ترسل عبر الجسر هي "تذاكر قابلة لإعادة المحاولة" يجب تنفيذها في غضون 7 أيام، وقد يتطلب التنفيذ الأولي إعادة المحاولة إذا كان هناك زيادة في سعر الغاز على أربترم. -! [ابدأ النقل إلى L2] \(/ img / startTransferL2.png) +! [ابدأ النقل إلى الطبقة الثانية] (/ img / startTransferL2.png) -## الخطوة 2: انتظار وصول الرسم البياني الفرعي إلى L2 +## الخطوة 2: الانتظار حتى يتم نقل الغراف الفرعي إلى الطبقة الثانية بعد بدء عملية النقل، يتعين على الرسالة التي ترسل الـ subgraph من L1 إلى L2 أن يتم نشرها عبر جسر Arbitrum. يستغرق ذلك حوالي 20 دقيقة (ينتظر الجسر لكتلة الشبكة الرئيسية التي تحتوي على المعاملة حتى يتأكد أنها "آمنة" من إمكانية إعادة ترتيب السلسلة). @@ -80,86 +80,86 @@ title: دليل أدوات نقل(Transfer Tools) L2 ## الخطوة الثالثة: تأكيد التحويل -في معظم الحالات ، سيتم تنفيذ هذه الخطوة تلقائيًا لأن غاز L2 المضمن في الخطوة 1 يجب أن يكون كافيًا لتنفيذ المعاملة التي تتلقى الرسم البياني الفرعي في عقود Arbitrum. ومع ذلك ، في بعض الحالات ، من الممكن أن يؤدي ارتفاع أسعار الغاز على Arbitrum إلى فشل هذا التنفيذ التلقائي. في هذه الحالة ، ستكون "التذكرة" التي ترسل مخططك الفرعي إلى L2 معلقة وتتطلب إعادة المحاولة في غضون 7 أيام. +في معظم الحالات ، سيتم تنفيذ هذه الخطوة تلقائيًا لأن غاز الطبقة الثانية المضمن في الخطوة 1 يجب أن يكون كافيًا لتنفيذ المعاملة التي تتلقى الغراف الفرعي في عقود أربترم. ومع ذلك ، في بعض الحالات ، من الممكن أن يؤدي ارتفاع أسعار الغاز على أربترم إلى فشل هذا التنفيذ التلقائي. وفي هذه الحالة ، ستكون "التذكرة" التي ترسل غرافك الفرعي إلى الطبقة الثانية معلقة وتتطلب إعادة المحاولة في غضون 7 أيام. -في هذا الحالة ، فستحتاج إلى الاتصال باستخدام محفظة على L2 تحتوي بعضاً من ETH على Arbitrum ، وتبديل شبكة محفظتك إلى Arbitrum ، والنقر فوق "Confirm Transfer" لإعادة محاولة المعاملة. +في هذا الحالة ، فستحتاج إلى الاتصال باستخدام محفظة الطبقة الثانية والتي تحتوي بعضاً من إيثيريوم على أربترم، قم بتغيير شبكة محفظتك إلى أربترم، والنقر فوق "تأكيد النقل" لإعادة محاولة المعاملة. -![تأكيد النقل إلى L2](/img/confirmTransferToL2.png) +![تأكيد النقل إلى الطبقة الثانية](/img/confirmTransferToL2.png) ## الخطوة 4: إنهاء عملية النقل على L2 -في هذه المرحلة ، فإنه قد تم استلام الرسم البياني الفرعي و GRT على Arbitrum ، ولكن لم يتم نشر الرسم البياني الفرعي بعد. ستحتاج إلى الاتصال باستخدام محفظة L2 التي اخترتها كمحفظة استقبال ، وتبديل شبكة محفظتك إلى Arbitrum ، والنقر فوق "Publish Subgraph" +في هذه المرحلة، تم استلام الغراف الفرعي والـ GRT الخاص بك على أربترم، ولكن الغراف الفرعي لم يتم نشره بعد. ستحتاج إلى الربط باستخدام محفظة الطبقة الثانية التي اخترتها كمحفظة استلام، وتغيير شبكة محفظتك إلى أربترم، ثم النقر على "نشر الغراف الفرعي" -![نشر الـ subgraph](/img/publishSubgraphL2TransferTools.png) +![نشر الغراف الفرعي](/img/publishSubgraphL2TransferTools.png) -![انتظر حتى يتم نشر الرسم البياني الفرعي](/img/waitForSubgraphToPublishL2TransferTools.png) +![انتظر حتى يتم نشر الغراف الفرعي](/img/waitForSubgraphToPublishL2TransferTools.png) -سيؤدي هذا إلى نشر الرسم البياني الفرعي حتى يتمكن المفهرسون الذين يعملون في Arbitrum البدء في تقديم الخدمة. كما أنه سيعمل أيضًا على إصدار إشارة التنسيق باستخدام GRT التي تم نقلها من L1. +سيؤدي هذا إلى نشر الغراف الفرعي حتى يتمكن المفهرسون الذين يعملون في أربترم بالبدء في تقديم الخدمة. كما أنه سيعمل أيضًا على إصدار إشارة التنسيق باستخدام GRT التي تم نقلها من الطبقة الأولى. -## الخطوة 5: تحديث عنوان URL للاستعلام +## Step 5: Updating the query URL -تم نقل الرسم البياني الفرعي الخاص بك بنجاح إلى Arbitrum! للاستعلام عن الرسم البياني الفرعي ، سيكون عنوان URL الجديد هو: +تم نقل غرافك الفرعي بنجاح إلى أربترم! للاستعلام عن الغراف الفرعي ، سيكون عنوان URL الجديد هو: `https://arbitrum-gateway.thegraph.com/api/[api-key]/subgraphs/id/[l2-subgraph-id]` -لاحظ أن subgraph ID على Arbitrum سيكون مختلفًا عن الذي لديك على mainnet ، ولكن يمكنك العثور عليه في Explorer أو Studio. كما هو مذكور أعلاه (راجع "فهم ما يحدث للإشارة والرسم الفرعي L1 وعناوين URL للاستعلام") سيتم دعم عنوان L1 URLالقديم لفترة قصيرة ، ولكن يجب عليك تبديل استعلاماتك إلى العنوان الجديد بمجرد مزامنة الرسم البياني الفرعي على L2. +لاحظ أن ID الغراف الفرعي على أربترم سيكون مختلفًا عن الذي لديك في الشبكة الرئيسية، ولكن يمكنك العثور عليه في المستكشف أو استوديو. كما هو مذكور أعلاه (راجع "فهم ما يحدث للإشارة والغراف الفرعي في الطبقة الأولى وعناوين الاستعلام") سيتم دعم عنوان URL الطبقة الأولى القديم لفترة قصيرة ، ولكن يجب عليك تبديل استعلاماتك إلى العنوان الجديد بمجرد مزامنة الغراف الفرعي على الطبقة الثانية. -## كيفية نقل التنسيق الخاص بك إلى Arbitrum (L2) +## كيفية نقل التنسيق الخاص بك إلى أربترم (الطبقة الثانية) -## فهم ما يحدث لعملية التنسيق خلال عمليات نقل الـ subgraph إلى L2 +## Understanding what happens to curation on subgraph transfers to L2 -عندما ينقل مالك الرسم البياني الفرعي رسمًا فرعيًا إلى Arbitrum ، يتم تحويل كل إشارات الرسم البياني الفرعي لـ GRT في نفس الوقت. ينطبق هذا على الإشارة "التي تم ترحيلها تلقائيًا" ، وهي الإشارة التي لا ترتبط بنسخة محددة أو نشر محدد للرسم البياني الفرعي ولكنها تتبع أحدث إصدار من الرسم البياني الفرعي. +When the owner of a subgraph transfers a subgraph to Arbitrum, all of the subgraph's signal is converted to GRT at the same time. This applies to "auto-migrated" signal, i.e. signal that is not specific to a subgraph version or deployment but that follows the latest version of a subgraph. -هذا التحويل من الإشارة لـ GRT هو نفس ما سيحدث إذا قام مالك الرسم البياني الفرعي بإيقاف الرسم البياني الفرعي في L1. عندما يتم إيقاف الرسم البياني الفرعي أو نقله ، يتم "حرق" جميع إشارات التنسيق في وقت واحد (باستخدام منحنى ربط التنسيق) ويتم الاحتفاظ بـ GRT الناتج بواسطة عقد GNS الذكي (هذا هو العقد الذي يعالج ترقيات الرسم البياني الفرعي ويعالج الإشارة التي تم ترحيلها تلقائيًا). وبالتالي ، فإن كل منسق(Curator) على هذا الرسم البياني الفرعي لديه الحق في المطالبة بـ GRT تتناسب مع كمية الأسهم التي يمتلكها في الرسم البياني الفرعي. +This conversion from signal to GRT is the same as what would happen if the subgraph owner deprecated the subgraph in L1. When the subgraph is deprecated or transferred, all curation signal is "burned" simultaneously (using the curation bonding curve) and the resulting GRT is held by the GNS smart contract (that is the contract that handles subgraph upgrades and auto-migrated signal). Each Curator on that subgraph therefore has a claim to that GRT proportional to the amount of shares they had for the subgraph. -جزء من تلك الـ GRT يتم إرسالها لمالك الرسم البياني الفرعي إلى L2 جمباً إلى جمب مع الرسم البياني الفرعي. +A fraction of these GRT corresponding to the subgraph owner is sent to L2 together with the subgraph. -في هذه المرحلة ، لن يتراكم أي رسوم استعلام أخرى على الـ GRT المنسقة ، لذلك يمكن للمنسقين اختيار سحب GRT أو نقلها إلى نفس الرسم البياني الفرعي على L2 ، حيث يمكن استخدامها لاصدار إشارة تنسيق جديدة. لا داعي للعجلة للقيام بذلك حيث يمكن أن يتم الاحتفاظ بـ GRT إلى أجل غير مسمى ويحصل الجميع على كمية تتناسب مع أسهمهم ، بغض النظر عن وقت قيامهم بذلك. +At this point, the curated GRT will not accrue any more query fees, so Curators can choose to withdraw their GRT or transfer it to the same subgraph on L2, where it can be used to mint new curation signal. There is no rush to do this as the GRT can be help indefinitely and everybody gets an amount proportional to their shares, irrespective of when they do it. ## اختيار محفظة L2 الخاصة بك -إذا قررت نقل GRT التي تم تنسيقها إلى L2 ، فيمكنك اختيار محفظة مختلفة والتي ستمتلك إشارة التنسيق على L2. +If you decide to transfer your curated GRT to L2, you can choose a different wallet that will own the curation signal on L2. -إذا كنت تستخدم محفظة "عادية" مثل Metamask (حساب مملوك خارجيًا EOA ، محفظة ليست بعقد ذكي) ، فهذا اختياري ويوصى بالاحتفاظ بعنوان المنسق(Curator) نفسه كما في L1. +If you're using a "regular" wallet like Metamask (an Externally Owned Account or EOA, i.e. a wallet that is not a smart contract), then this is optional and it is recommended to keep the same Curator address as in L1. -إذا كنت تستخدم محفظة بعقد ذكي ، مثل multisig (على سبيل المثال Safe) ، فإن اختيار عنوان مختلف لمحفظة L2 أمر إلزامي ، حيث من المرجح أن هذا الحساب موجود فقط على mainnet ولن تكون قادرًا على إجراء المعاملات على Arbitrum باستخدام هذه المحفظة. إذا كنت ترغب في الاستمرار في استخدام محفظة عقد ذكية أو multisig ، فقم بإنشاء محفظة جديدة على Arbitrum واستخدم عنوانها كعنوان محفظة استلام على L2. +If you're using a smart contract wallet, like a multisig (e.g. a Safe), then choosing a different L2 wallet address is mandatory, as it is most likely that this account only exists on mainnet and you will not be able to make transactions on Arbitrum using this wallet. If you want to keep using a smart contract wallet or multisig, create a new wallet on Arbitrum and use its address as the L2 receiving wallet address. -** من المهم جدًا استخدام عنوان محفظة تتحكم فيه ، ويمكنه إجراء معاملات على Arbitrum. وإلا فسيتم فقد التنسيق ولا يمكن استعادته. ** +**It is very important to use a wallet address that you control, and that can make transactions on Arbitrum, as otherwise the curation will be lost and cannot be recovered.** -## إرسال التنسيق إلى L2: الخطوة 1 +## Sending curation to L2: Step 1 -قبل البدء في عملية النقل ، يجب أن تقرر العنوان الذي سيمتلك التنسيق على L2 (راجع "اختيار محفظة L2 الخاصة بك" أعلاه) ، ويوصى بامتلاك بعضاً من ETH لرسوم الغاز الذي تم توصيله بالفعل على Arbitrum في حالة الحاجة إلى إعادة تنفيذ الرسالة على L2. يمكنك شراء ETH من بعض المنصات وسحبها مباشرة إلى Arbitrum ، أو يمكنك استخدام جسر Arbitrum لإرسال ETH من محفظة mainnet إلى L2: [bridge.arbitrum.io] \(http://bridge.arbitrum.io) - نظرًا لأن رسوم الغاز على Arbitrum منخفضة جدًا ، فإنك ستحتاج فقط إلى مبلغ صغير ، على سبيل المثال من المحتمل أن يكون 0.01 ETH أكثر من كافٍ. +Before starting the transfer, you must decide which address will own the curation on L2 (see "Choosing your L2 wallet" above), and it is recommended having some ETH for gas already bridged on Arbitrum in case you need to retry the execution of the message on L2. You can buy ETH on some exchanges and withdraw it directly to Arbitrum, or you can use the Arbitrum bridge to send ETH from a mainnet wallet to L2: [bridge.arbitrum.io](http://bridge.arbitrum.io) - since gas fees on Arbitrum are so low, you should only need a small amount, e.g. 0.01 ETH will probably be more than enough. -إذا تم نقل الرسم البياني الفرعي الذي قمت بتنسيقه إلى L2 ، فسترى رسالة على Explorer تخبرك بأنك تقوم بالتنسيق على رسم بياني فرعي تم نقله. +If a subgraph that you curate to has been transferred to L2, you will see a message on Explorer telling you that you're curating to a transferred subgraph. -عند الاطلاع على صفحة الرسم البياني الفرعي ، يمكنك اختيار سحب أو نقل التنسيق. سيؤدي النقر فوق "Transfer Signal to Arbitrum" إلى فتح أداة النقل. +When looking at the subgraph page, you can choose to withdraw or transfer the curation. Clicking on "Transfer Signal to Arbitrum" will open the transfer tool. -![نقل الإشارة](/img/transferSignalL2TransferTools.png) +![Transfer signal](/img/transferSignalL2TransferTools.png) -بعد فتح أداة النقل ، قد يُطلب منك إضافة بعضاً من ETH إلى محفظتك إذا لم يكن لديك أي منها. ستتمكن بعد ذلك من إدخال عنوان المحفظة على L2 في حقل "Receiving wallet address" - ** تأكد من إدخال العنوان الصحيح هنا **. سيطالبك النقر فوق Transfer Signal بتنفيذ المعاملة على محفظتك (لاحظ أنه يتم تضمين بعضاً من قيمة ETH لدفع رسوم غاز L2) ؛ سيتم بذلك بدء عملية النقل. +After opening the Transfer Tool, you may be prompted to add some ETH to your wallet if you don't have any. Then you will be able to input the L2 wallet address into the "Receiving wallet address" field - **make sure you've entered the correct address here**. Clicking on Transfer Signal will prompt you to execute the transaction on your wallet (note some ETH value is included to pay for L2 gas); this will initiate the transfer. -إذا قمت بتنفيذ هذه الخطوة ، ** تأكد من المتابعة حتى إكمال الخطوة 3 في أقل من 7 أيام ، وإلا فسيتم فقد إشارة GRT. ** هذا بسبب كيفية عمل رسائل L1-L2 على Arbitrum: الرسائل التي يتم إرسالها عبر الجسر هي "retry-able tickets" يجب تنفيذها في غضون 7 أيام ، وقد يحتاج التنفيذ الأولي إلى إعادة المحاولة إذا كانت هناك ارتفاع في سعر الغاز على Arbitrum. +If you execute this step, **make sure you proceed until completing step 3 in less than 7 days, or your signal GRT will be lost.** This is due to how L1-L2 messaging works on Arbitrum: messages that are sent through the bridge are "retryable tickets" that must be executed within 7 days, and the initial execution might need a retry if there are spikes in the gas price on Arbitrum. -## إرسال التنسيق إلى L2: الخطوة 2 +## Sending curation to L2: step 2 -البدء في عملية النقل: +Starting the transfer: -![أرسل إشارة إلى L2](/img/sendingCurationToL2Step2First.png) +![Send signal to L2](/img/sendingCurationToL2Step2First.png) -بعد بدء عملية النقل، يتعين على الرسالة التي ترسل تنسيقك من L1 إلى L2 أن يتم نشرها عبر جسر Arbitrum. يستغرق ذلك حوالي 20 دقيقة (ينتظر الجسر لكتلة الشبكة الرئيسية التي تحتوي على المعاملة حتى يتأكد أنها "آمنة" من إمكانية إعادة ترتيب السلسلة). +After you start the transfer, the message that sends your L1 curation to L2 must propagate through the Arbitrum bridge. This takes approximately 20 minutes (the bridge waits for the mainnet block containing the transaction to be "safe" from potential chain reorgs). بمجرد انتهاء وقت الانتظار ، ستحاول Arbitrum تنفيذ النقل تلقائيًا على عقود L2. -![إرسال إشارة التنسيق إلى L2](/img/sendingCurationToL2Step2Second.png) +![Sending curation signal to L2](/img/sendingCurationToL2Step2Second.png) -## إرسال التنسيق إلى L2: الخطوة 3 +## Sending curation to L2: step 3 -في معظم الحالات ، سيتم تنفيذ هذه الخطوة تلقائيًا لأن غاز L2 المضمن في الخطوة 1 يجب أن يكون كافيًا لتنفيذ المعاملة التي تتلقى التنسيق في عقود Arbitrum. ومع ذلك ، في بعض الحالات ، من الممكن أن يؤدي ارتفاع أسعار الغاز على Arbitrum إلى فشل هذا التنفيذ التلقائي. في هذه الحالة ، ستكون "التذكرة" التي ترسل تنسيقك إلى L2 معلقة وتتطلب إعادة المحاولة في غضون 7 أيام. +In most cases, this step will auto-execute as the L2 gas included in step 1 should be sufficient to execute the transaction that receives the curation on the Arbitrum contracts. In some cases, however, it is possible that a spike in gas prices on Arbitrum causes this auto-execution to fail. In this case, the "ticket" that sends your curation to L2 will be pending and require a retry within 7 days. -في هذا الحالة ، فستحتاج إلى الاتصال باستخدام محفظة على L2 تحتوي بعضاً من ETH على Arbitrum ، وتبديل شبكة محفظتك إلى Arbitrum ، والنقر فوق "Confirm Transfer" لإعادة محاولة المعاملة. +في هذا الحالة ، فستحتاج إلى الاتصال باستخدام محفظة الطبقة الثانية والتي تحتوي بعضاً من إيثيريوم على أربترم، قم بتغيير شبكة محفظتك إلى أربترم، والنقر فوق "تأكيد النقل" لإعادة محاولة المعاملة. -![أرسل إشارة إلى L2](/img/L2TransferToolsFinalCurationImage.png) +![Send signal to L2](/img/L2TransferToolsFinalCurationImage.png) -## سحب التنسيق الخاص بك على L1 +## Withdrawing your curation on L1 -إذا كنت تفضل عدم إرسال GRT إلى L2 ، أو كنت تفضل إنشاء جسر GRT يدويًا ، فيمكنك سحب GRT الذي استخدمته في التنسيق على L1. على اللافتة في صفحة الرسم البياني الفرعي ، اختر "Withdraw Signal" وقم بتأكيد المعاملة ؛ سيتم إرسال GRT إلى عنوان المنسق الخاص بك. +If you prefer not to send your GRT to L2, or you'd rather bridge the GRT manually, you can withdraw your curated GRT on L1. On the banner on the subgraph page, choose "Withdraw Signal" and confirm the transaction; the GRT will be sent to your Curator address. From c727b0225e848151e69a246291eee1fb21cfbdaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:37 -0400 Subject: [PATCH 461/924] New translations l2-transfer-tools-guide.mdx (Czech) --- .../cs/arbitrum/l2-transfer-tools-guide.mdx | 138 +++++++++--------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/website/pages/cs/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/cs/arbitrum/l2-transfer-tools-guide.mdx index 11b9ba5a10ef..084fc60c90fb 100644 --- a/website/pages/cs/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/cs/arbitrum/l2-transfer-tools-guide.mdx @@ -1,165 +1,165 @@ --- -title: L2 Transfer Tools Guide +title: Průvodce nástroji pro přenos L2 --- -The Graph has made it easy to move to L2 on Arbitrum One. For each protocol participant, there are a set of L2 Transfer Tools to make transferring to L2 seamless for all network participants. These tools will require you to follow a specific set of steps depending on what you are transferring. +Graph usnadnil přechod na úroveň L2 v Arbitrum One. Pro každého účastníka protokolu je k dispozici sada nástrojů pro přechod na L2, které umožňují bezproblémový přechod na L2 pro všechny účastníky sítě. Tyto nástroje vyžadují provedení určitého souboru kroků v závislosti na tom, co přenášíte. -Some frequent questions about these tools are answered in the [L2 Transfer Tools FAQ](/arbitrum/l2-transfer-tools-faq). The FAQs contain in-depth explanations of how to use the tools, how they work, and things to keep in mind when using them. +Některé časté otázky týkající se těchto nástrojů jsou zodpovězeny v sekci [L2 Transfer Tools FAQ](/arbitrum/l2-transfer-tools-faq). Často kladené dotazy obsahují podrobné vysvětlení, jak nástroje používat, jak fungují a na co je třeba při jejich používání pamatovat. -## How to transfer your subgraph to Arbitrum (L2) +## Jak přenést podgraf do Arbitrum (L2) -## Benefits of transferring your subgraphs +## Výhody přenosu podgrafů -The Graph's community and core devs have [been preparing](https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) to move to Arbitrum over the past year. Arbitrum, a layer 2 or "L2" blockchain, inherits the security from Ethereum but provides drastically lower gas fees. +Komunita a hlavní vývojáři Graphu se v uplynulém roce [připravovali](https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) na přechod na Arbitrum. Arbitrum, blockchain druhé vrstvy neboli "L2", zdědil bezpečnost po Ethereum, ale poskytuje výrazně nižší poplatky za plyn. -When you publish or upgrade your subgraph to The Graph Network, you're interacting with smart contracts on the protocol and this requires paying for gas using ETH. By moving your subgraphs to Arbitrum, any future updates to your subgraph will require much lower gas fees. The lower fees, and the fact that curation bonding curves on L2 are flat, also make it easier for other Curators to curate on your subgraph, increasing the rewards for Indexers on your subgraph. This lower-cost environment also makes it cheaper for Indexers to index and serve your subgraph. Indexing rewards will be increasing on Arbitrum and decreasing on Ethereum mainnet over the coming months, so more and more Indexers will be transferring their stake and setting up their operations on L2. +Když publikujete nebo aktualizujete svůj subgraf v síti The Graph Network, komunikujete s chytrými smlouvami na protokolu, což vyžaduje platbu za plyn pomocí ETH. Přesunutím subgrafů do Arbitrum budou veškeré budoucí aktualizace subgrafů vyžadovat mnohem nižší poplatky za plyn. Nižší poplatky a skutečnost, že křivky vazby kurátorů na L2 jsou ploché, také usnadňují ostatním kurátorům kurátorství na vašem podgrafu, což zvyšuje odměny pro indexátory na vašem podgrafu. Toto prostředí s nižšími náklady také zlevňuje indexování a obsluhu subgrafu pro indexátory. Odměny za indexování se budou v následujících měsících na Arbitrum zvyšovat a na mainnetu Ethereum snižovat, takže stále více indexerů bude převádět své podíly a zakládat své operace na L2. -## Understanding what happens with signal, your L1 subgraph and query URLs +## Porozumění tomu, co se děje se signálem, podgrafem L1 a adresami URL dotazů -Transferring a subgraph to Arbitrum uses the Arbitrum GRT bridge, which in turn uses the native Arbitrum bridge, to send the subgraph to L2. The "transfer" will deprecate the subgraph on mainnet and send the information to re-create the subgraph on L2 using the bridge. It will also include the subgraph owner's signaled GRT, which must be more than zero for the bridge to accept the transfer. +Při přenosu podgrafu do Arbitrum se používá můstek Arbitrum GRT, který zase používá nativní můstek Arbitrum k odeslání podgrafu do L2. Při "přenosu" se subgraf v mainnetu znehodnotí a odešlou se informace pro opětovné vytvoření subgrafu v L2 pomocí mostu. Zahrnuje také GRT vlastníka podgrafu, který již byl signalizován a který musí být větší než nula, aby most převod přijal. -When you choose to transfer the subgraph, this will convert all of the subgraph's curation signal to GRT. This is equivalent to "deprecating" the subgraph on mainnet. The GRT corresponding to your curation will be sent to L2 together with the subgraph, where they will be used to mint signal on your behalf. +Pokud zvolíte převod podgrafu, převede se veškerý signál kurátoru podgrafu na GRT. To je ekvivalentní "znehodnocení" podgrafu v síti mainnet. GRT odpovídající vašemu kurátorství budou spolu s podgrafem odeslány na L2, kde budou vaším jménem použity k ražbě signálu. -Other Curators can choose whether to withdraw their fraction of GRT, or also transfer it to L2 to mint signal on the same subgraph. If a subgraph owner does not transfer their subgraph to L2 and manually deprecates it via a contract call, then Curators will be notified and will be able to withdraw their curation. +Ostatní kurátoři se mohou rozhodnout, zda si stáhnou svůj podíl GRT, nebo jej také převedou na L2, aby na stejném podgrafu vyrazili signál. Pokud vlastník podgrafu nepřevede svůj podgraf na L2 a ručně jej znehodnotí prostřednictvím volání smlouvy, pak budou Kurátoři upozorněni a budou moci stáhnout svou kurátorskou funkci. -As soon as the subgraph is transferred, since all curation is converted to GRT, Indexers will no longer receive rewards for indexing the subgraph. However, there will be Indexers that will 1) keep serving transferred subgraphs for 24 hours, and 2) immediately start indexing the subgraph on L2. Since these Indexers already have the subgraph indexed, there should be no need to wait for the subgraph to sync, and it will be possible to query the L2 subgraph almost immediately. +Jakmile je podgraf převeden, protože veškerá kurátorská činnost je převedena na GRT, indexátoři již nebudou dostávat odměny za indexování podgrafu. Budou však existovat indexátory, které 1) budou obsluhovat převedené podgrafy po dobu 24 hodin a 2) okamžitě začnou indexovat podgraf na L2. Protože tyto Indexery již mají podgraf zaindexovaný, nemělo by být nutné čekat na synchronizaci podgrafu a bude možné se na podgraf na L2 dotazovat téměř okamžitě. -Queries to the L2 subgraph will need to be done to a different URL (on `arbitrum-gateway.thegraph.com`), but the L1 URL will continue working for at least 48 hours. After that, the L1 gateway will forward queries to the L2 gateway (for some time), but this will add latency so it is recommended to switch all your queries to the new URL as soon as possible. +Dotazy do podgrafu L2 bude nutné zadávat na jinou adresu URL (na `arbitrum-gateway.thegraph.com`), ale adresa URL L1 bude fungovat nejméně 48 hodin. Poté bude brána L1 přeposílat dotazy na bránu L2 (po určitou dobu), což však zvýší latenci, takže se doporučuje co nejdříve přepnout všechny dotazy na novou adresu URL. -## Choosing your L2 wallet +## Výběr peněženky L2 -When you published your subgraph on mainnet, you used a connected wallet to create the subgraph, and this wallet owns the NFT that represents this subgraph and allows you to publish updates. +Když jste publikovali svůj podgraf na hlavní síti (mainnet), použili jste připojenou peněženku, která vlastní NFT reprezentující tento podgraf a umožňuje vám publikovat aktualizace. -When transferring the subgraph to Arbitrum, you can choose a different wallet that will own this subgraph NFT on L2. +Při přenosu podgrafu do Arbitrum si můžete vybrat jinou peněženku, která bude vlastnit tento podgraf NFT na L2. -If you're using a "regular" wallet like MetaMask (an Externally Owned Account or EOA, i.e. a wallet that is not a smart contract), then this is optional and it is recommended to keep the same owner address as in L1. +Pokud používáte "obyčejnou" peněženku, jako je MetaMask (externě vlastněný účet nebo EOA, tj. peněženka, která není chytrým kontraktem), pak je to volitelné a doporučuje se zachovat stejnou adresu vlastníka jako v L1. -If you're using a smart contract wallet, like a multisig (e.g. a Safe), then choosing a different L2 wallet address is mandatory, as it is most likely that this account only exists on mainnet and you will not be able to make transactions on Arbitrum using this wallet. If you want to keep using a smart contract wallet or multisig, create a new wallet on Arbitrum and use its address as the L2 owner of your subgraph. +Pokud používáte peněženku s chytrým kontraktem, jako je multisig (např. Trezor), pak je nutné zvolit jinou adresu peněženky L2, protože je pravděpodobné, že tento účet existuje pouze v mainnetu a nebudete moci provádět transakce na Arbitrum pomocí této peněženky. Pokud chcete i nadále používat peněženku s chytrým kontraktem nebo multisig, vytvořte si na Arbitrum novou peněženku a její adresu použijte jako vlastníka L2 svého subgrafu. -**It is very important to use a wallet address that you control, and that can make transactions on Arbitrum. Otherwise, the subgraph will be lost and cannot be recovered.** +**Je velmi důležité používat adresu peněženky, kterou máte pod kontrolou a která může provádět transakce na Arbitrum. V opačném případě bude podgraf ztracen a nebude možné jej obnovit.** -## Preparing for the transfer: bridging some ETH +## Příprava na převod: přemostění některých ETH -Transferring the subgraph involves sending a transaction through the bridge, and then executing another transaction on Arbitrum. The first transaction uses ETH on mainnet, and includes some ETH to pay for gas when the message is received on L2. However, if this gas is insufficient, you will have to retry the transaction and pay for the gas directly on L2 (this is "Step 3: Confirming the transfer" below). This step **must be executed within 7 days of starting the transfer**. Moreover, the second transaction ("Step 4: Finishing the transfer on L2") will be done directly on Arbitrum. For these reasons, you will need some ETH on an Arbitrum wallet. If you're using a multisig or smart contract account, the ETH will need to be in the regular (EOA) wallet that you are using to execute the transactions, not on the multisig wallet itself. +Přenos podgrafu zahrnuje odeslání transakce přes můstek a následné provedení další transakce na Arbitrum. První transakce využívá ETH na mainnetu a obsahuje nějaké ETH na zaplacení plynu, když je zpráva přijata na L2. Pokud však tento plyn nestačí, je třeba transakci zopakovat a zaplatit za plyn přímo na L2 (to je 'Krok 3: Potvrzení převodu' níže). Tento krok musí být proveden do 7 dnů od zahájení převodu\*\*. Druhá transakce ('Krok 4: Dokončení převodu na L2') bude navíc provedena přímo na Arbitrum. Z těchto důvodů budete potřebovat nějaké ETH na peněžence Arbitrum. Pokud používáte multisig nebo smart contract účet, ETH bude muset být v běžné peněžence (EOA), kterou používáte k provádění transakcí, nikoli na samotné multisig peněžence. -You can buy ETH on some exchanges and withdraw it directly to Arbitrum, or you can use the Arbitrum bridge to send ETH from a mainnet wallet to L2: [bridge.arbitrum.io](http://bridge.arbitrum.io). Since gas fees on Arbitrum are lower, you should only need a small amount. It is recommended that you start at a low threshold (0.e.g. 01 ETH) for your transaction to be approved. +ETH si můžete koupit na některých burzách a vybrat přímo na Arbitrum, nebo můžete použít most Arbitrum a poslat ETH z peněženky mainnetu na L2: [bridge.arbitrum.io](http://bridge.arbitrum.io). Vzhledem k tomu, že poplatky za plyn na Arbitrum jsou nižší, mělo by vám stačit jen malé množství. Doporučujeme začít na nízkém prahu (např. 0.01 ETH), aby byla vaše transakce schválena. -## Finding the subgraph Transfer Tool +## Hledání nástroje pro přenos podgrafu -You can find the L2 Transfer Tool when you're looking at your subgraph's page on Subgraph Studio: +Nástroj pro přenos L2 najdete při prohlížení stránky svého podgrafu v aplikaci Subgraph Studio: ![transfer tool](/img/L2-transfer-tool1.png) -It is also available on Explorer if you're connected with the wallet that owns a subgraph and on that subgraph's page on Explorer: +Je k dispozici také v Průzkumníku, pokud jste připojeni k peněžence, která vlastní podgraf, a na stránce tohoto podgrafu v Průzkumníku: ![Transferring to L2](/img/transferToL2.png) -Clicking on the Transfer to L2 button will open the transfer tool where you can start the transfer process. +Kliknutím na tlačítko Přenést na L2 otevřete nástroj pro přenos, kde můžete zahájit proces přenosu. -## Step 1: Starting the transfer +## Krok 1: Zahájení přenosu -Before starting the transfer, you must decide which address will own the subgraph on L2 (see "Choosing your L2 wallet" above), and it is strongly recommend having some ETH for gas already bridged on Arbitrum (see "Preparing for the transfer: bridging some ETH" above). +Před zahájením převodu se musíte rozhodnout, která adresa bude vlastnit podgraf na L2 (viz výše "Výběr peněženky L2"), a důrazně doporučujeme mít na Arbitrum již přemostěné ETH pro plyn (viz výše "Příprava na převod: přemostění některých ETH"). -Also please note transferring the subgraph requires having a nonzero amount of signal on the subgraph with the same account that owns the subgraph; if you haven't signaled on the subgraph you will have to add a bit of curation (adding a small amount like 1 GRT would suffice). +Vezměte prosím na vědomí, že přenos podgrafu vyžaduje nenulové množství signálu na podgrafu se stejným účtem, který vlastní podgraf; pokud jste na podgrafu nesignalizovali, budete muset přidat trochu kurátorství (stačí přidat malé množství, například 1 GRT). -After opening the Transfer Tool, you will be able to input the L2 wallet address into the "Receiving wallet address" field - **make sure you've entered the correct address here**. Clicking on Transfer Subgraph will prompt you to execute the transaction on your wallet (note some ETH value is included to pay for L2 gas); this will initiate the transfer and deprecate your L1 subgraph (see "Understanding what happens with signal, your L1 subgraph and query URLs" above for more details on what goes on behind the scenes). +Po otevření nástroje Transfer Tool budete moci do pole "Receiving wallet address" zadat adresu peněženky L2 - **ujistěte se, že jste zadali správnou adresu**. Kliknutím na Transfer Subgraph budete vyzváni k provedení transakce na vaší peněžence (všimněte si, že je zahrnuta určitá hodnota ETH, abyste zaplatili za plyn L2); tím se zahájí přenos a znehodnotí váš subgraf L1 (více podrobností o tom, co se děje v zákulisí, najdete výše v části "Porozumění tomu, co se děje se signálem, vaším subgrafem L1 a URL dotazů"). -If you execute this step, **make sure you proceed until completing step 3 in less than 7 days, or the subgraph and your signal GRT will be lost.** This is due to how L1-L2 messaging works on Arbitrum: messages that are sent through the bridge are "retry-able tickets" that must be executed within 7 days, and the initial execution might need a retry if there are spikes in the gas price on Arbitrum. +Pokud tento krok provedete, ujistěte se, že jste pokračovali až do dokončení kroku 3 za méně než 7 dní, jinak se podgraf a váš signál GRT ztratí. To je způsobeno tím, jak funguje zasílání zpráv L1-L2 na Arbitrum: zprávy, které jsou zasílány přes most, jsou "Opakovatelný tiket", které musí být provedeny do 7 dní, a počáteční provedení může vyžadovat opakování, pokud dojde ke skokům v ceně plynu na Arbitrum. ![Start the trnasfer to L2](/img/startTransferL2.png) -## Step 2: Waiting for the subgraph to get to L2 +## Krok 2: Čekání, až se podgraf dostane do L2 -After you start the transfer, the message that sends your L1 subgraph to L2 must propagate through the Arbitrum bridge. This takes approximately 20 minutes (the bridge waits for the mainnet block containing the transaction to be "safe" from potential chain reorgs). +Po zahájení přenosu se musí zpráva, která odesílá podgraf L1 do L2, šířit přes můstek Arbitrum. To trvá přibližně 20 minut (můstek čeká, až bude blok mainnetu obsahující transakci "bezpečný" před případnými reorgy řetězce). -Once this wait time is over, Arbitrum will attempt to auto-execute the transfer on the L2 contracts. +Po uplynutí této čekací doby se Arbitrum pokusí o automatické provedení přenosu na základě smluv L2. ![Wait screen](/img/screenshotOfWaitScreenL2.png) -## Step 3: Confirming the transfer +## Krok 3: Potvrzení převodu -In most cases, this step will auto-execute as the L2 gas included in step 1 should be sufficient to execute the transaction that receives the subgraph on the Arbitrum contracts. In some cases, however, it is possible that a spike in gas prices on Arbitrum causes this auto-execution to fail. In this case, the "ticket" that sends your subgraph to L2 will be pending and require a retry within 7 days. +Ve většině případů se tento krok provede automaticky, protože plyn L2 obsažený v kroku 1 by měl stačit k provedení transakce, která přijímá podgraf na smlouvách Arbitrum. V některých případech je však možné, že prudký nárůst cen plynu na Arbitrum způsobí selhání tohoto automatického provedení. V takovém případě bude "ticket", který odešle subgraf na L2, čekat na vyřízení a bude vyžadovat opakování pokusu do 7 dnů. -If this is the case, you will need to connect using an L2 wallet that has some ETH on Arbitrum, switch your wallet network to Arbitrum, and click on "Confirm Transfer" to retry the transaction. +V takovém případě se musíte připojit pomocí peněženky L2, která má nějaké ETH na Arbitrum, přepnout síť peněženky na Arbitrum a kliknutím na "Confirm Transfer" zopakovat transakci. ![Confirm the transfer to L2](/img/confirmTransferToL2.png) -## Step 4: Finishing the transfer on L2 +## Krok 4: Dokončení přenosu na L2 -At this point, your subgraph and GRT have been received on Arbitrum, but the subgraph is not published yet. You will need to connect using the L2 wallet that you chose as the receiving wallet, switch your wallet network to Arbitrum, and click "Publish Subgraph." +V tuto chvíli byly váš podgraf a GRT přijaty na Arbitrum, ale podgraf ještě není zveřejněn. Budete se muset připojit pomocí peněženky L2, kterou jste si vybrali jako přijímající peněženku, přepnout síť peněženky na Arbitrum a kliknout na "Publikovat subgraf" ![Publish the subgraph](/img/publishSubgraphL2TransferTools.png) ![Wait for the subgraph to be published](/img/waitForSubgraphToPublishL2TransferTools.png) -This will publish the subgraph so that Indexers that are operating on Arbitrum can start serving it. It will also mint curation signal using the GRT that were transferred from L1. +Tím se podgraf zveřejní, aby jej mohly začít obsluhovat indexery pracující na Arbitrum. Rovněž bude zminován kurátorský signál pomocí GRT, které byly přeneseny z L1. -## Step 5: Updating the query URL +## Krok 5: Aktualizace URL dotazu -Your subgraph has been successfully transferred to Arbitrum! To query the subgraph, the new URL will be : +Váš podgraf byl úspěšně přenesen do Arbitrum! Chcete-li se na podgraf zeptat, nová URL bude: `https://arbitrum-gateway.thegraph.com/api/[api-key]/subgraphs/id/[l2-subgraph-id]` -Note that the subgraph ID on Arbitrum will be a different than the one you had on mainnet, but you can always find it on Explorer or Studio. As mentioned above (see "Understanding what happens with signal, your L1 subgraph and query URLs") the old L1 URL will be supported for a short while, but you should switch your queries to the new address as soon as the subgraph has been synced on L2. +Všimněte si, že ID podgrafu v Arbitrum bude jiné než to, které jste měli v mainnetu, ale vždy ho můžete najít v Průzkumníku nebo Studiu. Jak je uvedeno výše (viz "Pochopení toho, co se děje se signálem, vaším subgrafem L1 a URL dotazů"), stará URL adresa L1 bude po krátkou dobu podporována, ale jakmile bude subgraf synchronizován na L2, měli byste své dotazy přepnout na novou adresu. -## How to transfer your curation to Arbitrum (L2) +## Jak přenést kurátorství do služby Arbitrum (L2) -## Understanding what happens to curation on subgraph transfers to L2 +## Porozumění tomu, co se děje s kurátorstvím při přenosu podgrafů do L2 -When the owner of a subgraph transfers a subgraph to Arbitrum, all of the subgraph's signal is converted to GRT at the same time. This applies to "auto-migrated" signal, i.e. signal that is not specific to a subgraph version or deployment but that follows the latest version of a subgraph. +Když vlastník podgrafu převede podgraf do Arbitrum, je veškerý signál podgrafu současně převeden na GRT. To se týká "automaticky migrovaného" signálu, tj. signálu, který není specifický pro verzi podgrafu nebo nasazení, ale který následuje nejnovější verzi podgrafu. -This conversion from signal to GRT is the same as what would happen if the subgraph owner deprecated the subgraph in L1. When the subgraph is deprecated or transferred, all curation signal is "burned" simultaneously (using the curation bonding curve) and the resulting GRT is held by the GNS smart contract (that is the contract that handles subgraph upgrades and auto-migrated signal). Each Curator on that subgraph therefore has a claim to that GRT proportional to the amount of shares they had for the subgraph. +Tento převod ze signálu na GRT je stejný, jako kdyby vlastník podgrafu zrušil podgraf v L1. Při depreciaci nebo převodu subgrafu se současně "spálí" veškerý kurátorský signál (pomocí kurátorské vazební křivky) a výsledný GRT je držen inteligentním kontraktem GNS (tedy kontraktem, který se stará o upgrade subgrafu a automatickou migraci signálu). Každý kurátor na tomto subgrafu má tedy nárok na tento GRT úměrný množství podílů, které měl na subgrafu. -A fraction of these GRT corresponding to the subgraph owner is sent to L2 together with the subgraph. +Část těchto GRT odpovídající vlastníkovi podgrafu je odeslána do L2 spolu s podgrafem. -At this point, the curated GRT will not accrue any more query fees, so Curators can choose to withdraw their GRT or transfer it to the same subgraph on L2, where it can be used to mint new curation signal. There is no rush to do this as the GRT can be help indefinitely and everybody gets an amount proportional to their shares, irrespective of when they do it. +V tomto okamžiku se za kurátorský GRT již nebudou účtovat žádné poplatky za dotazování, takže kurátoři se mohou rozhodnout, zda svůj GRT stáhnou, nebo jej přenesou do stejného podgrafu na L2, kde může být použit k ražbě nového kurátorského signálu. S tímto úkonem není třeba spěchat, protože GRT lze pomáhat donekonečna a každý dostane částku úměrnou svému podílu bez ohledu na to, kdy tak učiní. -## Choosing your L2 wallet +## Výběr peněženky L2 -If you decide to transfer your curated GRT to L2, you can choose a different wallet that will own the curation signal on L2. +Pokud se rozhodnete převést své kurátorované GRT na L2, můžete si vybrat jinou peněženku, která bude vlastnit kurátorský signál na L2. -If you're using a "regular" wallet like Metamask (an Externally Owned Account or EOA, i.e. a wallet that is not a smart contract), then this is optional and it is recommended to keep the same Curator address as in L1. +Pokud používáte "obyčejnou" peněženku, jako je Metamask (externě vlastněný účet nebo EOA, tj. peněženka, která není chytrým kontraktem), pak je to volitelné a doporučuje se zachovat stejnou adresu kurátora jako v L1. -If you're using a smart contract wallet, like a multisig (e.g. a Safe), then choosing a different L2 wallet address is mandatory, as it is most likely that this account only exists on mainnet and you will not be able to make transactions on Arbitrum using this wallet. If you want to keep using a smart contract wallet or multisig, create a new wallet on Arbitrum and use its address as the L2 receiving wallet address. +Pokud používáte peněženku s chytrým kontraktem, jako je multisig (např. Trezor), pak je nutné zvolit jinou adresu peněženky L2, protože je pravděpodobné, že tento účet existuje pouze v mainnetu a nebudete moci provádět transakce na Arbitrum pomocí této peněženky. Pokud chcete i nadále používat peněženku s inteligentním kontraktem nebo multisig, vytvořte si na Arbitrum novou peněženku a její adresu použijte jako adresu přijímací peněženky L2. -**It is very important to use a wallet address that you control, and that can make transactions on Arbitrum, as otherwise the curation will be lost and cannot be recovered.** +**Je velmi důležité používat adresu peněženky, kterou máte pod kontrolou a která může provádět transakce na Arbitrum, protože jinak bude kurátorství ztraceno a nebude možné jej obnovit.** -## Sending curation to L2: Step 1 +## Odeslání kurátorství do L2: Krok 1 -Before starting the transfer, you must decide which address will own the curation on L2 (see "Choosing your L2 wallet" above), and it is recommended having some ETH for gas already bridged on Arbitrum in case you need to retry the execution of the message on L2. You can buy ETH on some exchanges and withdraw it directly to Arbitrum, or you can use the Arbitrum bridge to send ETH from a mainnet wallet to L2: [bridge.arbitrum.io](http://bridge.arbitrum.io) - since gas fees on Arbitrum are so low, you should only need a small amount, e.g. 0.01 ETH will probably be more than enough. +Před zahájením převodu se musíte rozhodnout, která adresa bude vlastnit kurátorství na L2 (viz výše "Výběr peněženky L2"), a doporučujeme mít nějaké ETH pro plyn již přemostěné na Arbitrum pro případ, že byste potřebovali zopakovat provedení zprávy na L2. ETH můžete nakoupit na některých burzách a vybrat si ho přímo na Arbitrum, nebo můžete použít Arbitrum bridge pro odeslání ETH z peněženky mainnetu na L2: [bridge.arbitrum.io](http://bridge.arbitrum.io) - protože poplatky za plyn na Arbitrum jsou tak nízké, mělo by vám stačit jen malé množství, např. 0,01 ETH bude pravděpodobně více než dostačující. -If a subgraph that you curate to has been transferred to L2, you will see a message on Explorer telling you that you're curating to a transferred subgraph. +Pokud byl podgraf, do kterého kurátor provádí kurátorství, převeden do L2, zobrazí se v Průzkumníku zpráva, že kurátorství provádíte do převedeného podgrafu. -When looking at the subgraph page, you can choose to withdraw or transfer the curation. Clicking on "Transfer Signal to Arbitrum" will open the transfer tool. +Při pohledu na stránku podgrafu můžete zvolit stažení nebo přenos kurátorství. Kliknutím na "Přenést signál do Arbitrum" otevřete nástroj pro přenos. ![Transfer signal](/img/transferSignalL2TransferTools.png) -After opening the Transfer Tool, you may be prompted to add some ETH to your wallet if you don't have any. Then you will be able to input the L2 wallet address into the "Receiving wallet address" field - **make sure you've entered the correct address here**. Clicking on Transfer Signal will prompt you to execute the transaction on your wallet (note some ETH value is included to pay for L2 gas); this will initiate the transfer. +Po otevření nástroje Transfer Tool můžete být vyzváni k přidání ETH do peněženky, pokud žádné nemáte. Poté budete moci zadat adresu peněženky L2 do pole "Receiving wallet address" - **ujistěte se, že jste zde zadali správnou adresu**. Kliknutím na tlačítko Transfer Signal (Přenést signál) budete vyzváni k provedení transakce na vaší peněžence (všimněte si, že je zahrnuta určitá hodnota ETH pro zaplacení plynu L2); tím bude zahájen převod. -If you execute this step, **make sure you proceed until completing step 3 in less than 7 days, or your signal GRT will be lost.** This is due to how L1-L2 messaging works on Arbitrum: messages that are sent through the bridge are "retryable tickets" that must be executed within 7 days, and the initial execution might need a retry if there are spikes in the gas price on Arbitrum. +Pokud tento krok provedete, **ujistěte se, že jste pokračovali až do dokončení kroku 3 za méně než 7 dní, jinak bude váš signál GRT ztracen.** To je způsobeno tím, jak funguje zasílání zpráv L1-L2 na Arbitrum: zprávy, které jsou zasílány přes most, jsou "opakovatelné tikety", které musí být provedeny do 7 dní, a počáteční provedení může vyžadovat opakování, pokud dojde ke skokům v ceně plynu na Arbitrum. -## Sending curation to L2: step 2 +## Odeslání kurátorství do L2: krok 2 -Starting the transfer: +Zahájení přenosu: ![Send signal to L2](/img/sendingCurationToL2Step2First.png) -After you start the transfer, the message that sends your L1 curation to L2 must propagate through the Arbitrum bridge. This takes approximately 20 minutes (the bridge waits for the mainnet block containing the transaction to be "safe" from potential chain reorgs). +Po spuštění přenosu se musí zpráva, která odešle vaše kurátorství L1 do L2, šířit přes můstek Arbitrum. To trvá přibližně 20 minut (můstek čeká, až bude blok mainnetu obsahující transakci "bezpečný" před případnými reorgy řetězce). -Once this wait time is over, Arbitrum will attempt to auto-execute the transfer on the L2 contracts. +Po uplynutí této čekací doby se Arbitrum pokusí o automatické provedení přenosu na základě smluv L2. ![Sending curation signal to L2](/img/sendingCurationToL2Step2Second.png) -## Sending curation to L2: step 3 +## Odeslání kurátorství do L2: krok 3 -In most cases, this step will auto-execute as the L2 gas included in step 1 should be sufficient to execute the transaction that receives the curation on the Arbitrum contracts. In some cases, however, it is possible that a spike in gas prices on Arbitrum causes this auto-execution to fail. In this case, the "ticket" that sends your curation to L2 will be pending and require a retry within 7 days. +Ve většině případů se tento krok provede automaticky, protože plyn L2 obsažený v kroku 1 by měl stačit k provedení transakce, která obdrží kurátorství na smlouvách Arbitrum. V některých případech je však možné, že prudký nárůst cen plynu na Arbitrum způsobí selhání tohoto automatického provedení. V takovém případě bude "ticket", který odešle vaši kurátorskou transakci na L2, čekat na vyřízení a bude vyžadovat opakování pokusu do 7 dnů. -If this is the case, you will need to connect using an L2 wallet that has some ETH on Arbitrum, switch your wallet network to Arbitrum, and click on "Confirm Transfer" to retry the transaction. +V takovém případě se musíte připojit pomocí peněženky L2, která má nějaké ETH na Arbitrum, přepnout síť peněženky na Arbitrum a kliknutím na "Confirm Transfer" zopakovat transakci. ![Send signal to L2](/img/L2TransferToolsFinalCurationImage.png) -## Withdrawing your curation on L1 +## Odstranění vašeho kurátorství na L1 -If you prefer not to send your GRT to L2, or you'd rather bridge the GRT manually, you can withdraw your curated GRT on L1. On the banner on the subgraph page, choose "Withdraw Signal" and confirm the transaction; the GRT will be sent to your Curator address. +Pokud nechcete posílat GRT na L2 nebo byste raději překlenuli GRT ručně, můžete si na L1 stáhnout svůj kurátorovaný GRT. Na banneru na stránce podgrafu zvolte "Withdraw Signal" a potvrďte transakci; GRT bude odeslán na vaši adresu kurátora. From ca793d56c5ba93a70107b7b1a98eb79566803061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:38 -0400 Subject: [PATCH 462/924] New translations l2-transfer-tools-guide.mdx (German) --- website/pages/de/arbitrum/l2-transfer-tools-guide.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/de/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/de/arbitrum/l2-transfer-tools-guide.mdx index 12a1554750db..0325a790ba31 100644 --- a/website/pages/de/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/de/arbitrum/l2-transfer-tools-guide.mdx @@ -12,7 +12,7 @@ Einige häufig gestellte Fragen zu diesen Tools werden in den [L2 Transfer Tools ## Vorteile der Übertragung Ihrer Untergraphen -The Graph's Community und die Kernentwickler haben im letzten Jahr den Wechsel zu Arbitrum [vorbereitet] \(https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305). Arbitrum, eine Layer-2- oder "L2"-Blockchain, erbt die Sicherheit von Ethereum, bietet aber drastisch niedrigere Gasgebühren. +The Graph's Community und die Kernentwickler haben im letzten Jahr den Wechsel zu Arbitrum [vorbereitet] (https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305). Arbitrum, eine Layer-2- oder "L2"-Blockchain, erbt die Sicherheit von Ethereum, bietet aber drastisch niedrigere Gasgebühren. Wenn Sie Ihren Subgraphen auf The Graph Network veröffentlichen oder aktualisieren, interagieren Sie mit intelligenten Verträgen auf dem Protokoll, und dies erfordert die Bezahlung von Gas mit ETH. Indem Sie Ihre Subgraphen zu Arbitrum verschieben, werden alle zukünftigen Aktualisierungen Ihres Subgraphen viel niedrigere Gasgebühren erfordern. Die niedrigeren Gebühren und die Tatsache, dass die Kurationsbindungskurven auf L2 flach sind, machen es auch für andere Kuratoren einfacher, auf Ihrem Subgraphen zu kuratieren, was die Belohnungen für Indexer auf Ihrem Subgraphen erhöht. Diese kostengünstigere Umgebung macht es auch für Indexer preiswerter, Ihren Subgraphen zu indizieren und zu bedienen. Die Belohnungen für die Indexierung werden in den kommenden Monaten auf Arbitrum steigen und auf dem Ethereum-Mainnet sinken, so dass immer mehr Indexer ihren Einsatz transferieren und ihre Operationen auf L2 einrichten werden. From 99a1d8bb96e516c4929d26d0c97e704734ae2240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:41 -0400 Subject: [PATCH 463/924] New translations l2-transfer-tools-guide.mdx (Dutch) --- .../nl/arbitrum/l2-transfer-tools-guide.mdx | 140 +++++++++--------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/website/pages/nl/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/nl/arbitrum/l2-transfer-tools-guide.mdx index 11b9ba5a10ef..08b184bf29bb 100644 --- a/website/pages/nl/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/nl/arbitrum/l2-transfer-tools-guide.mdx @@ -1,165 +1,165 @@ --- -title: L2 Transfer Tools Guide +title: Gids voor L2 Transfer Tools --- -The Graph has made it easy to move to L2 on Arbitrum One. For each protocol participant, there are a set of L2 Transfer Tools to make transferring to L2 seamless for all network participants. These tools will require you to follow a specific set of steps depending on what you are transferring. +The Graph heeft het eenvoudig gemaakt om naar L2 op Arbitrum One over te stappen. Voor elke deelnemer aan het protocol is er een set L2 Transfer Tools ontwikkeld om het overzetten van GRT naar L2 makkelijk te maken voor alle netwerkdeelnemers. Deze tools vereisen dat u een specifieke reeks stappen volgt, afhankelijk van wat u overdraagt. -Some frequent questions about these tools are answered in the [L2 Transfer Tools FAQ](/arbitrum/l2-transfer-tools-faq). The FAQs contain in-depth explanations of how to use the tools, how they work, and things to keep in mind when using them. +Sommige veelgestelde vragen over deze tools worden beantwoord in de [L2 Transfer Tools FAQ](/arbitrum/l2-transfer-tools-faq). De FAQs bevatten diepgaande uitleg over hoe de tools te gebruiken, hoe ze werken, en punten om rekening mee to houden bij het gebruiken ervan. -## How to transfer your subgraph to Arbitrum (L2) +## Hoe zet je je subgraph over naar Arbitrum (L2) -## Benefits of transferring your subgraphs +## Voordelen van het overzetten van uw subgraphs -The Graph's community and core devs have [been preparing](https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) to move to Arbitrum over the past year. Arbitrum, a layer 2 or "L2" blockchain, inherits the security from Ethereum but provides drastically lower gas fees. +De community en ontwikkelaars van The Graph hebben [zich voorbereid](https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) op de transitie naar Arbitrum gedurende het afgelopen jaar. Arbitrum, een layer 2 of "L2" blockchain, erft de beveiliging van Ethereum maar biedt aanzienlijk lagere gas fees. -When you publish or upgrade your subgraph to The Graph Network, you're interacting with smart contracts on the protocol and this requires paying for gas using ETH. By moving your subgraphs to Arbitrum, any future updates to your subgraph will require much lower gas fees. The lower fees, and the fact that curation bonding curves on L2 are flat, also make it easier for other Curators to curate on your subgraph, increasing the rewards for Indexers on your subgraph. This lower-cost environment also makes it cheaper for Indexers to index and serve your subgraph. Indexing rewards will be increasing on Arbitrum and decreasing on Ethereum mainnet over the coming months, so more and more Indexers will be transferring their stake and setting up their operations on L2. +Wanneer je je subgraph publiceert of bijwerkt naar the Graph Network, interacteer je met smart contracts op het protocol en dit vereist het betalen van gas met ETH. Door je subgraphs naar Arbitrum te verplaatsen, zullen eventuele toekomstige updates aan de subgraph veel lagere gas fees vereisen. De lagere kosten, en het feit dat de curatie bonding curves op L2 vlak zijn, maken het ook makkelijker voor andere curatoren om te cureren op uw subgraph, waardoor de beloningen voor indexeerders op uw subgraph toenemen. Deze omgeving met lagere kosten maakt het ook goedkoper voor indexeerders om de subgraph te indexeren en query's te beantwoorden. Indexeringsbeloningen zullen op Arbitrum toenemen en op Ethereum mainnet afnemen in de komden maanden, dus meer en meer indexeerders zullen hun GRT overzetten en hun operaties op L2 opzetten. -## Understanding what happens with signal, your L1 subgraph and query URLs +## Begrijpen wat er gebeurt met signalen, de L1 subgraph en query URL's -Transferring a subgraph to Arbitrum uses the Arbitrum GRT bridge, which in turn uses the native Arbitrum bridge, to send the subgraph to L2. The "transfer" will deprecate the subgraph on mainnet and send the information to re-create the subgraph on L2 using the bridge. It will also include the subgraph owner's signaled GRT, which must be more than zero for the bridge to accept the transfer. +Het overzetten van een subgraph naar Arbitrum gebruikt de Arbitrum GRT brug, die op zijn beurt de natuurlijke Arbitrum brug gebruikt, om de subgraph naar L2 te sturen. De "transfer" zal de subgraph op mainnet verwijderen en de informatie versturen om de subgraph op L2 opnieuw te creëren met de bridge. Het zal ook de gesignaleerde GRT van de eigenaar van de subgraph bevatten, wat meer dan nul moet zijn voor de brug om de overdracht te accepteren. -When you choose to transfer the subgraph, this will convert all of the subgraph's curation signal to GRT. This is equivalent to "deprecating" the subgraph on mainnet. The GRT corresponding to your curation will be sent to L2 together with the subgraph, where they will be used to mint signal on your behalf. +Wanneer je kiest om de subgraph over te dragen, zal dit alle curatie van de subgraph omzetten in GRT. Dit staat gelijk aan het "degraderen" van de subgraph op mainnet. De GRT die overeenkomt met je curatie zal samen met de subgraph naar L2 worden gestuurd, waar ze zullen worden gebruikt om signaal namens u te munten. -Other Curators can choose whether to withdraw their fraction of GRT, or also transfer it to L2 to mint signal on the same subgraph. If a subgraph owner does not transfer their subgraph to L2 and manually deprecates it via a contract call, then Curators will be notified and will be able to withdraw their curation. +Andere curatoren kunnen kiezen of ze hun fractie van GRT willen opnemen, of het ook naar L2 willen overzetten om signaal op dezelfde subgraph te munten. Als een eigenaar van een subgraph hun subgraph niet naar L2 overzet en handmatig verwijderd via een contract call, dan zullen curatoren worden genotificeerd en zullen ze in staat zijn om hun curatie op te nemen. -As soon as the subgraph is transferred, since all curation is converted to GRT, Indexers will no longer receive rewards for indexing the subgraph. However, there will be Indexers that will 1) keep serving transferred subgraphs for 24 hours, and 2) immediately start indexing the subgraph on L2. Since these Indexers already have the subgraph indexed, there should be no need to wait for the subgraph to sync, and it will be possible to query the L2 subgraph almost immediately. +Zodra de subgraph is overgedragen, aangezien alle curatie is omgezet in GRT, zullen indexeerders geen beloningen meer ontvangen voor het indexeren van de subgraph. Er zullen echter indexeerders zijn die 1) overgedragen subgraphs 24 uur blijven ondersteunen, en 2) onmiddelijk beginnen met het indexeren van de subgraph op L2. Aangezien deze indexeerders de subgraph al hebben geïndexeerd, zou er geen noodzaak moeten zijn om te wachten tot de subgraph is gesynchroniseerd, en het zal mogelijk zijn om de L2 subgraph bijna onmiddelijk te queryen. -Queries to the L2 subgraph will need to be done to a different URL (on `arbitrum-gateway.thegraph.com`), but the L1 URL will continue working for at least 48 hours. After that, the L1 gateway will forward queries to the L2 gateway (for some time), but this will add latency so it is recommended to switch all your queries to the new URL as soon as possible. +Query's naar de L2 subgraph moeten worden gedaan naar een andere URL (op `arbitrum-gateway.thegraph.com`), maar het L1 URL zal minimaal 48 uur blijven werken. Daarna zal de L1 gateway query's doorsturen naar de L2 gateway (voor enige tijd), maar dit zal latentie toevoegen dus het wordt aanbevolen om al uw query's zo snel mogelijk naar de nieuwe URL over te schakelen. -## Choosing your L2 wallet +## Jouw L2 wallet kiezen -When you published your subgraph on mainnet, you used a connected wallet to create the subgraph, and this wallet owns the NFT that represents this subgraph and allows you to publish updates. +Wanneer je je subgraph op mainnet publiceerde, gebruikte je een verbonden wallet om de subgraph te creëren, en deze wallet bezit de NFT die deze subgraph vertegenwoordigt en dit zorgt er voor dat je updates kunt publiceren. -When transferring the subgraph to Arbitrum, you can choose a different wallet that will own this subgraph NFT on L2. +Bij het overzetten van de subgraph naar Arbitrum, kunt u een andere wallet kiezen die deze subgraph NFT op L2 zal bezitten. -If you're using a "regular" wallet like MetaMask (an Externally Owned Account or EOA, i.e. a wallet that is not a smart contract), then this is optional and it is recommended to keep the same owner address as in L1. +Als je een "reguliere" wallet gebruikt zoals MetaMask (een Externally Owned Account of EOA, d.w.z. een wallet die geen smart contract is), dan is dit optioneel en wordt het aanbevolen om dezelfde wallet te gebruiken als in L1. -If you're using a smart contract wallet, like a multisig (e.g. a Safe), then choosing a different L2 wallet address is mandatory, as it is most likely that this account only exists on mainnet and you will not be able to make transactions on Arbitrum using this wallet. If you want to keep using a smart contract wallet or multisig, create a new wallet on Arbitrum and use its address as the L2 owner of your subgraph. +Als je een smart contract wallet gebruikt, zoals een multisig (bijv. een Safe) dan is het kiezen van een ander L2 wallet adres verplicht, aangezien het waarschijnlijk is dat de multisig alleen op mainnet bestaat en je geen transacties op Arbitrum kunt maken met deze wallet. Als je een smart contract wallet of multisig wilt blijven gebruiken, maak dan een nieuwe wallet aan op Arbitrum en gebruik het adres ervan als de L2 eigenaar van jouw subgraph. -**It is very important to use a wallet address that you control, and that can make transactions on Arbitrum. Otherwise, the subgraph will be lost and cannot be recovered.** +**Het is erg belangrijk om een wallet adres te gebruiken dat u controleert, en dat transacties op Arbitrum kan maken. Anders zal de subgraph verloren gaan en kan niet worden hersteld.** -## Preparing for the transfer: bridging some ETH +## Voorbereiden op de overdracht: ETH verplaatsen van L1 naar L2 -Transferring the subgraph involves sending a transaction through the bridge, and then executing another transaction on Arbitrum. The first transaction uses ETH on mainnet, and includes some ETH to pay for gas when the message is received on L2. However, if this gas is insufficient, you will have to retry the transaction and pay for the gas directly on L2 (this is "Step 3: Confirming the transfer" below). This step **must be executed within 7 days of starting the transfer**. Moreover, the second transaction ("Step 4: Finishing the transfer on L2") will be done directly on Arbitrum. For these reasons, you will need some ETH on an Arbitrum wallet. If you're using a multisig or smart contract account, the ETH will need to be in the regular (EOA) wallet that you are using to execute the transactions, not on the multisig wallet itself. +Het overzetten van de subgraph houdt in dat je een transactie verstuurt via de brug, en vervolgens een andere transactie uitvoert op Arbitrum. De eerste transactie gebruikt ETH op mainnet, en bevat wat ETH om te betalen voor gas wanneer het op L2 wordt ontvangen. Echter, als dit onvoldoende is, zul je de transactie opnieuw moeten proberen en betalen voor het gas direct op L2 (dit is "Stap 3: De overdracht bevestigen" hieronder). Deze stap **moet worden uitgevoerd binnen 7 dagen na het starten van de overdracht**. Bovendien, de tweede transactie ("Stap 4: De overdracht op L2 afronden") zal direct op Arbitrum worden gedaan. Om deze redenen, zul je wat ETH nodig hebben op een Arbitrum wallet. Als je een multisig of smart contract wallet gebruikt, zal de ETH in de reguliere (EOA) wallet moeten zijn die je gebruikt om de transacties uit te voeren, niet op de multisig wallet zelf. -You can buy ETH on some exchanges and withdraw it directly to Arbitrum, or you can use the Arbitrum bridge to send ETH from a mainnet wallet to L2: [bridge.arbitrum.io](http://bridge.arbitrum.io). Since gas fees on Arbitrum are lower, you should only need a small amount. It is recommended that you start at a low threshold (0.e.g. 01 ETH) for your transaction to be approved. +Je kunt ETH kopen op sommige exchanges en direct naar Arbitrum opnemen, of je kunt de Arbitrum bridge gebruiken om ETH van een mainnet wallet naar L2 te sturen: [bridge.arbitrum.io](http://bridge.arbitrum.io). Aangezien de gasprijzen op Arbitrum lager zijn, zou u slechts een kleine hoeveelheid nodig moeten hebben. Het wordt aanbevolen om te beginnen met een lage drempel (e.g. 0.1 ETH) voor uw transactie om te worden goedgekeurd. -## Finding the subgraph Transfer Tool +## Het vinden van de Transfer Tool voor subgraphs -You can find the L2 Transfer Tool when you're looking at your subgraph's page on Subgraph Studio: +Je kunt de L2 Transfer Tool vinden als je naar de pagina van je subgraph kijkt in de Subgraph Studio: ![transfer tool](/img/L2-transfer-tool1.png) -It is also available on Explorer if you're connected with the wallet that owns a subgraph and on that subgraph's page on Explorer: +Het is ook beschikbaar in de Explorer als je verbonden bent met de wallet die een subgraph bezit en op de pagina van die subgraph in de Explorer kijkt: ![Transferring to L2](/img/transferToL2.png) -Clicking on the Transfer to L2 button will open the transfer tool where you can start the transfer process. +Door op de knop 'Transfer to L2' te klikken, wordt de Transfer Tool geopend waar je het transfer proces mee kunt starten. -## Step 1: Starting the transfer +## Stap 1: Het transfer proces starten -Before starting the transfer, you must decide which address will own the subgraph on L2 (see "Choosing your L2 wallet" above), and it is strongly recommend having some ETH for gas already bridged on Arbitrum (see "Preparing for the transfer: bridging some ETH" above). +Voordat je met het transfer proces begint, moet je beslissen welk adres de subgraph op L2 zal bezitten (zie "Je L2 portemonnee kiezen" hierboven), en het wordt sterk aanbevolen om al wat ETH voor gas op Arbitrum te hebben (zie "Voorbereiden op de overdracht: ETH verplaatsen van L1 naar L2" hierboven). -Also please note transferring the subgraph requires having a nonzero amount of signal on the subgraph with the same account that owns the subgraph; if you haven't signaled on the subgraph you will have to add a bit of curation (adding a small amount like 1 GRT would suffice). +Let ook op dat het overzetten van de subgraph vereist dat je een hoeveelheid signaal groter dan nul op de subgraph hebt met dezelfde account die de subgraph bezit; als je nog geen signaal op de subgraph hebt, moet je een klein beetje curatie toevoegen (een kleine hoeveelheid zoals 1 GRT zou voldoende zijn). -After opening the Transfer Tool, you will be able to input the L2 wallet address into the "Receiving wallet address" field - **make sure you've entered the correct address here**. Clicking on Transfer Subgraph will prompt you to execute the transaction on your wallet (note some ETH value is included to pay for L2 gas); this will initiate the transfer and deprecate your L1 subgraph (see "Understanding what happens with signal, your L1 subgraph and query URLs" above for more details on what goes on behind the scenes). +Na het openen van de Transfer Tool, kun je het adres van de L2 wallet invoeren in het veld "Receiving wallet address" - **zorg ervoor dat je het juiste adres hier invoert**. Door op 'Transfer Subgraph' te klikken, wordt je gevraagd de transactie op je wallet uit te voeren (let op dat er wel wat ETH in je wallet zit om te betalen voor L2 gas); dit zal de transfer initiëren en je L1 subgraph verwijderen (zie "Begrijpen wat er gebeurt met signalen, de L1 subgraph en query URL's" hierboven voor meer details over wat er achter de schermen gebeurt). -If you execute this step, **make sure you proceed until completing step 3 in less than 7 days, or the subgraph and your signal GRT will be lost.** This is due to how L1-L2 messaging works on Arbitrum: messages that are sent through the bridge are "retry-able tickets" that must be executed within 7 days, and the initial execution might need a retry if there are spikes in the gas price on Arbitrum. +Als je deze stap uitvoert, **zorg ervoor dat je doorgaat tot het voltooien van stap 3 in minder dan 7 dagen, of de subgraph en je signaal GRT zullen verloren gaan.** Dit komt door hoe L1-L2 berichtgeving werkt op Arbitrum: berichten die via de bridge worden verzonden, zijn "retry-able tickets" die binnen 7 dagen uitgevoerd moeten worden, en de initiële uitvoering zou een nieuwe poging nodig kunnen hebben als er pieken zijn in de prijs voor gas op Arbitrum. -![Start the trnasfer to L2](/img/startTransferL2.png) +![Start the transfer to L2](/img/startTransferL2.png) -## Step 2: Waiting for the subgraph to get to L2 +## Stap 2: Wachten tot de transfer van de subgraph naar L2 voltooid is -After you start the transfer, the message that sends your L1 subgraph to L2 must propagate through the Arbitrum bridge. This takes approximately 20 minutes (the bridge waits for the mainnet block containing the transaction to be "safe" from potential chain reorgs). +Nadat je de transfer gestart bent, moet het bericht dat je L1-subgraph naar L2 stuurt, via de Arbitrum brug worden doorgestuurd. Dit duurt ongeveer 20 minuten (de brug wacht tot het mainnet block dat de transactie bevat "veilig" is van potentiële chain reorganisaties). -Once this wait time is over, Arbitrum will attempt to auto-execute the transfer on the L2 contracts. +Zodra deze wachttijd voorbij is, zal Arbitrum proberen de transfer automatisch uit te voeren op de L2 contracten. ![Wait screen](/img/screenshotOfWaitScreenL2.png) -## Step 3: Confirming the transfer +## Stap 3: De transfer bevestigen -In most cases, this step will auto-execute as the L2 gas included in step 1 should be sufficient to execute the transaction that receives the subgraph on the Arbitrum contracts. In some cases, however, it is possible that a spike in gas prices on Arbitrum causes this auto-execution to fail. In this case, the "ticket" that sends your subgraph to L2 will be pending and require a retry within 7 days. +In de meeste gevallen zal deze stap automatisch worden uitgevoerd aangezien de L2 gas kosten die bij stap 1 zijn inbegrepen, voldoende zouden moeten zijn om de transactie die de subgraph op de Arbitrum contracten ontvangt, uit te voeren. In sommige gevallen kan het echter zo zijn dat een piek in de gasprijzen op Arbitrum ervoor zorgt dat deze automatische uitvoering mislukt. In dat geval zal het "ticket" dat je subgraph naar L2 stuurt, in behandeling blijven en is nodig het binnen 7 dagen nogmaals te proberen. -If this is the case, you will need to connect using an L2 wallet that has some ETH on Arbitrum, switch your wallet network to Arbitrum, and click on "Confirm Transfer" to retry the transaction. +Als dit het geval is, moet je verbinding maken met een L2 wallet die wat ETH op Arbitrum heeft, je walletnetwerk naar Arbitrum overschakelen en op "Bevestig Transfer" klikken op de transactie opnieuw te proberen. ![Confirm the transfer to L2](/img/confirmTransferToL2.png) -## Step 4: Finishing the transfer on L2 +## Stap 4: De transfer op L2 afronden -At this point, your subgraph and GRT have been received on Arbitrum, but the subgraph is not published yet. You will need to connect using the L2 wallet that you chose as the receiving wallet, switch your wallet network to Arbitrum, and click "Publish Subgraph." +Na de vorige stappen zijn je subgraph en GRT ontvangen op Arbitrum, maar de subgraph is nog niet gepubliceerd. Je moet verbinding maken met de L2 wallet die je hebt gekozen als ontvangende wallet, je walletnetwerk naar Arbitrum overschakelen en op "Publiceer Subgraph" klikken ![Publish the subgraph](/img/publishSubgraphL2TransferTools.png) ![Wait for the subgraph to be published](/img/waitForSubgraphToPublishL2TransferTools.png) -This will publish the subgraph so that Indexers that are operating on Arbitrum can start serving it. It will also mint curation signal using the GRT that were transferred from L1. +Dit zal de subgraph publiceren zodat Indexeerders die op Arbitrum actief zijn, deze kunnen indexeren. Het zal ook curatie signaal munten met de GRT die van L1 zijn overgedragen. -## Step 5: Updating the query URL +## Stap 5: De query-URL bijwerken -Your subgraph has been successfully transferred to Arbitrum! To query the subgraph, the new URL will be : +Je subgraph is succesvol overgedragen naar Arbitrum! Om query's naar de subgraph te sturen, kun je deze nieuwe URL gebruiken: `https://arbitrum-gateway.thegraph.com/api/[api-key]/subgraphs/id/[l2-subgraph-id]` -Note that the subgraph ID on Arbitrum will be a different than the one you had on mainnet, but you can always find it on Explorer or Studio. As mentioned above (see "Understanding what happens with signal, your L1 subgraph and query URLs") the old L1 URL will be supported for a short while, but you should switch your queries to the new address as soon as the subgraph has been synced on L2. +Let op dat de subgraph ID op Arbitum anders zal zijn dan degene die je op mainnet had, maar je kunt deze altijd vinden op de Explorer of in de Studio. Zoals hierboven vermeld (zie "Begrijpen wat er gebeurt met signalen, de L1 subgraph en query URL's") zal de oude L1-URL nog een korte tijd worden ondersteund, maar je zou zo snel mogelijk al je query's naar het nieuwe adres moeten overschakelen zodra de subgraph op L2 is gesynchroniseerd. -## How to transfer your curation to Arbitrum (L2) +## Hoe je je curatie signaal naar Arbitrum (L2) overzet -## Understanding what happens to curation on subgraph transfers to L2 +## Begrijpen wat er gebeurt met curatie bij subgraph transfers naar L2 -When the owner of a subgraph transfers a subgraph to Arbitrum, all of the subgraph's signal is converted to GRT at the same time. This applies to "auto-migrated" signal, i.e. signal that is not specific to a subgraph version or deployment but that follows the latest version of a subgraph. +Wanneer de eigenaar van een subgraph een subgraph naar Arbitrum verplaatst, wordt al het signaal van de subgraph tegelijkertijd omgezet in GRT. Dit is van toepassing op "automatisch gemigreerd" signaal, dus signaal dat niet specifiek is voor een subgraph versie, maar automatisch op de nieuwste versie van de subgraph signaleerd. -This conversion from signal to GRT is the same as what would happen if the subgraph owner deprecated the subgraph in L1. When the subgraph is deprecated or transferred, all curation signal is "burned" simultaneously (using the curation bonding curve) and the resulting GRT is held by the GNS smart contract (that is the contract that handles subgraph upgrades and auto-migrated signal). Each Curator on that subgraph therefore has a claim to that GRT proportional to the amount of shares they had for the subgraph. +De conversie van signaal naar GRT is hetzelfde als wat zou gebeuren als de eigenaar van de subgraph de subgraph van L1 zou verwijderen. Wanneer de subgraph wordt verwijderd of verplaatst wordt naar L2, wordt al het curatie signaal tegelijkertijd "verbrand" (met behulp van de curation bonding curve) en wordt de GRT vastgehouden door het GNS smart contract (dat is het contract dat subgraph upgrades en automatisch gemigreerd signaal afhandeld). Elke Curator op die subgraph heeft daarom recht op die GRT naar rato van het aantal aandelen dat ze voor de subgraph hadden. -A fraction of these GRT corresponding to the subgraph owner is sent to L2 together with the subgraph. +Een deel van de GRT, dat behoort tot de eigenaar van de subgraph, wordt samen met de subgraph naar L2 gestuurd. -At this point, the curated GRT will not accrue any more query fees, so Curators can choose to withdraw their GRT or transfer it to the same subgraph on L2, where it can be used to mint new curation signal. There is no rush to do this as the GRT can be help indefinitely and everybody gets an amount proportional to their shares, irrespective of when they do it. +Op dit punt zal de gesignaleerde GRT niet langer query kosten verzamelen, dus curatoren kunnen kiezen om hun GRT op te nemen of het naar dezelfde subgraph op L2 over te dragen, waar het gebruikt kan worden om nieuw curatie signaal te creëren. Er is geen haast bij, aangezien de GRT voor onbepaalde tijd kan worden bewaard en iedereen krijgt een hoeveelheid naar rato van hun aandelen, ongeacht wanneer ze het doen. -## Choosing your L2 wallet +## Jouw L2 wallet kiezen -If you decide to transfer your curated GRT to L2, you can choose a different wallet that will own the curation signal on L2. +Als je besluit je gecureerde GRT naar L2 over te dragen, kun je een andere wallet kiezen die het curatie signaal op L2 zal bezitten. -If you're using a "regular" wallet like Metamask (an Externally Owned Account or EOA, i.e. a wallet that is not a smart contract), then this is optional and it is recommended to keep the same Curator address as in L1. +Als je een "reguliere" wallet gebruikt zoals MetaMask (een Externally Owned Account of EOA, d.w.z. een wallet die geen smart contract is), dan is dit optioneel en wordt het aanbevolen om dezelfde wallet te gebruiken als in L1. -If you're using a smart contract wallet, like a multisig (e.g. a Safe), then choosing a different L2 wallet address is mandatory, as it is most likely that this account only exists on mainnet and you will not be able to make transactions on Arbitrum using this wallet. If you want to keep using a smart contract wallet or multisig, create a new wallet on Arbitrum and use its address as the L2 receiving wallet address. +Als je een smart contract wallet gebruikt, zoals een multisig (bijv. een Safe) dan is het kiezen van een ander L2 wallet adres verplicht, aangezien het waarschijnlijk is dat de multisig alleen op mainnet bestaat en je geen transacties op Arbitrum kunt maken met deze wallet. Als je een smart contract wallet of multisig wilt blijven gebruiken, maak dan een nieuwe wallet aan op Arbitrum en gebruik het adres ervan als het L2 ontvangstadres voor curatie. -**It is very important to use a wallet address that you control, and that can make transactions on Arbitrum, as otherwise the curation will be lost and cannot be recovered.** +**Het is erg belangrijk om een wallet adres te gebruiken dat u beheert en dat transacties op Arbitrum kan uitvoeren, anders zal de curatie verloren gaan en kan niet worden hersteld.** -## Sending curation to L2: Step 1 +## Je curatie naar L2 verzenden: Stap 1 -Before starting the transfer, you must decide which address will own the curation on L2 (see "Choosing your L2 wallet" above), and it is recommended having some ETH for gas already bridged on Arbitrum in case you need to retry the execution of the message on L2. You can buy ETH on some exchanges and withdraw it directly to Arbitrum, or you can use the Arbitrum bridge to send ETH from a mainnet wallet to L2: [bridge.arbitrum.io](http://bridge.arbitrum.io) - since gas fees on Arbitrum are so low, you should only need a small amount, e.g. 0.01 ETH will probably be more than enough. +Voordat je de transfer start, moet je beslissen welk wallet adres de curatie op L2 zal bezitting (zie "De L2 wallet kiezen" hierboven) en wordt het aanbevolen om al wat ETH voor gas op Arbitrum te hebben voor het geval je de uitvoering van het bericht op L2 opnieuw moet uitvoeren. Je kunt ETH kopen op sommige beurzen en deze rechstreeks naar je Arbitrum wallet sturen, of je kunt de Arbitrum bridge gebruiken om ETH van een mainnet wallet naar L2 te sturen: [bridge.arbitrum.io](http://bridge.arbitrum.io) - aangezien de gasprijzen op Arbitrum zo laag zijn, heb je waarschijnlijk maar een kleine hoeveelheid nodig, 0.01 ETH is waarschijnlijk meer dan genoeg. -If a subgraph that you curate to has been transferred to L2, you will see a message on Explorer telling you that you're curating to a transferred subgraph. +Als een subgraph waar je curatie signaal op hebt naar L2 is verstuurd, zie je een bericht op de Explorer die je verteld dat je curatie hebt op een subgraph die een transfer heeft gemaakt naar L2. -When looking at the subgraph page, you can choose to withdraw or transfer the curation. Clicking on "Transfer Signal to Arbitrum" will open the transfer tool. +Wanneer je naar de subgraph pagina kijkt, kun je ervoor kiezen om de curatie op te nemen of over te dragen naar L2. Door op "Transfer Signal to Arbitrum" te klikken, worden de Transfer Tools geopend. ![Transfer signal](/img/transferSignalL2TransferTools.png) -After opening the Transfer Tool, you may be prompted to add some ETH to your wallet if you don't have any. Then you will be able to input the L2 wallet address into the "Receiving wallet address" field - **make sure you've entered the correct address here**. Clicking on Transfer Signal will prompt you to execute the transaction on your wallet (note some ETH value is included to pay for L2 gas); this will initiate the transfer. +Na het openen van de Transfer Tool, kun je worden gevraagd om wat ETH aan je wallet toe te voegen als je dat nog niet hebt. Vervolgens kun je het L2 wallet adres invoeren in het veld "Receiving wallet address" - **zorg ervoor dat je het juiste adres hier invoert.** Door op Transfer Signal te klikken, word je gevraagd de transactie op je wallet uit te voeren (let op, sommige ETH is inbegrepen om voor L2 gas te betalen); dit zal de transfer starten. -If you execute this step, **make sure you proceed until completing step 3 in less than 7 days, or your signal GRT will be lost.** This is due to how L1-L2 messaging works on Arbitrum: messages that are sent through the bridge are "retryable tickets" that must be executed within 7 days, and the initial execution might need a retry if there are spikes in the gas price on Arbitrum. +Als je deze stap uitvoert, **zorg ervoor dat je doorgaat tot het voltooien van stap 3 in minder dan 7 dagen, of je signaal GRT zullen verloren gaan.** Dit komt door hoe L1-L2 berichtgeving werkt op Arbitrum: berichten die via de brug worden verzonen, zijn "retry-able tickets" die binnen 7 dagen uitgevoerd moeten worden, en de initiële uitvoering zou een nieuwe poging nodig kunnen hebben als er pieken zijn in de prijs voor gas op Arbitrum. -## Sending curation to L2: step 2 +## Jouw curatie naar L2 verzenden: Stap 2 -Starting the transfer: +De transfer starten: ![Send signal to L2](/img/sendingCurationToL2Step2First.png) -After you start the transfer, the message that sends your L1 curation to L2 must propagate through the Arbitrum bridge. This takes approximately 20 minutes (the bridge waits for the mainnet block containing the transaction to be "safe" from potential chain reorgs). +Nadat je de transfer gestart bent, moet het bericht dat je L1-curatie naar L2 stuurt, via de Arbitrum brug worden doorgestuurd. Dit duurt ongeveer 20 minuten (de brug wacht tot het mainnet block dat de transactie bevat "veilig" is van potentiële chain reorganisaties). -Once this wait time is over, Arbitrum will attempt to auto-execute the transfer on the L2 contracts. +Zodra deze wachttijd voorbij is, zal Arbitrum proberen de transfer automatisch uit te voeren op de L2 contracten. ![Sending curation signal to L2](/img/sendingCurationToL2Step2Second.png) -## Sending curation to L2: step 3 +## Je curatie naar L2 verzenden: Stap 3 -In most cases, this step will auto-execute as the L2 gas included in step 1 should be sufficient to execute the transaction that receives the curation on the Arbitrum contracts. In some cases, however, it is possible that a spike in gas prices on Arbitrum causes this auto-execution to fail. In this case, the "ticket" that sends your curation to L2 will be pending and require a retry within 7 days. +In de meeste gevallen zal deze stap automatisch worden uitgevoerd aangezien de L2 gas kosten die bij stap 1 zijn inbegrepen, voldoende zouden moeten zijn om de transactie die de curatie op de Arbitrum contracten ontvangt, uit te voeren. In sommige gevallen kan het echter zo zijn dat een piek in de gasprijzen op Arbitrum ervoor zorgt dat deze automatische uitvoering mislukt. In dat geval zal het "ticket" dat je curatie naar L2 stuurt, in behandeling blijven en is nodig het binnen 7 dagen nogmaals te proberen. -If this is the case, you will need to connect using an L2 wallet that has some ETH on Arbitrum, switch your wallet network to Arbitrum, and click on "Confirm Transfer" to retry the transaction. +Als dit het geval is, moet je verbinding maken met een L2 wallet die wat ETH op Arbitrum heeft, je wallet netwerk naar Arbitrum overschakelen en op "Bevestig Transfer" klikken op de transactie opnieuw te proberen. ![Send signal to L2](/img/L2TransferToolsFinalCurationImage.png) -## Withdrawing your curation on L1 +## Jouw curatie opnemen op L1 -If you prefer not to send your GRT to L2, or you'd rather bridge the GRT manually, you can withdraw your curated GRT on L1. On the banner on the subgraph page, choose "Withdraw Signal" and confirm the transaction; the GRT will be sent to your Curator address. +Als je je GRT liever niet naar L2 stuurt, of als je de GRT handmatig over de brug wilt sturen, kunt je je gecureerde GRT op L1 opnemen. Kies op de banner op de subgraph pagina "Withdraw Signal" en bevestig de transactie; de GRT wordt naar uw Curator adres gestuurd. From 7d8a7b58f0f324314f46746fa50c154d0f5c774d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:41 -0400 Subject: [PATCH 464/924] New translations l2-transfer-tools-guide.mdx (Polish) --- website/pages/pl/arbitrum/l2-transfer-tools-guide.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/pl/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/pl/arbitrum/l2-transfer-tools-guide.mdx index 11b9ba5a10ef..ec4425e75e39 100644 --- a/website/pages/pl/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/pl/arbitrum/l2-transfer-tools-guide.mdx @@ -1,18 +1,18 @@ --- -title: L2 Transfer Tools Guide +title: Przewodnik po narzędziach przesyłania L2 --- -The Graph has made it easy to move to L2 on Arbitrum One. For each protocol participant, there are a set of L2 Transfer Tools to make transferring to L2 seamless for all network participants. These tools will require you to follow a specific set of steps depending on what you are transferring. +Graph ułatwił przeniesienie danych do L2 na Arbitrum One. Dla każdego uczestnika protokołu dostępny jest zestaw narzędzi do przesyłania na L2, dzięki którym przeniesienie do L2 jest bezproblemowe dla wszystkich uczestników sieci. Narzędzia te wymagają wykonania określonego zestawu kroków w zależności od przenoszonych danych. -Some frequent questions about these tools are answered in the [L2 Transfer Tools FAQ](/arbitrum/l2-transfer-tools-faq). The FAQs contain in-depth explanations of how to use the tools, how they work, and things to keep in mind when using them. +Odpowiedzi na najczęściej zadawane pytania dotyczące tych narzędzi znajdują się w [Narzędzia przesyłania L2 FAQ](/arbitrum/l2-transfer-tools-faq). Odpowiedzi na najczęściej zadawane pytania zawierają szczegółowe wyjaśnienia dotyczące korzystania z narzędzi, ich działania i rzeczy, o których należy pamiętać podczas korzystania z nich. -## How to transfer your subgraph to Arbitrum (L2) +## Jak przenieść swój subgraph do Arbitrum (L2) ## Benefits of transferring your subgraphs -The Graph's community and core devs have [been preparing](https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) to move to Arbitrum over the past year. Arbitrum, a layer 2 or "L2" blockchain, inherits the security from Ethereum but provides drastically lower gas fees. +Społeczność i deweloperzy Graph [przygotowywali się](https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305) do przejścia na Arbitrum w ciągu ostatniego roku. Arbitrum, blockchain warstwy 2 lub "L2", dziedziczy bezpieczeństwo po Ethereum, ale zapewnia znacznie niższe opłaty za gaz. When you publish or upgrade your subgraph to The Graph Network, you're interacting with smart contracts on the protocol and this requires paying for gas using ETH. By moving your subgraphs to Arbitrum, any future updates to your subgraph will require much lower gas fees. The lower fees, and the fact that curation bonding curves on L2 are flat, also make it easier for other Curators to curate on your subgraph, increasing the rewards for Indexers on your subgraph. This lower-cost environment also makes it cheaper for Indexers to index and serve your subgraph. Indexing rewards will be increasing on Arbitrum and decreasing on Ethereum mainnet over the coming months, so more and more Indexers will be transferring their stake and setting up their operations on L2. From 0a8acbd7d67174f3d47c801f5248d032844bb67c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:44 -0400 Subject: [PATCH 465/924] New translations l2-transfer-tools-guide.mdx (Turkish) --- website/pages/tr/arbitrum/l2-transfer-tools-guide.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/tr/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/tr/arbitrum/l2-transfer-tools-guide.mdx index 045263636ff7..f3b65516c0b3 100644 --- a/website/pages/tr/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/tr/arbitrum/l2-transfer-tools-guide.mdx @@ -12,7 +12,7 @@ Bu araçlarla ilgili sıkça sorulan bazı sorular [Katman2 Transfer Araçları ## Subgraphlar'ınızı transfer etmenin faydaları -Graph topluluğu ve çekirdek geliştiricileri geçtiğimiz yıl boyunca Arbitrum'a geçmek için [hazırlanıyordu] \(https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305). Bir katman 2 veya "L2" blok zinciri olan Arbitrum, güvenliği Ethereum'dan devralmakla birlikte büyük ölçüde daha düşük gaz ücretleri sağlamaktadır. +Graph topluluğu ve çekirdek geliştiricileri geçtiğimiz yıl boyunca Arbitrum'a geçmek için [hazırlanıyordu] (https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305). Bir katman 2 veya "L2" blok zinciri olan Arbitrum, güvenliği Ethereum'dan devralmakla birlikte büyük ölçüde daha düşük gaz ücretleri sağlamaktadır. Subgraph'ınızı Graph Ağı'nda yayınladığınızda veya yükselttiğinizde, protokol üzerindeki akıllı sözleşmelerle etkileşime girersiniz ve bu ETH kullanarak gas ödemesi yapmayı gerektirir. Subgraphlar'ınızı Arbitrum'a taşıdığınızda, gelecekte subgraphlar'ınızda yapılacak tüm güncellemeler çok daha düşük gas ücretleri gerektirecektir. Daha düşük ücretler ve Katman2'deki kürasyon bağlanma eğrilerinin sabit olması, diğer Küratörlerin subgraph'ınızda kürasyon yapmasını kolaylaştırır ve subgraph'ınızdaki İndeksleyiciler için ödülleri artırır. Bu düşük maliyetli ortam, İndeksleyicilerin subgraph'ınızı indekslemesini ve hizmet vermesini de daha ucuz hale getirmektedir.. Önümüzdeki aylarda İndeksleme ödülleri Arbitrum'da artacak ve Ethereum ana ağında azalacaktır, bu nedenle gittikçe daha fazla İndeksleyici mevcut stake'lerini transfer edecek ve operasyonlarını Katman2'de başlatacaktır. From ab469ddc93bc2540505deaaf89fe5bc48f0ff8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:47 -0400 Subject: [PATCH 466/924] New translations l2-transfer-tools-guide.mdx (Marathi) --- website/pages/mr/arbitrum/l2-transfer-tools-guide.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/mr/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/mr/arbitrum/l2-transfer-tools-guide.mdx index 7bc557e33b06..6b939c0e9731 100644 --- a/website/pages/mr/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/mr/arbitrum/l2-transfer-tools-guide.mdx @@ -36,7 +36,7 @@ L2 सबग्राफला क्वेरीसाठी वेगवेग आपल्याला "सामान्य" वॉलेट वापरत आहे किंवा MetaMask (एक बाह्यिकपणे मालकीत खाता किंवा EOA, अर्थात स्मार्ट कॉन्ट्रॅक्ट नसलेला वॉलेट), तर ह्या निवडनीय आहे आणि L1 मध्ये असलेल्या समान मालकीचे पत्ते ठेवणे शिफारसले जाते. -आपल्याला स्मार्ट कॉन्ट्रॅक्ट वॉलेट वापरता येत आहे, उदाहरणार्थ, मल्टीसिग (उदा. एक सुरक्षित वॉलेट जसे), तर वेगवेगळे L2 वॉलेट पत्ता निवडणे आवश्यक आहे, किंवा हे संभावनेने तुमच्या हे खाते केवळ मुख्यनेटवर आहे आणि तुम्ही या वॉलेटसह Arbitrumवर व्यवहार सापडण्यात आला नाही. जर आपल्याला स्मार्ट कॉन्ट्रॅक्ट वॉलेट किंवा मल्टीसिग वापरायचे असले तर, Arbitrum वर एक नवीन वॉलेट तयार करा आणि त्याचा पत्ता तुमच्या सबग्राफच्या L2 मालकीसाठी वापरा. +If you're using a smart contract wallet, like a multisig (e.g. a Safe), then choosing a different L2 wallet address is mandatory, as it is most likely that this account only exists on mainnet and you will not be able to make transactions on Arbitrum using this wallet. If you want to keep using a smart contract wallet or multisig, create a new wallet on Arbitrum and use its address as the L2 owner of your subgraph. **तुम्हाला एक वॉलेट पत्ता वापरण्याची महत्त्वाची आहे ज्याच्या तुम्ही नियंत्रण असता आणि त्याने Arbitrum वर व्यवहार करू शकतो. अन्यथा, सबग्राफ गमावला जाईल आणि त्याची पुनर्प्राप्ती केली जाऊ शकणार नाही.** From 412a976bc30af9110ec80e8c2580d0c281a5177b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:48 -0400 Subject: [PATCH 467/924] New translations l2-transfer-tools-guide.mdx (Hindi) --- website/pages/hi/arbitrum/l2-transfer-tools-guide.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/hi/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/hi/arbitrum/l2-transfer-tools-guide.mdx index 8315c648f6a0..7317090d56b2 100644 --- a/website/pages/hi/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/hi/arbitrum/l2-transfer-tools-guide.mdx @@ -18,13 +18,13 @@ Some frequent questions about these tools are answered in the [L2 Transfer Tools ## सिग्नल, आपके L1 सबग्राफ और क्वेरी URL के साथ जो होता है, उसे समझने की प्रक्रिया: -सबग्राफ को Arbitrum पर स्थानांतरित करने के लिए Arbitrum GRT ब्रिज का उपयोग किया जाता है, जिसमें प्राकृतिक अर्बिट्रम ब्रिज का उपयोग उस सबग्राफ को L2 पर भेजने के लिए किया जाता है। "स्थानांतरण" मुख्यनेट पर सबग्राफ को विलीन कर देगा और सबग्राफ को L2 पर ब्रिज का उपयोग करके पुनर्सृजन करने की जानकारी भेजेगा। इसमें सबग्राफ के मालिक के सिगनल किए गए GRT को भी शामिल किया जाएगा, जिसका प्रोत्साहन ब्रिज को स्थानांतरण स्वीकार करने के लिए शून्य से अधिक होना चाहिए। +Subgraph को Arbitrum पर स्थानांतरित करने के लिए Arbitrum GRT bridge का उपयोग किया जाता है, जिसमें प्राकृतिक Arbitrum bridge का उपयोग उस subgraph को L2 पर भेजने के लिए किया जाता है। "स्थानांतरण" मुख्यनेट पर subgraph को विलीन कर देगा और subgraph को L2 पर bridge का उपयोग करके पुनर्सृजन करने की जानकारी भेजेगा। इसमें subgraph के मालिक के signal किए गए GRT को भी शामिल किया जाएगा, जिसका प्रोत्साहन bridge को स्थानांतरण स्वीकार करने के लिए शून्य से अधिक होना चाहिए। जब आप सबग्राफ को स्थानांतरित करने का विकल्प चुनते हैं, तो यह सबग्राफ के सभी क्यूरेशन सिग्नल को GRT में रूपांतरित कर देगा। इसका मतलब है कि मुख्यनेट पर सबग्राफ को "विलीन" किया जाएगा। आपके क्यूरेशन के अनुरूप GRT को सबग्राफ के साथ L2 पर भेजा जाएगा, जहां वे आपके प्रतिनिधित्व में सिग्नल निर्माण करने के लिए उपयोग होंगे। अन्य क्यूरेटर्स का विकल्प होता है कि क्या वे अपने अंशिक GRT को विद्वेष्टित करें या उसे भी L2 पर स्थानांतरित करें ताकि वे उसी सबग्राफ पर सिग्नल निर्मित कर सकें। अगर कोई सबग्राफ का मालिक अपने सबग्राफ को L2 पर स्थानांतरित नहीं करता है और अधिकारिक रूप से उसे एक कॉन्ट्रैक्ट कॉल के माध्यम से विलीन करता है, तो क्यूरेटर्स को सूचित किया जाएगा और उन्हें उनके क्यूरेशन को वापस लेने का अधिकार होगा। -सबग्राफ को स्थानांतरित करते ही, क्यूरेशन को GRT में रूपांतरित किये जाने के कारण इंडेक्सर्स को सबग्राफ को इंडेक्स करने के लिए अब और रिवॉर्ड नहीं मिलेगा। हालांकि, ऐसे इंडेक्सर्स भी होंगे जो 1) स्थानांतरित सबग्राफ की सेवा 24 घंटे तक करते रहेंगे, और 2) तुरंत L2 पर सबग्राफ को इंडेक्स करने की प्रारंभ करेंगे। क्योंकि इन इंडेक्सर्स ने पहले से ही सबग्राफ को इंडेक्स किया होता है, इसलिए सबग्राफ को सिंक करने की प्रतीक्षा करने की आवश्यकता नहीं होगी, और L2 सबग्राफ को तकनीकी रूप से तुरंत क्वेरी किया जा सकेगा। +Subgraph को स्थानांतरित करते ही, curation को GRT में रूपांतरित किये जाने के कारण Indexers को subgraph को index करने के लिए अब और rewards नहीं मिलेगा। हालांकि, ऐसे Indexers भी होंगे जो 1) स्थानांतरित subgraphs की सेवा 24 घंटे तक करते रहेंगे और 2) तुरंत L2 पर subgraph को indexing करने की प्रारंभ करेंगे। क्योंकि इन Indexers ने पहले से ही subgraph को indexed किया होता है, इसलिए subgraph को sync करने की प्रतीक्षा करने की आवश्यकता नहीं होगी, और L2 subgraph को तकनीकी रूप से तुरंत carry किया जा सकेगा। L2 सबग्राफ के क्वेरी को एक विभिन्न URL पर ( 'arbitrum-gateway.thegraph.com' पर) किया जाना चाहिए, लेकिन L1 URL काम करना जारी रखेगा कम से कम 48 घंटे तक। उसके बाद, L1 गेटवे क्वेरी को L2 गेटवे के लिए आगे प्रेषित करेगा (कुछ समय के लिए), लेकिन इससे लैटेंसी बढ़ सकती है, इसलिए संभावना है कि आपको सभी क्वेरी को नए URL पर जल्द से जल्द स्विच कर लेने की सिफारिश की जाए। @@ -34,7 +34,7 @@ L2 सबग्राफ के क्वेरी को एक विभिन सबग्राफ को Arbitrum पर स्थानांतरित करते समय, आप एक विभिन्न वॉलेट का चयन कर सकते हैं जो L2 पर इस सबग्राफ NFT का स्वामित्व करेगा। -अगर आप "सामान्य" वॉलेट जैसे MetaMask का उपयोग कर रहे हैं (जिसे बाह्यिक अधिकारित खाता या EOA कहा जाता है, यानी एक वॉलेट जो स्मार्ट कॉन्ट्रैक्ट नहीं है), तो यह वैकल्पिक है और सिफारिश की जाती है कि आप एल1 में के समान मालिक पता बनाए रखें। +अगर आप "सामान्य" wallet जैसे MetaMask का उपयोग कर रहे हैं (जिसे बाह्यिक अधिकारित खाता या EOA कहा जाता है, यानी एक wallet जो smart contract नहीं है), तो यह वैकल्पिक है और सिफारिश की जाती है कि आप L1 में के समान मालिक पता बनाए रखें।बटुआ अगर आप स्मार्ट कॉन्ट्रैक्ट वॉलेट का उपयोग कर रहे हैं, जैसे कि मल्टिसिग (उदाहरणस्वरूप, एक सेफ), तो एक विभिन्न L2 वॉलेट पता चुनना अनिवार्य है, क्योंकि यह बहुत संभावना है कि यह खाता केवल मुख्यनेट पर मौजूद है और आप इस वॉलेट का उपयोग अर्बिट्रम पर लेन-देन करने के लिए नहीं कर सकते हैं। अगर आप स्मार्ट कॉन्ट्रैक्ट वॉलेट या मल्टिसिग का उपयोग करना चाहते हैं, तो अर्बिट्रम पर एक नया वॉलेट बनाएं और उसका पता अपने सबग्राफ के L2 मालिक के रूप में उपयोग करें। @@ -96,7 +96,7 @@ L2 सबग्राफ के क्वेरी को एक विभिन इससे सबग्राफ प्रकाशित हो जाएगा ताकि Arbitrum पर काम करने वाले इंडेक्सर उसकी सेवा करना शुरू कर सकें। यह भी उसी GRT का करेशन सिग्नल मिन्ट करेगा जो L1 से स्थानांतरित हुए थे। -## चरण 5: क्वेरी यूआरएल को अपडेट करना +## Step 5: query Step 5 को Update करना आपकी सबग्राफ सफलतापूर्वक Arbitrum में स्थानांतरित की गई है! सबग्राफ का प्रश्न करने के लिए, नया URL होगा: @@ -118,7 +118,7 @@ L2 सबग्राफ के क्वेरी को एक विभिन ## अपना L2 वॉलेट चुनना -अगर आप निर्णय लेते हैं कि आप अपने करेशित जीआरटी को एल2 में स्थानांतरित करना चाहते हैं, तो आप एक ऐसे वॉलेट का चयन कर सकते हैं जो एल2 में करेशन सिग्नल के मालिक होगा। +अगर आप निर्णय लेते हैं कि आप अपने करेशित जीआरटी को L2 में स्थानांतरित करना चाहते हैं, तो आप एक ऐसे wallet का चयन कर सकते हैं जो L2 में curation signal के मालिक होगा। अगर आप "सामान्य" वॉलेट जैसे Metamask का उपयोग कर रहे हैं (एक बाहरी स्वामित संकेतक खाता या EOA, अर्थात एक वॉलेट जो एक स्मार्ट कॉन्ट्रैक्ट नहीं है), तो यह वैकल्पिक है और सिफारिश की जाती है कि आप वैसे ही करेशक पता रखें जैसा L1 में है। From 06978dfcdb0fec6c601026fdd109ad58e9739d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:49 -0400 Subject: [PATCH 468/924] New translations l2-transfer-tools-guide.mdx (Yoruba) --- website/pages/yo/arbitrum/l2-transfer-tools-guide.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/yo/arbitrum/l2-transfer-tools-guide.mdx b/website/pages/yo/arbitrum/l2-transfer-tools-guide.mdx index be08610a2bc0..19b84983de3e 100644 --- a/website/pages/yo/arbitrum/l2-transfer-tools-guide.mdx +++ b/website/pages/yo/arbitrum/l2-transfer-tools-guide.mdx @@ -4,7 +4,7 @@ title: L2 Transfer Tools Guide Aworan naa ti jẹ ki o rọrun lati gbe lọ si L2 lori Arbitrum Ọkan. Fun alabaṣe ilana kọọkan, ṣeto ti Awọn irinṣẹ Gbigbe L2 wa lati ṣe gbigbe si L2 lainidi fun gbogbo awọn olukopa nẹtiwọọki. Awọn irinṣẹ wọnyi yoo nilo ki o tẹle awọn igbesẹ kan pato ti o da lori ohun ti o n gbe. -Diẹ ninu awọn ibeere loorekoore nipa awọn irinṣẹ wọnyi ni a dahun ni [Awọn irinṣẹ Gbigbe L2 FAQ] \(/arbitrum/l2-transfer-tools-faq). Awọn FAQ ni awọn alaye ti o jinlẹ ti bi o ṣe le lo awọn irinṣẹ, bawo ni wọn ṣe n ṣiṣẹ, ati awọn nkan lati tọju ni lokan nigba lilo wọn. +Diẹ ninu awọn ibeere loorekoore nipa awọn irinṣẹ wọnyi ni a dahun ni [Awọn irinṣẹ Gbigbe L2 FAQ] (/arbitrum/l2-transfer-tools-faq). Awọn FAQ ni awọn alaye ti o jinlẹ ti bi o ṣe le lo awọn irinṣẹ, bawo ni wọn ṣe n ṣiṣẹ, ati awọn nkan lati tọju ni lokan nigba lilo wọn. ## Bii o ṣe le gbe ipin rẹ lọ si Arbitrum (L2) From 26c446e37bc1616342c610b12f56095a486b8201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:50 -0400 Subject: [PATCH 469/924] New translations substreams-powered-subgraphs.mdx (French) --- .../cookbook/substreams-powered-subgraphs.mdx | 166 +++++++++--------- 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/website/pages/fr/cookbook/substreams-powered-subgraphs.mdx b/website/pages/fr/cookbook/substreams-powered-subgraphs.mdx index ceb3b82b7c0c..98360fd0f35d 100644 --- a/website/pages/fr/cookbook/substreams-powered-subgraphs.mdx +++ b/website/pages/fr/cookbook/substreams-powered-subgraphs.mdx @@ -1,5 +1,5 @@ --- -title: Substreams-powered subgraphs +title: Subgraphs alimentés par Substreams --- [Substreams](/substreams) est un nouveau framework de traitement des données blockchain, développé par StreamingFast pour The Graph Network. Un module de sous-flux peut générer des modifications d'entité, qui sont compatibles avec les entités Subgraph. Un subgraph peut utiliser un tel module Substreams comme source de données, apportant la vitesse d'indexation et les données supplémentaires des Substreams aux développeurs de subgraphs. @@ -14,7 +14,7 @@ npm install -g @graphprotocol/graph-cli ## Obtenir le livre de cuisine -> This cookbook uses this [Substreams-powered subgraph as a reference](https://github.com/graphprotocol/graph-tooling/tree/main/examples/substreams-powered-subgraph). +> Ce guide utilise ce [subgraph alimenté par Substreams comme référence] (https://github.com/graphprotocol/graph-tooling/tree/main/examples/substreams-powered-subgraph). ``` graph init --from-example substreams-powered-subgraph @@ -22,9 +22,9 @@ graph init --from-example substreams-powered-subgraph ## Définir un package Substreams -A Substreams package is composed of types (defined as [Protocol Buffers](https://protobuf.dev/)), modules (written in Rust), and a `substreams.yaml` file which references the types, and specifies how modules are triggered. [Visit the Substreams documentation to learn more about Substreams development](/substreams), and check out [awesome-substreams](https://github.com/pinax-network/awesome-substreams) and the [Substreams cookbook](https://github.com/pinax-network/substreams-cookbook) for more examples. +Un paquet Substreams est composé de types (définis comme [Protocol Buffers](https://protobuf.dev/)), de modules (écrits en Rust) et d'un fichier `substreams.yaml` qui référence les types et spécifie comment les modules sont déclenchés. [Visitez la documentation Substreams pour en savoir plus sur le développement de Substreams](/substreams), et consultez [awesome-substreams](https://github.com/pinax-network/awesome-substreams) et le [Substreams cookbook](https://github.com/pinax-network/substreams-cookbook) pour plus d'exemples. -The Substreams package in question detects contract deployments on Mainnet Ethereum, tracking the creation block and timestamp for all newly deployed contracts. To do this, there is a dedicated `Contract` type in `/proto/example.proto` ([learn more about defining Protocol Buffers](https://protobuf.dev/programming-guides/proto3/#simple)): +Le package Substreams en question détecte les déploiements de contrats sur Mainnet Ethereum, en suivant le bloc de création et l'horodatage de tous les contrats nouvellement déployés. Pour ce faire, il existe un type `Contract` dédié dans `/proto/example.proto` ([en savoir plus sur la définition des tampons de protocole](https://protobuf.dev/programming-guides/proto3/#simple)) : ```proto syntax = "proto3"; @@ -43,63 +43,63 @@ message Contract { } ``` -The core logic of the Substreams package is a `map_contract` module in `lib.rs`, which processes every block, filtering for Create calls which did not revert, returning `Contracts`: +La logique de base du paquet Substreams est un module `map_contract` dans `lib.rs`, qui traite chaque bloc, filtrant les appels Create qui n'ont pas été réversibles, et retournant des `Contrats` : ``` #[substreams::handlers::map] -fn map_contract(block: eth::v2::Block) -> Résultat { - laisser les contrats = bloquer - .transactions() - .flat_map(|tx| { - tx.appels - .iter() - .filter(|call| !call.state_reverted) - .filter(|call| call.call_type == eth::v2::CallType::Create as i32) - .map(|appel| Contrat { - adresse : format!("0x{}", Hex(&call.address)), - numéro_bloc : bloc.numéro, - horodatage : block.timestamp_seconds().to_string(), - ordinal : tx.begin_ordinal, - }) - }) - .collecter(); - Ok(Contrats { contrats }) +fn map_contract(block: eth::v2::Block) -> Result { + let contracts = block + .transactions() + .flat_map(|tx| { + tx.calls + .iter() + .filter(|call| !call.state_reverted) + .filter(|call| call.call_type == eth::v2::CallType::Create as i32) + .map(|call| Contract { + address: format!("0x{}", Hex(&call.address)), + block_number: block.number, + timestamp: block.timestamp_seconds().to_string(), + ordinal: tx.begin_ordinal, + }) + }) + .collect(); + Ok(Contracts { contracts }) } ``` Un package Substreams peut être utilisé par un subgraph tant qu'il possède un module qui produit des changements d'entité compatibles. Le paquet Substreams de l'exemple a un module supplémentaire `graph_out` dans `lib.rs` qui renvoie une sortie `substreams_entity_change::pb::entity::EntityChanges`, qui peut être traitée par Graph Node. -> The `substreams_entity_change` crate also has a dedicated `Tables` function for simply generating entity changes ([documentation](https://docs.rs/substreams-entity-change/1.2.2/substreams_entity_change/tables/index.html)). The Entity Changes generated must be compatible with the `schema.graphql` entities defined in the `subgraph.graphql` of the corresponding subgraph. +> Le crate `substreams_entity_change` a aussi une fonction `Tables` dédiée pour générer simplement des changements d'entités ([documentation](https://docs.rs/substreams-entity-change/1.2.2/substreams_entity_change/tables/index.html)). Les changements d'entités générés doivent être compatibles avec les entités `schema.graphql` définies dans le `subgraph.graphql` du subgraph correspondant. ``` #[substreams::handlers::map] -pub fn graph_out (contrats : contrats) -> Résultat { - // Carte de hachage du nom vers une table - laissez mut tables = Tables::new(); - - pour le contrat dans contracts.contracts.into_iter() { - les tables - .create_row("Contrat", contrat.adresse) - .set("horodatage", contrat.timestamp) - .set("blockNumber", contrat.block_number); - } - - Ok(tables.to_entity_changes()) +pub fn graph_out(contracts: Contracts) -> Result { + // hash map of name to a table + let mut tables = Tables::new(); + + for contract in contracts.contracts.into_iter() { + tables + .create_row("Contract", contract.address) + .set("timestamp", contract.timestamp) + .set("blockNumber", contract.block_number); + } + + Ok(tables.to_entity_changes()) } ``` -These types and modules are pulled together in `substreams.yaml`: +Ces types et modules sont regroupés dans `substreams.yaml` : ``` specVersion: v0.1.0 package: - name: 'substreams_test' # the name to be used in the .spkg - version: v1.0.1 # the version to use when creating the .spkg + name: 'substreams_test' # le nom à utiliser dans le .spkg + version: v1.0.1 # la version à utiliser lors de la création du .spkg -imports: # dependencies +imports: # dépendances entity: https://github.com/streamingfast/substreams-entity-change/releases/download/v0.2.1/substreams-entity-change-v0.2.1.spkg -protobuf: # specifies custom types for use by Substreams modules +protobuf: # spécifie les types personnalisés à utiliser par les modules Substreams files: - example.proto importPaths: @@ -110,7 +110,7 @@ binaries: type: wasm/rust-v1 file: ./target/wasm32-unknown-unknown/release/substreams.wasm -modules: # specify modules with their inputs and outputs. +modules: # spécifie les modules avec leurs entrées et sorties. - name: map_contract kind: map inputs: @@ -123,11 +123,11 @@ modules: # specify modules with their inputs and outputs. inputs: - map: map_contract output: - type: proto:substreams.entity.v1.EntityChanges # this type can be consumed by Graph Node + type: proto:substreams.entity.v1.EntityChanges # ce type peut être consommé par Graph Node ``` -You can check the overall "flow" from a Block, to `map_contract` to `graph_out` by running `substreams graph`: +Vous pouvez vérifier le « flux » global d'un bloc, vers « map_contract » et « graph_out » en exécutant « substreams graph » : ```mermaid graph TD; @@ -137,7 +137,7 @@ graph TD; map_contract --> graph_out; ``` -To prepare this Substreams package for consumption by a subgraph, you must run the following commands: +Pour préparer ce module Substreams à être utilisé par un subgraph, vous devez exécuter les commandes suivantes : ```bash yarn substreams:protogen # génère des types dans /src/pb @@ -151,77 +151,77 @@ yarn substreams:package # empaquette les substreams dans un fichier .spkg Cela génère un fichier `spkg` basé sur le nom et la version du paquet provenant de `substreams.yaml`. Le fichier `spkg` contient toutes les informations dont Graph Node a besoin pour ingérer ce paquet Substreams. -> If you update the Substreams package, depending on the changes you make, you may need to run some or all of the above commands so that the `spkg` is up to date. +> Si vous mettez à jour le module Substreams, en fonction des modifications apportées, vous devrez peut-être exécuter tout ou partie des commandes ci-dessus pour que le paquet `spkg` soit à jour. ## Définition d'un subgraph alimenté par les courants de Substreams -Substreams-powered subgraphs introduce a new `kind` of data source, "substreams". Such subgraphs can only have one data source. +Les subgraphs alimentés par Substreams introduisent un nouveau type de source de données, "substreams". De tels subgraphs ne peuvent avoir qu'une seule source de données. Cette source de données doit spécifier le réseau indexé, le paquet Substreams (`spkg`) en tant qu'emplacement de fichier relatif, et le module au sein de ce paquet Substreams qui produit des changements d'entités compatibles avec le subgraph (dans ce cas, `map_entity_changes`, du paquet Substreams ci-dessus). Le mapping est spécifié, mais identifie simplement le type de mapping ("substreams/graph-entities") et l'apiVersion. -> Currently the Subgraph Studio and The Graph Network support Substreams-powered subgraphs which index `mainnet` (Mainnet Ethereum). +> Actuellement, le Subgraph Studio et The Graph Network prennent en charge les subgraphs alimentés par Substreams qui indexent `mainnet` (Mainnet Ethereum). ```yaml -spécification de la version : 0.0.4 -description : Subgraph de suivi des contrats Ethereum (propulsé par Substreams) -référentiel  : https://github.com/graphprotocol/graph-tooling -schéma: - fichier : schéma.graphql -les sources de données : - - genre  : sous-flux - nom : substream_test - réseau : réseau principal - source: - emballeur : - Nom du module : graph_out - fichier  : substreams-test-v1.0.1.spkg - cartographie : - genre : sous-flux/entités graphs - Api : 0.0.5 -``` - -The `subgraph.yaml` also references a schema file. The requirements for this file are unchanged, but the entities specified must be compatible with the entity changes produced by the Substreams module referenced in the `subgraph.yaml`. +specVersion: 0.0.4 +description: Ethereum Contract Tracking Subgraph (powered by Substreams) +repository: https://github.com/graphprotocol/graph-tooling +schema: + file: schema.graphql +dataSources: + - kind: substreams + name: substream_test + network: mainnet + source: + package: + moduleName: graph_out + file: substreams-test-v1.0.1.spkg + mapping: + kind: substreams/graph-entities + apiVersion: 0.0.5 +``` + +Le `subgraph.yaml` fait également référence à un fichier de schéma. Les exigences pour ce fichier sont inchangées, mais les entités spécifiées doivent être compatibles avec les changements d'entités produits par le module Substreams référencé dans le `subgraph.yaml`. ```graphql -type Contract @entity { +type Contrat @entity { id: ID! - "The timestamp when the contract was deployed" - timestamp: String! + "La date et l'heure de déploiement du contrat" + horodatage: String! - "The block number of the contract deployment" - blockNumber: BigInt! + "Le numéro de bloc du déploiement du contrat" + numéroDeBloc: BigInt! } ``` -Given the above, subgraph developers can use Graph CLI to deploy this Substreams-powered subgraph. +Le `subgraph. yaml` fait également référence à un fichier de schéma. Les exigences pour ce fichier sont inchangées, mais les entités spécifiées doivent être compatibles avec les changements d'entités produits par le module Substreams référencé dans `subgraph. yaml`. -> Substreams-powered subgraphs indexing mainnet Ethereum can be deployed to the [Subgraph Studio](https://thegraph.com/studio/). +> Les subgraphs alimentés par Substreams indexant le mainnet Ethereum peuvent être déployés sur le [Subgraph Studio] (https://thegraph.com/studio/). ```bash -yarn install # install graph-cli -yarn subgraph:build # build the subgraph -yarn subgraph:deploy # deploy the subgraph +yarn install # installe graph-cli +yarn subgraph:build # construit le subgraph +yarn subgraph:deploy # déploie le subgraph ``` -That's it! You have built and deployed a Substreams-powered subgraph. +Voilà, c'est fait ! Vous avez construit et déployé un subgraph alimenté par Substreams. -## Serving Substreams-powered subgraphs +## Servir des subgraphs alimentés par Substreams -In order to serve Substreams-powered subgraphs, Graph Node must be configured with a Substreams provider for the relevant network, as well as a Firehose or RPC to track the chain head. These providers can be configured via a `config.toml` file: +Afin de servir des subgraphs alimentés par Substreams, Graph Node doit être configuré avec un fournisseur Substreams pour le réseau concerné, ainsi qu'un Firehose ou un RPC pour suivre la tête de chaîne. Ces fournisseurs peuvent être configurés via un fichier `config.toml` : ```toml [chains.mainnet] shard = "main" protocol = "ethereum" provider = [ - { label = "substreams-provider-mainnet", + { label = "fournisseur-substreams-mainnet", details = { type = "substreams", url = "https://mainnet-substreams-url.grpc.substreams.io/", - token = "exampletokenhere" }}, - { label = "firehose-provider-mainnet", + token = "exempletokenici" }}, + { label = "fournisseur-firehose-mainnet", details = { type = "firehose", url = "https://mainnet-firehose-url.grpc.firehose.io/", - token = "exampletokenhere" }}, + token = "exempletokenici" }}, ] ``` From 914e38cb832015f976f812e1f5e50c14d556ab72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:52 -0400 Subject: [PATCH 470/924] New translations substreams-powered-subgraphs.mdx (Czech) --- .../cookbook/substreams-powered-subgraphs.mdx | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/website/pages/cs/cookbook/substreams-powered-subgraphs.mdx b/website/pages/cs/cookbook/substreams-powered-subgraphs.mdx index 6b84c84358c8..c101f72a9a17 100644 --- a/website/pages/cs/cookbook/substreams-powered-subgraphs.mdx +++ b/website/pages/cs/cookbook/substreams-powered-subgraphs.mdx @@ -1,30 +1,30 @@ --- -title: Substreams-powered subgraphs +title: Podgrafy napájen substreamů --- -[Substreams](/substreams) is a new framework for processing blockchain data, developed by StreamingFast for The Graph Network. A substreams modules can output entity changes, which are compatible with Subgraph entities. A subgraph can use such a Substreams module as a data source, bringing the indexing speed and additional data of Substreams to subgraph developers. +[Substreams](/substreams) je nový framework pro zpracování blockchainových dat vyvinutý společností StreamingFast pro The Grafu síť. Moduly Substreams mohou vypisovat změny entit, které jsou kompatibilní s entitami Subgraph. Subgraph může takový modul Substreams používat jako zdroj dat, což vývojářům Subgraphu přináší rychlost indexování a další data Substreams. -## Requirements +## Požadavky -This cookbook requires [yarn](https://yarnpkg.com/), [the dependencies necessary for local Substreams development](https://substreams.streamingfast.io/developers-guide/installation-requirements), and the latest version of Graph CLI (>=0.52.0): +Tato kuchařka vyžaduje [yarn](https://yarnpkg.com/), [závislosti potřebné pro vývoj lokálních Substreamů](https://substreams.streamingfast.io/developers-guide/installation-requirements) a nejnovější verzi Graph CLI (>=0.52.0): ``` npm install -g @graphprotocol/graph-cli ``` -## Get the cookbook +## Získejte kuchařku -> This cookbook uses this [Substreams-powered subgraph as a reference](https://github.com/graphprotocol/graph-tooling/tree/main/examples/substreams-powered-subgraph). +> Tato kuchařka používá tento [Substreams-powered subgraph jako referenci](https://github.com/graphprotocol/graph-tooling/tree/main/examples/substreams-powered-subgraph). ``` graph init --from-example substreams-powered-subgraph ``` -## Defining a Substreams package +## Definování balíčku Substreams -A Substreams package is composed of types (defined as [Protocol Buffers](https://protobuf.dev/)), modules (written in Rust), and a `substreams.yaml` file which references the types, and specifies how modules are triggered. [Visit the Substreams documentation to learn more about Substreams development](/substreams), and check out [awesome-substreams](https://github.com/pinax-network/awesome-substreams) and the [Substreams cookbook](https://github.com/pinax-network/substreams-cookbook) for more examples. +Balíček Substreams se skládá z typů (definovaných jako [Protocol Buffers](https://protobuf.dev/)), modulů (napsaných v jazyce Rust) a souboru `substreams.yaml`, který odkazuje na typy a určuje, jak se moduly spouštějí. [Navštivte dokumentaci Substreams, kde se dozvíte více o vývoji Substreams](/substreams), a podívejte se na [awesome-substreams](https://github.com/pinax-network/awesome-substreams) a [Substreams cookbook](https://github.com/pinax-network/substreams-cookbook), kde najdete další příklady. -The Substreams package in question detects contract deployments on Mainnet Ethereum, tracking the creation block and timestamp for all newly deployed contracts. To do this, there is a dedicated `Contract` type in `/proto/example.proto` ([learn more about defining Protocol Buffers](https://protobuf.dev/programming-guides/proto3/#simple)): +Dotyčný balíček Substreams detekuje nasazení kontraktů na Mainnet Ethereum a sleduje blok vytvoření a časové razítko všech nově nasazených kontraktů. K tomu je v souboru `/proto/example.proto` ([více informací o definování protokolových bufferů](https://protobuf.dev/programming-guides/proto3/#simple)) vyhrazen typ `Contract`: ```proto syntax = "proto3"; @@ -43,7 +43,7 @@ message Contract { } ``` -The core logic of the Substreams package is a `map_contract` module in `lib.rs`, which processes every block, filtering for Create calls which did not revert, returning `Contracts`: +Jádrem logiky balíčku Substreams je modul `map_contract` v souboru `lib.rs`, který zpracovává každý blok, filtruje volání Create, která nebyla vrácena, a vrací `Contracts`: ``` #[substreams::handlers::map] @@ -67,9 +67,9 @@ fn map_contract(block: eth::v2::Block) -> Result The `substreams_entity_change` crate also has a dedicated `Tables` function for simply generating entity changes ([documentation](https://docs.rs/substreams-entity-change/1.2.2/substreams_entity_change/tables/index.html)). The Entity Changes generated must be compatible with the `schema.graphql` entities defined in the `subgraph.graphql` of the corresponding subgraph. +> Bedna `substreams_entity_change` má také speciální funkci `Tables` pro jednoduché generování změn entit ([dokumentace](https://docs.rs/substreams-entity-change/1.2.2/substreams_entity_change/tables/index.html)). Vygenerované změny entit musí být kompatibilní s entitami `schema.graphql` definovanými v `subgraph.graphql` příslušného podgrafu. ``` #[substreams::handlers::map] @@ -88,7 +88,7 @@ pub fn graph_out(contracts: Contracts) -> Result graph_out; ``` -To prepare this Substreams package for consumption by a subgraph, you must run the following commands: +Chcete-li tento balíček Substreams připravit ke spotřebě podgrafem, musíte spustit následující příkazy: ```bash yarn substreams:protogen # generates types in /src/pb @@ -147,19 +147,19 @@ yarn substreams:package # packages the substreams in a .spkg file # alternatively, yarn substreams:prepare calls all of the above commands ``` -> These scripts are defined in the `package.json` file if you want to understand the underlying substreams commands +> Tyto skripty jsou definovány v souboru `package.json`, pokud chcete porozumět základním příkazům substreamů -This generates a `spkg` file based on the package name and version from `substreams.yaml`. The `spkg` file has all the information which Graph Node needs to ingest this Substreams package. +Tím se vygeneruje soubor `spkg` na základě názvu a verze balíčku ze souboru `substreams.yaml`. Soubor `spkg` obsahuje všechny informace, které Grafu uzel potřebuje k požití tohoto balíčku Substreams. -> If you update the Substreams package, depending on the changes you make, you may need to run some or all of the above commands so that the `spkg` is up to date. +> Pokud aktualizujete balíček Substreams, může být v závislosti na provedených změnách nutné spustit některé nebo všechny výše uvedené příkazy, aby byl balíček `spkg` aktuální. -## Defining a Substreams-powered subgraph +## Definování podgrafu poháněný substreamů -Substreams-powered subgraphs introduce a new `kind` of data source, "substreams". Such subgraphs can only have one data source. +Subgrafy poháněné substreamy představují nový typ datového zdroje s názvem "substreams". Tyto subgrafy mohou mít pouze jeden datový zdroj. -This data source must specify the indexed network, the Substreams package (`spkg`) as a relative file location, and the module within that Substreams package which produces subgraph-compatible entity changes (in this case `map_entity_changes`, from the Substreams package above). The mapping is specified, but simply identifies the mapping kind ("substreams/graph-entities") and the apiVersion. +Tento zdroj dat musí specifikovat indexovanou síť, balíček Substreams (`spkg`) jako relativní umístění souboru a modul v rámci tohoto balíčku Substreams, který vytváří změny entit kompatibilní s podgrafem (v tomto případě `map_entity_changes` z výše uvedeného balíčku Substreams). Mapování je specifikováno, ale jednoduše identifikuje druh mapování ("substreams/graph-entities") a apiVersion. -> Currently the Subgraph Studio and The Graph Network support Substreams-powered subgraphs which index `mainnet` (Mainnet Ethereum). +> V současné době Subgraph Studio a The Grafu síť podporují subgrafy poháněné substreamy, které indexují mainnet (Mainnet Ethereum). ```yaml specVersion: 0.0.4 @@ -180,7 +180,7 @@ dataSources: apiVersion: 0.0.5 ``` -The `subgraph.yaml` also references a schema file. The requirements for this file are unchanged, but the entities specified must be compatible with the entity changes produced by the Substreams module referenced in the `subgraph.yaml`. +Soubor `subgraph.yaml` také odkazuje na soubor se schématem. Požadavky na tento soubor se nemění, ale zadané entity musí být kompatibilní se změnami entit vytvořenými modulem Substreams, na který odkazuje soubor `subgraph.yaml`. ```graphql type Contract @entity { @@ -194,9 +194,9 @@ type Contract @entity { } ``` -Given the above, subgraph developers can use Graph CLI to deploy this Substreams-powered subgraph. +Vzhledem k výše uvedenému mohou vývojáři podgrafů použít rozhraní Graph CLI k nasazení tohoto podgrafu poháněného substreamy. -> Substreams-powered subgraphs indexing mainnet Ethereum can be deployed to the [Subgraph Studio](https://thegraph.com/studio/). +> Subgrafy poháněné substreamy indexující hlavní síť Ethereum mohou být nasazeny do [Subgraph Studio](https://thegraph.com/studio/). ```bash yarn install # install graph-cli @@ -204,11 +204,11 @@ yarn subgraph:build # build the subgraph yarn subgraph:deploy # deploy the subgraph ``` -That's it! You have built and deployed a Substreams-powered subgraph. +Hotovo! Postavil(a) jste a nasadil(a) podgraf poháněný substreamy. -## Serving Substreams-powered subgraphs +## Obsluha podgrafů poháněných substreamy -In order to serve Substreams-powered subgraphs, Graph Node must be configured with a Substreams provider for the relevant network, as well as a Firehose or RPC to track the chain head. These providers can be configured via a `config.toml` file: +Aby bylo možné servírovat subgrafy napájené Substreams, musí být Graph Node nakonfigurován s poskytovatelem Substreams pro příslušnou síť a také s Firehose nebo RPC pro sledování hlavy řetězce. Tyto poskytovatele lze nakonfigurovat pomocí souboru `config.toml`: ```toml [chains.mainnet] From 3330d5e12c8a99dd80eba841a2496db6f1d7445c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:54 -0400 Subject: [PATCH 471/924] New translations substreams-powered-subgraphs.mdx (Japanese) --- website/pages/ja/cookbook/substreams-powered-subgraphs.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ja/cookbook/substreams-powered-subgraphs.mdx b/website/pages/ja/cookbook/substreams-powered-subgraphs.mdx index d6f15b50efd7..ca30db8ff573 100644 --- a/website/pages/ja/cookbook/substreams-powered-subgraphs.mdx +++ b/website/pages/ja/cookbook/substreams-powered-subgraphs.mdx @@ -2,7 +2,7 @@ title: Substreams-powered subgraphs --- -[Substreams](/substreams) is a new framework for processing blockchain data, developed by StreamingFast for The Graph Network. A substreams modules can output entity changes, which are compatible with Subgraph entities. A subgraph can use such a Substreams module as a data source, bringing the indexing speed and additional data of Substreams to subgraph developers. +[Substreams](/substreams)は、StreamingFastがThe Graph Networkのために開発した、ブロックチェーンのデータを処理するための新しいフレームワークである。サブストリームモジュールは、サブグラフエンティティと互換性のあるエンティティの変更を出力することができます。サブグラフはこのようなサブストリームモジュールをデータソースとして使用することができ、サブストリームのインデックス作成速度と追加データをサブグラフ開発者にもたらします。 ## 要件 @@ -22,7 +22,7 @@ npm install -g @graphprotocol/graph-cli ## サブストリームパッケージの定義 -A Substreams package is composed of types (defined as [Protocol Buffers](https://protobuf.dev/)), modules (written in Rust), and a `substreams.yaml` file which references the types, and specifies how modules are triggered. [Visit the Substreams documentation to learn more about Substreams development](/substreams), and check out [awesome-substreams](https://github.com/pinax-network/awesome-substreams) and the [Substreams cookbook](https://github.com/pinax-network/substreams-cookbook) for more examples. +Substreamsパッケージは、型([プロトコルバッファ](https://protobuf.dev/)として定義される)、モジュール(Rustで記述される)、および型を参照し、モジュールがどのようにトリガーされるかを指定する`substreams.yaml`ファイルで構成されます。[サブストリームの開発についての詳細はサブストリームのドキュメントを参照](/substreams)してください。また、[awesome-substreams](https://github.com/pinax-network/awesome-substreams)や[Substreams cookbook](https://github.com/pinax-network/substreams-cookbook)を参照してください。 問題の Substreams パッケージは、メインネット イーサリアム上のコントラクトのデプロイメントを検出し、新しくデプロイされたすべてのコントラクトの作成ブロックとタイムスタンプを追跡します。これを行うには、`/proto/example.proto` に専用の `Contract` タイプがあります ([プロトコル バッファーの定義の詳細](https://protobuf.dev/programming-guides/proto3/#simple)): From d77f7523eff298e0d67342f53f22d159653c1e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:14:57 -0400 Subject: [PATCH 472/924] New translations substreams-powered-subgraphs.mdx (Russian) --- website/pages/ru/cookbook/substreams-powered-subgraphs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ru/cookbook/substreams-powered-subgraphs.mdx b/website/pages/ru/cookbook/substreams-powered-subgraphs.mdx index b86021c64b79..43e064ef666b 100644 --- a/website/pages/ru/cookbook/substreams-powered-subgraphs.mdx +++ b/website/pages/ru/cookbook/substreams-powered-subgraphs.mdx @@ -6,7 +6,7 @@ title: Субграфы, работающие на основе субпоток ## Требования -Для использования этого справочного материала требуются [yarn]\(https://yarnpkg.com /), [зависимости, необходимые для разработки локальных субпотоков](https://substreams.streamingfast.io/developers-guide/installation-requirements) и последняя версия Graph CLI (>=0.52.0): +Для использования этого справочного материала требуются [yarn](https://yarnpkg.com /), [зависимости, необходимые для разработки локальных субпотоков](https://substreams.streamingfast.io/developers-guide/installation-requirements) и последняя версия Graph CLI (>=0.52.0): ``` npm install -g @graphprotocol/graph-cli From ddc99306a7a14da444e86ab2b965d414d2d74a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:00 -0400 Subject: [PATCH 473/924] New translations substreams-powered-subgraphs.mdx (Urdu (Pakistan)) --- website/pages/ur/cookbook/substreams-powered-subgraphs.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ur/cookbook/substreams-powered-subgraphs.mdx b/website/pages/ur/cookbook/substreams-powered-subgraphs.mdx index 9e2f2d129e49..ce46df2aea8b 100644 --- a/website/pages/ur/cookbook/substreams-powered-subgraphs.mdx +++ b/website/pages/ur/cookbook/substreams-powered-subgraphs.mdx @@ -2,7 +2,7 @@ title: سب سٹریمز سے چلنے والے سب گرافس --- -[Substreams]\(/سب سٹریمز) بلاکچین ڈیٹا کی پروسیسنگ کے لیے ایک نیا فریم ورک ہے، جسے سٹریمنگ فاسٹ نے گراف نیٹ ورک کے لیے تیار کیا ہے۔ سب سٹریمز کے ماڈیولز ہستی کی تبدیلیوں کو آؤٹ پٹ کر سکتے ہیں، جو سب گراف اداروں کے ساتھ ہم آہنگ ہیں۔ ایک سب گراف اس طرح کے سب سٹریمز ماڈیول کو ڈیٹا سورس کے طور پر استعمال کر سکتا ہے، جس سے انڈیکسنگ کی رفتار اور سب سٹریمز کا اضافی ڈیٹا سب گراف ڈویلپرز تک پہنچ جاتا ہے. +[Substreams](/سب سٹریمز) بلاکچین ڈیٹا کی پروسیسنگ کے لیے ایک نیا فریم ورک ہے، جسے سٹریمنگ فاسٹ نے گراف نیٹ ورک کے لیے تیار کیا ہے۔ سب سٹریمز کے ماڈیولز ہستی کی تبدیلیوں کو آؤٹ پٹ کر سکتے ہیں، جو سب گراف اداروں کے ساتھ ہم آہنگ ہیں۔ ایک سب گراف اس طرح کے سب سٹریمز ماڈیول کو ڈیٹا سورس کے طور پر استعمال کر سکتا ہے، جس سے انڈیکسنگ کی رفتار اور سب سٹریمز کا اضافی ڈیٹا سب گراف ڈویلپرز تک پہنچ جاتا ہے. ## تقاضے @@ -22,7 +22,7 @@ graph init --from-example substreams-powered-subgraph ## سب سٹریمز پیکیج کی وضاحت کرنا -ایک سب سٹریمز پیکیج اقسام پر مشتمل ہے (جس کی وضاحت [پروٹوکول بفرز](https://protobuf.dev/))، ماڈیولز (Rust میں لکھی گئی ہے)، اور ایک `substreams.yaml` فائل جو اقسام کا حوالہ دیتی ہے، اور یہ بتاتی ہے کہ ماڈیول کیسے ہیں متحرک ہیں. [سب سٹریمز ڈویلپمنٹ کے بارے میں مزید جاننے کے لیے سب سٹریمز کی دستاویزات دیکھیں](/substreams)، اور [wesome-substreams](https://github.com/pinax-network/awesome-substreams) اور [Substreams cookbook]\(https مزید مثالوں کے لیے://github.com/pinax-network/substreams-cookbook). +ایک سب سٹریمز پیکیج اقسام پر مشتمل ہے (جس کی وضاحت [پروٹوکول بفرز](https://protobuf.dev/))، ماڈیولز (Rust میں لکھی گئی ہے)، اور ایک `substreams.yaml` فائل جو اقسام کا حوالہ دیتی ہے، اور یہ بتاتی ہے کہ ماڈیول کیسے ہیں متحرک ہیں. [سب سٹریمز ڈویلپمنٹ کے بارے میں مزید جاننے کے لیے سب سٹریمز کی دستاویزات دیکھیں](/substreams)، اور [wesome-substreams](https://github.com/pinax-network/awesome-substreams) اور [Substreams cookbook](https مزید مثالوں کے لیے://github.com/pinax-network/substreams-cookbook). زیر بحث سب اسٹریمز پیکیج مینیٹ ایتھیریم پر کنٹریکٹ کی تعیناتیوں کا پتہ لگاتا ہے، تمام نئے تعینات کردہ کنٹریکٹس کے لیے تخلیق بلاک اور ٹائم اسٹیمپ کا پتہ لگاتا ہے۔ ایسا کرنے کے لیے، `/proto/example.proto` ([پروٹوکول بفرز کی تعریف کرنے کے بارے میں مزید جانیں](https://protobuf.dev/programming-guides/proto3/#simple)) میں ایک مخصوص `Contract` قسم ہے: From 460382d30ac4bf1055b133b6a9505ffee3b574ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:04 -0400 Subject: [PATCH 474/924] New translations substreams-powered-subgraphs-faq.mdx (French) --- .../substreams-powered-subgraphs-faq.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/fr/developing/substreams-powered-subgraphs-faq.mdx b/website/pages/fr/developing/substreams-powered-subgraphs-faq.mdx index 4322a5964f4f..20c7e75502f6 100644 --- a/website/pages/fr/developing/substreams-powered-subgraphs-faq.mdx +++ b/website/pages/fr/developing/substreams-powered-subgraphs-faq.mdx @@ -4,13 +4,13 @@ title: FAQ sur les subgraphs alimentés par les sous-flux ## Que sont les sous-flux ? -Développé par [StreamingFast] \(https://www.streamingfast.io/), Substreams est un moteur de traitement exceptionnellement puissant capable de consommer de riches flux de données blockchain. Substreams vous permet d'affiner et de façonner les données de la blockchain pour une digestion rapide et transparente par les applications des utilisateurs finaux. Plus précisément, Substreams est un moteur agnostique à la blockchain, parallélisé et à flux continu, qui sert de couche de transformation des données de la blockchain. Alimenté par le [Firehose](https://firehose.streamingfast.io/), il permet aux développeurs d'écrire des modules Rust, de s'appuyer sur des modules communautaires, de fournir une indexation extrêmement performante et de [sink] \(https://substreams.streamingfast.io/developers-guide/sink-targets) leurs données n'importe où. +Développé par [StreamingFast] (https://www.streamingfast.io/), Substreams est un moteur de traitement exceptionnellement puissant capable de consommer de riches flux de données blockchain. Substreams vous permet d'affiner et de façonner les données de la blockchain pour une digestion rapide et transparente par les applications des utilisateurs finaux. Plus précisément, Substreams est un moteur agnostique à la blockchain, parallélisé et à flux continu, qui sert de couche de transformation des données de la blockchain. Alimenté par le [Firehose](https://firehose.streamingfast.io/), il permet aux développeurs d'écrire des modules Rust, de s'appuyer sur des modules communautaires, de fournir une indexation extrêmement performante et de [sink] (https://substreams.streamingfast.io/developers-guide/sink-targets) leurs données n'importe où. Rendez-vous sur le site [Substreams Documentation](/substreams) pour en savoir plus sur Substreams. ## Qu'est-ce qu'un subgraph alimenté par des courants de fond ? -Les [subgraphs alimentés par Substreams](/cookbook/substreams-powered-subgraphs/) combinent la puissance de Substreams avec la capacité d'interrogation des subgraphs. Lors de la publication d'un subgraph alimenté par Substreams, les données produites par les transformations Substreams peuvent [output entity changes] \(https://github.com/streamingfast/substreams-sink-entity-changes/blob/develop/substreams-entity-change/src/tables.rs), qui sont compatibles avec les entités du subgraph. +Les [subgraphs alimentés par Substreams](/cookbook/substreams-powered-subgraphs/) combinent la puissance de Substreams avec la capacité d'interrogation des subgraphs. Lors de la publication d'un subgraph alimenté par Substreams, les données produites par les transformations Substreams peuvent [output entity changes] (https://github.com/streamingfast/substreams-sink-entity-changes/blob/develop/substreams-entity-change/src/tables.rs), qui sont compatibles avec les entités du subgraph. Si vous êtes déjà familiarisé avec le développement de subgraphs, notez que les subgraphs alimentés par Substreams peuvent ensuite être interrogés, comme s'ils avaient été produits par la couche de transformation AssemblyScript, avec tous les avantages de Subgraph, comme la fourniture d'une API GraphQL dynamique et flexible. @@ -22,7 +22,7 @@ En revanche, les subgraphs alimentés par des flux secondaires disposent d'une s ## Quels sont les avantages de l'utilisation de subgraphs alimentés par des courants descendants ? -Les subgraphs alimentés par Substreams combinent tous les avantages de Substreams avec la capacité d'interrogation des subgraphs. Ils apportent au graphe une plus grande composabilité et une indexation très performante. Ils permettent également de nouveaux cas d'utilisation des données ; par exemple, une fois que vous avez construit votre subgraph alimenté par Substreams, vous pouvez réutiliser vos [modules Substreams](https://substreams.streamingfast.io/developers-guide/modules) pour sortir vers différents [sinks] \(https://substreams.streamingfast.io/developers-guide/sink-targets) tels que PostgreSQL, MongoDB et Kafka. +Les subgraphs alimentés par Substreams combinent tous les avantages de Substreams avec la capacité d'interrogation des subgraphs. Ils apportent au graphe une plus grande composabilité et une indexation très performante. Ils permettent également de nouveaux cas d'utilisation des données ; par exemple, une fois que vous avez construit votre subgraph alimenté par Substreams, vous pouvez réutiliser vos [modules Substreams](https://substreams.streamingfast.io/developers-guide/modules) pour sortir vers différents [sinks] (https://substreams.streamingfast.io/developers-guide/sink-targets) tels que PostgreSQL, MongoDB et Kafka. ## Quels sont les avantages de Substreams ? @@ -38,21 +38,21 @@ L'utilisation de Substreams présente de nombreux avantages, notamment: - Accès à des données supplémentaires qui ne sont pas disponibles dans le cadre de la RPC JSON -- All the benefits of the Firehose. +- Tous les avantages du Firehose. -## What is the Firehose? +## Tous les avantages du Firehose? -Développé par [StreamingFast] \(https://www.streamingfast.io/), le Firehose est une couche d'extraction de données de blockchain conçue à partir de zéro pour traiter l'historique complet des blockchains à des vitesses jusqu'alors inconnues . Obtenez une approche basée sur les fichiers et le streaming, il s'agit d'un composant essentiel de la suite de technologies open-source de StreamingFast et de la base de Substreams. +Développé par [StreamingFast] (https://www.streamingfast.io/), le Firehose est une couche d'extraction de données de blockchain conçue à partir de zéro pour traiter l'historique complet des blockchains à des vitesses jusqu'alors inconnues . Obtenez une approche basée sur les fichiers et le streaming, il s'agit d'un composant essentiel de la suite de technologies open-source de StreamingFast et de la base de Substreams. -Consultez la [documentation] \(https://firehose.streamingfast.io/) pour en savoir plus sur le Firehose. +Consultez la [documentation] (https://firehose.streamingfast.io/) pour en savoir plus sur le Firehose. ## Quels sont les avantages du Firehose ? -There are many benefits to using Firehose, including: +L'utilisation de Firehose présente de nombreux avantages, notamment: - Temps de latence le plus faible et pas d'interrogation : Les nœuds Firehose sont conçus pour faire la course afin de diffuser les données en bloc en premier, selon le principe "streaming-first". -- Prevents downtimes: Designed from the ground up for High Availability. +- Prévient les temps d'arrêt : Conçu dès le départ pour une haute disponibilité. - Ne manquez jamais le rythme : Le curseur du flux Firehose est conçu pour gérer les bifurcations et pour reprendre là où vous vous êtes arrêté dans n'importe quelle condition. @@ -64,13 +64,13 @@ There are many benefits to using Firehose, including: La [documentation Substreams](/substreams) vous apprendra à construire des modules Substreams. -La [documentation sur les subgraphs alimentés par des flux partiels] \(/cookbook/substreams-powered-subgraphs/) vous montrera comment les emballer pour les déployer sur The Graph. +La [documentation sur les subgraphs alimentés par des flux partiels] (/cookbook/substreams-powered-subgraphs/) vous montrera comment les emballer pour les déployer sur The Graph. ## Quel est le rôle des modules Rust dans Substreams ? Les modules Rust sont l'équivalent des mappeurs AssemblyScript dans les subgraphs. Ils sont compilés dans WASM de la même manière, mais le modèle de programmation permet une exécution parallèle. Ils définissent le type de transformations et d'agrégations que vous souhaitez appliquer aux données brutes de la blockchain. -Voir [documentation des modules] \(https://substreams.streamingfast.io/developers-guide/modules) pour plus de détails. +Voir [documentation des modules] (https://substreams.streamingfast.io/developers-guide/modules) pour plus de détails. ## Qu'est-ce qui rend Substreams composable ? @@ -84,7 +84,7 @@ Après avoir [defining](/cookbook/substreams-powered-subgraphs/) un Subgraph ali ## Où puis-je trouver des exemples de subgraphs et de subgraphs alimentés par des substreams ? -Vous pouvez visiter [ce repo Github] \(https://github.com/pinax-network/awesome-substreams) pour trouver des exemples de Substreams et de subgraphs alimentés par Substreams. +Vous pouvez visiter [ce repo Github] (https://github.com/pinax-network/awesome-substreams) pour trouver des exemples de Substreams et de subgraphs alimentés par Substreams. ## Que signifient les subgraphs et les subgraphs alimentés par des substreams pour le réseau graph ? From c5d760b729b9f4cb44e077faa05a9d42831c9004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:05 -0400 Subject: [PATCH 475/924] New translations substreams-powered-subgraphs-faq.mdx (Arabic) --- .../substreams-powered-subgraphs-faq.mdx | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/website/pages/ar/developing/substreams-powered-subgraphs-faq.mdx b/website/pages/ar/developing/substreams-powered-subgraphs-faq.mdx index 02592fd21457..66633e8820e3 100644 --- a/website/pages/ar/developing/substreams-powered-subgraphs-faq.mdx +++ b/website/pages/ar/developing/substreams-powered-subgraphs-faq.mdx @@ -4,27 +4,27 @@ title: Substreams-powered subgraphs FAQ ## What are Substreams? -Developed by [StreamingFast](https://www.streamingfast.io/), Substreams is an exceptionally powerful processing engine capable of consuming rich streams of blockchain data. Substreams allow you to refine and shape blockchain data for fast and seamless digestion by end-user applications. More specifically, Substreams is a blockchain-agnostic, parallelized, and streaming-first engine, serving as a blockchain data transformation layer. Powered by the [Firehose](https://firehose.streamingfast.io/), it ​​enables developers to write Rust modules, build upon community modules, provide extremely high-performance indexing, and [sink](https://substreams.streamingfast.io/developers-guide/sink-targets) their data anywhere. +تم تطوير سبستريمز بواسطة [ستريمنج فاست] (https://www.streamingfast.io/) وهو محرك معالجة قوي بشكل استثنائي قادر على استيعاب تدفقات غنية من بيانات سلاسل الكتل. يتيح لك سبستريمز تحسين وتشكيل بيانات سلاسل الكتل لاستخلاص سريع وسلس بواسطة تطبيقات المستخدم النهائي. وبشكل أكثر تحديداً، فإن سبستريمز هو محرك يعمل بشكل مستقل عن سلاسل الكتل، وبالتوازي، بأولوية-التدفق ويعمل كطبقة لتحويل بيانات سلاسل الكتل. مدعوماً [بالفايرهوز](https://firehose.streamingfast.io/) يمكن المطورين من كتابة وحدات لغة رست والبناء على وحدات المجتمع وتوفير فهرسة عالية الأداء للبيانات وإدخال [sink](https://substreams.streamingfast.io/developers-guide/sink-targets) بياناتهم إلى أي مكان. -Go to the [Substreams Documentation](/substreams) to learn more about Substreams. +اذهب إلى [وثائق سبستريمز](/substreams) للتعرف على المزيد حول سبستريمز. -## What are Substreams-powered subgraphs? +## ما هي الغرافات الفرعية المدعومة بسبستريمز؟ -[Substreams-powered subgraphs](/cookbook/substreams-powered-subgraphs/) combine the power of Substreams with the queryability of subgraphs. When publishing a Substreams-powered Subgraph, the data produced by the Substreams transformations, can [output entity changes](https://github.com/streamingfast/substreams-sink-entity-changes/blob/develop/substreams-entity-change/src/tables.rs), which are compatible with subgraph entities. +[الغرافات الفرعية المدعومة بسبستريمز](/cookbook/substreams-powered-subgraphs/) تجمع بين قوة سبستريمز وقابلية الاستعلام للغرافات الفرعية. عند نشر غراف فرعي مدعوم بواسطة سبستريمز، يمكن أن تنتج البيانات التي تم إنتاجها بواسطة تحويلات سبستريمز، تغييرات في الكيانات (https://github.com/streamingfast/substreams-sink-entity-changes/blob/develop/substreams-entity-change/src/tables.rs)، والتي تكون متوافقة مع كيانات الغرافات الفرعية. -If you are already familiar with subgraph development, then note that Substreams-powered subgraphs can then be queried, just as if it had been produced by the AssemblyScript transformation layer, with all the Subgraph benefits, like providing a dynamic and flexible GraphQL API. +إذا كنت على دراية بتطوير الغراف الفرعي، فإن الغرافات الفرعية المدعومة بواسطة سبستريمز يمكن استعلامها بنفس الطريقة كما لو أنها تم إنتاجها بواسطة طبقة تحويل لغة أسيمبلي اسكريبت، بالإضافة إلى جميع فوائد الغراف الفرعي، مثل توفير واجهة برمجة تطبيقات ديناميكية ومرنة للغة استعلام الغراف. -## How are Substreams-powered subgraphs different from subgraphs? +## كيف تختلف الغرافات الفرعية التي تعمل بسبستريمز عن الغرافات الفرعية؟ -Subgraphs are made up of datasources which specify on-chain events, and how those events should be transformed via handlers written in Assemblyscript. These events are processed sequentially, based on the order in which events happen on-chain. +الغرافات الفرعية تتكون من مصادر البيانات التي تحدد الأحداث على السلسلة وكيف ينبغي تحويل تلك الأحداث من خلال معالجات مكتوبة بـلغة أسمبلي اسكريبت. يتم معالجة هذه الأحداث بتسلسل، استناداً إلى ترتيب حدوث الأحداث على السلسلة. -By contrast, substreams-powered subgraphs have a single datasource which references a substreams package, which is processed by the Graph Node. Substreams have access to additional granular on-chain data compared to conventional subgraphs, and can also benefit from massively parallelised processing, which can mean much faster processing times. +على نقيض ذلك، تحتوي الغرافات الفرعية المدعومة بسبستريمز على مصدر بيانات واحد يشير إلى حزمة سبستريمز، والتي يتم معالجتها بواسطة نقطة الغراف. تتيح سبستريمز الوصول إلى بيانات إضافية على السلسلة مقارنةً بالغرافات الفرعية التقليدية، ويمكن أيضاً للعمليات الموازية الضخمة أن توفر أوقات معالجة أسرع بكثير. -## What are the benefits of using Substreams-powered subgraphs? +## ما هي فوائد استخدام الغرافات الفرعية المدعومة بسبستريمز؟ Substreams-powered subgraphs combine all the benefits of Substreams with the queryability of subgraphs. They bring greater composability and high-performance indexing to The Graph. They also enable new data use cases; for example, once you've built your Substreams-powered Subgraph, you can reuse your [Substreams modules](https://substreams.streamingfast.io/developers-guide/modules) to output to different [sinks](https://substreams.streamingfast.io/developers-guide/sink-targets) such as PostgreSQL, MongoDB, and Kafka. -## What are the benefits of Substreams? +## ماهي فوائد سبستريمز؟ There are many benefits to using Substreams, including: @@ -32,25 +32,25 @@ There are many benefits to using Substreams, including: - High-performance indexing: Orders of magnitude faster indexing through large-scale clusters of parallel operations (think BigQuery). -- Sink anywhere: Sink your data to anywhere you want: PostgreSQL, MongoDB, Kafka, subgraphs, flat files, Google Sheets. +- التوجيه لأي مكان: يمكنك توجيه بياناتك لأي مكان ترغب فيه: بوستجريسكيو، مونغو دي بي، كافكا، الغرافات الفرعية، الملفات المسطحة، جداول جوجل. - Programmable: Use code to customize extraction, do transformation-time aggregations, and model your output for multiple sinks. -- Access to additional data which is not available as part of the JSON RPC +- الوصول إلى بيانات إضافية غير متاحة كجزء من إجراء الإستدعاء عن بعد للترميز الكائني لجافاسكريبت - All the benefits of the Firehose. ## What is the Firehose? -Developed by [StreamingFast](https://www.streamingfast.io/), the Firehose is a blockchain data extraction layer designed from scratch to process the full history of blockchains at speeds that were previously unseen. Providing a files-based and streaming-first approach, it is a core component of StreamingFast's suite of open-source technologies and the foundation for Substreams. +تم تطوير فايرهوز بواسطة [StreamingFast] (https://www.streamingfast.io/) وهو طبقة استخراج بيانات سلاسل الكتل مصممة من الصفر لمعالجة كامل تاريخ سلاسل الكتل بسرعات لم يشهدها من قبل. يوفر نهجاً قائماً على الملفات وأولوية-التدفق، وهو مكون أساسي في مجموعة تقنيات ستريمنج فاست مفتوحة المصدر والأساس لسبستريمز. -Go to the [documentation](https://firehose.streamingfast.io/) to learn more about the Firehose. +انتقل إلى [الوثائق](https://firehose.streamingfast.io/) لمعرفة المزيد حول فايرهوز. ## What are the benefits of the Firehose? There are many benefits to using Firehose, including: -- Lowest latency & no polling: In a streaming-first fashion, the Firehose nodes are designed to race to push out the block data first. +- أقل تأخير وعدم الاستقصاء: بطريقة قائمة على أولوية-التدفق، تم تصميم نقاط فايرهوز للتسابق لدفع بيانات الكتلة أولاً. - Prevents downtimes: Designed from the ground up for High Availability. @@ -58,17 +58,17 @@ There are many benefits to using Firehose, including: - Richest data model:  Best data model that includes the balance changes, the full call tree, internal transactions, logs, storage changes, gas costs, and more. -- Leverages flat files: Blockchain data is extracted into flat files, the cheapest and most optimized computing resource available. +- يستفيد من الملفات المسطحة: يتم استخراج بيانات سلسلة الكتل إلى ملفات مسطحة، وهي أرخص وأكثر موارد الحوسبة تحسيناً. -## Where can developers access more information about Substreams-powered subgraphs and Substreams? +## أين يمكن للمطورين الوصول إلى مزيد من المعلومات حول الغرافات الفرعية المدعومة بسبستريمز و سبستريمز؟ The [Substreams documentation](/substreams) will teach you how to build Substreams modules. -The [Substreams-powered subgraphs documentation](/cookbook/substreams-powered-subgraphs/) will show you how to package them for deployment on The Graph. +ستوضح لك [وثائق الغرافات الفرعية المدعومة بواسطة سبستريمز](/cookbook/substreams-powered-subgraphs/) كيفية تجميعها للنشر على الغراف. ## What is the role of Rust modules in Substreams? -Rust modules are the equivalent of the AssemblyScript mappers in subgraphs. They are compiled to WASM in a similar way, but the programming model allows for parallel execution. They define the sort of transformations and aggregations you want to apply to the raw blockchain data. +تعتبر وحدات رست مكافئة لمعينات أسمبلي اسكريبت في الغرافات الفرعية. يتم ترجمتها إلى ويب أسيمبلي بنفس الطريقة، ولكن النموذج البرمجي يسمح بالتنفيذ الموازي. تحدد وحدات رست نوع التحويلات والتجميعات التي ترغب في تطبيقها على بيانات سلاسل الكتل الخام. See [modules documentation](https://substreams.streamingfast.io/developers-guide/modules) for details. @@ -76,16 +76,16 @@ See [modules documentation](https://substreams.streamingfast.io/developers-guide When using Substreams, the composition happens at the transformation layer enabling cached modules to be re-used. -As an example, Alice can build a DEX price module, Bob can use it to build a volume aggregator for some tokens of his interest, and Lisa can combine four individual DEX price modules to create a price oracle. A single Substreams request will package all of these individual's modules, link them together, to offer a much more refined stream of data. That stream can then be used to populate a subgraph, and be queried by consumers. +على سبيل المثال، يمكن لأحمد بناء وحدة أسعار اسواق الصرف اللامركزية، ويمكن لإبراهيم استخدامها لبناء مجمِّع حجم للتوكن المهتم بها، ويمكن لآدم دمج أربع وحدات أسعار ديكس فردية لإنشاء مورد أسعار. سيقوم طلب واحد من سبستريمز بتجميع جميع هذه الوحدات الفردية، وربطها معًا لتقديم تدفق بيانات أكثر تطوراً ودقة. يمكن استخدام هذا التدفق لملءغراف فرعي ويمكن الاستعلام عنه من قبل المستخدمين. -## How can you build and deploy a Substreams-powered Subgraph? +## كيف يمكنك إنشاء ونشر غراف فرعي مدعوم بسبستريمز؟ -After [defining](/cookbook/substreams-powered-subgraphs/) a Substreams-powered Subgraph, you can use the Graph CLI to deploy it in [Subgraph Studio](https://thegraph.com/studio/). +بعد [تعريف](/cookbook/substreams-powered-subgraphs/) الغراف الفرعي مدعوم بالسبستريمز، يمكنك استخدام واجهة سطر الأوامر للغراف لنشره في [استوديو الغراف الفرعي](https://thegraph.com/studio/). -## Where can I find examples of Substreams and Substreams-powered subgraphs? +## أين يمكنني العثور على أمثلة على سبستريمز والغرافات الفرعية المدعومة بسبستريمز؟ -You can visit [this Github repo](https://github.com/pinax-network/awesome-substreams) to find examples of Substreams and Substreams-powered subgraphs. +يمكنك زيارة [جيت هب](https://github.com/pinax-network/awesome-substreams) للعثور على أمثلة للسبستريمز والغرافات الفرعية المدعومة بسبستريمز. -## What do Substreams and Substreams-powered subgraphs mean for The Graph Network? +## ماذا تعني السبستريمز والغرافات الفرعية المدعومة بسبستريمز بالنسبة لشبكة الغراف؟ -The integration promises many benefits, including extremely high-performance indexing and greater composability by leveraging community modules and building on them. +إن التكامل مع سبستريمز والغرافات الفرعية المدعومة بسبستريمز واعدة بالعديد من الفوائد، بما في ذلك عمليات فهرسة عالية الأداء وقابلية أكبر للتركيبية من خلال استخدام وحدات المجتمع والبناء عليها. From 678592c07eed04f864ec64c0533e93c624667ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:06 -0400 Subject: [PATCH 476/924] New translations substreams-powered-subgraphs-faq.mdx (Czech) --- .../substreams-powered-subgraphs-faq.mdx | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/website/pages/cs/developing/substreams-powered-subgraphs-faq.mdx b/website/pages/cs/developing/substreams-powered-subgraphs-faq.mdx index 02592fd21457..8b961f3c8a46 100644 --- a/website/pages/cs/developing/substreams-powered-subgraphs-faq.mdx +++ b/website/pages/cs/developing/substreams-powered-subgraphs-faq.mdx @@ -1,90 +1,90 @@ --- -title: Substreams-powered subgraphs FAQ +title: Podgrafy napájen substreamů --- -## What are Substreams? +## Co jsou substreamu? -Developed by [StreamingFast](https://www.streamingfast.io/), Substreams is an exceptionally powerful processing engine capable of consuming rich streams of blockchain data. Substreams allow you to refine and shape blockchain data for fast and seamless digestion by end-user applications. More specifically, Substreams is a blockchain-agnostic, parallelized, and streaming-first engine, serving as a blockchain data transformation layer. Powered by the [Firehose](https://firehose.streamingfast.io/), it ​​enables developers to write Rust modules, build upon community modules, provide extremely high-performance indexing, and [sink](https://substreams.streamingfast.io/developers-guide/sink-targets) their data anywhere. +Substreams, vyvinutý společností [StreamingFast](https://www.streamingfast.io/), je mimořádně výkonný zpracovatelský engine, který dokáže konzumovat bohaté datové proudy blockchainu. Substreams umožňují zjemňovat a tvarovat blockchainová data pro rychlé a bezproblémové zpracování aplikacemi pro koncové uživatele. Přesněji řečeno, Substreams je blockchain-agnostický, paralelizovaný a streaming-first engine, který slouží jako vrstva pro transformaci blockchainových dat. Je poháněn [Firehose](https://firehose.streamingfast.io/) a umožňuje vývojářům psát moduly Rust, stavět na komunitních modulech, poskytovat extrémně výkonné indexování a [sink](https://substreams.streamingfast.io/developers-guide/sink-targets) jejich data kdekoli. -Go to the [Substreams Documentation](/substreams) to learn more about Substreams. +Další informace o substreamu naleznete v [Dokumentace k substreamů](/substreams). -## What are Substreams-powered subgraphs? +## Co jsou substreamu napájen podgrafy? -[Substreams-powered subgraphs](/cookbook/substreams-powered-subgraphs/) combine the power of Substreams with the queryability of subgraphs. When publishing a Substreams-powered Subgraph, the data produced by the Substreams transformations, can [output entity changes](https://github.com/streamingfast/substreams-sink-entity-changes/blob/develop/substreams-entity-change/src/tables.rs), which are compatible with subgraph entities. +[Substreams-powered subgraphs](/cookbook/substreams-powered-subgraphs/) kombinují sílu Substreams s možností dotazování na podgrafy. Při publikování Substreams-powered podgrafu mohou data vytvořená transformacemi Substreams [výstupní změny entit](https://github.com/streamingfast/substreams-sink-entity-changes/blob/develop/substreams-entity-change/src/tables.rs), které jsou kompatibilní s entitami podgrafu. -If you are already familiar with subgraph development, then note that Substreams-powered subgraphs can then be queried, just as if it had been produced by the AssemblyScript transformation layer, with all the Subgraph benefits, like providing a dynamic and flexible GraphQL API. +Pokud jste již obeznámeni s vývojem podgrafů, pak vězte, že na podgrafy vytvořené pomocí Substreams se lze dotazovat stejně, jako kdyby byly vytvořeny transformační vrstvou AssemblyScript, se všemi výhodami Subgraphu, jako je poskytování dynamického a flexibilního GraphQL API. -## How are Substreams-powered subgraphs different from subgraphs? +## Jak se liší substream, které jsou napájeny podgrafy, od podgrafů? -Subgraphs are made up of datasources which specify on-chain events, and how those events should be transformed via handlers written in Assemblyscript. These events are processed sequentially, based on the order in which events happen on-chain. +Podgrafy jsou tvořeny datovými zdroji, které určují události v řetězci a způsob, jakým mají být tyto události transformovány prostřednictvím obslužných programů napsaných v jazyce Assemblyscript. Tyto události jsou zpracovávány postupně podle pořadí, v jakém k nim v řetězci dochází. -By contrast, substreams-powered subgraphs have a single datasource which references a substreams package, which is processed by the Graph Node. Substreams have access to additional granular on-chain data compared to conventional subgraphs, and can also benefit from massively parallelised processing, which can mean much faster processing times. +Naproti tomu podgrafy napájené substreamy mají jediný zdroj dat, který odkazuje na balíček substreamů, který zpracovává uzel Graf. Substreamy mají ve srovnání s běžnými podgrafy přístup k dalším granulárním datům v řetězci a mohou také využívat výhod masivně paralelizovaného zpracování, což může znamenat mnohem rychlejší časy zpracování. -## What are the benefits of using Substreams-powered subgraphs? +## Jaké jsou výhody používání substreamu, které jsou založeny na podgraf? -Substreams-powered subgraphs combine all the benefits of Substreams with the queryability of subgraphs. They bring greater composability and high-performance indexing to The Graph. They also enable new data use cases; for example, once you've built your Substreams-powered Subgraph, you can reuse your [Substreams modules](https://substreams.streamingfast.io/developers-guide/modules) to output to different [sinks](https://substreams.streamingfast.io/developers-guide/sink-targets) such as PostgreSQL, MongoDB, and Kafka. +Podgrafy s substreamu kombinují všechny výhody substreamu s možností dotazování na podgrafy. Přinášejí do grafu lepší skladnost a vysoce výkonné indexování. Umožňují také nové případy využití dat; například jakmile jednou vytvoříte podgraf/ s podporou Substreams, můžete své moduly [Substreams modules](https://substreams.streamingfast.io/developers-guide/modules) opakovaně použít k výstupu do různých [sinks](https://substreams.streamingfast.io/developers-guide/sink-targets), jako jsou PostgreSQL, MongoDB a Kafka. -## What are the benefits of Substreams? +## Jaké jsou výhody Substreams? -There are many benefits to using Substreams, including: +Používání ubstreams má mnoho výhod, mimo jiné: -- Composable: You can stack Substreams modules like LEGO blocks, and build upon community modules, further refining public data. +- Složitelný: Moduly Substreams můžete skládat na sebe jako kostky LEGO, stavět na komunitních moduly a dále vylepšovat veřejná data. -- High-performance indexing: Orders of magnitude faster indexing through large-scale clusters of parallel operations (think BigQuery). +- Vysoce výkonné indexování: Řádově rychlejší indexování prostřednictvím rozsáhlých klastrů paralelních operací (viz BigQuery). -- Sink anywhere: Sink your data to anywhere you want: PostgreSQL, MongoDB, Kafka, subgraphs, flat files, Google Sheets. +- Umyvadlo kdekoli: Data můžete ukládat kamkoli chcete: Vložte data do PostgreSQL, MongoDB, Kafka, podgrafy, ploché soubory, tabulky Google. -- Programmable: Use code to customize extraction, do transformation-time aggregations, and model your output for multiple sinks. +- Programovatelné: Pomocí kódu můžete přizpůsobit extrakci, provádět agregace v čase transformace a modelovat výstup pro více zdrojů. -- Access to additional data which is not available as part of the JSON RPC +- Přístup k dalším údajům, které nejsou k dispozici jako součást JSON RPC -- All the benefits of the Firehose. +- Všechny výhody Firehose. -## What is the Firehose? +## Co je Firehose? -Developed by [StreamingFast](https://www.streamingfast.io/), the Firehose is a blockchain data extraction layer designed from scratch to process the full history of blockchains at speeds that were previously unseen. Providing a files-based and streaming-first approach, it is a core component of StreamingFast's suite of open-source technologies and the foundation for Substreams. +Firehose, vyvinutý společností [StreamingFast](https://www.streamingfast.io/), je vrstva pro extrakci dat z blockchainu, která byla od základu navržena tak, aby zpracovávala celou historii blockchainu dosud nevídanou rychlostí. Poskytuje přístup založený na souborech a streamování v první řadě a je klíčovou součástí sady open-source technologií StreamingFast a základem pro Substreams. -Go to the [documentation](https://firehose.streamingfast.io/) to learn more about the Firehose. +Další informace o Firehose najdete v [dokumentaci](https://firehose.streamingfast.io/). -## What are the benefits of the Firehose? +## Jaké jsou výhody Firehose? -There are many benefits to using Firehose, including: +Používání Firehose přináší mnoho výhod, včetně: -- Lowest latency & no polling: In a streaming-first fashion, the Firehose nodes are designed to race to push out the block data first. +- Nejnižší latence a žádné dotazování: Uzly Firehose jsou navrženy tak, aby se předháněly v odesílání blokových dat jako první. -- Prevents downtimes: Designed from the ground up for High Availability. +- Předchází výpadkům: Navrženo od základu pro vysokou dostupnost. -- Never miss a beat: The Firehose stream cursor is designed to handle forks and to continue where you left off in any condition. +- Nikdy nezmeškáte ani minutu: Proudový kurzor Firehose je navržen tak, aby si poradil s rozcestími a pokračoval tam, kde jste skončili, za jakýchkoli podmínek. -- Richest data model:  Best data model that includes the balance changes, the full call tree, internal transactions, logs, storage changes, gas costs, and more. +- Nejbohatší datový model:  Nejlepší datový model, který zahrnuje změny zůstatku, celý strom volání, interní transakce, protokoly, změny v úložišti, náklady na plyn a další. -- Leverages flat files: Blockchain data is extracted into flat files, the cheapest and most optimized computing resource available. +- Využívá ploché soubory: Blockchain data jsou extrahována do plochých souborů, což je nejlevnější a nejoptimálnější dostupný výpočetní zdroj. -## Where can developers access more information about Substreams-powered subgraphs and Substreams? +## Kde mohou vývojáři získat více informací o substreamu, které jsou založeny na podgraf a substreamu? -The [Substreams documentation](/substreams) will teach you how to build Substreams modules. +Dokumentace [Substreams](/substreams) vás naučí, jak vytvářet moduly Substreams. -The [Substreams-powered subgraphs documentation](/cookbook/substreams-powered-subgraphs/) will show you how to package them for deployment on The Graph. +Dokumentace [Substreams-powered subgraphs](/cookbook/substreams-powered-subgraphs/) vám ukáže, jak je zabalit pro nasazení na Grafu. -## What is the role of Rust modules in Substreams? +## Jaká je role modulů Rust v Substreamu? -Rust modules are the equivalent of the AssemblyScript mappers in subgraphs. They are compiled to WASM in a similar way, but the programming model allows for parallel execution. They define the sort of transformations and aggregations you want to apply to the raw blockchain data. +Moduly Rust jsou ekvivalentem mapovačů AssemblyScript v podgraf. Jsou kompilovány do WASM podobným způsobem, ale programovací model umožňuje paralelní provádění. Definují druh transformací a agregací, které chcete aplikovat na surová data blockchainu. -See [modules documentation](https://substreams.streamingfast.io/developers-guide/modules) for details. +Podrobnosti viz [dokumentace modulů](https://substreams.streamingfast.io/developers-guide/modules). -## What makes Substreams composable? +## Co dělá Substreamy složitelnými? -When using Substreams, the composition happens at the transformation layer enabling cached modules to be re-used. +Při použití substreamů probíhá kompozice na transformační vrstvě, což umožňuje opakované použití modulů uložených v mezipaměti. -As an example, Alice can build a DEX price module, Bob can use it to build a volume aggregator for some tokens of his interest, and Lisa can combine four individual DEX price modules to create a price oracle. A single Substreams request will package all of these individual's modules, link them together, to offer a much more refined stream of data. That stream can then be used to populate a subgraph, and be queried by consumers. +Jako příklad může Alice vytvořit cenový modul DEX, Bob jej může použít k vytvoření agregátoru objemu pro některé tokeny, které ho zajímají, a Lisa může zkombinovat čtyři jednotlivé cenové moduly DEX a vytvořit cenové orákulum. Jediný požadavek Substreams zabalí všechny moduly těchto jednotlivců, propojí je dohromady a nabídne mnohem sofistikovanější tok dat. Tento proud pak může být použit k naplnění podgrafu a může být dotazován spotřebiteli. -## How can you build and deploy a Substreams-powered Subgraph? +## Jak můžete vytvořit a nasadit Substreams využívající podgraf? -After [defining](/cookbook/substreams-powered-subgraphs/) a Substreams-powered Subgraph, you can use the Graph CLI to deploy it in [Subgraph Studio](https://thegraph.com/studio/). +Po [definování](/cookbook/substreams-powered-subgraphs/) podgrafu s podporou substreamů jej můžete pomocí Graph CLI nasadit v [Subgraph Studio](https://thegraph.com/studio/). -## Where can I find examples of Substreams and Substreams-powered subgraphs? +## Kde najdu příklady podgrafů Substreams a Substreams-powered? -You can visit [this Github repo](https://github.com/pinax-network/awesome-substreams) to find examples of Substreams and Substreams-powered subgraphs. +Příklady podgrafů Substreams a Substreams-powered najdete na [tomto repozitáři Github](https://github.com/pinax-network/awesome-substreams). ## What do Substreams and Substreams-powered subgraphs mean for The Graph Network? From 2f346912557b445909207b333c905da7de48936c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:08 -0400 Subject: [PATCH 477/924] New translations substreams-powered-subgraphs-faq.mdx (Japanese) --- .../ja/developing/substreams-powered-subgraphs-faq.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ja/developing/substreams-powered-subgraphs-faq.mdx b/website/pages/ja/developing/substreams-powered-subgraphs-faq.mdx index d9133eece2ba..61a91c4892b4 100644 --- a/website/pages/ja/developing/substreams-powered-subgraphs-faq.mdx +++ b/website/pages/ja/developing/substreams-powered-subgraphs-faq.mdx @@ -4,9 +4,9 @@ title: サブストリームを利用したサブグラフに関するよくあ ## サブストリームとは何ですか? -Developed by [StreamingFast](https://www.streamingfast.io/), Substreams is an exceptionally powerful processing engine capable of consuming rich streams of blockchain data. Substreams allow you to refine and shape blockchain data for fast and seamless digestion by end-user applications. More specifically, Substreams is a blockchain-agnostic, parallelized, and streaming-first engine, serving as a blockchain data transformation layer. Powered by the [Firehose](https://firehose.streamingfast.io/), it ​​enables developers to write Rust modules, build upon community modules, provide extremely high-performance indexing, and [sink](https://substreams.streamingfast.io/developers-guide/sink-targets) their data anywhere. +StreamingFast](https://www.streamingfast.io/)によって開発されたSubstreamsは、ブロックチェーンデータのリッチストリームを消費できる非常に強力な処理エンジンです。Substreamsを使用することで、エンドユーザーアプリケーションによる高速かつシームレスな消化のために、ブロックチェーンデータを洗練し、形成することができます。より具体的には、Substreams はブロックチェーンにとらわれない、並列化されたストリーミングファーストエンジンであり、ブロックチェーンデータ変換レイヤーの役割を果たします。Firehose](https://firehose.streamingfast.io/)を利用することで、開発者はRustモジュールを書いたり、コミュニティモジュールを基に構築したり、非常に高性能なインデックスを提供したり、データをどこにでも[sink](https://substreams.streamingfast.io/developers-guide/sink-targets)することができます。 -Go to the [Substreams Documentation](/substreams) to learn more about Substreams. +サブストリームの詳細については、[サブストリームのドキュメント](/substreams/) にアクセスしてください。 ## サブストリームによって動作するサブグラフは何ですか? @@ -22,7 +22,7 @@ Go to the [Substreams Documentation](/substreams) to learn more about Substreams ## サブストリームを利用したサブグラフを使用する利点は何ですか? -Substreams-powered subgraphs combine all the benefits of Substreams with the queryability of subgraphs. They bring greater composability and high-performance indexing to The Graph. They also enable new data use cases; for example, once you've built your Substreams-powered Subgraph, you can reuse your [Substreams modules](https://substreams.streamingfast.io/developers-guide/modules) to output to different [sinks](https://substreams.streamingfast.io/developers-guide/sink-targets) such as PostgreSQL, MongoDB, and Kafka. +Substreams-powered subgraphs は、Substreams のすべての利点とサブグラフのクエリ機能を組み合わせたものです。サブストリームを利用することで、グラフの構成性が向上し、高性能なインデックス作成が可能になります。例えば、一度Substreams-powered Subgraphを構築すれば、その[Substreamsモジュール](https://substreams.streamingfast.io/developers-guide/modules)を再利用して、PostgreSQL、MongoDB、Kafkaなどの異なる[sinks](https://substreams.streamingfast.io/developers-guide/sink-targets)に出力することができます。 ## サブストリームの利点は何ですか? @@ -62,7 +62,7 @@ Firehose を使用すると、次のような多くの利点があります。 ## 開発者は、サブストリームを利用したサブグラフとサブストリームに関する詳細情報にどこでアクセスできますか? -The [Substreams documentation](/substreams) will teach you how to build Substreams modules. +[Substreams ドキュメント](/substreams/) では、Substreams モジュールを構築する方法を説明します。 [Substreams-powered subgraphs ドキュメント](/cookbook/substreams-powered-subgraphs/) では、The Graph にデプロイするためにサブグラフをパッケージ化する方法が示されています。 @@ -70,7 +70,7 @@ The [Substreams documentation](/substreams) will teach you how to build Substrea Rust モジュールは、サブグラフの AssemblyScript マッパーに相当します。これらは同様の方法で WASM にコンパイルされますが、プログラミング モデルにより並列実行が可能になります。これらは、生のブロックチェーン データに適用する変換と集計の種類を定義します。 -See [modules documentation](https://substreams.streamingfast.io/developers-guide/modules) for details. +詳しくは[modules documentation](https://substreams.streamingfast.io/developers-guide/modules)を参照してください。 ## サブストリームを構成可能にするものは何ですか? From d590847d4162d72175a7e9df05e5cc0f75e7fd0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:11 -0400 Subject: [PATCH 478/924] New translations substreams-powered-subgraphs-faq.mdx (Russian) --- .../pages/ru/developing/substreams-powered-subgraphs-faq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ru/developing/substreams-powered-subgraphs-faq.mdx b/website/pages/ru/developing/substreams-powered-subgraphs-faq.mdx index 6dd521a3cfb6..581e08b3a197 100644 --- a/website/pages/ru/developing/substreams-powered-subgraphs-faq.mdx +++ b/website/pages/ru/developing/substreams-powered-subgraphs-faq.mdx @@ -80,7 +80,7 @@ See [modules documentation](https://substreams.streamingfast.io/developers-guide ## Как Вы можете создать и развернуть субграф, работающий на основе Субпотоков? -После [defining](/cookbook/substreams-powered-subgraphs/) субграфа, работающего на основе Субпотоков, Вы можете использовать the Graph CLI для его развертывания в [Subgraph Studio]\(https://thegraph.com/studio /). +После [defining](/cookbook/substreams-powered-subgraphs/) субграфа, работающего на основе Субпотоков, Вы можете использовать the Graph CLI для его развертывания в [Subgraph Studio](https://thegraph.com/studio /). ## Где я могу найти примеры Субпотоков и субграфов, работающих на основе Субпотоков? From 0d286a458c7f326a36655de723c0d31b3ea85dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:12 -0400 Subject: [PATCH 479/924] New translations substreams-powered-subgraphs-faq.mdx (Swedish) --- .../pages/sv/developing/substreams-powered-subgraphs-faq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/developing/substreams-powered-subgraphs-faq.mdx b/website/pages/sv/developing/substreams-powered-subgraphs-faq.mdx index 2b6f1d5f67d9..a8bb2a9effdf 100644 --- a/website/pages/sv/developing/substreams-powered-subgraphs-faq.mdx +++ b/website/pages/sv/developing/substreams-powered-subgraphs-faq.mdx @@ -22,7 +22,7 @@ Subgrafer består av datakällor som specificerar händelser på blockkedjan och ## Vilka fördelar har användning av Substreams-drivna subgrafer? -Substreams-drivna subgrafer kombinerar alla fördelar med Substreams med subgrafernas frågebarhet. De ger The Graph större komponerbarhet och högpresterande indexering. De möjliggör också nya dataanvändningsfall; till exempel, när du har byggt din Substreams-drivna Subgraph kan du återanvända dina [Substreams modules](https://substreams.streamingfast.io/developers-guide/modules) för att mata ut till olika [sinks]\(https:/ /substreams.streamingfast.io/developers-guide/sink-targets) som PostgreSQL, MongoDB och Kafka. +Substreams-drivna subgrafer kombinerar alla fördelar med Substreams med subgrafernas frågebarhet. De ger The Graph större komponerbarhet och högpresterande indexering. De möjliggör också nya dataanvändningsfall; till exempel, när du har byggt din Substreams-drivna Subgraph kan du återanvända dina [Substreams modules](https://substreams.streamingfast.io/developers-guide/modules) för att mata ut till olika [sinks](https:/ /substreams.streamingfast.io/developers-guide/sink-targets) som PostgreSQL, MongoDB och Kafka. ## Vilka fördelar har Substreams? From 7d68aeff40c5f7cc0424428e4b60d6fc9e8e0ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:15 -0400 Subject: [PATCH 480/924] New translations substreams-powered-subgraphs-faq.mdx (Urdu (Pakistan)) --- .../pages/ur/developing/substreams-powered-subgraphs-faq.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx b/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx index be2c57055f10..979d460d6b6a 100644 --- a/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx +++ b/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx @@ -22,7 +22,7 @@ Developed by [StreamingFast](https://www.streamingfast.io/), Substreams is an ex ## سب سٹریمز سے چلنے والے سب گرافس استعمال کرنے کے کیا فوائد ہیں؟ -سب سٹریمز سے چلنے والے سب گراف سب سٹریمز کے تمام فوائد کو سب گراف کی کیوری کے ساتھ یکجا کرتے ہیں۔ وہ گراف میں زیادہ کمپوز ایبلٹی اور اعلی کارکردگی کا انڈیکسنگ لاتے ہیں۔ وہ ڈیٹا کے استعمال کے نئے کیسز کو بھی اہل بناتے ہیں۔ مثال کے طور پر، ایک بار جب آپ اپنا سب سٹریمزسے چلنے والا سب گراف بنا لیتے ہیں، تو آپ اپنے [سب سٹریم ماڈیولز] \(https://substreams.streamingfast.io/developers-guide/modules) کو مختلف [sinks] \(https://substreams.streamingfast.io/developers-guide/sink-targets)کو دوبارہ استعمال کر سکتے ہیں جیسے PostgreSQL، MongoDB، اور Kafka. +سب سٹریمز سے چلنے والے سب گراف سب سٹریمز کے تمام فوائد کو سب گراف کی کیوری کے ساتھ یکجا کرتے ہیں۔ وہ گراف میں زیادہ کمپوز ایبلٹی اور اعلی کارکردگی کا انڈیکسنگ لاتے ہیں۔ وہ ڈیٹا کے استعمال کے نئے کیسز کو بھی اہل بناتے ہیں۔ مثال کے طور پر، ایک بار جب آپ اپنا سب سٹریمزسے چلنے والا سب گراف بنا لیتے ہیں، تو آپ اپنے [سب سٹریم ماڈیولز] (https://substreams.streamingfast.io/developers-guide/modules) کو مختلف [sinks] (https://substreams.streamingfast.io/developers-guide/sink-targets)کو دوبارہ استعمال کر سکتے ہیں جیسے PostgreSQL، MongoDB، اور Kafka. ## سب سٹریمز کے فوائد کہاں ہیں؟ @@ -44,7 +44,8 @@ Developed by [StreamingFast](https://www.streamingfast.io/), Substreams is an ex [StreamingFast](https://www.streamingfast.io/) کے ذریعے تیار کردہ، Firehose ایک بلاکچین ڈیٹا نکالنے کی پرت ہے جسے شروع سے بلاکچینز کی مکمل تاریخ کو اس رفتار سے پروسیس کرنے کے لیے ڈیزائن کیا گیا ہے جو پہلے نظر نہیں آتی تھیں۔ فائلوں پر مبنی اور سٹریمنگ فرسٹ اپروچ فراہم کرنا، یہ سٹریمنگ فاسٹ کے اوپن سورس ٹیکنالوجیز کے سوٹ کا بنیادی جزو اور سب اسٹریمز کی بنیاد ہے. -Firehose کے بارے میں مزید جاننے کے لیے[documentation] (https://firehose.streamingfast.io/) پر جائیں. +Firehose کے بارے میں مزید جاننے کے لیے[documentation] +(https://firehose.streamingfast.io/) پر جائیں. ## Firehose کے کیا فوائد ہیں؟ From dbb337b52115c81775c6a3f6725fe764e1bff342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:18 -0400 Subject: [PATCH 481/924] New translations upgrading-a-subgraph.mdx (Romanian) --- .../ro/cookbook/upgrading-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/ro/cookbook/upgrading-a-subgraph.mdx b/website/pages/ro/cookbook/upgrading-a-subgraph.mdx index bd3b739199d6..ff1ab368c0fa 100644 --- a/website/pages/ro/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/ro/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: ```sh graph auth --studio ``` -3. Generate files and build the subgraph: +3. Generate files and build the subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ At the end of each week, an invoice will be generated based on the query fees th It is recommended that you secure the API by limiting its usage in two ways: -1. Authorized Subgraphs -2. Authorized Domain +1. Authorized Subgraphs +2. Authorized Domain You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## Best Practices for Deploying a Subgraph to The Graph Network -1. Leveraging an ENS name for Subgraph Development: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. ## Deprecating a Subgraph on The Graph Network From e570719d6d058ef5e15e5e88866cd26b4596458b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:18 -0400 Subject: [PATCH 482/924] New translations upgrading-a-subgraph.mdx (French) --- .../fr/cookbook/upgrading-a-subgraph.mdx | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/website/pages/fr/cookbook/upgrading-a-subgraph.mdx b/website/pages/fr/cookbook/upgrading-a-subgraph.mdx index 4803b220242a..aa8894a26644 100644 --- a/website/pages/fr/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/fr/cookbook/upgrading-a-subgraph.mdx @@ -11,15 +11,15 @@ Le processus de mise à niveau est rapide et vos subgraphs bénéficieront à ja ### Conditions préalables - Vous avez déjà déployé un subgraph sur le service hébergé. -- The subgraph is indexing a chain available on The Graph Network. +- Le subgraph indexe une blockchain déjà supportée par le réseau The Graph. - Vous disposez d'un portefeuille avec ETH pour publier votre subgraph en chaîne. -- You have ~10,000 GRT to curate your subgraph so Indexers can begin indexing it. +- Vous disposez de ~10 000 GRT pour curer votre subgraph afin que les indexeurs puissent commencer à l'indexer. ## Mise à niveau d'un subgraph existant vers le réseau Graph -> Vous trouverez des commandes spécifiques pour votre subgraph dans le [Subgraph Studio] \(https://thegraph.com/studio/). +> Vous trouverez des commandes spécifiques pour votre subgraph dans le [Subgraph Studio] (https://thegraph.com/studio/). -1. Obtenir la dernière version de graph-cli installée : +1. Obtenir la dernière version de graph-cli installée : ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ npm install -g @graphprotocol/graph-cli Assurez-vous que votre `apiVersion` dans subgraph.yaml est `0.0.5` ou supérieur. -2. À l'intérieur du répertoire principal du projet du subgraph, authentifiez le pour déployer et construire sur le studio : +2. À l'intérieur du répertoire principal du projet du subgraph, authentifiez le pour déployer et construire sur le studio : ```sh -authentification graph --studio +graph auth --studio ``` -3. Générez les fichiers et construisez le subgraph : +3. Générez les fichiers et construisez le subgraph : ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build Si votre subgraph présente des erreurs de construction, reportez-vous au [Guide de migration AssemblyScript](/release-notes/assemblyscript-migration-guide/). -4. Connectez-vous à [Subgraph Studio] \(https://thegraph.com/studio/) avec votre portefeuille et déployez le subgraphe. Vous pouvez trouver votre `` dans l'interface utilisateur de Studio, qui est basée sur le nom de votre subgraph. +4. Connectez-vous à [Subgraph Studio] (https://thegraph.com/studio/) avec votre portefeuille et déployez le subgraphe. Vous pouvez trouver votre `` dans l'interface utilisateur de Studio, qui est basée sur le nom de votre subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Testez les requêtes sur le terrain de jeu du Studio. Voici quelques exemples pour le [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground) : ```sh { @@ -68,15 +68,15 @@ graph deploy --studio } ``` -6. À ce stade, votre subgraph est maintenant déployé sur Subgraph Studio, mais pas encore publié sur le réseau décentralisé. Vous pouvez désormais tester le subgraph pour vous assurer qu'il fonctionne comme prévu en utilisant l'URL de requête temporaire, comme indiqué en haut de la colonne de droite ci-dessus. Comme son nom l'indique déjà, il s'agit d'une URL temporaire qui ne doit pas être utilisée en production. +6. À ce stade, votre subgraph est maintenant déployé sur Subgraph Studio, mais pas encore publié sur le réseau décentralisé. Vous pouvez désormais tester le subgraph pour vous assurer qu'il fonctionne comme prévu en utilisant l'URL de requête temporaire, comme indiqué en haut de la colonne de droite ci-dessus. Comme son nom l'indique déjà, il s'agit d'une URL temporaire qui ne doit pas être utilisée en production. -- Updating is just publishing another version of your existing subgraph on-chain. +- La mise à jour consiste simplement à publier une autre version de votre subgraph existant sur la chaîne. - Étant donné que cela entraîne un coût, il est fortement recommandé de déployer et de tester votre subgraph dans Subgraph Studio, en utilisant l'« URL de requête de développement » avant de le publier. Voir un exemple de transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Les prix sont d'environ 0,0425 ETH à 100 gwei. - Chaque fois que vous devrez mettre à jour votre subgraph, des frais de mise à jour vous seront facturés. Comme cela engendre un coût, il est fortement recommandé de déployer et de tester votre subgraph sur Goerli avant de le déployer sur le réseau principal. Dans certains cas, cela peut également nécessiter un GRT s'il n'y a pas de signal sur ce subgraph. Dans le cas où il y a un signal/curation sur cette version du subgraph (en utilisant l'auto-migration), les taxes seront divisées. -7. Publiez le subgraph sur le réseau décentralisé de The Graph en cliquant sur le bouton "Publier". +7. Publiez le subgraph sur le réseau décentralisé de The Graph en cliquant sur le bouton "Publier". -You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. +Vous devez curer votre subgraph avec des GRT pour vous assurer qu'il sera indexé par les indexeurs. Pour économiser du gaz, vous pouvez curer votre subgraph dans la même transaction que vous le publiez sur le réseau. Il est recommandé de curer votre subgraphe avec au moins 10 000 GRT pour une meilleure qualité de service. Et c'est tout! Une fois la publication terminée, vous pourrez visualiser vos subgraphs en direct sur le réseau décentralisé via [The Graph Explorer](https://thegraph.com/explorer). @@ -84,9 +84,9 @@ N'hésitez pas à utiliser le [canal #Curators](https://discord.gg/s5HfGMXmbW) s ### Créer une clé d'API -You can generate an API key in Subgraph Studio [here](https://thegraph.com/studio/apikeys/). +Vous pouvez générer une clé API dans Subgraph Studio [Ici](https://thegraph.com/studio/apikeys/). -![API key creation page](/img/api-image.png) +![Page de création de la clé API](/img/api-image.png) À la fin de chaque semaine, une facture sera générée sur la base des frais de requête encourus pendant cette période. Cette facture sera payée automatiquement grâce au GRT disponible dans votre solde. Votre solde sera mis à jour une fois le coût de vos frais de requête retiré. Les frais de requête sont payés en GRT via le réseau Arbitrum. Vous devrez ajouter GRT au contrat de facturation Arbitrum pour activer votre clé API en suivant les étapes suivantes : @@ -94,112 +94,112 @@ You can generate an API key in Subgraph Studio [here](https://thegraph.com/studi - Envoyez le TRG à votre portefeuille. - À la page Facturation de Studio, cliquez sur Ajouter un TRG. -![Add GRT in billing](/img/Add-GRT-New-Page.png) +![Ajouter du GRT dans la facturation](/img/Add-GRT-New-Page.png) - Suivez les étapes pour ajouter votre TRG à votre solde de facturation. - Votre GRT sera automatiquement relié au réseau Arbitrum et ajouté à votre solde de facturation. -![Billing pane](/img/New-Billing-Pane.png) +![Volet de facturation](/img/New-Billing-Pane.png) -> Note: see the [official billing page](../billing.mdx) for full instructions on adding GRT to your billing balance. +> . ### Sécurisation de votre clé API Il est recommandé de sécuriser l'API en limitant son utilisation de deux manières : -1. Les subgraphs autorisés -2. Le Domaine autorisé +1. Les subgraphs autorisés +2. Le Domaine autorisé -Vous pouvez sécuriser votre clé API [here](https://thegraph.com/studio/apikeys/test/). +Vous pouvez sécuriser votre clé API [ici](https://thegraph.com/studio/apikeys/test/). -![Subgraph lockdown page](/img/subgraph-lockdown.png) +![Page de verrouillage du subgraph](/img/subgraph-lockdown.png) ### Interroger votre subgraph sur le réseau décentralisé -Vous pouvez maintenant vérifier l'état d'indexation des indexeurs sur le réseau dans Graph Explorer (exemple [here]\(https://thegraph.com/explorer/subgraph? id=S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo&view=Indexers)). The Également dans l'onglet Indexeur, vous pouvez voir quels indexeurs ont récupéré votre subgraph. +Vous pouvez maintenant vérifier l'état d'indexation des indexeurs sur le réseau dans Graph Explorer (exemple [here](https://thegraph.com/explorer/subgraph? id=S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo&view=Indexers)). The Également dans l'onglet Indexeur, vous pouvez voir quels indexeurs ont récupéré votre subgraph. -![Rocket Pool subgraph](/img/rocket-pool-subgraph.png) +![Subgraph Rocket Pool](/img/rocket-pool-subgraph.png) Dès que le premier indexeur a complètement indexé votre subgraph, vous pouvez commencer à interroger le subgraph sur le réseau décentralisé. Afin de récupérer l'URL de requête pour votre subgraph, vous pouvez le copier/coller en cliquant sur le symbole à côté de l'URL de requête. Vous verrez quelque chose comme ceci : `https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` -Important: Make sure to replace `[api-key]` with an actual API key generated in the section above. +Important : Assurez-vous de remplacer `[api-key]` par une clé API réelle générée dans la section ci-dessus. Vous pouvez maintenant utiliser cette URL de requête dans votre dapp pour envoyer vos requêtes GraphQL. Toutes nos félicitations! Vous êtes désormais un pionnier de la décentralisation ! -> Note: Due to the distributed nature of the network it might be the case that different Indexers have indexed up to different blocks. In order to only receive fresh data you can specify the minimum block an Indexer has to have indexed in order to serve your query with the block: `{ number_gte: $minBlock }` field argument as shown in the example below: +> Notez : En raison de la nature distribuée du réseau, il se peut que différents indexeurs aient indexé des blocs différents. Afin de ne recevoir que des données fraîches, vous pouvez spécifier le bloc minimum qu'un indexeur doit avoir indexé pour servir votre requête avec l'argument de champ block : `{ number_gte: $minBlock }` comme le montre l'exemple ci-dessous : ```graphql { - stakers(block: { number_gte: 14486109 }) { + stakers(block : { number_gte : 14486109 }) { id } } ``` -More information about the nature of the network and how to handle re-orgs are described in the documentation article [Distributed Systems](/querying/distributed-systems/). +Plus d'informations sur la nature du réseau et sur la manière de gérer les réorganisations sont décrites dans l'article de documentation [Distributed Systems](/querying/distributed-systems/). -## Updating a Subgraph on the Network +## Mise à jour d'un subgraph sur le réseau -If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. +Si vous souhaitez mettre à jour un subgraph existant sur le réseau, vous pouvez le faire en déployant une nouvelle version de votre subgraph sur Subgraph Studio à l'aide du Graph CLI. -1. Apportez des modifications à votre subgraph actuel. Une bonne idée est de tester les petites corrections sur le Subgraph Studio en les publiant sur Goerli. -2. Déployez les éléments suivants et spécifiez la nouvelle version dans la commande (par exemple v0.0.1, v0.0.2, etc.) : +1. Apportez des modifications à votre subgraph actuel. Une bonne idée est de tester les petites corrections sur le Subgraph Studio en les publiant sur Goerli. +2. Déployez les éléments suivants et spécifiez la nouvelle version dans la commande (par exemple v0.0.1, v0.0.2, etc.) : ```sh graph deploy --studio ``` -3. Testez la nouvelle version dans le Subgraph Studio en effectuant des requêtes dans l'aire de jeu -4. Publier la nouvelle version sur le réseau graph. N'oubliez pas que cela nécessite du gaz (comme décrit dans la section ci-dessus). +3. Testez la nouvelle version dans le Subgraph Studio en effectuant des requêtes dans l'aire de jeu +4. Publier la nouvelle version sur le réseau graph. N'oubliez pas que cela nécessite du gaz (comme décrit dans la section ci-dessus). ### Owner Update Fee: Deep Dive -> Remarque : La curation sur Arbitrum n'utilise pas de courbes de liens. Apprenez-en plus sur Arbitrum [here] \(/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). -An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). +Une mise à jour nécessite que des GRT soient migré de l'ancienne version du subgraph vers la nouvelle version. Cela signifie que pour chaque mise à jour, une nouvelle courbe de liaison sera créée (plus d'informations sur les courbes de liaison [here](/network/curating#bonding-curve-101)). -The new bonding curve charges the 1% curation tax on all GRT being migrated to the new version. The owner must pay 50% of this or 1.25%. The other 1.25% is absorbed by all the curators as a fee. This incentive design is in place to prevent an owner of a subgraph from being able to drain all their curator's funds with recursive update calls. If there is no curation activity, you will have to pay a minimum of 100 GRT in order to signal your own subgraph. +Les nouveaux frais de la coube liaison applique la taxe de curation de 1 % sur tous les GRT transférés vers la nouvelle version. Le propriétaire doit payer 50 % de cette taxe, soit 1,25 %. L'autre 1,25 % est absorbé par tous les conservateurs en tant que frais. Ce système d'incitation a été mis en place pour empêcher le propriétaire d'un subgraph de drainer tous les fonds de son curateur par des appels récursifs de mise à jour. S'il n'y a pas d'activité de curation, vous devrez payer un minimum de 100 GRT pour signaler votre propre subgraph. Prenons un exemple, ce n'est le cas que si votre subgraph fait l'objet d'une curation active : - 100,000 GRT sont signalés en utilisant la migration automatique sur la v1 d'un subgraph -- Owner updates to v2. 100,000 GRT is migrated to a new bonding curve, where 97,500 GRT get put into the new curve and 2,500 GRT is burned -- The owner then has 1250 GRT burned to pay for half the fee. The owner must have this in their wallet before the update, otherwise, the update will not succeed. This happens in the same transaction as the update. +- Le propriétaire passe à la version 2. 100 000 GRT sont transférés vers une nouvelle courbe de collage, où 97 500 GRT sont placés dans la nouvelle courbe et 2 500 GRT sont brûlés +- Le propriétaire fait alors brûler 1 250 GRT pour payer la moitié des frais. Le propriétaire doit l'avoir dans son portefeuille avant la mise à jour, sinon la mise à jour échouera. Cela se produit dans la même transaction que la mise à jour. _Bien que ce mécanisme soit actuellement actif sur le réseau, la communauté discute actuellement des moyens de réduire le coût des mises à jour pour les développeurs de subgraphs._ ### Maintenir une version stable d'un subgraph -If you're making a lot of changes to your subgraph, it is not a good idea to continually update it and front the update costs. Maintaining a stable and consistent version of your subgraph is critical, not only from the cost perspective but also so that Indexers can feel confident in their syncing times. Indexers should be flagged when you plan for an update so that Indexer syncing times do not get impacted. Feel free to leverage the [#Indexers channel](https://discord.gg/JexvtHa7dq) on Discord to let Indexers know when you're versioning your subgraphs. +Si vous apportez de nombreuses modifications à votre subgraph, il n'est pas judicieux de le mettre à jour en permanence et de faire face aux coûts de mise à jour. Il est essentiel de maintenir une version stable et cohérente de votre subgraph, non seulement du point de vue des coûts, mais aussi pour que les indexeurs puissent avoir confiance dans leurs temps de synchronisation. Les indexeurs doivent être avertis lorsque vous prévoyez une mise à jour afin que les délais de synchronisation des indexeurs ne soient pas affectés. N'hésitez pas à utiliser le [#Indexers channel](https://discord.gg/JexvtHa7dq) sur Discord pour informer les indexeurs de la mise à jour de vos subgraphs. -Subgraphs are open APIs that external developers are leveraging. Open APIs need to follow strict standards so that they do not break external developers' applications. In The Graph Network, a subgraph developer must consider Indexers and how long it takes them to sync a new subgraph **as well as** other developers who are using their subgraphs. +Les subgraphs sont des API ouvertes que les développeurs externes exploitent. Les API ouvertes doivent suivre des normes strictes afin de ne pas casser les applications des développeurs externes. Dans The Graph Network, un développeur de subgraphs doit prendre en compte les indexeurs et le temps qu'il leur faut pour synchroniser un nouveau subgraph **ainsi que** les autres développeurs qui utilisent leurs subgraphs. ### Mise à jour des métadonnées d'un subgraph Vous pouvez mettre à jour les métadonnées de vos subgraphs sans avoir à publier une nouvelle version. Les métadonnées comprennent le nom du subgraph, l'image, la description, l'URL du site Web, l'URL du code source et les catégories. Les développeurs peuvent le faire en mettant à jour les détails de leur subgraph dans le Subgraph Studio, où vous pouvez modifier tous les champs applicables. -Make sure **Update Subgraph Details in Explorer** is checked and click on **Save**. 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. +Assurez-vous que **Mettre à jour les détails du subgraph dans l'Explorateur** est coché et cliquez sur **Enregistrer**. Si cette case est cochée, une transaction en chaîne sera générée qui mettra à jour les détails du subgraph dans l'Explorateur sans avoir à publier une nouvelle version avec un nouveau déploiement. ## Meilleures pratiques pour le déploiement d'un subgraph sur le réseau The Graph -1. Utilisation d'un nom d'ENS pour le développement de subgraph : +1. Utilisation d'un nom d'ENS pour le développement de subgraph : -- Set up your ENS [here](https://app.ens.domains/) -- Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). +- Configurez votre ENS [ici] (https://app.ens.domains/) +- Ajoutez votre nom ENS à vos paramètres [ici] (https://thegraph.com/explorer/settings?view=display-name). -2. Plus vos profils seront complets, plus vos subgraphes auront de chances d'être indexés et conservés. +2. Plus vos profils seront complets, plus vos subgraphes auront de chances d'être indexés et conservés. ## Dépréciation d'un subgraph sur le réseau de graph -Suivez les étapes [here](/managing/deprecating-a-subgraph) pour déprécier votre subgraph et le retirer du réseau The Graph Network. +Suivez les étapes [ici](/managing/deprecating-a-subgraph) pour déprécier votre subgraph et le retirer du réseau The Graph Network. ## Interrogation d'un subgraph + facturation sur le reseau The Graph -The hosted service was set up to allow developers to deploy their subgraphs without any restrictions. +Le service hébergé a été configuré pour permettre aux développeurs de déployer leurs subgraphs sans aucune restriction. Pour que The Graph Network soit réellement décentralisé, les frais de requête doivent être payés en tant qu'élément central des incitations du protocole. Pour plus d'informations sur l'abonnement aux API et le paiement des frais de requête, consultez la documentation sur la facturation \[[here](/billing/). @@ -207,7 +207,7 @@ Pour que The Graph Network soit réellement décentralisé, les frais de requêt Bien que cette fonction ne soit pas encore disponible dans l'interface utilisateur du produit, vous pouvez définir votre budget maximum par requête en divisant le montant que vous êtes prêt à payer par mois par le volume de requêtes attendu. -While you get to decide on your query budget, there is no guarantee that an Indexer will be willing to serve queries at that price. If a Gateway can match you to an Indexer willing to serve a query at, or lower than, the price you are willing to pay, you will pay the delta/difference of your budget **and** their price. As a consequence, a lower query price reduces the pool of Indexers available to you, which may affect the quality of service you receive. It's beneficial to have high query fees, as that may attract curation and big-name Indexers to your subgraph. +Même si vous décidez de votre budget de requêtes, rien ne garantit qu'un indexeur sera disposé à répondre à des requêtes à ce prix. Si une passerelle peut vous mettre en relation avec un indexeur disposé à répondre à une requête au prix que vous êtes prêt à payer ou à un prix inférieur, vous paierez le delta/la différence de votre budget **et** leur prix. Par conséquent, un prix de requête inférieur réduit le nombre d’indexeurs disponibles, ce qui peut affecter la qualité du service que vous recevez. Il est avantageux d'avoir des frais de requête élevés, car cela peut attirer des curateurs et des indexeurs de renom vers votre subgraph. N'oubliez pas qu'il s'agit d'un marché dynamique et en pleine expansion, mais la manière dont vous interagissez avec lui est sous votre contrôle. Il n'y a pas de prix maximum ou minimum spécifié dans le protocole ou les passerelles. Par exemple, vous pouvez regarder le prix payé par quelques-unes des dapps sur le réseau (sur une base hebdomadaire), ci-dessous. Regardez la dernière colonne, qui montre les frais de requête en GRT. @@ -220,6 +220,6 @@ Si vous êtes encore confus, n'ayez crainte ! Consultez les ressources suivantes - [The Graph Network Contracts](https://github.com/graphprotocol/contracts) -- [Contrat de curation] \(https://github.com/graphprotocol/contracts/blob/dev/contracts/curation/Curation.sol) - le contrat sous-jacent autour duquel le GNS s'articule +- [Contrat de curation] (https://github.com/graphprotocol/contracts/blob/dev/contracts/curation/Curation.sol) - le contrat sous-jacent autour duquel le GNS s'articule - Address - `0x8fe00a685bcb3b2cc296ff6ffeab10aca4ce1538` -- [Subgraph Studio documentation](/deploying/subgraph-studio) +- [Documentation sur Subgraph Studio](/deploying/subgraph-studio) From bdeafd5edab46b897eabceb56bcb935cb490e7bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:19 -0400 Subject: [PATCH 483/924] New translations upgrading-a-subgraph.mdx (Spanish) --- .../es/cookbook/upgrading-a-subgraph.mdx | 122 +++++++++--------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/website/pages/es/cookbook/upgrading-a-subgraph.mdx b/website/pages/es/cookbook/upgrading-a-subgraph.mdx index d0267b3b25af..352743fc8487 100644 --- a/website/pages/es/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/es/cookbook/upgrading-a-subgraph.mdx @@ -1,25 +1,25 @@ --- -title: Upgrading an Existing Subgraph to The Graph Network +title: Actualizando un Subgrafo Existente a la Red de The Graph --- ## Introducción -This is a guide on how to upgrade your subgraph from the hosted service to The Graph's decentralized network. Over 1,000 subgraphs have successfully upgraded to The Graph Network including projects like Snapshot, Loopring, Audius, Premia, Livepeer, Uma, Curve, Lido, and many more! +Esta es una guía sobre cómo actualizar tu subgrafo desde el servicio alojado a la red descentralizada de The Graph. ¡Más de 1,000 subgráfos se han actualizado con éxito a la red de The Graph, incluyendo proyectos como Snapshot, Loopring, Audius, Premia, Livepeer, Uma, Curve, Lido, y muchos más! -The process of upgrading is quick and your subgraphs will forever benefit from the reliability and performance that you can only get on The Graph Network. +El proceso de actualización es rápido y tus subgráfos se beneficiarán para siempre de la confiabilidad y rendimiento que solo puedes obtener en la red de The Graph. ### Prerrequisitos - Ya has deployado un subgrafo en el Servicio Alojado. -- The subgraph is indexing a chain available on The Graph Network. -- You have a wallet with ETH to publish your subgraph on-chain. -- You have ~10,000 GRT to curate your subgraph so Indexers can begin indexing it. +- El subgrafo está indexando una cadena disponible en la red de The Graph. +- Tienes una billetera con ETH para publicar tu subgrafo en la cadena. +- Tienes aproximadamente 10,000 GRT para curar tu subgrafo, de modo que los Indexadores puedan comenzar a indexarlo. -## Upgrading an Existing Subgraph to The Graph Network +## Actualizando un Subgrafo Existente a la Red de The Graph -> You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). +> Puedes encontrar comandos específicos para tu subgrafo en el [Subgraph Studio](https://thegraph.com/studio/). -1. Obtén la última versión de graph-cli instalada: +1. Obtén la última versión de graph-cli instalada: ```sh npm install -g @graphprotocol/graph-cli @@ -29,29 +29,29 @@ npm install -g @graphprotocol/graph-cli yarn global add @graphprotocol/graph-cli ``` -Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. +Asegúrate de que tu `apiVersion` en subgraph.yaml sea `0.0.5` o superior. -2. Dentro del repositorio del proyecto principal del subgrafo, autentifica el subgrafo para deployar y construir en el estudio: +2. Dentro del repositorio del proyecto principal del subgrafo, autentifica el subgrafo para deployar y construir en el estudio: ```sh graph auth --studio ``` -3. Genera archivos y construye el subgrafo: +3. Genera archivos y construye el subgrafo: ```sh graph codegen && graph build ``` -If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). +Si tu subgrafo tiene errores de construcción, consulta la [Guía de Migración de AssemblyScript](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Inicia sesión en [Subgraph Studio](https://thegraph.com/studio/) con tu billetera y despliega el subgrafo. Puedes encontrar tu `` en la interfaz de usuario de Studio, el cual se basa en el nombre de tu subgrafo. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Realiza pruebas de consultas en el área de pruebas (playground) de Studio. Aquí tienes algunos ejemplos para el [Subgrafo de Intercambio en Mainnet de Sushi](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,23 +68,23 @@ graph deploy --studio } ``` -6. En este punto, tu subgrafo está ahora deployado en Subgraph Studio, pero aún no está publicado en la red descentralizada. Ahora puedes probar el subgrafo para asegurarte de que funciona como se espera utilizando la URL de consulta temporal que se ve en la parte superior de la columna derecha. Como este nombre ya sugiere, esta es una URL temporal y no debe ser usada en producción. +6. En este punto, tu subgrafo está ahora deployado en Subgraph Studio, pero aún no está publicado en la red descentralizada. Ahora puedes probar el subgrafo para asegurarte de que funciona como se espera utilizando la URL de consulta temporal que se ve en la parte superior de la columna derecha. Como este nombre ya sugiere, esta es una URL temporal y no debe ser usada en producción. -- Updating is just publishing another version of your existing subgraph on-chain. -- Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. -- Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. +- Actualizar es simplemente publicar otra versión de tu subgrafo existente en la cadena. +- Debido a que esto conlleva un costo, se recomienda encarecidamente desplegar y probar tu subgrafo en el Subgraph Studio, utilizando la "URL de consulta de desarrollo" antes de publicarlo. Mira un ejemplo de transacción [aquí](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Los precios rondan aproximadamente los 0.0425 ETH a 100 gwei. +- Cada vez que necesites actualizar tu subgrafo, se te cobrará una tarifa de actualización. Debido a que esto conlleva un costo, se recomienda encarecidamente desplegar y probar tu subgrafo en Goerli antes de implementarlo en la red principal. En algunos casos, también puede ser necesario disponer de cierta cantidad de GRT si no hay señal en ese subgrafo. En el caso de que haya señal/curación en esa versión del subgrafo (usando la migración automática), los costos se dividirán. -7. Publica el subgrafo en la red descentralizada de The Graph pulsando el botón "Publicar". +7. Publica el subgrafo en la red descentralizada de The Graph pulsando el botón "Publicar". -You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. +Deberías curar tu subgrafo con GRT para asegurarte de que sea indexado por los Indexadores. Para ahorrar en costos de gas, puedes curar tu subgrafo en la misma transacción en la que lo publicas en la red. Se recomienda curar tu subgrafo con al menos 10,000 GRT para obtener un servicio de alta calidad. -And that's it! After you are done publishing, you'll be able to view your subgraphs live on the decentralized network via [The Graph Explorer](https://thegraph.com/explorer). +¡Y eso es todo! Después de que hayas terminado de publicar, podrás ver tus subgráfos en vivo en la red descentralizada a través de [The Graph Explorer](https://thegraph.com/explorer). -Feel free to leverage the [#Curators channel](https://discord.gg/s5HfGMXmbW) on Discord to let Curators know that your subgraph is ready to be signaled. It would also be helpful if you share your expected query volume with them. Therefore, they can estimate how much GRT they should signal on your subgraph. +Siéntete libre de utilizar el canal [#Curators](https://discord.gg/s5HfGMXmbW) en Discord para informar a los Curadores que tu subgrafo está listo para ser señalizado. También sería útil si compartes con ellos tu volumen esperado de consultas. De esta manera, podrán estimar cuánto GRT deberían señalizar en tu subgrafo. ### Crear una clave API -You can generate an API key in Subgraph Studio [here](https://thegraph.com/studio/apikeys/). +Puedes generar una clave API en Subgraph Studio [aquí](https://thegraph.com/studio/apikeys/). ![API key creation page](/img/api-image.png) @@ -101,22 +101,22 @@ Al final de cada semana, se generará una factura en función de las tarifas de ![Billing pane](/img/New-Billing-Pane.png) -> Note: see the [official billing page](../billing.mdx) for full instructions on adding GRT to your billing balance. +> Nota: consulta la [página oficial de facturación](../billing.mdx) para obtener instrucciones completas sobre cómo agregar GRT a tu saldo de facturación. ### Asegurando tu clave API Se recomienda asegurar la API limitando su uso de dos maneras: -1. Subgrafos autorizados -2. Dominio autorizado +1. Subgrafos autorizados +2. Dominio autorizado -You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). +Puedes asegurar tu clave API [aquí](https://thegraph.com/studio/apikeys/test/). ![Subgraph lockdown page](/img/subgraph-lockdown.png) ### Consulta de su subgrafo en la red descentralizada -Now you can check the indexing status of the Indexers on the network in Graph Explorer (example [here](https://thegraph.com/explorer/subgraph?id=S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo&view=Indexers)). The green line at the top indicates that at the time of posting 8 Indexers successfully indexed that subgraph. Also in the Indexer tab you can see which Indexers picked up your subgraph. +Ahora puedes verificar el estado de indexación de los Indexadores en la red en Graph Explorer (ejemplo [aquí](https://thegraph.com/explorer/subgraph?id=S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo&view=Indexers)). La línea verde en la parte superior indica que en el momento de la publicación, 8 Indexadores indexaron exitosamente ese subgrafo. También, en la pestaña de Indexadores, puedes ver qué Indexadores han seleccionado tu subgrafo. ![Rocket Pool subgraph](/img/rocket-pool-subgraph.png) @@ -124,13 +124,13 @@ Tan pronto como el primer Indexador haya indexado completamente tu subgrafo, pod `https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` -Important: Make sure to replace `[api-key]` with an actual API key generated in the section above. +Importante: Asegúrate de reemplazar `[api-key]` con una clave API real generada en la sección anterior. Ahora puedes usar esa URL de consulta en tu dapp para enviar tus solicitudes de GraphQL. ¡Felicitaciones! ¡Ahora eres un pionero de la descentralización! -> Note: Due to the distributed nature of the network it might be the case that different Indexers have indexed up to different blocks. In order to only receive fresh data you can specify the minimum block an Indexer has to have indexed in order to serve your query with the block: `{ number_gte: $minBlock }` field argument as shown in the example below: +> Nota: Debido a la naturaleza distribuida de la red, podría ser el caso que diferentes Indexadores hayan indexado hasta bloques diferentes. Para recibir solo datos actualizados, puedes especificar el bloque mínimo que un Indexador debe haber indexado para atender tu consulta con el argumento de campo: `{ number_gte: $minBlock }`, como se muestra en el ejemplo a continuación: ```graphql { @@ -140,74 +140,74 @@ Ahora puedes usar esa URL de consulta en tu dapp para enviar tus solicitudes de } ``` -More information about the nature of the network and how to handle re-orgs are described in the documentation article [Distributed Systems](/querying/distributed-systems/). +Más información sobre la naturaleza de la red y cómo manejar reorganizaciones se describe en el artículo de documentación [Sistemas Distribuidos](/querying/distributed-systems/). -## Updating a Subgraph on the Network +## Actualizando un subgráfo en la red -If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. +Si deseas actualizar un subgrafo existente en la red, puedes hacerlo desplegando una nueva versión de tu subgrafo en el Subgraph Studio utilizando la interfaz de línea de comandos de Graph CLI. -1. Haz cambios en tu subgrafo actual. Una buena idea es probar pequeñas correcciones en Subgraph Studio publicando en Goerli. -2. Deploya lo siguiente y especifica la nueva versión en el comando (por ejemplo, v0.0.1, v0.0.2, etc.): +1. Haz cambios en tu subgrafo actual. Una buena idea es probar pequeñas correcciones en Subgraph Studio publicando en Goerli. +2. Deploya lo siguiente y especifica la nueva versión en el comando (por ejemplo, v0.0.1, v0.0.2, etc.): ```sh graph deploy --studio ``` -3. Prueba la nueva versión en el Subgraph Studio consultando en el Playground -4. Publica la nueva versión en The Graph Network. Recuerda que esto requiere gas (como se describe en la sección anterior). +3. Prueba la nueva versión en el Subgraph Studio consultando en el Playground +4. Publica la nueva versión en The Graph Network. Recuerda que esto requiere gas (como se describe en la sección anterior). -### Owner Update Fee: Deep Dive +### Tarifa de Actualización del Propietario: Análisis Profundo -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Nota: La curación en Arbitrum tiene una curva de vinculación plana. Obtén más información sobre Arbitrum [aquí](/arbitrum/arbitrum-faq/). -An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). +Una actualización requiere que GRT se migre de la antigua versión del subgrafo a la nueva versión. Esto significa que para cada actualización, se creará una nueva curva de vinculación (más información sobre las curvas de vinculación [aquí](/network/curating#bonding-curve-101)). -The new bonding curve charges the 1% curation tax on all GRT being migrated to the new version. The owner must pay 50% of this or 1.25%. The other 1.25% is absorbed by all the curators as a fee. This incentive design is in place to prevent an owner of a subgraph from being able to drain all their curator's funds with recursive update calls. If there is no curation activity, you will have to pay a minimum of 100 GRT in order to signal your own subgraph. +La nueva curva de vinculación cobra el impuesto de curación del 1% sobre todo el GRT que se está migrando a la nueva versión. El propietario debe pagar el 50% de esto, es decir, el 1.25%. El otro 1.25% es absorbido por todos los curadores como una tarifa. Este diseño de incentivos está en su lugar para evitar que el propietario de un subgrafo pueda agotar todos los fondos de sus curadores con llamadas de actualización recursivas. Si no hay actividad de curación, tendrás que pagar un mínimo de 100 GRT para señalizar tu propio subgrafo. Hagamos un ejemplo, esto es solo el caso si tu subgrafo está siendo curado activamente en: - Se señalizan 100.000 GRT mediante la auto-migración en v1 de un subgrafo -- Owner updates to v2. 100,000 GRT is migrated to a new bonding curve, where 97,500 GRT get put into the new curve and 2,500 GRT is burned -- The owner then has 1250 GRT burned to pay for half the fee. The owner must have this in their wallet before the update, otherwise, the update will not succeed. This happens in the same transaction as the update. +- Actualizaciones del propietario a la versión 2. Se migra 100,000 GRT a una nueva curva de vinculación, donde 97,500 GRT se colocan en la nueva curva y 2,500 GRT se queman +- Luego, al propietario se le queman 1250 GRT para pagar la mitad de la tarifa. El propietario debe tener esto en su billetera antes de la actualización; de lo contrario, la actualización no se llevará a cabo. Esto sucede en la misma transacción que la actualización. -_While this mechanism is currently live on the network, the community is currently discussing ways to reduce the cost of updates for subgraph developers._ +_Aunque este mecanismo está actualmente activo en la red, la comunidad está discutiendo formas de reducir el costo de las actualizaciones para los desarrolladores de subgrafos._ ### Mantener una Versión Estable de un Subgrafo -If you're making a lot of changes to your subgraph, it is not a good idea to continually update it and front the update costs. Maintaining a stable and consistent version of your subgraph is critical, not only from the cost perspective but also so that Indexers can feel confident in their syncing times. Indexers should be flagged when you plan for an update so that Indexer syncing times do not get impacted. Feel free to leverage the [#Indexers channel](https://discord.gg/JexvtHa7dq) on Discord to let Indexers know when you're versioning your subgraphs. +Si estás realizando muchos cambios en tu subgrafo, no es una buena idea actualizarlo continuamente y asumir los costos de la actualización. Mantener una versión estable y consistente de tu subgrafo es crucial, no solo desde la perspectiva de costos, sino también para que los Indexers puedan confiar en sus tiempos de sincronización. Deberías informar a los Indexers cuando planeas una actualización para que los tiempos de sincronización de los Indexers no se vean afectados. Siéntete libre de utilizar el canal [#Indexers](https://discord.gg/JexvtHa7dq) en Discord para notificar a los Indexers cuando estás versionando tus subgrafos. -Subgraphs are open APIs that external developers are leveraging. Open APIs need to follow strict standards so that they do not break external developers' applications. In The Graph Network, a subgraph developer must consider Indexers and how long it takes them to sync a new subgraph **as well as** other developers who are using their subgraphs. +Los subgrafos son API abiertas que los desarrolladores externos están aprovechando. Las API abiertas deben seguir estándares estrictos para que no rompan las aplicaciones de los desarrolladores externos. En la red de The Graph, un desarrollador de subgrafos debe tener en cuenta a los Indexadores y el tiempo que les lleva sincronizar un nuevo subgrafo, **así como también** a otros desarrolladores que están utilizando sus subgrafos. ### Actualización de los Metadatos de un subgrafo Puedes actualizar los metadatos de tu subgrafo sin tener que publicar una nueva versión. Los metadatos incluyen el nombre del subgrafo, la imagen, la descripción, la URL del sitio web, la URL del código fuente y las categorías. Los desarrolladores pueden hacer esto actualizando los detalles de sus subgrafos en el Subgraph Studio, donde se pueden editar todos los campos aplicables. -Make sure **Update Subgraph Details in Explorer** is checked and click on **Save**. 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. +Asegúrate de que la opción **Actualizar Detalles del Subgrafo en el Explorador** esté marcada y haz clic en **Guardar**. Si esto está marcado, se generará una transacción en cadena que actualiza los detalles del subgrafo en el Explorador sin necesidad de publicar una nueva versión con una implementación diferente. ## Mejores Prácticas para Deployar un Subgrafo en The Graph Network -1. Aprovechar un nombre ENS para el Desarrollo de Subgrafos: +1. Aprovechar un nombre ENS para el Desarrollo de Subgrafos: -- Set up your ENS [here](https://app.ens.domains/) -- Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). +- Configura tu ENS [aqui](https://app.ens.domains/) +- Añade tu nombre ENS a tu configuración [aquí](https://thegraph.com/explorer/settings?view=display-name). -2. Cuanto más completos estén tus perfiles, más posibilidades tendrás de que tus subgrafos sean indexados y curados. +2. Cuanto más completos estén tus perfiles, más posibilidades tendrás de que tus subgrafos sean indexados y curados. ## Deprecar un Subgrafo en The Graph Network -Follow the steps [here](/managing/deprecating-a-subgraph) to deprecate your subgraph and remove it from The Graph Network. +Sigue los pasos [aquí](/managing/deprecating-a-subgraph) para retirar tu subgrafo y eliminarlo de la red de The Graph. ## Consulta de un Subgrafo + Facturación en The Graph Network -The hosted service was set up to allow developers to deploy their subgraphs without any restrictions. +El servicio alojado se estableció para permitir a los desarrolladores desplegar sus subgrafos sin restricciones. -In order for The Graph Network to truly be decentralized, query fees have to be paid as a core part of the protocol's incentives. For more information on subscribing to APIs and paying the query fees, check out billing documentation [here](/billing/). +Para que la red de The Graph sea verdaderamente descentralizada, las tarifas de consulta deben pagarse como parte central de los incentivos del protocolo. Para obtener más información sobre cómo suscribirse a APIs y pagar las tarifas de consulta, consulta la documentación de facturación [aquí](/billing/). ### Estimación de las Tarifas de Consulta en la Red Aunque esta función no está disponible en la UI del producto, puedes establecer tu presupuesto máximo por consulta tomando la cantidad que estás dispuesto a pagar al mes y dividiéndola por el volumen de consultas previsto. -While you get to decide on your query budget, there is no guarantee that an Indexer will be willing to serve queries at that price. If a Gateway can match you to an Indexer willing to serve a query at, or lower than, the price you are willing to pay, you will pay the delta/difference of your budget **and** their price. As a consequence, a lower query price reduces the pool of Indexers available to you, which may affect the quality of service you receive. It's beneficial to have high query fees, as that may attract curation and big-name Indexers to your subgraph. +Aunque puedes decidir sobre tu presupuesto de consulta, no hay garantía de que un Indexador esté dispuesto a atender consultas a ese precio. Si una Puerta puede emparejarte con un Indexador dispuesto a atender una consulta al precio que estás dispuesto a pagar o a un precio más bajo, pagarás la diferencia entre tu presupuesto **y** su precio. Como consecuencia, un precio de consulta más bajo reduce el grupo de Indexadores disponibles para ti, lo que puede afectar la calidad del servicio que recibes. Es beneficioso tener tarifas de consulta altas, ya que esto puede atraer la curación y a Indexadores reconocidos a tu subgrafo. Recuerda que se trata de un mercado dinámico y en crecimiento, pero la forma de interactuar con él está bajo tu control. No hay un precio máximo o mínimo especificado en el protocolo o en los Gateways. Por ejemplo, puedes ver el precio que pagan algunas de las dApps de la red (por semana), a continuación. Véase la última columna, que muestra las tarifas de consulta en GRT. @@ -215,11 +215,11 @@ Recuerda que se trata de un mercado dinámico y en crecimiento, pero la forma de ## Recursos Adicionales -If you're still confused, fear not! Check out the following resources or watch our video guide on upgrading subgraphs to the decentralized network below: +¡Si aún estás confundido, no te preocupes! Consulta los siguientes recursos o mira nuestra guía en video sobre cómo actualizar subgrafos a la red descentralizada a continuación: -- [The Graph Network Contracts](https://github.com/graphprotocol/contracts) -- [Curation Contract](https://github.com/graphprotocol/contracts/blob/dev/contracts/curation/Curation.sol) - the underlying contract that the GNS wraps around - - Address - `0x8fe00a685bcb3b2cc296ff6ffeab10aca4ce1538` -- [Subgraph Studio documentation](/deploying/subgraph-studio) +- [Contratos de la red de the graph](https://github.com/graphprotocol/contracts) +- [Contrato de Curación](https://github.com/graphprotocol/contracts/blob/dev/contracts/curation/Curation.sol) - el contrato subyacente que envuelve el GNS + - Direccion - `0x8fe00a685bcb3b2cc296ff6ffeab10aca4ce1538` +- [Documentación de Subgraph Studio](/deploying/subgraph-studio) From 5a221d454d748d84486e14d537b9881091c165bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:20 -0400 Subject: [PATCH 484/924] New translations upgrading-a-subgraph.mdx (Arabic) --- .../ar/cookbook/upgrading-a-subgraph.mdx | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/website/pages/ar/cookbook/upgrading-a-subgraph.mdx b/website/pages/ar/cookbook/upgrading-a-subgraph.mdx index e093ce7b1c5f..aa6675676abe 100644 --- a/website/pages/ar/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/ar/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: ```sh graph auth --studio ``` -3. أنشئ الملفات وقم ببناء الـ الفرعيةرسمبياني: +3. أنشئ الملفات وقم ببناء الـ الفرعيةرسمبياني: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ At the end of each week, an invoice will be generated based on the query fees th It is recommended that you secure the API by limiting its usage in two ways: -1. Authorized Subgraphs -2. Authorized Domain +1. Authorized Subgraphs +2. Authorized Domain You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. انشر ما يلي وحدد الإصدار الجديد في الأمر (مثل v0.0.1 ، v0.0.2 ، إلخ): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. انشر ما يلي وحدد الإصدار الجديد في الأمر (مثل v0.0.1 ، v0.0.2 ، إلخ): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -184,28 +184,28 @@ You can update the metadata of your subgraphs without having to publish a new ve Make sure **Update Subgraph Details in Explorer** is checked and click on **Save**. 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. -## أفضل الممارسات لنشر Subgraph على شبكة The Graph +## Best Practices for Deploying a Subgraph to The Graph Network -1. الاستفادة من اسم ENS لتطوير الـ Subgraph: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. كلما تم ملء البروفايل الخاص بك ، كلما زادت فرص فهرسة الـ subgraphs الخاصة بك وتنسيقها. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. -## إيقاف Subgraph على شبكة The Graph +## Deprecating a Subgraph on The Graph Network Follow the steps [here](/managing/deprecating-a-subgraph) to deprecate your subgraph and remove it from The Graph Network. -## الاستعلام عن Subgraph + الفوترة على شبكة The Graph +## Querying a Subgraph + Billing on The Graph Network The hosted service was set up to allow developers to deploy their subgraphs without any restrictions. In order for The Graph Network to truly be decentralized, query fees have to be paid as a core part of the protocol's incentives. For more information on subscribing to APIs and paying the query fees, check out billing documentation [here](/billing/). -### تقدير رسوم الاستعلام على الشبكة +### Estimate Query Fees on the Network -على الرغم من أن هذه ليست ميزة موجودة في واجهة مستخدم المنتج ، إلا أنه يمكنك تعيين الحد الأقصى لميزانيتك لكل استعلام وذلك عن طريق أخذ المبلغ الذي ترغب في دفعه شهريًا وتقسيمه على حجم الاستعلام المتوقع. +While this is not a live feature in the product UI, you can set your maximum budget per query by taking the amount you're willing to pay per month and dividing it by your expected query volume. While you get to decide on your query budget, there is no guarantee that an Indexer will be willing to serve queries at that price. If a Gateway can match you to an Indexer willing to serve a query at, or lower than, the price you are willing to pay, you will pay the delta/difference of your budget **and** their price. As a consequence, a lower query price reduces the pool of Indexers available to you, which may affect the quality of service you receive. It's beneficial to have high query fees, as that may attract curation and big-name Indexers to your subgraph. From 66f611339bf23fe78270ada2aded9bb0cbba9fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:21 -0400 Subject: [PATCH 485/924] New translations upgrading-a-subgraph.mdx (Czech) --- .../cs/cookbook/upgrading-a-subgraph.mdx | 170 +++++++++--------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/website/pages/cs/cookbook/upgrading-a-subgraph.mdx b/website/pages/cs/cookbook/upgrading-a-subgraph.mdx index bd3b739199d6..b26c1da4046b 100644 --- a/website/pages/cs/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/cs/cookbook/upgrading-a-subgraph.mdx @@ -1,25 +1,25 @@ --- -title: Upgrading an Existing Subgraph to The Graph Network +title: Upgrade existujícího podgrafu na síť grafů --- -## Introduction +## Úvod -This is a guide on how to upgrade your subgraph from the hosted service to The Graph's decentralized network. Over 1,000 subgraphs have successfully upgraded to The Graph Network including projects like Snapshot, Loopring, Audius, Premia, Livepeer, Uma, Curve, Lido, and many more! +Toto je návod, jak upgradovat svůj subgraf z hostované služby na decentralizovanou síť The Graph. Více než 1,000 subgrafů bylo úspěšně upgradováno na síť The Graph, včetně projektů jako Snapshot, Loopring, Audius, Premia, Livepeer, Uma, Curve, Lido a mnoha dalších! -The process of upgrading is quick and your subgraphs will forever benefit from the reliability and performance that you can only get on The Graph Network. +Proces aktualizace je rychlý a vaše subgrafy budou vždy profitovat z reliability a výkonu, které můžete získat pouze na síti Grafu. -### Prerequisites +### Předpoklady -- You have already deployed a subgraph on the hosted service. -- The subgraph is indexing a chain available on The Graph Network. -- You have a wallet with ETH to publish your subgraph on-chain. -- You have ~10,000 GRT to curate your subgraph so Indexers can begin indexing it. +- V hostované službě jste již nasadili podgraf. +- Subgraf indexuje řetězec dostupný na síti Grafu. +- Máte peněženku s ETH, ve které můžete publikovat svůj subgraf na řetězci. +- Máte k dispozici ~10,000 GRT na vylepšit podgrafu, aby jej indexátory mohly začít indexovat. -## Upgrading an Existing Subgraph to The Graph Network +## Upgrade existujícího podgrafu na síť grafů -> You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). +> Konkrétní příkazy pro svůj podgraf najdete v [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Nainstalujte nejnovější verzi graph-cli: ```sh npm install -g @graphprotocol/graph-cli @@ -29,29 +29,29 @@ npm install -g @graphprotocol/graph-cli yarn global add @graphprotocol/graph-cli ``` -Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. +Ujistěte se, že vaše `apiVersion` v souboru subgraph.yaml je `0.0.5` nebo vyšší. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Uvnitř hlavního úložiště podgrafu projektu ověřte podgraf pro nasazení a sestavení ve studiu: ```sh graph auth --studio ``` -3. Generate files and build the subgraph: +3. Generování souborů a sestavení podgrafu: ```sh graph codegen && graph build ``` -If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). +Pokud váš podgraf obsahuje chyby sestavení, podívejte se do příručky [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Přihlaste se do [Subgraph Studio](https://thegraph.com/studio/) pomocí peněženky a nasaďte subgraf. V uživatelském rozhraní Studio najdete svůj ``, který je založen na názvu vašeho subgrafu. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Testování dotazů na hřišti Studio. Zde je několik příkladů pro [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,69 +68,69 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. V tuto chvíli je váš podgraf nyní nasazen v aplikaci Subgraph Studio, ale ještě není zveřejněn v decentralizované síti. Nyní můžete subgraf otestovat a ujistit se, že funguje, jak má, pomocí dočasné adresy URL dotazu, jak je vidět v horní části pravého sloupce výše. Jak již tento název napovídá, jedná se o dočasnou adresu URL a neměla by být používána v produkčním provozu. -- Updating is just publishing another version of your existing subgraph on-chain. -- Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. -- Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. +- Aktualizace je pouze publikování další verze stávajícího podgrafu v řetězci. +- Protože to s sebou nese náklady, doporučujeme před zveřejněním nasadit a otestovat subgraf ve Studiu Subgraph pomocí "Development Query URL". See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Ceny se pohybují zhruba kolem 0,0425 ETH za 100 gwei. +- Kdykoli budete potřebovat aktualizovat svůj podgraf, bude vám účtován poplatek za aktualizaci. Vzhledem k tomu, že je to spojeno s náklady, doporučujeme před nasazením do mainnet nasadit a otestovat subgraf na Goerli. V některých případech to může také vyžadovat určité GRT, pokud na daném subgrafu není žádný signál. V případě, že na dané verzi podgrafu signál/určení je (pomocí automatického migrování), budou daně rozděleny. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Podgraf zveřejněte v decentralizované síti The Graph stisknutím tlačítka "Publish". -You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. +Pomocí GRT byste měli svůj podgraf kurátorsky upravit, abyste zajistili jeho indexaci indexátory. Chcete-li ušetřit náklady na plyn, můžete svůj podgraf kurátorovat ve stejné transakci, kdy jej publikujete do sítě. Pro vysokou kvalitu služeb se doporučuje kurátorovat subgraf s alespoň 10,000 GRT. -And that's it! After you are done publishing, you'll be able to view your subgraphs live on the decentralized network via [The Graph Explorer](https://thegraph.com/explorer). +A je to! Po dokončení publikování si budete moci své podgrafy živě prohlížet v decentralizované síti prostřednictvím [The Graph Explorer](https://thegraph.com/explorer). -Feel free to leverage the [#Curators channel](https://discord.gg/s5HfGMXmbW) on Discord to let Curators know that your subgraph is ready to be signaled. It would also be helpful if you share your expected query volume with them. Therefore, they can estimate how much GRT they should signal on your subgraph. +Neváhejte využít kanál [#Curators](https://discord.gg/s5HfGMXmbW) na Discord, abyste dali kurátorům vědět, že je váš podgraf připraven k signalizaci. Bylo by také užitečné, kdybyste se s nimi podělili o očekávaný objem dotazů. Mohou tedy odhadnout, kolik GRT by měli na vašem subgrafu signalizovat. -### Create an API key +### Vytvoření klíče API -You can generate an API key in Subgraph Studio [here](https://thegraph.com/studio/apikeys/). +Klíč API si můžete vygenerovat v podgraf Studio [zde](https://thegraph.com/studio/apikeys/). ![API key creation page](/img/api-image.png) -At the end of each week, an invoice will be generated based on the query fees that have been incurred during this period. This invoice will be paid automatically using the GRT available in your balance. Your balance will be updated after the cost of your query fees are withdrawn. Query fees are paid in GRT via the Arbitrum network. You will need to add GRT to the Arbitrum billing contract to enable your API key via the following steps: +Na konci každého týdne bude vygenerována faktura na základě poplatků za dotazy, které vznikly během tohoto období. Tato faktura bude automaticky uhrazena pomocí GRT, které máte k dispozici na svém zůstatku. Váš zůstatek bude aktualizován po stažení nákladů na poplatky za dotazy. Poplatky za dotazy se platí v GRT prostřednictvím sítě Arbitrum. Abyste mohli aktivovat svůj klíč API, musíte přidat GRT do fakturační smlouvy Arbitrum prostřednictvím následujících kroků: -- Purchase GRT on an exchange of your choice. -- Send the GRT to your wallet. -- On the Billing page in Studio, click on Add GRT. +- Nakupte GRT na burze dle vlastního výběru. +- Pošlete GRT do své peněženky. +- Na stránce Fakturace ve Studiu klikněte na možnost Přidat GRT. ![Add GRT in billing](/img/Add-GRT-New-Page.png) -- Follow the steps to add your GRT to your billing balance. -- Your GRT will be automatically bridged to the Arbitrum network and added to your billing balance. +- Podle následujících kroků přidejte svůj GRT k zůstatku na faktuře. +- Vaše GRT bude automaticky přemostěno do sítě Arbitrum a přičteno k vašemu zúčtovacímu zůstatku. ![Billing pane](/img/New-Billing-Pane.png) -> Note: see the [official billing page](../billing.mdx) for full instructions on adding GRT to your billing balance. +> Poznámka: úplné pokyny pro přidání GRT k vyúčtování naleznete na [oficiální stránce vyúčtování](../billing.mdx). -### Securing your API key +### Zabezpečení klíče API -It is recommended that you secure the API by limiting its usage in two ways: +Doporučuje se zabezpečit API omezením jeho používání dvěma způsoby -1. Authorized Subgraphs -2. Authorized Domain +1. Autorizované podgrafy +2. Autorizovaná doména -You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). +Klíč API si můžete zajistit [zde](https://thegraph.com/studio/apikeys/test/). ![Subgraph lockdown page](/img/subgraph-lockdown.png) -### Querying your subgraph on the decentralized network +### Dotazování na podgraf v decentralizované síti -Now you can check the indexing status of the Indexers on the network in Graph Explorer (example [here](https://thegraph.com/explorer/subgraph?id=S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo&view=Indexers)). The green line at the top indicates that at the time of posting 8 Indexers successfully indexed that subgraph. Also in the Indexer tab you can see which Indexers picked up your subgraph. +Nyní můžete zkontrolovat stav indexování indexátorů v síti v nástroji Graph Explorer (příklad [zde](https://thegraph.com/explorer/subgraph?id=S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo&view=Indexers)). Zelená čára nahoře znamená, že v době odeslání příspěvku 8 Indexerů úspěšně indexovalo daný podgraf. Na kartě Indexer můžete také vidět, které indexery podgraf zachytily. ![Rocket Pool subgraph](/img/rocket-pool-subgraph.png) -As soon as the first Indexer has fully indexed your subgraph you can start to query the subgraph on the decentralized network. In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: +Jakmile první indexer plně zaindexuje váš podgraf, můžete se začít dotazovat na podgraf v decentralizované síti. Chcete-li získat adresu URL dotazu pro svůj podgraf, můžete ji zkopírovat/vložit kliknutím na symbol vedle adresy URL dotazu. Zobrazí se něco takového: `https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` -Important: Make sure to replace `[api-key]` with an actual API key generated in the section above. +Důležité: Nezapomeňte nahradit `[api-key]` skutečným klíčem API vygenerovaným v části výše. -You can now use that Query URL in your dapp to send your GraphQL requests to. +Nyní můžete použít tuto URL dotazu ve své dapp k odesílání vašich GraphQL požadavků -Congratulations! You are now a pioneer of decentralization! +Gratulujeme! Nyní jste průkopníkem decentralizace! -> Note: Due to the distributed nature of the network it might be the case that different Indexers have indexed up to different blocks. In order to only receive fresh data you can specify the minimum block an Indexer has to have indexed in order to serve your query with the block: `{ number_gte: $minBlock }` field argument as shown in the example below: +> Poznámka: Vzhledem k distribuované povaze sítě se může stát, že různé indexátory indexují až různé bloky. Abyste dostávali pouze čerstvá data, můžete zadat minimální blok, který musí mít Indexer zaindexovaný, aby mohl váš dotaz obsloužit, pomocí argumentu pole block: `{ number_gte: $minBlock }`, jak je uvedeno v příkladu níže: ```graphql { @@ -140,82 +140,82 @@ Congratulations! You are now a pioneer of decentralization! } ``` -More information about the nature of the network and how to handle re-orgs are described in the documentation article [Distributed Systems](/querying/distributed-systems/). +Další informace o povaze sítě a o tom, jak zacházet s re-orgy, jsou popsány v dokumentačním článku [Distribuované systémy](/querying/distributed-systems/). -## Updating a Subgraph on the Network +## Aktualizace podgrafu v síti -If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. +Pokud chcete aktualizovat existující podgraf v síti, můžete to provést nasazením nové verze podgrafu do Subgraph Studio pomocí Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): +1. Proveďte změny v aktuálním podgrafu. Dobrým nápadem je otestovat malé opravy ve Studiu subgrafu zveřejněním v Goerli. +2. Nasaďte následující a v příkazu zadejte novou verzi (např. v0.0.1, v0.0.2 atd.): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Otestujte novou verzi ve Studiu Subgraph dotazem na hřišti. +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). -### Owner Update Fee: Deep Dive +### Poplatek za aktualizaci vlastníka: Hluboký ponor -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Poznámka: Kurátorství na Arbitrum má plochou křivku vazby. Více informací o Arbitrum [zde](/arbitrum/arbitrum-faq/). -An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). +Aktualizace vyžaduje migraci GRT ze staré verze podgrafu na novou verzi. To znamená, že při každé aktualizaci se vytvoří nová vazební křivka (více o vazebních křivkách [zde](/network/curating#bonding-curve-101)). -The new bonding curve charges the 1% curation tax on all GRT being migrated to the new version. The owner must pay 50% of this or 1.25%. The other 1.25% is absorbed by all the curators as a fee. This incentive design is in place to prevent an owner of a subgraph from being able to drain all their curator's funds with recursive update calls. If there is no curation activity, you will have to pay a minimum of 100 GRT in order to signal your own subgraph. +Nová vazební křivka účtuje 1% kurátorskou daň ze všech GRT, které jsou migrovány na novou verzi. Vlastník musí zaplatit 50% z této částky nebo 1.25 %. Zbývajících 1.25 % absorbují všichni kurátoři jako poplatek. Tato motivační konstrukce je zavedena proto, aby vlastník podgrafu nemohl vyčerpat všechny prostředky svého kurátora rekurzivními aktualizačními voláními. Pokud neprobíhá žádná kurátorská činnost, musíte zaplatit minimálně 100 GRT, abyste mohli signalizovat svůj vlastní podgraf. -Let's make an example, this is only the case if your subgraph is being actively curated on: +Uveďme si příklad, který platí pouze v případě, že je váš podgraf aktivně kurátorován: -- 100,000 GRT is signaled using auto-migrate on v1 of a subgraph -- Owner updates to v2. 100,000 GRT is migrated to a new bonding curve, where 97,500 GRT get put into the new curve and 2,500 GRT is burned -- The owner then has 1250 GRT burned to pay for half the fee. The owner must have this in their wallet before the update, otherwise, the update will not succeed. This happens in the same transaction as the update. +- 100,000 GRT je signalizováno pomocí automatické migrace na v1 podgrafu +- Vlastník provede aktualizaci na verzi v2. 100,000 GRT se převede na novou křivku lepení, přičemž 97,500 GRT se vloží do nové křivky a 2,500 GRT se spálí +- Majitel pak má 1,250 GRT spálené zaplatit polovinu poplatku. Tuto částku musí mít majitel před aktualizací v peněžence, jinak se aktualizace nepodaří. K tomu dojde ve stejné transakci jako k aktualizaci. -_While this mechanism is currently live on the network, the community is currently discussing ways to reduce the cost of updates for subgraph developers._ +_Ačkoli je tento mechanismus v současné době na síti v provozu, komunita v současné době diskutuje o způsobech, jak snížit náklady na aktualizace pro vývojáře podgrafů._ -### Maintaining a Stable Version of a Subgraph +### Udržování stabilní verze podgrafu -If you're making a lot of changes to your subgraph, it is not a good idea to continually update it and front the update costs. Maintaining a stable and consistent version of your subgraph is critical, not only from the cost perspective but also so that Indexers can feel confident in their syncing times. Indexers should be flagged when you plan for an update so that Indexer syncing times do not get impacted. Feel free to leverage the [#Indexers channel](https://discord.gg/JexvtHa7dq) on Discord to let Indexers know when you're versioning your subgraphs. +Pokud v podgrafu provádíte mnoho změn, není dobré jej neustále aktualizovat a předbíhat náklady na aktualizaci. Udržování stabilní a konzistentní verze podgrafu je zásadní nejen z hlediska nákladů, ale také proto, aby se indexátory mohly cítit jistě při synchronizaci. Indexery by měly být při plánování aktualizace označeny, aby nebyly ovlivněny časy synchronizace indexerů. Neváhejte využít kanál [#Indexers](https://discord.gg/JexvtHa7dq) na službě Discord, abyste dali Indexerům vědět, kdy verzujete své subgrafy. -Subgraphs are open APIs that external developers are leveraging. Open APIs need to follow strict standards so that they do not break external developers' applications. In The Graph Network, a subgraph developer must consider Indexers and how long it takes them to sync a new subgraph **as well as** other developers who are using their subgraphs. +Subgrafy jsou otevřená rozhraní API, která využívají externí vývojáři. Otevřená API musí dodržovat přísné standardy, aby nenarušovala aplikace externích vývojářů. V na síti Grafu musí vývojář podgrafů brát ohled na indexátory a na to, jak dlouho jim trvá synchronizace nového podgrafu **a také na** ostatní vývojáře, kteří používají jejich podgrafy. -### Updating the Metadata of a Subgraph +### Aktualizace metadat podgrafu -You can update the metadata of your subgraphs without having to publish a new version. The metadata includes the subgraph name, image, description, website URL, source code URL, and categories. Developers can do this by updating their subgraph details in the Subgraph Studio where you can edit all applicable fields. +Metadata dílčích grafů můžete aktualizovat, aniž byste museli publikovat novou verzi. Metadata zahrnují název podgrafu, obrázek, popis, adresu URL webové stránky, adresu URL zdrojového kódu a kategorie. Vývojáři tak mohou učinit aktualizací podrobností o podgrafu v aplikaci Subgraph Studio, kde lze upravit všechna příslušná pole. -Make sure **Update Subgraph Details in Explorer** is checked and click on **Save**. 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. +Ujistěte se, že je zaškrtnuto políčko **Aktualizovat podrobnosti subgrafu v Průzkumníku**, a klikněte na tlačítko **Uložit**. Pokud je tato možnost zaškrtnuta, bude vygenerována řetězová transakce, která aktualizuje podrobnosti subgrafu v Průzkumníku, aniž by bylo nutné publikovat novou verzi s novým nasazením. -## Best Practices for Deploying a Subgraph to The Graph Network +## Osvědčené postupy pro nasazení podgrafu do sítě grafů -1. Leveraging an ENS name for Subgraph Development: +1. Využití názvu ENS pro vývoj podgrafů: -- Set up your ENS [here](https://app.ens.domains/) -- Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). +- Nastavení ENS [zde](https://app.ens.domains/) +- Přidejte svůj název ENS do nastavení [zde](https://thegraph.com/explorer/settings?view=display-name). -2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. +2. Čím více jsou vaše profily vyplněné, tím větší je šance, že vaše podgrafy budou indexovány a kurátorovány. -## Deprecating a Subgraph on The Graph Network +## Odepsání subgrafu v síti Graph -Follow the steps [here](/managing/deprecating-a-subgraph) to deprecate your subgraph and remove it from The Graph Network. +Postupujte podle pokynů [zde](/managing/deprecating-a-subgraph), abyste svůj podgraf vyřadili a odstranili jej ze sítě The Graph Network. -## Querying a Subgraph + Billing on The Graph Network +## Dotazování podgrafu + fakturace v síti graph -The hosted service was set up to allow developers to deploy their subgraphs without any restrictions. +Hostovaná služba byla vytvořena tak, aby umožnila vývojářům nasazovat své podgrafy bez jakýchkoli omezení. -In order for The Graph Network to truly be decentralized, query fees have to be paid as a core part of the protocol's incentives. For more information on subscribing to APIs and paying the query fees, check out billing documentation [here](/billing/). +Aby byla síť Grafu skutečně decentralizovaná, musí se poplatky za dotazy platit jako základní součást pobídek protokolu. Další informace o přihlašování k API a placení poplatků za dotazy najdete v dokumentaci k účtování [zde](/billing/). -### Estimate Query Fees on the Network +### Odhad poplatků za dotazy v síti -While this is not a live feature in the product UI, you can set your maximum budget per query by taking the amount you're willing to pay per month and dividing it by your expected query volume. +Ačkoli se nejedná o živou funkci v uživatelském rozhraní produktu, můžete si nastavit maximální rozpočet na dotaz tak, že vezmete částku, kterou jste ochotni zaplatit za měsíc, a vydělíte ji očekávaným objemem dotazů. -While you get to decide on your query budget, there is no guarantee that an Indexer will be willing to serve queries at that price. If a Gateway can match you to an Indexer willing to serve a query at, or lower than, the price you are willing to pay, you will pay the delta/difference of your budget **and** their price. As a consequence, a lower query price reduces the pool of Indexers available to you, which may affect the quality of service you receive. It's beneficial to have high query fees, as that may attract curation and big-name Indexers to your subgraph. +Rozpočet na dotazy sice určujete vy, ale není zaručeno, že indexátor bude ochoten dotazy za tuto cenu obsloužit. Pokud vás brána může spojit s indexátorem, který je ochoten obsloužit dotaz za cenu, kterou jste ochotni zaplatit, nebo nižší, zaplatíte deltu/rozdíl mezi vaším rozpočtem **a** jeho cenou. Nižší cena dotazu proto snižuje počet indexátorů, které máte k dispozici, což může ovlivnit kvalitu služby, kterou obdržíte. Je výhodné mít vysoké ceny dotazů, protože to může přilákat kurátory a indexátory velkých jmen do vašeho podgrafu. -Remember that it's a dynamic and growing market, but how you interact with it is in your control. There is no maximum or minimum price specified in the protocol or the Gateways. For example, you can look at the price paid by a few of the dapps on the network (on a per-week basis), below. See the last column, which shows query fees in GRT. +Nezapomeňte, že jde o dynamický a rostoucí trh, ale to, jak s ním budete komunikovat, je ve vaší režii. V protokolu ani v bránách není stanovena žádná maximální ani minimální cena. Níže se můžete podívat například na cenu, kterou platí několik dapů v síti (na týdenní bázi). Viz poslední sloupec, který ukazuje poplatky za dotazování v GRT. ![QueryFee](/img/QueryFee.png) -## Additional Resources +## Další zdroje -If you're still confused, fear not! Check out the following resources or watch our video guide on upgrading subgraphs to the decentralized network below: +Pokud jste stále zmateni, nebojte se! Podívejte se na následující zdroje nebo se podívejte na našeho videoprůvodce upgradem subgrafů na decentralizovanou síť níže: From 695be343bb5973808d0c30b6479bd1848a8c406f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:22 -0400 Subject: [PATCH 486/924] New translations upgrading-a-subgraph.mdx (German) --- .../de/cookbook/upgrading-a-subgraph.mdx | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/website/pages/de/cookbook/upgrading-a-subgraph.mdx b/website/pages/de/cookbook/upgrading-a-subgraph.mdx index bd3b739199d6..69b6b45e252c 100644 --- a/website/pages/de/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/de/cookbook/upgrading-a-subgraph.mdx @@ -10,7 +10,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t ### Prerequisites -- You have already deployed a subgraph on the hosted service. +- Sie haben bereits einen Subgrafen auf dem gehosteten Dienst bereitgestellt. - The subgraph is indexing a chain available on The Graph Network. - You have a wallet with ETH to publish your subgraph on-chain. - You have ~10,000 GRT to curate your subgraph so Indexers can begin indexing it. @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Authentifizieren Sie den Subgrafen im Hauptprojekt-Repository des Subgrafen, um ihn im Studio bereitzustellen und zu erstellen: ```sh graph auth --studio ``` -3. Generate files and build the subgraph: +3. Generate files and build the subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. An diesem Punkt wird Ihr Subgraf jetzt auf Subgraph Studio bereitgestellt, aber noch nicht im dezentralen Netzwerk veröffentlicht. Sie können jetzt den Subgrafen testen, um sicherzustellen, dass es wie beabsichtigt funktioniert, indem Sie die temporäre Abfrage-URL verwenden, die oben in der rechten Spalte zu sehen ist. Wie der Name schon sagt, ist dies eine temporäre URL und sollte nicht in der Produktion verwendet werden. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Veröffentlichen Sie den Subgrafen im dezentralen Netzwerk von The Graph, indem Sie auf die Schaltfläche „Veröffentlichen“ klicken. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -82,7 +82,7 @@ And that's it! After you are done publishing, you'll be able to view your subgra Feel free to leverage the [#Curators channel](https://discord.gg/s5HfGMXmbW) on Discord to let Curators know that your subgraph is ready to be signaled. It would also be helpful if you share your expected query volume with them. Therefore, they can estimate how much GRT they should signal on your subgraph. -### Create an API key +### Erstellen Sie einen API-Schlüssel You can generate an API key in Subgraph Studio [here](https://thegraph.com/studio/apikeys/). @@ -92,7 +92,7 @@ At the end of each week, an invoice will be generated based on the query fees th - Purchase GRT on an exchange of your choice. - Send the GRT to your wallet. -- On the Billing page in Studio, click on Add GRT. +- Klicken Sie auf der Abrechnungsseite in Studio auf GRT hinzufügen. ![Add GRT in billing](/img/Add-GRT-New-Page.png) @@ -105,30 +105,30 @@ At the end of each week, an invoice will be generated based on the query fees th ### Securing your API key -It is recommended that you secure the API by limiting its usage in two ways: +Es wird empfohlen, die API zu sichern, indem Sie ihre Verwendung auf zwei Arten einschränken: -1. Authorized Subgraphs -2. Authorized Domain +1. Autorisierte Subgrafen +2. Autorisierte Domäne You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). ![Subgraph lockdown page](/img/subgraph-lockdown.png) -### Querying your subgraph on the decentralized network +### Abfragen Ihres Subgrafen im dezentralen Netzwerk Now you can check the indexing status of the Indexers on the network in Graph Explorer (example [here](https://thegraph.com/explorer/subgraph?id=S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo&view=Indexers)). The green line at the top indicates that at the time of posting 8 Indexers successfully indexed that subgraph. Also in the Indexer tab you can see which Indexers picked up your subgraph. ![Rocket Pool subgraph](/img/rocket-pool-subgraph.png) -As soon as the first Indexer has fully indexed your subgraph you can start to query the subgraph on the decentralized network. In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: +Sobald der erste Indexer Ihren Subgrafen vollständig indiziert hat, können Sie mit der Abfrage des Subgrafen im dezentralen Netzwerk beginnen. Um die Abfrage-URL für Ihren Subgrafen abzurufen, können Sie sie kopieren/einfügen, indem Sie auf das Symbol neben der Abfrage-URL klicken. Sie werden so etwas sehen: `https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` Important: Make sure to replace `[api-key]` with an actual API key generated in the section above. -You can now use that Query URL in your dapp to send your GraphQL requests to. +Sie können diese Abfrage-URL jetzt in Ihrer Dapp verwenden, um Ihre GraphQL-Anfragen an sie zu senden. -Congratulations! You are now a pioneer of decentralization! +Herzliche Glückwünsche! Sie sind jetzt ein Pionier der Dezentralisierung! > Note: Due to the distributed nature of the network it might be the case that different Indexers have indexed up to different blocks. In order to only receive fresh data you can specify the minimum block an Indexer has to have indexed in order to serve your query with the block: `{ number_gte: $minBlock }` field argument as shown in the example below: @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## Best Practices for Deploying a Subgraph to The Graph Network -1. Leveraging an ENS name for Subgraph Development: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. ## Deprecating a Subgraph on The Graph Network From 307dc4970e5ff9bef1f05854c4ebf0c5216b5d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:23 -0400 Subject: [PATCH 487/924] New translations upgrading-a-subgraph.mdx (Italian) --- .../it/cookbook/upgrading-a-subgraph.mdx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/it/cookbook/upgrading-a-subgraph.mdx b/website/pages/it/cookbook/upgrading-a-subgraph.mdx index bd3b739199d6..bf834e310208 100644 --- a/website/pages/it/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/it/cookbook/upgrading-a-subgraph.mdx @@ -2,7 +2,7 @@ title: Upgrading an Existing Subgraph to The Graph Network --- -## Introduction +## Introduzione This is a guide on how to upgrade your subgraph from the hosted service to The Graph's decentralized network. Over 1,000 subgraphs have successfully upgraded to The Graph Network including projects like Snapshot, Loopring, Audius, Premia, Livepeer, Uma, Curve, Lido, and many more! @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: ```sh graph auth --studio ``` -3. Generate files and build the subgraph: +3. Generate files and build the subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ At the end of each week, an invoice will be generated based on the query fees th It is recommended that you secure the API by limiting its usage in two ways: -1. Authorized Subgraphs -2. Authorized Domain +1. Authorized Subgraphs +2. Authorized Domain You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## Best Practices for Deploying a Subgraph to The Graph Network -1. Leveraging an ENS name for Subgraph Development: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. ## Deprecating a Subgraph on The Graph Network From 4e8d750f46fc8f49159fa2316f0b31cba3f184de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:24 -0400 Subject: [PATCH 488/924] New translations upgrading-a-subgraph.mdx (Japanese) --- .../ja/cookbook/upgrading-a-subgraph.mdx | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/ja/cookbook/upgrading-a-subgraph.mdx b/website/pages/ja/cookbook/upgrading-a-subgraph.mdx index c2cd2aafe541..831288f0a548 100644 --- a/website/pages/ja/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/ja/cookbook/upgrading-a-subgraph.mdx @@ -11,7 +11,7 @@ title: 既存のサブグラフをThe Graph Networkにアップグレードす ### 前提条件 - 私はすでにホストされたサービスにサブグラフを展開しました -- The subgraph is indexing a chain available on The Graph Network. +- このサブグラフは、グラフ・ネットワークで利用可能なチェーンのインデックスとして機能します。 - サブグラフをチェーン上に公開するためのETHを持つウォレットがあります。 - インデクサーがインデックス作業を開始できるように、サブグラフをキュレートするために約10,000 GRTを持っています。 @@ -19,7 +19,7 @@ title: 既存のサブグラフをThe Graph Networkにアップグレードす > あなたのサブグラフに特定のコマンドを見つけることができます。[Subgraph Studio](https://thegraph.com/studio/) をご覧ください。 -1. 最新版の graph-cli をインストールする: +1. 最新版の graph-cli をインストールする: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Subgraph.yamlの 'apiVersion' が '0.0.5' 以上であることを確認してください。 -2. メイン・プロジェクトのサブグラフ・リポジトリ内で、スタジオ上でデプロイとビルドを行うためにサブグラフを認証します。 +2. メイン・プロジェクトのサブグラフ・リポジトリ内で、スタジオ上でデプロイとビルドを行うためにサブグラフを認証します。 ```sh graph auth --studio ``` -3. ファイルを生成し、サブグラフをビルドする: +3. ファイルを生成し、サブグラフをビルドする: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build もしサブグラフにビルドエラーがある場合、[AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/) を参照してください。 -4. ウォレットで[Subgraph Studio](https://thegraph.com/studio/)にサインインし、サブグラフをデプロイしてください。サブグラフの名前に基づく\は、Studio UIで見つけることができます。 +4. ウォレットで[Subgraph Studio](https://thegraph.com/studio/)にサインインし、サブグラフをデプロイしてください。サブグラフの名前に基づく\は、Studio UIで見つけることができます。 ```sh graph deploy --studio ``` -5. Studioのプレイグラウンドでクエリをテストしてください。以下は、[Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground) のためのいくつかの例です。 +5. Studioのプレイグラウンドでクエリをテストしてください。以下は、[Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground) のためのいくつかの例です。 ```sh { @@ -68,19 +68,19 @@ graph deploy --studio } ``` -6. この時点で、サブグラフはSubgraph Studio上にデプロイされましたが、分散ネットワークにはまだ公開されていません。サブグラフが意図したとおりに動作しているか、右上の一時的なクエリURLを用いてテストすることができます。この名前が示すように、これは一時的なURLであり、実運用に使用すべきではありません。 +6. この時点で、サブグラフはSubgraph Studio上にデプロイされましたが、分散ネットワークにはまだ公開されていません。サブグラフが意図したとおりに動作しているか、右上の一時的なクエリURLを用いてテストすることができます。この名前が示すように、これは一時的なURLであり、実運用に使用すべきではありません。 - アップデートは、既存のサブグラフの別のバージョンをチェーン上に公開するだけです。 - これにはコストがかかるため、公開する前に「開発クエリURL」を使用してSubgraph Studioでサブグラフをデプロイおよびテストすることを強くお勧めします。 [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b) でトランザクションの例をご覧ください。価格はおおよそ100 gweiで0.0425 ETH程度です。 - サブグラフを更新する必要があるたびに、更新料が請求されます。これにはコストがかかるため、メインネットにデプロイする前にサブグラフをGoerliでデプロイしてテストすることを強くお勧めします。場合によっては、そのサブグラフにシグナルがない場合でも、一部のGRTが必要になることもあります。サブグラフバージョンにシグナル/キュレーションがある場合(自動移行を使用)、料金は分割されます。 -7. 「Publish」ボタンを押して、サブグラフをThe Graphの分散型ネットワーク上に公開する。 +7. 「Publish」ボタンを押して、サブグラフをThe Graphの分散型ネットワーク上に公開する。 インデクサーによるインデックス作成が行われるよう、サブグラフをGRTでキュレーションすることをお勧めします。ガスコストを節約するためには、サブグラフをネットワークに公開する同じトランザクションでキュレーションを行うことができます。高品質なサービスを提供するために、少なくとも10,000 GRTでサブグラフをキュレーションすることをおすすめします。 以上です!公開が完了すると、[The Graph Explorer](https://thegraph.com/explorer) を介して分散型ネットワーク上でサブグラフをライブで表示することができます。 -Feel free to leverage the [#Curators channel](https://discord.gg/s5HfGMXmbW) on Discord to let Curators know that your subgraph is ready to be signaled. It would also be helpful if you share your expected query volume with them. Therefore, they can estimate how much GRT they should signal on your subgraph. +Discord の [#Curators channel](https://discord.gg/s5HfGMXmbW) を自由に活用して、サブグラフが通知される準備ができていることをキュレーターに知らせてください。 また、予想されるクエリ量を共有していただけると助かります。 したがって、サブグラフ上でどの程度の GRT を通知するかを推定できます。 ### APIキーの作成 @@ -107,8 +107,8 @@ Subgraph StudioでAPIキーを生成するには、[here](https://thegraph.com/s APIは2つの方法で利用を制限し、セキュリティを確保することが推奨されます。 -1. オーソライズド・サブグラフ -2. オーソライズド・ドメイン +1. オーソライズド・サブグラフ +2. オーソライズド・ドメイン APIキーを保護するには、[here](https://thegraph.com/studio/apikeys/test/)をクリックしてください。 @@ -146,19 +146,19 @@ APIキーを保護するには、[here](https://thegraph.com/studio/apikeys/test ネットワーク上の既存のサブグラフを更新したい場合、Graph CLIを使用して新しいバージョンのサブグラフをSubgraph Studioにデプロイすることで行えます。 -1. 現在のサブグラフに変更を加える。Goerliに公開してSubgraph Studio上で小さな修正をテストするのが良いアイデアでしょう。 -2. 以下のようにデプロイし、コマンドに新しいバージョンを指定します(例:v0.0.1、v0.0.2 など)。 +1. 現在のサブグラフに変更を加える。Goerliに公開してSubgraph Studio上で小さな修正をテストするのが良いアイデアでしょう。 +2. 以下のようにデプロイし、コマンドに新しいバージョンを指定します(例:v0.0.1、v0.0.2 など)。 ```sh graph deploy --studio ``` -3. Subgraph Studio のプレイグラウンドでクエリを実行し、新バージョンをテストします。 -4. 新しいバージョンを The Graph Network で公開します。これにはガスが必要であることを忘れてはなりません(上のセクションで説明)。 +3. Subgraph Studio のプレイグラウンドでクエリを実行し、新バージョンをテストします。 +4. 新しいバージョンを The Graph Network で公開します。これにはガスが必要であることを忘れてはなりません(上のセクションで説明)。 ### 所有者更新料金: 詳細 -> 注: Arbitrum のキュレーションでは結合曲線は使用されません。 Arbitrum について詳しくは、[here](/arbitrum/arbitrum-faq/) をご覧ください。 +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). アップデートには、GRTがサブグラフの古いバージョンから新しいバージョンに移行される必要があります。つまり、毎回のアップデートごとに新しいボンディングカーブが作成されます(ボンディングカーブに関する詳細は[here](/network/curating#bonding-curve-101))。 @@ -174,7 +174,7 @@ _このメカニズムは現在ネットワーク上で稼働していますが ### サブグラフの安定したバージョンの維持 -If you're making a lot of changes to your subgraph, it is not a good idea to continually update it and front the update costs. Maintaining a stable and consistent version of your subgraph is critical, not only from the cost perspective but also so that Indexers can feel confident in their syncing times. Indexers should be flagged when you plan for an update so that Indexer syncing times do not get impacted. Feel free to leverage the [#Indexers channel](https://discord.gg/JexvtHa7dq) on Discord to let Indexers know when you're versioning your subgraphs. +サブグラフに大量の変更を加えている場合、継続的に更新し、更新コストを負担することは避けるべきです。サブグラフの安定性と一貫性を維持することは非常に重要です。コストの観点だけでなく、インデクサーが同期時間に自信を持てるようにするためです。更新を計画している場合、インデクサーの同期時間に影響が及ばないように、その計画を通知すべきです。サブグラフのバージョンを更新する際に、Discord[#Indexers channel](https://discord.gg/JexvtHa7dq)を活用して、インデクサーに知らせることができます。 サブグラフは、外部開発者が利用しているオープン API です。オープン API は、外部開発者のアプリケーションを破壊しないように、厳格な標準に従う必要があります。グラフ ネットワークでは、サブグラフ開発者は、インデクサーと、そのサブグラフを使用している他の開発者**だけでなく**、新しいサブグラフを同期するのにかかる時間を考慮する必要があります。 @@ -186,12 +186,12 @@ If you're making a lot of changes to your subgraph, it is not a good idea to con ## グラフネットワークにサブグラフを展開する際のベストプラクティス -1. サブグラフの開発に ENS 名を活用する +1. サブグラフの開発に ENS 名を活用する - ENS をセットアップする [here](https://app.ens.domains/) - ENS 名を[here](https://thegraph.com/explorer/settings?view=display-name) の設定に追加します。 -2. プロフィールが充実しているほど、サブグラフがインデックスやキュレーションされる可能性が高くなります。 +2. プロフィールが充実しているほど、サブグラフがインデックスやキュレーションされる可能性が高くなります。 ## The Graph Network のサブグラフを廃止する From 68c7aaab19aa7a3495aaaaf2582a83523a723a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:24 -0400 Subject: [PATCH 489/924] New translations upgrading-a-subgraph.mdx (Korean) --- .../ko/cookbook/upgrading-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/ko/cookbook/upgrading-a-subgraph.mdx b/website/pages/ko/cookbook/upgrading-a-subgraph.mdx index bd3b739199d6..ff1ab368c0fa 100644 --- a/website/pages/ko/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/ko/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: ```sh graph auth --studio ``` -3. Generate files and build the subgraph: +3. Generate files and build the subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ At the end of each week, an invoice will be generated based on the query fees th It is recommended that you secure the API by limiting its usage in two ways: -1. Authorized Subgraphs -2. Authorized Domain +1. Authorized Subgraphs +2. Authorized Domain You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## Best Practices for Deploying a Subgraph to The Graph Network -1. Leveraging an ENS name for Subgraph Development: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. ## Deprecating a Subgraph on The Graph Network From 7b274367e31cb915f5fa26f27aad6c20d26c520b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:25 -0400 Subject: [PATCH 490/924] New translations upgrading-a-subgraph.mdx (Dutch) --- .../nl/cookbook/upgrading-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/nl/cookbook/upgrading-a-subgraph.mdx b/website/pages/nl/cookbook/upgrading-a-subgraph.mdx index bd3b739199d6..ff1ab368c0fa 100644 --- a/website/pages/nl/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/nl/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: ```sh graph auth --studio ``` -3. Generate files and build the subgraph: +3. Generate files and build the subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ At the end of each week, an invoice will be generated based on the query fees th It is recommended that you secure the API by limiting its usage in two ways: -1. Authorized Subgraphs -2. Authorized Domain +1. Authorized Subgraphs +2. Authorized Domain You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## Best Practices for Deploying a Subgraph to The Graph Network -1. Leveraging an ENS name for Subgraph Development: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. ## Deprecating a Subgraph on The Graph Network From d0c2e7d21f2a9695e8a00c983311ff3a5b279452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:26 -0400 Subject: [PATCH 491/924] New translations upgrading-a-subgraph.mdx (Polish) --- .../pl/cookbook/upgrading-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/pl/cookbook/upgrading-a-subgraph.mdx b/website/pages/pl/cookbook/upgrading-a-subgraph.mdx index bd3b739199d6..ff1ab368c0fa 100644 --- a/website/pages/pl/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/pl/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: ```sh graph auth --studio ``` -3. Generate files and build the subgraph: +3. Generate files and build the subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ At the end of each week, an invoice will be generated based on the query fees th It is recommended that you secure the API by limiting its usage in two ways: -1. Authorized Subgraphs -2. Authorized Domain +1. Authorized Subgraphs +2. Authorized Domain You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## Best Practices for Deploying a Subgraph to The Graph Network -1. Leveraging an ENS name for Subgraph Development: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. ## Deprecating a Subgraph on The Graph Network From 031e10a0058c91fe2e2f281f8f76100258002a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:27 -0400 Subject: [PATCH 492/924] New translations upgrading-a-subgraph.mdx (Portuguese) --- .../pt/cookbook/upgrading-a-subgraph.mdx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/pt/cookbook/upgrading-a-subgraph.mdx b/website/pages/pt/cookbook/upgrading-a-subgraph.mdx index ecaf3ea9a005..f0801bcb3e29 100644 --- a/website/pages/pt/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/pt/cookbook/upgrading-a-subgraph.mdx @@ -11,7 +11,7 @@ O processo é rápido, e os seus subgraphs só tem a ganhar com a confiabilidade ### Pré-requisitos - Já lançaste um subgraph no serviço hospedado. -- The subgraph is indexing a chain available on The Graph Network. +- O subgraph está a indexar uma chain disponível na The Graph Network. - Tens uma carteira com ETH para publicar o seu subgraph on-chain. - Tens cerca de 10 mil GRT para curar o seu subgraph para que Indexadores possam começar a indexá-lo. @@ -19,7 +19,7 @@ O processo é rápido, e os seus subgraphs só tem a ganhar com a confiabilidade > Encontre comandos específicos para o seu subgraph no [Subgraph Studio](https://thegraph.com/studio/). -1. Instale a versão mais recente do graph-cli: +1. Instale a versão mais recente do graph-cli: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Verifique se o seu `apiVersion` no subgraph.yaml está na versão 0.0.5 ou maior. -2. No repositório principal do subgraph, autentique o subgraph para lançar e construir no Studio: +2. No repositório principal do subgraph, autentique o subgraph para lançar e construir no Studio: ```sh graph auth --studio ``` -3. Gere arquivos e construa o subgraph: +3. Gere arquivos e construa o subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build Se o seu subgraph tiver erros de build, refira ao [Guia de Migração em AssemblyScript](/release-notes/assemblyscript-migration-guide/). -4. Entre no [Subgraph Studio](https://thegraph.com/studio/) com a sua carteira e lance o subgraph. O seu `` está no UI do Studio, baseado no nome do seu subgraph. +4. Entre no [Subgraph Studio](https://thegraph.com/studio/) com a sua carteira e lance o subgraph. O seu `` está no UI do Studio, baseado no nome do seu subgraph. ```sh graph deploy --studio ``` -5. Teste queries no playground do Studio. Aqui estão alguns exemplos para o [Sushi - Subraph de Trocas na Mainnet](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Teste queries no playground do Studio. Aqui estão alguns exemplos para o [Sushi - Subraph de Trocas na Mainnet](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. Agora, seu subgraph já está lançado no Subgraph Studio, mas ainda não foi publicado na rede descentralizada. Agora é possível testar o subgraph para garantir que ele funciona como deve, com o uso do URL temporário de consulta como visto no topo da coluna acima. Como este nome já sugere, este é um URL temporário e não deve ser usado na produção. +6. Agora, seu subgraph já está lançado no Subgraph Studio, mas ainda não foi publicado na rede descentralizada. Agora é possível testar o subgraph para garantir que ele funciona como deve, com o uso do URL temporário de consulta como visto no topo da coluna acima. Como este nome já sugere, este é um URL temporário e não deve ser usado na produção. - Atualizar é apenas editar outra versão on-chain do seu subgraph existente. - Como isto incorre um custo, recomendamos muito enviar e testar o seu subgraph no Subgraph Studio, com o uso da "URL de Query de Desenvolvimento" antes da edição. Veja um exemplo de transação [aqui](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Os preços giram em torno de 0.0425 ETH em 100 gwei. - Sempre que precisar atualizar o seu subgraph, será cobrada uma taxa de atualização. Como isto incorre em um custo, é altamente recomendado lançar e testar seu subgraph no Goerli antes de lançar na mainnet. Isto pode, em alguns casos, exigir um pouco de GRT caso não haja sinal naquele subgraph. Se houver um sinal/curadoria naquela versão do subgraph (usando a automigração), as taxas serão divididas. -7. Publique o subgraph na rede descentralizada do The Graph com um clique no botão "Publish" (Publicar). +7. Publique o subgraph na rede descentralizada do The Graph com um clique no botão "Publish" (Publicar). O seu subgraph deve ser curado com GRT para garantir que ele seja indexado por Indexadores. Para poupar custos em gas, dá para curar o seu subgraph na mesma transação em que o editou à rede. É recomendado curar o seu subgraph com pelo menos 10.000 GRT para mais qualidade de serviço. @@ -107,8 +107,8 @@ Ao fim de toda semana, um recibo será gerado baseado nas taxas de query acumula É ideal proteger a API com imposições de limite ao seu uso, em duas maneiras: -1. Subgraphs Autorizados -2. Domínio Autorizado +1. Subgraphs Autorizados +2. Domínio Autorizado A sua chave API pode ser assegurada aqui: [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ Veja mais informações sobre a rede, e como lidar com reorganizações, no arti Caso queira atualizar um subgraph já existente na rede, isto é possível ao lançar uma nova versão do seu subgraph ao Subgraph Studio, através do Graph CLI. -1. Faça alterações no seu subgraph atual. É bom testar pequenos consertos no Subgraph Studio com publicações no Goerli. -2. Lance o seguinte e especifique a nova versão no comando (por ex. v0.0.1, v0.0.2, etc.): +1. Faça alterações no seu subgraph atual. É bom testar pequenos consertos no Subgraph Studio com publicações no Goerli. +2. Lance o seguinte e especifique a nova versão no comando (por ex. v0.0.1, v0.0.2, etc.): ```sh graph deploy --studio ``` -3. Teste a nova versão no Subgraph Studio com queries no playground -4. Publique a nova versão na rede do The Graph. Não esqueça que isto exige gas (como descrito acima). +3. Teste a nova versão no Subgraph Studio com queries no playground +4. Publique a nova versão na rede do The Graph. Não esqueça que isto exige gas (como descrito acima). ### Sobre as Taxas de Upgrade para o Dono -> Nota: A curadoria no Arbitrum não usa bonding curves. Aprenda mais sobre o Arbitrum [aqui](/arbitrum/arbitrum-faq/). +> Nota: A curadoria no Arbitrum tem uma bonding curve fixa. Aprenda mais sobre o Arbitrum [aqui](/arbitrum/arbitrum-faq/). Upgrades exigem GRT para migrar da versão antiga do subgraph à versão nova. Portanto, a cada atualização, será criada uma bonding curve (curva de união; mais sobre bonding curves aqui: [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Marque a opção **Update Subgraph Details in Explorer\* (Atualizar Detalhes do ## As Melhores Práticas para Lançar um Subgraph à Graph Network -1. Use um nome ENS para Desenvolvimento de Subgraph: +1. Use um nome ENS para Desenvolvimento de Subgraph: - Prepare o seu ENS [aqui](https://app.ens.domains/) - Adicione o seu nome ENS às suas configurações [aqui](https://thegraph.com/explorer/settings?view=display-name). -2. Quanto mais preenchidos os seus perfis, maiores serão as oportunidades de indexar e curar os seus subgraphs. +2. Quanto mais preenchidos os seus perfis, maiores serão as oportunidades de indexar e curar os seus subgraphs. ## Como Depreciar um Subgraph na The Graph Network From 8b7f82c182caac24ba1ca1f8895b300e2035a282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:28 -0400 Subject: [PATCH 493/924] New translations upgrading-a-subgraph.mdx (Russian) --- .../ru/cookbook/upgrading-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/ru/cookbook/upgrading-a-subgraph.mdx b/website/pages/ru/cookbook/upgrading-a-subgraph.mdx index 71d71a83b15c..06db59c4239e 100644 --- a/website/pages/ru/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/ru/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Установите последнюю версию graph-cli: +1. Установите последнюю версию graph-cli: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Внутри основного репозитория проекта в подграфе выполните аутентификацию подграфа для развертывания и сборки в studio: +2. Внутри основного репозитория проекта в подграфе выполните аутентификацию подграфа для развертывания и сборки в studio: ```sh graph auth --studio ``` -3. Сгенерируйте файлы и создайте подграф: +3. Сгенерируйте файлы и создайте подграф: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. На данный момент ваш подграф теперь развернут в Subgraph Studio, но еще не опубликован в децентрализованной сети. Теперь вы можете протестировать подграф, чтобы убедиться, что он работает должным образом, используя временный URL-адрес запроса, как показано в верхней части правой колонки выше. Как уже следует из этого названия, это временный URL-адрес, и его не следует использовать в рабочей среде. +6. На данный момент ваш подграф теперь развернут в Subgraph Studio, но еще не опубликован в децентрализованной сети. Теперь вы можете протестировать подграф, чтобы убедиться, что он работает должным образом, используя временный URL-адрес запроса, как показано в верхней части правой колонки выше. Как уже следует из этого названия, это временный URL-адрес, и его не следует использовать в рабочей среде. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Опубликуйте подграф в децентрализованной сети Graph, нажав кнопку "Publish". +7. Опубликуйте подграф в децентрализованной сети Graph, нажав кнопку "Publish". You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ You can generate an API key in Subgraph Studio [here](https://thegraph.com/studi Рекомендуется обеспечить безопасность доступа к API, ограничивая его использование двумя способами: -1. Авторизованные подграфы -2. Авторизованный домен +1. Авторизованные подграфы +2. Авторизованный домен You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Внесите изменения в свой текущий подграф. Хорошая идея - протестировать небольшие исправления в Subgraph Studio, опубликовав их в сети Goerli. -2. Задеплойте следующее и укажите новую версию в команде (например, v0.0.1, v0.0.2 и т. д.): +1. Внесите изменения в свой текущий подграф. Хорошая идея - протестировать небольшие исправления в Subgraph Studio, опубликовав их в сети Goerli. +2. Задеплойте следующее и укажите новую версию в команде (например, v0.0.1, v0.0.2 и т. д.): ```sh graph deploy --studio ``` -3. Протестируйте новую версию в Subgraph Studio, выполнив запрос на тестовой площадке -4. Опубликуйте новую версию в сети Graph. Помните, что для этого требуется газ (как описано в разделе выше). +3. Протестируйте новую версию в Subgraph Studio, выполнив запрос на тестовой площадке +4. Опубликуйте новую версию в сети Graph. Помните, что для этого требуется газ (как описано в разделе выше). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## Рекомендации по развертыванию подграфа в сети Graph -1. Использование имени ENS для разработки подграфа: +1. Использование имени ENS для разработки подграфа: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. Чем более заполнены ваши профили, тем больше шансов, что ваши подграфы будут проиндексированы и обработаны куратором. +2. Чем более заполнены ваши профили, тем больше шансов, что ваши подграфы будут проиндексированы и обработаны куратором. ## Удаление подграфа в сети Graph From 6d46677580ebc1f2bec9d41e3f1ae93b72905316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:29 -0400 Subject: [PATCH 494/924] New translations upgrading-a-subgraph.mdx (Swedish) --- .../sv/cookbook/upgrading-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/sv/cookbook/upgrading-a-subgraph.mdx b/website/pages/sv/cookbook/upgrading-a-subgraph.mdx index b70d353ae1c9..50a672295994 100644 --- a/website/pages/sv/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/sv/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ Processen att uppgradera är snabb och dina subgrafer kommer för alltid att dra > Du kan hitta specifika kommandon för din subgraf i [Subgraf Studio](https://thegraph.com/studio/). -1. Få den senaste versionen av graph-cli installerad: +1. Få den senaste versionen av graph-cli installerad: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Se till att din `apiVersion` i subgraph.yaml är `0.0.5` eller högre. -2. Inuti subgrafen: s huvud projektförråd, autentisera subgrafen för att distribuera och bygga på studion: +2. Inuti subgrafen: s huvud projektförråd, autentisera subgrafen för att distribuera och bygga på studion: ```sh graph auth --studio ``` -3. Generera filer och bygg subgrafen: +3. Generera filer och bygg subgrafen: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build Om din subgraf har byggfel, se [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Logga in på [Subgraf Studio](https://thegraph.com/studio/) med din plånbok och distribuera subgrafen. Du kan hitta din `` i Studio UI, som baseras på namnet på din subgraf. +4. Logga in på [Subgraf Studio](https://thegraph.com/studio/) med din plånbok och distribuera subgrafen. Du kan hitta din `` i Studio UI, som baseras på namnet på din subgraf. ```sh graph deploy --studio ``` -5. Testa frågor på Studions lekplats. Här är några exempel för [Sushi - Mainnet Exchange Subgraf](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Testa frågor på Studions lekplats. Här är några exempel för [Sushi - Mainnet Exchange Subgraf](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. Vid det här laget är din subgraf nu distribuerad på Subgraf Studio, men ännu inte publicerad i det decentraliserade nätverket. Du kan nu testa subgrafen för att se till att den fungerar som avsett med hjälp av den tillfälliga sökadressen som visas överst i den högra kolumnen ovan. Som detta namn redan antyder är detta en tillfällig URL och bör inte användas i produktionen. +6. Vid det här laget är din subgraf nu distribuerad på Subgraf Studio, men ännu inte publicerad i det decentraliserade nätverket. Du kan nu testa subgrafen för att se till att den fungerar som avsett med hjälp av den tillfälliga sökadressen som visas överst i den högra kolumnen ovan. Som detta namn redan antyder är detta en tillfällig URL och bör inte användas i produktionen. - Uppdatering är bara att publicera en annan version av din befintliga subgraf i kedjan. - Eftersom detta medför en kostnad rekommenderas det starkt att du distribuerar och testar din subgraf i Subgraph Studio, med hjälp av "Utvecklingsfrågans URL" innan du publicerar. Se ett exempel på transaktion[here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Priserna är ungefär runt 0,0425 ETH vid 100 gwei. - Varje gång du behöver uppdatera din subgraf kommer du att debiteras en uppdateringsavgift. Eftersom detta medför en kostnad, rekommenderas det starkt att distribuera och testa din subgraf på Goerli innan du distribuerar till mainnet. Det kan i vissa fall också kräva viss GRT om det inte finns någon signal på den subgrafen. Om det finns signal/kuration på den subgrafversionen (med automigrera), kommer skatterna att delas upp. -7. Publicera subgrafen på The Graph: s decentraliserade nätverk genom att trycka på knappen "Publicera". +7. Publicera subgrafen på The Graph: s decentraliserade nätverk genom att trycka på knappen "Publicera". Du bör kurera din subgraf med GRT för att säkerställa att den indexeras av indexerare. För att spara på gaskostnaderna kan du kurera din subgraf i samma transaktion som du publicerar den i nätverket. Det rekommenderas att kurera din subgraf med minst 10 000 GRT för hög servicekvalitet. @@ -107,8 +107,8 @@ I slutet av varje vecka kommer en faktura att genereras baserat på de frågeavg Det rekommenderas att du säkrar API: et genom att begränsa dess användning på två sätt: -1. Auktoriserade subgrafer -2. Auktoriserad Domän +1. Auktoriserade subgrafer +2. Auktoriserad Domän Du kan säkra din API-nyckel [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ Mer information om nätverkets karaktär och hur man hanterar omorganisationer b Om du vill uppdatera en befintlig subgraf på nätverket kan du göra detta genom att distribuera en ny version av din subgraf till Subgraf Studio med hjälp av Graph CLI. -1. Gör ändringar i din nuvarande subgraf. En bra idé är att testa små fixar på Subgraf Studio genom att publicera till Goerli. -2. Distribuera följande och ange den nya versionen i kommandot (t. ex. v0.0.1, v0.0.2, etc): +1. Gör ändringar i din nuvarande subgraf. En bra idé är att testa små fixar på Subgraf Studio genom att publicera till Goerli. +2. Distribuera följande och ange den nya versionen i kommandot (t. ex. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. Testa den nya versionen i Subgraf Studio genom att fråga på lekplatsen -4. Publicera den nya versionen på The Graph Nätverk. Kom ihåg att detta kräver gas (som beskrivs i avsnittet ovan). +3. Testa den nya versionen i Subgraf Studio genom att fråga på lekplatsen +4. Publicera den nya versionen på The Graph Nätverk. Kom ihåg att detta kräver gas (som beskrivs i avsnittet ovan). ### Ägaruppdateringsavgift: Djupdykning -> Obs: Curation på Arbitrum använder inte bindningskurvor. Läs mer om Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). En uppdatering kräver att GRT migreras från den gamla versionen av subgrafen till den nya versionen. Detta innebär att för varje uppdatering kommer en ny bindningskurva att skapas (mer om bindningskurvor [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Se till att **Uppdatera subgraf detaljer i Utforskaren** är markerad och klicka ## Bästa metoder för att distribuera en subgraf till Graph Nätverk -1. Utnyttja ett ENS namn för subgraf utveckling: +1. Utnyttja ett ENS namn för subgraf utveckling: - Konfigurera din ENS [here](https://app.ens.domains/) - Lägg till ditt ENS namn i dina inställningar [here](https://thegraph.com/explorer/settings?view=display-name). -2. Ju mer kompletta dina profiler är, desto bättre är chansen att dina subgrafer indexeras och kureras. +2. Ju mer kompletta dina profiler är, desto bättre är chansen att dina subgrafer indexeras och kureras. ## Avskrivning av en subgraf i The Graph Nätverk From 8d36c42c946011873214bbdb648bb17624374174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:30 -0400 Subject: [PATCH 495/924] New translations upgrading-a-subgraph.mdx (Turkish) --- .../tr/cookbook/upgrading-a-subgraph.mdx | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/website/pages/tr/cookbook/upgrading-a-subgraph.mdx b/website/pages/tr/cookbook/upgrading-a-subgraph.mdx index 2782090d89c5..3696ac878671 100644 --- a/website/pages/tr/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/tr/cookbook/upgrading-a-subgraph.mdx @@ -11,7 +11,7 @@ Yükseltme işlemi hızlıdır ve subgraphlar'ınız yalnızca Graph Ağı'nda e ### Ön Koşullar - Barındırılan hizmet üzerinde zaten bir subgraph dağıttınız. -- The subgraph is indexing a chain available on The Graph Network. +- Subgraph, Graph Network'te bulunan bir zinciri indeksler. - Subgraph'ınızı zincir üzerinde yayınlamak için ETH içeren bir cüzdanınız var. - İndeksleyicilerin indekslemeye başlayabilmesi için subgraph'ınızı düzenlemek üzere ~10.000 GRT'ye sahipsiniz. @@ -19,7 +19,7 @@ Yükseltme işlemi hızlıdır ve subgraphlar'ınız yalnızca Graph Ağı'nda e > Subgraph'ınız için özel komutları [Subgraph Stüdyo'da](https://thegraph.com/studio/) bulabilirsiniz. -1. Graph-cli'nin en son sürümünü yükleyin: +1. Graph-cli'nin en son sürümünü yükleyin: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli subgraph.yaml dosyasındaki `apiVersion` sürümünüzün `0.0.5` veya daha yüksek olduğundan emin olun. -2. Subgraph'ın ana proje deposunun içinde, stüdyoda dağıtmak ve derlemek için subgraph'ın doğrulamasını yapın: +2. Subgraph'ın ana proje deposunun içinde, stüdyoda dağıtmak ve derlemek için subgraph'ın doğrulamasını yapın: ```sh graph auth --studio ``` -3. Dosyaları ve subgraph'ı oluşturun: +3. Dosyaları ve subgraph'ı oluşturun: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build Subgraph'ınızda oluşturma hataları varsa, [AssemblyScript Geçiş Kılavuzu](/release-notes/assemblyscript-migration-guide/)'na bakın. -4. Cüzdanınızla [Subgraph Stüdyo] \(https://thegraph.com/studio/) adresinde oturum açın ve subgraph'ı dağıtın. Subgraph'ınızın adını temel alan Stüdyo kullanıcı arayüzünde `` öğenizi bulabilirsiniz. +4. Cüzdanınızla [Subgraph Stüdyo] (https://thegraph.com/studio/) adresinde oturum açın ve subgraph'ı dağıtın. Subgraph'ınızın adını temel alan Stüdyo kullanıcı arayüzünde `` öğenizi bulabilirsiniz. ```sh graph deploy --studio ``` -5. Stüdyo'nun test alanında sorguları test edin. İşte [Sushi - Mainnet Exchange Subgraph'ı](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground) için bazı örnekler: +5. Stüdyo'nun test alanında sorguları test edin. İşte [Sushi - Mainnet Exchange Subgraph'ı](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground) için bazı örnekler: ```sh { @@ -68,19 +68,19 @@ graph deploy --studio } ``` -6. Bu noktada, subgraph'ınız artık Subgraph Stüdyo'da dağıtılmıştır, fakat henüz merkeziyetsiz ağda yayınlanmamıştır. Artık yukarıdaki sağ sütunun üst kısmında görülen geçici sorgu URL'sini kullanarak amaçlandığı gibi çalıştığından emin olmak için subgraph'ı test edebilirsiniz. Bu addan da anlaşılacağı gibi, bu geçici bir URL'dir ve üretimde kullanılmamalıdır. +6. Bu noktada, subgraph'ınız artık Subgraph Stüdyo'da dağıtılmıştır, fakat henüz merkeziyetsiz ağda yayınlanmamıştır. Artık yukarıdaki sağ sütunun üst kısmında görülen geçici sorgu URL'sini kullanarak amaçlandığı gibi çalıştığından emin olmak için subgraph'ı test edebilirsiniz. Bu addan da anlaşılacağı gibi, bu geçici bir URL'dir ve üretimde kullanılmamalıdır. - Güncelleme sadece mevcut subgraph'ınızın başka bir versiyonunu zincir üzerinde yayınlamaktır. - Bunun bir maliyeti olduğundan, yayınlamadan önce "Geliştirme Sorgusu URL'sini" kullanarak Subgraph Stüdyo'da subgraph'ınızı dağıtmanız ve test etmeniz şiddetle tavsiye edilir. Örnek bir işlemi görün [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Fiyatlar kabaca 100 gwei'de 0,0425 ETH civarındadır. - Subgraph'ınızı güncellemeniz gerektiğinde, sizden bir güncelleme ücreti alınacaktır. Bu bir maliyet oluşturduğundan, ana ağa dağıtmadan önce subgraph'ınızı Göerli'de dağıtmanız ve test etmeniz şiddetle tavsiye edilir. Bazı durumlarda, o subgraph'ta sinyal yoksa bir miktar GRT de gerektirebilir. Bu subgraph sürümünde sinyal/kürasyon olması durumunda (otomatik geçiş kullanılarak), vergiler bölünecektir. -7. "Yayınla" düğmesine basarak subgraph'ı Graph'ın merkeziyetsiz ağında yayınlayın. +7. "Yayınla" düğmesine basarak subgraph'ı Graph'ın merkeziyetsiz ağında yayınlayın. İndeksleyiciler tarafından indekslendiğinden emin olmak için subgraph'ınızı GRT ile kürate etmelisiniz. Gaz maliyetlerinden tasarruf etmek için, subgraph'ınızı ağda yayınladığınız işlemle aynı işlemde kürate edebilirsiniz. Yüksek hizmet kalitesi için subgraph'ınızı en az 10.000 GRT ile kürate etmeniz önerilir. -İşte bu kadar! Yayınlamayı tamamladıktan sonra, subgraph'ınızı [Graph Gezgini] \(https://thegraph.com/explorer) aracılığıyla merkeziyetsiz ağ üzerinde canlı olarak görüntüleyebileceksiniz. +İşte bu kadar! Yayınlamayı tamamladıktan sonra, subgraph'ınızı [Graph Gezgini] (https://thegraph.com/explorer) aracılığıyla merkeziyetsiz ağ üzerinde canlı olarak görüntüleyebileceksiniz. -Küratörlere subgraph'ınızın sinyal vermeye hazır olduğunu bildirmek için Discord'daki [#Curators kanalından] \(https://discord.gg/s5HfGMXmbW) yararlanabilirsiniz. Beklenen sorgu hacminizi onlarla paylaşmanız da faydalı olacaktır. Böylece, subgraph'ınızda ne kadar GRT sinyali vermeleri gerektiğini kestirebilirler. +Küratörlere subgraph'ınızın sinyal vermeye hazır olduğunu bildirmek için Discord'daki [#Curators kanalından] (https://discord.gg/s5HfGMXmbW) yararlanabilirsiniz. Beklenen sorgu hacminizi onlarla paylaşmanız da faydalı olacaktır. Böylece, subgraph'ınızda ne kadar GRT sinyali vermeleri gerektiğini kestirebilirler. ### Bir API anahtarı oluşturun @@ -101,14 +101,14 @@ Her haftanın sonunda, bu süre zarfında gerçekleşen sorgu ücretlerine dayal ![Billing pane](/img/New-Billing-Pane.png) -> Not: GRT'nin fatura bakiyenize eklenmesine ilişkin tüm talimatlar için [resmi faturalandırma sayfasına] \(../billing.mdx) bakın. +> Not: GRT'nin fatura bakiyenize eklenmesine ilişkin tüm talimatlar için [resmi faturalandırma sayfasına] (../billing.mdx) bakın. ### API anahtarınızın güvenliğini sağlama API'nin kullanımını iki şekilde sınırlandırarak güvenliğini sağlamanız önerilir: -1. Yetkilendirilmiş Subgraphlar -2. Yetkilendirilmiş Domain +1. Yetkilendirilmiş Subgraphlar +2. Yetkilendirilmiş Domain API anahtarınızı güvence altına alabilirsiniz [here](https://thegraph.com/studio/apikeys/test/). @@ -140,25 +140,25 @@ Tebrikler! Artık merkeziyetsizliğin öncülerinden birisiniz! } ``` -Ağın doğası ve yeniden düzenlemelerin nasıl ele alınacağı hakkında daha fazla bilgi [Dağıtılmış Sistemler] \(/querying/distributed-systems/) dokümantasyon makalesinde açıklanmaktadır. +Ağın doğası ve yeniden düzenlemelerin nasıl ele alınacağı hakkında daha fazla bilgi [Dağıtılmış Sistemler] (/querying/distributed-systems/) dokümantasyon makalesinde açıklanmaktadır. ## Ağ Üzerinde Bir Subgraph'ın Güncellenmesi Ağdaki mevcut bir subgraph'ı güncellemek isterseniz, bunu Graph CLI aracılığıyla subgraph'ınızın yeni bir sürümünü Subgraph Stüdyo'ya dağıtarak yapabilirsiniz. -1. Mevcut subgraph'ınızda değişiklikler yapın. Küçük düzeltmeleri Göerli'de yayınlayarak Subgraph Stüdyo'da test etmek iyi bir fikir olabilir. -2. Aşağıdakileri dağıtın ve komutta yeni sürümü belirtin (örn. v0.0.1, v0.0.2, vb.): +1. Mevcut subgraph'ınızda değişiklikler yapın. Küçük düzeltmeleri Göerli'de yayınlayarak Subgraph Stüdyo'da test etmek iyi bir fikir olabilir. +2. Aşağıdakileri dağıtın ve komutta yeni sürümü belirtin (örn. v0.0.1, v0.0.2, vb.): ```sh graph deploy --studio ``` -3. Test alanında(playground) sorgulama yaparak Subgraph Stüdyo'da yeni sürümü test edin -4. Yeni sürümü Graph Ağı'nda yayınlayın. Bunun için gas gerektiğini unutmayınız (yukarıdaki bölümde açıklandığı gibi). +3. Test alanında(playground) sorgulama yaparak Subgraph Stüdyo'da yeni sürümü test edin +4. Yeni sürümü Graph Ağı'nda yayınlayın. Bunun için gas gerektiğini unutmayınız (yukarıdaki bölümde açıklandığı gibi). ### Sahip Güncelleme Ücreti: Derinlemesine İnceleme -> Not: Arbitrum'da küratörlük bağlanma eğrileri kullanmaz. Arbitrum hakkında daha fazla bilgi edinin [here](/arbitrum/arbitrum-faq/). +> Not: Arbitrum'daki kürasyonun düz bir bağlanma eğrisi vardır. Arbitrum [buradan](/arbitrum/arbitrum-faq/) hakkında daha fazla bilgi edinin. Bir güncelleme GRT'nin subgraph eski versiyonundan yeni versiyonuna taşınmasını gerektirmektedir. Bu, her güncelleme için yeni bir bağlanma eğrisinin oluşturulacağı anlamına gelir (bağlanma eğrileri hakkında daha fazla bilgi [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Yeni bir sürüm yayınlamak zorunda kalmadan subgraphlar'ınızın üst verisin ## Bir Subgraph'ı Graph Ağına Dağıtmak için En İyi Uygulamalar -1. Subgraph Geliştirme için bir ENS adından yararlanma: +1. Subgraph Geliştirme için bir ENS adından yararlanma: - ENS'nizi oluşturun [here](https://app.ens.domains/) - ENS adınızı ayarlarınıza ekleyin [here](https://thegraph.com/explorer/settings?view=display-name). -2. Profilleriniz ne kadar dolu olursa, subgraphlar'ınızın indekslenme ve kürate edilme şansı o kadar artar. +2. Profilleriniz ne kadar dolu olursa, subgraphlar'ınızın indekslenme ve kürate edilme şansı o kadar artar. ## Graph Ağında Bir Subgraph'ın Kullanımdan Kaldırılması @@ -220,6 +220,6 @@ Eğer hala kafanız karışıksa, endişelenmeyin! Aşağıdaki kaynaklara göz - [Graph Ağı Kontratları](https://github.com/graphprotocol/contracts) -- [Kürasyon Sözleşmesi] \(https://github.com/graphprotocol/contracts/blob/dev/contracts/curation/Curation.sol) - GNS'nin sarmaladığı temel sözleşme +- [Kürasyon Sözleşmesi] (https://github.com/graphprotocol/contracts/blob/dev/contracts/curation/Curation.sol) - GNS'nin sarmaladığı temel sözleşme - Adres - `0x8fe00a685bcb3b2cc296ff6ffeab10aca4ce1538` - [Subgraph Stüdyo dökümantasyonu](/deploying/subgraph-studio) From 1dc01f2ce5b6aa72f066493c4726ac9cd1cf093c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:31 -0400 Subject: [PATCH 496/924] New translations upgrading-a-subgraph.mdx (Ukrainian) --- .../uk/cookbook/upgrading-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/uk/cookbook/upgrading-a-subgraph.mdx b/website/pages/uk/cookbook/upgrading-a-subgraph.mdx index bd3b739199d6..ff1ab368c0fa 100644 --- a/website/pages/uk/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/uk/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: ```sh graph auth --studio ``` -3. Generate files and build the subgraph: +3. Generate files and build the subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ At the end of each week, an invoice will be generated based on the query fees th It is recommended that you secure the API by limiting its usage in two ways: -1. Authorized Subgraphs -2. Authorized Domain +1. Authorized Subgraphs +2. Authorized Domain You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## Best Practices for Deploying a Subgraph to The Graph Network -1. Leveraging an ENS name for Subgraph Development: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. ## Deprecating a Subgraph on The Graph Network From 7d8e9748fa334c2dc2f3396a1781698a1cb80753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:32 -0400 Subject: [PATCH 497/924] New translations upgrading-a-subgraph.mdx (Chinese Simplified) --- .../zh/cookbook/upgrading-a-subgraph.mdx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/zh/cookbook/upgrading-a-subgraph.mdx b/website/pages/zh/cookbook/upgrading-a-subgraph.mdx index 425c485c29c1..bf9f1c938c27 100644 --- a/website/pages/zh/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/zh/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ title: 将现有子图升级到Graph网络 > 你能在此找到子图的命令 [Subgraph Studio](https://thegraph.com/studio/). -1. 获取已安装的最新版本的 graph-cli: +1. 获取已安装的最新版本的 graph-cli: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli 还要确保subgrap.yaml中的apiVersion为0.0.5或更高版本。 -2. 在子图的主项目存储库中,对子图进行身份验证,以便在studio上部署和构建: +2. 在子图的主项目存储库中,对子图进行身份验证,以便在studio上部署和构建: ```sh graph auth --studio ``` -3. 生成文件并构建子图: +3. 生成文件并构建子图: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build 如果您的子图有编译问题,请看 [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. 用您的钱包登录Subgraph Studio并部署子图。您可以在Studio UI中找到您的基于子图名称的\。 +4. 用您的钱包登录Subgraph Studio并部署子图。您可以在Studio UI中找到您的基于子图名称的\。 ```sh graph deploy --studio ``` -5. 在子图工作室内测查询语句. 这里是一些示例 [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. 在子图工作室内测查询语句. 这里是一些示例 [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. 此时,您的子图现在已经部署在Subgraph Studio上,但还没有发布到去中心化网络上。现在,您可以使用上面右列顶部的临时查询URL来测试子图,以确保它正常工作。正如这个名称已经表明的那样,这是一个临时URL,不应该在生产环境中使用。 +6. 此时,您的子图现在已经部署在Subgraph Studio上,但还没有发布到去中心化网络上。现在,您可以使用上面右列顶部的临时查询URL来测试子图,以确保它正常工作。正如这个名称已经表明的那样,这是一个临时URL,不应该在生产环境中使用。 - 升级是在链上发布您已有子图的另一版本. - 因为这样会造成损失, 推荐您在子图工作室里发布和测试子图, 发布前使用"Development Query URL" . 请看示例交易 [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - 任何时候您需要升级您的子图,您将支付升级费用。记住,升级只是发布现有子图的另一个版本。因为这会带来成本,所以强烈建议在将子图部署到主网之前在Goerli进行部署和测试。在某些情况下,如果该子图上没有信号,那么它也需要一些GRT。在子图版本(使用自动迁移) 上有信号/策展的情况下,税收将被切分。 -7. 通过点击“发布”按钮在Graph的去中心化网络上发布子图。 +7. 通过点击“发布”按钮在Graph的去中心化网络上发布子图。 您可以使用GRT管理子图,以确保它被Indexers索引。为了节省gas成本,您可以在将子图发布到网络的同一交易中管理子图。为了获得高质量的服务,建议使用至少10,000个GRT来策展子图。 @@ -107,8 +107,8 @@ Feel free to leverage the [#Curators channel](https://discord.gg/s5HfGMXmbW) on 建议您通过以下两种限制API使用的方式来保护API: -1. 授权子图 -2. 授权域名 +1. 授权子图 +2. 授权域名 您可以点击这里保护您的API密钥。 @@ -130,7 +130,7 @@ Feel free to leverage the [#Curators channel](https://discord.gg/s5HfGMXmbW) on 恭喜! 你现在是去中心化的先驱了! -> Note: Due to the distributed nature of the network it might be the case that different Indexers have indexed up to different blocks. In order to only receive fresh data you can specify the minimum block an Indexer has to have indexed in order to serve your query with the block: `{ number_gte: $minBlock }` field argument as shown in the example below: +> 注意:由于网络的去中心化特性,不同的索引人可能会索引不同的区块。为了只接收新数据,你可以指定索引人必须索引的最小区块,以便为查询提供区块参数:`{ number_gte: $minBlock }`字段参数如下例所示: ```graphql { @@ -146,19 +146,19 @@ Feel free to leverage the [#Curators channel](https://discord.gg/s5HfGMXmbW) on 如果您想升级网络上的现有子图,可以通过使用 Graph CLI 将新版本的子图部署到 Subgraph Studio 来实现。 -1. 更改您当前的子图。一个好主意是通过向Goerli发布内容来测试Subgraph Studio的小修补程序。 -2. 部署以下内容并在命令中指定新版本(例如 v0.0.1、v0.0.2 等): +1. 更改您当前的子图。一个好主意是通过向Goerli发布内容来测试Subgraph Studio的小修补程序。 +2. 部署以下内容并在命令中指定新版本(例如 v0.0.1、v0.0.2 等): ```sh graph deploy --studio ``` -3. 通过在 Playground 中查询来测试 Subgraph Studio 中的新版本。 -4. 在 The Graph Network 上发布新版本。 请记住,这需要gas(如上一节所述)。 +3. 通过在 Playground 中查询来测试 Subgraph Studio 中的新版本。 +4. 在 The Graph Network 上发布新版本。 请记住,这需要gas(如上一节所述)。 ### 所有者升级费用:Deep Dive -> 注意: Arbitrum上的策展不使用收益率曲线. 关于Arbitrum请看这 [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). 升级要求GRT从子图的旧版本迁移到新版本。这意味着每次升级都会创建一条新的收益率曲线(这里更多与收益率曲线相关)。 @@ -186,12 +186,12 @@ If you're making a lot of changes to your subgraph, it is not a good idea to con ## 将子图部署到Graph网络的最佳实践 -1. 利用 ENS 名称进行子图开发: +1. 利用 ENS 名称进行子图开发: - 设置您的 ENS:https://app.ens.domains/) - 此处将您的 ENS 名称添加到您的设置中。 -2. 您的个人资料填写得越多,您的子图被索引和管理的机会就越大。 +2. 您的个人资料填写得越多,您的子图被索引和管理的机会就越大。 ## 弃用Graph网络上的子图 From 198ca54f4486738b56d164f45f6aa2efed30c492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:33 -0400 Subject: [PATCH 498/924] New translations upgrading-a-subgraph.mdx (Urdu (Pakistan)) --- .../ur/cookbook/upgrading-a-subgraph.mdx | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/website/pages/ur/cookbook/upgrading-a-subgraph.mdx b/website/pages/ur/cookbook/upgrading-a-subgraph.mdx index 9a5b3b5ff787..4ca978c6c573 100644 --- a/website/pages/ur/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/ur/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ title: موجودہ سب گراف کو گراف نیٹ ورک میں اپ گری > آپ اپنے سب گراف کے لیے مخصوص کمانڈز [سب گراف اسٹوڈیو](https://thegraph.com/studio/) میں حاصل کر سکتے ہیں. -1. graph-cli کا جدید ورژن انسٹال کریں: +1. graph-cli کا جدید ورژن انسٹال کریں: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli یقینی بنائیں کہ subgraph.yaml میں آپ کا `apiVersion` `0.0.5` یا اس سے زیادہ ہے. -2. سب گراف کے مرکزی پروجیکٹ کے ذخیرے کے اندر، سٹوڈیو پر تعینات اور تعمیر کرنے کے لیے سب گراف کی تصدیق کریں: +2. سب گراف کے مرکزی پروجیکٹ کے ذخیرے کے اندر، سٹوڈیو پر تعینات اور تعمیر کرنے کے لیے سب گراف کی تصدیق کریں: ```sh graph auth --studio ``` -3. فائلیں اور سب گراف بنائیں: +3. فائلیں اور سب گراف بنائیں: ```sh گراف کوڈجن اور گراف بلڈ @@ -45,13 +45,13 @@ graph auth --studio اگر آپ کے سب گراف میں تعمیراتی خامیاں ہیں، تو [اسمبلی سکرپٹ مائیگریشن گائڈ](/release-notes/assemblyscript-migration-guide/) سے رجوع کریں. -4. اپنے والیٹ سے [سب گراف اسٹوڈیو](https://thegraph.com/studio/) میں سائن ان کریں اور سب گراف کو تعینات کریں۔ آپ اسٹوڈیو UI میں اپنا `` تلاش کر سکتے ہیں، جو آپ کے سب گراف کے نام پر مبنی ہے. +4. اپنے والیٹ سے [سب گراف اسٹوڈیو](https://thegraph.com/studio/) میں سائن ان کریں اور سب گراف کو تعینات کریں۔ آپ اسٹوڈیو UI میں اپنا `` تلاش کر سکتے ہیں، جو آپ کے سب گراف کے نام پر مبنی ہے. ```sh گراف کی تعیناتی --سٹوڈیو ``` -5. اسٹوڈیو کے پلے گراؤنڈ پر ٹیسٹ کیوریز۔ یہاں [Sushi - مین نیٹ ایکسچینج سب گراف](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground) کی کچھ مثالیں ہیں: +5. اسٹوڈیو کے پلے گراؤنڈ پر ٹیسٹ کیوریز۔ یہاں [Sushi - مین نیٹ ایکسچینج سب گراف](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground) کی کچھ مثالیں ہیں: ```sh { @@ -68,13 +68,13 @@ graph auth --studio } ``` -6. اس وقت، آپ کا سب گراف اب سب گراف سٹوڈیو پر تعینات ہے، لیکن ابھی تک ڈیسینٹرالائزڈ نیٹ ورک پر شائع نہیں ہوا ہے۔ اب آپ سب گراف کی جانچ کر سکتے ہیں تاکہ یہ یقینی بنایا جا سکے کہ یہ عارضی کیوری کے URL کا استعمال کرتے ہوئے جیسا کہ اوپر دائیں کالم کے اوپر دیکھا گیا ہے کام کر رہا ہے۔ جیسا کہ یہ نام پہلے ہی تجویز کرتا ہے، یہ ایک عارضی URL ہے اور اسے پروڈکشن میں استعمال نہیں کیا جانا چاہیے. +6. اس وقت، آپ کا سب گراف اب سب گراف سٹوڈیو پر تعینات ہے، لیکن ابھی تک ڈیسینٹرالائزڈ نیٹ ورک پر شائع نہیں ہوا ہے۔ اب آپ سب گراف کی جانچ کر سکتے ہیں تاکہ یہ یقینی بنایا جا سکے کہ یہ عارضی کیوری کے URL کا استعمال کرتے ہوئے جیسا کہ اوپر دائیں کالم کے اوپر دیکھا گیا ہے کام کر رہا ہے۔ جیسا کہ یہ نام پہلے ہی تجویز کرتا ہے، یہ ایک عارضی URL ہے اور اسے پروڈکشن میں استعمال نہیں کیا جانا چاہیے. - اپ ڈیٹ کرنا صرف آپ کے موجودہ سب گراف آن چین کا دوسرا ورژن شائع کرنا ہے. - چونکہ اس پر لاگت آتی ہے، اس لیے یہ انتہائی سفارش کی جاتی ہے کہ شائع کرنے سے پہلے "ترقیاتی کیوری URL" کا استعمال کرتے ہوئے سب گراف اسٹوڈیو میں اپنے سب گراف کو تعینات اور جانچیں۔ ٹرانزیکشن کی ایک مثال دیکھیں [یہاں](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b)۔ قیمتیں 100 gwei پر تقریباً 0.0425 ایتھیریم ہیں. - جب بھی آپ کو اپنا سب گراف اپ ڈیٹ کرنے کی ضرورت ہو، آپ سے اپ ڈیٹ فیس وصول کی جائے گی۔ چونکہ اس پر لاگت آتی ہے، اس لیے مین نیٹ پر تعینات کرنے سے پہلے اپنے سب گراف کو Goerli پر تعینات کرنے اور جانچنے کی انتہائی سفارش کی جاتی ہے۔ اگر اس سب گراف پر کوئی سگنل نہیں ہے تو اسے، بعض صورتوں میں، کچھ GRT کی بھی ضرورت پڑ سکتی ہے۔ اس سب گراف ورژن پر سگنل/کیوریشن ہونے کی صورت میں (آٹو مائیگریٹ کا استعمال کرتے ہوئے)، ٹیکس تقسیم ہو جائیں گے. -7. "شائع کریں" کے بٹن کو دبا کر گراف کے ڈیسینٹرالائزڈ نیٹ ورک پر سب گراف کو شائع کریں. +7. "شائع کریں" کے بٹن کو دبا کر گراف کے ڈیسینٹرالائزڈ نیٹ ورک پر سب گراف کو شائع کریں. آپ کو اپنے سب گراف کو GRT کے ساتھ کیوریٹ کرنا چاہیے تاکہ یہ یقینی بنایا جا سکے کہ اسے انڈیکسرز کے ذریعے ترتیب دیا گیا ہے۔ گیس کے اخراجات کو بچانے کے لیے، آپ اپنے سب گراف کو اسی ٹرانزیکشن میں درست کر سکتے ہیں جسے آپ نیٹ ورک پر شائع کرتے ہیں۔ اعلی معیار کی خدمت کے لیے کم از کم 10,000 GRT کے ساتھ اپنے سب گراف کو درست کرنے کی سفارش کی جاتی ہے. @@ -107,8 +107,8 @@ graph auth --studio یہ تجویز کیا جاتا ہے کہ آپ API کو دو طریقوں سے اس کے استعمال کو محدود کرکے محفوظ کریں: -1. مجاز سب گراف -2. مجاز ڈومین +1. مجاز سب گراف +2. مجاز ڈومین آپ اپنی API کلید کو[یہاں](https://thegraph.com/studio/apikeys/test/) محفوظ کر سکتے ہیں. @@ -116,7 +116,7 @@ graph auth --studio ### ڈیسینٹرالائزڈ نیٹ ورک پر آپ کے سب گراف سے کیوری کرنا -اب آپ گراف ایکسپلورر (مثال کے طور پر [یہاں]\(https://thegraph.com/explorer/subgraph؟ id=S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo&view=Indexers))سب سے اوپر کی سبز لکیر اس بات کی نشاندہی کرتی ہے کہ پوسٹ کرنے کے وقت 8 انڈیکسرز نے اس سب گراف کو کامیابی کے ساتھ انڈیکس کیا۔ انڈیکس ٹیب میں بھی آپ دیکھ سکتے ہیں کہ کن انڈیکسرز نے آپ کا سب گراف اٹھایا. +اب آپ گراف ایکسپلورر (مثال کے طور پر [یہاں](https://thegraph.com/explorer/subgraph؟ id=S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo&view=Indexers))سب سے اوپر کی سبز لکیر اس بات کی نشاندہی کرتی ہے کہ پوسٹ کرنے کے وقت 8 انڈیکسرز نے اس سب گراف کو کامیابی کے ساتھ انڈیکس کیا۔ انڈیکس ٹیب میں بھی آپ دیکھ سکتے ہیں کہ کن انڈیکسرز نے آپ کا سب گراف اٹھایا. ![Rocket Pool subgraph](/img/rocket-pool-subgraph.png) @@ -146,19 +146,19 @@ graph auth --studio اگر آپ نیٹ ورک پر موجودہ سب گراف کو اپ ڈیٹ کرنا چاہتے ہیں، تو آپ گراف CLI کا استعمال کرتے ہوئے اپنے سب گراف کا نیا ورژن سب گراف اسٹوڈیو میں تعینات کر کے ایسا کر سکتے ہیں. -1. اپنے موجودہ سب گراف میں بدلاو کریں. ایک اچھا خیال یہ ہے کہ Goerli پر شائع کرکے سب گراف اسٹوڈیو پر چھوٹی اصلاحات کی جانچ کریں. -2. درج ذیل کو تعینات کریں اور نۓ ورزن کی کمانڈ میں وضاحت کریں (eg. v0.0.1, v0.0.2, etc): +1. اپنے موجودہ سب گراف میں بدلاو کریں. ایک اچھا خیال یہ ہے کہ Goerli پر شائع کرکے سب گراف اسٹوڈیو پر چھوٹی اصلاحات کی جانچ کریں. +2. درج ذیل کو تعینات کریں اور نۓ ورزن کی کمانڈ میں وضاحت کریں (eg. v0.0.1, v0.0.2, etc): ```sh گراف کی تعیناتی --سٹوڈیو ``` -3. پلے گراونڈ میں کیوری کرکے سب گراف اسٹوڈیو میں نئے ورژن کی جانچ کریں۔ -4. گراف نیٹ ورک پر نۓ ورزن کو شائع کریں. یاد رکہیں کے اس کو گیس فیس کی ضرورت ہوتی ہے (جیسا کے اوپر والے حصے میں بیان کیا گیا ہے). +3. پلے گراونڈ میں کیوری کرکے سب گراف اسٹوڈیو میں نئے ورژن کی جانچ کریں۔ +4. گراف نیٹ ورک پر نۓ ورزن کو شائع کریں. یاد رکہیں کے اس کو گیس فیس کی ضرورت ہوتی ہے (جیسا کے اوپر والے حصے میں بیان کیا گیا ہے). ### مالک کی تازہ کاری کی فیس: ڈیپ ڈائیو -> نوٹ: Arbitrum پر کیوریشن بانڈنگ کروز کا استعمال نہیں کرتا ہے۔ Arbitrum کے بارے میں مزید جانیں [یہاں](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). ایک اپ ڈیٹ کے لیے GRT کو سب گراف کے پرانے ورژن سے نئے ورژن میں منتقل کرنے کی ضرورت ہوتی ہے۔ اس کا مطلب یہ ہے کہ ہر اپ ڈیٹ کے لیے، ایک نیا بانڈنگ کریو بنایا جائے گا (بانڈنگ منحنی خطوط پر مزید [یہاں](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ _جبکہ یہ طریقہ کار فی الحال نیٹ ورک پر رواں ہ ## سب گراف کو گراف نیٹ ورک پر تعینات کرنے کے بہترین طریقے -1. سب گراف ڈیولپمنٹ کے لیے ENS نام کا فائدہ اٹھانا: +1. سب گراف ڈیولپمنٹ کے لیے ENS نام کا فائدہ اٹھانا: - اپنا ENS [یہاں](https://app.ens.domains/) سیٹ کریں - اپنی ترتیبات میں اپنا ENS نام شامل کریں [یہاں](https://thegraph.com/explorer/settings?view=display-name). -2. جتنی زیادہ آپ کی پروفائل بہری ہے گی, اتنے ہی زیادہ امکانات ہوں گے آپ کے سب گراف کے انڈیکس اور کیوریٹ ہونے کے. +2. جتنی زیادہ آپ کی پروفائل بہری ہے گی, اتنے ہی زیادہ امکانات ہوں گے آپ کے سب گراف کے انڈیکس اور کیوریٹ ہونے کے. ## گراف نیٹ ورک پر سب گراف کو فرسودہ کرنا @@ -222,4 +222,4 @@ _جبکہ یہ طریقہ کار فی الحال نیٹ ورک پر رواں ہ - [گراف نیٹ ورک کنٹریکٹس](https://github.com/graphprotocol/contracts) - [کیوریشن کنٹریکٹ](https://github.com/graphprotocol/contracts/blob/dev/contracts/curation/Curation.sol) - بنیادی کنٹریکٹ جسے GNS لپیٹتا ہے - Address - `0x8fe00a685bcb3b2cc296ff6ffeab10aca4ce1538` -- [سب گراف اسٹوڈیو دستاویزات]\(/تعیناتی/سب گراف اسٹوڈیو) +- [سب گراف اسٹوڈیو دستاویزات](/تعیناتی/سب گراف اسٹوڈیو) From 3c7ab7c9b0cb221b74a92b520db81a5146863677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:33 -0400 Subject: [PATCH 499/924] New translations upgrading-a-subgraph.mdx (Vietnamese) --- .../vi/cookbook/upgrading-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/vi/cookbook/upgrading-a-subgraph.mdx b/website/pages/vi/cookbook/upgrading-a-subgraph.mdx index a83363d0fc61..845be90803fd 100644 --- a/website/pages/vi/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/vi/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: ```sh graph auth --studio ``` -3. Generate files and build the subgraph: +3. Generate files and build the subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ At the end of each week, an invoice will be generated based on the query fees th It is recommended that you secure the API by limiting its usage in two ways: -1. Authorized Subgraphs -2. Authorized Domain +1. Authorized Subgraphs +2. Authorized Domain You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## Best Practices for Deploying a Subgraph to The Graph Network -1. Leveraging an ENS name for Subgraph Development: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. ## Deprecating a Subgraph on The Graph Network From 833ff5a6f45c813a96247e07131117a4ed695073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:34 -0400 Subject: [PATCH 500/924] New translations upgrading-a-subgraph.mdx (Marathi) --- .../mr/cookbook/upgrading-a-subgraph.mdx | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/website/pages/mr/cookbook/upgrading-a-subgraph.mdx b/website/pages/mr/cookbook/upgrading-a-subgraph.mdx index 0ba97bb23d22..6143392db2c4 100644 --- a/website/pages/mr/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/mr/cookbook/upgrading-a-subgraph.mdx @@ -2,7 +2,7 @@ title: Upgrading an Existing Subgraph to The Graph Network --- -## परिचय +## Introduction This is a guide on how to upgrade your subgraph from the hosted service to The Graph's decentralized network. Over 1,000 subgraphs have successfully upgraded to The Graph Network including projects like Snapshot, Loopring, Audius, Premia, Livepeer, Uma, Curve, Lido, and many more! @@ -10,7 +10,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t ### पूर्वतयारी -- तुम्ही होस्ट केलेल्या सेवेवर एक सबग्राफ आधीच तैनात केला आहे. +- You have already deployed a subgraph on the hosted service. - The subgraph is indexing a chain available on The Graph Network. - You have a wallet with ETH to publish your subgraph on-chain. - You have ~10,000 GRT to curate your subgraph so Indexers can begin indexing it. @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. स्थापित ग्राफ-क्लीची नवीनतम आवृत्ती मिळवा: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. सबग्राफच्या मुख्य प्रोजेक्ट रिपॉझिटरीमध्ये, स्टुडिओवर तैनात आणि तयार करण्यासाठी सबग्राफ प्रमाणित करा: +2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: ```sh graph auth --studio ``` -3. फाइल्स तयार करा आणि सबग्राफ तयार करा: +3. Generate files and build the subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. या टप्प्यावर, तुमचा सबग्राफ आता सबग्राफ स्टुडिओवर तैनात केला आहे, परंतु विकेंद्रित नेटवर्कवर अद्याप प्रकाशित केलेला नाही. वरील उजव्या स्तंभाच्या शीर्षस्थानी पाहिल्याप्रमाणे तात्पुरती क्वेरी URL वापरून ते कार्य करत असल्याची खात्री करण्यासाठी तुम्ही आता सबग्राफची चाचणी करू शकता. हे नाव आधीच सूचित करत आहे, ही एक तात्पुरती URL आहे आणि ती उत्पादनामध्ये वापरली जाऊ नये. +6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. "प्रकाशित करा" बटण दाबून ग्राफच्या विकेंद्रीकृत नेटवर्कवर सबग्राफ प्रकाशित करा. +7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -82,53 +82,53 @@ And that's it! After you are done publishing, you'll be able to view your subgra Feel free to leverage the [#Curators channel](https://discord.gg/s5HfGMXmbW) on Discord to let Curators know that your subgraph is ready to be signaled. It would also be helpful if you share your expected query volume with them. Therefore, they can estimate how much GRT they should signal on your subgraph. -### API की तयार करा +### Create an API key You can generate an API key in Subgraph Studio [here](https://thegraph.com/studio/apikeys/). ![API key creation page](/img/api-image.png) -प्रत्येक आठवड्याच्या शेवटी, या कालावधीत खर्च केलेल्या क्वेरी शुल्काच्या आधारे एक बीजक तयार केले जाईल. तुमच्या शिल्लक मध्ये उपलब्ध GRT वापरून हे बीजक आपोआप दिले जाईल. तुमच्या क्वेरी फीची किंमत काढून घेतल्यानंतर तुमची शिल्लक अपडेट केली जाईल. आर्बिट्रम नेटवर्कद्वारे GRT मध्ये क्वेरी फी भरली जाते. तुमची API की खालील चरणांद्वारे सक्षम करण्यासाठी तुम्हाला आर्बिट्रम बिलिंग करारामध्ये GRT जोडण्याची आवश्यकता असेल: +At the end of each week, an invoice will be generated based on the query fees that have been incurred during this period. This invoice will be paid automatically using the GRT available in your balance. Your balance will be updated after the cost of your query fees are withdrawn. Query fees are paid in GRT via the Arbitrum network. You will need to add GRT to the Arbitrum billing contract to enable your API key via the following steps: -- तुमच्या आवडीच्या एक्सचेंजवर GRT खरेदी करा. -- तुमच्या वॉलेटवर GRT पाठवा. -- स्टुडिओमधील बिलिंग पृष्ठावर, GRT जोडा वर क्लिक करा. +- Purchase GRT on an exchange of your choice. +- Send the GRT to your wallet. +- On the Billing page in Studio, click on Add GRT. ![Add GRT in billing](/img/Add-GRT-New-Page.png) -- तुमच्या बिलिंग शिल्लकमध्ये तुमचा GRT जोडण्यासाठी पायऱ्या फॉलो करा. -- तुमचा GRT आपोआप आर्बिट्रम नेटवर्कशी जोडला जाईल आणि तुमच्या बिलिंग शिल्लकमध्ये जोडला जाईल. +- Follow the steps to add your GRT to your billing balance. +- Your GRT will be automatically bridged to the Arbitrum network and added to your billing balance. ![Billing pane](/img/New-Billing-Pane.png) > Note: see the [official billing page](../billing.mdx) for full instructions on adding GRT to your billing balance. -### तुमची API की सुरक्षित करत आहे +### Securing your API key -तुम्ही API चा वापर दोन प्रकारे मर्यादित करून सुरक्षित करा अशी शिफारस केली जाते: +It is recommended that you secure the API by limiting its usage in two ways: -1. अधिकृत सबग्राफ -2. अधिकृत डोमेन +1. Authorized Subgraphs +2. Authorized Domain You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). ![Subgraph lockdown page](/img/subgraph-lockdown.png) -### विकेंद्रित नेटवर्कवर तुमचा सबग्राफ विचारत आहे +### Querying your subgraph on the decentralized network Now you can check the indexing status of the Indexers on the network in Graph Explorer (example [here](https://thegraph.com/explorer/subgraph?id=S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo&view=Indexers)). The green line at the top indicates that at the time of posting 8 Indexers successfully indexed that subgraph. Also in the Indexer tab you can see which Indexers picked up your subgraph. ![Rocket Pool subgraph](/img/rocket-pool-subgraph.png) -पहिल्या इंडेक्सरने तुमचा सबग्राफ पूर्णपणे इंडेक्स केल्यावर तुम्ही विकेंद्रीकृत नेटवर्कवर सबग्राफची चौकशी करण्यास सुरुवात करू शकता. तुमच्या सबग्राफसाठी क्वेरी URL पुनर्प्राप्त करण्यासाठी, तुम्ही क्वेरी URL च्या पुढील चिन्हावर क्लिक करून कॉपी/पेस्ट करू शकता. तुम्हाला असे काहीतरी दिसेल: +As soon as the first Indexer has fully indexed your subgraph you can start to query the subgraph on the decentralized network. In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: `https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` Important: Make sure to replace `[api-key]` with an actual API key generated in the section above. -तुम्ही आता तुमच्या GraphQL विनंत्या पाठवण्यासाठी तुमच्या dapp मध्ये ती क्वेरी URL वापरू शकता. +You can now use that Query URL in your dapp to send your GraphQL requests to. -अभिनंदन! तुम्ही आता विकेंद्रीकरणाचे प्रणेते आहात! +Congratulations! You are now a pioneer of decentralization! > Note: Due to the distributed nature of the network it might be the case that different Indexers have indexed up to different blocks. In order to only receive fresh data you can specify the minimum block an Indexer has to have indexed in order to serve your query with the block: `{ number_gte: $minBlock }` field argument as shown in the example below: @@ -146,74 +146,74 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. तुमच्या सध्याच्या सबग्राफमध्ये बदल करा. Goerli वर प्रकाशित करून Subgraph स्टुडिओवर लहान निराकरणे तपासणे ही चांगली कल्पना आहे. -2. खालील उपयोजित करा आणि कमांडमध्ये नवीन आवृत्ती निर्दिष्ट करा (उदा. v0.0.1, v0.0.2 इ.): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. सबग्राफ स्टूडियोमध्ये नवीन आवृत्तीची चाचणी करण्यासाठी प्लेग्राउंडवर क्वेरी करा -4. ग्राफ नेटवर्कवर नवीन आवृत्ती प्रकाशित करा. लक्षात ठेवा की यासाठी गॅस आवश्यक आहे (वरील विभागात वर्णन केल्याप्रमाणे). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). The new bonding curve charges the 1% curation tax on all GRT being migrated to the new version. The owner must pay 50% of this or 1.25%. The other 1.25% is absorbed by all the curators as a fee. This incentive design is in place to prevent an owner of a subgraph from being able to drain all their curator's funds with recursive update calls. If there is no curation activity, you will have to pay a minimum of 100 GRT in order to signal your own subgraph. -चला एक उदाहरण बनवूया, जर तुमचा सबग्राफ सक्रियपणे क्युरेट केला जात असेल तरच असे होईल: +Let's make an example, this is only the case if your subgraph is being actively curated on: -- सबग्राफच्या v1 वर 100,000 GRT स्वयं-स्थलांतर वापरून सिग्नल केला जातो +- 100,000 GRT is signaled using auto-migrate on v1 of a subgraph - Owner updates to v2. 100,000 GRT is migrated to a new bonding curve, where 97,500 GRT get put into the new curve and 2,500 GRT is burned - The owner then has 1250 GRT burned to pay for half the fee. The owner must have this in their wallet before the update, otherwise, the update will not succeed. This happens in the same transaction as the update. _While this mechanism is currently live on the network, the community is currently discussing ways to reduce the cost of updates for subgraph developers._ -### सबग्राफची स्थिर आवृत्ती राखणे +### Maintaining a Stable Version of a Subgraph If you're making a lot of changes to your subgraph, it is not a good idea to continually update it and front the update costs. Maintaining a stable and consistent version of your subgraph is critical, not only from the cost perspective but also so that Indexers can feel confident in their syncing times. Indexers should be flagged when you plan for an update so that Indexer syncing times do not get impacted. Feel free to leverage the [#Indexers channel](https://discord.gg/JexvtHa7dq) on Discord to let Indexers know when you're versioning your subgraphs. Subgraphs are open APIs that external developers are leveraging. Open APIs need to follow strict standards so that they do not break external developers' applications. In The Graph Network, a subgraph developer must consider Indexers and how long it takes them to sync a new subgraph **as well as** other developers who are using their subgraphs. -### सबग्राफचा मेटाडेटा अद्यतनित करणे +### Updating the Metadata of a Subgraph -तुम्ही नवीन आवृत्ती प्रकाशित न करता तुमच्या सबग्राफचा मेटाडेटा अपडेट करू शकता. मेटाडेटामध्ये सबग्राफ नाव, प्रतिमा, वर्णन, वेबसाइट URL, स्त्रोत कोड URL आणि श्रेणी समाविष्ट आहेत. विकासक हे सबग्राफ स्टुडिओमध्ये त्यांचे सबग्राफ तपशील अपडेट करून करू शकतात जिथे तुम्ही सर्व लागू फील्ड संपादित करू शकता. +You can update the metadata of your subgraphs without having to publish a new version. The metadata includes the subgraph name, image, description, website URL, source code URL, and categories. Developers can do this by updating their subgraph details in the Subgraph Studio where you can edit all applicable fields. Make sure **Update Subgraph Details in Explorer** is checked and click on **Save**. 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. -## ग्राफ नेटवर्कवर सबग्राफ तैनात करण्यासाठी सर्वोत्तम पद्धती +## Best Practices for Deploying a Subgraph to The Graph Network -1. सबग्राफ डेव्हलपमेंटसाठी ईएनएस नावाचा लाभ घेणे: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. तुमचे प्रोफाईल जितके अधिक भरले जातील, तुमचे सबग्राफ अनुक्रमित आणि क्युरेट होण्याची शक्यता तितकी चांगली. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. -## द ग्राफ नेटवर्कवरील सबग्राफ अपवाद करणे +## Deprecating a Subgraph on The Graph Network Follow the steps [here](/managing/deprecating-a-subgraph) to deprecate your subgraph and remove it from The Graph Network. -## ग्राफ नेटवर्कवर सबग्राफ + बिलिंगची चौकशी करणे +## Querying a Subgraph + Billing on The Graph Network The hosted service was set up to allow developers to deploy their subgraphs without any restrictions. In order for The Graph Network to truly be decentralized, query fees have to be paid as a core part of the protocol's incentives. For more information on subscribing to APIs and paying the query fees, check out billing documentation [here](/billing/). -### नेटवर्कवरील क्वेरी शुल्काचा अंदाज लावा +### Estimate Query Fees on the Network -उत्पादन UI मधील हे थेट वैशिष्ट्य नसले तरी, तुम्ही दर महिन्याला द्यायला तयार असलेली रक्कम घेऊन आणि तुमच्या अपेक्षित क्वेरी व्हॉल्यूमने विभाजित करून प्रति क्वेरी तुमचे कमाल बजेट सेट करू शकता. +While this is not a live feature in the product UI, you can set your maximum budget per query by taking the amount you're willing to pay per month and dividing it by your expected query volume. While you get to decide on your query budget, there is no guarantee that an Indexer will be willing to serve queries at that price. If a Gateway can match you to an Indexer willing to serve a query at, or lower than, the price you are willing to pay, you will pay the delta/difference of your budget **and** their price. As a consequence, a lower query price reduces the pool of Indexers available to you, which may affect the quality of service you receive. It's beneficial to have high query fees, as that may attract curation and big-name Indexers to your subgraph. -लक्षात ठेवा की ही एक गतिमान आणि वाढणारी बाजारपेठ आहे, परंतु तुम्ही त्याच्याशी कसा संवाद साधता हे तुमच्या नियंत्रणात आहे. प्रोटोकॉल किंवा गेटवेमध्ये कमाल किंवा किमान किंमत निर्दिष्ट केलेली नाही. उदाहरणार्थ, तुम्ही खाली नेटवर्कवर (दर आठवड्याच्या आधारावर) काही डॅप्सने दिलेली किंमत पाहू शकता. शेवटचा स्तंभ पहा, जो GRT मध्ये क्वेरी शुल्क दर्शवितो. +Remember that it's a dynamic and growing market, but how you interact with it is in your control. There is no maximum or minimum price specified in the protocol or the Gateways. For example, you can look at the price paid by a few of the dapps on the network (on a per-week basis), below. See the last column, which shows query fees in GRT. ![QueryFee](/img/QueryFee.png) -## अतिरिक्त संसाधने +## Additional Resources If you're still confused, fear not! Check out the following resources or watch our video guide on upgrading subgraphs to the decentralized network below: From 0d1a804783e902b889a7820cd0e0e222146eb678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:35 -0400 Subject: [PATCH 501/924] New translations upgrading-a-subgraph.mdx (Hindi) --- .../hi/cookbook/upgrading-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/hi/cookbook/upgrading-a-subgraph.mdx b/website/pages/hi/cookbook/upgrading-a-subgraph.mdx index 951cdba14406..f68f6c24293a 100644 --- a/website/pages/hi/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/hi/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Graph-cli का नवीनतम संस्करण प्राप्त करें: +1. Graph-cli का नवीनतम संस्करण प्राप्त करें: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. सबग्राफ के मुख्य प्रोजेक्ट रिपॉजिटरी के अंदर, सबग्राफ को स्टूडियो पर तैनात करने और बनाने के लिए प्रमाणित करें: +2. सबग्राफ के मुख्य प्रोजेक्ट रिपॉजिटरी के अंदर, सबग्राफ को स्टूडियो पर तैनात करने और बनाने के लिए प्रमाणित करें: ```sh graph auth --studio ``` -3. फाइलें उत्पन्न करें और सबग्राफ बनाएं: +3. फाइलें उत्पन्न करें और सबग्राफ बनाएं: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. इस समय पर, आपका सबग्राफ अब सबग्राफ स्टूडियो पर तैनात है, लेकिन अभी तक विकेंद्रीकृत नेटवर्क पर प्रकाशित नहीं हुआ है। अब आप यह सुनिश्चित करने के लिए सबग्राफ का परीक्षण कर सकते हैं कि यह अस्थायी क्वेरी URL का उपयोग करके काम कर रहा है, जैसा कि ऊपर दाएं कॉलम के शीर्ष पर दिखाया गया है। जैसा कि इस नाम से पहले ही पता चलता है, यह एक अस्थायी URL है और इसे उत्पादन में इस्तेमाल नहीं किया जाना चाहिए। +6. इस समय पर, आपका सबग्राफ अब सबग्राफ स्टूडियो पर तैनात है, लेकिन अभी तक विकेंद्रीकृत नेटवर्क पर प्रकाशित नहीं हुआ है। अब आप यह सुनिश्चित करने के लिए सबग्राफ का परीक्षण कर सकते हैं कि यह अस्थायी क्वेरी URL का उपयोग करके काम कर रहा है, जैसा कि ऊपर दाएं कॉलम के शीर्ष पर दिखाया गया है। जैसा कि इस नाम से पहले ही पता चलता है, यह एक अस्थायी URL है और इसे उत्पादन में इस्तेमाल नहीं किया जाना चाहिए। - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. "प्रकाशित करें" बटन दबाकर ग्राफ़ के विकेंद्रीकृत नेटवर्क पर सबग्राफ प्रकाशित करें। +7. "प्रकाशित करें" बटन दबाकर ग्राफ़ के विकेंद्रीकृत नेटवर्क पर सबग्राफ प्रकाशित करें। You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ You can generate an API key in Subgraph Studio [here](https://thegraph.com/studi यह अनुशंसा की जाती है कि आप एपीआई के उपयोग को दो तरीकों से सीमित करके सुरक्षित करें: -1. अधिकृत सबग्राफ -2. अधिकृत डोमेन +1. अधिकृत सबग्राफ +2. अधिकृत डोमेन You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. अपने वर्तमान सबग्राफ में परिवर्तन करें। गोएर्ली में प्रकाशित करके सबग्राफ स्टूडियो पर छोटे सुधारों का परीक्षण करना एक अच्छा विचार है। -2. निम्नलिखित को तैनात करें और कमांड में नया संस्करण निर्दिष्ट करें (जैसे। v0.0.1, v0.0.2, आदि): +1. अपने वर्तमान सबग्राफ में परिवर्तन करें। गोएर्ली में प्रकाशित करके सबग्राफ स्टूडियो पर छोटे सुधारों का परीक्षण करना एक अच्छा विचार है। +2. निम्नलिखित को तैनात करें और कमांड में नया संस्करण निर्दिष्ट करें (जैसे। v0.0.1, v0.0.2, आदि): ```sh graph deploy --studio ``` -3. खेल के मैदान में क्वेरी करके सबग्राफ स्टूडियो में नए संस्करण का परीक्षण करें -4. ग्राफ़ नेटवर्क पर नया संस्करण प्रकाशित करें। याद रखें कि इसके लिए गैस की आवश्यकता होती है (जैसा कि ऊपर अनुभाग में बताया गया है)। +3. खेल के मैदान में क्वेरी करके सबग्राफ स्टूडियो में नए संस्करण का परीक्षण करें +4. ग्राफ़ नेटवर्क पर नया संस्करण प्रकाशित करें। याद रखें कि इसके लिए गैस की आवश्यकता होती है (जैसा कि ऊपर अनुभाग में बताया गया है)। ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## ग्राफ़ नेटवर्क में एक सबग्राफ को तैनात करने के लिए सर्वोत्तम अभ्यास -1. सबग्राफ डेवलपमेंट के लिए ENS नाम का लाभ उठाना: +1. सबग्राफ डेवलपमेंट के लिए ENS नाम का लाभ उठाना: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. आपके प्रोफाइल जितने अधिक भरे हुए हैं, आपके सबग्राफ के अनुक्रमित और क्यूरेट होने की संभावना उतनी ही बेहतर है। +2. आपके प्रोफाइल जितने अधिक भरे हुए हैं, आपके सबग्राफ के अनुक्रमित और क्यूरेट होने की संभावना उतनी ही बेहतर है। ## ग्राफ़ नेटवर्क पर एक सबग्राफ का बहिष्कार करना From 2220755ab165bee2729de9b98faae2c3f9cf0141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:36 -0400 Subject: [PATCH 502/924] New translations upgrading-a-subgraph.mdx (Yoruba) --- .../yo/cookbook/upgrading-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/yo/cookbook/upgrading-a-subgraph.mdx b/website/pages/yo/cookbook/upgrading-a-subgraph.mdx index bd3b739199d6..ff1ab368c0fa 100644 --- a/website/pages/yo/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/yo/cookbook/upgrading-a-subgraph.mdx @@ -19,7 +19,7 @@ The process of upgrading is quick and your subgraphs will forever benefit from t > You can find specific commands for your subgraph in the [Subgraph Studio](https://thegraph.com/studio/). -1. Get the latest version of the graph-cli installed: +1. Get the latest version of the graph-cli installed: ```sh npm install -g @graphprotocol/graph-cli @@ -31,13 +31,13 @@ yarn global add @graphprotocol/graph-cli Make sure your `apiVersion` in subgraph.yaml is `0.0.5` or greater. -2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: +2. Inside the subgraph's main project repository, authenticate the subgraph to deploy and build on the studio: ```sh graph auth --studio ``` -3. Generate files and build the subgraph: +3. Generate files and build the subgraph: ```sh graph codegen && graph build @@ -45,13 +45,13 @@ graph codegen && graph build If your subgraph has build errors, refer to the [AssemblyScript Migration Guide](/release-notes/assemblyscript-migration-guide/). -4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. +4. Sign into [Subgraph Studio](https://thegraph.com/studio/) with your wallet and deploy the subgraph. You can find your `` in the Studio UI, which is based on the name of your subgraph. ```sh graph deploy --studio ``` -5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): +5. Test queries on the Studio's playground. Here are some examples for the [Sushi - Mainnet Exchange Subgraph](https://thegraph.com/explorer/subgraph?id=0x4bb4c1b0745ef7b4642feeccd0740dec417ca0a0-0&view=Playground): ```sh { @@ -68,13 +68,13 @@ graph deploy --studio } ``` -6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. +6. At this point, your subgraph is now deployed on Subgraph Studio, but not yet published to the decentralized network. You can now test the subgraph to make sure it is working as intended using the temporary query URL as seen on top of the right column above. As this name already suggests, this is a temporary URL and should not be used in production. - Updating is just publishing another version of your existing subgraph on-chain. - Because this incurs a cost, it is highly recommended to deploy and test your subgraph in the Subgraph Studio, using the "Development Query URL" before publishing. See an example transaction [here](https://etherscan.io/tx/0xd0c3fa0bc035703c9ba1ce40c1862559b9c5b6ea1198b3320871d535aa0de87b). Prices are roughly around 0.0425 ETH at 100 gwei. - Any time you need to update your subgraph, you will be charged an update fee. Because this incurs a cost, it is highly recommended to deploy and test your subgraph on Goerli before deploying to mainnet. It can, in some cases, also require some GRT if there is no signal on that subgraph. In the case there is signal/curation on that subgraph version (using auto-migrate), the taxes will be split. -7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. +7. Publish the subgraph on The Graph's decentralized network by hitting the "Publish" button. You should curate your subgraph with GRT to ensure that it is indexed by Indexers. To save on gas costs, you can curate your subgraph in the same transaction that you publish it to the network. It is recommended to curate your subgraph with at least 10,000 GRT for high quality of service. @@ -107,8 +107,8 @@ At the end of each week, an invoice will be generated based on the query fees th It is recommended that you secure the API by limiting its usage in two ways: -1. Authorized Subgraphs -2. Authorized Domain +1. Authorized Subgraphs +2. Authorized Domain You can secure your API key [here](https://thegraph.com/studio/apikeys/test/). @@ -146,19 +146,19 @@ More information about the nature of the network and how to handle re-orgs are d If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to the Subgraph Studio using the Graph CLI. -1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. -2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): +1. Make changes to your current subgraph. A good idea is to test small fixes on the Subgraph Studio by publishing to Goerli. +2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc): ```sh graph deploy --studio ``` -3. Test the new version in the Subgraph Studio by querying in the playground -4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). +3. Test the new version in the Subgraph Studio by querying in the playground +4. Publish the new version on The Graph Network. Remember that this requires gas (as described in the section above). ### Owner Update Fee: Deep Dive -> Note: Curation on Arbitrum does not use bonding curves. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). +> Note: Curation on Arbitrum has a flat bonding curve. Learn more about Arbitrum [here](/arbitrum/arbitrum-faq/). An update requires GRT to be migrated from the old version of the subgraph to the new version. This means that for every update, a new bonding curve will be created (more on bonding curves [here](/network/curating#bonding-curve-101)). @@ -186,12 +186,12 @@ Make sure **Update Subgraph Details in Explorer** is checked and click on **Save ## Best Practices for Deploying a Subgraph to The Graph Network -1. Leveraging an ENS name for Subgraph Development: +1. Leveraging an ENS name for Subgraph Development: - Set up your ENS [here](https://app.ens.domains/) - Add your ENS name to your settings [here](https://thegraph.com/explorer/settings?view=display-name). -2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. +2. The more filled out your profiles are, the better the chances for your subgraphs to be indexed and curated. ## Deprecating a Subgraph on The Graph Network From 9fc632fd5ddcdd8638514c115b6b312cd63968f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:37 -0400 Subject: [PATCH 503/924] New translations new-chain-integration.mdx (Romanian) --- website/pages/ro/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/ro/new-chain-integration.mdx b/website/pages/ro/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/ro/new-chain-integration.mdx +++ b/website/pages/ro/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 6dc7678a87ceaa37899aa57abe7140312bcd588d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:38 -0400 Subject: [PATCH 504/924] New translations new-chain-integration.mdx (French) --- website/pages/fr/new-chain-integration.mdx | 52 +++++++++++----------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/website/pages/fr/new-chain-integration.mdx b/website/pages/fr/new-chain-integration.mdx index 55784afce054..e71af1b013cb 100644 --- a/website/pages/fr/new-chain-integration.mdx +++ b/website/pages/fr/new-chain-integration.mdx @@ -2,38 +2,38 @@ title: Integrating New Networks --- -Graph Node can currently index data from the following chain types: +Graph Node peut actuellement indexer les données des types de chaînes suivants : - Ethereum, via EVM JSON-RPC and [Ethereum Firehose](https://github.com/streamingfast/firehose-ethereum) - NEAR, via a [NEAR Firehose](https://github.com/streamingfast/near-firehose-indexer) - Cosmos, via a [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) - Arweave, via an [Arweave Firehose](https://github.com/graphprotocol/firehose-arweave) -If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. +Si l'une de ces chaînes vous intéresse, l'intégration est une question de configuration et de test de Graph Node. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** -If the blockchain is EVM equivalent and the client/node exposes the standard EVM JSON-RPC API, Graph Node should be able to index the new chain. For more information, refer to [Testing an EVM JSON-RPC](new-chain-integration#testing-an-evm-json-rpc). +Si la blockchain est équivalente à EVM et que le client/nœud expose l'API EVM JSON-RPC standard, Graph Node devrait pouvoir indexer la nouvelle chaîne. Pour plus d'informations, reportez-vous à [Test d'un EVM JSON-RPC] (new-chain-integration#testing-an-evm-json-rpc). **2. Firehose** -For non-EVM-based chains, Graph Node must ingest blockchain data via gRPC and known type definitions. This can be done via [Firehose](firehose/), a new technology developed by [StreamingFast](https://www.streamingfast.io/) that provides a highly-scalable indexing blockchain solution using a files-based and streaming-first approach. Reach out to the [StreamingFast team](mailto:integrations@streamingfast.io/) if you need help with Firehose development. +Pour les chaînes non basées sur EVM, Graph Node doit ingérer des données de blockchain via gRPC et des définitions de type connues. Cela peut être fait via [Firehose](firehose/), une nouvelle technologie développée par [StreamingFast](https://www.streamingfast.io/) qui fournit une solution de blockchain d'indexation hautement évolutive utilisant un système de streaming et de fichiers basé sur des fichiers. première approche. Contactez l'[équipe StreamingFast](mailto:integrations@streamingfast.io/) si vous avez besoin d'aide pour le développement de Firehose. -## Difference between EVM JSON-RPC & Firehose +## Différence entre EVM JSON-RPC et Firehose -While the two are suitable for subgraphs, a Firehose is always required for developers wanting to build with [Substreams](substreams/), like building [Substreams-powered subgraphs](cookbook/substreams-powered-subgraphs/). In addition, Firehose allows for improved indexing speeds when compared to JSON-RPC. +Bien que les deux conviennent aux subgraphs, un Firehose est toujours requis pour les développeurs souhaitant construire avec [Substreams](substreams/), comme la construction de [Substreams-powered subgraphs](cookbook/substreams-powered-subgraphs/). De plus, Firehose permet des vitesses d'indexation améliorées par rapport à JSON-RPC. Les nouveaux intégrateurs de chaîne EVM peuvent également envisager l'approche basée sur Firehose, compte tenu des avantages des sous-flux et de ses capacités d'indexation parallélisées massives. La prise en charge des deux permet aux développeurs de choisir entre la création de sous-flux ou de subgraphs pour la nouvelle chaîne. -> **NOTE**: A Firehose-based integration for EVM chains will still require Indexers to run the chain's archive RPC node to properly index subgraphs. This is due to the Firehose's inability to provide smart contract state typically accessible by the `eth_call` RPC method. (It's worth reminding that eth_calls are [not a good practice for developers](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) +> **REMARQUE** : Une intégration basée sur Firehose pour les chaînes EVM nécessitera toujours que les indexeurs exécutent le nœud RPC d'archive de la chaîne pour indexer correctement les subgraph. Cela est dû à l'incapacité de Firehose à fournir un état de contrat intelligent généralement accessible par la méthode RPC `eth_call`. (Il convient de rappeler que les eth_calls ne sont [pas une bonne pratique pour les développeurs](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) --- ## Testing an EVM JSON-RPC -For Graph Node to be able to ingest data from an EVM chain, the RPC node must expose the following EVM JSON RPC methods: +Pour que Graph Node puisse ingérer des données à partir d'une chaîne EVM, le nœud RPC doit exposer les méthodes EVM JSON RPC suivantes : - `eth_getLogs` - `eth_call` \_(for historical blocks, with EIP-1898 - requires archive node): @@ -45,31 +45,31 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex ### Graph Node Configuration -**Start by preparing your local environment** +**Commencez par préparer votre environnement local** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Ne modifiez pas le nom de la variable d'environnement lui-même. Il doit rester « Ethereum » même si le nom du réseau est différent. +3. Exécutez un nœud IPFS ou utilisez celui utilisé par The Graph : https://api.thegraph.com/ipfs/ -**Test the integration by locally deploying a subgraph** +**Testez l'intégration en déployant localement un subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. Le contrat intelligent et le subgraph pré-emballés [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) sont un bon point de départ + 2. Amorcez un subgraph local à partir de n'importe quel contrat intelligent ou environnement de développement Solidity existant [en utilisant Hardhat avec un plugin Graph](https://github.com/graphprotocol/hardhat-graph) +3. Adaptez le `subgraph.yaml` obtenu en remplaçant [`dataSources.network`](http://dataSources.network) par le même nom précédemment transmis à Graph Node. +4. Créez votre subgraph dans Graph Node : `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. --- -## Integrating a new Firehose-enabled chain +## Intégration d'une nouvelle chaîne Firehose Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [Documentation générale sur Firehose](firehose/) +2. [Ajout du support Firehose pour une nouvelle chaîne](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Intégration de Graph Node avec une nouvelle chaîne via Firehose] (https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 707c5e81c2275e7f18a0a098fca8159d51b99a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:39 -0400 Subject: [PATCH 505/924] New translations new-chain-integration.mdx (Spanish) --- website/pages/es/new-chain-integration.mdx | 37 +++++++++++----------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/website/pages/es/new-chain-integration.mdx b/website/pages/es/new-chain-integration.mdx index 2719d8758bea..d9217c7a4a9e 100644 --- a/website/pages/es/new-chain-integration.mdx +++ b/website/pages/es/new-chain-integration.mdx @@ -4,14 +4,15 @@ title: Integración de nuevas redes El Graph Node actualmente puede indexar datos de los siguientes tipos de cadena: -- Ethereum, a través de EVM JSON-RPC y [Ethereum Firehose] (https://github.com/streamingfast/firehose-ethereum) -- NEAR, a través de [NEAR Firehose] \(https://github.com/streamingfast/near-firehose-indexer) +- Ethereum, a través de EVM JSON-RPC y [Ethereum Firehose] + (https://github.com/streamingfast/firehose-ethereum) +- NEAR, a través de [NEAR Firehose] (https://github.com/streamingfast/near-firehose-indexer) - Cosmos, a través de [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) - Arweave, a través de [Arweave Firehose](https://github.com/graphprotocol/firehose-arweave) Si estás interesado en alguna de esas cadenas, la integración es una cuestión de configuración y prueba de Graph Node. -Si estás interesado en un tipo de cadena diferente, se debe crear una nueva con Graph Node. Nuestra recomendación es desarrollar un nuevo Firehose para la cadena en cuestión y luego la integración de ese Firehose con Graph Node. Más información a continuación. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -27,7 +28,7 @@ Si bien los dos son adecuados para subgrafos, siempre se requiere un Firehose pa Los nuevos integradores de cadenas EVM también pueden considerar el enfoque basado en Firehose, dados los beneficios de los substreams y sus enormes capacidades de indexación en paralelo. El soporte de ambos permite a los desarrolladores elegir entre crear substreams o subgrafos para la nueva cadena. -> **NOTA**: Una integración basada en Firehose para cadenas EVM aún requerirá que los indexadores ejecuten el nodo RPC de archivo de la cadena para indexar correctamente los subgrafos. Esto se debe a la incapacidad de Firehose para proporcionar un estado de contrato inteligente al que normalmente se puede acceder mediante el método RPC `eth_call`. (Vale la pena recordar que eth_calls [no es una buena práctica para desarrolladores] \(https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) +> **NOTA**: Una integración basada en Firehose para cadenas EVM aún requerirá que los indexadores ejecuten el nodo RPC de archivo de la cadena para indexar correctamente los subgrafos. Esto se debe a la incapacidad de Firehose para proporcionar un estado de contrato inteligente al que normalmente se puede acceder mediante el método RPC `eth_call`. (Vale la pena recordar que eth_calls [no es una buena práctica para desarrolladores] (https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) --- @@ -47,20 +48,20 @@ Para que Graph Node pueda ingerir datos de una cadena EVM, el nodo RPC debe expo **Empiece por preparar su entorno local** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modifique [esta línea](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) para incluir el nuevo nombre de la red y la URL compatible con EVM JSON RPC - > No cambie el nombre de la var env. Debe seguir siendo "ethereum" incluso si el nombre de la red es diferente. -3. Ejecute un nodo IPFS o use el utilizado por The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modifique [esta línea](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) para incluir el nuevo nombre de la red y la URL compatible con EVM JSON RPC + > No cambie el nombre de la var env. Debe seguir siendo "ethereum" incluso si el nombre de la red es diferente. +3. Ejecute un nodo IPFS o use el utilizado por The Graph: https://api.thegraph.com/ipfs/ **Prueba la integración implementando localmente un subgrafo** -1. Instale [graph-cli] \(https://github.com/graphprotocol/graph-cli) -2. Crea un subgrafo simple de prueba. Algunas opciones están a continuación: - 1. El contrato inteligente y el subgrafo [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) preempaquetados son un buen comienzo - 2. Arranca un subgrafo local desde cualquier contrato inteligente existente o entorno de desarrollo de solidity [usando Hardhat con un plugin Graph] \(https://github.com/graphprotocol/hardhat-graph) -3. Adapta el `subgraph.yaml` resultante cambiando [`dataSources.network`](http://dataSources.network) al mismo nombre que se pasó previamente a Graph Node. -4. Crea tu subgrafo en Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publica tu subgrafo en Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Instale [graph-cli] (https://github.com/graphprotocol/graph-cli) +2. Crea un subgrafo simple de prueba. Algunas opciones están a continuación: + 1. El contrato inteligente y el subgrafo [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) preempaquetados son un buen comienzo + 2. Arranca un subgrafo local desde cualquier contrato inteligente existente o entorno de desarrollo de solidity [usando Hardhat con un plugin Graph] (https://github.com/graphprotocol/hardhat-graph) +3. Adapta el `subgraph.yaml` resultante cambiando [`dataSources.network`](http://dataSources.network) al mismo nombre que se pasó previamente a Graph Node. +4. Crea tu subgrafo en Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publica tu subgrafo en Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node debería sincronizar el subgrafo implementado si no hay errores. Dale tiempo para que se sincronice y luego envíe algunas queries GraphQL al punto final de la API impreso en los registros. @@ -70,6 +71,6 @@ Graph Node debería sincronizar el subgrafo implementado si no hay errores. Dale También es posible integrar una nueva cadena utilizando el enfoque Firehose. Actualmente, esta es la mejor opción para cadenas que no son EVM y un requisito para el soporte de substreams. La documentación adicional se centra en cómo funciona Firehose, agregando soporte de Firehose para una nueva cadena e integrándola con Graph Node. Documentos recomendados para integradores: -1. [Documentos generales sobre Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integración de Graph Node con una nueva cadena a través de Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [Documentos generales sobre Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integración de Graph Node con una nueva cadena a través de Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 55e374e4782058436d9115d439b9fe4bbb11ac4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:40 -0400 Subject: [PATCH 506/924] New translations new-chain-integration.mdx (Arabic) --- website/pages/ar/new-chain-integration.mdx | 82 +++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/website/pages/ar/new-chain-integration.mdx b/website/pages/ar/new-chain-integration.mdx index b5492d5061af..278e07ed2054 100644 --- a/website/pages/ar/new-chain-integration.mdx +++ b/website/pages/ar/new-chain-integration.mdx @@ -1,75 +1,75 @@ --- -title: Integrating New Networks +title: تكامل الشبكات الجديدة --- -Graph Node can currently index data from the following chain types: +عقدة الغراف يمكنه حاليًا فهرسة البيانات من أنواع الشبكات التالية: -- Ethereum, via EVM JSON-RPC and [Ethereum Firehose](https://github.com/streamingfast/firehose-ethereum) -- NEAR, via a [NEAR Firehose](https://github.com/streamingfast/near-firehose-indexer) -- Cosmos, via a [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) -- Arweave, via an [Arweave Firehose](https://github.com/graphprotocol/firehose-arweave) +- إيثيريوم، من خلال استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية ( EVM JSON-RPC) و [فايرهوز إيثيريوم](https://github.com/streamingfast/firehose-ethereum) +- نير، عبر [نير فايرهوز](https://github.com/streamingfast/near-firehose-indexer) +- كوسموس، عبر [كوسموس فايرهوز](https://github.com/graphprotocol/firehose-cosmos) +- أرويف، عبر [أرويف فايرهوز](https://github.com/graphprotocol/firehose-arweave) -If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. +إذا كنت مهتمًا بأي من تلك السلاسل، فإن التكامل يتطلب ضبط واختبار عقدة الغراف. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +إذا كنت مهتمًا بنوع سلسلة مختلفة، فيجب بناء تكامل جديد مع عقدة الغراف. الطريقة الموصى بها هي تطوير فايرهوز جديد للسلسلة المعنية، ثم دمج ذلك الفايرهوز مع عقدة الغراف. المزيد من المعلومات أدناه. -**1. EVM JSON-RPC** +**1. استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية** -If the blockchain is EVM equivalent and the client/node exposes the standard EVM JSON-RPC API, Graph Node should be able to index the new chain. For more information, refer to [Testing an EVM JSON-RPC](new-chain-integration#testing-an-evm-json-rpc). +إذا كانت سلسلة الكتل متوافقة مع آلة الإيثريوم الافتراضية وإذا كان العميل/العقدة يوفر واجهة برمجة التطبيقات القياسية لاستدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية، ، فإنه يمكن لعقدة الغراف فهرسة هذه السلسلة الجديدة. لمزيد من المعلومات، يرجى الاطلاع على [اختبار استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية] (تكامل_سلسة_جديدة #اختبار_استدعاء_إجراء_عن_بُعد_باستخدام_تمثيل_كائنات_جافا_سكريبت_لآلة_التشغيل_الافتراضية\_لإثريوم). -**2. Firehose** +**2. فايرهوز** -For non-EVM-based chains, Graph Node must ingest blockchain data via gRPC and known type definitions. This can be done via [Firehose](firehose/), a new technology developed by [StreamingFast](https://www.streamingfast.io/) that provides a highly-scalable indexing blockchain solution using a files-based and streaming-first approach. Reach out to the [StreamingFast team](mailto:integrations@streamingfast.io/) if you need help with Firehose development. +بالنسبة لسلاسل الكتل الغير المبنية على آلة الإيثيريوم الافتراضية، يجب على عقدة الغراف استيعاب بيانات سلسلة الكتل عبر استدعاء الإجراءات عن بُعد من جوجل(gRPC) وتعريفات الأنواع المعروفة. يمكن القيام بذلك باستخدام [فايرهوز](فايرهوز/)، وهي تقنية جديدة تم تطويرها بواسطة [ستريمنج فاست](https://www.streamingfast.io/)، وتوفر حلاً لفهرسة سلسلة الكتل والقابلة للتوسع باستخدام نهج قائم على الملفات والتدفق المباشر. يمكنكم التواصل مع [فريق ستريمنج فاست](mailto:integrations@streamingfast.io/) إذا كنتم بحاجة إلى مساعدة في تطوير فايرهوز. -## Difference between EVM JSON-RPC & Firehose +## الفرق بين استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية والفايرهوز -While the two are suitable for subgraphs, a Firehose is always required for developers wanting to build with [Substreams](substreams/), like building [Substreams-powered subgraphs](cookbook/substreams-powered-subgraphs/). In addition, Firehose allows for improved indexing speeds when compared to JSON-RPC. +في حين أن الاثنين مناسبان للغرافات الفرعية، فإن فايرهوز مطلوب دائمًا للمطورين الراغبين في البناء باستخدام [سبستريمز](سبستريمز/)، مثل بناء [غرافات فرعية مدعومة بسبستريمز](cookbook/substreams-powered-subgraphs/). بالإضافة إلى ذلك، يسمح فايرهوز بتحسين سرعات الفهرسة مقارنةً باستدعاء الإجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت. -New EVM chain integrators may also consider the Firehose-based approach, given the benefits of substreams and its massive parallelized indexing capabilities. Supporting both allows developers to choose between building substreams or subgraphs for the new chain. +قد يفكر المطورون الجدد لسلاسل آلة الإيثيريوم الافتراضة أيضًا في الاستفادة من نهج فايرهوز بناءً على فوائد سبستريمز وقدرات الفهرسة المتوازية الضخمة. إن دعم كليهما يسمح للمطورين بالاختيار بين بناء سبستريمز أو غرافات فرعية للسلسلة الجديدة. -> **NOTE**: A Firehose-based integration for EVM chains will still require Indexers to run the chain's archive RPC node to properly index subgraphs. This is due to the Firehose's inability to provide smart contract state typically accessible by the `eth_call` RPC method. (It's worth reminding that eth_calls are [not a good practice for developers](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) +> ملاحظة: أن التكامل القائم على فايرهوز لسلاسل الآلة الإيثيريوم الافتراضية يتطلب من المفهرسين تشغيل عقدة نداء الإجراء عن بعد للأرشيف الخاص بالشبكة لفهرسة الغرافات الفرعية بشكل صحيح. يرجع ذلك إلى عدم قدرة فايرهوز على توفير حالة العقد الذكية التي يمكن الوصول إليها عادةً بطريقةنداء الإجراء عن بعد `eth_call`. (من الجدير بالذكر أن استخدام eth_calls [ليست ممارسة جيدة للمطورين](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) --- -## Testing an EVM JSON-RPC +## اختبار استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية (EVM JSON-RPC) -For Graph Node to be able to ingest data from an EVM chain, the RPC node must expose the following EVM JSON RPC methods: +لكي تتمكن عقدة الغراف من جمع البيانات من سلسلة EVM، يجب أن يوفر العقد RPC طرق EVM JSON RPC التالية: - `eth_getLogs` -- `eth_call` \_(for historical blocks, with EIP-1898 - requires archive node): +- `eth_call` \_(للكتل التاريخية، باستخدام EIP-1898 - يتطلب نقطة أرشيف): - `eth_getBlockByNumber` - `eth_getBlockByHash` - `net_version` -- `eth_getTransactionReceipt`, in a JSON-RPC batch request -- _`trace_filter`_ _(optionally required for Graph Node to support call handlers)_ +- `eth_getTransactionReceipt`، ضمن طلب دفعة استدعاء الإجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت +- _`trace_filter`_ _(مطلوبة اختياريًا لعقدة الغراف لدعم معالجات الاستدعاء)_ -### Graph Node Configuration +### تكوين عقدة الغراف -**Start by preparing your local environment** +**ابدأ بإعداد بيئتك المحلية** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [استنسخ عقدة الغراف](https://github.com/graphprotocol/graph-node) +2. قم بتعديل [هذا السطر](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) لتضمين اسم الشبكة الجديدة والعنوان المتوافق مع استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية + > لا تقم بتعديل اسم المتغير البيئي نفسه. يجب أن يظل اسمه `ethereum` حتى لو كان اسم الشبكة مختلفًا. +3. قم بتشغيل عقدة نظام الملفات بين الكواكب (IPFS) أو استخدم العقدة التي يستخدمها الغراف: https://api.thegraph.com/ipfs/ -**Test the integration by locally deploying a subgraph** +**اختبر التكامل من خلال نشر الغراف الفرعي محليًا.** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. قم بتثبيت [graph-cli](https://github.com/graphprotocol/graph-cli) +2. قم بإنشاء مثالًا بسيطًا للغراف الفرعي. بعض الخيارات المتاحة هي كالتالي: + 1. يُعتبر [غرافيتار](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) المُعد مسبقًا مثالًا جيدًا لعقد ذكي وغراف فرعي كنقطة انطلاقة جيدة + 2. قم بإعداد غراف فرعي محلي من أي عقد ذكي موجود أو بيئة تطوير صلبة [باستخدام هاردهات وملحق الغراف](https://github.com/graphprotocol/hardhat-graph) +3. قم بتعديل subgraph.yaml الناتج عن طريق تغيير [`dataSources.network`](http://dataSources.network) إلى نفس الاسم الذي تم تمريره سابقًا إلى عقدة الغراف. +4. أنشئ غرافك الفرعي في عقدة الغراف: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. انشر غرافك الفرعي إلى عقدة الغراف: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` -Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. +إذا لم تكن هناك أخطاء يجب أن يقوم عقدة الغراف بمزامنة الغراف الفرعي المنشور. قم بمنحه بعض الوقت لإتمام عملية المزامنة، ثم قم بإرسال بعض استعلامات لغة الإستعلام للغراف (GraphQL) إلى نقطة نهاية واجهة برمجة التطبيقات الموجودة في السجلات. --- -## Integrating a new Firehose-enabled chain +## تكامل سلسلة جديدة تدعم فايرهوز -Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: +يتيح فايرهوز أيضًا إمكانية دمج سلسلة جديدة. يُعتبر هذا حاليًا الخيار الأفضل للسلاسل الغير معتمدة على آلة الإيثريوم الافتراضية ويعتبر متطلبًا لدعم سبستريمز. الوثائق الإضافية تركز على كيفية عمل فايرهوز وإضافة دعم فايرهوز لسلسلة جديدة ودمجها مع عقدة الغراف. يُوصى بالوثائق التالية للمطورين الذين يقومون بذلك: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [وثائق عامة عن فايرهوز] (firehose/) +2. [إضافة دعم فايرهوز لسلسلة جديدة](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [دمج غراف نود مع سلسلة جديدة عبر فايرهوز](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 84896f378c9d11323ffcf25acff95e567e67148a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:40 -0400 Subject: [PATCH 507/924] New translations new-chain-integration.mdx (Czech) --- website/pages/cs/new-chain-integration.mdx | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/website/pages/cs/new-chain-integration.mdx b/website/pages/cs/new-chain-integration.mdx index b5492d5061af..802fabe16fc0 100644 --- a/website/pages/cs/new-chain-integration.mdx +++ b/website/pages/cs/new-chain-integration.mdx @@ -1,39 +1,39 @@ --- -title: Integrating New Networks +title: Integrace nových sítí --- -Graph Node can currently index data from the following chain types: +Uzel grafu může v současné době indexovat data z následujících typů řetězců: - Ethereum, via EVM JSON-RPC and [Ethereum Firehose](https://github.com/streamingfast/firehose-ethereum) -- NEAR, via a [NEAR Firehose](https://github.com/streamingfast/near-firehose-indexer) -- Cosmos, via a [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) -- Arweave, via an [Arweave Firehose](https://github.com/graphprotocol/firehose-arweave) +- NEAR, prostřednictvím [NEAR Firehose](https://github.com/streamingfast/near-firehose-indexer) +- Cosmos, prostřednictvím [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) +- Arweave, prostřednictvím [Arweave Firehose](https://github.com/graphprotocol/firehose-arweave) -If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. +Pokud máte zájem o některý z těchto řetězců, je integrace otázkou konfigurace a testování uzlu Graf. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +Pokud máte zájem o jiný typ řetězce, je třeba vytvořit novou integraci s Uzel Graf. Naším doporučeným přístupem je vytvoření nového Firehose pro daný řetězec a následná integrace tohoto Firehose s Uzel Graf. Více informací naleznete níže. **1. EVM JSON-RPC** -If the blockchain is EVM equivalent and the client/node exposes the standard EVM JSON-RPC API, Graph Node should be able to index the new chain. For more information, refer to [Testing an EVM JSON-RPC](new-chain-integration#testing-an-evm-json-rpc). +Pokud je blockchain ekvivalentní EVM a klient/uzel vystavuje standardní EVM JSON-RPC API, měl by být Uzel Grafu schopen indexovat nový řetězec. Další informace naleznete v části [Testování EVM JSON-RPC](new-chain-integration#testing-an-evm-json-rpc). **2. Firehose** -For non-EVM-based chains, Graph Node must ingest blockchain data via gRPC and known type definitions. This can be done via [Firehose](firehose/), a new technology developed by [StreamingFast](https://www.streamingfast.io/) that provides a highly-scalable indexing blockchain solution using a files-based and streaming-first approach. Reach out to the [StreamingFast team](mailto:integrations@streamingfast.io/) if you need help with Firehose development. +U řetězců, které nejsou založeny na EvM, musí Uzel Graf přijímat data blockchainu prostřednictvím gRPC a známých definic typů. To lze provést prostřednictvím [Firehose](firehose/), nové technologie vyvinuté společností [StreamingFast](https://www.streamingfast.io/), která poskytuje vysoce škálovatelné řešení indexování blockchainu pomocí přístupu založeného na souborech a streamování. Pokud potřebujete s vývojem Firehose pomoci, obraťte se na tým [StreamingFast](mailto:integrations@streamingfast.io/). -## Difference between EVM JSON-RPC & Firehose +## Rozdíl mezi EVM JSON-RPC a Firehose -While the two are suitable for subgraphs, a Firehose is always required for developers wanting to build with [Substreams](substreams/), like building [Substreams-powered subgraphs](cookbook/substreams-powered-subgraphs/). In addition, Firehose allows for improved indexing speeds when compared to JSON-RPC. +Zatímco pro podgrafy jsou tyto dva typy vhodné, pro vývojáře, kteří chtějí vytvářet pomocí [Substreams](substreams/), jako je vytváření [Substreams-powered subgraphs](cookbook/substreams-powered-subgraphs/), je vždy vyžadován Firehose. Firehose navíc umožňuje vyšší rychlost indexování ve srovnání s JSON-RPC. -New EVM chain integrators may also consider the Firehose-based approach, given the benefits of substreams and its massive parallelized indexing capabilities. Supporting both allows developers to choose between building substreams or subgraphs for the new chain. +Noví integrátoři řetězců EVM mohou také zvážit přístup založený na technologii Firehose vzhledem k výhodám substreamů a jejím masivním možnostem paralelizovaného indexování. Podpora obojího umožňuje vývojářům zvolit si mezi vytvářením substreamů nebo podgrafů pro nový řetězec. -> **NOTE**: A Firehose-based integration for EVM chains will still require Indexers to run the chain's archive RPC node to properly index subgraphs. This is due to the Firehose's inability to provide smart contract state typically accessible by the `eth_call` RPC method. (It's worth reminding that eth_calls are [not a good practice for developers](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) +> **POZNÁMKA**: Integrace založená na Firehose pro řetězce EVM bude stále vyžadovat, aby indexátory spustily archivační uzel RPC řetězce, aby správně indexovaly podgrafy. Důvodem je neschopnost Firehose poskytovat stav inteligentních kontraktů typicky přístupný metodou `eth_call` RPC. (Stojí za to připomenout, že eth_call je [pro vývojáře není dobrou praxí](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) --- -## Testing an EVM JSON-RPC +## Testování EVM JSON-RPC -For Graph Node to be able to ingest data from an EVM chain, the RPC node must expose the following EVM JSON RPC methods: +Aby mohl uzel Grafu přijímat data z řetězce EVM, musí uzel RPC zpřístupnit následující metody EVM JSON RPC: - `eth_getLogs` - `eth_call` \_(for historical blocks, with EIP-1898 - requires archive node): @@ -41,26 +41,26 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex - `eth_getBlockByHash` - `net_version` - `eth_getTransactionReceipt`, in a JSON-RPC batch request -- _`trace_filter`_ _(optionally required for Graph Node to support call handlers)_ +- _`trace_filter`_ _(volitelně vyžadováno pro Uzel Graf, aby podporoval obsluhu volání)_ -### Graph Node Configuration +### Config uzlu grafu -**Start by preparing your local environment** +**Začněte přípravou místního prostředí** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 266654e1a4d2f47907ac2cb75c0a4191eb74127c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:41 -0400 Subject: [PATCH 508/924] New translations new-chain-integration.mdx (German) --- website/pages/de/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/de/new-chain-integration.mdx b/website/pages/de/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/de/new-chain-integration.mdx +++ b/website/pages/de/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From ebc9969e4a942517e44cd8de1f620893bd5f2c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:42 -0400 Subject: [PATCH 509/924] New translations new-chain-integration.mdx (Italian) --- website/pages/it/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/it/new-chain-integration.mdx b/website/pages/it/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/it/new-chain-integration.mdx +++ b/website/pages/it/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 4bfa2267e925ba40a209a85d2b6e24581f66e410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:43 -0400 Subject: [PATCH 510/924] New translations new-chain-integration.mdx (Japanese) --- website/pages/ja/new-chain-integration.mdx | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/ja/new-chain-integration.mdx b/website/pages/ja/new-chain-integration.mdx index 421fb74e4696..c3971a530a60 100644 --- a/website/pages/ja/new-chain-integration.mdx +++ b/website/pages/ja/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Nodeは現在、以下のチェーンタイプからデータをインデ もしご興味があるチェーンがあれば、統合はGraph Nodeの設定とテストの問題です。 -もしも異なるチェーンタイプに興味がある場合は、新しいGraph Nodeを構築する必要があります。私たちの推奨するアプローチは、まず対象のチェーン用の新しいFirehoseを開発し、それをGraph Nodeと統合することです。詳細は以下に記載しています。 +異なるチェーンタイプに興味がある場合、Graph Nodeとの新しい統合を構築する必要があります。私たちの推奨するアプローチは、問題のチェーン用に新しい Firehose を開発し、その Firehose を Graph Node と統合することです。詳細は下記をご覧ください。 **1. EVM JSON-RPC** @@ -19,7 +19,7 @@ Graph Nodeは現在、以下のチェーンタイプからデータをインデ **2. Firehose** -For non-EVM-based chains, Graph Node must ingest blockchain data via gRPC and known type definitions. This can be done via [Firehose](firehose/), a new technology developed by [StreamingFast](https://www.streamingfast.io/) that provides a highly-scalable indexing blockchain solution using a files-based and streaming-first approach. Reach out to the [StreamingFast team](mailto:integrations@streamingfast.io/) if you need help with Firehose development. +EVMベースでないチェーンの場合、Graph NodeはgRPCと既知の型定義を介してブロックチェーンデータを取り込む必要があります。これは[StreamingFast](https://www.streamingfast.io/)によって開発された新技術である[Firehose](firehose/)を介して行うことができ、ファイルベースとストリーミングファーストアプローチを使用して高度にスケーラブルなインデックス化ブロックチェーンソリューションを提供します。Firehoseの開発でサポートが必要な場合は、[StreamingFastチーム](mailto:integrations@streamingfast.io/)までご連絡ください。 ## EVM JSON-RPC と Firehose の違い @@ -47,20 +47,20 @@ Graph NodeがEVMチェーンからデータを取り込むためには、RPCノ **ローカル環境を準備することから始めます** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. [この行](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) を変更して、新しいネットワーク名と EVM JSON RPC 準拠の URL を含めます。 - > 環境変数名自体は変更しないでください。ネットワーク名が異なる場合でも、「ethereum」という名前のままである必要があります。 -3. IPFSノードを実行するか、The Graphが使用するものを使用してください: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. [この行](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) を変更して、新しいネットワーク名と EVM JSON RPC 準拠の URL を含めます。 + > 環境変数名自体は変更しないでください。ネットワーク名が異なる場合でも、「ethereum」という名前のままである必要があります。 +3. IPFSノードを実行するか、The Graphが使用するものを使用してください: https://api.thegraph.com/ipfs/ **サブグラフをローカルにデプロイして統合をテストします。** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. 簡単なサブグラフの例を作成します。 いくつかのオプションを以下に示します。 - 1. 事前にパックされた [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) スマート コントラクトとサブグラフは良い出発点です。 - 2. 既存のスマート コントラクトまたは Solidity 開発環境からローカル サブグラフをブートストラップする [グラフ プラグインで Hardhat を使用](https://github.com/graphprotocol/hardhat-graph) -3. [`dataSources.network`](http://dataSources.network) を以前にグラフ ノードに渡した同じ名前に変更して、結果の `subgraph.yaml` を調整します。 -4. グラフ ノードでサブグラフを作成します: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. サブグラフをGraph Nodeに公開するには、次のコマンドを使用します:graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. 簡単なサブグラフの例を作成します。 いくつかのオプションを以下に示します。 + 1. 事前にパックされた [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) スマート コントラクトとサブグラフは良い出発点です。 + 2. 既存のスマート コントラクトまたは Solidity 開発環境からローカル サブグラフをブートストラップする [グラフ プラグインで Hardhat を使用](https://github.com/graphprotocol/hardhat-graph) +3. [`dataSources.network`](http://dataSources.network) を以前にグラフ ノードに渡した同じ名前に変更して、結果の `subgraph.yaml` を調整します。 +4. グラフ ノードでサブグラフを作成します: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. サブグラフをGraph Nodeに公開するには、次のコマンドを使用します:graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT Graph Nodeはエラーがない場合、デプロイされたサブグラフを同期するはずです。同期が完了するのを待ってから、ログに表示されたAPIエンドポイントに対していくつかのGraphQLクエリを送信してください。 @@ -70,6 +70,6 @@ Graph Nodeはエラーがない場合、デプロイされたサブグラフを 新しいチェーンを統合することは、Firehoseアプローチを使用しても可能です。これは、非EVMチェーン向けの現在の最良のオプションであり、サブストリームサポートの要件でもあります。追加のドキュメントでは、Firehoseの動作方法、新しいチェーンへのFirehoseサポートの追加、およびGraph Nodeとの統合に焦点を当てています。統合者に推奨されるドキュメント: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [新チェーンのFirehoseサポート追加](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 2e7be96fd0016404abd678a6d9b58a77ca0efa4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:44 -0400 Subject: [PATCH 511/924] New translations new-chain-integration.mdx (Korean) --- website/pages/ko/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/ko/new-chain-integration.mdx b/website/pages/ko/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/ko/new-chain-integration.mdx +++ b/website/pages/ko/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From be6016e79ff9a160ebfeae45be2aa8d947bd0bd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:45 -0400 Subject: [PATCH 512/924] New translations new-chain-integration.mdx (Dutch) --- website/pages/nl/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/nl/new-chain-integration.mdx b/website/pages/nl/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/nl/new-chain-integration.mdx +++ b/website/pages/nl/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From e06474fb27fcbf829c6a7361c9b0162a416ef47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:45 -0400 Subject: [PATCH 513/924] New translations new-chain-integration.mdx (Polish) --- website/pages/pl/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/pl/new-chain-integration.mdx b/website/pages/pl/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/pl/new-chain-integration.mdx +++ b/website/pages/pl/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 88885080607694fc87841f9ff68dc5767f53aaa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:46 -0400 Subject: [PATCH 514/924] New translations new-chain-integration.mdx (Portuguese) --- website/pages/pt/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/pt/new-chain-integration.mdx b/website/pages/pt/new-chain-integration.mdx index 16b0d35f387b..cf5e3fdbc029 100644 --- a/website/pages/pt/new-chain-integration.mdx +++ b/website/pages/pt/new-chain-integration.mdx @@ -11,7 +11,7 @@ Atualmente, Graph Nodes podem indexar dados dos seguintes tipos de chain: Se tiver interesse em qualquer destas chains, a integração será uma questão de configuração e testes do Graph Node. -Caso tenha interesse num tipo diferente de chain, será necessária a criação de uma chain nova com o Graph Node. Recomendamos programar um novo Firehose para a chain em questão e então a integração daquele Firehose com o Graph Node. Mais informações abaixo. +Caso tenha interesse num tipo diferente de chain, será necessária a criação de uma integração nova com o Graph Node. Recomendamos programar um novo Firehose para a chain em questão e então a integração daquele Firehose com o Graph Node. Mais informações abaixo. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ Para que o Graph Node possa ingerir dados de uma chain EVM, o node RPC deve expo **Primeiro, prepare o seu ambiente local** -1. [Clone o Graph Node](https://github.com/graphprotocol/graph-node) -2. Modifique [esta linha](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) para ela incluir o nome da nova rede e a URL do EVM JSON-RPC - > Não mude o nome do env var. Ele deve permanecer como `ethereum` mesmo se o nome da rede for diferente. -3. Execute um node IPFS ou use aquele usado pelo The Graph: https://api.thegraph.com/ipfs/ +1. [Clone o Graph Node](https://github.com/graphprotocol/graph-node) +2. Modifique [esta linha](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) para ela incluir o nome da nova rede e a URL do EVM JSON-RPC + > Não mude o nome do env var. Ele deve permanecer como `ethereum` mesmo se o nome da rede for diferente. +3. Execute um node IPFS ou use aquele usado pelo The Graph: https://api.thegraph.com/ipfs/ **Teste a integração com o lançamento local de um subgraph** -1. Instale o [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Crie um subgraph de exemplo simples. Aqui estão algumas opções: - 1. O contrato inteligente e o subgraph [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) pré-inclusos são bons para começar - 2. Inicie um subgraph local de qualquer contrato inteligente existente ou de um ambiente de programação em solidity [com o uso do Hardhat com um plugin do Graph](https://github.com/graphprotocol/hardhat-graph) -3. Adapte o `subgraph.yaml` resultante com a mudança do [`dataSources.network`](http://dataSources.network) para o mesmo nome passado anteriormente ao Graph Node. -4. Crie o seu subgraph no Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publique o seu subgraph no Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Instale o [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Crie um subgraph de exemplo simples. Aqui estão algumas opções: + 1. O contrato inteligente e o subgraph [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) pré-inclusos são bons para começar + 2. Inicie um subgraph local de qualquer contrato inteligente existente ou de um ambiente de programação em solidity [com o uso do Hardhat com um plugin do Graph](https://github.com/graphprotocol/hardhat-graph) +3. Adapte o `subgraph.yaml` resultante com a mudança do [`dataSources.network`](http://dataSources.network) para o mesmo nome passado anteriormente ao Graph Node. +4. Crie o seu subgraph no Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publique o seu subgraph no Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` O Graph Node deve então sincronizar o subgraph lançado caso não haja erros. Dê um tempo para que ele sincronize, e depois envie alguns queries em GraphQL ao endpoint da API produzido pelos logs. @@ -70,6 +70,6 @@ O Graph Node deve então sincronizar o subgraph lançado caso não haja erros. D Integrar uma nova chain também é possível com a abordagem do Firehose. Esta é, atualmente, a melhor opção para chains não-EVM, e necessária para o apoio do substreams. Há mais documentações sobre como o Firehose funciona, como adicionar apoio ao Firehose para uma nova chain, e como integrá-la com o Graph Node. Documentos recomendados para integradores: -1. [Documentos gerais sobre o Firehose](firehose/) -2. [Como adicionar apoio do Firehose a uma nova chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integração do Graph Node com uma nova chain através do Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [Documentos gerais sobre o Firehose](firehose/) +2. [Como adicionar apoio do Firehose a uma nova chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integração do Graph Node com uma nova chain através do Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From f068f3c73b1f2d0adabb4aca45d368bd37ef385b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:47 -0400 Subject: [PATCH 515/924] New translations new-chain-integration.mdx (Russian) --- website/pages/ru/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/ru/new-chain-integration.mdx b/website/pages/ru/new-chain-integration.mdx index d6bd088665be..5a95ed5a7be7 100644 --- a/website/pages/ru/new-chain-integration.mdx +++ b/website/pages/ru/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ \*_Протестируйте интеграцию, локально развернув субграф_ -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From c049b0f4defb91ff6a466e4f6669529e61acb6c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:48 -0400 Subject: [PATCH 516/924] New translations new-chain-integration.mdx (Swedish) --- website/pages/sv/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/sv/new-chain-integration.mdx b/website/pages/sv/new-chain-integration.mdx index 9888c83b03b4..46695200aa52 100644 --- a/website/pages/sv/new-chain-integration.mdx +++ b/website/pages/sv/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graf Node kan för närvarande indexera data från följande typer av blockkedjo Om du är intresserad av någon av dessa blockkedjor är integrering en fråga om konfiguration och testning av Graf Node. -Om du är intresserad av en annan typ av blockkedja måste en ny med Graf Node byggas. Vårt rekommenderade tillvägagångssätt är att utveckla en ny Firehose för den aktuella blockkedjan och sedan integrera den Firehosen med Graph Node. Mer information nedan. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ För att Graf Node ska kunna ta emot data från en EVM-blockkedja måste RPC-nod **Börja med att förbereda din lokala miljö** -1. [Klona Graf Node](https://github.com/graphprotocol/graph-node) -2. Ändra [den här raden](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) för att inkludera det nya nätverksnamnet och den EVM JSON-RPC-kompatibla URL:n - > Byt inte namnet på env-var självt. Det måste förbli `ethereum` även om nätverksnamnet är annorlunda. -3. Kör en IPFS-nod eller använd den som används av The Graf: https://api.thegraph.com/ipfs/ +1. [Klona Graf Node](https://github.com/graphprotocol/graph-node) +2. Ändra [den här raden](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) för att inkludera det nya nätverksnamnet och den EVM JSON-RPC-kompatibla URL:n + > Byt inte namnet på env-var självt. Det måste förbli `ethereum` även om nätverksnamnet är annorlunda. +3. Kör en IPFS-nod eller använd den som används av The Graf: https://api.thegraph.com/ipfs/ **Testa integrationen genom att lokalt distribuera en subgraf** -1. Installera [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Skapa en enkel exempelsubgraf. Några alternativ är nedan: - 1. Den förpackade [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323)-smartkontrakt och subgraf är en bra startpunkt - 2. Starta en lokal subgraf från ett befintligt smart kontrakt eller en Solidity-utvecklingsmiljö [med hjälp av Hardhat med ett Graf-plugin](https://github.com/graphprotocol/hardhat-graph) -3. Anpassa den resulterande `subgraph.yaml` genom att ändra [`dataSources.network`](http://dataSources.network) till samma namn som tidigare angavs för Graf Node. -4. Skapa din subgraf i Graf Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publicera din subgraf till Graf Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Installera [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Skapa en enkel exempelsubgraf. Några alternativ är nedan: + 1. Den förpackade [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323)-smartkontrakt och subgraf är en bra startpunkt + 2. Starta en lokal subgraf från ett befintligt smart kontrakt eller en Solidity-utvecklingsmiljö [med hjälp av Hardhat med ett Graf-plugin](https://github.com/graphprotocol/hardhat-graph) +3. Anpassa den resulterande `subgraph.yaml` genom att ändra [`dataSources.network`](http://dataSources.network) till samma namn som tidigare angavs för Graf Node. +4. Skapa din subgraf i Graf Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publicera din subgraf till Graf Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graf Node bör synkronisera den distribuerade subgrafen om det inte finns några fel. Ge det tid att synkronisera, och skicka sedan några GraphQL-begäranden till API-slutpunkten som skrivs ut i loggarna. @@ -70,6 +70,6 @@ Graf Node bör synkronisera den distribuerade subgrafen om det inte finns några Det är också möjligt att integrera en ny blockkedja med Firehose-metoden. Detta är för närvarande det bästa alternativet för icke-EVM-blockkedjor och ett krav för stöd för delströmmar. Ytterligare dokumentation fokuserar på hur Firehose fungerar, hur du lägger till Firehose-stöd för en ny blockkedja och integrerar den med Graf Node. Rekommenderade dokument för integratörer: -1. [Allmänna dokument om Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrera Graf Node med en ny blockkedja via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [Allmänna dokument om Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrera Graf Node med en ny blockkedja via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From afd8c9a37e0ff7976f853de2d93db0cc2ca40923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:48 -0400 Subject: [PATCH 517/924] New translations new-chain-integration.mdx (Turkish) --- website/pages/tr/new-chain-integration.mdx | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/tr/new-chain-integration.mdx b/website/pages/tr/new-chain-integration.mdx index 042b23c42b11..e81058d9263c 100644 --- a/website/pages/tr/new-chain-integration.mdx +++ b/website/pages/tr/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Düğümü şu anda aşağıdaki zincir türlerinden verileri indeksleyebi Bu zincirlerden herhangi biriyle ilgileniyorsanız, entegrasyon Graph Düğümü yapılandırması ve testinden ibarettir. -Farklı bir zincir türüyle ilgileniyorsanız, Graph Düğümü ile yeni bir zincir oluşturmanız gerekir. Önerilen yaklaşımımız, söz konusu zincir için yeni bir Firehose geliştirmek ve ardından bu Firehose'u Graph Düğümü ile entegre etmektir. Daha fazla bilgi için aşağıya bakın. +Farklı bir zincir tipiyle ilgileniyorsanız Graph Node ile yeni bir entegrasyon kurulmalıdır. Önerilen yaklaşımımız, söz konusu zincir için yeni bir Firehose geliştirmek ve ardından bu Firehose'un Graph Node ile entegrasyonunu sağlamaktır. Daha fazla bilgi aşağıda yer almaktadır. **1. EVM JSON-RPC** @@ -19,7 +19,7 @@ Blok zinciri EVM eşdeğeri ise ve istemci/düğüm standart EVM JSON-RPC API'si **2. Firehose** -EVM tabanlı olmayan zincirler için, Graph Düğümü blok zinciri verilerini gRPC ve bilinen tip tanımları aracılığıyla alması zorunludur. Bu, [StreamingFast] \(https://www.streamingfast.io/) tarafından geliştirilen ve dosya tabanlı ve akış öncelikli bir yaklaşım kullanarak yüksek ölçeklenebilir bir indeksleme blok zinciri çözümü sağlayan yeni bir teknoloji olan [Firehose](firehose/) aracılığıyla yapılabilir. [StreamingFast team](mailto:integrations@streamingfast.io/) geliştirme konusunda yardıma ihtiyacınız varsa StreamingFast ekibine ulaşın. +EVM tabanlı olmayan zincirler için, Graph Düğümü blok zinciri verilerini gRPC ve bilinen tip tanımları aracılığıyla alması zorunludur. Bu, [StreamingFast] (https://www.streamingfast.io/) tarafından geliştirilen ve dosya tabanlı ve akış öncelikli bir yaklaşım kullanarak yüksek ölçeklenebilir bir indeksleme blok zinciri çözümü sağlayan yeni bir teknoloji olan [Firehose](firehose/) aracılığıyla yapılabilir. [StreamingFast team](mailto:integrations@streamingfast.io/) geliştirme konusunda yardıma ihtiyacınız varsa StreamingFast ekibine ulaşın. ## EVM JSON-RPC ve Firehose arasındaki fark @@ -43,24 +43,24 @@ Graph Düğümü'nün bir EVM zincirinden veri alabilmesi için RPC düğümün - `eth_getTransactionReceipt`, bir JSON-RPC toplu talebinde - _`trace_filter`_ _(Graph Düğümü'nün çağrı işleyicilerini desteklemesi için opsiyonel olarak gereklidir)_ -### Graph Düğümü Konfigürasyonu +### Graph Node Konfigürasyonu **Yerel ortamınızı hazırlayarak başlayın** -1. [Graph Düğümü'nü Klonlayın](https://github.com/graphprotocol/graph-node) -2. [Bu satırı](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) yeni ağ adını ve EVM JSON RPC uyumlu URL'yi içerecek şekilde değiştirin - > env var adının kendisini değiştirmeyin. Ağ adı farklı olsa bile `ethereum` olarak kalmalıdır. -3. Bir IPFS düğümü çalıştırın veya Graph tarafından kullanılanı kullanın: https://api.thegraph.com/ipfs/ +1. [Graph Düğümü'nü Klonlayın](https://github.com/graphprotocol/graph-node) +2. [Bu satırı](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) yeni ağ adını ve EVM JSON RPC uyumlu URL'yi içerecek şekilde değiştirin + > env var adının kendisini değiştirmeyin. Ağ adı farklı olsa bile `ethereum` olarak kalmalıdır. +3. Bir IPFS düğümü çalıştırın veya Graph tarafından kullanılanı kullanın: https://api.thegraph.com/ipfs/ **Bir subgraph'ı yerel olarak dağıtarak entegrasyonu test edin** -1. [graph-cli](https://github.com/graphprotocol/graph-cli)'ı yükleyin -2. Basit bir örnek subgraph oluşturun. Bazı seçenekler aşağıdadır: - 1. Önceden paketlenmiş [Gravitar] \(https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) akıllı sözleşmesi ve subgraph'ı iyi bir başlangıç noktasıdır - 2. [Bir Graph eklentisi ile Hardhat kullanarak](https://github.com/graphprotocol/hardhat-graph) mevcut herhangi bir akıllı sözleşmeden veya solidity geliştirme ortamından yerel bir subgraph'ı önyükleyin -3. Elde edilen `subgraph.yaml`'ı, [`dataSources.network`](http://dataSources.network)'ü daha önce Graph Node'a aktarılan adla değiştirerek uyarlayın. -4. Graph Düğümü'nde subgraph'ınızı oluşturun: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Subgraph'ınızı Graph Düğümü'nde yayınlayın: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. [graph-cli](https://github.com/graphprotocol/graph-cli)'ı yükleyin +2. Basit bir örnek subgraph oluşturun. Bazı seçenekler aşağıdadır: + 1. Önceden paketlenmiş [Gravitar] (https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) akıllı sözleşmesi ve subgraph'ı iyi bir başlangıç noktasıdır + 2. [Bir Graph eklentisi ile Hardhat kullanarak](https://github.com/graphprotocol/hardhat-graph) mevcut herhangi bir akıllı sözleşmeden veya solidity geliştirme ortamından yerel bir subgraph'ı önyükleyin +3. Elde edilen `subgraph.yaml`'ı, [`dataSources.network`](http://dataSources.network)'ü daha önce Graph Node'a aktarılan adla değiştirerek uyarlayın. +4. Graph Düğümü'nde subgraph'ınızı oluşturun: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Subgraph'ınızı Graph Düğümü'nde yayınlayın: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Herhangi bir hata olmadığı takdirde Graph Düğü'mü dağıtılan subgraph'ı senkronize ediyor olmalıdır. Senkronizasyon için zaman tanıyın, ardından kayıtlarla yazdırılan API uç noktasına bazı GraphQL sorguları gönderin. @@ -70,6 +70,6 @@ Herhangi bir hata olmadığı takdirde Graph Düğü'mü dağıtılan subgraph' Yeni bir zincirin entegrasyonu, Firehose yaklaşımını kullanarak da mümkündür. Bu, şu anda EVM dışı zincirler için en iyi seçenektir ve substreams desteği için bir gerekliliktir. Ek dokümantasyon, Firehose'un nasıl çalıştığına, yeni bir zincir için Firehose desteği eklemeyi ve onun Graph Düğümü ile entegrasyonunu içerir. Entegre ediciler için önerilen dokümanlar: -1. [Firehose ile ilgili genel dokümanlar](firehose/) -2. [Yeni bir zincir için Firehose desteği ekleme](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Firehose aracılığıyla Graph Düğümü'nün yeni bir zincirle entegrasyonu](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [Firehose ile ilgili genel dokümanlar](firehose/) +2. [Yeni bir zincir için Firehose desteği ekleme](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Firehose aracılığıyla Graph Düğümü'nün yeni bir zincirle entegrasyonu](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 7e6762dacb7b6f36ef51fd57d9e3e262a1898cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:49 -0400 Subject: [PATCH 518/924] New translations new-chain-integration.mdx (Ukrainian) --- website/pages/uk/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/uk/new-chain-integration.mdx b/website/pages/uk/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/uk/new-chain-integration.mdx +++ b/website/pages/uk/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From f433d80bd42c6eb64117b3be63bf3b4ee706efe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:50 -0400 Subject: [PATCH 519/924] New translations new-chain-integration.mdx (Chinese Simplified) --- website/pages/zh/new-chain-integration.mdx | 76 +++++++++++----------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/website/pages/zh/new-chain-integration.mdx b/website/pages/zh/new-chain-integration.mdx index b5492d5061af..15f32f01db74 100644 --- a/website/pages/zh/new-chain-integration.mdx +++ b/website/pages/zh/new-chain-integration.mdx @@ -1,75 +1,75 @@ --- -title: Integrating New Networks +title: 集成新网络 --- -Graph Node can currently index data from the following chain types: +Graph Node目前可以从以下链类型中索引数据: -- Ethereum, via EVM JSON-RPC and [Ethereum Firehose](https://github.com/streamingfast/firehose-ethereum) -- NEAR, via a [NEAR Firehose](https://github.com/streamingfast/near-firehose-indexer) -- Cosmos, via a [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) -- Arweave, via an [Arweave Firehose](https://github.com/graphprotocol/firehose-arweave) +- 通过EVM JSON-RPC和Ethereum Firehose(https://github.com/streamingfast/firehose-ethereum)进行以太坊的索引 +- 通过NEAR Firehose(https://github.com/streamingfast/near-firehose-indexer)进行NEAR的索引 +- 通过Cosmos Firehose(https://github.com/graphprotocol/firehose-cosmos)进行Cosmos的索引 +- 通过Arweave Firehose(https://github.com/graphprotocol/firehose-arweave)进行Arweave的索引 -If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. +如果您对其中任何一种链感兴趣,集成是Graph Node配置和测试的事情。 -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** -If the blockchain is EVM equivalent and the client/node exposes the standard EVM JSON-RPC API, Graph Node should be able to index the new chain. For more information, refer to [Testing an EVM JSON-RPC](new-chain-integration#testing-an-evm-json-rpc). +如果区块链与EVM等效,并且客户端/节点公开标准的EVM JSON-RPC API,Graph Node应该能够索引新的链。有关更多信息,请参阅EVM JSON-RPC测试(new-chain-integration#testing-an-evm-json-rpc)。 -**2. Firehose** +2. Firehose For non-EVM-based chains, Graph Node must ingest blockchain data via gRPC and known type definitions. This can be done via [Firehose](firehose/), a new technology developed by [StreamingFast](https://www.streamingfast.io/) that provides a highly-scalable indexing blockchain solution using a files-based and streaming-first approach. Reach out to the [StreamingFast team](mailto:integrations@streamingfast.io/) if you need help with Firehose development. -## Difference between EVM JSON-RPC & Firehose +## EVM JSON-RPC和Firehose之间的区别 -While the two are suitable for subgraphs, a Firehose is always required for developers wanting to build with [Substreams](substreams/), like building [Substreams-powered subgraphs](cookbook/substreams-powered-subgraphs/). In addition, Firehose allows for improved indexing speeds when compared to JSON-RPC. +虽然这两者都适用于子图(Subgraph),但是对于想要构建[Substreams](substreams/) 的开发人员,始终需要一个Firehose,比如构建Substreams-powered子图(cookbook/substreams-powered-subgraphs/)。此外,与JSON-RPC相比,Firehose可以实现更快的索引速度。 -New EVM chain integrators may also consider the Firehose-based approach, given the benefits of substreams and its massive parallelized indexing capabilities. Supporting both allows developers to choose between building substreams or subgraphs for the new chain. +新的EVM链集成者也可以考虑基于Firehose的方法,考虑到substreams的好处和其大规模并行化的索引能力。支持这两种方法允许开发人员在新链上选择构建substreams或子图。 -> **NOTE**: A Firehose-based integration for EVM chains will still require Indexers to run the chain's archive RPC node to properly index subgraphs. This is due to the Firehose's inability to provide smart contract state typically accessible by the `eth_call` RPC method. (It's worth reminding that eth_calls are [not a good practice for developers](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) +> 注意:基于Firehose的EVM链集成仍需要索引器运行链的归档RPC节点,以正确索引子图。这是因为Firehose无法提供通常通过eth_call RPC方法访问的智能合约状态。 (值得提醒的是,eth_calls对于开发人员来说不是一个好的实践(https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) --- -## Testing an EVM JSON-RPC +## 测试EVM JSON-RPC -For Graph Node to be able to ingest data from an EVM chain, the RPC node must expose the following EVM JSON RPC methods: +为了使Graph Node能够从EVM链中获取数据,RPC节点必须公开以下EVM JSON RPC方法: - `eth_getLogs` -- `eth_call` \_(for historical blocks, with EIP-1898 - requires archive node): +- `eth_call` \\(对于历史块,使用EIP-1898 - 需要归档节点): - `eth_getBlockByNumber` - `eth_getBlockByHash` - `net_version` -- `eth_getTransactionReceipt`, in a JSON-RPC batch request -- _`trace_filter`_ _(optionally required for Graph Node to support call handlers)_ +- `eth_getTransactionReceipt`, 在JSON-RPC批量请求中 +- _`trace_filter`_ \_(可选择支持Graph Node的调用处理程序) -### Graph Node Configuration +### Graph Node配置 -**Start by preparing your local environment** +首先准备您的本地环境 -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. 修改此行(https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22),包括新网络名称和符合EVM JSON RPC的URL + > 不要更改环境变量名称本身。它必须保持为ethereum,即使网络名称不同也是如此。 +3. 运行IPFS节点,或使用The Graph使用的IPFS节点:https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. 安装[graph-cli](https://github.com/graphprotocol/graph-cli) +2. 创建一个简单的示例子图。以下是一些选项: + 1. 预打包的[Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323)智能合约和子图是一个很好的起点 + 2. 使用任何现有的智能合约或solidity开发环境使用Hardhat和Graph插件引导本地子图(https://github.com/graphprotocol/hardhat-graph) +3. 通过将dataSources.network(http://dataSources.network) 更改为之前传递给Graph Node的相同名称,来调整生成的subgraph.yaml。 +4. 在Graph Node中创建子图:graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT +5. 将子图发布到Graph Node:graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT -Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. +如果没有错误,Graph Node应该正在同步部署的子图。给它一些时间来同步,然后向API端点发送一些GraphQL查询。 --- -## Integrating a new Firehose-enabled chain +## 集成一个新的Firehose启用链 -Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: +使用Firehose方法也可以集成新的链。这是目前非EVM链的最佳选择,也是支持substreams的要求。有关如何使用Firehose,为新链添加Firehose支持以及如何将其与Graph Node集成的其他文档。集成者的推荐文档: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. Firehose的通用文档(firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. 通过Firehose将Graph Node与新链集成(https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 7a9b410118463b8316add35305439c5708d8598c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:51 -0400 Subject: [PATCH 520/924] New translations new-chain-integration.mdx (Urdu (Pakistan)) --- website/pages/ur/new-chain-integration.mdx | 80 +++++++++++----------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/website/pages/ur/new-chain-integration.mdx b/website/pages/ur/new-chain-integration.mdx index b5492d5061af..1f431f9239f6 100644 --- a/website/pages/ur/new-chain-integration.mdx +++ b/website/pages/ur/new-chain-integration.mdx @@ -1,75 +1,75 @@ --- -title: Integrating New Networks +title: نئے نیٹ ورکس کو انٹیگریٹ کرنا --- -Graph Node can currently index data from the following chain types: +گراف نوڈ فی الحال ذیل میں دی گئ چین کی اقسام سے ڈیٹا انڈیکس کر سکتا ہے: -- Ethereum, via EVM JSON-RPC and [Ethereum Firehose](https://github.com/streamingfast/firehose-ethereum) -- NEAR, via a [NEAR Firehose](https://github.com/streamingfast/near-firehose-indexer) -- Cosmos, via a [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) -- Arweave, via an [Arweave Firehose](https://github.com/graphprotocol/firehose-arweave) +- ایتھیریم, بذریعہ EVM JSON-RPC اور [Ethereum Firehose](https://github.com/streamingfast/firehose-ethereum) +- NEAR، بذریعہ [NEAR Firehose](https://github.com/streamingfast/near-firehose-indexer) +- Cosmos، بذریعہ [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) +- Arweave، ایک [Arweave Firehose] کے ذریعے (https://github.com/graphprotocol/firehose-arweave) -If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. +اگر آپ ان میں سے کسی بھی چین میں دلچسپی رکھتے ہیں تو، انٹیگریشن گراف نوڈ کی کنفگریشن اور جانچ کا معاملہ ہے۔ -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +اگر آپ مختلف قسم کی چین میں دلچسپی رکھتے ہیں تو، گراف نوڈ کے ساتھ ایک نئی انٹیگریشن ضرور بنایا جانا چاہیے۔ ہمارا تجویز کردہ نقطہ نظر زیر بحث چین کے لیے ایک نیا فائر ہوز تیار کر رہا ہے اور پھر اس فائر ہوز کا گراف نوڈ کے ساتھ انٹیگریشن۔ ذیل میں مزید معلومات ہیں۔ -**1. EVM JSON-RPC** +**1۔ EVM JSON-RPC** -If the blockchain is EVM equivalent and the client/node exposes the standard EVM JSON-RPC API, Graph Node should be able to index the new chain. For more information, refer to [Testing an EVM JSON-RPC](new-chain-integration#testing-an-evm-json-rpc). +اگر بلاکچین EVM کے برابر ہے اور کلائنٹ/نوڈ معیاری EVM JSON-RPC API کو ظاہر کرتا ہے، تو گراف نوڈ کو نئی چین کی انڈیکس کرنے کے قابل ہونا چاہیے۔ مزید معلومات کے لیے، [EVM JSON-RPC کی ٹیسٹنگ کرنا](new-chain-integration#testing-an-evm-json-rpc) سے رجوع کریں۔ -**2. Firehose** +**2. فائر ہوز** -For non-EVM-based chains, Graph Node must ingest blockchain data via gRPC and known type definitions. This can be done via [Firehose](firehose/), a new technology developed by [StreamingFast](https://www.streamingfast.io/) that provides a highly-scalable indexing blockchain solution using a files-based and streaming-first approach. Reach out to the [StreamingFast team](mailto:integrations@streamingfast.io/) if you need help with Firehose development. +غیر EVM پر مبنی چینز کے لیے، گراف نوڈ کو gRPC اور معروف قسم کی تعریفوں کے ذریعے بلاکچین ڈیٹا کو ہضم کرنا چاہیے۔ یہ [فائر ہوز](فائر ہوز/) کے ذریعے کیا جا سکتا ہے، جو کہ [سٹریمنگ فاسٹ](https://www.streamingfast.io/) کی تیار کردہ ایک نئی ٹیکنالوجی ہے جو فائلوں پر مبنی اور سٹریمنگ کا استعمال کرتے ہوئے ایک انتہائی قابل توسیع انڈیکسنگ بلاکچین حل فراہم کرتی ہے۔ پہلا نقطہ نظر. اگر آپ کو فائر ہوز ڈیولپمنٹ میں مدد کی ضرورت ہو تو [سٹریمنگ فاسٹ ٹیم](میل کریں:integrations@streamingfast.io/) سے رابطہ کریں۔ -## Difference between EVM JSON-RPC & Firehose +## EVM JSON-RPC اور Firehose کے درمیان فرق -While the two are suitable for subgraphs, a Firehose is always required for developers wanting to build with [Substreams](substreams/), like building [Substreams-powered subgraphs](cookbook/substreams-powered-subgraphs/). In addition, Firehose allows for improved indexing speeds when compared to JSON-RPC. +جب کہ دونوں سب گرافس کے لیے موزوں ہیں، فائر ہوز ہمیشہ ڈویلپرز کے لیے درکار ہوتا ہے جو [سب سٹریمز](سب سٹریمز/) کے ساتھ تعمیر کرنا چاہتے ہیں، جیسا کہ [سب سٹریمز سے چلنے والے سب گرافس](cookbook/substreams-powered-subgraphs/)۔ اس کے علاوہ، فائر ہوز JSON-RPC کے مقابلے میں بہتر انڈیکسنگ کی رفتار کی اجازت دیتا ہے۔ -New EVM chain integrators may also consider the Firehose-based approach, given the benefits of substreams and its massive parallelized indexing capabilities. Supporting both allows developers to choose between building substreams or subgraphs for the new chain. +نئے EVM چین انٹیگریٹرز سب سٹریمز کے فوائد اور اس کے بڑے پیمانے پر متوازی انڈیکسنگ کی صلاحیتوں کو دیکھتے ہوئے، Firehose پر مبنی نقطہ نظر پر بھی غور کر سکتے ہیں۔ دونوں کو سپورٹ کرنے سے ڈویلپرز کو نئی چین کے لیے سب سٹریمز کی تعمیر یا سب گراف کے درمیان انتخاب کرنے کی اجازت ملتی ہے۔ -> **NOTE**: A Firehose-based integration for EVM chains will still require Indexers to run the chain's archive RPC node to properly index subgraphs. This is due to the Firehose's inability to provide smart contract state typically accessible by the `eth_call` RPC method. (It's worth reminding that eth_calls are [not a good practice for developers](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) +> **نوٹ**: EVM چینز کے لیے فائر ہوز پر مبنی انٹیگریشن کے لیے اب بھی انڈیکسرز کو چین کے آرکائیو RPC نوڈ کو صحیح طریقے سے سب گرافس کو انڈیکس کرنے کے لیے چلانے کی ضرورت ہوگی۔ یہ فائر ہوز کی سمارٹ کنٹریکٹ سٹیٹ فراہم کرنے میں ناکامی کی وجہ سے ہے جو عام طور پر `eth_call` RPC طریقہ سے قابل رسائی ہے۔ (یہ یاد دلانے کے قابل ہے کہ ایتھ\_کالز [ڈویلپرز کے لیے اچھا عمل نہیں ہے](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) --- -## Testing an EVM JSON-RPC +## EVM JSON-RPC کی ٹیسٹ کرنا -For Graph Node to be able to ingest data from an EVM chain, the RPC node must expose the following EVM JSON RPC methods: +گراف نوڈ کے لیے EVM چین سے ڈیٹا ہضم کرنے کے لیے، RPC نوڈ کو درج ذیل EVM JSON RPC طریقوں کو بے نقاب کرنا چاہیے: - `eth_getLogs` -- `eth_call` \_(for historical blocks, with EIP-1898 - requires archive node): +- `eth_call` \_(تاریخی بلاکس کے لیے, EIP-1898 کے ساتھ - آرکائیو نوڈ کی ضرورت ہے): - `eth_getBlockByNumber` - `eth_getBlockByHash` - `net_version` - `eth_getTransactionReceipt`, in a JSON-RPC batch request -- _`trace_filter`_ _(optionally required for Graph Node to support call handlers)_ +- _`trace_filter`_ _(کال ہینڈلرز کو سپورٹ کرنے کے لیے گراف نوڈ کے لیے اختیاری طور پر درکار ہے)_ -### Graph Node Configuration +### گراف نوڈ کنفگریشن -**Start by preparing your local environment** +**اپنے مقامی ماحول کو تیار کرکے شروع کریں** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [گراف نوڈ کی نقل بنائیں](https://github.com/graphprotocol/graph-node) +2. نئے نیٹ ورک کا نام اور EVM JSON RPC کے مطابق URL کو شامل کرنے کے لیے [اس لائن](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) میں ترمیم کریں۔ + > env var نام ہی تبدیل نہ کریں۔ نیٹ ورک کا نام مختلف ہونے کے باوجود اسے 'ایتھیریم' ہی رہنا چاہیے۔ +3. IPFS نوڈ چلائیں یا گراف کے ذریعہ استعمال کردہ استعمال کریں: https://api.thegraph.com/ipfs/ -**Test the integration by locally deploying a subgraph** +**مقامی طور پر سب گراف کو تعینات کر کے انٹیگریشن کی جانچ کریں** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. [graph-cli] انسٹال کریں(https://github.com/graphprotocol/graph-cli) +2. ایک سادہ مثالی سب گراف بنائیں۔ کچھ آپشنز ذیل میں ہیں: + 1. پہلے سے پیک [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) سمارٹ کنٹریکٹ اور سب گراف ایک اچھا نقطہ آغاز ہے + 2. کسی بھی موجودہ سمارٹ کنٹریکٹ یا سولیٹی ڈویلپر ماحول سے مقامی سب گراف کو بوٹسٹریپ کریں [گراف پلگ ان کے ساتھ Hardhat کا استعمال کرتے ہوئے](https://github.com/graphprotocol/hardhat-graph) +3. نتیجے میں آنے والے `subgraph.yaml` کو [`dataSources.network`](http://dataSources.network) کو اسی نام سے تبدیل کر کے موافق بنائیں جو پہلے گراف نوڈ پر دیا گیا تھا۔ +4. اپنا سب گراف گراف نوڈ میں بنائیں: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. اپنا سب گراف گراف نوڈ پر شائع کریں: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` -Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. +اگر کوئی خرابی نہیں ہے تو گراف نوڈ کو تعینات سب گراف کو ہم آہنگ کرنا چاہیے۔ اسے مطابقت پذیری کے لیے وقت دیں، پھر لاگز میں پرنٹ کردہ API اینڈ پوائنٹ پر کچھ GraphQL کیوریز بھیجیں۔ --- -## Integrating a new Firehose-enabled chain +## فائر ہوز سے چلنے والی ایک نئی چین کو انٹیگریٹ کرنا -Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: +فائر ہوز اپروچ کا استعمال کرتے ہوئے ایک نئی چین کو انٹیگریٹ کرنا بھی ممکن ہے۔ یہ فی الحال غیر EVM چینز کے لیے بہترین آپشن ہے اور سب سٹریمز سپورٹ کی ضرورت ہے۔ مزید دستاویزات اس بات پر مرکوز ہیں کہ فائر ہوز کیسے کام کرتا ہے، ایک نئی چین کے لیے فائر ہوز سپورٹ شامل کرنا اور اسے گراف نوڈ کے ساتھ انٹیگریٹ کرنا۔ انٹیگریٹز کے لیے تجویز کردہ دستاویزات: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [فائر ہوز پر عمومی دستاویزات](فائر ہوز/) +2. [ایک نئی چین کے لیے فائر ہوز سپورٹ شامل کرنا](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [فائر ہوز کے ذریعے ایک نئی چین کے ساتھ گراف نوڈ کو انٹیگریٹ کرنا](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 426fee27193c934c7748cd5b5c8ef6a65d2bb1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:52 -0400 Subject: [PATCH 521/924] New translations new-chain-integration.mdx (Vietnamese) --- website/pages/vi/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/vi/new-chain-integration.mdx b/website/pages/vi/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/vi/new-chain-integration.mdx +++ b/website/pages/vi/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 91517ef9dd6201acc9734fe50178fbd0053e57c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:53 -0400 Subject: [PATCH 522/924] New translations new-chain-integration.mdx (Marathi) --- website/pages/mr/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/mr/new-chain-integration.mdx b/website/pages/mr/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/mr/new-chain-integration.mdx +++ b/website/pages/mr/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From 0d771c1fa3e99fc180d520bb509f834761654763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:53 -0400 Subject: [PATCH 523/924] New translations new-chain-integration.mdx (Hindi) --- website/pages/hi/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/hi/new-chain-integration.mdx b/website/pages/hi/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/hi/new-chain-integration.mdx +++ b/website/pages/hi/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From c3b984813ff034165bf851c7d53bf12d4b58bd20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:54 -0400 Subject: [PATCH 524/924] New translations new-chain-integration.mdx (Yoruba) --- website/pages/yo/new-chain-integration.mdx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/yo/new-chain-integration.mdx b/website/pages/yo/new-chain-integration.mdx index b5492d5061af..c4c7d1122368 100644 --- a/website/pages/yo/new-chain-integration.mdx +++ b/website/pages/yo/new-chain-integration.mdx @@ -11,7 +11,7 @@ Graph Node can currently index data from the following chain types: If you are interested in any of those chains, integration is a matter of Graph Node configuration and testing. -If you are interested in a different chain type, a new with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. +If you are interested in a different chain type, a new integration with Graph Node must be built. Our recommended approach is developing a new Firehose for the chain in question and then the integration of that Firehose with Graph Node. More info below. **1. EVM JSON-RPC** @@ -47,20 +47,20 @@ For Graph Node to be able to ingest data from an EVM chain, the RPC node must ex **Start by preparing your local environment** -1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) +2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL + > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. +3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ **Test the integration by locally deploying a subgraph** -1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) +2. Create a simple example subgraph. Some options are below: + 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point + 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) +3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. @@ -70,6 +70,6 @@ Graph Node should be syncing the deployed subgraph if there are no errors. Give Integrating a new chain is also possible using the Firehose approach. This is currently the best option for non-EVM chains and a requirement for substreams support. Additional documentation focuses on how Firehose works, adding Firehose support for a new chain and integrating it with Graph Node. Recommended docs for integrators: -1. [General docs on Firehose](firehose/) -2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) -3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) +1. [General docs on Firehose](firehose/) +2. [Adding Firehose support for a new chain](https://firehose.streamingfast.io/integrate-new-chains/integration-overview) +3. [Integrating Graph Node with a new chain via Firehose](https://github.com/graphprotocol/graph-node/blob/master/docs/implementation/add-chain.md) From c364540a198eb46d2ff17b75e929772120bca8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:56 -0400 Subject: [PATCH 525/924] New translations chain-integration-overview.mdx (French) --- .../pages/fr/chain-integration-overview.mdx | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/website/pages/fr/chain-integration-overview.mdx b/website/pages/fr/chain-integration-overview.mdx index dd9c85eda66f..98111a2dd987 100644 --- a/website/pages/fr/chain-integration-overview.mdx +++ b/website/pages/fr/chain-integration-overview.mdx @@ -1,48 +1,48 @@ --- -title: Chain Integration Process Overview +title: Aperçu du processus d'intégration de la chaîne --- -A transparent and governance-based integration process was designed for blockchain teams seeking [integration with The Graph protocol](https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468). It is a 3-phase process, as summarised below. +Un processus d'intégration transparent et basé sur la gouvernance a été conçu pour les équipes blockchain recherchant [l'intégration avec le protocole The Graph](https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468). Il s'agit d'un processus en trois phases, comme résumé ci-dessous. -## Stage 1. Technical Integration +## Étape 1. Intégration technique -- Teams work on a Graph Node integration and Firehose for non-EVM based chains. [Here's how](/new-chain-integration/). -- Teams initiate the protocol integration process by creating a Forum thread [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71) (New Data Sources sub-category under Governance & GIPs). Using the default Forum template is mandatory. +- Les équipes travaillent sur une intégration de Graph Node et Firehose pour les chaînes non basées sur EVM. [Voici comment](/new-chain-integration/). +- Les équipes lancent le processus d'intégration du protocole en créant un fil de discussion sur le forum [ici](https://forum.thegraph.com/c/governance-gips/new-chain-support/71) (sous-catégorie Nouvelles sources de données sous Gouvernance et GIPs ). L'utilisation du modèle de forum par défaut est obligatoire. -## Stage 2. Integration Validation +## Étape 2. Validation de l'intégration -- Teams collaborate with core developers, Graph Foundation and operators of GUIs and network gateways, such as [Subgraph Studio](https://thegraph.com/studio/), to ensure a smooth integration process. This involves providing the necessary backend infrastructure, such as the integrating chain's JSON RPC or Firehose endpoints. Teams wanting to avoid self-hosting such infrastructure can leverage The Graph's community of node operators (Indexers) to do so, which the Foundation can help with. -- Graph Indexers test the integration on The Graph's testnet. -- Core developers and Indexers monitor stability, performance, and data determinism. +- Les équipes collaborent avec les développeurs principaux, Graph Foundation et les opérateurs d'interfaces graphiques et de passerelles réseau, tels que [Subgraph Studio](https://thegraph.com/studio/), pour garantir un processus d'intégration fluide. Cela implique de fournir l'infrastructure backend nécessaire, telle que les points de terminaison JSON RPC ou Firehose de la chaîne d'intégration. Les équipes souhaitant éviter d'auto-héberger une telle infrastructure peuvent s'appuyer sur la communauté d'opérateurs de nœuds (indexeurs) de The Graph, ce que la Fondation peut aider à faire. +- Les Graph Indexeurs testent l'intégration sur le réseau de test du Graph. +- Les développeurs principaux et les indexeurs surveillent la stabilité, les performances et le déterminisme des données. -## Stage 3. Mainnet Integration +## Étape 3. Intégration du réseau principal -- Teams propose mainnet integration by submitting a Graph Improvement Proposal (GIP) and initiating a pull request (PR) on the [feature support matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) (more details on the link). -- The Graph Council reviews the request and approves mainnet support, providing a successful Stage 2 and positive community feedback. +- Les équipes proposent l'intégration du mainnet en soumettant une proposition d'amélioration du graphique (GIP) et en lançant une demande d'extraction (PR) sur la [matrice de support des fonctionnalités](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support -matrix.md) (plus de détails sur le lien). +- The Graph Council examine la demande et approuve la prise en charge du mainnet, fournissant ainsi une étape 2 réussie et des commentaires positifs de la communauté. --- -If the process looks daunting, don't worry! The Graph Foundation is committed to supporting integrators by fostering collaboration, offering essential information, and guiding them through various stages, including navigating governance processes such as Graph Improvement Proposals (GIPs) and pull requests. If you have questions, please reach out to [info@thegraph.foundation](mailto:info@thegraph.foundation) or through Discord (either Pedro, The Graph Foundation member, IndexerDAO, or other core developers). +Si le processus semble intimidant, ne vous inquiétez pas ! La Graph Foundation s'engage à soutenir les intégrateurs en favorisant la collaboration, en leur offrant des informations essentielles et en les guidant à travers différentes étapes, y compris la navigation dans les processus de gouvernance tels que les propositions d'amélioration de Graph (GIP) et les demandes d'extraction. Si vous avez des questions, veuillez contacter [info@thegraph.foundation](mailto:info@thegraph.foundation) ou via Discord (soit Pedro, membre de la Graph Foundation, IndexerDAO ou d'autres développeurs principaux). -Ready to shape the future of The Graph Network? [Start your proposal](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0057-chain-integration-process.md) now and be a part of the web3 revolution! +Prêt à façonner l’avenir de The Graph Network ? [Démarrez votre proposition](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0057-chain-integration-process.md) maintenant et faites partie de la révolution web3 ! --- -## Frequently Asked Questions +## Questions fréquemment posées -### 1. How does this relate to the [World of Data Services GIP](https://forum.thegraph.com/t/gip-0042-a-world-of-data-services/3761)? +### 1. Quel est le rapport avec le [GIP World of Data Services](https://forum.thegraph.com/t/gip-0042-a-world-of-data-services/3761) ? -This process is related to the Subgraph Data Service, applicable only to new Subgraph `Data Sources`. +Ce processus est lié au service de données Subgraph, applicable uniquement aux nouvelles « sources de données » de Subgraph. -### 2. What happens if Firehose & Substreams support comes after the network is supported on mainnet? +### 2. Que se passe-t-il si la prise en charge de Firehose et Substreams intervient après que le réseau est pris en charge sur le mainnet ? -This would only impact protocol support for indexing rewards on Substreams-powered subgraphs. The new Firehose implementation would need testing on testnet, following the methodology outlined for Stage 2 in this GIP. Similarly, assuming the implementation is performant and reliable, a PR on the [Feature Support Matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) would be required (`Substreams data sources` Subgraph Feature), as well as a new GIP for protocol support for indexing rewards. Anyone can create the PR and GIP; the Foundation would help with Council approval. +Cela n’aurait un impact que sur la prise en charge du protocole pour l’indexation des récompenses sur les subgraphs alimentés par Substreams. La nouvelle implémentation de Firehose nécessiterait des tests sur testnet, en suivant la méthodologie décrite pour l'étape 2 de ce GIP. De même, en supposant que l'implémentation soit performante et fiable, un PR sur la [Matrice de support des fonctionnalités](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) serait requis ( Fonctionnalité de sous-graphe « Sous-flux de sources de données »), ainsi qu'un nouveau GIP pour la prise en charge du protocole pour l'indexation des récompenses. N'importe qui peut créer le PR et le GIP ; la Fondation aiderait à obtenir l'approbation du Conseil. -### 3. How much time will this process take? +### 3. Combien de temps ce processus prendra-t-il ? -The time to mainnet is expected to be several weeks, varying based on the time of integration development, whether additional research is required, testing and bug fixes, and, as always, the timing of the governance process that requires community feedback. +Le temps nécessaire à la mise en réseau principal devrait être de plusieurs semaines, variant en fonction du temps de développement de l'intégration, de la nécessité ou non de recherches supplémentaires, de tests et de corrections de bugs et, comme toujours, du calendrier du processus de gouvernance qui nécessite les commentaires de la communauté. -Protocol support for indexing rewards depends on the stakeholders' bandwidth to proceed with testing, feedback gathering, and handling contributions to the core codebase, if applicable. This is directly tied to the integration's maturity and how responsive the integration team is (who may or may not be the team behind the RPC/Firehose implementation). The Foundation is here to help support throughout the whole process. +La prise en charge du protocole pour l'indexation des récompenses dépend de la bande passante des parties prenantes pour procéder aux tests, à la collecte de commentaires et à la gestion des contributions à la base de code principale, le cas échéant. Ceci est directement lié à la maturité de l'intégration et à la réactivité de l'équipe d'intégration (qui peut ou non être l'équipe derrière la mise en œuvre de RPC/Firehose). La Fondation est là pour vous accompagner tout au long du processus. ### 4. Comment les priorités seront-elles gérées ? From 89bc5e71c4e04f5cdab64739be4c2ed43402d421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:15:57 -0400 Subject: [PATCH 526/924] New translations chain-integration-overview.mdx (Arabic) --- .../pages/ar/chain-integration-overview.mdx | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/website/pages/ar/chain-integration-overview.mdx b/website/pages/ar/chain-integration-overview.mdx index 2fe6c2580909..501143bfb88d 100644 --- a/website/pages/ar/chain-integration-overview.mdx +++ b/website/pages/ar/chain-integration-overview.mdx @@ -1,49 +1,49 @@ --- -title: Chain Integration Process Overview +title: نظرة عامة حول عملية التكامل مع الشبكة --- -A transparent and governance-based integration process was designed for blockchain teams seeking [integration with The Graph protocol](https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468). It is a 3-phase process, as summarised below. +تم تصميم عملية تكامل قائمة على الحوكمة وبشفافية لفرق سلاسل الكتل التي تسعى للإندماج مع بروتوكول الغراف (https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468). إنها عملية مكونة من 3 مراحل، كما هو ملخص أدناه. -## Stage 1. Technical Integration +## المرحلة الأولى: التكامل التقني -- Teams work on a Graph Node integration and Firehose for non-EVM based chains. [Here's how](/new-chain-integration/). -- Teams initiate the protocol integration process by creating a Forum thread [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71) (New Data Sources sub-category under Governance & GIPs). Using the default Forum template is mandatory. +- تعمل الفرق على تكامل نقطة الغراف وفايرهوز بالنسبة للسلاسل الغير مبنية على آلة الإيثيريوم الإفتراضية. إليك الطريقة(https://thegraph. com/docs/en/new-chain-integration/). +- تستهل الفرق عملية التكامل مع البروتوكول من خلال إنشاء موضوع في المنتدى هنا(https://forum.thegraph.com/c/governance-gips/new-chain-support/71) (الفئة الفرعية "مصادر البيانات الجديدة" تحت قسم "الحوكمة واقتراحات تحسين الغراف"). استخدام قالب المنتدى الافتراضي إلزامي. -## Stage 2. Integration Validation +## المرحلة الثانية: التحقق من صحة التكامل -- Teams collaborate with core developers, Graph Foundation and operators of GUIs and network gateways, such as [Subgraph Studio](https://thegraph.com/studio/), to ensure a smooth integration process. This involves providing the necessary backend infrastructure, such as the integrating chain's JSON RPC or Firehose endpoints. Teams wanting to avoid self-hosting such infrastructure can leverage The Graph's community of node operators (Indexers) to do so, which the Foundation can help with. -- Graph Indexers test the integration on The Graph's testnet. -- Core developers and Indexers monitor stability, performance, and data determinism. +- تتعاون الفرق مع المطورين الأساسيين، ومؤسسة الغراف، ومشغلي واجهات المستخدم الرسومية وبوابات الشبكة مثل سبغراف استوديو(https://thegraph.com/studio/) لضمان عملية تكامل سلسة. يتضمن ذلك توفير بنية تحتية للواجهة الخلفية، مثل إجراء الإستدعاء عن بعد -للترميز الكائني لجافاسكريبت- الخاص بالسلسلة المتكاملة أو نقاط نهاية فايرهوز. الفرق الراغبة في تجنب الإستضافة الذاتية مثل هذه البنية التحتية يمكنهم الإستفادة من مشغلي النقاط (المفهرسين) في مجتمع الغراف للقيام بذلك، والذي يمكن للمؤسسة المساعدة من خلاله. +- مفهرسو الغراف يختبرون التكامل على شبكة إختبار الغراف. +- يقوم المطورون الأساسيون والمفهرسون بمراقبة استقرار، وأداء، وحتمية البيانات. -## Stage 3. Mainnet Integration +## المرحلة الثالثة: التكامل مع الشبكة الرئيسية -- Teams propose mainnet integration by submitting a Graph Improvement Proposal (GIP) and initiating a pull request (PR) on the [feature support matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) (more details on the link). +- يتم اقتراح التكامل مع الشبكة الرئيسية من قبل الفرق عن طريق تقديم اقتراح تحسين الغراف (GIP) واستهلال طلب سحب (PR) على مصفوفة دعم الميزات (https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md)(لمزيد من التفاصيل، يرجى زيارة الرابط). - The Graph Council reviews the request and approves mainnet support, providing a successful Stage 2 and positive community feedback. --- -If the process looks daunting, don't worry! The Graph Foundation is committed to supporting integrators by fostering collaboration, offering essential information, and guiding them through various stages, including navigating governance processes such as Graph Improvement Proposals (GIPs) and pull requests. If you have questions, please reach out to [info@thegraph.foundation](mailto:info@thegraph.foundation) or through Discord (either Pedro, The Graph Foundation member, IndexerDAO, or other core developers). +إذا بدت العملية مربكة، فلا تقلق! تلتزم مؤسسة الغراف بدعم المتكاملين من خلال تعزيز التعاون وتوفير المعلومات الجوهرية وتوجيههم خلال مراحل مختلفة، بما في ذلك توجيههم خلال عمليات الحوكمة مثل اقتراحات تحسين الغراف وطلبات السحب. إذا كان لديك أسئلة، فيرجى التواصل مع [info@thegraph.foundation](mailto:info@thegraph.foundation) أو من خلال ديسكورد (باستطاعتك التواصل مع بيدرو، عضو مؤسسة الغراف، أو IndexerDAO أو المطورين الأساسيين الآخرين). Ready to shape the future of The Graph Network? [Start your proposal](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0057-chain-integration-process.md) now and be a part of the web3 revolution! --- -## Frequently Asked Questions +## الأسئلة الشائعة -### 1. How does this relate to the [World of Data Services GIP](https://forum.thegraph.com/t/gip-0042-a-world-of-data-services/3761)? +### 1. كيف يتعلق هذا بـ مقترح تحسين الغراف "خدمات عالم البيانات" (https://forum.thegraph.com/t/gip-0042-a-world-of-data-services/3761)؟ -This process is related to the Subgraph Data Service, applicable only to new Subgraph `Data Sources`. +هذه العملية مرتبطة بخدمة بيانات الغراف الفرعي، وهي مطبقة فقط على مصادر بيانات الغراف الفرعي الجديد. -### 2. What happens if Firehose & Substreams support comes after the network is supported on mainnet? +### 2. ماذا يحدث إذا تم دعم فايرهوز و سبستريمز بعد أن تم دعم الشبكة على الشبكة الرئيسية؟ -This would only impact protocol support for indexing rewards on Substreams-powered subgraphs. The new Firehose implementation would need testing on testnet, following the methodology outlined for Stage 2 in this GIP. Similarly, assuming the implementation is performant and reliable, a PR on the [Feature Support Matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) would be required (`Substreams data sources` Subgraph Feature), as well as a new GIP for protocol support for indexing rewards. Anyone can create the PR and GIP; the Foundation would help with Council approval. +هذا سيؤثر فقط على دعم البروتوكول لمكافآت الفهرسة على الغرافات الفرعية المدعومة من سبستريمز. تنفيذ الفايرهوز الجديد سيحتاج إلى الفحص على شبكة الاختبار، وفقًا للمنهجية الموضحة للمرحلة الثانية في هذا المقترح لتحسين الغراف. وعلى نحو مماثل، وعلى افتراض أن التنفيذ فعال وموثوق به، سيتتطالب إنشاء طلب سحب على [مصفوفة دعم الميزات] (https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) ("مصادر بيانات سبستريمز" ميزة للغراف الفرعي)، بالإضافة إلى مقترح جديد لتحسين الغراف، لدعم البروتوكول لمكافآت الفهرسة. يمكن لأي شخص إنشاء طلب السحب ومقترح تحسين الغراف؛ وسوف تساعد المؤسسة في الحصول على موافقة المجلس. -### 3. How much time will this process take? +### 3. كم من الوقت ستستغرق هذه العملية؟ -The time to mainnet is expected to be several weeks, varying based on the time of integration development, whether additional research is required, testing and bug fixes, and, as always, the timing of the governance process that requires community feedback. +يُتوقع أن يستغرق الوصول إلى الشبكة الرئيسية عدة أسابيع، وذلك يعتمد على وقت تطوير التكامل، وما إذا كانت هناك حاجة إلى بحوث إضافية، واختبارات وإصلاحات الأخطاء، وكذلك توقيت عملية الحوكمة التي تتطلب ملاحظات المجتمع كما هو الحال دائمًا. -Protocol support for indexing rewards depends on the stakeholders' bandwidth to proceed with testing, feedback gathering, and handling contributions to the core codebase, if applicable. This is directly tied to the integration's maturity and how responsive the integration team is (who may or may not be the team behind the RPC/Firehose implementation). The Foundation is here to help support throughout the whole process. +يعتمد دعم البروتوكول لمكافآت الفهرسة على قدرة أصحاب الحصص في المضي قدماً في عمليات الفحص وجمع الملاحظات ومعالجة المساهمات في قاعدة الكود الأساسية، إذا كان ذلك قابلاً للتطبيق. هذا مرتبط مباشرة بنضج عملية التكامل ومدى استجابة فريق التكامل (والذي قد يكون أو قد لا يكون نفس الفريق المسؤول عن تنفيذ إجراء الإستدعاء عن بعد\\الفايرهوز). المؤسسة هنا لمساعدة الدعم خلال العملية بأكملها. -### 4. How will priorities be handled? +### 4. كيف سيتم التعامل مع الأولويات؟ -Similar to #3, it will depend on overall readiness and involved stakeholders' bandwidth. For example, a new chain with a brand new Firehose implementation may take longer than integrations that have already been battle-tested or are farther along in the governance process. This is especially true for chains previously supported on the [hosted service](https://thegraph.com/hosted-service) or those relying on already tested stacks. +كما في السؤال الثالث، سيتوقف ذلك على الجهوزية بشكل عام وعلى قدرات أصحاب الحصص المشاركين. على سبيل المثال، قد تستغرق سلسلة جديدة مع تطبيق فايرهوز جديد تمامًا وقتاً أطول من عمليات التكامل التي تم فحصها بالفعل أو التي قطعت شوطاً أطول في عملية الحوكمة. وينطبق هذا بشكل خاص على السلاسل المدعومة مسبقاً على الخدمة المستضافة (https://thegraph.com/hosted-service) أو تلك التي تعتمد على تقنيات تم اختبارها بالفعل. From 335ddbc266b57ab76d99f4612f5d557a3d809bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:01 -0400 Subject: [PATCH 527/924] New translations chain-integration-overview.mdx (Czech) --- .../pages/cs/chain-integration-overview.mdx | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/website/pages/cs/chain-integration-overview.mdx b/website/pages/cs/chain-integration-overview.mdx index 2fe6c2580909..a54cf6823bf1 100644 --- a/website/pages/cs/chain-integration-overview.mdx +++ b/website/pages/cs/chain-integration-overview.mdx @@ -1,49 +1,49 @@ --- -title: Chain Integration Process Overview +title: Přehled procesu integrace řetězce --- -A transparent and governance-based integration process was designed for blockchain teams seeking [integration with The Graph protocol](https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468). It is a 3-phase process, as summarised below. +Pro blockchainové týmy, které usilují o [integraci s protokolem The Graph](https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468), byl navržen transparentní a na správě založený integrační proces. Jedná se o třífázový proces, jak je shrnuto níže. -## Stage 1. Technical Integration +## Fáze 1. Technická integrace -- Teams work on a Graph Node integration and Firehose for non-EVM based chains. [Here's how](/new-chain-integration/). -- Teams initiate the protocol integration process by creating a Forum thread [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71) (New Data Sources sub-category under Governance & GIPs). Using the default Forum template is mandatory. +- Týmy pracují na integraci Uzel grafu a Firehose pro řetězce nezaložené na EvM. [Zde je návod](/new-chain-integration/). +- Týmy zahájí proces integrace protokolu vytvořením vlákna na fóru [zde](https://forum.thegraph.com/c/governance-gips/new-chain-support/71) (podkategorie Nové zdroje dat v části Správa a GIP). Použití výchozí šablony Fóra je povinné. -## Stage 2. Integration Validation +## Fáze 2. Ověřování integrace -- Teams collaborate with core developers, Graph Foundation and operators of GUIs and network gateways, such as [Subgraph Studio](https://thegraph.com/studio/), to ensure a smooth integration process. This involves providing the necessary backend infrastructure, such as the integrating chain's JSON RPC or Firehose endpoints. Teams wanting to avoid self-hosting such infrastructure can leverage The Graph's community of node operators (Indexers) to do so, which the Foundation can help with. -- Graph Indexers test the integration on The Graph's testnet. -- Core developers and Indexers monitor stability, performance, and data determinism. +- Týmy spolupracují s hlavními vývojáři, Graph Foundation a provozovateli GUIs a síťových bran, jako je [Subgraph Studio](https://thegraph.com/studio/), aby byl zajištěn hladký proces integrace. To zahrnuje poskytnutí nezbytné backendové infrastruktury, jako jsou koncové body JSON RPC nebo Firehose integračního řetězce. Týmy, které se chtějí vyhnout vlastnímu hostování takové infrastruktury, mohou k tomu využít komunitu provozovatelů uzlů (Indexers) Grafu, s čímž jim může pomoci nadace. +- Graf Indexers testují integraci na testovací síti Grafu. +- Vývojáři jádra a indexátoři sledují stabilitu, výkon a determinismus dat. -## Stage 3. Mainnet Integration +## Fáze 3. Integrace Mainnet -- Teams propose mainnet integration by submitting a Graph Improvement Proposal (GIP) and initiating a pull request (PR) on the [feature support matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) (more details on the link). -- The Graph Council reviews the request and approves mainnet support, providing a successful Stage 2 and positive community feedback. +- Týmy navrhují integraci mainnetu tak, že podají návrh na vylepšení grafu (Graph Improvement Proposal, GIP) a iniciují žádost o stažení (pull request, PR) v [matici podpory funkcí](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) (více informací na tomto odkazu). +- Rada pro graf přezkoumá žádost a schválí podporu mainnetu, čímž zajistí úspěšnou 2. fázi a pozitivní zpětnou vazbu od komunity. --- -If the process looks daunting, don't worry! The Graph Foundation is committed to supporting integrators by fostering collaboration, offering essential information, and guiding them through various stages, including navigating governance processes such as Graph Improvement Proposals (GIPs) and pull requests. If you have questions, please reach out to [info@thegraph.foundation](mailto:info@thegraph.foundation) or through Discord (either Pedro, The Graph Foundation member, IndexerDAO, or other core developers). +Pokud vám tento proces připadá skličující, nebojte se! Nadace Graph Foundation se zavázala podporovat integrátory tím, že podporuje spolupráci, nabízí důležité informace a provází je různými fázemi, včetně navigace v procesech správy, jako jsou návrhy na zlepšení grafů (Graph Improvement Proposals, GIP) a žádosti o stažení. Pokud máte dotazy, obraťte se na [info@thegraph.foundation](mailto:info@thegraph.foundation) nebo prostřednictvím služby Discord (buď na Pedra, člena The Graph Foundation, IndexerDAO, nebo na další vývojáře jádra). -Ready to shape the future of The Graph Network? [Start your proposal](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0057-chain-integration-process.md) now and be a part of the web3 revolution! +Jste připraveni ovlivnit budoucnost sítě Grafu? [Začněte s návrhem](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0057-chain-integration-process.md) a staňte se součástí web3 revoluce! --- -## Frequently Asked Questions +## Často kladené otázky -### 1. How does this relate to the [World of Data Services GIP](https://forum.thegraph.com/t/gip-0042-a-world-of-data-services/3761)? +### 1. Jak to souvisí s [World of Data Services GIP](https://forum.thegraph.com/t/gip-0042-a-world-of-data-services/3761)? -This process is related to the Subgraph Data Service, applicable only to new Subgraph `Data Sources`. +Tento proces souvisí se službou Datová služba podgrafů a vztahuje se pouze na nové `zdroje dat` podgrafu. -### 2. What happens if Firehose & Substreams support comes after the network is supported on mainnet? +### 2. Co se stane, když podpora Firehose & Substreams přijde až poté, co bude síť podporována v mainnet? -This would only impact protocol support for indexing rewards on Substreams-powered subgraphs. The new Firehose implementation would need testing on testnet, following the methodology outlined for Stage 2 in this GIP. Similarly, assuming the implementation is performant and reliable, a PR on the [Feature Support Matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) would be required (`Substreams data sources` Subgraph Feature), as well as a new GIP for protocol support for indexing rewards. Anyone can create the PR and GIP; the Foundation would help with Council approval. +To by mělo vliv pouze na podporu protokolu pro indexování odměn na podgrafech s podsílou. Novou implementaci Firehose by bylo třeba testovat v testnetu podle metodiky popsané pro fázi 2 v tomto GIP. Podobně, za předpokladu, že implementace bude výkonná a spolehlivá, by bylo nutné provést PR na [Feature Support Matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) (`Substreams data sources` Subgraph Feature) a také nový GIP pro podporu protokolu pro indexování odměn. PR a GIP může vytvořit kdokoli; nadace by pomohla se schválením Radou. -### 3. How much time will this process take? +### 3. Kolik času zabere tento proces? -The time to mainnet is expected to be several weeks, varying based on the time of integration development, whether additional research is required, testing and bug fixes, and, as always, the timing of the governance process that requires community feedback. +Očekává se, že doba do uvedení do mainnetu bude trvat několik týdnů a bude se lišit v závislosti na době vývoje integrace, na tom, zda bude zapotřebí další výzkum, testování a opravy chyb, a jako vždy na načasování procesu řízení, který vyžaduje zpětnou vazbu od komunity. -Protocol support for indexing rewards depends on the stakeholders' bandwidth to proceed with testing, feedback gathering, and handling contributions to the core codebase, if applicable. This is directly tied to the integration's maturity and how responsive the integration team is (who may or may not be the team behind the RPC/Firehose implementation). The Foundation is here to help support throughout the whole process. +Podpora protokolu pro odměny za indexování závisí na šířce pásma zúčastněných stran, aby bylo možné pokračovat v testování, shromažďování zpětné vazby a případném zpracování příspěvků do hlavní databáze. To přímo souvisí s vyspělostí integrace a s tím, jak pohotově reaguje integrační tým (který může, ale nemusí být týmem stojícím za implementací RPC/Firehose). Nadace je tu od toho, aby pomohla s podporou během celého procesu. -### 4. How will priorities be handled? +### 4. Jak budou řešeny priority? -Similar to #3, it will depend on overall readiness and involved stakeholders' bandwidth. For example, a new chain with a brand new Firehose implementation may take longer than integrations that have already been battle-tested or are farther along in the governance process. This is especially true for chains previously supported on the [hosted service](https://thegraph.com/hosted-service) or those relying on already tested stacks. +Podobně jako u bodu č. 3 bude záležet na celkové připravenosti a šířce pásma zúčastněných stran. Například nový řetězec se zcela novou implementací Firehose může trvat déle než integrace, které již byly testovány v praxi nebo jsou v procesu správy dále. To platí zejména pro řetězce, které byly dříve podporovány na [hostované službě](https://thegraph.com/hosted-service) nebo které se spoléhají na již otestované stacky. From 4e83817b5ac4d40245bdf486fbad9fe2168b1c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:03 -0400 Subject: [PATCH 528/924] New translations chain-integration-overview.mdx (Japanese) --- website/pages/ja/chain-integration-overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ja/chain-integration-overview.mdx b/website/pages/ja/chain-integration-overview.mdx index e3a9d2f1c8e6..7d37bf9c9393 100644 --- a/website/pages/ja/chain-integration-overview.mdx +++ b/website/pages/ja/chain-integration-overview.mdx @@ -46,4 +46,4 @@ The Graph Network の未来を形作る準備はできていますか? [Start yo ### 4. 優先順位はどのように扱われますか? -Similar to #3, it will depend on overall readiness and involved stakeholders' bandwidth. For example, a new chain with a brand new Firehose implementation may take longer than integrations that have already been battle-tested or are farther along in the governance process. This is especially true for chains previously supported on the [hosted service](https://thegraph.com/hosted-service) or those relying on already tested stacks. +3.と同様、全体的な準備状況や関係者の帯域幅によります。例えば、Firehoseを導入したばかりの新しいチェーンは、すでにテスト済みの統合や、ガバナンスプロセスが進んでいる統合よりも時間がかかるかもしれません。これは特に、以前[ホスティングサービス](https://thegraph.com/hosted-service)でサポートされていたチェーンや、すでにテスト済みのスタックに依存しているチェーンに当てはまります。 From 50b2b90fec56d86e85285f2500bc8f7745d8025d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:06 -0400 Subject: [PATCH 529/924] New translations chain-integration-overview.mdx (Portuguese) --- website/pages/pt/chain-integration-overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pt/chain-integration-overview.mdx b/website/pages/pt/chain-integration-overview.mdx index f33e0f7d74c8..98fd802e80bf 100644 --- a/website/pages/pt/chain-integration-overview.mdx +++ b/website/pages/pt/chain-integration-overview.mdx @@ -46,4 +46,4 @@ O apoio do protocolo às recompensas de indexação depende da banda dos acionis ### 4. Como as prioridades serão administradas? -Similar to #3, it will depend on overall readiness and involved stakeholders' bandwidth. For example, a new chain with a brand new Firehose implementation may take longer than integrations that have already been battle-tested or are farther along in the governance process. This is especially true for chains previously supported on the [hosted service](https://thegraph.com/hosted-service) or those relying on already tested stacks. +Similar ao #3, dependará do preparo geral e da banda dos acionistas envolvidos. Por exemplo, uma nova chain, com uma implementação nova do Firehose, pode demorar mais que as integrações que já foram testadas ou estão mais adiantadas no processo de governança. Isto vale especialmente para chains antes apoiadas no [serviço hospedado](https://thegraph.com/hosted-service) ou daquelas que dependem de stacks já testados. From cf2ff34b08b7dea7123e55894f27cdd9e8b9d0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:06 -0400 Subject: [PATCH 530/924] New translations chain-integration-overview.mdx (Russian) --- website/pages/ru/chain-integration-overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ru/chain-integration-overview.mdx b/website/pages/ru/chain-integration-overview.mdx index bb89299d40e9..5bffe3e6c4d7 100644 --- a/website/pages/ru/chain-integration-overview.mdx +++ b/website/pages/ru/chain-integration-overview.mdx @@ -2,7 +2,7 @@ title: Chain Integration Process Overview --- -Прозрачный и основанный на управлении процесс интеграции был разработан для команд блокчейнов, стремящихся к [интеграции с протоколом The Graph] \(https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468). Это трехэтапный процесс, как описано ниже. +Прозрачный и основанный на управлении процесс интеграции был разработан для команд блокчейнов, стремящихся к [интеграции с протоколом The Graph] (https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468). Это трехэтапный процесс, как описано ниже. ## Stage 1. Technical Integration From 072eaefb8582cb8fcf5b7bdea2a1391e9a643a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:08 -0400 Subject: [PATCH 531/924] New translations chain-integration-overview.mdx (Turkish) --- .../pages/tr/chain-integration-overview.mdx | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/website/pages/tr/chain-integration-overview.mdx b/website/pages/tr/chain-integration-overview.mdx index 2fe6c2580909..b1bbb263d648 100644 --- a/website/pages/tr/chain-integration-overview.mdx +++ b/website/pages/tr/chain-integration-overview.mdx @@ -1,49 +1,49 @@ --- -title: Chain Integration Process Overview +title: Zincir Entegrasyon Sürecine Genel Bakış --- -A transparent and governance-based integration process was designed for blockchain teams seeking [integration with The Graph protocol](https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468). It is a 3-phase process, as summarised below. +Blok zinciri ekiplerinin [Graph protokolüyle entegrasyon](https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468) arayışı için şeffaf ve yönetişim odaklı bir entegrasyon süreci tasarlandı. Bu, aşağıda özetlendiği gibi 3 aşamalı bir süreçten oluşmaktadır. -## Stage 1. Technical Integration +## Aşama 1. Teknik Entegrasyon -- Teams work on a Graph Node integration and Firehose for non-EVM based chains. [Here's how](/new-chain-integration/). -- Teams initiate the protocol integration process by creating a Forum thread [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71) (New Data Sources sub-category under Governance & GIPs). Using the default Forum template is mandatory. +- Ekipler, EVM tabanlı olmayan zincirler için Graph Düğüm entegrasyonu ve Firehose üzerinde çalışıyorr. [İşte nasıl olduğu](/new-chain-integration/). +- Ekipler, protokol entegrasyon sürecini bir Forum başlığı oluşturarak başlatır [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71) (Yönetişim ve GIP'ler altındaki Yeni Veri Kaynakları alt kategorisi). Varsayılan Forum şablonunun kullanılması zorunludur. -## Stage 2. Integration Validation +## Aşama 2. Entegrasyon Doğrulaması -- Teams collaborate with core developers, Graph Foundation and operators of GUIs and network gateways, such as [Subgraph Studio](https://thegraph.com/studio/), to ensure a smooth integration process. This involves providing the necessary backend infrastructure, such as the integrating chain's JSON RPC or Firehose endpoints. Teams wanting to avoid self-hosting such infrastructure can leverage The Graph's community of node operators (Indexers) to do so, which the Foundation can help with. -- Graph Indexers test the integration on The Graph's testnet. -- Core developers and Indexers monitor stability, performance, and data determinism. +- Ekipler, entegrasyon sürecinin sorunsuz bir şekilde ilerlemesini sağlamak için çekirdek geliştiricilerle, Graph Vakfı ve [Subgraph Stüdyo](https://thegraph.com/studio/) gibi GUI'ler ve ağ geçidi operatörleri ile işbirliği yapmaktadır. Bu, entegre edilen zincirin JSON RPC veya Firehose uç noktaları gibi gerekli altyapının sağlanmasını içerir. Bu tür bir altyapıyı kendi kendine barındırmaktan kaçınmak isteyen ekipler, bunu yapmak için Graph'ın düğüm operatörleri (İndeksleyiciler) topluluğundan yararlanabilir ve Vakıf bu konuda yardımcı olabilir. +- Graph İndeksleyicileri, entegrasyonu Graph'ın test ağında test eder. +- Çekirdek geliştiriciler ve İndeksleyiciler kararlılığı, performansı ve veri belirleyiciliğini izler. -## Stage 3. Mainnet Integration +## Aşama 3. Ana Ağ Entegrasyonu -- Teams propose mainnet integration by submitting a Graph Improvement Proposal (GIP) and initiating a pull request (PR) on the [feature support matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) (more details on the link). -- The Graph Council reviews the request and approves mainnet support, providing a successful Stage 2 and positive community feedback. +- Ekipler, bir Graph İyileştirme Teklifi (GIP) göndererek ve [özellik destek matrisinde](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) bir pull request (PR) başlatarak ana ağ entegrasyonu önermektedir (daha fazla ayrıntı bağlantıda). +- Graph Konseyi talebi inceler, başarılı bir 2. Aşama ve olumlu topluluk geri bildirimi sağlayarak ana ağ desteğini onaylar. --- -If the process looks daunting, don't worry! The Graph Foundation is committed to supporting integrators by fostering collaboration, offering essential information, and guiding them through various stages, including navigating governance processes such as Graph Improvement Proposals (GIPs) and pull requests. If you have questions, please reach out to [info@thegraph.foundation](mailto:info@thegraph.foundation) or through Discord (either Pedro, The Graph Foundation member, IndexerDAO, or other core developers). +Süreç göz korkutucu görünüyorsa endişelenmeyin! Graph Vakfı, işbirliğini teşvik edip, gerekli bilgileri sunar ve yönetişim süreçlerinde gezinmek, Graph İyileştirme Teklifleri (GIPs) ve pull requests de dahil olmak üzere çeşitli aşamalarda entegratörlere rehberlik ederek onları desteklemeye odaklanmıştır. Sorularınız varsa, lütfen [info@thegraph.foundation](mailto:info@thegraph.foundation) adresi veya Discord (Graph Vakfı üyesi Pedro, IndexerDAO veya diğer çekirdek geliştiricilerden birine) aracılığıyla bize ulaşın. -Ready to shape the future of The Graph Network? [Start your proposal](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0057-chain-integration-process.md) now and be a part of the web3 revolution! +Graph Ağı'nın geleceğini şekillendirmeye hazır mısınız? Şimdi [Teklifinizi başlatın] (https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0057-chain-integration-process.md) ve web3 devriminin bir parçası olun! --- -## Frequently Asked Questions +## Sıkça Sorulan Sorular -### 1. How does this relate to the [World of Data Services GIP](https://forum.thegraph.com/t/gip-0042-a-world-of-data-services/3761)? +### 1. Bunun [World of Data Services teklifi (crwd)lbracketdwrcGIP] (https://forum.thegraph.com/t/gip-0042-a-world-of-data-services/3761) ile ilişkisi nedir? -This process is related to the Subgraph Data Service, applicable only to new Subgraph `Data Sources`. +Bu süreç Subgraph Veri Hizmeti ile ilgilidir ve yalnızca yeni Subgraph `Veri Kaynakları` için geçerlidir. -### 2. What happens if Firehose & Substreams support comes after the network is supported on mainnet? +### 2. Firehose & Substreams desteği, ağ ana ağda desteklendikten sonra gelirse ne olur? -This would only impact protocol support for indexing rewards on Substreams-powered subgraphs. The new Firehose implementation would need testing on testnet, following the methodology outlined for Stage 2 in this GIP. Similarly, assuming the implementation is performant and reliable, a PR on the [Feature Support Matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) would be required (`Substreams data sources` Subgraph Feature), as well as a new GIP for protocol support for indexing rewards. Anyone can create the PR and GIP; the Foundation would help with Council approval. +Bu, yalnızca Substreams destekli subgraphlar'da ödüllerin indekslenmesi için protokol desteğini etkileyecektir. Yeni Firehose uygulamasının, bu GIP'de Aşama 2 için özetlenen metodolojiyi izleyerek testnet üzerinde test edilmesi gerekecektir. Benzer şekilde, uygulamanın performanslı ve güvenilir olduğu varsayıldığı takdirde, [Özellik Destek Matrisi] (https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) üzerinde bir PR (`Substreams veri kaynakları` Subgraph Özelliği) ve ödüllerin indekslenmesi amacıyla protokol desteği için yeni bir GIP gerekecektir. PR ve GIP'yi herkes oluşturabilir; Vakıf, Konsey onayı konusunda yardımcı olacaktır. -### 3. How much time will this process take? +### 3. Bu süreç ne kadar zaman alır? -The time to mainnet is expected to be several weeks, varying based on the time of integration development, whether additional research is required, testing and bug fixes, and, as always, the timing of the governance process that requires community feedback. +Ana ağa geçiş süresinin entegrasyon geliştirme süresine, ek araştırma gerekip gerekmediğine, test ve hata düzeltmelerine ve her zaman olduğu gibi topluluk geri bildirimi gerektiren yönetişim sürecinin zamanlamasına bağlı olarak değişmek kaydıyla birkaç hafta olması beklenmektedir. -Protocol support for indexing rewards depends on the stakeholders' bandwidth to proceed with testing, feedback gathering, and handling contributions to the core codebase, if applicable. This is directly tied to the integration's maturity and how responsive the integration team is (who may or may not be the team behind the RPC/Firehose implementation). The Foundation is here to help support throughout the whole process. +İndeksleme ödülleri için protokol desteği, paydaşların test etme, geri bildirim toplama ve varsa çekirdek kod tabanına katkıları ele alma konusundaki bant genişliğine bağlıdır. Bu, entegrasyonun olgunluğuna ve entegrasyon ekibinin ne kadar duyarlı olduğu (RPC/Firehose uygulamasının arkasındaki ekip olabilir veya olmayabilir) ile doğrudan ilişkilidir. Vakıf, sürecin tamamı boyunca destek sağlamak için buradadır. -### 4. How will priorities be handled? +### 4. Öncelikler nasıl ele alınacak? -Similar to #3, it will depend on overall readiness and involved stakeholders' bandwidth. For example, a new chain with a brand new Firehose implementation may take longer than integrations that have already been battle-tested or are farther along in the governance process. This is especially true for chains previously supported on the [hosted service](https://thegraph.com/hosted-service) or those relying on already tested stacks. +\#3'e benzer şekilde, genel hazırlığa ve ilgili paydaşların bant genişliğine bağlı olacaktır. Örneğin, yepyeni bir Firehose uygulamasına sahip yeni bir zincir, halihazırda savaşta test edilmiş veya yönetişim sürecinde daha ileride olan entegrasyonlardan daha uzun sürebilir. Bu özellikle daha önce [barındırılan hizmette](https://thegraph.com/hosted-service) desteklenen zincirler veya halihazırda test edilmiş yığınlara dayanan zincirler için geçerlidir. From 319058fecd55c758d4957167357a03ae2509badd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:09 -0400 Subject: [PATCH 532/924] New translations chain-integration-overview.mdx (Chinese Simplified) --- .../pages/zh/chain-integration-overview.mdx | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/website/pages/zh/chain-integration-overview.mdx b/website/pages/zh/chain-integration-overview.mdx index 2fe6c2580909..d468efc7653f 100644 --- a/website/pages/zh/chain-integration-overview.mdx +++ b/website/pages/zh/chain-integration-overview.mdx @@ -1,49 +1,49 @@ --- -title: Chain Integration Process Overview +title: 链集成过程概述 --- -A transparent and governance-based integration process was designed for blockchain teams seeking [integration with The Graph protocol](https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468). It is a 3-phase process, as summarised below. +为寻求与[The Graph协议集成](https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468)的区块链团队设计了一个透明且基于治理的集成过程,总结如下,分为3个阶段。 -## Stage 1. Technical Integration +## 阶段1:技术集成 -- Teams work on a Graph Node integration and Firehose for non-EVM based chains. [Here's how](/new-chain-integration/). -- Teams initiate the protocol integration process by creating a Forum thread [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71) (New Data Sources sub-category under Governance & GIPs). Using the default Forum template is mandatory. +- 团队致力于进行Graph Node和非EVM基础链的Firehose技术集成。[详细信息请参阅此处](/new-chain-integration/)。 +- 团队通过在[here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71)(治理与GIPs下的新数据源子类别)创建一个论坛帖子来启动协议集成过程。强制使用默认的论坛模板。 -## Stage 2. Integration Validation +## 阶段2:集成验证 -- Teams collaborate with core developers, Graph Foundation and operators of GUIs and network gateways, such as [Subgraph Studio](https://thegraph.com/studio/), to ensure a smooth integration process. This involves providing the necessary backend infrastructure, such as the integrating chain's JSON RPC or Firehose endpoints. Teams wanting to avoid self-hosting such infrastructure can leverage The Graph's community of node operators (Indexers) to do so, which the Foundation can help with. -- Graph Indexers test the integration on The Graph's testnet. -- Core developers and Indexers monitor stability, performance, and data determinism. +- 团队与核心开发者、Graph Foundation以及GUI和网络网关的运营者合作,例如[Subgraph Studio](https://thegraph.com/studio/),以确保顺利的集成过程。这包括提供必要的后端基础设施,如集成链的JSON RPC或Firehose端点。希望避免自行托管这种基础设施的团队可以利用The Graph节点运营者(Indexers)社区来实现,而Foundation可以提供帮助。 +- Graph索引人在The Graph的测试网上测试集成。 +- 核心开发者和索引人监控稳定性、性能和数据确定性。 -## Stage 3. Mainnet Integration +## 阶段3:主网集成 -- Teams propose mainnet integration by submitting a Graph Improvement Proposal (GIP) and initiating a pull request (PR) on the [feature support matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) (more details on the link). -- The Graph Council reviews the request and approves mainnet support, providing a successful Stage 2 and positive community feedback. +- 团队通过提交一个Graph Improvement Proposal (GIP) 并在 [feature support matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) 上发起一个拉取请求 (PR) 来提议主网集成(更多详细信息请查看链接)。 +- The Graph Council(The Graph理事会)审查请求,并在成功完成第2阶段并获得积极社区反馈的情况下批准主网支持。 --- -If the process looks daunting, don't worry! The Graph Foundation is committed to supporting integrators by fostering collaboration, offering essential information, and guiding them through various stages, including navigating governance processes such as Graph Improvement Proposals (GIPs) and pull requests. If you have questions, please reach out to [info@thegraph.foundation](mailto:info@thegraph.foundation) or through Discord (either Pedro, The Graph Foundation member, IndexerDAO, or other core developers). +如果整个流程看起来令人望而生畏,不用担心!The Graph Foundation致力于通过促进合作、提供重要信息并指导各个阶段的过程来支持集成者,包括引导他们参与治理流程,如Graph Improvement Proposals (GIPs) 和拉取请求。如果您有任何问题,请通过 [info@thegraph.foundation](mailto:info@thegraph.foundation) 或通过Discord(可以联系Pedro、The Graph Foundation成员、IndexerDAO或其他核心开发者)与我们联系。 -Ready to shape the future of The Graph Network? [Start your proposal](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0057-chain-integration-process.md) now and be a part of the web3 revolution! +准备好塑造The Graph Network的未来了吗?[立即开始您的提案](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0057-chain-integration-process.md),成为Web3革命的一部分吧! --- -## Frequently Asked Questions +## 常见问题 -### 1. How does this relate to the [World of Data Services GIP](https://forum.thegraph.com/t/gip-0042-a-world-of-data-services/3761)? +### 1.这与[数据服务全球改进提案](https://forum.thegraph.com/t/gip-0042-a-world-of-data-services/3761)有何关联? -This process is related to the Subgraph Data Service, applicable only to new Subgraph `Data Sources`. +这个过程与子图数据服务相关,仅适用于新的子图“数据源”。 -### 2. What happens if Firehose & Substreams support comes after the network is supported on mainnet? +### 2. 如果在主网上支持网络之后再支持 Firehose 和 Substreams,会发生什么情况? -This would only impact protocol support for indexing rewards on Substreams-powered subgraphs. The new Firehose implementation would need testing on testnet, following the methodology outlined for Stage 2 in this GIP. Similarly, assuming the implementation is performant and reliable, a PR on the [Feature Support Matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) would be required (`Substreams data sources` Subgraph Feature), as well as a new GIP for protocol support for indexing rewards. Anyone can create the PR and GIP; the Foundation would help with Council approval. +这只会影响 Substreams 驱动的子图上的索引奖励的协议支持。新的 Firehose 实现需要在测试网上进行测试,遵循了本 GIP 中第二阶段所概述的方法论。同样地,假设实现是高性能且可靠的,那么需要在 [Feature Support Matrix](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) 上提出 PR(`Substreams 数据源` 子图特性),以及一个新的 GIP 来支持索引奖励的协议。任何人都可以创建这个 PR 和 GIP;基金会将协助获得理事会的批准。 -### 3. How much time will this process take? +### 3. 这个过程需要多长时间? -The time to mainnet is expected to be several weeks, varying based on the time of integration development, whether additional research is required, testing and bug fixes, and, as always, the timing of the governance process that requires community feedback. +主网上线预计还有数周时间,具体取决于集成开发的时间、是否需要额外的研究、测试和漏洞修复,以及始终如一地需要社区反馈的治理过程的时间。 -Protocol support for indexing rewards depends on the stakeholders' bandwidth to proceed with testing, feedback gathering, and handling contributions to the core codebase, if applicable. This is directly tied to the integration's maturity and how responsive the integration team is (who may or may not be the team behind the RPC/Firehose implementation). The Foundation is here to help support throughout the whole process. +索引奖励的协议支持取决于利益相关者继续进行测试、收集反馈以及处理对核心代码库的贡献(如果适用)的带宽。这与集成的成熟程度以及集成团队的响应能力直接相关(可能是RPC/Firehose实施背后的团队,也可能不是)。基金会将在整个过程中提供支持。 -### 4. How will priorities be handled? +### 4. 如何处理优先事项? Similar to #3, it will depend on overall readiness and involved stakeholders' bandwidth. For example, a new chain with a brand new Firehose implementation may take longer than integrations that have already been battle-tested or are farther along in the governance process. This is especially true for chains previously supported on the [hosted service](https://thegraph.com/hosted-service) or those relying on already tested stacks. From dc51322940eb683ec1d28576942dfd4b9aca9f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:10 -0400 Subject: [PATCH 533/924] New translations chain-integration-overview.mdx (Urdu (Pakistan)) --- website/pages/ur/chain-integration-overview.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/ur/chain-integration-overview.mdx b/website/pages/ur/chain-integration-overview.mdx index 1339264a7525..6855823bae83 100644 --- a/website/pages/ur/chain-integration-overview.mdx +++ b/website/pages/ur/chain-integration-overview.mdx @@ -2,12 +2,13 @@ title: چین انٹیگریشن کے عمل کا جائزہ --- -ایک شفاف اور گورننس پر مبنی انٹیگریشن کا عمل بلاک چین ٹیموں کے لیے ڈیزائن کیا گیا تھا جو [ گراف پروٹوکول کے ساتھ انٹیگریشن] \(https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468) کی تلاش میں تھے۔ یہ ایک 3 مرحلے کا عمل ہے، جیسا کہ ذیل میں خلاصہ کیا گیا ہے. +ایک شفاف اور گورننس پر مبنی انٹیگریشن کا عمل بلاک چین ٹیموں کے لیے ڈیزائن کیا گیا تھا جو [ گراف پروٹوکول کے ساتھ انٹیگریشن] (https://forum.thegraph.com/t/gip-0057-chain-integration-process/4468) کی تلاش میں تھے۔ یہ ایک 3 مرحلے کا عمل ہے، جیسا کہ ذیل میں خلاصہ کیا گیا ہے. ## مرحلہ 1. تکنیکی انٹیگریشن - ٹیمیں غیر ای وی ایم پر مبنی چینز کے لیے گراف نوڈ انٹیگریشن اور فائر ہوز پر کام کرتی ہیں۔ [یہ طریقہ ہے](/new-chain-integration/). -- ٹیمیں فورم تھریڈ بنا کر پروٹوکول انٹیگریشن کا عمل شروع کرتی ہیں [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71)(گورننس اور GIPs کے تحت نئے ڈیٹا ذرائع ذیلی زمرہ) ۔ پہلے سے طے شدہ فورم ٹیمپلیٹ کا استعمال لازمی ہے. +- ٹیمیں فورم تھریڈ بنا کر پروٹوکول انٹیگریشن کا عمل شروع کرتی ہیں [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71)(گورننس اور GIPs کے تحت نئے ڈیٹا ذرائع ذیلی زمرہ) + ۔ پہلے سے طے شدہ فورم ٹیمپلیٹ کا استعمال لازمی ہے. ## مرحلہ 2۔ انٹیگریشن کی توثیق @@ -17,7 +18,7 @@ title: چین انٹیگریشن کے عمل کا جائزہ ## مرحلہ 3۔ مین نیٹ انٹیگریشن -- ٹیمیں گراف میں بہتری کی تجویز (GIP) جمع کر کے اور [فیچر سپورٹ میٹرکس] \(https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) پر پل کی درخواست (PR) شروع کرکے مین نیٹ انٹیگریشن کی تجویز پیش کرتی ہیں۔ (مزید تفصیلات لنک پر). +- ٹیمیں گراف میں بہتری کی تجویز (GIP) جمع کر کے اور [فیچر سپورٹ میٹرکس] (https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) پر پل کی درخواست (PR) شروع کرکے مین نیٹ انٹیگریشن کی تجویز پیش کرتی ہیں۔ (مزید تفصیلات لنک پر). - گراف کونسل درخواست کا جائزہ لیتی ہے اور مین نیٹ سپورٹ کو منظور کرتی ہے، ایک کامیاب مرحلہ 2 اور مثبت کمیونٹی فیڈ بیک فراہم کرتی ہے. --- From 3367630c4ff38a8c2393fa3cb380bea209b83d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:13 -0400 Subject: [PATCH 534/924] New translations quick-start.mdx (Romanian) --- website/pages/ro/quick-start.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ro/quick-start.mdx b/website/pages/ro/quick-start.mdx index 54247bed1aad..c205b755317c 100644 --- a/website/pages/ro/quick-start.mdx +++ b/website/pages/ro/quick-start.mdx @@ -2,7 +2,7 @@ title: Quick Start --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -165,4 +165,4 @@ Now, you can query your subgraph by sending GraphQL queries to your subgraph’s You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 57c8f62c76ec597139d58ffb84176dbaa3e2741d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:13 -0400 Subject: [PATCH 535/924] New translations quick-start.mdx (French) --- website/pages/fr/quick-start.mdx | 88 ++++++++++++++++---------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/website/pages/fr/quick-start.mdx b/website/pages/fr/quick-start.mdx index 936794363ad8..1c4fc9f55376 100644 --- a/website/pages/fr/quick-start.mdx +++ b/website/pages/fr/quick-start.mdx @@ -2,15 +2,15 @@ title: Début rapide --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). Ce guide est rédigé en supposant que vous possédez : - Une adresse de smart contract sur le réseau de votre choix -- GRT to curate your subgraph -- A crypto wallet +- GRT pour créer votre subgraph +- Un portefeuille de crypto ## 1. Créez un subgraph sur Subgraph Studio @@ -59,7 +59,7 @@ Initialisez votre subgraph à partir d'un contrat existant en exécutant la comm graph init --studio ``` -See the following screenshot for an example for what to expect when initializing your subgraph: +La capture d'écran suivante donne un exemple de ce qui vous attend lors de l'initialisation de votre subgraph : ![Subgraph command](/img/subgraph-init-example.png) @@ -95,7 +95,7 @@ You will be asked for a version label. It's strongly recommended to use [semver] Vous pouvez tester votre subgraph en effectuant une requête type dans la section de l'aire de jeux. -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: +Les registres ou logs vous indiqueront s'il y a des erreurs avec votre subgraph. Les logs d'un subgraph opérationnel ressembleront à ceci : ![Subgraph logs](/img/subgraph-logs-image.png) @@ -103,43 +103,43 @@ If your subgraph is failing, you can query the subgraph health by using the Grap ```graphql { - indexingStatuses(sous-graphiques : ["Qm..."]) { - nœud - synchronisé - santé - erreur fatale { - message - bloc { - nombre - hacher - } - gestionnaire - } - nonFatalErrors { - message - bloc { - nombre - hacher - } - gestionnaire - } - Chaînes { - réseau - chaîneHeadBlock { - nombre - } - premierBloc { - nombre - } - dernierBloc { - nombre - } - dernierBlocSanté { - nombre - } - } - EntitéCount - } + indexingStatuses(subgraphs: ["Qm..."]) { + node + synced + health + fatalError { + message + block { + number + hash + } + handler + } + nonFatalErrors { + message + block { + number + hash + } + handler + } + chains { + network + chainHeadBlock { + number + } + earliestBlock { + number + } + latestBlock { + number + } + lastHealthyBlock { + number + } + } + entityCount + } } ``` @@ -147,7 +147,7 @@ If your subgraph is failing, you can query the subgraph health by using the Grap Une fois que votre subgraph a été déployé dans le Subgraph Studio, que vous l'avez testé et que vous êtes prêt à le mettre en production, vous pouvez alors le publier sur le réseau décentralisé. -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. +Dans le Subgraph Studio, cliquez sur votre subgraph. Sur la page du subgraph, vous pouvez cliquer sur le bouton de publication en haut à droite. Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). @@ -165,4 +165,4 @@ Désormais, vous pouvez interroger votre subgraph en envoyant des requêtes Grap Si vous n'avez pas votre clé API, vous pouvez effectuer une requête à partir de votre dapp via l'URL de requête temporaire gratuite et limitée dans le temps, qui peut être utilisée pour le développement et la mise à l'essai. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 24c8bda35d9a8487522abb5a03d363ad1e308e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:14 -0400 Subject: [PATCH 536/924] New translations quick-start.mdx (Spanish) --- website/pages/es/quick-start.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/es/quick-start.mdx b/website/pages/es/quick-start.mdx index e4f18f3bfaab..0ee39a3ca33e 100644 --- a/website/pages/es/quick-start.mdx +++ b/website/pages/es/quick-start.mdx @@ -2,7 +2,7 @@ title: Comienzo Rapido --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -165,4 +165,4 @@ Ahora puedes hacer consultas a tu subgrafo enviando consultas GraphQL a la URL d Puedes consultar desde tu dapp si no tienes tu clave de API a través de la URL de consulta temporal, libre y de tarifa limitada, que puede utilizarse para el desarrollo y la puesta en marcha. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 6f5c044ff2cd710ccdeeb5169f39e592c39cd189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:15 -0400 Subject: [PATCH 537/924] New translations quick-start.mdx (Arabic) --- website/pages/ar/quick-start.mdx | 86 ++++++++++++++++---------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/website/pages/ar/quick-start.mdx b/website/pages/ar/quick-start.mdx index 08bde551c494..004970c10ac8 100644 --- a/website/pages/ar/quick-start.mdx +++ b/website/pages/ar/quick-start.mdx @@ -2,25 +2,25 @@ title: بداية سريعة --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +هذا الدليل سيأخذك سريعا خلال كيفية تهيئة وإنشاء ونشر الغراف الفرعي الخاص بك في سبغراف استيديو أو [الخدمة المستضافة]. -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). +تأكد من أن الغراف الفرعي الخاص بك سيقوم بفهرسة البيانات من [الشبكة المدعومة](/developing/supported-networks). -This guide is written assuming that you have: +تم كتابة هذا الدليل على افتراض أن لديك: -- A smart contract address on the network of your choice +- عنوان عقد ذكي على الشبكة التي تختارها - GRT to curate your subgraph -- A crypto wallet +- محفظة عملات رقمية ## 1. Create a subgraph on Subgraph Studio -Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your wallet. +انتقل إلى [سبغراف استوديو] (https://thegraph.com/studio) وقم بربط محفظتك. -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. +بمجرد الريط، يمكنك البدء بالنقر على "إنشاء غراف فرعي." اختر الشبكة من اختيارك وانقر على "استمرار". ## 2. Install the Graph CLI -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. +أداة واجهة سطر الأوامر للغراف Graph CLI مكتوبة بلغة جافاسكريبت وستحتاج إلى تثبيت npm أو yarn لاستخدامها. On your local machine, run one of the following commands: @@ -38,51 +38,51 @@ yarn global add @graphprotocol/graph-cli ## 3. Initialize your Subgraph -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). +> يمكنك العثور على الأوامر المتعلقة بالغراف الفرعي الخاص بك على صفحة الغراف الفرعي في (سبغراف استوديو) (https://thegraph.com/studio). -When you initialize your subgraph, the CLI tool will ask you for the following information: +عند تهيئة غرافك الفرعي، ستطلب منك أداة "واجهة سطر الأوامر" (CLI) المعلومات التالية: -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from +- البروتوكول: اختر البروتوكول الذي سيفهرس من فهرسة البيانات +- المعرّف الخاص بالغراف الفرعي: قم بإنشاء اسم لغرافك الغرعي. يُعتبر "سبغراف سلوج" معرّف فريد يستخدم لتمييز غرافك الفرعي. +- الدليل الذي سيتم إنشاء الغراف الفرعي فيه: اختر الدليل المحلي الذي ترغب في إنشاء الغراف الفرعي فيه +- شبكة الايثيروم(اختيارية): قد تحتاج إلى تحديد الشبكة المتوافقة مع آلة إيثيريوم الإفتراضية التي سيقوم غرافك الفرعي بفهرسة البيانات منها - Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. +- واجهة التطبيق الثنائية: إذا لم يتم ملء واجهة التطبيق الثنائية تلقائياً، فستحتاج إلى إدخاله يدوياً كملف JSON +- كتلة البداية: يُقترح إدخال كتلة البداية لتوفير الوقت أثناء قيام غرافك الفرعي بفهرسة بيانات سلاسل الكتل. يمكنك تحديد كتلة البداية من خلال العثور على الكتلة التي تم نشر عقدك فيها. - Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract +- فهرسة أحداث العقد ككيانات: يُقترح ضبط هذا الخيار على "صحيح" (True) حيث سيتم إضافة تعيينات تلقائية إلى غرافك الفرعي لكل حدث يتم إصداره +- إضافة عقد آخر (اختياري): يمكنك إضافة عقد آخر -Initialize your subgraph from an existing contract by running the following command: +قم بتهيئة غرافك الفرعي من عقد موجود عن طريق تنفيذ الأمر التالي: ```sh graph init --studio ``` -See the following screenshot for an example for what to expect when initializing your subgraph: +يرجى مراجعة الصورة المرفقة كمثال عن ما يمكن توقعه عند تهيئة غرافك الفرعي: -![Subgraph command](/img/subgraph-init-example.png) +أمر الغراف الفرعي(/img/subgraph-init-example.png) -## 4. Write your Subgraph +## 4. اكتب غرافك الفرعي -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: +الأوامر السابقة تنشئ هيكل غرافك الفرعي والذي يمكنك استخدامه كنقطة بداية لبناء غرافك الفرعي. عند إجراء تغييرات على الغراف الفرعي، ستعمل بشكل رئيسي مع ثلاثة ملفات: -- : (Manifest(subgraph.yaml يحدد ال manifest مصادر البيانات التي سيقوم Subgraphs الخاص بك بفهرستها. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. +- البيان التعريفي (subgraph.yaml) - يقوم بتحديد أي من مصادر البيانات التي ستقوم غرافاتك الفرعية بفهرستها. +- المخطط (schema.graphql) - مخطط لغة استعلام الغراف GraphQL يحدد البيانات التي ترغب في استردادها من الغراف الفرعي. - (AssemblyScript Mappings (mapping.ts هذا هو الكود الذي يترجم البيانات من مصادر البيانات الخاصة بك إلى الكيانات المحددة في المخطط. -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). +للمزيد من المعلومات حول كيفية كتابة غرافك الفرعي، يُرجى الاطلاع على إنشاء غراف فرعي(/developing/creating-a-subgraph). ## 5. Deploy to the Subgraph Studio -Once your subgraph is written, run the following commands: +عند كتابة غرافك الفرعي، قم بتنفيذ الأوامر التالية: ```sh $ graph codegen $ graph build ``` -- وثق وأنشر ال Subgraph الخاص بك. يمكن العثور على مفتاح النشر في صفحة Subgraph في Subgraph Studio. +- قم بالمصادقة وأنشر غرافك الفرعي. يمكن العثور على مفتاح النشر على صفحة الغراف الفرعي في سبغراف استيديو. ```sh $ graph auth --studio @@ -91,15 +91,15 @@ $ graph deploy --studio You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. -## 6. Test your subgraph +## 6. اختبر غرافك الفرعي -You can test your subgraph by making a sample query in the playground section. +يمكنك اختبار غرافك الفرعي بإجراء استعلام تجريبي في قسم الملعب (Playground). -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: +ستخبرك السجلات إذا كانت هناك أي أخطاء في غرافك الفرعي. ستبدو سجلات الغراف الفرعي الفعّال على النحو التالي: ![Subgraph logs](/img/subgraph-logs-image.png) -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: +إذا فشل غرافك الفرعي، فيمكنك الاستعلام عن صحة الغراف الفرعي باستخدام ملعب غرافي GraphiQL Playground. لاحظ أنه يمكنك الاستفادة من الاستعلام أدناه وإدخال معرف النشر الخاص بك لغرافك الفرعي. في هذه الحالة، `Qm...` هو معرف النشر (يمكن العثور عليه في صفحة الغراف الفرعي ضمن **التفاصيل**). سيخبرك الاستعلام أدناه عند فشل الغراف الفرعي حتى تتمكن من إصلاحه بناءً عليه: ```graphql { @@ -143,26 +143,26 @@ If your subgraph is failing, you can query the subgraph health by using the Grap } ``` -## 7. Publish Your Subgraph to The Graph’s Decentralized Network +## 7. قم بنشر غرافك الفرعي على شبكة الغراف اللامركزية -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. +حالما يتم نشر غرافك الفرعي على سبغراف استيديو، وقمت باختباره، وهو جاهز لوضع الإنتاج، يمكنك عندها نشره على الشبكة اللامركزية. -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. +في سبغراف استيديو، انقر على غرافك الفرعي. في صفحة الغراف الفرعي، ستتمكن من النقر على زر النشر في أعلى اليمين. -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). +حدد الشبكة التي ترغب في نشر غرافك الفرعي عليها. يُوصى بنشر الغرافات الفرعية على شبكة أربترم ون للاستفادة من [سرعة معاملات أسرع وتكاليف غاز أقل](/arbitrum/arbitrum-faq). -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. +قبل أن تتمكن من استعلام غرافك الفرعي، يجب أن يبدأ المفهرسون في تقديم الاستعلامات عليه. لتتمكن من تسريع هذه العملية، تستطيع أن تنسِّق غرافك الفرعي باستخدام عملة الغراف GRT. -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. +في الوقت الحالي، يُوصى بأن تنسق غرافك الفرعي باستخدام 10,000 من عملة الغراف GRT لضمان أن يتم فهرسته ويكون متاحاً للاستعلام في أقرب وقت ممكن. -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: +لتوفير تكاليف الغاز، يمكنك تنسيق غرافك الفرعي في نفس العملية التي نشرته عن طريق اختيار هذا الزر عند نشر غرافك الفرعي على شبكة الغراف اللامركزية: ![Subgraph publish](/img/publish-and-signal-tx.png) -## 8. Query your Subgraph +## 8. استعلم عن غرافك الفرعي -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. +الآن يمكنك الاستعلام عن غرافك الفرعي عن طريق إرسال استعلامات لغة GraphQL إلى عنوان استعلامات غرافك الفرعي URL والذي يمكنك أن تجده عن طريق النقر على زر الاستعلام. -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. +يمكنك الاستعلام من التطبيق اللامركزي الخاص بك إذا لم يكن لديك مفتاح لواجهة برمجة التطبيقات عبر عنوان URL للاستعلام المؤقت المجاني والمحدود المعدل والذي يمكن استخدامه للتطوير والتدريج. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 59ccbd07830b6244402ed91dda32c8b0f2fa4f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:16 -0400 Subject: [PATCH 538/924] New translations quick-start.mdx (Czech) --- website/pages/cs/quick-start.mdx | 92 ++++++++++++++++---------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/cs/quick-start.mdx b/website/pages/cs/quick-start.mdx index 54247bed1aad..f30837fd77ee 100644 --- a/website/pages/cs/quick-start.mdx +++ b/website/pages/cs/quick-start.mdx @@ -1,28 +1,28 @@ --- -title: Quick Start +title: Rychlé spuštění --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). -This guide is written assuming that you have: +Tato příručka je napsána za předpokladu, že máte: -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet +- Adresa chytrého kontraktu v síti podle vašeho výběru +- GRT ke kurátorství vašeho podgrafu +- Kryptopeněženka -## 1. Create a subgraph on Subgraph Studio +## 1. Vytvoření podgrafu v Subgraph Studio Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your wallet. -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. +Po připojení můžete začít kliknutím na tlačítko "create a subgraph". Vyberte vybranou síť a klikněte na tlačítko pokračovat. -## 2. Install the Graph CLI +## 2. Nainstalujte Graph CLI The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. -On your local machine, run one of the following commands: +V místním počítači spusťte jeden z následujících příkazů: Using [npm](https://www.npmjs.com/): @@ -36,53 +36,53 @@ Using [yarn](https://yarnpkg.com/): yarn global add @graphprotocol/graph-cli ``` -## 3. Initialize your Subgraph +## 3. Inicializujte podgraf > You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). -When you initialize your subgraph, the CLI tool will ask you for the following information: +Při inicializaci podgrafu vás nástroj CLI požádá o následující informace: -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract +- Protokol: vyberte protokol, ze kterého bude váš podgraf indexovat data. +- Slug podgrafu: vytvořte název podgrafu. Váš podgraf slug je identifikátor vašeho podgrafu. +- Adresář pro vytvoření podgrafu: vyberte místní adresář. +- Ethereum síť (nepovinné): možná budete muset zadat, ze které sítě kompatibilní s EVM bude váš subgraf indexovat data. +- Adresa zakázky: Vyhledejte adresu chytré smlouvy, ze které se chcete dotazovat na data. +- ABI: Pokud se ABI nevyplňuje automaticky, je třeba jej zadat ručně jako soubor JSON. +- Počáteční blok: Doporučuje se zadat počáteční blok, abyste ušetřili čas, zatímco váš subgraf indexuje data blockchainu. Počáteční blok můžete vyhledat tak, že najdete blok, ve kterém byl váš kontrakt nasazen. +- Název smlouvy: zadejte název své smlouvy. +- Indexovat události smlouvy jako entity: doporučujeme nastavit tuto hodnotu na true, protože se automaticky přidá mapování do vašeho subgrafu pro každou emitovanou událost +- Přidat další smlouvu(nepovinné): můžete přidat další smlouvu -Initialize your subgraph from an existing contract by running the following command: +Inicializujte podgraf z existující smlouvy spuštěním následujícího příkazu: ```sh graph init --studio ``` -See the following screenshot for an example for what to expect when initializing your subgraph: +Na následujícím snímku najdete příklad toho, co můžete očekávat při inicializaci podgrafu: ![Subgraph command](/img/subgraph-init-example.png) -## 4. Write your Subgraph +## 4. Napište svůj podgraf -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: +Předchozí příkazy vytvořily podgraf lešení, který můžete použít jako výchozí bod pro sestavení podgrafu. Při provádění změn v podgrafu budete pracovat především se třemi soubory: -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. +- Manifest (subgraph.yaml) - Manifest definuje, jaké datové zdroje budou vaše podgrafy indexovat. +- Schéma (schema.graphql) - Schéma GraphQL definuje, jaká data chcete z podgrafu získat. +- AssemblyScript Mapování (mapping.ts) - Jedná se o kód, který převádí data z datových zdrojů na entity definované ve schématu. -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). +Další informace o zápisu podgrafu naleznete v části [Creating a Subgraph](/developing/creating-a-subgraph). -## 5. Deploy to the Subgraph Studio +## 5. Nasazení do studia Subgraph Studio -Once your subgraph is written, run the following commands: +Jakmile je podgraf napsán, spusťte následující příkazy: ```sh $ graph codegen $ graph build ``` -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. +- Ověřte a nasaďte svůj podgraf. Klíč k nasazení najdete na stránce Subgraph ve Studiu Subgraph. ```sh $ graph auth --studio @@ -91,11 +91,11 @@ $ graph deploy --studio You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. -## 6. Test your subgraph +## 6. Otestujte svůj podgraf -You can test your subgraph by making a sample query in the playground section. +Svůj podgraf můžete otestovat pomocí vzorového dotazu v sekci hřiště. -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: +V protokolech se dozvíte, zda se v podgrafu vyskytly nějaké chyby. Protokoly funkčního podgrafu budou vypadat takto: ![Subgraph logs](/img/subgraph-logs-image.png) @@ -143,26 +143,26 @@ If your subgraph is failing, you can query the subgraph health by using the Grap } ``` -## 7. Publish Your Subgraph to The Graph’s Decentralized Network +## 7. Zveřejnění subgrafu v decentralizované síti grafu -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. +Jakmile je váš subgraf nasazen do Subgraph Studia, otestován a připraven k uvedení do produkčního provozu, můžete jej publikovat v decentralizované síti. -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. +Ve Studio podgrafů klikněte na svůj podgraf. Na stránce podgrafu budete moci kliknout na tlačítko publikovat vpravo nahoře. Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. +Než se budete moci dotazovat na podgraf, je třeba, aby na něm indexery začaly obsluhovat dotazy. Abyste tento proces zefektivnili, můžete si pomocí GRT vytvořit vlastní podgraf. -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. +V době psaní tohoto článku se doporučuje, abyste si vytvořili vlastní podgraf s 10,000 GRT, abyste zajistili, že bude co nejdříve indexován a dostupný pro dotazování. -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: +Abyste ušetřili náklady na benzín, můžete svůj subgraf kurátorovat ve stejné transakci, v níž jste ho publikovali, a to výběrem tohoto tlačítka při publikování subgrafu do decentralizované sítě The Graph: ![Subgraph publish](/img/publish-and-signal-tx.png) -## 8. Query your Subgraph +## 8. Dotaz na podgraf -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. +Nyní se můžete dotazovat na svůj podgraf odesláním dotazů GraphQL na adresu URL dotazu podgrafu, kterou najdete kliknutím na tlačítko dotazu. -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. +Pokud nemáte svůj klíč API, můžete se ze své aplikace dotazovat prostřednictvím bezplatné dočasné adresy URL pro dotazy s omezenou sazbou, kterou lze použít pro vývoj a staging. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From d548efae8d93c053113f84cadeb06230f1f722fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:16 -0400 Subject: [PATCH 539/924] New translations quick-start.mdx (German) --- website/pages/de/quick-start.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/de/quick-start.mdx b/website/pages/de/quick-start.mdx index 9b489cbe3056..23d52976da80 100644 --- a/website/pages/de/quick-start.mdx +++ b/website/pages/de/quick-start.mdx @@ -2,9 +2,9 @@ title: Schnellstart --- -Diese Anleitung führt Sie schnell durch die Initialisierung, Erstellung und Bereitstellung Ihres Subgraphen im Subgraph Studio oder im [Hostingdienst](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. -Stellen Sie sicher, dass Ihr Subgraph Daten aus einem [unterstützten Netzwerk] \(/developing/supported-networks) indiziert. +Stellen Sie sicher, dass Ihr Subgraph Daten aus einem [unterstützten Netzwerk] (/developing/supported-networks) indiziert. Bei der Erstellung dieses Leitfadens wird davon ausgegangen, dass Sie über die entsprechenden Kenntnisse verfügen: @@ -14,7 +14,7 @@ Bei der Erstellung dieses Leitfadens wird davon ausgegangen, dass Sie über die ## 1. Erstellen Sie einen Untergraphen in Subgraph Studio -Gehen Sie zu [Subgraph Studio](https://thegraph.com/studio/) und verbinden Sie Ihre Wallet. +Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your wallet. Sobald die Verbindung hergestellt ist, können Sie auf " Subgraph erstellen" klicken. Wählen Sie das Netzwerk Ihrer Wahl und klicken Sie auf "Weiter". @@ -165,4 +165,4 @@ Jetzt können Sie Ihren Subgraphen abfragen, indem Sie GraphQL-Abfragen an die A Wenn Sie Ihren API-Schlüssel nicht haben, können Sie von Ihrer App aus eine Abfrage über die kostenlose, zeitlich begrenzte Abfrage-URL durchführen, die für die Entwicklung und das Bereitstellen verwendet werden kann. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 99324973439ce0b4379350c22f248a25c9583072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:17 -0400 Subject: [PATCH 540/924] New translations quick-start.mdx (Italian) --- website/pages/it/quick-start.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/it/quick-start.mdx b/website/pages/it/quick-start.mdx index 54247bed1aad..c205b755317c 100644 --- a/website/pages/it/quick-start.mdx +++ b/website/pages/it/quick-start.mdx @@ -2,7 +2,7 @@ title: Quick Start --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -165,4 +165,4 @@ Now, you can query your subgraph by sending GraphQL queries to your subgraph’s You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 76e77ce2fc0b551c4be476905993e897789ceddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:18 -0400 Subject: [PATCH 541/924] New translations quick-start.mdx (Japanese) --- website/pages/ja/quick-start.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/pages/ja/quick-start.mdx b/website/pages/ja/quick-start.mdx index 208227db71b5..a862bbf521e8 100644 --- a/website/pages/ja/quick-start.mdx +++ b/website/pages/ja/quick-start.mdx @@ -2,9 +2,9 @@ title: クイックスタート --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +このガイドでは、サブグラフの初期化、作成、Subgraph Studioまたはホスティングサービスへのデプロイ方法を説明します。 -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). +サブグラフが [supported network](/developing/supported-networks) からのデータにインデックスを付けることを確認してください。 このガイドは、次のことを前提として書かれています。 @@ -14,13 +14,13 @@ Ensure that your subgraph will be indexing data from a [supported network](/deve ## 1. Subgraph Studio でサブグラフを作成する -Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your wallet. +[Subgraph Studio](https://thegraph.com/studio/)にアクセスし、ウォレットを接続する。 接続したら、「サブグラフの作成」をクリックして開始できます。選択したネットワークを選択し、[続行] をクリックします。 ## 2. Graph CLI をインストールする -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. +Graph CLI は JavaScript で書かれており、これを使用するには「npm」または「yarn」のいずれかをインストールする必要があります。 ローカル マシンで、次のいずれかのコマンドを実行します。 @@ -38,7 +38,7 @@ yarn global add @graphprotocol/graph-cli ## 3. サブグラフの初期化 -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). +> 特定のサブグラフのコマンドは、[Subgraph Studio](https://thegraph.com/studio/) のサブグラフ ページで見つけることができます。 サブグラフを初期化すると、CLI ツールは次の情報を要求します。 @@ -89,7 +89,7 @@ $ graph auth --studio $ graph deploy --studio ``` -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. +バージョンラベルの入力を求められます。 「0.0.1」のようなバージョン管理には [semver](https://semver.org/) を使用することを強くお勧めします。 つまり、「v1」、「version1」、「asdf」などの任意の文字列をバージョンとして自由に選択できます。 ## 6. サブグラフをテストする @@ -99,7 +99,7 @@ You will be asked for a version label. It's strongly recommended to use [semver] ![Subgraph logs](/img/subgraph-logs-image.png) -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: +サブグラフに障害が発生した場合は、GraphiQL Playground を使用してサブグラフの健全性をクエリできます。 以下のクエリを利用して、サブグラフのデプロイメント ID を入力できることに注意してください。 この場合、`Qm...` はデプロイメント ID です (これは、サブグラフ ページの **詳細** にあります)。 以下のクエリはサブグラフがいつ失敗したかを通知するため、それに応じてデバッグできます。 ```graphql { @@ -148,7 +148,7 @@ If your subgraph is failing, you can query the subgraph health by using the Grap Subgraph Studio で、サブグラフをクリックします。サブグラフのページでは、右上の公開ボタンをクリックできます。 -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). +サブグラフを公開したいネットワークを選択します。 [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq) を利用するために、サブグラフを Arbitrum One に公開することをお勧めします。 サブグラフにクエリを実行する前に、インデクサーはサブグラフに対するクエリの提供を開始する必要があります。このプロセスを合理化するために、GRT を使用して独自のサブグラフをキュレートできます。 @@ -164,4 +164,4 @@ Select the network you would like to publish your subgraph to. It is recommended API キーを持っていない場合は、開発とステージングに使用できる無料のレート制限された一時クエリ URL を介して、dapp からクエリを実行できます。 -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +サブグラフからデータをクエリする方法については、[こちら](/querying/querying-the-graph/)を参照してください。 From f4bcc4922d69cbea5fcd9688502381de77331a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:19 -0400 Subject: [PATCH 542/924] New translations quick-start.mdx (Korean) --- website/pages/ko/quick-start.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ko/quick-start.mdx b/website/pages/ko/quick-start.mdx index 54247bed1aad..c205b755317c 100644 --- a/website/pages/ko/quick-start.mdx +++ b/website/pages/ko/quick-start.mdx @@ -2,7 +2,7 @@ title: Quick Start --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -165,4 +165,4 @@ Now, you can query your subgraph by sending GraphQL queries to your subgraph’s You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 2909a59646dd7b04b87724fae93df2fdde1d431c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:20 -0400 Subject: [PATCH 543/924] New translations quick-start.mdx (Dutch) --- website/pages/nl/quick-start.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/nl/quick-start.mdx b/website/pages/nl/quick-start.mdx index 54247bed1aad..709cb6213a04 100644 --- a/website/pages/nl/quick-start.mdx +++ b/website/pages/nl/quick-start.mdx @@ -1,8 +1,8 @@ --- -title: Quick Start +title: Snelle Start --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -36,7 +36,7 @@ Using [yarn](https://yarnpkg.com/): yarn global add @graphprotocol/graph-cli ``` -## 3. Initialize your Subgraph +## 3. Initialiseer je Subgraph > You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). @@ -71,7 +71,7 @@ The previous commands create a scaffold subgraph that you can use as a starting - Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. - AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). +Voor meer informatie over hoe je je subgraph kunt schrijven, zie [Creating a Subgraph](/developing/creating-a-subgraph). ## 5. Deploy to the Subgraph Studio @@ -165,4 +165,4 @@ Now, you can query your subgraph by sending GraphQL queries to your subgraph’s You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From d737b3fb5a5ca09d8e6a2fb1b523651208f3f42d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:20 -0400 Subject: [PATCH 544/924] New translations quick-start.mdx (Polish) --- website/pages/pl/quick-start.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/pl/quick-start.mdx b/website/pages/pl/quick-start.mdx index c16b047e0c75..96627e4a43e1 100644 --- a/website/pages/pl/quick-start.mdx +++ b/website/pages/pl/quick-start.mdx @@ -1,8 +1,8 @@ --- -title: ' Na start' +title: " Na start" --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -165,4 +165,4 @@ Now, you can query your subgraph by sending GraphQL queries to your subgraph’s You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 94ad28c789f73df01c0b2ee77c75acf361c86848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:21 -0400 Subject: [PATCH 545/924] New translations quick-start.mdx (Portuguese) --- website/pages/pt/quick-start.mdx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/pt/quick-start.mdx b/website/pages/pt/quick-start.mdx index eca9c7157d7e..3373f1beef31 100644 --- a/website/pages/pt/quick-start.mdx +++ b/website/pages/pt/quick-start.mdx @@ -2,7 +2,7 @@ title: Começo Rápido --- -Neste guia, aprenda como inicializar, criar e lançar o seu subgraph ao Subgraph Studio ou ao [serviço hospedado](#hosted-service). +Neste guia, aprenda como inicializar, criar e lançar o seu subgraph ao Subgraph Studio ou ao serviço hospedado. Garanta que o seu subgraph indexará dados de uma [rede apoiada](/developing/supported-networks). @@ -24,13 +24,13 @@ O Graph CLI é escrito em JavaScript. Para usá-lo, instale o `npm` ou `yarn`. Execute um dos seguintes comandos na sua máquina local: -Using [npm](https://www.npmjs.com/): +Uso de [npm](https://www.npmjs.com/): ```sh npm install -g @graphprotocol/graph-cli ``` -Using [yarn](https://yarnpkg.com/): +Uso de [yarn](https://yarnpkg.com/): ```sh yarn global add @graphprotocol/graph-cli @@ -38,7 +38,7 @@ yarn global add @graphprotocol/graph-cli ## 3. Como Inicializar o seu Subgraph -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). +> Veja comandos para o seu subgraph específico na página do subgraph no [Subgraph Studio](https://thegraph.com/studio/). Ao inicializar o seu subgraph, a ferramenta CLI pedirá pelas seguintes informações: @@ -61,7 +61,7 @@ graph init --studio Veja a imagem a seguir para um exemplo do que esperar quando for inicializar o seu subgraph: -![Subgraph command](/img/subgraph-init-example.png) +![Comando do subgraph](/img/subgraph-init-example.png) ## 4. Como escrever o seu Subgraph @@ -89,7 +89,7 @@ $ graph auth --studio $ graph deploy --studio ``` -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. +Há de inserir um rótulo de versão. É altamente recomendado usar o [semver](https://semver.org/) para números de versão, como `0.0.1`. Dito isto, dá para escolher qualquer string como versão, por exemplo: `v1`, `version1`, `asdf`. ## 6. Como testar o seu subgraph @@ -97,9 +97,9 @@ Podes testar o seu subgraph ao fazer um exemplo de query na secção do playgrou Os logs dirão-lhe se há quaisquer erros com o seu subgraph. Os logs de um subgraph operacional parecerão com isto: -![Subgraph logs](/img/subgraph-logs-image.png) +![Logs do subgraph](/img/subgraph-logs-image.png) -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: +Se o seu subgraph continuar a falhar, faça um query sobre a saúde do subgraph com o GraphiQL Playground. Perceba que dá para usar o query abaixo e inserir sua ID de lançamento para seu subgraph. Neste caso, `Qm...` é a ID de lançamento (na página Subgraph sob **Detalhes**). O texto abaixo te dirá quando um subgraph falha para que você possa fazer o debug de acordo: ```graphql { @@ -149,7 +149,7 @@ Quando o seu subgraph for lançado ao Subgraph Studio, estiver testado, e estive No Subgraph Studio, clique no seu subgraph. Na página do subgraph, clique no botão Publish (editar) no canto superior direito. -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). +Selecione a rede onde quer editar o seu subgraph. Vale editar subgraphs no Arbitrum One, para aproveitar as [transações mais rápidas e custos menores de gas](/arbitrum/arbitrum-faq). Antes de poder consultar o seu subgraph, os Indexadores precisam começar a servir queries nele. O processo fica mais simples se curares o seu próprio subgraph com GRT. @@ -157,7 +157,7 @@ Até o fechamento deste texto, é recomendado que cure o seu próprio subgraph c Para poupar custos de gas, cure o seu subgraph na mesma transação em que ele foi publicado, ao selecionar este botão quando publicar o seu subgraph na rede descentralizada do The Graph: -![Subgraph publish](/img/publish-and-signal-tx.png) +![Editar subgraph](/img/publish-and-signal-tx.png) ## 8. Como consultar o seu subgraph @@ -165,4 +165,4 @@ Agora, podes consultar o seu subgraph com o envio de queries GraphQL para o URL Caso não tenha a sua chave API, pode fazer um query do seu dApp pelo URL de consulta temporária, grátis e com rate-limit, que pode ser usado para desenvolvimento e encenação. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +Para mais informações sobre queries de dados do seu subgraph, leia mais [aqui](/querying/querying-the-graph/). From 54f85f8d0d17bc124ed719aece9b1514c632064e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:22 -0400 Subject: [PATCH 546/924] New translations quick-start.mdx (Russian) --- website/pages/ru/quick-start.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/ru/quick-start.mdx b/website/pages/ru/quick-start.mdx index b7ac25cf9f89..59f792fdd4de 100644 --- a/website/pages/ru/quick-start.mdx +++ b/website/pages/ru/quick-start.mdx @@ -2,7 +2,7 @@ title: Быстрый старт --- -Из этого руководства Вы быстро узнаете, как инициализировать, создать и развернуть свой субграф в Subgraph Studio или [хостинговом сервисе](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Убедитесь, что ваш субграф будет индексировать данные из [поддерживаемой сети](/developing/supported-networks). @@ -14,7 +14,7 @@ title: Быстрый старт ## 1. Создание субграфа в Subgraph Studio -Перейдите в [Subgraph Studio](https://thegraph.com/studio/) и подключите свой кошелек. +Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your wallet. После подключения Вы можете начать с нажатия кнопки «Создать субграф». Выберите нужную сеть и нажмите «Продолжить». @@ -165,4 +165,4 @@ Select the network you would like to publish your subgraph to. It is recommended Вы можете сделать запрос из своего децентрализованного приложения, если у Вас нет ключа API, с помощью бесплатного временного URL-адреса запроса с ограниченной скоростью, который можно использовать для разработки и подготовки. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 792438c89937ce3e4b9048cf8dc0282fe9b08e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:23 -0400 Subject: [PATCH 547/924] New translations quick-start.mdx (Swedish) --- website/pages/sv/quick-start.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/sv/quick-start.mdx b/website/pages/sv/quick-start.mdx index 7e997dda0d2d..7813265c319b 100644 --- a/website/pages/sv/quick-start.mdx +++ b/website/pages/sv/quick-start.mdx @@ -2,9 +2,9 @@ title: Snabbstart --- -Den här guiden kommer snabbt att ta dig igenom hur du initierar, skapar och distribuerar din subgraf till Subgraf Studio eller [värdtjänst](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. -Se till att din subgraf kommer att indexera data från ett [nätverk som stöds] \(/developing/supported-networks). +Se till att din subgraf kommer att indexera data från ett [nätverk som stöds] (/developing/supported-networks). Den här guiden är skriven förutsatt att du har: @@ -14,7 +14,7 @@ Den här guiden är skriven förutsatt att du har: ## 1. Skapa en subgraf på Subgraph Studio -Gå till [Subgraph Studio](https://thegraph.com/studio/) och anslut din plånbok. +Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your wallet. När du är ansluten kan du börja med att klicka på "skapa en subgraf". Välj det nätverk du vill ha och klicka på fortsätt. @@ -165,4 +165,4 @@ Nu kan du fråga din subgraf genom att skicka GraphQL frågor till din subgrafs Du kan fråga från din dapp om du inte har din API nyckel via den kostnadsfria, hastighetsbegränsade tillfälliga sökadressen som kan användas för utveckling och iscensättning. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 71c7232ad3229d5cc58add0ef61dcb8b2b7113fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:24 -0400 Subject: [PATCH 548/924] New translations quick-start.mdx (Turkish) --- website/pages/tr/quick-start.mdx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/tr/quick-start.mdx b/website/pages/tr/quick-start.mdx index 1a661f59ac69..961ef4a5d925 100644 --- a/website/pages/tr/quick-start.mdx +++ b/website/pages/tr/quick-start.mdx @@ -2,9 +2,9 @@ title: Hızlı Başlangıç --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +Bu kılavuz, subgraph'inizi Subgraph Studio'ya veya barındırılan hizmete nasıl başlatacağınız, oluşturacağınız ve deploy edeceğiniz konusunda size hızlı bir şekilde yol gösterecektir. -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). +Subgraph'ınızın [desteklenen bir ağdan](/developing/supported-networks) gelen verileri indeksleyeceğinden emin olun. Bu rehber, aşağıdakilere sahip olduğunuzu varsayar: @@ -14,23 +14,23 @@ Bu rehber, aşağıdakilere sahip olduğunuzu varsayar: ## 1. Subgraph Stüdyo'da bir subgraph oluşturun -Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your wallet. +[Subgraph Studio'ya](https://thegraph.com/studio/) gidin ve cüzdanınızı bağlayın. Bağlandıktan sonra, "bir subgraph oluştur" seçeneğine tıklayarak başlayabilirsiniz. Tercih ettiğiniz ağı seçin ve devam et'e tıklayın. ## 2. Graph CLI'yi yükleyin -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. +Graph CLI JavaScript ile yazılmıştır ve kullanmak için `npm` ya da `yarn` yüklemiş olmanız gerekir. Yerel makinenizde aşağıdaki komutlardan birini çalıştırın: -Using [npm](https://www.npmjs.com/): +[npm](https://www.npmjs.com/) kullanımı: ```sh npm install -g @graphprotocol/graph-cli ``` -Using [yarn](https://yarnpkg.com/): +[yarn](https://yarnpkg.com/) kullanımı: ```sh yarn global add @graphprotocol/graph-cli @@ -38,7 +38,7 @@ yarn global add @graphprotocol/graph-cli ## 3. Subgraph'ınızı başlatın -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). +> Özel subgraph'inize yönelik komutları, [Subgraph Studio](https://thegraph.com/studio/) subgraph'i sayfasında bulabilirsiniz. Subgraph'ınızı başlattığınızda, CLI aracı sizden aşağıdaki bilgileri isteyecektir: @@ -89,7 +89,7 @@ $ graph auth --studio $ graph deploy --studio ``` -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. +Sizden bir sürüm etiketi istenecektir. '0.0.1' gibi sürümler için [semver](https://semver.org/) kullanılması önemle tavsiye edilir. Bununla birlikte, sürüm olarak herhangi bir dizeyi seçmekte özgürsünüz: `v1`, `version1`, `asdf` gibi. ## 6. Subgraph'ınızı Test Edin @@ -99,7 +99,7 @@ Kayıtlar, subgraph'ınızla ilgili herhangi bir hata olup olmadığını size s ![Subgraph logs](/img/subgraph-logs-image.png) -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: +Subgraph'iniz arızalanıyorsa GraphiQL Playground'u kullanarak subgraph durumunu sorgulayabilirsiniz. Aşağıdaki sorgudan yararlanabileceğinizi ve subgraph'iniz için dağıtım kimliğinizi girebileceğinizi unutmayın. Bu durumda, `Qm...` dağıtım kimliğidir (bu, Subgraph sayfasında **Ayrıntılar** altında bulunabilir). Aşağıdaki sorgu, bir subgraph'in ne zaman başarısız olduğunu size söyleyecektir, böylece buna göre hata ayıklayabilirsiniz: ```graphql { @@ -149,7 +149,7 @@ Subgraph'ınız Subgraph Stüdyo'ya dağıtıldıktan, test ettikten ve kullanı Subgraph Stüdyo'da subgraph'ınıza tıklayın. Subgraph'ın sayfasında, sağ üstteki yayınla düğmesine tıklayabileceksiniz. -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). +Subgraph'inizi yayınlamak istediğiniz ağı seçin. [Daha hızlı işlem hızları ve daha düşük gas maliyetlerinden](/arbitrum/arbitrum-faq) yararlanmak için Arbitrum One'da subgraph'lerin yayınlanması önerilir. Subgraph'ınızı sorgulayabilmeniz için önce İndeksleyicilerin bu subgraph üzerinde sorgu sunmaya başlaması gerekir. Bu süreci kolaylaştırmak için GRT kullanarak kendi subgraph'ınızı oluşturabilirsiniz. @@ -165,4 +165,4 @@ Gas maliyetlerinden tasarruf etmek için, subgraph'ınızı Graph'ın merkeziyet API anahtarınız yoksa, geliştirme ve hazırlama için kullanılabilen ücretsiz, rate limit'li geçici sorgu URL'si aracılığıyla merkeziyetsiz uygulamanızdan sorgulama yapabilirsiniz. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +Subgraph'inizden veri sorgulama hakkında daha fazla bilgi için daha fazlasını [buradan okuyun](/querying/querying-the-graph/). From d5eadf39992f77e20cb412eb0149ab39a5d5fbed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:25 -0400 Subject: [PATCH 549/924] New translations quick-start.mdx (Ukrainian) --- website/pages/uk/quick-start.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/uk/quick-start.mdx b/website/pages/uk/quick-start.mdx index adfb2ad62a6a..84a4b25df3fc 100644 --- a/website/pages/uk/quick-start.mdx +++ b/website/pages/uk/quick-start.mdx @@ -2,7 +2,7 @@ title: Швидкий старт --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -165,4 +165,4 @@ Select the network you would like to publish your subgraph to. It is recommended Якщо у вас немає ключа API, ви можете робити запити з вашого додатка через безплатну тимчасову URL-адресу запиту з обмеженим тарифом, яку можна використовувати для розробки та тестування. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From e5d058965032aafce0917aa7f770e271ed424be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:26 -0400 Subject: [PATCH 550/924] New translations quick-start.mdx (Chinese Simplified) --- website/pages/zh/quick-start.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/zh/quick-start.mdx b/website/pages/zh/quick-start.mdx index 80cf442c5207..93daaf1ee641 100644 --- a/website/pages/zh/quick-start.mdx +++ b/website/pages/zh/quick-start.mdx @@ -2,9 +2,9 @@ title: 快速开始 --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). +确保您的子图将从一个[受支持的网络](/developing/supported-networks) 中索引数据。 本指南是在假设您具备以下条件的情况下编写的: @@ -20,7 +20,7 @@ Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your walle ## 2. 安装 Graph CLI -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. +Graph CLI 是用 JavaScript 编写的,需要安装npm 或yarn 来使用。 在本地计算机上,运行以下命令之一: @@ -38,7 +38,7 @@ yarn global add @graphprotocol/graph-cli ## 3. 初始化子图 -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). +> 您可以在[Subgraph Studio](https://thegraph.com/studio/)的子图页面找到针对您特定子图的命令。 初始化子图时,CLI工具会要求您提供以下信息: @@ -89,7 +89,7 @@ $ graph auth --studio $ graph deploy --studio ``` -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. +您将被要求输入一个版本标签。强烈建议使用(语义化版本)[semver](https://semver.org/) 进行版本控制,如`0.0.1`。尽管如此,您可以自由选择任何字符串作为版本,比如:`v1`,`version1`,`asdf`。 ## 6. 测试子图 @@ -99,7 +99,7 @@ You will be asked for a version label. It's strongly recommended to use [semver] ![Subgraph logs](/img/subgraph-logs-image.png) -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: +如果子图失败了,可以通过使用 GraphiQL Playground查询子图的健康状况。注意,你可以利用下面的查询,输入你的子图的部署 ID。在这种情况下,Qm... 是部署 ID(可以在子图页面的详细信息下找到)。下面的查询会提示,当一个子图失败时,则可进行相应调试。 ```graphql { @@ -149,7 +149,7 @@ If your subgraph is failing, you can query the subgraph health by using the Grap 在子图工作室中,单击您的子图。在子图的页面上,您可以单击右上角的发布按钮。 -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). +选择您希望发布子图的网络。建议将子图发布到 Arbitrum One,以利用[更快的交易速度和更低的Gas费用](/arbitrum/arbitrum-faq)。 在你可以查询你的子图之前,索引人需要开始在上面提供查询。为了简化这个过程,你可以使用GRT来策展你自己的子图。 @@ -165,4 +165,4 @@ Select the network you would like to publish your subgraph to. It is recommended 如果你没有你的API密钥,你可以通过免费的、速率有限的临时查询URL从你的去中心化应用查询,该URL可用于开发和暂存。 -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From ec3f6e43b192b234b05c60554f5d07edadb60a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:27 -0400 Subject: [PATCH 551/924] New translations quick-start.mdx (Urdu (Pakistan)) --- website/pages/ur/quick-start.mdx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/website/pages/ur/quick-start.mdx b/website/pages/ur/quick-start.mdx index 5179a2f47abf..50539e798104 100644 --- a/website/pages/ur/quick-start.mdx +++ b/website/pages/ur/quick-start.mdx @@ -2,9 +2,9 @@ title: فورا شروع کریں --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +یہ گائیڈ آپ کو سب گراف سٹوڈیو یا ہوسٹڈ سروس میں اپنے سب گراف کو شروع کرنے، تخلیق کرنے اور تعینات کرنے کے طریقے کے بارے میں فوری طور پر لے جائے گا۔ -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). +اس بات کو یقینی بنائیں کہ آپ کا سب گراف کسی [تعاون یافتہ نیٹ ورک] (/developing/supported-networks) سے ڈیٹا کو ترتیب دے رہا ہے۔. یہ گائیڈ یہ فرض کرتے ہوئے لکھی گئ ہے کہ آپ کے پاس ہے: @@ -14,23 +14,23 @@ Ensure that your subgraph will be indexing data from a [supported network](/deve ## 1. سب گراف سٹوڈیو پر سب گراف بنائیں -Go to the [Subgraph Studio](https://thegraph.com/studio/) and connect your wallet. +[سب گراف سٹوڈیو](https://thegraph.com/studio/) پر جائیں اور اپنے والیٹ کو منسلک کریں۔ ایک بار منسلک ہو جاۓ، آپ "سب گراف بنائیں" کو دبا کر شروع کر سکتے ہیں. اپنی مرظی کے نیٹ ورک کو چنیں اور جاری رکھیں پر کلک کریں. ## 2. گراف CLI انسٹال کریں -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. +گراف CLI جاوا اسکرپٹ میں لکھا ہوا ہے اور اسے استعمال کرنے کے لیے آپ کو یا تو `npm` یا `Yarn` انسٹال کرنے کی ضرورت ہوگی. اپنی مقامی مشین پر، درج زیل کمانڈز میں سے ایک کو رن کریں: -Using [npm](https://www.npmjs.com/): +[npm](https://www.npmjs.com/) کا استعمال: ```sh npm install -g @graphprotocol/graph-cli ``` -Using [yarn](https://yarnpkg.com/): +[yarn](https://yarnpkg.com/) کا استعمال: ```sh yarn global add @graphprotocol/graph-cli @@ -38,7 +38,7 @@ yarn global add @graphprotocol/graph-cli ## 3. اپنا سب گراف شروع کریں -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). +> آپ اپنے مخصوص سب گراف کے لیے سب گراف کے پیج پر [سب گراف سٹوڈیو](https://thegraph.com/studio/) میں کمانڈز تلاش کر سکتے ہیں. جب آپ اپنے سب گراف کو شروع کرتے ہیں, CLI ٹول درج ذیل معلومات کے لۓ آپ سے پوچھے گا: @@ -61,7 +61,7 @@ graph init --studio اپنے سب گراف کو شروع کرتے وقت کیا توقع کی جائے اس کی مثال کے لیے درج ذیل اسکرین شاٹ دیکھیں: -![Subgraph command](/img/subgraph-init-example.png) +![سب گراف کمانڈ](/img/subgraph-init-example.png) ## 4. اپنا سب گراف لکھیں @@ -89,7 +89,7 @@ $ graph auth --studio $ graph deploy --studio ``` -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. +آپ سے ورژن کا لیبل طلب کیا جائے گا۔ `0.0.1` کی طرح ورژن بنانے کے لیے [سیمور](https://semver.org/) استعمال کرنے کی پر زور سفارش کی جاتی ہے۔ کو بتاتی ہے، آپ کسی بھی سٹرنگ کو ورژن کے طور پر منتخب کرنے کے لیے آزاد ہیں جیسے: `v1`، `version1`، `asdf`۔ ## 6. اپنے سب گراف کو ٹیسٹ کریں @@ -97,9 +97,9 @@ You will be asked for a version label. It's strongly recommended to use [semver] لوگز آپ کو بتائیں گے اکر آپ کے سب گراف میں مسائل ہیں۔ آپریشنل سب گراف کے لوگز اس طرح کے دکھیں گے: -![Subgraph logs](/img/subgraph-logs-image.png) +![سب گراف لاگز](/img/subgraph-logs-image.png) -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: +اگر آپ کا سب گراف ناکام ہو رہا ہے، تو آپ GraphiQL پلے گراؤنڈ کا استعمال کر کے سب گراف کی صحت کے بارے میں کیوری کر سکتے ہیں۔ نوٹ کریں کہ آپ نیچے دیے گئے کیوری سے فائدہ اٹھا سکتے ہیں اور اپنے سب گراف کے لیے اپنی تعیناتی شناخت درج کر سکتے ہیں۔ اس صورت میں، `Qm...` تعیناتی شناخت ہے (جو **تفصیلات** کے تحت سب گراف کے پیج پر واقع ہو سکتی ہے)۔ ذیل کا کیوری آپ کو بتائے گا کہ سب گراف کب ناکام ہوجاتا ہے، لہذا آپ اس کے مطابق ڈی بگ کرسکتے ہیں: ```graphql { @@ -149,7 +149,7 @@ If your subgraph is failing, you can query the subgraph health by using the Grap سب گراف سٹوڈیو میں، سب گراف پر کلک کریں۔ سب گراف کے پیج پر، آپ اوپر دائیں جانب شائع کے بٹن پر کلک کر سکیں گے. -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). +وہ نیٹ ورک منتخب کریں جس پر آپ اپنا سب گراف شائع کرنا چاہتے ہیں۔ Arbitrum One کے سب گراف شائع کرنے کی سفارش کی جاتی ہے تاکہ [تیز تر ٹرانزیکشن کی رفتار اور گیس کے کم اخراجات] (/arbitrum/arbitrum-faq) سے فائدہ اٹھایا جا سکے۔ اس سے پہلے کے آپ اپنا سب گراف کیوری کریں، انڈیکسرز کو اس پر کیوریز پیش کرنا شروع کرنے کی ضرورت ہے۔ اس عمل کو ہموار کرنے کے لیے، آپ جی آر ٹی کا استعمال کرتے ہوئے اپنا سب گراف کیوریٹ کر سکتے ہیں. @@ -157,7 +157,7 @@ Select the network you would like to publish your subgraph to. It is recommended گیس کی قیمتیں بچانے کے لیے، جب آپ اپنا سب گراف گراف کے ڈیسینٹرالائزڈ نیٹ ورک پر شائع کرتے ہیں تو آپ اس بٹن کو منتخب کرکے اپنے سب گراف کو اسی ٹرانزیکشن میں درست کر سکتے ہیں جسے آپ نے شائع کیا تھا: -![Subgraph publish](/img/publish-and-signal-tx.png) +![سب گراف شائع کریں](/img/publish-and-signal-tx.png) ## 8. اپنے سب گراف کو کیوری کریں @@ -165,4 +165,4 @@ Select the network you would like to publish your subgraph to. It is recommended اگر آپ کے پاس اپنی API کلید فری کے ذریعے نہیں ہے تو آپ اپنے ڈیپ سے کیوری کر سکتے ہیں، ریٹ محدود عارضی کیوری URL کے ذریعے نہیں ہے جسے ترقی اور سٹیجنگ کے لیے استعمال کیا جا سکتا ہے. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +اپنے سب گراف سے ڈیٹا کیوری کرنے کے بارے میں مزید معلومات کے لیے، مزید پڑھیں [یہاں](/querying/querying-the-graph/)۔ From d4747ee57e2e7beb309f56529897c8f40484b1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:27 -0400 Subject: [PATCH 552/924] New translations quick-start.mdx (Vietnamese) --- website/pages/vi/quick-start.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/vi/quick-start.mdx b/website/pages/vi/quick-start.mdx index e806caadf0b4..d694df7d3654 100644 --- a/website/pages/vi/quick-start.mdx +++ b/website/pages/vi/quick-start.mdx @@ -2,7 +2,7 @@ title: Bắt đầu nhanh --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -165,4 +165,4 @@ Now, you can query your subgraph by sending GraphQL queries to your subgraph’s You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From e9150049b987082ead475b44300f3c77f1ce5c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:28 -0400 Subject: [PATCH 553/924] New translations quick-start.mdx (Marathi) --- website/pages/mr/quick-start.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/mr/quick-start.mdx b/website/pages/mr/quick-start.mdx index 98bcd8755b46..0b3be8abcac2 100644 --- a/website/pages/mr/quick-start.mdx +++ b/website/pages/mr/quick-start.mdx @@ -2,7 +2,7 @@ title: क्विक स्टार्ट --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -165,4 +165,4 @@ Select the network you would like to publish your subgraph to. It is recommended तुम्‍ही तुमच्‍या dapp वरून क्‍वेरी करू शकता जर तुमच्‍याकडे तुमच्‍या API की नसल्‍यास मोफत, रेट-मर्यादित तात्पुरती क्‍वेरी URL द्वारे जे डेव्हलपमेंट आणि स्‍टेजिंगसाठी वापरले जाऊ शकते. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From d10ec9293d4ab144b824a63667fa0f37e581b18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:29 -0400 Subject: [PATCH 554/924] New translations quick-start.mdx (Hindi) --- website/pages/hi/quick-start.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/hi/quick-start.mdx b/website/pages/hi/quick-start.mdx index d2d71f6767ee..bb901db2c9e7 100644 --- a/website/pages/hi/quick-start.mdx +++ b/website/pages/hi/quick-start.mdx @@ -2,7 +2,7 @@ title: जल्दी शुरू --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -165,4 +165,4 @@ Select the network you would like to publish your subgraph to. It is recommended यदि आपके पास अपनी एपीआई कुंजी नहीं है, तो आप अपने डैप से मुफ्त, दर-सीमित अस्थायी क्वेरी URL के माध्यम से पूछ सकते हैं, जिसका उपयोग विकास और मंचन के लिए किया जा सकता है। -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From f85e2f5733c9e6dbbf9dbcd7d48b240a87d0cb0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:30 -0400 Subject: [PATCH 555/924] New translations quick-start.mdx (Yoruba) --- website/pages/yo/quick-start.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/yo/quick-start.mdx b/website/pages/yo/quick-start.mdx index 6b784203174a..b8e55f0ee08e 100644 --- a/website/pages/yo/quick-start.mdx +++ b/website/pages/yo/quick-start.mdx @@ -2,7 +2,7 @@ title: Ibẹrẹ kiakia --- -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). +This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). @@ -165,4 +165,4 @@ Now, you can query your subgraph by sending GraphQL queries to your subgraph’s You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). +For more information about querying data from your subgraph, read more [here](/querying/querying-the-graph/). From 7b23a1d2be4ed8b6f978e9494f3fb7aac452bc93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:31 -0400 Subject: [PATCH 556/924] New translations sunrise.mdx (French) --- website/pages/fr/sunrise.mdx | 88 ++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/website/pages/fr/sunrise.mdx b/website/pages/fr/sunrise.mdx index 20e06d584e4b..568c000384c9 100644 --- a/website/pages/fr/sunrise.mdx +++ b/website/pages/fr/sunrise.mdx @@ -2,112 +2,112 @@ title: Sunrise of decentralized data FAQ --- -> Note: this document is continually updated to ensure the most accurate and helpful information is provided. New questions and answers are added on a regular basis. If you can’t find the information you’re looking for, or if you require immediate assistance [reach out on Discord](https://discord.gg/vtvv7FP). +> Note : ce document est continuellement mis à jour afin de fournir les informations les plus précises et les plus utiles. De nouvelles questions et réponses sont ajoutées régulièrement. Si vous ne trouvez pas l'information que vous cherchez, ou si vous avez besoin d'une assistance immédiate [contactez-nous sur Discord] (https://discord.gg/vtvv7FP). -## What is the sunrise of decentralized data? +## Qu'est-ce que l'aube des données décentralisées ? -The sunrise of decentralized data is an initiative spearheaded by Edge & Node, working on The Graph. The goal is to seamlessly enable subgraph developers and data consumers to upgrade to The Graph’s decentralized network. +L'aube des données décentralisées est une initiative lancée par Edge & Node, qui travaille sur The Graph. L'objectif est de permettre aux développeurs de subgraphs et aux consommateurs de données de passer en toute transparence au réseau décentralisé de The Graph. -This plan draws on many previous developments from The Graph ecosystem, including an upgrade Indexer to serve queries on newly published subgraphs, and the ability to integrate new blockchain networks to The Graph. +Ce plan s'appuie sur de nombreux développements antérieurs de l'écosystème The Graph, y compris un indexeur de mise à niveau pour servir des requêtes sur les subgraphs nouvellement publiés, et la capacité d'intégrer de nouveaux réseaux de blockchain à The Graph. -### What are the phases of the sunrise of decentralized data? +### Quelles sont les phases de l’émergence des données décentralisées ? **Sunray**: Enable support for hosted service chains, offer a seamless upgrade flow, offer a free plan on The Graph Network.\ **Sunbeam**: The upgrade window that subgraph developers will have to upgrade their subgraphs to The Graph Network. The start and length of this will be announced soon.\ **Sunrise**: Hosted service endpoints will expire as traffic moves to The Graph Network. -### Do I need to run my own infrastructure? +### Dois-je gérer ma propre infrastructure ? No, all infrastructure is operated by independent Indexers on The Graph Network, including the upgrade Indexer ([read more below](#what-is-an-upgrade-indexer)). -You can use the [Subgraph Studio](https://thegraph.com/studio/) to create, test, and publish your subgraph. All hosted service users are encouraged to upgrade their subgraphs to The Graph Network. The upgrade Indexer ensures you can query your subgraph even without curation signal. +Vous pouvez utiliser le [Subgraph Studio] (https://thegraph.com/studio/) pour créer, tester et publier votre subgraph. Tous les utilisateurs de services hébergés sont encouragés à mettre à niveau leurs subgraphs vers le Réseau de graphes. L'indexeur de mise à niveau vous permet d'interroger votre subgraph même sans signal de curation. -Once your subgraph has reached adequate curation signal and other Indexers begin supporting it, the upgrade Indexer will gradually taper off, allowing other Indexers to collect indexing rewards and query fees. +Une fois que votre subgraph a atteint un signal de curation adéquat et que d'autres indexeurs commencent à le soutenir, l'indexeur de mise à niveau se retire progressivement, ce qui permet aux autres indexeurs de percevoir des récompenses d'indexation et des frais d'interrogation. -### Should I host my own indexing infrastructure? +### Dois-je héberger ma propre infrastructure d'indexation ? Running infrastructure for your own project is [significantly more resource intensive](/network/benefits/) when compared to using The Graph Network. -Additionally, The Graph Network is significantly more robust, reliable, and cost-efficient than anything provided by a single organization or team. Hundreds of independent Indexers around the world power The Graph Network, ensuring safety, security and redundancy. +En outre, le réseau Graph est nettement plus robuste, plus fiable et plus rentable que tout ce qui peut être fourni par une seule organisation ou équipe. Des centaines d'indexeurs indépendants répartis dans le monde entier alimentent le réseau Graph, garantissant ainsi la sécurité et la redondance. -That being said, if you’re still interested in running a [Graph Node](https://github.com/graphprotocol/graph-node), consider joining The Graph Network [as an Indexer](https://thegraph.com/blog/how-to-become-indexer/) to earn indexing rewards and query fees by serving data on your subgraph and others. +Cela dit, si vous êtes toujours intéressé par l'exploitation d'un [nœud de graphe] (https://github.com/graphprotocol/graph-node), envisagez de rejoindre The Graph Network [en tant qu'indexeur] (https://thegraph.com/blog/how-to-become-indexer/) pour gagner des récompenses d'indexation et des frais de requête en servant des données sur votre subgraph et d'autres. -### Should I use a centralized indexing provider? +### Dois-je utiliser un fournisseur d’indexation centralisé ? -If you are building in web3, the moment you use a centralized indexing provider, you are giving them control of your dapp and data. The Graph’s decentralized network offers [superior quality of service](https://thegraph.com/blog/qos-the-graph-network/), reliability with unbeatable uptime thanks to node redundancy, as well as significantly [lower costs](/network/benefits/), and you won’t be held hostage at the data layer. +Si vous construisez dans Web3, dès que vous utilisez un fournisseur d'indexation centralisé, vous leur donnez le contrôle de votre dapp et de vos données. Le réseau décentralisé de Graph offre une [qualité de service supérieure](https://thegraph.com/blog/qos-the-graph-network/), une fiabilité avec une disponibilité imbattable grâce à la redondance des nœuds, ainsi que des [coûts inférieurs](/network/benefits/), et vous ne serez pas pris en otage au niveau de la couche de données. -With The Graph Network, your subgraph is public and anyone can query it openly, which increases the usage and network effects of your dapp. With a centralized indexing solution, the subgraph is private to the centralized provider. +Avec The Graph Network, votre subgraph est public et tout le monde peut l'interroger ouvertement, ce qui augmente l'utilisation et les effets réseau de votre dapp. Avec une solution d'indexation centralisée, le subgraph est privé du fournisseur centralisé. -Here's a detailed breakdown of the benefits of The Graph over centralized hosting: +Voici une description détaillée des avantages de The Graph par rapport à l'hébergement centralisé : -- **Resilience and Redundancy**: Decentralized systems are inherently more robust and resilient due to their distributed nature. Data isn't stored on a single server or location. Instead, it's served by hundreds of independent Indexers around the globe. This reduces the risk of data loss or service interruptions if one node fails, leading to exceptional uptime (99.99%). +- **Résilience et redondance** : Les systèmes décentralisés sont intrinsèquement plus robustes et résilients en raison de leur nature distribuée. Les données ne sont pas stockées sur un seul serveur ou emplacement. Au lieu de cela, elles sont servies par des centaines d'indexeurs indépendants répartis dans le monde entier. Cela réduit le risque de perte de données ou d'interruption de service en cas de défaillance d'un nœud, ce qui se traduit par un temps de disponibilité exceptionnel (99,99 %). -- **Quality of Service**: In addition to the impressive uptime, The Graph Network features a ~106ms median query speed (latency), and higher query success rates compared to hosted alternatives. Read more in [this blog](https://thegraph.com/blog/qos-the-graph-network/). +- **Qualité de service** : En plus d'un temps de disponibilité impressionnant, The Graph Network se caractérise par une vitesse médiane d'interrogation (latence) d'environ 106 ms et par des taux de réussite des requêtes plus élevés que ceux des autres solutions hébergées. Pour en savoir plus, consultez [ce blog] (https://thegraph.com/blog/qos-the-graph-network/). -- **Censorship Resistance**: Centralized systems can become targets for censorship, either through regulatory pressures or network attacks. In contrast, decentralized systems, due to their dispersed architecture, are much harder to censor, ensuring continuous data availability. +- **Résistance à la censure** : les systèmes centralisés peuvent devenir des cibles de censure, soit par le biais de pressions réglementaires, soit d'attaques de réseau. En revanche, les systèmes décentralisés, en raison de leur architecture dispersée, sont beaucoup plus difficiles à censurer, garantissant ainsi une disponibilité continue des données. -- **Transparency and Trust**: Decentralized systems operate openly, enabling anyone to independently verify the data. This transparency builds trust among network participants, as they can verify the system's integrity without relying on a central authority. +- \*Transparence et confiance\*\* : Les systèmes décentralisés fonctionnent ouvertement, ce qui permet à quiconque de vérifier les données de manière indépendante. Cette transparence renforce la confiance entre les participants au réseau, car ils peuvent vérifier l'intégrité du système sans dépendre d'une autorité centrale. -Just as you've chosen your blockchain network for its decentralized nature, security, and transparency, opting for The Graph Network is an extension of those same principles. By aligning your data infrastructure with these values, you ensure a cohesive, resilient, and trust-driven development environment. +Tout comme vous avez choisi votre réseau blockchain pour sa nature décentralisée, sa sécurité et sa transparence, opter pour The Graph Network est une extension de ces mêmes principes. En alignant votre infrastructure de données sur ces valeurs, vous garantissez un environnement de développement cohésif, résilient et axé sur la confiance. -### Will my hosted service subgraph be supported by the upgrade Indexer? +### Mon subgraph de service hébergé sera-t-il pris en charge par l'indexeur de mise à niveau ? Yes, the upgrade Indexer will support all hosted service subgraphs published to The Graph Network. -However, some subgraphs may not be eligible for indexing rewards, and as a result, may have difficulty attracting further Indexers. For example, indexing rewards may not be available for subgraphs on certain chains. Members from these blockchain communities are encouraged to integrate their chain through the [Chain Integration Process](/chain-integration-overview/). +Cependant, certains subgraphs peuvent ne pas être éligibles aux récompenses d'indexation et, par conséquent, avoir des difficultés à attirer d'autres indexeurs. Par exemple, les récompenses d'indexation peuvent ne pas être disponibles pour les subgraphs de certaines chaînes. Les membres de ces communautés blockchain sont encouragés à intégrer leur chaîne via le [Processus d'intégration de la chaîne](/chain-integration-overview/). -## What is an upgrade Indexer? +## Qu'est-ce qu'un indexeur de mise à niveau ? -### What does "upgrade Indexer" mean? +### Que signifie « mettre à niveau l'indexeur » ? -It is designed to improve the experience of upgrading subgraphs from the hosted service to The Graph Network and supporting new versions of existing subgraphs that have not yet been indexed. +Il est conçu pour améliorer l'expérience de mise à niveau des subgraphs du service hébergé vers le Réseau Graph et pour prendre en charge les nouvelles versions des subgraphs existants qui n'ont pas encore été indexés. -The upgrade Indexer is aimed at bootstrapping chains that do not yet have indexing rewards on the network, as well as a fallback for new subgraph versions. The goal is to ensure that an Indexer is available to serve queries as quickly as possible after a subgraph is published. +L'indexeur de mise à niveau est destiné à l'amorçage des chaînes qui n'ont pas encore de récompenses d'indexation sur le réseau, ainsi qu'à servir de solution de repli pour les nouvelles versions de subgraphs. L'objectif est de s'assurer qu'un indexeur est disponible pour répondre aux requêtes le plus rapidement possible après la publication d'un subgraph. -### What chains will the upgrade Indexer support? +### Quelles chaînes la mise à niveau de l'Indexeur prendra-t-elle en charge ? The upgrade Indexer will support chains that are currently only available on the hosted service. This will include many hosted service subgraphs that have already been synced. Find a comprehensive list of supported chains [here](/developing/supported-networks/). -### Why is Edge & Node running the upgrade Indexer? +### Pourquoi Edge & Node exécutent-ils l'indexeur de mise à niveau ? -Edge and Node has historically maintained the hosted service and, as a result, has already synced data for hosted service subgraphs. +Edge et Node a historiquement maintenu le service hébergé et, par conséquent, a déjà synchronisé les données pour les subgraphs du service hébergé. Any and all Indexers are encouraged to become upgrade Indexers as well. However, note that operating an upgrade Indexer is largely provided as a public service to support new subgraphs and additional chains due to the lack of indexing rewards before they are approved by The Graph Council. -### What does this mean for existing Indexers? +### Qu'est-ce que cela signifie pour les indexeurs existants ? -Chains that are currently exclusively supported on the hosted service will be made available to developers on The Graph without indexing rewards at first, though this does unlock query fees for any Indexer that is interested. This is expected to lead to an increase in the number of subgraphs being published on the network, providing more opportunities for Indexers to index and serve these subgraphs in return for query fees, even before indexing rewards are enabled for a chain. +Les chaînes qui sont actuellement exclusivement prises en charge par le service hébergé seront mises à la disposition des développeurs sur The Graph sans récompenses d'indexation dans un premier temps, bien que cela permette de débloquer des frais de requête pour tout indexeur intéressé. Cela devrait conduire à une augmentation du nombre de subgraphs publiés sur le réseau, offrant plus d'opportunités aux indexeurs d'indexer et de servir ces subgraphs en échange de frais de requête, avant même que les récompenses d'indexation ne soient activées pour une chaîne. -The upgrade Indexer also provides the Indexer community with information about potential demand for subgraphs and new chains on The Graph Network. +L'indexeur de mise à niveau fournit également à la communauté des indexeurs des informations sur la demande potentielle de subgraphs et de nouvelles chaînes sur le réseau de graphs. ### What does this mean for Delegators? The upgrade Indexer offers a powerful opportunity for Delegators. As more subgraphs are upgraded from the hosted service to The Graph Network, Delegators stand to benefit from the increased network activity. -### Will the upgrade Indexer compete with existing Indexers for rewards? +### L'indexeur mis à niveau sera-t-il en concurrence avec les indexeurs existants pour l'obtention de récompenses ? -No, the upgrade Indexer will only allocate the minimum amount per subgraph and will not collect indexing rewards. +Non, l'indexeur de mise à niveau allouera uniquement le montant minimum par subgraph et ne collectera pas de récompenses d'indexation. -It operates on an “as needed” basis, and serves as a fallback until sufficient service quality is achieved by at least 3 other Indexers in the network for respective chains and subgraphs. +Il fonctionne selon les besoins et sert de solution de repli jusqu'à ce qu'au moins trois autres indexeurs du réseau atteignent une qualité de service suffisante pour les chaînes et les subgraphs concernés. -### How will this affect subgraph developers? +### Comment cela affectera-t-il les développeurs de subgraphs ? -Subgraph developers will be able to query their subgraphs on the network almost immediately after upgrading them from the hosted service or publishing them from the Subgraph Studio, as no lead time will be required for indexing. +Les développeurs de subgraphs pourront interroger leurs subgraphs sur le réseau presque immédiatement après les avoir mis à jour à partir du service hébergé ou les avoir publiés à partir du Subgraph Studio, car aucun délai ne sera nécessaire pour l'indexation. ### How does this benefit data consumers? -The upgrade Indexer enables chains on the network that are currently only supported on the hosted service. Therefore, it widens the scope and availability of data that can be queried on the network. +L'indexeur de mise à niveau permet d'utiliser sur le réseau des chaînes qui ne sont actuellement prises en charge que par le service hébergé. Elle élargit donc la portée et la disponibilité des données qui peuvent être interrogées sur le réseau. -### How will the upgrade Indexer price queries? +### Quel sera le prix des requêtes de l'indexeur de mise à niveau ? -The upgrade Indexer will price queries at the market rate so as not to influence the query fee market. +L'indexeur de mise à niveau fixera le prix des requêtes au taux du marché afin de ne pas influencer le marché des frais de requête. -### What are the criteria for the upgrade Indexer to stop supporting a subgraph? +### Quels sont les critères pour que l'indexeur de mise à niveau cesse de prendre en charge un subgraph ? -The upgrade Indexer will serve a subgraph until it is sufficiently and successfully served with consistent queries served by at least 3 other Indexers. +L'indexeur de mise à niveau servira un subgraph jusqu'à ce qu'il soit suffisamment et correctement servi avec des requêtes cohérentes servies par au moins 3 autres indexeurs. -Furthermore, the upgrade Indexer will stop supporting a subgraph if it has not been queried in the last 30 days. +En outre, l'indexeur de mise à niveau cessera de prendre en charge un subgraph s'il n'a pas été intégré au cours des 30 derniers jours. -Other Indexers are incentivized to support subgraphs with ongoing query volume, so the query volume to the upgrade Indexer should trend towards zero because the Indexer will have a small allocation size and other Indexers will be chosen for queries ahead of the upgrade Indexer. +D'autres indexeurs sont incités à prendre en charge les subgraphs avec un volume de requêtes continu, de sorte que le volume de requêtes vers l'indexeur de mise à niveau devrait tendre vers zéro, car l'indexeur aura une petite taille d'allocation et d'autres indexeurs seront choisis pour les requêtes avant l'indexeur de mise à niveau. From 68628507bb58f4ab3322aca2014f117d79d4117b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:35 -0400 Subject: [PATCH 557/924] New translations sunrise.mdx (Japanese) --- website/pages/ja/sunrise.mdx | 114 +++++++++++++++++------------------ 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/website/pages/ja/sunrise.mdx b/website/pages/ja/sunrise.mdx index 20e06d584e4b..da5776901775 100644 --- a/website/pages/ja/sunrise.mdx +++ b/website/pages/ja/sunrise.mdx @@ -1,113 +1,113 @@ --- -title: Sunrise of decentralized data FAQ +title: Sunriseに関するFAQ --- -> Note: this document is continually updated to ensure the most accurate and helpful information is provided. New questions and answers are added on a regular basis. If you can’t find the information you’re looking for, or if you require immediate assistance [reach out on Discord](https://discord.gg/vtvv7FP). +> 注:この文書は、最も正確で役立つ情報を提供するために継続的に更新されています。新しい質問と回答は定期的に追加されます。お探しの情報が見つからない場合、または緊急のサポートが必要な場合は、[Discordでご連絡ください](https://discord.gg/vtvv7FP)。 -## What is the sunrise of decentralized data? +## 分散型データプログラム「Sunrise」とは? -The sunrise of decentralized data is an initiative spearheaded by Edge & Node, working on The Graph. The goal is to seamlessly enable subgraph developers and data consumers to upgrade to The Graph’s decentralized network. +Sunriseは、The Graphに取り組むEdge & Nodeが主導するイニシアチブです。その目的は、サブグラフの開発者とデータ消費者がシームレスにThe Graphの分散型ネットワークにアップグレードできるようにすることにあります。 -This plan draws on many previous developments from The Graph ecosystem, including an upgrade Indexer to serve queries on newly published subgraphs, and the ability to integrate new blockchain networks to The Graph. +この計画は、新しく公開されたサブグラフに対するクエリを提供するためのアップグレードされたIndexerや、新しいブロックチェーンネットワークをThe Graphに統合する機能など、The Graphエコシステムのこれまでの多くの開発を利用しています。 -### What are the phases of the sunrise of decentralized data? +### Sunriseの各フェーズとは? -**Sunray**: Enable support for hosted service chains, offer a seamless upgrade flow, offer a free plan on The Graph Network.\ -**Sunbeam**: The upgrade window that subgraph developers will have to upgrade their subgraphs to The Graph Network. The start and length of this will be announced soon.\ -**Sunrise**: Hosted service endpoints will expire as traffic moves to The Graph Network. +**Sunray**:ホスティングサービスチェーンのサポート、シームレスなアップグレードフローの提供、The Graph Networkでの無料プランの提供。 +**Sunbeam**:サブグラフ開発者がサブグラフをThe Graph Networkにアップグレードするためのアップグレードウィンドウ。詳細は近日中に発表されます。 +**Sunrise**:トラフィックがThe Graph Networkに移動すると、ホストされているサービスのエンドポイントが失効します。 -### Do I need to run my own infrastructure? +### インフラは自分で用意する必要がありますか? -No, all infrastructure is operated by independent Indexers on The Graph Network, including the upgrade Indexer ([read more below](#what-is-an-upgrade-indexer)). +いいえ、すべてのインフラは、アップグレード・インデクサーを含む、グラフネットワークの独立したインデクサーによって運営されています。 -You can use the [Subgraph Studio](https://thegraph.com/studio/) to create, test, and publish your subgraph. All hosted service users are encouraged to upgrade their subgraphs to The Graph Network. The upgrade Indexer ensures you can query your subgraph even without curation signal. +サブグラフ・スタジオ](https://thegraph.com/studio/)を使用して、サブグラフを作成、テスト、公開することができます。全てのホスト・サービス・ユーザーは、自分のサブグラフをThe Graph Networkにアップグレードすることが推奨されます。アップグレード・インデクサーは、キュレーション・シグナルがなくても、サブグラフをクエリできるようにします。 -Once your subgraph has reached adequate curation signal and other Indexers begin supporting it, the upgrade Indexer will gradually taper off, allowing other Indexers to collect indexing rewards and query fees. +サブグラフが十分なキュレーションシグナルに達し、他のIndexerがそれをサポートし始めると、アップグレード・インデクサーは徐々に先細りになり、他のインデクサーがインデックス作成報酬とクエリ手数料を徴収できるようになります。 -### Should I host my own indexing infrastructure? +### 独自のインデックス作成インフラをホストすべきか? -Running infrastructure for your own project is [significantly more resource intensive](/network/benefits/) when compared to using The Graph Network. +自身のプロジェクトのためにインフラストラクチャを実行することは、グラフネットワークを使用する場合と比較して、[著しくリソースを消費します](/network/benefits/)。 -Additionally, The Graph Network is significantly more robust, reliable, and cost-efficient than anything provided by a single organization or team. Hundreds of independent Indexers around the world power The Graph Network, ensuring safety, security and redundancy. +さらに、The Graph Networkは、単一の組織やチームが提供するものよりもはるかに堅牢で、信頼性が高く、コスト効率に優れています。世界中の何百もの独立したインデクサが Graph Network を支え、安全性、セキュリティ、冗長性を確保しています。 -That being said, if you’re still interested in running a [Graph Node](https://github.com/graphprotocol/graph-node), consider joining The Graph Network [as an Indexer](https://thegraph.com/blog/how-to-become-indexer/) to earn indexing rewards and query fees by serving data on your subgraph and others. +とはいえ、もしまだ[グラフ・ノード](https://github.com/graphprotocol/graph-node)を運営することに興味があるのであれば、グラフ・ネットワーク[インデクサーとして](https://thegraph.com/blog/how-to-become-indexer/)に参加し、自分のサブグラフや他のサブグラフのデータを提供することで、インデクシング報酬やクエリ報酬を得ることを検討しましょう。 -### Should I use a centralized indexing provider? +### 集中型インデクシング・プロバイダを使うべきでしょうか? -If you are building in web3, the moment you use a centralized indexing provider, you are giving them control of your dapp and data. The Graph’s decentralized network offers [superior quality of service](https://thegraph.com/blog/qos-the-graph-network/), reliability with unbeatable uptime thanks to node redundancy, as well as significantly [lower costs](/network/benefits/), and you won’t be held hostage at the data layer. +もしweb3で構築しているのであれば、中央集権的なインデックス・プロバイダを利用した瞬間に、あなたのダップとデータを彼らにコントロールさせることになります。Graphの分散型ネットワークは、[優れたサービス品質](https://thegraph.com/blog/qos-the-graph-network/)、ノードの冗長性による無敵のアップタイムによる信頼性、大幅な[低コスト](/network/benefits/)を提供し、データレイヤーを人質に取られることはありません。 -With The Graph Network, your subgraph is public and anyone can query it openly, which increases the usage and network effects of your dapp. With a centralized indexing solution, the subgraph is private to the centralized provider. +グラフネットワークでは、サブグラフは公開され、誰でもオープンにクエリすることができます。中央集中型のインデックス・ソリューションでは、サブグラフは中央集中型のプロバイダーに非公開です。 -Here's a detailed breakdown of the benefits of The Graph over centralized hosting: +集中型ホスティングに対するThe Graphの利点について詳しく説明します: -- **Resilience and Redundancy**: Decentralized systems are inherently more robust and resilient due to their distributed nature. Data isn't stored on a single server or location. Instead, it's served by hundreds of independent Indexers around the globe. This reduces the risk of data loss or service interruptions if one node fails, leading to exceptional uptime (99.99%). +- **レジリエンスと冗長性**: 分散型システムは、その分散された性質により、本質的により堅牢で回復力があります。データは単一のサーバーや場所に保存されるわけではありません。その代わり、世界中にある何百もの独立したIndexerがデータを提供します。これにより、1つのノードに障害が発生した場合のデータ損失やサービス中断のリスクを低減し、卓越したアップタイム(99.99%)を実現します。 -- **Quality of Service**: In addition to the impressive uptime, The Graph Network features a ~106ms median query speed (latency), and higher query success rates compared to hosted alternatives. Read more in [this blog](https://thegraph.com/blog/qos-the-graph-network/). +- **サービスの質**: 印象的なアップタイムに加え、The Graph Networkはクエリ速度(レイテンシー)の中央値が106msであり、他のホスティングサービスと比較して高いクエリー成功率を誇ります。詳しくは[このブログ](https://thegraph.com/blog/qos-the-graph-network/)をご覧ください。 -- **Censorship Resistance**: Centralized systems can become targets for censorship, either through regulatory pressures or network attacks. In contrast, decentralized systems, due to their dispersed architecture, are much harder to censor, ensuring continuous data availability. +- **検閲への抵抗** 中央集権型システムは、規制の圧力やネットワーク攻撃によって、検閲の対象となる可能性があります。対照的に、分散型システムは、その分散されたアーキテクチャにより、検閲がはるかに難しく、継続的なデータの可用性を保証します。 -- **Transparency and Trust**: Decentralized systems operate openly, enabling anyone to independently verify the data. This transparency builds trust among network participants, as they can verify the system's integrity without relying on a central authority. +- **透明性と信頼**: 分散型システムはオープンに運用され、誰もが独立してデータを検証することができます。この透明性によって、ネットワーク参加者は中央機関に依存することなくシステムの完全性を検証できるため、信頼が構築されます。 -Just as you've chosen your blockchain network for its decentralized nature, security, and transparency, opting for The Graph Network is an extension of those same principles. By aligning your data infrastructure with these values, you ensure a cohesive, resilient, and trust-driven development environment. +非中央集権的な性質、セキュリティ、透明性のためにブロックチェーン・ネットワークを選択したように、The Graph Networkを選択することも同じ原則の延長線上にあります。データインフラストラクチャをこれらの価値観に合わせることで、結束力があり、弾力性があり、信頼に基づいた開発環境を確保することができます。 -### Will my hosted service subgraph be supported by the upgrade Indexer? +### 私のホスティングサービス・サブグラフは、アップグレード・インデクサーでサポートされますか? -Yes, the upgrade Indexer will support all hosted service subgraphs published to The Graph Network. +はい、アップグレード版インデクサーは、The Graph Networkに公開されたすべてのホストされたサービスのサブグラフをサポートします。 -However, some subgraphs may not be eligible for indexing rewards, and as a result, may have difficulty attracting further Indexers. For example, indexing rewards may not be available for subgraphs on certain chains. Members from these blockchain communities are encouraged to integrate their chain through the [Chain Integration Process](/chain-integration-overview/). +しかし、サブグラフの中には、インデックス作成報酬の対象とならないものがあり、 その結果、さらなるインデクサーの獲得が困難になることがあります。例えば、インデックス作成報酬は、特定のチェーン上のサブグラフでは利用できないかもしれません。このようなブロックチェーンコミュニティのメンバーは、[チェーン統合プロセス](/chain-integration-overview/) を通してチェーンを統合することが推奨されます。 -## What is an upgrade Indexer? +## アップグレード・インデクサーとは? -### What does "upgrade Indexer" mean? +### 「アップグレード・インデクサー」とはどういう意味ですか? -It is designed to improve the experience of upgrading subgraphs from the hosted service to The Graph Network and supporting new versions of existing subgraphs that have not yet been indexed. +これは、ホスティングサービスからThe Graph Networkにサブグラフをアップグレードする際のエクスペリエンスを向上させ、まだインデックス化されていない既存のサブグラフの新しいバージョンをサポートするために設計されています。 -The upgrade Indexer is aimed at bootstrapping chains that do not yet have indexing rewards on the network, as well as a fallback for new subgraph versions. The goal is to ensure that an Indexer is available to serve queries as quickly as possible after a subgraph is published. +アップグレード・インデクサーは、まだネットワーク上でインデックスの報酬を得ていないチェーンのブートストラップや、新しいサブグラフのバージョンに対するフォールバックを目的としています。目標は、サブグラフが公開された後、できるだけ早くクエリに対応できるようにすることです。 -### What chains will the upgrade Indexer support? +### アップグレード・インデクサーはどのチェーンに対応しますか? -The upgrade Indexer will support chains that are currently only available on the hosted service. This will include many hosted service subgraphs that have already been synced. +アップグレード版インデクサーは、現在のホスティングサービスでのみ利用可能なチェーンをサポートします。これには、すでに同期されている多くのホストサービスのサブグラフが含まれます。 -Find a comprehensive list of supported chains [here](/developing/supported-networks/). +サポートされているチェーンの包括的なリストは[こちら](/developing/supported-networks/)。 -### Why is Edge & Node running the upgrade Indexer? +### なぜEdge & Nodeはアップグレード・インデクサーを実行しているのか? -Edge and Node has historically maintained the hosted service and, as a result, has already synced data for hosted service subgraphs. +Edge & Nodeは歴史的にホスティングサービスを維持しており、その結果、ホスティングサービスのサブグラフのデータはすでに同期されています。 -Any and all Indexers are encouraged to become upgrade Indexers as well. However, note that operating an upgrade Indexer is largely provided as a public service to support new subgraphs and additional chains due to the lack of indexing rewards before they are approved by The Graph Council. +すべてのインデクサーは、アップグレード・インデックサーになることが推奨されます。しかしながら、アップグレード・インデクサーの活動は、グラフ評議会によって承認される前にインデックスの報酬が得られないため、新しい部分グラフや追加の連鎖をサポートするための公共サービスとして提供されています。 -### What does this mean for existing Indexers? +### これは既存のインデクサーのために何を意味するのか? -Chains that are currently exclusively supported on the hosted service will be made available to developers on The Graph without indexing rewards at first, though this does unlock query fees for any Indexer that is interested. This is expected to lead to an increase in the number of subgraphs being published on the network, providing more opportunities for Indexers to index and serve these subgraphs in return for query fees, even before indexing rewards are enabled for a chain. +現在ホスティングサービスでのみサポートされているチェーンは、インデックス報酬なしでThe Graph上で開発者に提供されます。これによって、ネットワーク上で公開されるサブグラフの数が増加し、インデックス作成報酬がチェーンに対して有効になる前であっても、クエリ報酬と引き換えにインデックス作成者がこれらのサブグラフにインデックスを作成し、提供する機会が増えることが期待されます。 -The upgrade Indexer also provides the Indexer community with information about potential demand for subgraphs and new chains on The Graph Network. +アップグレード・インデクサーはまた、グラフ・ネットワーク上のサブグラフや新しいチェーンの潜在的な需要に関する情報を、インデクサー・コミュニティに提供します。 -### What does this mean for Delegators? +### これはデリゲーターにとって何を意味するのか? -The upgrade Indexer offers a powerful opportunity for Delegators. As more subgraphs are upgraded from the hosted service to The Graph Network, Delegators stand to benefit from the increased network activity. +アップグレード・インデクサーは、デリゲータに強力な機会を提供します。より多くのサブグラフがホスティングされたサービスからグラフネットワークにアップグレードされると、デリゲータはネットワーク活動の増加から利益を得ることができます。 -### Will the upgrade Indexer compete with existing Indexers for rewards? +### アップグレード・インデクサーは、既存のインデクサーと報酬を奪い合うのでしょうか? -No, the upgrade Indexer will only allocate the minimum amount per subgraph and will not collect indexing rewards. +いいえ、アップグレード・インデクサーは、サブグラフごとに最小量しか割り当てず、インデックス作成報酬は受け取りません。 -It operates on an “as needed” basis, and serves as a fallback until sufficient service quality is achieved by at least 3 other Indexers in the network for respective chains and subgraphs. +これは「必要に応じて」動作し、それぞれのチェーンやサブグラフに対して、ネットワーク内の少なくとも3つの他のインデクサによって十分なサービス品質が達成されるまで、フォールバックとして機能します。 -### How will this affect subgraph developers? +### これはサブグラフ開発者にどのような影響を与えるのでしょうか? -Subgraph developers will be able to query their subgraphs on the network almost immediately after upgrading them from the hosted service or publishing them from the Subgraph Studio, as no lead time will be required for indexing. +サブグラフ開発者は、ホスティング・サービスからアップグレードしたり、Subgraph Studioからサブグラフを公開した後、インデックス作成のリードタイムが不要なため、すぐにネットワーク上のサブグラフを照会することができます。 -### How does this benefit data consumers? +### これはデータ消費者にとってどのようなメリットがあるのでしょうか? -The upgrade Indexer enables chains on the network that are currently only supported on the hosted service. Therefore, it widens the scope and availability of data that can be queried on the network. +アップグレード・インデクサーは、現在ホスティング・サービスでのみサポートされているチェインをネットワーク上で可能にします。したがって、ネットワーク上で照会できるデータの範囲と可用性が広がります。 -### How will the upgrade Indexer price queries? +### アップグレード・インデクサーは、クエリにどのような価格をつけるのでしょうか? -The upgrade Indexer will price queries at the market rate so as not to influence the query fee market. +アップグレード・インデクサーは、クエリ料金市場に影響を与えないよう、クエリ料金を市場価格で設定すします。 -### What are the criteria for the upgrade Indexer to stop supporting a subgraph? +### アップグレード・インデクサーがサブグラフのサポートを停止する基準は何ですか? -The upgrade Indexer will serve a subgraph until it is sufficiently and successfully served with consistent queries served by at least 3 other Indexers. +アップグレード・インデクサーは、少なくとも3つの他のインデクサーによって提供された一貫性のあるクエリで、サブグラフが十分かつ正常に提供されるまで、サブグラフを提供します。 -Furthermore, the upgrade Indexer will stop supporting a subgraph if it has not been queried in the last 30 days. +さらに、アップグレード・インデクサーは、そのサブグラフが過去30日間にクエリされなかった場合、そのサブグラフのサポートを停止します。 -Other Indexers are incentivized to support subgraphs with ongoing query volume, so the query volume to the upgrade Indexer should trend towards zero because the Indexer will have a small allocation size and other Indexers will be chosen for queries ahead of the upgrade Indexer. +他のインデクサーは、継続的なクエリボリュームを持つサブグラフをサポートするインセンティブがあるため、アップグレード・インデクサーへのクエリボリュームはゼロになるはずです。 From 87b3ab400e9d08a1119d05a8b447531d35235ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:38 -0400 Subject: [PATCH 558/924] New translations sunrise.mdx (Portuguese) --- website/pages/pt/sunrise.mdx | 114 +++++++++++++++++------------------ 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/website/pages/pt/sunrise.mdx b/website/pages/pt/sunrise.mdx index 20e06d584e4b..64ec31beccdf 100644 --- a/website/pages/pt/sunrise.mdx +++ b/website/pages/pt/sunrise.mdx @@ -1,113 +1,113 @@ --- -title: Sunrise of decentralized data FAQ +title: Perguntas frequentes do nascente dos dados descentralizados --- -> Note: this document is continually updated to ensure the most accurate and helpful information is provided. New questions and answers are added on a regular basis. If you can’t find the information you’re looking for, or if you require immediate assistance [reach out on Discord](https://discord.gg/vtvv7FP). +> Nota: este documento é continuamente atualizado para garantir a providência das informações mais precisas e úteis. Novas perguntas e respostas são adicionadas de forma regular. Se não achar a informação que procura, ou se precisar de assistência imediata, [entre em contacto no Discord](https://discord.gg/vtvv7FP). -## What is the sunrise of decentralized data? +## O que é o nascente dos dados descentralizados? -The sunrise of decentralized data is an initiative spearheaded by Edge & Node, working on The Graph. The goal is to seamlessly enable subgraph developers and data consumers to upgrade to The Graph’s decentralized network. +O nascente dos dados descentralizados é uma iniciativa liderada pela Edge & Node, que trabalha no The Graph. A meta é garantir a atualização à rede descentralizada do The Graph por programadores de subgraph e consumidores de dados. -This plan draws on many previous developments from The Graph ecosystem, including an upgrade Indexer to serve queries on newly published subgraphs, and the ability to integrate new blockchain networks to The Graph. +Este plano usa vários desenvolvimentos prévios do ecossistema do The Graph, inclusive um Indexador de atualização para servir queries em subgraphs recém-publicados, e a habilidade de integrar novas redes de blockchain ao The Graph. -### What are the phases of the sunrise of decentralized data? +### Quais são as fases do nascente dos dados descentralizados? -**Sunray**: Enable support for hosted service chains, offer a seamless upgrade flow, offer a free plan on The Graph Network.\ -**Sunbeam**: The upgrade window that subgraph developers will have to upgrade their subgraphs to The Graph Network. The start and length of this will be announced soon.\ -**Sunrise**: Hosted service endpoints will expire as traffic moves to The Graph Network. +**Raio de sol**: Ativar o apoio a chains do serviço hospedado, oferecer um fluxo suave de atualização e oferecer um plano grátis na Graph Network.\ +**Luz do sol**: A janela de tempo para programadores de subgraph atualizarem os seus subgraphs à Graph Network. O início e a duração deste passo serão anunciados em breve.\ +**Nascer do sol**: Endpoints do serviço hospedado expirarão quando o tráfego migrar à Graph Network. -### Do I need to run my own infrastructure? +### Eu tenho que executar a minha própria infraestrutura? -No, all infrastructure is operated by independent Indexers on The Graph Network, including the upgrade Indexer ([read more below](#what-is-an-upgrade-indexer)). +Não, toda a infraestrutura é operada por Indexadores independentes na Graph Network, o que inclui o Indexador de atualização ([leia mais abaixo](#what-is-an-upgrade-indexer)). -You can use the [Subgraph Studio](https://thegraph.com/studio/) to create, test, and publish your subgraph. All hosted service users are encouraged to upgrade their subgraphs to The Graph Network. The upgrade Indexer ensures you can query your subgraph even without curation signal. +Você pode usar o [Subgraph Studio](https://thegraph.com/studio/) para criar, testar e editar o seu subgraph. Todos os utilizadores do serviço hospedado são encorajados a migrar os seus subgraphs à Graph Network. O Indexador de atualização garante que você possa consultar o seu subgraph mesmo sem sinal de curadoria. -Once your subgraph has reached adequate curation signal and other Indexers begin supporting it, the upgrade Indexer will gradually taper off, allowing other Indexers to collect indexing rewards and query fees. +Quando o seu subgraph alcançar um sinal de curadoria adequado e outros Indexadores começarem a apoiá-lo, o Indexador de atualização se estabilizará gradualmente, de modo a permitir que outros Indexadores coletem recompensas de indexação e taxas de query. -### Should I host my own indexing infrastructure? +### Devo hospedar a minha própria infraestrutura de indexação? -Running infrastructure for your own project is [significantly more resource intensive](/network/benefits/) when compared to using The Graph Network. +A execução de infraestrutura para o seu próprio projeto [requer muito mais recursos](/network/benefits/) em comparação ao uso da Graph Network. -Additionally, The Graph Network is significantly more robust, reliable, and cost-efficient than anything provided by a single organization or team. Hundreds of independent Indexers around the world power The Graph Network, ensuring safety, security and redundancy. +Além disto, a Graph Network é muito mais robusta, confiável, com um custo-benefício muito melhor em comparação a qualquer coisa providenciada por uma única organização ou equipa. Centenas de Indexadores independentes ao redor do mundo movem a Graph Network para garantir segurança e redundância. -That being said, if you’re still interested in running a [Graph Node](https://github.com/graphprotocol/graph-node), consider joining The Graph Network [as an Indexer](https://thegraph.com/blog/how-to-become-indexer/) to earn indexing rewards and query fees by serving data on your subgraph and others. +Dito isto, se ainda tiver interesse em executar um [Graph Node](https://github.com/graphprotocol/graph-node), considere entrar na Graph Network [como Indexador](https://thegraph.com/blog/how-to-become-indexer/) para ganhar recompensas de indexação e taxas de query ao servir dados no seu subgraph e em outros. -### Should I use a centralized indexing provider? +### Devo usar um provedor de indexação centralizado? -If you are building in web3, the moment you use a centralized indexing provider, you are giving them control of your dapp and data. The Graph’s decentralized network offers [superior quality of service](https://thegraph.com/blog/qos-the-graph-network/), reliability with unbeatable uptime thanks to node redundancy, as well as significantly [lower costs](/network/benefits/), and you won’t be held hostage at the data layer. +Se construir na web3, a partir do momento que usa um provedor de indexação centralizado, você dá-os controle do seu dApp e dos seus dados. A rede descentralizada do The Graph oferece [uma qualidade melhor de serviço](https://thegraph.com/blog/qos-the-graph-network/), confiança com atividade imbatível graças à redundância de nodes, além de [custos muito menores](/network/benefits/), e você não será feito de refém na camada de dados. -With The Graph Network, your subgraph is public and anyone can query it openly, which increases the usage and network effects of your dapp. With a centralized indexing solution, the subgraph is private to the centralized provider. +Com a Graph Network, o seu subgraph é público e qualquer pessoa pode consultá-lo abertamente, o que aumenta o uso e os efeitos na rede do seu dApp. Com uma solução centralizada de indexação, o subgraph é privado para o provedor centralizado. -Here's a detailed breakdown of the benefits of The Graph over centralized hosting: +Aqui está um resumo detalhado dos benefícios do The Graph em comparação à hospedagem centralizada: -- **Resilience and Redundancy**: Decentralized systems are inherently more robust and resilient due to their distributed nature. Data isn't stored on a single server or location. Instead, it's served by hundreds of independent Indexers around the globe. This reduces the risk of data loss or service interruptions if one node fails, leading to exceptional uptime (99.99%). +- **Resiliência e Redundância**: Sistemas descentralizados, por natureza, são mais robustos e resilientes devido à sua natureza distribuída. Os dados não são guardados num único servidor ou local, mas sim, servidos por centenas de Indexadores independentes ao redor do mundo. Isto reduz o risco de perda de dados ou interrupções do serviço se um node falhar, o que leva a um tempo de atividade excepcional (99,99%). -- **Quality of Service**: In addition to the impressive uptime, The Graph Network features a ~106ms median query speed (latency), and higher query success rates compared to hosted alternatives. Read more in [this blog](https://thegraph.com/blog/qos-the-graph-network/). +- **Qualidade de Serviço**: Além do tempo de atividade impressionante, a Graph Network tem uma velocidade de query mediana (latência) de cerca de 106ms, e índices maiores de sucesso de query em comparação a alternativas hospedadas. Leia mais [neste blog](https://thegraph.com/blog/qos-the-graph-network/). -- **Censorship Resistance**: Centralized systems can become targets for censorship, either through regulatory pressures or network attacks. In contrast, decentralized systems, due to their dispersed architecture, are much harder to censor, ensuring continuous data availability. +- **Resistência a Censura**: Sistemas centralizados podem tornar-se alvos para censura, seja por pressão regulatória ou ataques à rede. Ao contrário, sistemas descentralizados, com a sua arquitetura dispersada, são muito mais difíceis de censurar, o que garante a disponibilidade contínua dos dados. -- **Transparency and Trust**: Decentralized systems operate openly, enabling anyone to independently verify the data. This transparency builds trust among network participants, as they can verify the system's integrity without relying on a central authority. +- **Transparência e Confiança**: Sistemas descentralizados operam de forma aberta, o que permite que qualquer pessoa verifique os dados de forma independente. Esta transparência constrói confiança entre participantes da rede, já que podem verificar a integridade do sistema sem depender de uma autoridade central. -Just as you've chosen your blockchain network for its decentralized nature, security, and transparency, opting for The Graph Network is an extension of those same principles. By aligning your data infrastructure with these values, you ensure a cohesive, resilient, and trust-driven development environment. +Assim como você escolheu a sua rede de blockchain pela natureza descentralizada, segurança e transparência, optar pela Graph Network é uma extensão destes mesmos princípios. Ao alinhar a sua infraestrutura de dados com estes valores, você garante um ambiente de programação coeso, resiliente e cheio de confiança. -### Will my hosted service subgraph be supported by the upgrade Indexer? +### O meu subgraph do serviço hospedado será apoiado pelo Indexador de atualização? -Yes, the upgrade Indexer will support all hosted service subgraphs published to The Graph Network. +Sim, o Indexador de atualização apoiará todos os subgraphs do serviço hospedado publicados na Graph Network. -However, some subgraphs may not be eligible for indexing rewards, and as a result, may have difficulty attracting further Indexers. For example, indexing rewards may not be available for subgraphs on certain chains. Members from these blockchain communities are encouraged to integrate their chain through the [Chain Integration Process](/chain-integration-overview/). +Porém, alguns subgraphs podem não ser elegíveis a recompensas de indexação, e como resultado, podem ter dificuldades em atrair mais Indexadores. Por exemplo, recompensas de indexação podem não estar disponíveis para subgraphs em certas chains. Convidamos os membros destas comunidades de blockchain para integrar a sua chain através do [Processo de Integração de Chain](/chain-integration-overview/). -## What is an upgrade Indexer? +## O que é um Indexador de atualização? -### What does "upgrade Indexer" mean? +### O que significa "Indexador de atualização"? -It is designed to improve the experience of upgrading subgraphs from the hosted service to The Graph Network and supporting new versions of existing subgraphs that have not yet been indexed. +Este é construído para melhorar a experiência de atualizar subgraphs do serviço hospedado à Graph Network e apoiar novas versões de subgraphs existentes que ainda não foram indexados. -The upgrade Indexer is aimed at bootstrapping chains that do not yet have indexing rewards on the network, as well as a fallback for new subgraph versions. The goal is to ensure that an Indexer is available to serve queries as quickly as possible after a subgraph is published. +O Indexador de atualização mira inicializar chains que ainda não tenham recompensas de indexação na rede, além de uma reserva para novas versões de subgraph. A meta é garantir que um Indexador esteja disponível para servir queries o mais rápido possível após a publicação de um subgraph. -### What chains will the upgrade Indexer support? +### Quais chains serão apoiadas pelo Indexador de atualização? -The upgrade Indexer will support chains that are currently only available on the hosted service. This will include many hosted service subgraphs that have already been synced. +O Indexador de atualização apoiará chains que atualmente estejam disponíveis apenas no serviço hospedado. Isto incluirá muitos dos subgraphs no serviço hospedado que já foram sincronizados. -Find a comprehensive list of supported chains [here](/developing/supported-networks/). +Encontre uma lista compreensiva de chains apoiadas [aqui](/developing/supported-networks/). -### Why is Edge & Node running the upgrade Indexer? +### Porque a Edge & Node executa o Indexador de atualização? -Edge and Node has historically maintained the hosted service and, as a result, has already synced data for hosted service subgraphs. +A Edge & Node manteve historicamente o serviço hospedado, e como resultado, já sincronizou os dados de subgraphs do serviço hospedado. -Any and all Indexers are encouraged to become upgrade Indexers as well. However, note that operating an upgrade Indexer is largely provided as a public service to support new subgraphs and additional chains due to the lack of indexing rewards before they are approved by The Graph Council. +Convidamos todos e quaisquer Indexadores a tornar-se também Indexadores de atualização. Porém, perceba que a operação de um Indexador de atualização tende a ser fornecida como um serviço público para apoiar subgraphs novos e chains adicionais, devido à falta de recompensas de indexação antes de serem aprovados pelo Graph Council. -### What does this mean for existing Indexers? +### O que isto significa para Indexadores existentes? -Chains that are currently exclusively supported on the hosted service will be made available to developers on The Graph without indexing rewards at first, though this does unlock query fees for any Indexer that is interested. This is expected to lead to an increase in the number of subgraphs being published on the network, providing more opportunities for Indexers to index and serve these subgraphs in return for query fees, even before indexing rewards are enabled for a chain. +Chains que são atualmente apoiadas no serviço hospedado serão disponibilizadas para programadores no The Graph sem recompensas de indexação inicialmente, mas isto ativará taxas de query para qualquer Indexador interessado. Espera-se que isto cause um aumento no número de subgraphs editados na rede, o que proverá mais oportunidades para os Indexadores indexarem e servirem estes subgraphs em troca de taxas de query, antes mesmo da ativação de recompensas de indexação para uma chain. -The upgrade Indexer also provides the Indexer community with information about potential demand for subgraphs and new chains on The Graph Network. +O Indexador de atualização também fornece à comunidade de Indexadores informações sobre demanda em potencial para subgraphs e novas chains na Graph Network. -### What does this mean for Delegators? +### O que isto significa para Delegantes? -The upgrade Indexer offers a powerful opportunity for Delegators. As more subgraphs are upgraded from the hosted service to The Graph Network, Delegators stand to benefit from the increased network activity. +O Indexador de atualização oferece uma forte oportunidade para Delegantes. À medida que mais subgraphs são atualizados do serviço hospedado até a Graph Network, os Delegantes podem se beneficiar do aumento na atividade da rede. -### Will the upgrade Indexer compete with existing Indexers for rewards? +### O Indexador de atualização concorrerá com Indexadores existentes para recompensas? -No, the upgrade Indexer will only allocate the minimum amount per subgraph and will not collect indexing rewards. +Não, o Indexador de atualização só alocará a quantidade mínima por subgraph e não coletará recompensas de indexação. -It operates on an “as needed” basis, and serves as a fallback until sufficient service quality is achieved by at least 3 other Indexers in the network for respective chains and subgraphs. +Ele opera numa base de "necessidade" e serve como uma reserva até que uma qualidade de serviço suficiente seja alcançada por, no mínimo, 3 outros Indexadores na rede para chains e subgraphs respetivos. -### How will this affect subgraph developers? +### Como isto afetará os programadores de subgraph? -Subgraph developers will be able to query their subgraphs on the network almost immediately after upgrading them from the hosted service or publishing them from the Subgraph Studio, as no lead time will be required for indexing. +Estes poderão consultar os seus subgraphs na rede quase imediatamente após atualizá-los do serviço hospedado ou publicá-los do Subgraph Studio, já que não será necessário tempo de espera para a indexação. -### How does this benefit data consumers? +### Como isto beneficiará os consumidores de dados? -The upgrade Indexer enables chains on the network that are currently only supported on the hosted service. Therefore, it widens the scope and availability of data that can be queried on the network. +O Indexador de atualização ativa na rede chains que são atualmente apoiadas apenas no serviço hospedado. Assim, ele aumenta o alcance e a disponibilidade de dados que podem ser consultados na rede. -### How will the upgrade Indexer price queries? +### Como o Indexador de atualização precificará queries? -The upgrade Indexer will price queries at the market rate so as not to influence the query fee market. +O Indexador de atualização precificará queries no preço do mercado, para não influenciar o mercado de taxas de queries. -### What are the criteria for the upgrade Indexer to stop supporting a subgraph? +### Quais são os critérios para que o Indexador de atualização pare de apoiar um subgraph? -The upgrade Indexer will serve a subgraph until it is sufficiently and successfully served with consistent queries served by at least 3 other Indexers. +O Indexador de atualização servirá um subgraph até ele for servido suficientemente e com êxito, com queries consistentes servidos por, no mínimo, 3 outros Indexadores. -Furthermore, the upgrade Indexer will stop supporting a subgraph if it has not been queried in the last 30 days. +Além disto, o Indexador de atualização parará de apoiar um subgraph se ele não tiver sido consultado nos últimos 30 dias. -Other Indexers are incentivized to support subgraphs with ongoing query volume, so the query volume to the upgrade Indexer should trend towards zero because the Indexer will have a small allocation size and other Indexers will be chosen for queries ahead of the upgrade Indexer. +Outros Indexadores são incentivados a apoiar subgraphs com o volume de query atual, para que o volume de query ao Indexador de atualização tenda a aproximar zero, já que o Indexador terá um tamanho de alocação pequeno e outros Indexadores serão escolhidos por queries antes do Indexador de atualização. From dbee2bed8a7f633c0189a6f81bcd4950b5b43256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:39 -0400 Subject: [PATCH 559/924] New translations sunrise.mdx (Turkish) --- website/pages/tr/sunrise.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/tr/sunrise.mdx b/website/pages/tr/sunrise.mdx index 3dd507efeccf..5c749abd441d 100644 --- a/website/pages/tr/sunrise.mdx +++ b/website/pages/tr/sunrise.mdx @@ -2,7 +2,7 @@ title: Merkeziyetsiz Verinin Doğuşu SSS --- -> Not: Bu belge, en doğru ve yararlı bilgilerin sunulmasını sağlamak amacıyla sürekli olarak güncellenmektedir. Yeni sorular ve cevaplar düzenli olarak eklenmektedir. Aradığınız bilgiyi bulamazsanız veya acil yardıma ihtiyacınız olursa [Discord] \(https://discord.gg/vtvv7FP) üzerinden bize ulaşın. +> Not: Bu belge, en doğru ve yararlı bilgilerin sunulmasını sağlamak amacıyla sürekli olarak güncellenmektedir. Yeni sorular ve cevaplar düzenli olarak eklenmektedir. Aradığınız bilgiyi bulamazsanız veya acil yardıma ihtiyacınız olursa [Discord] (https://discord.gg/vtvv7FP) üzerinden bize ulaşın. ## Merkeziyetsiz verinin doğuşu nedir? @@ -12,9 +12,9 @@ Bu plan, yeni yayınlanan subgraphlar üzerinde sorgular sunmak için bir yükse ### Merkeziyetsiz verinin doğuşunun aşamaları nelerdir? -**Sunray**: Enable support for hosted service chains, offer a seamless upgrade flow, offer a free plan on The Graph Network.\ -**Sunbeam**: The upgrade window that subgraph developers will have to upgrade their subgraphs to The Graph Network. The start and length of this will be announced soon.\ -**Sunrise**: Hosted service endpoints will expire as traffic moves to The Graph Network. +**Sunray**: Barındırılan hizmet zincirleri için desteği etkinleştirin, sorunsuz bir yükseltme akışı sunun, Graph Network'te ücretsiz bir plan sunun. +**Sunbeam**: Subgraph geliştiricilerinin subgraph'lerini Graph Network'e yükseltmeleri gereken yükseltme penceresi. Bunun başlangıcı ve süresi yakında açıklanacak. +**Sunrise**: Barındırılan hizmet uç noktalarının süresi, trafik Graph Network'e taşındıkça sona erecektir. ### Kendi altyapımı çalıştırmam gerekiyor mu? @@ -42,7 +42,7 @@ Graph Ağı ile subgraph'ınız herkese açıktır ve herkes tarafından açık - **Dayanıklılık ve Yedeklilik**: Merkeziyetsiz sistemler, dağıtık yapıları nedeniyle doğal olarak daha dayanıklı ve esnektir. Veriler tek bir sunucuda veya konumda depolanmaz. Bunun yerine, dünyanın dört bir yanındaki yüzlerce bağımsız İndeksleyici tarafından sunulur. Bu, bir düğümün arızalanması durumunda veri kaybı veya hizmet kesintisi riskini azaltır ve olağanüstü çalışma süreleri (%99,99) sağlar. -- **Hizmet Kalitesi**: Etkileyici çalışma süresine ek olarak, Graph Ağı yaklaşık 106 ms medyan sorgu hızı (gecikme) ve barındırılan alternatiflere kıyasla daha yüksek sorgu başarı oranlarına sahiptir. Daha fazla bilgi için [bu bloğa göz atın] \(https://thegraph.com/blog/qos-the-graph-network/). +- **Hizmet Kalitesi**: Etkileyici çalışma süresine ek olarak, Graph Ağı yaklaşık 106 ms medyan sorgu hızı (gecikme) ve barındırılan alternatiflere kıyasla daha yüksek sorgu başarı oranlarına sahiptir. Daha fazla bilgi için [bu bloğa göz atın] (https://thegraph.com/blog/qos-the-graph-network/). - **Sansüre Direnç**: Merkezi sistemler, düzenleyici baskılar veya ağ saldırıları aracılığıyla sansürün hedefi haline gelebilir. Buna karşın, merkeziyetsiz sistemlerin, dağıtık mimarileri nedeniyle sansürlenmeleri çok daha zordur ve sürekli veri kullanılabilirliği sağlarlar. @@ -52,7 +52,7 @@ Merkezi olmayan yapısı, güvenliği ve şeffaflığı nedeniyle blok zincir a ### Barındırılan hizmet subgraph'ım yükseltme İndeksleyicisi tarafından desteklenecek mi? -Yes, the upgrade Indexer will support all hosted service subgraphs published to The Graph Network. +Evet, yükseltme indeksleyicisi Graph Network'te yayınlanan tüm barındırılan hizmet subgraph'lerini destekleyecektir. Ancak, bazı subgraphlar indeksleme ödülleri için uygun olmayabilir ve bu nedenle daha fazla İndeksleyici çekmekte zorlanabilir. Örneğin, belirli zincirlerdeki subgraphlar için indeksleme ödülleri mevcut olmayabilir. Bu blok zinciri toplulukları üyelerinin, [Zincir Entegrasyon Süreci](/chain-integration-overview/) aracılığıyla zincirlerini entegre etmeleri tavsiye edilir. @@ -66,7 +66,7 @@ Yükseltme İndeksleyicisi, ağda henüz indeksleme ödülleri olmayan zincirler ### Yükseltme İndeksleyicisi hangi zincirleri destekleyecek? -The upgrade Indexer will support chains that are currently only available on the hosted service. This will include many hosted service subgraphs that have already been synced. +Yükseltme indeksleyicisi, şu anda yalnızca barındırılan hizmette bulunan zincirleri destekleyecektir. Bu, halihazırda senkronize edilmiş olan birçok barındırılan hizmet subgraph'ini içerecektir. Desteklenen zincirlerin kapsamlı bir listesini inceleyin [here](/developing/supported-networks/). From 6ed2add35d67d8211affd6daedc3a07b0a9e5fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:41 -0400 Subject: [PATCH 560/924] New translations sunrise.mdx (Chinese Simplified) --- website/pages/zh/sunrise.mdx | 104 +++++++++++++++++------------------ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/website/pages/zh/sunrise.mdx b/website/pages/zh/sunrise.mdx index 20e06d584e4b..561be69e1383 100644 --- a/website/pages/zh/sunrise.mdx +++ b/website/pages/zh/sunrise.mdx @@ -1,113 +1,113 @@ --- -title: Sunrise of decentralized data FAQ +title: 分散数据的黎明FAQ --- -> Note: this document is continually updated to ensure the most accurate and helpful information is provided. New questions and answers are added on a regular basis. If you can’t find the information you’re looking for, or if you require immediate assistance [reach out on Discord](https://discord.gg/vtvv7FP). +> 注意:此文档会持续更新,以确保提供最准确和有用的信息。新的问题和答案会定期添加。如果您找不到您要寻找的信息,或者需要即时帮助,请[通过Discord联系我们](https://discord.gg/vtvv7FP)。 -## What is the sunrise of decentralized data? +## 分散的数据的黎明是什么? -The sunrise of decentralized data is an initiative spearheaded by Edge & Node, working on The Graph. The goal is to seamlessly enable subgraph developers and data consumers to upgrade to The Graph’s decentralized network. +"分散式数据的黎明" 是由 Edge & Node 领导的一项倡议,他们在开发 The Graph 项目。其目标是无缝地使子图开发者和数据消费者能够升级到 The Graph 的去中心化网络。 -This plan draws on many previous developments from The Graph ecosystem, including an upgrade Indexer to serve queries on newly published subgraphs, and the ability to integrate new blockchain networks to The Graph. +这一计划借鉴了 The Graph 生态系统的许多先前的发展,包括升级索引人以提供对新发布子图的查询服务,以及将新的区块链网络集成到 The Graph 中的能力。 -### What are the phases of the sunrise of decentralized data? +### 分散数据的黎明这一计划由哪些阶段组成? **Sunray**: Enable support for hosted service chains, offer a seamless upgrade flow, offer a free plan on The Graph Network.\ **Sunbeam**: The upgrade window that subgraph developers will have to upgrade their subgraphs to The Graph Network. The start and length of this will be announced soon.\ **Sunrise**: Hosted service endpoints will expire as traffic moves to The Graph Network. -### Do I need to run my own infrastructure? +### 我需要自己运行基础设施吗? -No, all infrastructure is operated by independent Indexers on The Graph Network, including the upgrade Indexer ([read more below](#what-is-an-upgrade-indexer)). +不需要,所有的基础设施由The Graph Network上的独立索引人运营,包括升级索引人([详见下文](#what-is-an-upgrade-indexer)) -You can use the [Subgraph Studio](https://thegraph.com/studio/) to create, test, and publish your subgraph. All hosted service users are encouraged to upgrade their subgraphs to The Graph Network. The upgrade Indexer ensures you can query your subgraph even without curation signal. +您可以使用[Subgraph Studio](https://thegraph.com/studio/)来创建、测试和发布您的子图。所有托管服务的用户都被鼓励将其子图升级到The Graph Network。升级索引人确保您可以查询您的子图,即使没有策展信号。 -Once your subgraph has reached adequate curation signal and other Indexers begin supporting it, the upgrade Indexer will gradually taper off, allowing other Indexers to collect indexing rewards and query fees. +一旦您的子图达到足够的策展信号,并且其他索引人开始支持它,那么升级索引人将逐渐减少,这将允许其他索引人收集索引奖励和查询费用。 -### Should I host my own indexing infrastructure? +### 我应该自己托管索引基础设施吗? -Running infrastructure for your own project is [significantly more resource intensive](/network/benefits/) when compared to using The Graph Network. +与使用The Graph Network相比,为您自己的项目运行基础设施需要的资源明显更多(/network/benefits/)。 -Additionally, The Graph Network is significantly more robust, reliable, and cost-efficient than anything provided by a single organization or team. Hundreds of independent Indexers around the world power The Graph Network, ensuring safety, security and redundancy. +此外,与单一组织或团队提供的任何内容相比,The Graph Network显著更健壮、可靠和成本效益更高。全球数百个独立的指标化者支持The Graph Network,确保了安全性、可靠性和冗余性。 -That being said, if you’re still interested in running a [Graph Node](https://github.com/graphprotocol/graph-node), consider joining The Graph Network [as an Indexer](https://thegraph.com/blog/how-to-become-indexer/) to earn indexing rewards and query fees by serving data on your subgraph and others. +话虽如此,如果您仍有兴趣运行[Graph Node](https://github.com/graphprotocol/graph-node),考虑加入The Graph Network,作为索引人,通过为您的子图和其他子图提供数据来赚取索引奖励和查询费用。了解如何成为索引人的更多信息,请参阅[此链接](https://thegraph.com/blog/how-to-become-indexer/)。 -### Should I use a centralized indexing provider? +### 我应该使用中心化的索引提供者吗? -If you are building in web3, the moment you use a centralized indexing provider, you are giving them control of your dapp and data. The Graph’s decentralized network offers [superior quality of service](https://thegraph.com/blog/qos-the-graph-network/), reliability with unbeatable uptime thanks to node redundancy, as well as significantly [lower costs](/network/benefits/), and you won’t be held hostage at the data layer. +如果您正在构建Web3应用程序,一旦使用中心化的索引提供者,您将把对您的DApp和数据的控制交给他们。The Graph的分散网络提供卓越的服务质量、通过节点冗余实现无与伦比的可用性,以及显著更低的成本,您将不会受到数据层的威胁。了解更多关于[服务质量](https://thegraph.com/blog/qos-the-graph-network/)和[网络优势](/network/benefits/)的信息。 -With The Graph Network, your subgraph is public and anyone can query it openly, which increases the usage and network effects of your dapp. With a centralized indexing solution, the subgraph is private to the centralized provider. +在The Graph Network上,您的子图是公开的,任何人都可以公开查询它,这会增加您DApp的使用率和网络效应。而使用中心化的索引解决方案,子图对中心化提供者来说是私有的。 -Here's a detailed breakdown of the benefits of The Graph over centralized hosting: +以下是The Graph相对于中心化托管的好处的详细分析: -- **Resilience and Redundancy**: Decentralized systems are inherently more robust and resilient due to their distributed nature. Data isn't stored on a single server or location. Instead, it's served by hundreds of independent Indexers around the globe. This reduces the risk of data loss or service interruptions if one node fails, leading to exceptional uptime (99.99%). +- **弹性与冗余性**:分散系统因其分布式性质而本质上更加坚固和弹性十足。数据不存储在单一服务器或位置上,而是由全球数百个独立的索引人提供。这降低了数据丢失或服务中断的风险,即使一个节点失败,也能实现卓越的可用性(99.99%)。 -- **Quality of Service**: In addition to the impressive uptime, The Graph Network features a ~106ms median query speed (latency), and higher query success rates compared to hosted alternatives. Read more in [this blog](https://thegraph.com/blog/qos-the-graph-network/). +- **服务质量**:除了令人印象深刻的可用性之外,The Graph Network具有约106毫秒的中位查询速度(延迟),以及相对于托管的替代方案,更高的查询成功率。更多信息请参阅[此博客](https://thegraph.com/blog/qos-the-graph-network/)。 -- **Censorship Resistance**: Centralized systems can become targets for censorship, either through regulatory pressures or network attacks. In contrast, decentralized systems, due to their dispersed architecture, are much harder to censor, ensuring continuous data availability. +- **抗审查性**:中心化系统可能会成为审查的目标,无论是监管压力还是网络攻击。相比之下,由于其分散的架构,分散系统要难以审查,确保数据持续可用性。 -- **Transparency and Trust**: Decentralized systems operate openly, enabling anyone to independently verify the data. This transparency builds trust among network participants, as they can verify the system's integrity without relying on a central authority. +- **透明度和信任**:分散系统开放运行,使任何人都能独立验证数据。这种透明性在网络参与者之间建立了信任,因为他们可以验证系统的完整性,而无需依赖中央权威。 -Just as you've chosen your blockchain network for its decentralized nature, security, and transparency, opting for The Graph Network is an extension of those same principles. By aligning your data infrastructure with these values, you ensure a cohesive, resilient, and trust-driven development environment. +正如您选择区块链网络以获取分散性、安全性和透明性一样,选择The Graph Network是这些相同原则的延伸。通过将您的数据基础设施与这些价值观保持一致,您确保了一个有凝聚力、弹性十足且以信任为驱动的开发环境。 -### Will my hosted service subgraph be supported by the upgrade Indexer? +### 我的托管服务子图是否会得到升级的索引人支持? Yes, the upgrade Indexer will support all hosted service subgraphs published to The Graph Network. -However, some subgraphs may not be eligible for indexing rewards, and as a result, may have difficulty attracting further Indexers. For example, indexing rewards may not be available for subgraphs on certain chains. Members from these blockchain communities are encouraged to integrate their chain through the [Chain Integration Process](/chain-integration-overview/). +然而,一些子图可能无法获得索引奖励,因此可能难以吸引更多的索引人。例如,某些链上的子图可能无法获得索引奖励。鼓励来自这些区块链社区的成员通过[链集成流程](/chain-integration-overview/)将他们的链集成进来。 -## What is an upgrade Indexer? +## 什么是升级的索引人? -### What does "upgrade Indexer" mean? +### 升级的索引人意味着什么? -It is designed to improve the experience of upgrading subgraphs from the hosted service to The Graph Network and supporting new versions of existing subgraphs that have not yet been indexed. +"升级索引人" 旨在改善从托管服务迁移到 The Graph Network 的子图的体验,以及支持尚未被索引的现有子图的新版本。 -The upgrade Indexer is aimed at bootstrapping chains that do not yet have indexing rewards on the network, as well as a fallback for new subgraph versions. The goal is to ensure that an Indexer is available to serve queries as quickly as possible after a subgraph is published. +升级索引人旨在启动尚未在网络上具有索引奖励的链,并作为新子图版本的备用选择。其目标是确保在子图发布后尽快提供索引人来响应查询。 -### What chains will the upgrade Indexer support? +### 升级索引人将支持哪些链? The upgrade Indexer will support chains that are currently only available on the hosted service. This will include many hosted service subgraphs that have already been synced. -Find a comprehensive list of supported chains [here](/developing/supported-networks/). +请在[此处](/developing/supported-networks/) 查找支持的链的综合列表。 -### Why is Edge & Node running the upgrade Indexer? +### 为什么 Edge & Node 运行升级索引人? -Edge and Node has historically maintained the hosted service and, as a result, has already synced data for hosted service subgraphs. +Edge and Node 历史上一直维护托管服务,因此已同步了托管服务子图的数据。 -Any and all Indexers are encouraged to become upgrade Indexers as well. However, note that operating an upgrade Indexer is largely provided as a public service to support new subgraphs and additional chains due to the lack of indexing rewards before they are approved by The Graph Council. +鼓励任何索引人都成为升级索引人。然而,需要注意的是,运行升级索引人主要是作为一项公共服务提供的,旨在支持新的子图和额外的链,因为在它们获得 The Graph Council 批准之前,缺乏索引奖励。 -### What does this mean for existing Indexers? +### 这对现有的索引人意味着什么? -Chains that are currently exclusively supported on the hosted service will be made available to developers on The Graph without indexing rewards at first, though this does unlock query fees for any Indexer that is interested. This is expected to lead to an increase in the number of subgraphs being published on the network, providing more opportunities for Indexers to index and serve these subgraphs in return for query fees, even before indexing rewards are enabled for a chain. +目前仅在托管服务上支持的链将首先在 The Graph 上提供给开发人员,尽管它们一开始不会获得索引奖励,但对于有兴趣的任何索引人来说,这将解锁查询费用。这预计会导致网络上发布的子图数量增加,为索引人提供更多的机会,以获得查询费用来索引和为这些子图提供服务,即使还没有为链启用索引奖励。 -The upgrade Indexer also provides the Indexer community with information about potential demand for subgraphs and new chains on The Graph Network. +升级索引人还向索引人社区提供关于 The Graph Network 上潜在的子图需求和新链的信息。 -### What does this mean for Delegators? +### 这对于委托人来说意味着什么? -The upgrade Indexer offers a powerful opportunity for Delegators. As more subgraphs are upgraded from the hosted service to The Graph Network, Delegators stand to benefit from the increased network activity. +升级索引人为代币委托人提供了强大的机会。随着越来越多的子图从托管服务迁移到 The Graph Network,委托人将从增加的网络活动中获益。 -### Will the upgrade Indexer compete with existing Indexers for rewards? +### 升级索引人会与现有的索引人竞争奖励吗? -No, the upgrade Indexer will only allocate the minimum amount per subgraph and will not collect indexing rewards. +不,升级索引人只会为每个子图分配最低金额,并不会收集索引奖励。 -It operates on an “as needed” basis, and serves as a fallback until sufficient service quality is achieved by at least 3 other Indexers in the network for respective chains and subgraphs. +它根据“根据需要”的方式运行,并作为网络中至少有3个其他索引人为各自的链和子图实现足够的服务质量之前的备用。 -### How will this affect subgraph developers? +### 这将如何影响子图开发者? -Subgraph developers will be able to query their subgraphs on the network almost immediately after upgrading them from the hosted service or publishing them from the Subgraph Studio, as no lead time will be required for indexing. +子图开发者将能够在将它们从托管服务升级或从子图工作室发布到网络后几乎立即查询它们,因为无需等待进行索引的时间。 -### How does this benefit data consumers? +### 这如何使数据消费者受益? -The upgrade Indexer enables chains on the network that are currently only supported on the hosted service. Therefore, it widens the scope and availability of data that can be queried on the network. +升级的索引人使目前仅在托管服务上受支持的网络链能够在网络上运行,因此扩大了可以在网络上查询的数据范围和可用性。 -### How will the upgrade Indexer price queries? +### 升级的索引人将如何定价查询? -The upgrade Indexer will price queries at the market rate so as not to influence the query fee market. +升级的索引人将按市场价格定价查询,以不影响查询费用市场。 -### What are the criteria for the upgrade Indexer to stop supporting a subgraph? +### 升级索引人停止支持一个子图的标准是什么? -The upgrade Indexer will serve a subgraph until it is sufficiently and successfully served with consistent queries served by at least 3 other Indexers. +升级的索引人将为一个子图提供服务,直到它能够获得由至少3个其他索引人提供的持续且成功的查询服务。 -Furthermore, the upgrade Indexer will stop supporting a subgraph if it has not been queried in the last 30 days. +此外,如果一个子图在过去的30天内没有被查询,升级的索引人将停止支持该子图。 -Other Indexers are incentivized to support subgraphs with ongoing query volume, so the query volume to the upgrade Indexer should trend towards zero because the Indexer will have a small allocation size and other Indexers will be chosen for queries ahead of the upgrade Indexer. +其他索引人会被激励来支持有持续查询量的子图,因此升级的索引人的查询量应该趋近于零,因为该索引人的分配容量较小,其他索引人将在升级的索引人之前被选中进行查询。 From 4736ee45a31211f63d0cb077a026e4671d75ef66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:42 -0400 Subject: [PATCH 561/924] New translations sunrise.mdx (Urdu (Pakistan)) --- website/pages/ur/sunrise.mdx | 114 +++++++++++++++++------------------ 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/website/pages/ur/sunrise.mdx b/website/pages/ur/sunrise.mdx index 20e06d584e4b..2e91006ecc52 100644 --- a/website/pages/ur/sunrise.mdx +++ b/website/pages/ur/sunrise.mdx @@ -1,113 +1,113 @@ --- -title: Sunrise of decentralized data FAQ +title: ڈیسینٹرالائزڈ ڈیٹا کے سن رائز کے اکثر پوچھے گئے سوالات --- -> Note: this document is continually updated to ensure the most accurate and helpful information is provided. New questions and answers are added on a regular basis. If you can’t find the information you’re looking for, or if you require immediate assistance [reach out on Discord](https://discord.gg/vtvv7FP). +> نوٹ: اس دستاویز کو مسلسل اپ ڈیٹ کیا جاتا ہے تاکہ یہ یقینی بنایا جا سکے کہ انتہائی درست اور مددگار معلومات فراہم کی گئی ہیں۔ نئے سوالات اور جوابات مستقل بنیادوں پر شامل کیے جاتے ہیں۔ اگر آپ کو وہ معلومات نہیں ملتی ہیں جس کی آپ تلاش کر رہے ہیں، یا اگر آپ کو فوری مدد کی ضرورت ہے [ڈسکورڈ پر رابطہ کریں](https://discord.gg/vtvv7FP). -## What is the sunrise of decentralized data? +## ڈیسینٹرالائزڈ ڈیٹا کا سن رائز کیا ہے؟ -The sunrise of decentralized data is an initiative spearheaded by Edge & Node, working on The Graph. The goal is to seamlessly enable subgraph developers and data consumers to upgrade to The Graph’s decentralized network. +ڈیسینٹرالائزڈ ڈیٹا کا سن رائز ایک پہل ہے جس کی سربراہی ایج اور نوڈ نے کی ہے، جو گراف پر کام کر رہی ہے۔ مقصد سب گراف ڈویلپرز اور ڈیٹا صارفین کو گراف کے ڈیسینٹرالائزڈ نیٹ ورک میں اپ گریڈ کرنے کے لیے بغیر کسی رکاوٹ کے قابل بنانا ہے. -This plan draws on many previous developments from The Graph ecosystem, including an upgrade Indexer to serve queries on newly published subgraphs, and the ability to integrate new blockchain networks to The Graph. +یہ منصوبہ گراف ایکو سسٹم کی کئی پچھلی پیشرفتوں پر مبنی ہے، بشمول نئے شائع شدہ سب گرافس پر کیوریز پیش کرنے کے لیے ایک اپ گریڈ انڈیکسر، اور نئے بلاکچین نیٹ ورکس کو گراف میں ضم کرنے کی صلاحیت. -### What are the phases of the sunrise of decentralized data? +### ڈیسینٹرالائزڈ ڈیٹا کے سن رائز ہونے کے مراحل کیا ہیں؟ -**Sunray**: Enable support for hosted service chains, offer a seamless upgrade flow, offer a free plan on The Graph Network.\ -**Sunbeam**: The upgrade window that subgraph developers will have to upgrade their subgraphs to The Graph Network. The start and length of this will be announced soon.\ -**Sunrise**: Hosted service endpoints will expire as traffic moves to The Graph Network. +**سن رے**: ہوسٹڈ سروس چینز کے لیے سپورٹ کو فعال کریں، بغیر کسی رکاوٹ کے اپ گریڈ فلو کی پیشکش کریں، گراف نیٹ ورک پر مفت پلان پیش کریں۔ +**سن بیم**: اپ گریڈ ونڈو جس میں سب گراف ڈویلپرز کو اپنے سب گرافس کو گراف نیٹ ورک میں اپ گریڈ کرنا ہوگا۔ اس کے آغاز اور طوالت کا جلد اعلان کیا جائے گا۔ +**سن رائز**: ہوسٹڈ سروس اینڈ پوائنٹس کی میعاد ختم ہو جائے گی کیونکہ ٹریفک گراف نیٹ ورک پر منتقل ہو جائے گی. -### Do I need to run my own infrastructure? +### کیا مجھے اپنا انفراسٹرکچر چلانے کی ضرورت ہے؟ -No, all infrastructure is operated by independent Indexers on The Graph Network, including the upgrade Indexer ([read more below](#what-is-an-upgrade-indexer)). +نہیں، تمام انفراسٹرکچر گراف نیٹ ورک پر آزاد انڈیکسرز کے ذریعے چلایا جاتا ہے، بشمول اپ گریڈ انڈیکسر([نیچے مزید پڑھیں](#what-is-an-upgrade-indexer))۔ -You can use the [Subgraph Studio](https://thegraph.com/studio/) to create, test, and publish your subgraph. All hosted service users are encouraged to upgrade their subgraphs to The Graph Network. The upgrade Indexer ensures you can query your subgraph even without curation signal. +آپ اپنا سب گراف بنانے، جانچنے اور شائع کرنے کے لیے [سب گراف سٹوڈیو](https://thegraph.com/studio/) استعمال کر سکتے ہیں۔ تمام ہوسٹڈ سروس صارفین کو حوصلہ افزائی کی جاتی ہے کہ وہ اپنے سب گراف کو گراف نیٹ ورک میں اپ گریڈ کریں۔ اپ گریڈ انڈیکسر یقینی بناتا ہے کہ آپ کیوریشن سگنل کے بغیر بھی اپنے سب گراف سے کیوری کر سکتے ہیں. -Once your subgraph has reached adequate curation signal and other Indexers begin supporting it, the upgrade Indexer will gradually taper off, allowing other Indexers to collect indexing rewards and query fees. +ایک بار جب آپ کا سب گراف مناسب کیوریشن سگنل تک پہنچ جاتا ہے اور دوسرے انڈیکسرز اس کی حمایت کرنا شروع کر دیتے ہیں، تو اپ گریڈ انڈیکسر آہستہ آہستہ ختم ہو جائے گا، جس سے دوسرے انڈیکسرز کو انڈیکسنگ انعامات اور کیوری کی فیسیں جمع کرنے کی اجازت مل جائے گی. -### Should I host my own indexing infrastructure? +### کیا مجھے اپنے انڈیکسنگ انفراسٹرکچر کی میزبانی کرنی چاہئے؟ -Running infrastructure for your own project is [significantly more resource intensive](/network/benefits/) when compared to using The Graph Network. +گراف نیٹ ورک کے استعمال کے مقابلے میں آپ کے اپنے پروجیکٹ کے لیے انفراسٹرکچر چلانا [نمایاں طور پر زیادہ وسائل والا](/network/benefits/) ہے. -Additionally, The Graph Network is significantly more robust, reliable, and cost-efficient than anything provided by a single organization or team. Hundreds of independent Indexers around the world power The Graph Network, ensuring safety, security and redundancy. +مزید برآں، گراف نیٹ ورک کسی ایک تنظیم یا ٹیم کے ذریعہ فراہم کردہ کسی بھی چیز کے مقابلے میں نمایاں طور پر زیادہ مضبوط، قابل اعتماد، اور لاگت سے موثر ہے۔ دنیا بھر میں سیکڑوں آزاد انڈیکسرز گراف نیٹ ورک کو طاقت دیتے ہیں، جو حفاظت، تحفظ اور ریڈینڈینسی کو یقینی بناتے ہیں. -That being said, if you’re still interested in running a [Graph Node](https://github.com/graphprotocol/graph-node), consider joining The Graph Network [as an Indexer](https://thegraph.com/blog/how-to-become-indexer/) to earn indexing rewards and query fees by serving data on your subgraph and others. +یہ کہا جا رہا ہے، اگر آپ ابھی بھی [گراف نوڈ](https://github.com/graphprotocol/graph-node) چلانے میں دلچسپی رکھتے ہیں، تو گراف نیٹ ورک میں شامل ہونے پر غور کریں [بطور انڈیکسر](https://thegraph. com/blog/how-to-become-indexer/) اپنے سب گراف اور دیگر پر ڈیٹا پیش کرکے انڈیکسنگ انعامات اور کیوری کی فیس حاصل کرنے کے لیے. -### Should I use a centralized indexing provider? +### کیا مجھے سینٹرلائزڈ انڈیکسنگ فراہم کنندہ استعمال کرنا چاہیے؟ -If you are building in web3, the moment you use a centralized indexing provider, you are giving them control of your dapp and data. The Graph’s decentralized network offers [superior quality of service](https://thegraph.com/blog/qos-the-graph-network/), reliability with unbeatable uptime thanks to node redundancy, as well as significantly [lower costs](/network/benefits/), and you won’t be held hostage at the data layer. +اگر آپ ویب 3 میں تعمیر کر رہے ہیں، جس لمحے آپ سینٹرلائزڈ انڈیکسنگ فراہم کنندہ استعمال کرتے ہیں، آپ انہیں اپنے ڈیپ اور ڈیٹا کا کنٹرول دے رہے ہیں۔ گراف کا ڈیسینٹرالائزڈ نیٹ ورک پیش کرتا ہے [سروس کا اعلیٰ معیار](https://thegraph.com/blog/qos-the-graph-network/)، ناقابل شکست اپ ٹائم کے ساتھ قابل اعتماد نوڈ ریڈینڈینسی کی بدولت، نیز نمایاں طور پر [کم لاگت](/network/benefits/)، اور آپ کو ڈیٹا لیئر پر ہوسٹیج نہیں بنایا جائے گا. -With The Graph Network, your subgraph is public and anyone can query it openly, which increases the usage and network effects of your dapp. With a centralized indexing solution, the subgraph is private to the centralized provider. +گراف نیٹ ورک کے ساتھ، آپ کا سب گراف عوامی ہے اور کوئی بھی اس سے کھل کر کیوری کر سکتا ہے، جو آپ کے ڈیپ کے استعمال اور نیٹ ورک کے اثرات کو بڑھاتا ہے۔ مرکزی انڈیکسنگ کے حل کے ساتھ، سب گراف مرکزی فراہم کنندہ کے لیے نجی ہے. -Here's a detailed breakdown of the benefits of The Graph over centralized hosting: +سینٹرلائزڈ ہوسٹنگ پر گراف کے فوائد کی تفصیلی بریک ڈاؤن یہ ہے: -- **Resilience and Redundancy**: Decentralized systems are inherently more robust and resilient due to their distributed nature. Data isn't stored on a single server or location. Instead, it's served by hundreds of independent Indexers around the globe. This reduces the risk of data loss or service interruptions if one node fails, leading to exceptional uptime (99.99%). +- **لچک اور ریڈینڈینسی**: ڈیسینٹرالائزڈ نظام اپنی تقسیم شدہ نوعیت کی وجہ سے فطری طور پر زیادہ مضبوط اور لچکدار ہوتے ہیں۔ ڈیٹا کسی ایک سرور یا مقام پر محفوظ نہیں ہوتا ہے۔ اس کے بجائے، یہ دنیا بھر میں سینکڑوں آزاد انڈیکسرز کے ذریعہ پیش کیا جاتا ہے۔ اگر ایک نوڈ ناکام ہو جاتا ہے تو یہ ڈیٹا کے ضائع ہونے یا سروس میں رکاوٹ کا خطرہ کم کرتا ہے، جس سے غیر معمولی اپ ٹائم ہوتا ہے (99.99%). -- **Quality of Service**: In addition to the impressive uptime, The Graph Network features a ~106ms median query speed (latency), and higher query success rates compared to hosted alternatives. Read more in [this blog](https://thegraph.com/blog/qos-the-graph-network/). +- **سروس کا معیار**: متاثر کن اپ ٹائم کے علاوہ، گراف نیٹ ورک میں ~106ms میڈین کیوری کی رفتار (لیٹنسی) اور میزبان متبادل کے مقابلے میں کیوری کی کامیابی کی اعلی شرحیں شامل ہیں۔ مزید پڑھیں [اس بلاگ] میں (https://thegraph.com/blog/qos-the-graph-network/). -- **Censorship Resistance**: Centralized systems can become targets for censorship, either through regulatory pressures or network attacks. In contrast, decentralized systems, due to their dispersed architecture, are much harder to censor, ensuring continuous data availability. +- **سنسرشپ مزاحمت**: مرکزی نظام یا تو ریگولیٹری دباؤ یا نیٹ ورک کے حملوں کے ذریعے، سنسرشپ کے لیے ہدف بن سکتے ہیں۔ اس کے برعکس، ڈیسینٹرالائزڈ نظام، اپنے منتشر فن تعمیر کی وجہ سے، مسلسل ڈیٹا کی دستیابی کو یقینی بناتے ہوئے، سنسر کرنا زیادہ مشکل ہے. -- **Transparency and Trust**: Decentralized systems operate openly, enabling anyone to independently verify the data. This transparency builds trust among network participants, as they can verify the system's integrity without relying on a central authority. +- **شفافیت اور اعتماد**: ڈیسینٹرالائزڈ نظام کھلے عام کام کرتے ہیں، کسی کو بھی آزادانہ طور پر ڈیٹا کی تصدیق کرنے کے قابل بناتے ہیں۔ یہ شفافیت نیٹ ورک کے شرکاء میں اعتماد پیدا کرتی ہے، کیونکہ وہ کسی مرکزی اقتدار پر بھروسہ کیے بغیر سسٹم کی سالمیت کی تصدیق کر سکتے ہیں. -Just as you've chosen your blockchain network for its decentralized nature, security, and transparency, opting for The Graph Network is an extension of those same principles. By aligning your data infrastructure with these values, you ensure a cohesive, resilient, and trust-driven development environment. +جس طرح آپ نے اپنے بلاکچین نیٹ ورک کو اس کی ڈیسینٹرالائزڈ، سیکورٹی اور شفافیت کے لیے منتخب کیا ہے، اسی طرح گراف نیٹ ورک کا انتخاب انہی اصولوں کی توسیع ہے۔ اپنے ڈیٹا انفراسٹرکچر کو ان اقدار کے ساتھ سیدھ میں لا کر، آپ ایک مربوط، لچکدار، اور اعتماد پر مبنی ترقیاتی ماحول کو یقینی بناتے ہیں. -### Will my hosted service subgraph be supported by the upgrade Indexer? +### کیا میرے ہوسٹڈ سروس سب گراف کو اپ گریڈ انڈیکسر کے ذریعے سپورٹ کیا جائے گا؟ -Yes, the upgrade Indexer will support all hosted service subgraphs published to The Graph Network. +ہاں، اپ گریڈ انڈیکسر گراف نیٹ ورک پر شائع ہونے والے تمام ہوسٹڈ سروس سب گرافس کو سپورٹ کرے گا. -However, some subgraphs may not be eligible for indexing rewards, and as a result, may have difficulty attracting further Indexers. For example, indexing rewards may not be available for subgraphs on certain chains. Members from these blockchain communities are encouraged to integrate their chain through the [Chain Integration Process](/chain-integration-overview/). +تاہم، کچھ سب گراف انعامات کی انڈیکسنگ کے اہل نہیں ہو سکتے ہیں، اور اس کے نتیجے میں، مزید انڈیکسرز کو متوجہ کرنے میں دشواری کا سامنا کرنا پڑ سکتا ہے۔ مثال کے طور پر، کچھ چینز پر سب گراف کے لیے انڈیکسنگ کے انعامات دستیاب نہیں ہو سکتے ہیں۔ ان بلاکچین کمیونٹیز کے ممبران کی حوصلہ افزائی کی جاتی ہے کہ وہ اپنی چین کو [چین انٹیگریشن کے عمل](/chain-integration-overview/) کے ذریعے مربوط کریں. -## What is an upgrade Indexer? +## اپ گریڈ انڈیکسر کیا ہے؟ -### What does "upgrade Indexer" mean? +### "اپ گریڈ انڈیکسر" کا کیا مطلب ہے؟ -It is designed to improve the experience of upgrading subgraphs from the hosted service to The Graph Network and supporting new versions of existing subgraphs that have not yet been indexed. +یہ گراف نیٹ ورک میں ہوسٹڈ سروس سے سب گراف کو اپ گریڈ کرنے کے تجربے کو بہتر بنانے اور موجودہ سب گرافس کے نئے ورژن کو سپورٹ کرنے کے لیے ڈیزائن کیا گیا ہے جن کو ابھی تک انڈیکس نہیں کیا گیا ہے. -The upgrade Indexer is aimed at bootstrapping chains that do not yet have indexing rewards on the network, as well as a fallback for new subgraph versions. The goal is to ensure that an Indexer is available to serve queries as quickly as possible after a subgraph is published. +اپ گریڈ انڈیکسر کا غور ان بوٹسٹریپنگ چینز پر ہے جن کے نیٹ ورک پر ابھی تک انڈیکسنگ انعامات نہیں ہیں، نیز سب گراف کے نئے ورژنز کے لیے فال بیک۔ مقصد اس بات کو یقینی بنانا ہے کہ سب گراف شائع ہونے کے بعد جلد از جلد کیوریز پیش کرنے کے لیے ایک انڈیکسر دستیاب ہو. -### What chains will the upgrade Indexer support? +### کون سی چینز انڈیکسر کو اپ گریڈ کریں گی؟ -The upgrade Indexer will support chains that are currently only available on the hosted service. This will include many hosted service subgraphs that have already been synced. +اپ گریڈ انڈیکسر ان چینز کو سپورٹ کرے گا جو فی الحال صرف ہوسٹڈ سروس پر دستیاب ہیں۔ اس میں بہت سے ہوسٹڈ سروس کے سب گراف شامل ہوں گے جو پہلے ہی ہم آہنگ ہو چکے ہیں. -Find a comprehensive list of supported chains [here](/developing/supported-networks/). +معاون چینز کی ایک جامع فہرست [یہاں](/developing/supported-networks/) تلاش کریں. -### Why is Edge & Node running the upgrade Indexer? +### ایج اور نوڈ اپ گریڈ انڈیکسر کیوں چلا رہا ہے؟ -Edge and Node has historically maintained the hosted service and, as a result, has already synced data for hosted service subgraphs. +ایج اور نوڈ نے تاریخی طور پر ہوسٹڈ سروس کو برقرار رکھا ہے اور اس کے نتیجے میں، ہوسٹڈ سروس سب گرافس کے لیے ڈیٹا کو پہلے ہی ہم آہنگ کر دیا ہے۔ -Any and all Indexers are encouraged to become upgrade Indexers as well. However, note that operating an upgrade Indexer is largely provided as a public service to support new subgraphs and additional chains due to the lack of indexing rewards before they are approved by The Graph Council. +کسی بھی اور تمام انڈیکسرز کی حوصلہ افزائی کی جاتی ہے کہ وہ اپ گریڈ انڈیکسرز بھی بن جائیں۔ تاہم، نوٹ کریں کہ گراف کونسل سے منظور ہونے سے پہلے انڈیکسنگ انعامات کی کمی کی وجہ سے نئے سب گراف اور اضافی چینز کو سپورٹ کرنے کے لیے ایک اپ گریڈ انڈیکسر کو چلانا بڑی حد تک عوامی خدمت کے طور پر فراہم کیا جاتا ہے. -### What does this mean for existing Indexers? +### موجودہ انڈیکسرز کے لیے اس کا کیا مطلب ہے؟ -Chains that are currently exclusively supported on the hosted service will be made available to developers on The Graph without indexing rewards at first, though this does unlock query fees for any Indexer that is interested. This is expected to lead to an increase in the number of subgraphs being published on the network, providing more opportunities for Indexers to index and serve these subgraphs in return for query fees, even before indexing rewards are enabled for a chain. +چینز جو فی الحال ہوسٹڈ سروس پر خصوصی طور پر تعاون یافتہ ہیں وہ گراف پر ڈویلپرز کو پہلے انعامات کی انڈیکسنگ کیے بغیر دستیاب کر دی جائیں گی، حالانکہ یہ دلچسپی رکھنے والے کسی بھی انڈیکسر کے لیے کیوری کی فیس کو غیر مقفل کر دیتا ہے۔ اس سے نیٹ ورک پر شائع ہونے والے سب گرافوں کی تعداد میں اضافہ ہونے کی توقع ہے، جو انڈیکسرز کو انڈیکس کرنے کے مزید مواقع فراہم کرے گا اور کیوری کی فیس کے عوض ان سب گرافوں کو پیش کرے گا، یہاں تک کہ چین کے لیے انڈیکسنگ کے انعامات کو فعال کرنے سے پہلے. -The upgrade Indexer also provides the Indexer community with information about potential demand for subgraphs and new chains on The Graph Network. +اپ گریڈ انڈیکسر انڈیکسر کمیونٹی کو گراف نیٹ ورک پر سب گرافس اور نئی چینز کی ممکنہ مانگ کے بارے میں معلومات بھی فراہم کرتا ہے. -### What does this mean for Delegators? +### ڈیلیگیٹرز کے لیے اس کا کیا مطلب ہے؟ -The upgrade Indexer offers a powerful opportunity for Delegators. As more subgraphs are upgraded from the hosted service to The Graph Network, Delegators stand to benefit from the increased network activity. +اپ گریڈ انڈیکسر ڈیلیگیٹرز کے لیے ایک طاقتور موقع فراہم کرتا ہے۔ چونکہ زیادہ سب گراف ہوسٹڈ سروس سے گراف نیٹ ورک میں اپ گریڈ ہوتے ہیں، ڈیلیگیٹرز نیٹ ورک کی بڑھتی ہوئی سرگرمی سے فائدہ اٹھاتے ہیں. -### Will the upgrade Indexer compete with existing Indexers for rewards? +### کیا اپ گریڈ انڈیکسر انعامات کے لیے موجودہ انڈیکسرز کا مقابلہ کرے گا؟ -No, the upgrade Indexer will only allocate the minimum amount per subgraph and will not collect indexing rewards. +نہیں، اپ گریڈ انڈیکسر صرف فی سب گراف کم از کم رقم مختص کرے گا اور انڈیکسنگ انعامات جمع نہیں کرے گا. -It operates on an “as needed” basis, and serves as a fallback until sufficient service quality is achieved by at least 3 other Indexers in the network for respective chains and subgraphs. +یہ "ضرورت کے مطابق" کی بنیاد پر کام کرتا ہے، اور اس وقت تک فال بیک کے طور پر کام کرتا ہے جب تک کہ متعلقہ چینز اور سب گرافس کے لیے نیٹ ورک میں کم از کم 3 دیگر انڈیکسرز کی طرف سے کافی سروس کا معیار حاصل نہ کر لیا جائے. -### How will this affect subgraph developers? +### یہ سب گراف ڈویلپرز کو کیسے متاثر کرے گا؟ -Subgraph developers will be able to query their subgraphs on the network almost immediately after upgrading them from the hosted service or publishing them from the Subgraph Studio, as no lead time will be required for indexing. +سب گراف ڈویلپرز اپنے سب گراف کو ہوسٹڈ سروس سے اپ گریڈ کرنے یا سب گراف سٹوڈیو سے شائع کرنے کے فوراً بعد نیٹ ورک پر کیوری کر سکیں گے، کیونکہ انڈیکسنگ کے لیے لیڈ ٹائم کی ضرورت نہیں ہوگی. -### How does this benefit data consumers? +### اس سے ڈیٹا صارفین کو کیسے فائدہ ہوتا ہے؟ -The upgrade Indexer enables chains on the network that are currently only supported on the hosted service. Therefore, it widens the scope and availability of data that can be queried on the network. +اپ گریڈ انڈیکسر نیٹ ورک پر ان چینز کو قابل بناتا ہے جو فی الحال صرف ہوسٹڈ سروس پر تعاون یافتہ ہیں۔ لہذا، یہ ڈیٹا کی گنجائش اور دستیابی کو وسیع کرتا ہے جس سے نیٹ ورک پر کیوری کیا جا سکتا ہے. -### How will the upgrade Indexer price queries? +### اپ گریڈ انڈیکسر کیوریز کی قیمت کیسے لگائے گا؟ -The upgrade Indexer will price queries at the market rate so as not to influence the query fee market. +اپ گریڈ انڈیکسر مارکیٹ ریٹ پر کیوریز کی قیمت لگائے گا تاکہ کیوری فیس مارکیٹ پر اثر انداز نہ ہو. -### What are the criteria for the upgrade Indexer to stop supporting a subgraph? +### اپ گریڈ انڈیکسر کے سب گراف کو سپورٹ کرنے سے روکنے کے لیے کیا معیار ہیں؟ -The upgrade Indexer will serve a subgraph until it is sufficiently and successfully served with consistent queries served by at least 3 other Indexers. +اپ گریڈ انڈیکسر ایک سب گراف پر کام کرے گا جب تک کہ یہ کم از کم 3 دیگر انڈیکسرز کے ذریعہ پیش کردہ مستقل کیوریز کے ساتھ کافی اور کامیابی کے ساتھ پیش نہیں کیا جاتا ہے. -Furthermore, the upgrade Indexer will stop supporting a subgraph if it has not been queried in the last 30 days. +مزید برآں، اپ گریڈ انڈیکسر سب گراف کو سپورٹ کرنا بند کر دے گا اگر اس سے پچھلے 30 دنوں میں کیوری نہیں کیا گیا ہے. -Other Indexers are incentivized to support subgraphs with ongoing query volume, so the query volume to the upgrade Indexer should trend towards zero because the Indexer will have a small allocation size and other Indexers will be chosen for queries ahead of the upgrade Indexer. +دوسرے انڈیکسرز کو جاری کیوری والیوم کے ساتھ سب گراف کو سپورٹ کرنے کے لیے ترغیب دی جاتی ہے، اس لیے اپ گریڈ انڈیکسر کے لیے کیوری کا حجم صفر کی طرف رجحان ہونا چاہیے کیونکہ انڈیکسر کا مختص کا سائز چھوٹا ہوگا اور دیگر انڈیکسرز کو اپ گریڈ انڈیکسر سے پہلے کیوریز کے لیے منتخب کیا جائے گا. From 40d6e20dfa59bcca4474c1cd5e3e96dcd768923e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:45 -0400 Subject: [PATCH 562/924] New translations querying-with-python.mdx (French) --- .../fr/querying/querying-with-python.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/fr/querying/querying-with-python.mdx b/website/pages/fr/querying/querying-with-python.mdx index 1d32e5719ff1..f4cbbf4d66c7 100644 --- a/website/pages/fr/querying/querying-with-python.mdx +++ b/website/pages/fr/querying/querying-with-python.mdx @@ -2,13 +2,13 @@ title: Query The Graph with Python and Subgrounds --- -Subgrounds is an intuitive Python library for querying subgraphs, built by [Playgrounds](https://playgrounds.network/). It allows you to directly connect subgraph data to a Python data environment, letting you use libraries like [pandas](https://pandas.pydata.org/) to perform data analysis! +Subgrounds est une librairie Python utilisée pour les requêtes Subgraph. Cette librairie a été conçue par [Playgrounds](https://playgrounds.network/). Subgrounds permet de connecter directement les données d'un Subgraph à un environnement de données Python, permettant l'utilisation de librairies comme [pandas](https://pandas.pydata.org/) afin de faire de l'analyse de données! -Subgrounds offers a simple Pythonic API for building GraphQL queries, automates tedious workflows such as pagination, and empowers advanced users through controlled schema transformations. +Subgrounds propose une API Python simplifiée afin de construire des requêtes GraphQL. Subgrounds automatise les workflows fastidieux comme la pagination, et donne aux utilisateurs avancés plus de pouvoir grâce à des transformations de schéma contrôlées. -## Démarrage +## Introduction -Subgrounds requires Python 3.10 or higher and is available on [pypi](https://pypi.org/project/subgrounds/). +Subgrounds nécessite Python 3.10 ou une version ultérieure. Subgrounds est disponible depuis [pypi](https://pypi.org/project/subgrounds/). ```bash pip install --upgrade subgrounds @@ -16,7 +16,7 @@ pip install --upgrade subgrounds python -m pip install --upgrade subgrounds ``` -Once installed, you can test out subgrounds with the following query. The following example grabs a subgraph for the Aave v2 protocol and queries the top 5 markets ordered by TVL (Total Value Locked), selects their name and their TVL (in USD) and returns the data as a pandas [DataFrame](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame). +Une fois installé, vous pouvez tester Subgrounds avec la requête suivante. La requête ci-dessous récupère un Subgraph pour le protocole Aave v2 et interroge les 5 principaux marchés par TVL (Total Value Locked - Valeur Totale Verouillée), sélectionne leur nom et leur TVL (en USD) et renvoie les données sous forme de DataFrame Panda [DataFrame](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame). ```python from subgrounds import Subgrounds @@ -42,15 +42,15 @@ sg.query_df([ ## Documentation -Subgrounds is built and maintained by the [Playgrounds](https://playgrounds.network/) team and can be accessed on the [Playgrounds docs](https://docs.playgrounds.network/subgrounds). +Subgrounds est développé et maintenu par l'équipe de [Playgrounds](https://playgrounds.network/) et est accessible depuis la [documentation de Playgrounds](https://docs.playgrounds.network/subgrounds). -Since subgrounds has a large feature set to explore, here are some helpful starting places: +Étant donné que Subgrounds propose un large éventail de fonctionnalités, voici quelques points de départ utiles : -- [Getting Started with Querying](https://docs.playgrounds.network/subgrounds/getting_started/basics/) - - A good first step for how to build queries with subgrounds. -- [Building Synthetic Fields](https://docs.playgrounds.network/subgrounds/getting_started/synthetic_fields/) - - A gentle introduction to defining synthetic fields that transform data defined from the schema. -- [Concurrent Queries](https://docs.playgrounds.network/subgrounds/getting_started/async/) - - Learn how to level up your queries by parallelizing them. -- [Exporting Data to CSVs](https://docs.playgrounds.network/subgrounds/faq/exporting/) - - A quick article on how to seemlessly save your data as CSVs for further analysis. +- [Commencer avec Querying](https://docs.playgrounds.network/subgrounds/getting_started/basics/) + - Une première étape excellente pour apprendre à construire des requêtes avec Subgrounds. +- [Champs synthétiques](https://docs.playgrounds.network/subgrounds/getting_started/synthetic_fields/) + - Une brève introduction aux champs synthétiques qui transforment vos données à partir du schema. +- [Requêtes concurrentes](https://docs.playgrounds.network/subgrounds/getting_started/async/) + - Améliorez vos requêtes en les parallélisant. +- [Export de données en CSVs](https://docs.playgrounds.network/subgrounds/faq/exporting/) + - Un bref article sur comment sauvegarder vos données sous forme de fichiers CSV en vue d'une analyse ultérieure. From 1c5f7d37f91c4c51a251717c4dcd1be332cfc753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:47 -0400 Subject: [PATCH 563/924] New translations querying-with-python.mdx (Czech) --- .../cs/querying/querying-with-python.mdx | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/website/pages/cs/querying/querying-with-python.mdx b/website/pages/cs/querying/querying-with-python.mdx index 4fb618510070..5d92e1d18aa1 100644 --- a/website/pages/cs/querying/querying-with-python.mdx +++ b/website/pages/cs/querying/querying-with-python.mdx @@ -2,13 +2,13 @@ title: Query The Graph with Python and Subgrounds --- -Subgrounds is an intuitive Python library for querying subgraphs, built by [Playgrounds](https://playgrounds.network/). It allows you to directly connect subgraph data to a Python data environment, letting you use libraries like [pandas](https://pandas.pydata.org/) to perform data analysis! +Subgrounds je intuitivní knihovna Pythonu pro dotazování na podgrafy, vytvořená [Playgrounds](https://playgrounds.network/). Umožňuje přímo připojit data subgrafů k datovému prostředí Pythonu, což vám umožní používat knihovny jako [pandas](https://pandas.pydata.org/) k provádění analýzy dat! -Subgrounds offers a simple Pythonic API for building GraphQL queries, automates tedious workflows such as pagination, and empowers advanced users through controlled schema transformations. +Subgrounds nabízí jednoduché Pythonic API pro vytváření dotazů GraphQL, automatizuje zdlouhavé pracovní postupy, jako je stránkování, a umožňuje pokročilým uživatelům řízené transformace schémat. -## Getting Started +## Začínáme -Subgrounds requires Python 3.10 or higher and is available on [pypi](https://pypi.org/project/subgrounds/). +Subgrounds vyžaduje Python 3.10 nebo vyšší a je k dispozici na [pypi](https://pypi.org/project/subgrounds/). ```bash pip install --upgrade subgrounds @@ -16,41 +16,41 @@ pip install --upgrade subgrounds python -m pip install --upgrade subgrounds ``` -Once installed, you can test out subgrounds with the following query. The following example grabs a subgraph for the Aave v2 protocol and queries the top 5 markets ordered by TVL (Total Value Locked), selects their name and their TVL (in USD) and returns the data as a pandas [DataFrame](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame). +Po instalaci můžete vyzkoušet podklady pomocí následujícího dotazu. Následující příklad uchopí podgraf pro protokol Aave v2 a dotazuje se na 5 největších trhů seřazených podle TVL (Total Value Locked), vybere jejich název a jejich TVL (v USD) a vrátí data jako pandas [DataFrame](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame). ```python from subgrounds import Subgrounds sg = Subgrounds() -# Load the subgraph +# Načtení podgrafu aave_v2 = sg.load_subgraph( "https://api.thegraph.com/subgraphs/name/messari/aave-v2-ethereum") -# Construct the query +# Sestavte dotaz latest_markets = aave_v2.Query.markets( orderBy=aave_v2.Market.totalValueLockedUSD, - orderDirection='desc', + orderDirection="desc", first=5, ) -# Return query to a dataframe +# Vrátit dotaz do datového rámce sg.query_df([ latest_markets.name, latest_markets.totalValueLockedUSD, ]) ``` -## Documentation +## Dokumentace -Subgrounds is built and maintained by the [Playgrounds](https://playgrounds.network/) team and can be accessed on the [Playgrounds docs](https://docs.playgrounds.network/subgrounds). +Subgrounds je vytvořen a spravován týmem [Playgrounds](https://playgrounds.network/) a je k dispozici na stránce [Playgrounds docs](https://docs.playgrounds.network/subgrounds). -Since subgrounds has a large feature set to explore, here are some helpful starting places: +Vzhledem k tomu, že subgrounds má rozsáhlou sadu funkcí, které je třeba prozkoumat, uvádíme několik užitečných výchozích bodů: -- [Getting Started with Querying](https://docs.playgrounds.network/subgrounds/getting_started/basics/) - - A good first step for how to build queries with subgrounds. -- [Building Synthetic Fields](https://docs.playgrounds.network/subgrounds/getting_started/synthetic_fields/) - - A gentle introduction to defining synthetic fields that transform data defined from the schema. -- [Concurrent Queries](https://docs.playgrounds.network/subgrounds/getting_started/async/) - - Learn how to level up your queries by parallelizing them. -- [Exporting Data to CSVs](https://docs.playgrounds.network/subgrounds/faq/exporting/) - - A quick article on how to seemlessly save your data as CSVs for further analysis. +- [Začínáme s dotazováním](https://docs.playgrounds.network/subgrounds/getting_started/basics/) + - Dobrý první krok k tomu, jak vytvářet dotazy s subgrounds. +- [Budování syntetických polí](https://docs.playgrounds.network/subgrounds/getting_started/synthetic_fields/) + - Jemný úvod do definování syntetických polí, která transformují data definovaná ze schématu. +- [Souběžné dotazy](https://docs.playgrounds.network/subgrounds/getting_started/async/) + - Zjistěte, jak zvýšit úroveň dotazů jejich paralelizací. +- [Export dat do CSV](https://docs.playgrounds.network/subgrounds/faq/exporting/) + - Stručný článek o tom, jak bez problémů ukládat data ve formátu CSV pro další analýzu. From 002e9ba7d8da2187783e6cb98515baf39d632db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:48 -0400 Subject: [PATCH 564/924] New translations querying-with-python.mdx (Italian) --- .../it/querying/querying-with-python.mdx | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/website/pages/it/querying/querying-with-python.mdx b/website/pages/it/querying/querying-with-python.mdx index 4fb618510070..bd61ea0350fa 100644 --- a/website/pages/it/querying/querying-with-python.mdx +++ b/website/pages/it/querying/querying-with-python.mdx @@ -2,13 +2,13 @@ title: Query The Graph with Python and Subgrounds --- -Subgrounds is an intuitive Python library for querying subgraphs, built by [Playgrounds](https://playgrounds.network/). It allows you to directly connect subgraph data to a Python data environment, letting you use libraries like [pandas](https://pandas.pydata.org/) to perform data analysis! +Subgrounds è una libreria Python intuitiva per query dei subgraph, realizzata da [Playgrounds](https://playgrounds.network/). Permette di collegare direttamente i dati dei subgraph a un ambiente dati Python, consentendo di utilizzare librerie come [pandas](https://pandas.pydata.org/) per eseguire analisi dei dati! -Subgrounds offers a simple Pythonic API for building GraphQL queries, automates tedious workflows such as pagination, and empowers advanced users through controlled schema transformations. +Subgrounds offre una semplice API Pythonic per la creazione di query GraphQL, automatizza i flussi di lavoro più noiosi come la paginazione, e dà agli utenti avanzati la possibilità di effettuare trasformazioni controllate dello schema. -## Getting Started +## Per cominciare -Subgrounds requires Python 3.10 or higher and is available on [pypi](https://pypi.org/project/subgrounds/). +Subgrounds richiede Python 3.10 o superiore ed è disponibile su [pypi](https://pypi.org/project/subgrounds/). ```bash pip install --upgrade subgrounds @@ -16,41 +16,41 @@ pip install --upgrade subgrounds python -m pip install --upgrade subgrounds ``` -Once installed, you can test out subgrounds with the following query. The following example grabs a subgraph for the Aave v2 protocol and queries the top 5 markets ordered by TVL (Total Value Locked), selects their name and their TVL (in USD) and returns the data as a pandas [DataFrame](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame). +Una volta installato, è possibile testare subgrounds con la seguente query. L'esempio seguente prende un subgraph per il protocollo Aave v2 e effettua query dei primi 5 mercati ordinati per TVL (Total Value Locked), seleziona il loro nome e il loro TVL (in USD) e restituisce i dati come pandas [DataFrame](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame). ```python -from subgrounds import Subgrounds +da subgrounds import Subgrounds sg = Subgrounds() -# Load the subgraph +# Caricare il subgraph aave_v2 = sg.load_subgraph( "https://api.thegraph.com/subgraphs/name/messari/aave-v2-ethereum") -# Construct the query +# Costruire la query latest_markets = aave_v2.Query.markets( orderBy=aave_v2.Market.totalValueLockedUSD, orderDirection='desc', first=5, ) -# Return query to a dataframe +# Restituire la query a un dataframe sg.query_df([ latest_markets.name, latest_markets.totalValueLockedUSD, ]) ``` -## Documentation +## Documentazione -Subgrounds is built and maintained by the [Playgrounds](https://playgrounds.network/) team and can be accessed on the [Playgrounds docs](https://docs.playgrounds.network/subgrounds). +Subgrounds è costruito e mantenuto dal team di [Playgrounds](https://playgrounds.network/) e si può accedere su [Playgrounds docs](https://docs.playgrounds.network/subgrounds). -Since subgrounds has a large feature set to explore, here are some helpful starting places: +Poiché le funzionalità di subgrounds sono numerose e tutte da esplorare, ecco alcuni punti di partenza utili: -- [Getting Started with Querying](https://docs.playgrounds.network/subgrounds/getting_started/basics/) - - A good first step for how to build queries with subgrounds. -- [Building Synthetic Fields](https://docs.playgrounds.network/subgrounds/getting_started/synthetic_fields/) - - A gentle introduction to defining synthetic fields that transform data defined from the schema. -- [Concurrent Queries](https://docs.playgrounds.network/subgrounds/getting_started/async/) - - Learn how to level up your queries by parallelizing them. -- [Exporting Data to CSVs](https://docs.playgrounds.network/subgrounds/faq/exporting/) - - A quick article on how to seemlessly save your data as CSVs for further analysis. +- [Introduzione alle query](https://docs.playgrounds.network/subgrounds/getting_started/basics/) + - Un buon primo passo per costruire le query con subgrounds. +- [Costruire campi sintetici](https://docs.playgrounds.network/subgrounds/getting_started/synthetic_fields/) + - Una leggera introduzione alla definizione di campi sintetici che trasformano i dati definiti dallo schema. +- [Query concorrenti](https://docs.playgrounds.network/subgrounds/getting_started/async/) + - Imparate a migliorare le vostre query parallelizzandole. +- [Esportazione di dati in CSV](https://docs.playgrounds.network/subgrounds/faq/exporting/) + - Un rapido articolo su come salvare senza problemi i dati in formato CSV per ulteriori analisi. From 8879d793067e4e0397e710b5c99d516e3e16b422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:49 -0400 Subject: [PATCH 565/924] New translations querying-with-python.mdx (Japanese) --- .../ja/querying/querying-with-python.mdx | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/website/pages/ja/querying/querying-with-python.mdx b/website/pages/ja/querying/querying-with-python.mdx index d43f1dc51fca..138558a6c06d 100644 --- a/website/pages/ja/querying/querying-with-python.mdx +++ b/website/pages/ja/querying/querying-with-python.mdx @@ -2,55 +2,55 @@ title: Query The Graph with Python and Subgrounds --- -Subgrounds is an intuitive Python library for querying subgraphs, built by [Playgrounds](https://playgrounds.network/). It allows you to directly connect subgraph data to a Python data environment, letting you use libraries like [pandas](https://pandas.pydata.org/) to perform data analysis! +Subgroundsは、[Playgrounds](https://playgrounds.network/)によって構築された、サブグラフをクエリするための直感的なPythonライブラリです。サブグラフデータを直接Pythonデータ環境に接続し、[pandas](https://pandas.pydata.org/)のようなライブラリを使用してデータ分析を行うことができます! -Subgrounds offers a simple Pythonic API for building GraphQL queries, automates tedious workflows such as pagination, and empowers advanced users through controlled schema transformations. +Subgroundsは、GraphQLクエリを構築するためのシンプルなPythonic APIを提供し、ページ分割のような面倒なワークフローを自動化し、制御されたスキーマ変換によって高度なユーザーを支援します。 ## はじめに -Subgrounds requires Python 3.10 or higher and is available on [pypi](https://pypi.org/project/subgrounds/). +SubgroundsはPython 3.10以降を必要とし、[pypi](https://pypi.org/project/subgrounds/)で利用可能です。 ```bash pip install --upgrade subgrounds -# or +# または python -m pip install --upgrade subgrounds ``` -Once installed, you can test out subgrounds with the following query. The following example grabs a subgraph for the Aave v2 protocol and queries the top 5 markets ordered by TVL (Total Value Locked), selects their name and their TVL (in USD) and returns the data as a pandas [DataFrame](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame). +インストールしたら、以下のクエリでsubgroundsを試すことができる。以下の例では、Aave v2 プロトコルのサブグラフを取得し、TVL (Total Value Locked) 順に並べられた上位 5 つの市場をクエリし、その名前と TVL (USD) を選択し、pandas [DataFrame](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame) としてデータを返します。 ```python from subgrounds import Subgrounds sg = Subgrounds() -# Load the subgraph +# サブグラフを読み込む aave_v2 = sg.load_subgraph( "https://api.thegraph.com/subgraphs/name/messari/aave-v2-ethereum") -# Construct the query +# クエリの構築 latest_markets = aave_v2.Query.markets( - orderBy=aave_v2.Market.totalValueLockedUSD, - orderDirection='desc', - first=5, + orderBy=aave_v2.Market.totalValueLockedUSD、 + orderDirection='desc'、 + first=5、 ) -# Return query to a dataframe +# クエリをデータフレームに戻す sg.query_df([ - latest_markets.name, - latest_markets.totalValueLockedUSD, + latest_markets.name、 + latest_markets.totalValueLockedUSD、 ]) ``` -## Documentation +## ドキュメンテーション -Subgrounds is built and maintained by the [Playgrounds](https://playgrounds.network/) team and can be accessed on the [Playgrounds docs](https://docs.playgrounds.network/subgrounds). +Subgroundsは[Playgrounds](https://playgrounds.network/)チームによってビルド、メンテナンスされており、[Playgrounds docs](https://docs.playgrounds.network/subgrounds)からアクセスすることができます。 -Since subgrounds has a large feature set to explore, here are some helpful starting places: +Subgroundsには多くの機能があるので、まずはここから始めましょう: -- [Getting Started with Querying](https://docs.playgrounds.network/subgrounds/getting_started/basics/) - - A good first step for how to build queries with subgrounds. -- [Building Synthetic Fields](https://docs.playgrounds.network/subgrounds/getting_started/synthetic_fields/) - - A gentle introduction to defining synthetic fields that transform data defined from the schema. -- [Concurrent Queries](https://docs.playgrounds.network/subgrounds/getting_started/async/) - - Learn how to level up your queries by parallelizing them. -- [Exporting Data to CSVs](https://docs.playgrounds.network/subgrounds/faq/exporting/) - - A quick article on how to seemlessly save your data as CSVs for further analysis. +- - クエリ入門](https://docs.playgrounds.network/subgrounds/getting_started/basics/) + - - subgroundsでクエリを構築するための最初のステップです。 +- {合成フィールドの構築](https://docs.playgrounds.network/subgrounds/getting_started/synthetic_fields/) + - - スキーマから定義されたデータを変換する合成フィールドの定義をやさしく紹介します。 +- [並行クエリ](https://docs.playgrounds.network/subgrounds/getting_started/async/) + - クエリを並列化することで、クエリをレベルアップする方法を紹介します。 +- [データをCSVにエクスポートする](https://docs.playgrounds.network/subgrounds/faq/exporting/) + - データをCSVとして保存し、さらに分析する方法についての簡単な記事です。 From daf9e623ac045cd104c7bf688d9962c91760b2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:51 -0400 Subject: [PATCH 566/924] New translations querying-with-python.mdx (Portuguese) --- .../pt/querying/querying-with-python.mdx | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/pt/querying/querying-with-python.mdx b/website/pages/pt/querying/querying-with-python.mdx index 78d48af62406..44bf59924307 100644 --- a/website/pages/pt/querying/querying-with-python.mdx +++ b/website/pages/pt/querying/querying-with-python.mdx @@ -2,55 +2,55 @@ title: Query The Graph with Python and Subgrounds --- -Subgrounds is an intuitive Python library for querying subgraphs, built by [Playgrounds](https://playgrounds.network/). It allows you to directly connect subgraph data to a Python data environment, letting you use libraries like [pandas](https://pandas.pydata.org/) to perform data analysis! +Subgrounds é uma biblioteca intuitiva em Python para a construção de subgraphs, construída pela [Playgrounds](https://playgrounds.network/). Ela permite-lhe conectar diretamente dados de subgraph a um ambiente de dados em Python e usar bibliotecas como [pandas](https://pandas.pydata.org/) para realizar análises de dados! -Subgrounds offers a simple Pythonic API for building GraphQL queries, automates tedious workflows such as pagination, and empowers advanced users through controlled schema transformations. +O Subgrounds oferece uma API simples para a construção de queries em GraphQL, automatiza fluxos de trabalho entediantes, como a paginação, e empodera utilizadores avançados via transformações controladas de schema. ## Como Começar -Subgrounds requires Python 3.10 or higher and is available on [pypi](https://pypi.org/project/subgrounds/). +O Subgrounds requer Python 3.10 ou maior, e está disponível no [pypi](https://pypi.org/project/subgrounds/). ```bash pip install --upgrade subgrounds -# or +# ou python -m pip install --upgrade subgrounds ``` -Once installed, you can test out subgrounds with the following query. The following example grabs a subgraph for the Aave v2 protocol and queries the top 5 markets ordered by TVL (Total Value Locked), selects their name and their TVL (in USD) and returns the data as a pandas [DataFrame](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame). +Quando instalado, você pode testar o subgrounds com o seguinte query. O exemplo a seguir coleta um subgraph do protocolo Aave v2 e realiza queries para os 5 maiores mercados ordenados por valor total bloqueado, seleciona os seus nomes e o seu VTB (em USD) e retorna os dados como um [DataFrame](https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame) em pandas. ```python from subgrounds import Subgrounds sg = Subgrounds() -# Load the subgraph +# Carrega o subgraph aave_v2 = sg.load_subgraph( "https://api.thegraph.com/subgraphs/name/messari/aave-v2-ethereum") -# Construct the query +# Constrói o query latest_markets = aave_v2.Query.markets( orderBy=aave_v2.Market.totalValueLockedUSD, orderDirection='desc', first=5, ) -# Return query to a dataframe +# Retorna o query a um quadro de dados sg.query_df([ latest_markets.name, latest_markets.totalValueLockedUSD, ]) ``` -## Documentation +## Documentação -Subgrounds is built and maintained by the [Playgrounds](https://playgrounds.network/) team and can be accessed on the [Playgrounds docs](https://docs.playgrounds.network/subgrounds). +O Subgrounds é construído e mantido pela [Playgrounds](https://playgrounds.network/) e pode ser acessado na [documentação do Playgrounds](https://docs.playgrounds.network/subgrounds). -Since subgrounds has a large feature set to explore, here are some helpful starting places: +Como o subgrounds tem um grande conjunto de recursos para explorar, aqui estão alguns pontos úteis de início: -- [Getting Started with Querying](https://docs.playgrounds.network/subgrounds/getting_started/basics/) - - A good first step for how to build queries with subgrounds. -- [Building Synthetic Fields](https://docs.playgrounds.network/subgrounds/getting_started/synthetic_fields/) - - A gentle introduction to defining synthetic fields that transform data defined from the schema. -- [Concurrent Queries](https://docs.playgrounds.network/subgrounds/getting_started/async/) - - Learn how to level up your queries by parallelizing them. -- [Exporting Data to CSVs](https://docs.playgrounds.network/subgrounds/faq/exporting/) - - A quick article on how to seemlessly save your data as CSVs for further analysis. +- [Começando com Querying](https://docs.playgrounds.network/subgrounds/getting_started/basics/) + - Um bom primeiro passo para construir queries com subgrounds. +- [Construção de Campos Sintéticos](https://docs.playgrounds.network/subgrounds/getting_started/synthetic_fields/) + - Uma introdução suave para a definição de campos sintéticos que transformam dados definidos do schema. +- [Queries Concorrentes](https://docs.playgrounds.network/subgrounds/getting_started/async/) + - Aprenda como subir o nível das suas queries ao paralelizá-las. +- [Exportação de Dados em CSVs](https://docs.playgrounds.network/subgrounds/faq/exporting/) + - Um artigo rápido sobre como salvar os seus dados como CSVs para análise futura. From b96972fa0a63a86704ee7e37042bf96e4d830183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:58 -0400 Subject: [PATCH 567/924] New translations common-issues.mdx (Arabic) --- website/pages/ar/developing/graph-ts/common-issues.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ar/developing/graph-ts/common-issues.mdx b/website/pages/ar/developing/graph-ts/common-issues.mdx index b8af1bf4d691..e71839295d94 100644 --- a/website/pages/ar/developing/graph-ts/common-issues.mdx +++ b/website/pages/ar/developing/graph-ts/common-issues.mdx @@ -2,7 +2,7 @@ title: مشاكل شائعة في أسمبلي سكريبت (AssemblyScript) --- -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: +هناك بعض مشاكل [أسمبلي سكريبت](https://github.com/AssemblyScript/assemblyscript) المحددة، التي من الشائع الوقوع فيها أثتاء تطوير غرافٍ فرعي. وهي تتراوح في صعوبة تصحيح الأخطاء، ومع ذلك، فإنّ إدراكها قد يساعد. وفيما يلي قائمة غير شاملة لهذه المشاكل: -- متغيرات الفئات الخاصة (Private) في [AssembyScript] \(https://www.assemblyscript.org/status.html#language-features) غير مفروضة بشكل كامل. ليس هناك طريقة لحماية متغيرات الفئات من التعديل المباشر من كائن الفئة. +- متغيرات الفئات الخاصة (Private) في [AssembyScript] (https://www.assemblyscript.org/status.html#language-features) غير مفروضة بشكل كامل. ليس هناك طريقة لحماية متغيرات الفئات من التعديل المباشر من كائن الفئة. - لا يتم توريث النطاق في [دوال الإغلاق](https://www.assemblyscript.org/status.html#on-closures)، أي لا يمكن استخدام المتغيرات المعلنة خارج دوال الإغلاق. الشرح في [ النقاط الهامة للمطورين #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). From 65cc29aefb210f7801c993fdd9be1f7cdd83fec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:16:59 -0400 Subject: [PATCH 568/924] New translations common-issues.mdx (Czech) --- website/pages/cs/developing/graph-ts/common-issues.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/cs/developing/graph-ts/common-issues.mdx b/website/pages/cs/developing/graph-ts/common-issues.mdx index 5b99efa8f493..8bc8119212bd 100644 --- a/website/pages/cs/developing/graph-ts/common-issues.mdx +++ b/website/pages/cs/developing/graph-ts/common-issues.mdx @@ -1,8 +1,8 @@ --- -title: Common AssemblyScript Issues +title: Běžné problémy se AssemblyScript --- -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: +Při vývoji podgrafů se často vyskytují určité problémy [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Jejich obtížnost při ladění je různá, nicméně jejich znalost může pomoci. Následuje neúplný seznam těchto problémů: -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). +- Proměnné třídy `Private` nejsou v [AssembyScript](https://www.assemblyscript.org/status.html#language-features) vynucovány. Neexistuje žádný způsob, jak chránit proměnné třídy před přímou změnou z objektu třídy. +- Rozsah se nedědí do [uzavíracích funkcí](https://www.assemblyscript.org/status.html#on-closures), tj. proměnné deklarované mimo uzavírací funkce nelze použít. Vysvětlení v [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). From c009f8d2efaccc61e525e239c1382d915a4f1ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:03 -0400 Subject: [PATCH 569/924] New translations common-issues.mdx (Italian) --- website/pages/it/developing/graph-ts/common-issues.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/it/developing/graph-ts/common-issues.mdx b/website/pages/it/developing/graph-ts/common-issues.mdx index 5b99efa8f493..541344663535 100644 --- a/website/pages/it/developing/graph-ts/common-issues.mdx +++ b/website/pages/it/developing/graph-ts/common-issues.mdx @@ -1,8 +1,8 @@ --- -title: Common AssemblyScript Issues +title: Problemi comuni di AssemblyScript --- -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: +Ci sono alcuni problemi [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) in cui è comune imbattersi durante lo sviluppo di subgraph. La loro difficoltà di debug è variabile, ma conoscerli può essere d'aiuto. Quello che segue è un elenco non esaustivo di questi problemi: -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). +- Le variabili di classe `Private` non sono applicate in [AssembyScript] (https://www.assemblyscript.org/status.html#language-features). Non c'è modo di proteggere le variabili di classe dalla modifica diretta dell'oggetto classe. +- L'ambito non è ereditato nelle [closure functions](https://www.assemblyscript.org/status.html#on-closures), cioè le variabili dichiarate al di fuori delle closure functions non possono essere utilizzate. Spiegazione in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). From 24d9a4dee10a16233f4f6c78a0ccc9d28f6dff10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:03 -0400 Subject: [PATCH 570/924] New translations common-issues.mdx (Japanese) --- website/pages/ja/developing/graph-ts/common-issues.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/ja/developing/graph-ts/common-issues.mdx b/website/pages/ja/developing/graph-ts/common-issues.mdx index 261c8f3d6a8e..b9f329351035 100644 --- a/website/pages/ja/developing/graph-ts/common-issues.mdx +++ b/website/pages/ja/developing/graph-ts/common-issues.mdx @@ -2,7 +2,7 @@ title: AssemblyScriptのよくある問題 --- -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: +AssemblyScript](https://github.com/AssemblyScript/assemblyscript)には、サブグラフの開発中によく遭遇する問題があります。これらの問題は、デバッグの難易度に幅がありますが、認識しておくと役に立つかもしれません。以下は、これらの問題の非網羅的なリストです: -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). +- AssembyScript](https://www.assemblyscript.org/status.html#language-features) では `Private` クラス変数は強制されません。クラス変数がクラスオブジェクトから直接変更されないようにする方法はありません。 +- スコープは[クロージャー関数](https://www.assemblyscript.org/status.html#on-closures)には継承されません。つまり、クロージャー関数の外で宣言された変数は使用できません。Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s)に説明があります。 From 098c634552c1e0d06ddbe883bff8ded2f12e5632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:09 -0400 Subject: [PATCH 571/924] New translations common-issues.mdx (Portuguese) --- website/pages/pt/developing/graph-ts/common-issues.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/pt/developing/graph-ts/common-issues.mdx b/website/pages/pt/developing/graph-ts/common-issues.mdx index 71b16d033656..01b21940efdb 100644 --- a/website/pages/pt/developing/graph-ts/common-issues.mdx +++ b/website/pages/pt/developing/graph-ts/common-issues.mdx @@ -2,7 +2,7 @@ title: Problemas Comuns no AssemblyScript --- -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: +É comum encontrar certos problemas no [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) durante o desenvolvimento do subgraph. Eles variam em dificuldade de debug, mas vale ter consciência deles. A seguir, uma lista não exaustiva destes problemas: -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). +- Variáveis de classe `Private` não são aplicadas no [AssemblyScript](https://www.assemblyscript.org/status.html#language-features). Não há como evitar que estas variáveis sejam alteradas diretamente a partir do objeto de classe. +- O escopo não é herdado em [funções de closure](https://www.assemblyscript.org/status.html#on-closures), por ex., não é possível usar variáveis declaradas fora de funções de closure. Há uma explicação [neste vídeo](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). From aefc3cc94d354a8dac28de406621ea61a2b40814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:11 -0400 Subject: [PATCH 572/924] New translations common-issues.mdx (Turkish) --- website/pages/tr/developing/graph-ts/common-issues.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/tr/developing/graph-ts/common-issues.mdx b/website/pages/tr/developing/graph-ts/common-issues.mdx index 892ab40dce7f..a6f984fdf0c4 100644 --- a/website/pages/tr/developing/graph-ts/common-issues.mdx +++ b/website/pages/tr/developing/graph-ts/common-issues.mdx @@ -2,7 +2,7 @@ title: Genel AssemblyScript Sorunları --- -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: +Subgraph geliştirme sırasında sıklıkla karşılaşılan belirli [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) sorunları vardır. Hata ayıklama zorluklarında değişiklik gösterirler ancak bunların farkında olmak yardımcı olabilir. Aşağıda bu sorunların kapsamlı olmayan bir listesi bulunmaktadır: -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). +- "Özel" sınıf değişkenleri [AssembyScript](https://www.assemblyscript.org/status.html#language-features) içinde zorunlu kılınmaz. Sınıf değişkenlerini doğrudan sınıf nesnesinden değiştirilmekten korumanın bir yolu yoktur. +- Kapsam, [kapatma işlevleri](https://www.assemblyscript.org/status.html#on-closes) devralınmaz, yani kapatma işlevlerinin dışında bildirilen değişkenler kullanılamaz. [Geliştiricinin Öne Çıkan Noktaları #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s) bölümündeki açıklamaya göz atabilirsiniz. From 5a5c8c426c51e6eeb5aa6c0054e3bf3636022f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:13 -0400 Subject: [PATCH 573/924] New translations common-issues.mdx (Chinese Simplified) --- website/pages/zh/developing/graph-ts/common-issues.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/zh/developing/graph-ts/common-issues.mdx b/website/pages/zh/developing/graph-ts/common-issues.mdx index ae7c7b6a4787..7eb8c874b075 100644 --- a/website/pages/zh/developing/graph-ts/common-issues.mdx +++ b/website/pages/zh/developing/graph-ts/common-issues.mdx @@ -2,7 +2,7 @@ title: AssemblyScript的常见问题 --- -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: +在子图开发过程中,常常会遇到某些 AssemblyScript 问题。它们在调试难度范围内,但是,意识到它们可能会有所帮助。以下是这些问题的非详尽清单: - `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. - Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). From 0784c18e8aca1234f0c7e2a95c2a569930725624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:16 -0400 Subject: [PATCH 574/924] New translations api.mdx (Romanian) --- website/pages/ro/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/ro/developing/graph-ts/api.mdx b/website/pages/ro/developing/graph-ts/api.mdx index 45bfad8f7bfb..ab5e2b27b49e 100644 --- a/website/pages/ro/developing/graph-ts/api.mdx +++ b/website/pages/ro/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() There are two ways to update an existing entity: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Changing properties is straight forward in most cases, thanks to the generated property setters: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From d3b7a26c5869c2420e9f2963f77022504100077b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:17 -0400 Subject: [PATCH 575/924] New translations api.mdx (French) --- website/pages/fr/developing/graph-ts/api.mdx | 293 ++++++++++--------- 1 file changed, 147 insertions(+), 146 deletions(-) diff --git a/website/pages/fr/developing/graph-ts/api.mdx b/website/pages/fr/developing/graph-ts/api.mdx index a45e92e0cc8e..b13a30605e61 100644 --- a/website/pages/fr/developing/graph-ts/api.mdx +++ b/website/pages/fr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Notes de version | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Notes de version | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Types intégrés @@ -72,7 +72,7 @@ _Operators_ #### BigDecimal ```typescript -importer { BigDecimal } depuis '@graphprotocol/graph-ts' +import { BigDecimal } from '@graphprotocol/graph-ts' ``` `BigDecimal` is used to represent arbitrary precision decimals. @@ -159,7 +159,7 @@ _Math_ #### TypedMap ```typescript -import { TypedMap } du '@graphprotocol/graph-ts' +import { TypedMap } from '@graphprotocol/graph-ts' ``` `TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). @@ -175,7 +175,7 @@ The `TypedMap` class has the following API: #### Octets ```typescript -importez { Bytes } du '@graphprotocol/graph-ts' +import { Bytes } from '@graphprotocol/graph-ts' ``` `Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. @@ -214,7 +214,7 @@ It adds the following method on top of the `Bytes` API: ### Store API ```typescript -importer { store } depuis '@graphprotocol/graph-ts' +import { store } from '@graphprotocol/graph-ts' ``` The `store` API allows to load, save and remove entities from and to the Graph Node store. @@ -226,25 +226,26 @@ Entities written to the store map one-to-one to the `@entity` types defined in t Ce qui suit est un modèle courant pour créer des entités à partir d’événements Ethereum. ```typescript -// Importer la classe d'événement Transfer générée à partir de l'ABI ERC20 -import { Transférer en tant que TransferEvent } depuis '../generated/ERC20/ERC20' +// Importer la classe Transfer générée à partir de l'ABI ERC20 +import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' // Importer le type d'entité Transfer généré à partir du schéma GraphQL -importer {Transférer} depuis '../generated/schema' +import { Transfer } from '../generated/schema' -// Gestionnaire d'événements de transfert -fonction d'exportation handleTransfer (événement : TransferEvent) : void { - // Créez une entité de transfert, en utilisant le hachage de transaction comme ID d'entité - laissez id = event.transaction.hash - let transfer = nouveau transfert (id) +// Gestionnaire d'événement Transfer +export function handleTransfer(event: TransferEvent): void { + // Créer une entité Transfer, en utilisant le hash de la transaction comme ID de l'entité + let id = event.transaction.hash + let transfer = new Transfer(id) - // Définir les propriétés de l'entité, en utilisant les paramètres de l'événement - transfert.from = event.params.from - transfert.to = event.params.to - transfert.montant = event.params.montant + // Définir les propriétés sur l'entité, en utilisant les paramètres de l'événement + transfer.from = event.params.from + transfer.to = event.params.to + transfer.amount = event.params.amount - // Enregistre l'entité dans le magasin - transfert.save() + // Sauvegarder l'entité dans le stockage + transfer.save() +} ``` When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. @@ -256,13 +257,13 @@ Chaque entité doit avoir un identifiant unique pour éviter les collisions avec Si une entité existe déjà, elle peut être chargée depuis le magasin avec les éléments suivants : ```typescript -let id = event.transaction.hash // ou quelle que soit la manière dont l'ID est construit -laisser transférer = Transfer.load (id) -si (transfert == null) { - transfert = nouveau transfert (id) +let id = event.transaction.hash // ou selon la manière dont l'ID est construit +let transfer = Transfer.load(id) +if (transfer == null) { + transfer = new Transfer(id) } -// Utiliser l'entité Transfer comme avant +// Utiliser l'entité Transfer comme précédemment ``` As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. @@ -276,13 +277,13 @@ As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotoco L'API du magasin facilite la récupération des entités créées ou mises à jour dans le bloc actuel. Une situation typique est qu'un gestionnaire crée une transaction à partir d'un événement en chaîne et qu'un gestionnaire ultérieur souhaite accéder à cette transaction si elle existe. Dans le cas où la transaction n'existe pas, le ubgraph devra se rendre dans la base de données juste pour découvrir que l'entité n'existe pas ; si l'auteur du subgraph sait déjà que l'entité doit avoir été créée dans le même bloc, l'utilisation de loadInBlock évite cet aller-retour dans la base de données. Pour certains subgraphs, ces recherches manquées peuvent contribuer de manière significative au temps d'indexation. ```typescript -let id = event.transaction.hash // ou quelle que soit la manière dont l'ID est construit -laisser transférer = Transfer.loadInBlock (id) -si (transfert == null) { - transfert = nouveau transfert (id) +let id = event.transaction.hash // ou de toute autre manière dont l'ID est construit +let transfer = Transfer.loadInBlock(id) +if (transfer == null) { + transfer = new Transfer(id) } -// Utiliser l'entité Transfer comme avant +// Utiliser l'entité Transfer comme auparavant ``` > Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. @@ -294,32 +295,32 @@ As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotoco Cela permet de charger des champs d'entités dérivés à partir d'un gestionnaire d'événements. Par exemple, étant donné le schéma suivant : ```graphql -tapez Jeton @entité { - je l'ai fait! - titulaire : Titulaire ! - couleur: Ficelle +type Token @entity { + id: ID! + holder: Holder! + color: String } -tapez Titulaire @entity { - je l'ai fait! - jetons : [Jeton !] ! @derivedFrom(champ : "titulaire") +type Holder @entity { + id: ID! + tokens: [Token!]! @derivedFrom(field: "holder") } ``` The following code will load the `Token` entity that the `Holder` entity was derived from: ```typescript -laissez titulaire = Holder.load('test-id') -// Charge les entités Token associées à un détenteur donné -laissez les jetons = titulaire.tokens.load() +let holder = Holder.load('test-id') +// Charger les entités Token associées à un détenteur donné +let tokens = holder.tokens.load() ``` #### Mise à jour des entités existantes Il existe deux manières de mettre à jour une entité existante : -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. La modification des propriétés est simple dans la plupart des cas, grâce aux paramètres de propriétés générés : @@ -343,14 +344,14 @@ Updating array properties is a little more involved, as the getting an array fro ```typescript // Cela ne fonctionnera pas -entité.numéros.push(BigInt.fromI32(1)) -entité.save() +entity.numbers.push(BigInt.fromI32(1)) +entity.save() // Cela fonctionnera -laissez les nombres = entité.numéros -nombres.push(BigInt.fromI32(1)) -entité.numéros = nombres -entité.save() +let numbers = entity.numbers +numbers.push(BigInt.fromI32(1)) +entity.numbers = numbers +entity.save() ``` #### Supprimer des entités du magasin @@ -478,17 +479,17 @@ The code generated by `graph codegen` also includes classes for the smart contra Un modèle courant consiste à accéder au contrat dont provient un événement. Ceci est réalisé avec le code suivant : ```typescript -// Importer la classe de contrat générée et la classe d'événement de transfert générée -importer {{ ERC20Contract, Transfer as TransferEvent } depuis '../generated/ERC20Contract/ERC20Contract' +// Importer la classe de contrat générée et la classe d'événement Transfer générée +import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' // Importer la classe d'entité générée -importer { Transfer } depuis '../generated/schema' +import { Transfer } from '../generated/schema' -fonction d'exportation handleTransfer (événement : TransferEvent) { - // Lier le contrat à l'adresse qui a émis l'événement - laissez contrat = ERC20Contract.bind (event.address) +export function handleTransfer(event: TransferEvent) { + // Lier le contrat à l'adresse qui a émis l'événement + let contract = ERC20Contract.bind(event.address) - // Accédez aux variables d'état et aux fonctions en les appelant - laissez erc20Symbol = contract.symbol() + // Accéder aux variables d'état et aux fonctions en les appelant + let erc20Symbol = contract.symbol() } ``` @@ -503,12 +504,12 @@ Tout autre contrat faisant partie du subgraph peut être importé à partir du c If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: ```typescript -laissez gravité = Gravity.bind (event.address) -laissez callResult = gravitation.try_gravatarToOwner (gravatar) +let gravity = Gravity.bind(event.address) +let callResult = gravity.try_gravatarToOwner(gravatar) if (callResult.reverted) { - log.info('getGravatar annulé', []) -} autre { - laisser le propriétaire = callResult.value + log.info('getGravatar a été annulé', []) +} else { + let owner = callResult.value } ``` @@ -542,7 +543,7 @@ Pour plus d'informations: ### Logging API ```typescript -importer { log } du '@graphprotocol/graph-ts' +import { log } from '@graphprotocol/graph-ts' ``` The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. @@ -568,11 +569,12 @@ log.info('Message à afficher : {}, {}, {}', [value.toString(), anotherValue.to In the example below, the string value "A" is passed into an array to become`['A']` before being logged: ```typescript -laissez maValeur = 'A' +let myValue = 'A' -fonction d'exportation handleSomeEvent (événement : SomeEvent) : void { - // Affiche : "Ma valeur est : A" - log.info('Ma valeur est : {}', [myValue]) +export function handleSomeEvent(event: SomeEvent): void { + // Affiche : "Ma valeur est : A" + log.info('Ma valeur est : {}', [myValue]) +} ``` ##### Journalisation d'une seule entrée à partir d'un tableau existant @@ -580,11 +582,11 @@ fonction d'exportation handleSomeEvent (événement : SomeEvent) : void { Dans l'exemple ci-dessous, seule la première valeur du tableau d'arguments est journalisée, bien que le tableau contienne trois valeurs. ```typescript -laissez monTableau = ['A', 'B', 'C'] +let myArray = ['A', 'B', 'C'] -fonction d'exportation handleSomeEvent (événement : SomeEvent) : void { - // Affiche : "Ma valeur est : A" (Même si trois valeurs sont passées à `log.info`) - log.info('Ma valeur est : {}', myArray) +export function handleSomeEvent(event: SomeEvent): void { + // Affiche : "Ma valeur est : A" (Même si trois valeurs sont passées à `log.info`) + log.info('Ma valeur est : {}', myArray) } ``` @@ -593,11 +595,11 @@ fonction d'exportation handleSomeEvent (événement : SomeEvent) : void { Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. ```typescript -laissez monTableau = ['A', 'B', 'C'] +let myArray = ['A', 'B', 'C'] -fonction d'exportation handleSomeEvent (événement : SomeEvent) : void { - // Affiche : "Ma première valeur est : A, la deuxième valeur est : B, la troisième valeur est : C" - log.info('Ma première valeur est : {}, la deuxième valeur est : {}, la troisième valeur est : {}', myArray) +export function handleSomeEvent(event: SomeEvent): void { + // Affiche : "Ma première valeur est : A, la deuxième valeur est : B, la troisième valeur est : C" + log.info('Ma première valeur est : {}, la deuxième valeur est : {}, la troisième valeur est : {}', myArray) } ``` @@ -606,9 +608,9 @@ fonction d'exportation handleSomeEvent (événement : SomeEvent) : void { Pour afficher une valeur spécifique dans le tableau, la valeur indexée doit être fournie. ```typescript -fonction d'exportation handleSomeEvent (événement : SomeEvent) : void { - // Affiche : "Ma troisième valeur est C" - log.info('Ma troisième valeur est : {}', [myArray[2]]) +export function handleSomeEvent(event: SomeEvent): void { + // Affiche : "Ma troisième valeur est C" + log.info('Ma troisième valeur est : {}', [myArray[2]]) } ``` @@ -620,7 +622,7 @@ L'exemple ci-dessous enregistre le numéro de bloc, le hachage de bloc et le hac import { log } from '@graphprotocol/graph-ts' export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ + log.debug('Numéro de bloc : {}, hachage de bloc : {}, hachage de transaction : {}', [ event.block.number.toString(), // "47596000" event.block.hash.toHexString(), // "0x..." event.transaction.hash.toHexString(), // "0x..." @@ -631,7 +633,7 @@ export function handleSomeEvent(event: SomeEvent): void { ### IPFS API ```typescript -importer { ipfs } du '@graphprotocol/graph-ts' +import { ipfs } from '@graphprotocol/graph-ts' ``` Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. @@ -639,14 +641,14 @@ Smart contracts occasionally anchor IPFS files on chain. This allows mappings to Étant donné un hachage ou un chemin IPFS, la lecture d'un fichier depuis IPFS se fait comme suit : ```typescript -// Place cela dans un gestionnaire d'événements dans le mappage -laissez hachage = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -laissez data = ipfs.cat (hachage) +// Mettez ceci à l'intérieur d'un gestionnaire d'événements dans le mapping +let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' +let data = ipfs.cat(hash) -// Chemins comme `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` +// Les chemins comme `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` // qui incluent des fichiers dans des répertoires sont également pris en charge -laissez chemin = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -laissez data = ipfs.cat (chemin) +let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' +let data = ipfs.cat(path) ``` **Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. @@ -654,31 +656,30 @@ laissez data = ipfs.cat (chemin) It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: ```typescript -importer { JSONValue, Value } depuis '@graphprotocol/graph-ts' +import { JSONValue, Value } from '@graphprotocol/graph-ts' -fonction d'exportation processItem (valeur : JSONValue, userData : valeur) : void { - // Voir la documentation JSONValue pour plus de détails sur la gestion - // avec des valeurs JSON - laissez obj = valeur.toObject() - laissez id = obj.get('id') - laissez titre = obj.get('titre') +export function processItem(value: JSONValue, userData: Value): void { + // Voir la documentation JSONValue pour les détails sur le traitement + // des valeurs JSON + let obj = value.toObject() + let id = obj.get('id') + let title = obj.get('title') - si (!id || !titre) { - { + if (!id || !title) { return } - // Les rappels peuvent également créer des entités - laissez newItem = nouvel élément (id) - newItem.title = titre.toString() - newitem.parent = userData.toString() // Définit le parent sur "parentId" - newitem.save() + // Les callbacks peuvent également créer des entités + let newItem = new Item(id) + newItem.title = title.toString() + newItem.parent = userData.toString() // Définit le parent à "parentId" + newItem.save() } -// Place cela dans un gestionnaire d'événements dans le mappage +// Mettez ceci à l'intérieur d'un gestionnaire d'événements dans le mapping ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) -// Vous pouvez également utiliser `ipfs.mapJSON` +// Alternativement, utilisez `ipfs.mapJSON` ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) ``` @@ -689,7 +690,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes ### Crypto API ```typescript -importer { crypto } du '@graphprotocol/graph-ts' +import { crypto } from '@graphprotocol/graph-ts' ``` The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: @@ -733,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Référence des conversions de types -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Métadonnées de la source de données From bfc3fcda1160338bab73c354f95609d9895eedfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:18 -0400 Subject: [PATCH 576/924] New translations api.mdx (Spanish) --- website/pages/es/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/es/developing/graph-ts/api.mdx b/website/pages/es/developing/graph-ts/api.mdx index 61ce2ad0ffc6..6ff9e20f8926 100644 --- a/website/pages/es/developing/graph-ts/api.mdx +++ b/website/pages/es/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Notas del lanzamiento | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Notas del lanzamiento | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Tipos Incorporados @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() Hay dos maneras de actualizar una entidad existente: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Cambiar las propiedades es sencillo en la mayoría de los casos, gracias a los definidores de propiedades generados: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Referencias de Tipo de Conversiones -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadatos de la Fuente de Datos From 3b00b4103e1089ba24cd667ce0bc199c31766d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:19 -0400 Subject: [PATCH 577/924] New translations api.mdx (Arabic) --- website/pages/ar/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/ar/developing/graph-ts/api.mdx b/website/pages/ar/developing/graph-ts/api.mdx index e7893f15fbb3..add87572e5df 100644 --- a/website/pages/ar/developing/graph-ts/api.mdx +++ b/website/pages/ar/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| الاصدار | ملاحظات الإصدار | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| الاصدار | ملاحظات الإصدار | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### الأنواع المضمنة (Built-in) @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() There are two ways to update an existing entity: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Changing properties is straight forward in most cases, thanks to the generated property setters: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### مرجع تحويلات الأنواع -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### البيانات الوصفية لمصدر البيانات From 61fe9a6eb4cee2885b3821b94a7285c971a0cc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:20 -0400 Subject: [PATCH 578/924] New translations api.mdx (Czech) --- website/pages/cs/developing/graph-ts/api.mdx | 516 +++++++++---------- 1 file changed, 258 insertions(+), 258 deletions(-) diff --git a/website/pages/cs/developing/graph-ts/api.mdx b/website/pages/cs/developing/graph-ts/api.mdx index 45bfad8f7bfb..0d3e6b33310e 100644 --- a/website/pages/cs/developing/graph-ts/api.mdx +++ b/website/pages/cs/developing/graph-ts/api.mdx @@ -2,45 +2,45 @@ title: AssemblyScript API --- -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) +> Poznámka: pokud jste vytvořili subgraf před verzí `graph-cli`/`graph-ts` `0.22.0`, používáte starší verzi jazyka AssemblyScript, doporučujeme se podívat do [`Migration Guide`](/release-notes/assemblyscript-migration-guide) -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: +Tato stránka dokumentuje, jaké vestavěné API lze použít při psaní mapování podgrafů. Dva druhy API jsou k dispozici hned po vybalení: -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. +- [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) a +- kód generovaný ze souborů podgrafů pomocí `graph codegen`. -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. +Jako závislosti je možné přidat i další knihovny, pokud jsou kompatibilní s [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Vzhledem k tomu, že mapování je psáno v tomto jazyce, je [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) dobrým zdrojem informací o funkcích jazyka a standardních knihoven. -## API Reference +## Reference API -The `@graphprotocol/graph-ts` library provides the following APIs: +Knihovna `@graphprotocol/graph-ts` poskytuje následující API: -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. +- API `ethereum` pro práci s inteligentními kontrakty Ethereum, událostmi, bloky, transakcemi a hodnotami Ethereum. +- API `store` pro načítání a ukládání entit z a do úložiště Graf uzel. +- API `log` pro protokolování zpráv na výstupu uzlu Graph a v Průzkumníku grafu. +- API `ipfs` pro načítání souborů ze IPFS. +- API `json` pro rozbor dat JSON. +- API `crypto` pro použití kryptografických funkcí. +- Nízkoúrovňové primitivy pro překlad mezi různými typovými systémy, jako je Ethereum, JSON, GraphQL a AssemblyScript. -### Versions +### Verze -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. +`apiVersion` v manifestu podgrafu určuje verzi mapovacího API, kterou pro daný podgraf používá uzel Graf. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Verze | Poznámky vydání | +| :---: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Přidání tříd `TransactionReceipt` a `Log` do typů Ethereum\<0/Přidání pole `receipt` do objektu Ethereum událost | +| 0.0.6 | Přidáno pole `nonce` do objektu Ethereum Transaction
    Přidáno `baseFeePerGas` do objektu Ethereum bloku | +| 0.0.5 | AssemblyScript povýšen na verzi 0.19.10 (obsahuje rozbíjející změny, viz [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` přejmenováno na `ethereum.transaction.gasLimit` | +| 0.0.4 | Přidání pole `functionSignature` do objektu Ethereum SmartContractCall | +| 0.0.3 | Do objektu Ethereum Call přidáno pole `from`
    `etherem.call.address` přejmenováno na `ethereum.call.to` | +| 0.0.2 | Přidání pole `input` do objektu Ethereum Transackce | -### Built-in Types +### Vestavěné typy -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). +Dokumentaci k základním typům zabudovaným do jazyka AssemblyScript najdete na [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). -The following additional types are provided by `@graphprotocol/graph-ts`. +Následující doplňkové typy poskytuje `@graphprotocol/graph-ts`. #### ByteArray @@ -48,26 +48,26 @@ The following additional types are provided by `@graphprotocol/graph-ts`. import { ByteArray } from '@graphprotocol/graph-ts' ``` -`ByteArray` represents an array of `u8`. +`ByteArray` představuje pole `u8`. _Construction_ -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. +- `fromI32(x: i32): ByteArray` - Rozebrat `x` na bajty. +- `fromHexString(hex: string): - Vstupní délka musí být sudá. Předpona `0x\` je nepovinná. _Type conversions_ -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. +- `toHexString(): string` - Převede na hexadecimální řetězec s předponou `0x`. +- `toString(): string` - čte bajty jako řetězec UTF-8. +- `toBase58(): string` - Zakóduje bajty do řetězce base58. +- `toU32(): u32` - Interpretuje bajty jako little-endian `u32`. Hodí v případě přetečení. +- `toI32(): i32` - Interpretuje pole bajtů jako little-endian `i32`. V případě přetečení hází. _Operators_ -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` +- `equals(y: ByteArray): bool` – lze zapsat jako`x == y`. +- `concat(other: ByteArray) : ByteArray` - vrátí nové `ByteArray` složené z `this` přímo následované `other` +- `concatI32(other: i32) : ByteArray` - vrátí nové `ByteArray` složené z `this` přímo následované bytovou reprezentací `other` #### BigDecimal @@ -75,32 +75,32 @@ _Operators_ import { BigDecimal } from '@graphprotocol/graph-ts' ``` -`BigDecimal` is used to represent arbitrary precision decimals. +\`BigDecimal se používá k reprezentaci libovolně přesných desetinných míst. -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. +> Poznámka: [Interně](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` je uložen ve formátu [IEEE-754 decimal128 s plovoucí desetinnou čárkou](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), který podporuje 34 desetinných číslic significand. Proto je `BigDecimal` nevhodný pro reprezentaci typů s pevnou desetinnou čárkou, které mohou mít větší rozsah než 34 číslic, jako je například Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) nebo ekvivalent. _Construction_ -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. +- `constructor(bigInt: BigInt)` - vytvoří `BigDecimal` z `BigInt`. - `static fromString(s: string): BigDecimal` – parses from a decimal string. _Type conversions_ -- `toString(): string` – prints to a decimal string. +- `toString(): string` - vypisuje do desetinného řetězce. _Math_ -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. +- `plus(y: BigDecimal): BigDecimal` – lze zapsat jako `x + y`. +- `minus(y: BigDecimal): BigDecimal` – lze zapsat jako `x - y`. +- `times(y: BigDecimal): BigDecimal` – lze zapsat jako `x * y`. +- `div(y: BigDecimal): BigDecimal` – lze zapsat jako`x / y`. +- `equals(y: BigDecimal): bool` – lze zapsat jako`x == y`. - `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. +- `lt(y: BigDecimal): bool` – lze zapsat jako`x < y`. +- `le(y: BigDecimal): bool` – lze zapsat jako `x <= y`. +- `gt(y: BigDecimal): bool` – lze zapsat jako `x > y`. +- `ge(y: BigDecimal): bool` – lze zapsat jako `x >= y`. +- `neg(): BigDecimal - lze zapsat jako -x`. #### BigInt @@ -108,53 +108,53 @@ _Math_ import { BigInt } from '@graphprotocol/graph-ts' ``` -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. +`BigInt` se používá k reprezentaci velkých celých čísel. Patří sem hodnoty Etherea typu `uint32` až `uint256` a `int64` až `int256`. Vše pod `uint32`, jako například `uint32`, `uint24` nebo `uint8`, je reprezentováno jako `i32`. -The `BigInt` class has the following API: +Třída `BigInt` má následující API: _Construction_ -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. +- `BigInt.fromI32(x: i32): BigInt` - vytvoří `BigInt` z `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. +- `BigInt.fromString(s: string): BigInt`- Zpracuje `BigInt` z řetězce. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromUnsignedBytes(x: Bytes): - Interpretuje `bytes`jako celé číslo bez znaménka, little-endian. Pokud je váš vstup big-endian, zavolejte nejprve`.reverse()\`. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromSignedBytes(x: Bytes): - Interpretuje `bytes`jako celé číslo se znaménkem, little-endian. Pokud je váš vstup big-endian, zavolejte nejprve`.reverse()\`. _Type conversions_ -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. +- `x.toHex(): string` - změní `BigInt` na řetězec hexadecimálních znaků. -- `x.toString(): string` – turns `BigInt` into a decimal number string. +- `x.toString(): string` - změní `BigInt` na řetězec desetinných čísel. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. +- `x.toI32(): i32` - vrátí `BigInt` jako `i32`; selže, pokud se hodnota nevejde do `i32`. Je dobré nejprve zkontrolovat `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. +- `x.toBigDecimal(): BigDecimal` - převede na desetinné číslo bez zlomkové části. _Math_ -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. +- `x.plus(y: BigInt): BigInt` – lze zapsat jako `x + y`. +- `x.minus(y: BigInt): BigInt` – lze zapsat jako `x - y`. +- `x.times(y: BigInt): BigInt` – lze zapsat jako `x * y`. +- `x.div(y: BigInt): BigInt` – lze zapsat jako `x / y`. +- `x.mod(y: BigInt): BigInt` – lze zapsat jako `x % y`. +- `x.equals(y: BigInt): bool` – lze zapsat jako `x == y`. +- `x.notEqual(y: BigInt): bool` –lze zapsat jako `x != y`. +- `x.lt(y: BigInt): bool` – lze zapsat jako `x < y`. +- `x.le(y: BigInt): bool` – lze zapsat jako `x <= y`. +- `x.gt(y: BigInt): bool` – lze zapsat jako `x > y`. +- `x.ge(y: BigInt): bool` – lze zapsat jako `x >= y`. +- `x.neg(): BigInt` – lze zapsat jako `-x`. +- `x.divDecimal(y: BigDecimal): BigDecimal` – dělí desetinným číslem, čímž získá desetinný výsledek. +- `x.isZero(): bool` – Slouží ke kontrole, zda je číslo rovno nule. +- `x.isI32(): bool` – Zjistí, zda se číslo vejde do `i32`. +- `x.abs(): BigInt` – absolutní hodnota. +- `x.pow(exp: u8): BigInt` – umocňování. +- `bitOr(x: BigInt, y: BigInt): BigInt` – lze zapsat jako `x | y`. +- `bitAnd(x: BigInt, y: BigInt): BigInt` – lze zapsat jako `x & y`. +- `leftShift(x: BigInt, bits: u8): BigInt` – lze zapsat jako `x << y`. +- `rightShift(x: BigInt, bits: u8): BigInt` – lze zapsat jako `x >> y`. #### TypedMap @@ -162,119 +162,119 @@ _Math_ import { TypedMap } from '@graphprotocol/graph-ts' ``` -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). +`TypedMap` lze použít k ukládání dvojic klíč-hodnota. Viz [tento příklad](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). -The `TypedMap` class has the following API: +Třída `TypedMap` má následující API: -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not +- `new TypedMap()` – vytvoří prázdnou mapu s klíči typu `K` a hodnotami typu`V` +- `map.set(key: K, value: V): void` – nastaví hodnotu `key` na `value` +- `map.getEntry(key: K): TypedMapEntry | null` – vrátí dvojici klíč-hodnota pro `key` nebo `null`, pokud `key` v mapě neexistuje +- `map.get(key: K): V | null` – vrací hodnotu pro `key` nebo `null`, pokud `key` v mapě neexistuje +- `map.isSet(key: K): bool` – vrací `true`, pokud `klíč` v mapě existuje, a `false`, pokud ne -#### Bytes +#### Bajtů ```typescript import { Bytes } from '@graphprotocol/graph-ts' ``` -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. +`Bytes` se používá k reprezentaci libovolně dlouhých polí bajtů. Patří sem hodnoty Ethereum typu `bytes`, `bytes32` atd. -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: +Třída `Bytes` rozšiřuje třídu AssemblyScript [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) a podporuje všechny funkce třídy `Uint8Array` a navíc následující nové metody: _Construction_ -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes +- `fromHexString(hex: string) : Bytes` - Převede řetězec `hex`, který se musí skládat ze sudého počtu hexadecimálních číslic, na `ByteArray`. Řetězec `hex` může volitelně začínat znakem `0x` +- `fromI32(i: i32) : Bytes` - Převod `i` na pole bajtů _Type conversions_ -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) +- `b.toHex()` – vrací hexadecimální řetězec reprezentující bajty v poli +- `b.toString()` – převede bajty v poli na řetězec unicode znaků +- `b.toBase58()` –změní hodnotu Ethereum Bytes na kódování base58 (používá se pro IPFS hashe) _Operators_ -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` +- `b.concat(other: Bytes) : Bytes` - - "Vrátit nový `Bytes` skládající se z `this`, který je přímo následován `other`." +- `b.concatI32(other: i32) : ByteArray` - vrátí nový `Bytes` složený z `this` přímo následovaný bajtovou reprezentací `other` -#### Address +#### Adresa ```typescript import { Address } from '@graphprotocol/graph-ts' ``` -`Address` extends `Bytes` to represent Ethereum `address` values. +`Address` rozšiřuje `Bytes` pro reprezentaci hodnot `adresa` Ethereum. -It adds the following method on top of the `Bytes` API: +Přidává následující metodu nad API `Bytes`: -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error +- `Address.fromString(s: string): Address` - vytvoří `Address` z hexadecimálního řetězce +- `Address.fromBytes(b: Bytes): Adresa` - vytvoří `Adresu` z `b`, která musí být dlouhá přesně 20 bajtů. Předání hodnoty s menším nebo větším počtem bajtů bude mít za následek chybu -### Store API +### API ukládat ```typescript import { store } from '@graphprotocol/graph-ts' ``` -The `store` API allows to load, save and remove entities from and to the Graph Node store. +API `store` umožňuje načítat, ukládat a odebírat entity z a do úložiště Graf uzel. -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. +Entity zapsané do úložiště se mapují jedna ku jedné na typy `@entity` definované ve schématu GraphQL podgrafu. Pro pohodlnou práci s těmito entitami generuje příkaz `graph codegen`, který poskytuje [Graph CLI](https://github.com/graphprotocol/graph-cli), třídy entit, které jsou podtřídami vestavěného typu `Entity`, s gettery a settery vlastností pro pole ve schématu a také s metodami pro načítání a ukládání těchto entit. -#### Creating entities +#### Vytváření entity -The following is a common pattern for creating entities from Ethereum events. +Následuje běžný vzor pro vytváření entity z událostí Ethereum. ```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' +// Importovat třídu události Transfer vygenerovanou z ERC20 ABI +import { Transfer as TransferEvent } z '../generated/ERC20/ERC20' -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' +// Importovat typ entity Transfer vygenerovaný ze schématu GraphQL +import { Transfer } z '../generated/schema' -// Transfer event handler +// Obsluha události Transfer export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID + // Vytvoří entitu Transfer s použitím hashe transakce jako ID entity let id = event.transaction.hash let transfer = new Transfer(id) - // Set properties on the entity, using the event parameters + // Nastavte vlastnosti entity pomocí parametrů události transfer.from = event.params.from transfer.to = event.params.to transfer.amount = event.params.amount - // Save the entity to the store + // Uložení entity do úložiště transfer.save() } ``` -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. +Pokud se při zpracování řetězce vyskytne událost `Transfer`, je předána obsluze události `handleTransfer` pomocí vygenerovaného typu `Transfer` (zde alias `TransferEvent`, aby nedošlo ke konfliktu názvů s typem entity). Tento typ umožňuje přístup k datům, jako je nadřazená transakce události a její parametr. -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. +Každá entita musí mít jedinečné ID, aby nedocházelo ke kolizím s jinými entitami. Je poměrně běžné, že parametry událostí obsahují jedinečný identifikátor, který lze použít. Poznámka: Použití hashe transakce jako ID předpokládá, že žádné jiné události ve stejné transakci nevytvářejí entity s tímto hashem jako ID. -#### Loading entities from the store +#### Načítání entity z úložiště -If an entity already exists, it can be loaded from the store with the following: +Pokud již entita existuje, lze ji z úložiště načíst pomocí následujících příkazů: ```typescript -let id = event.transaction.hash // or however the ID is constructed +let id = event.transaction.hash // nebo jakkoli je ID konstruováno let transfer = Transfer.load(id) if (transfer == null) { transfer = new Transfer(id) } -// Use the Transfer entity as before +// Použijte entitu Transfer jako dříve ``` -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. +Protože entita ještě nemusí v ukládat existovat, metoda `load` vrátí hodnotu typu `Transfer | null`. Proto může být nutné před použitím hodnoty zkontrolovat, zda se nejedná o případ `null`. -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. +> **Poznámka:** Načtení entit je nutné pouze v případě, že změny provedené v mapování závisí na předchozích datech entity. Dva způsoby aktualizace existujících entit naleznete v následující části. -#### Looking up entities created withing a block +#### Vyhledávání entit vytvořených v rámci bloku -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. +Od verzí `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 a `@graphprotocol/graph-cli` v0.49.0 je metoda `loadInBlock` dostupná pro všechny typy entit. -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. +API úložiště usnadňuje načítání entit, které byly vytvořeny nebo aktualizovány v aktuálním bloku. Typickou situací je, že jeden obslužný program vytvoří transakci z nějaké události v řetězci a pozdější obslužný program chce k této transakci přistupovat, pokud existuje. V případě, že transakce neexistuje, bude muset podgraf jít do databáze, jen aby zjistil, že entita neexistuje; pokud autor podgrafu již ví, že entita musela být vytvořena v tomtéž bloku, použitím funkce loadInBlock se této okružní cestě do databáze vyhne. U některých podgrafů mohou tato zmeškaná vyhledávání významně přispět k prodloužení doby indexace. ```typescript let id = event.transaction.hash // or however the ID is constructed @@ -286,13 +286,13 @@ if (transfer == null) { // Use the Transfer entity as before ``` -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. +> Poznámka: Pokud v daném bloku není vytvořena žádná entita, vrátí `loadInBlock` hodnotu `null`, i když v úložišti existuje entita s daným ID. -#### Looking up derived entities +#### Vyhledávání odvozených entity -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. +Od verzí `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 a `@graphprotocol/graph-cli` v0.51.0 je k dispozici metoda `loadRelated`. -This enables loading derived entity fields from within an event handler. For example, given the following schema: +To umožňuje načítání odvozených polí entityh z obsluhy události. Například při následujícím schématu: ```graphql type Token @entity { @@ -307,22 +307,22 @@ type Holder @entity { } ``` -The following code will load the `Token` entity that the `Holder` entity was derived from: +Následující kód načte entitu `Token`, ze které byla odvozena entita `Holder`: ```typescript let holder = Holder.load('test-id') -// Load the Token entities associated with a given holder +// Načtení entit tokenů přidružených k danému držiteli let tokens = holder.tokens.load() ``` -#### Updating existing entities +#### Aktualizace stávajících entity -There are two ways to update an existing entity: +Existují dva způsoby, jak aktualizovat existující entity: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Načtěte entitu např. pomocí `Transfer.load(id)`, nastavte vlastnosti entity a poté ji `.save()` uložte zpět do úložiště. +2. Jednoduše vytvořte entitu např. pomocí `new Transfer(id)`, nastavte vlastnosti entity a poté ji `.save()` uložte do úložiště. Pokud entita již existuje, změny se do ní sloučí. -Changing properties is straight forward in most cases, thanks to the generated property setters: +Změna vlastností je ve většině případů jednoduchá díky generovaným nastavovačům vlastností: ```typescript let transfer = new Transfer(id) @@ -331,32 +331,32 @@ transfer.to = ... transfer.amount = ... ``` -It is also possible to unset properties with one of the following two instructions: +Vlastnosti lze také zrušit jedním z následujících dvou příkazů: ```typescript transfer.from.unset() transfer.from = null ``` -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. +To funguje pouze u nepovinných vlastností, tj. vlastností, které jsou v jazyce GraphQL deklarovány bez znaku `!`. Dva příklady: `owner: Bytes` nebo `amount: BigInt`. -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. +Aktualizace vlastností pole je trochu složitější, protože získání pole z entity vytvoří kopii tohoto pole. To znamená, že vlastnosti pole je třeba po změně pole znovu explicitně nastavit. Následující příklad předpokládá, že `entita` má `čísla: [BigInt!]!` pole. ```typescript -// This won't work +// Tohle nebude fungovat entity.numbers.push(BigInt.fromI32(1)) entity.save() -// This will work +// Toto bude fungovat let numbers = entity.numbers numbers.push(BigInt.fromI32(1)) entity.numbers = numbers entity.save() ``` -#### Removing entities from the store +#### Odstranění entit z úložiště -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: +V současné době není možné odstranit entitu prostřednictvím generovaných typů. Místo toho je pro odstranění entity nutné předat název typu entity a ID entity příkazu `store.remove`: ```typescript import { store } from '@graphprotocol/graph-ts' @@ -367,15 +367,15 @@ store.remove('Transfer', id) ### Ethereum API -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. +Ethereum API poskytuje přístup k inteligentním smlouvám, veřejným stavovým proměnným, funkcím smluv, událostem, transakcím, blokům a kódování/dekódování dat Etherea. -#### Support for Ethereum Types +#### Podpora typů Ethereum -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. +Stejně jako u entit generuje `graph codegen` třídy pro všechny inteligentní smlouvy a události používané v podgrafu. Za tímto účelem musí být ABI kontraktu součástí zdroje dat v manifestu podgrafu. Obvykle jsou soubory ABI uloženy ve složce `abis/`. -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. +Ve vygenerovaných třídách probíhají konverze mezi typy Ethereum [built-in-types](#built-in-types) v pozadí, takže se o ně autoři podgraf nemusí starat. -The following example illustrates this. Given a subgraph schema like +To ilustruje následující příklad. Je dáno schéma podgrafu, jako je ```graphql type Transfer @entity { @@ -386,7 +386,7 @@ type Transfer @entity { } ``` -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: +a podpis události `Transfer(address,address,uint256)` na platformě Ethereum jsou hodnoty `from`, `to` a `amount` typu `adresa`, `adresa` a `uint256` převedeny na `Address` a `BigInt`, což umožňuje jejich předání do vlastností `Bytes!` a `BigInt!` entity `Transfer`: ```typescript let id = event.transaction.hash @@ -397,9 +397,9 @@ transfer.amount = event.params.amount transfer.save() ``` -#### Events and Block/Transaction Data +#### Události a bloková/transakční data -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): +Události Ethereum předávané obsluze událostí, jako je událost `Transfer` v předchozích příkladech, poskytují přístup nejen k parametrům události, ale také k nadřazené transakci a bloku, jehož jsou součástí. Z instancí `event` (tyto třídy jsou součástí modulu `ethereum` v `graph-ts`) lze získat následující údaje: ```typescript class Event { @@ -472,36 +472,36 @@ class Log { } ``` -#### Access to Smart Contract State +#### Přístup ke stavu inteligentní smlouvy -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. +Kód vygenerovaný nástrojem `graph codegen` obsahuje také třídy pro inteligentní smlouvy používané v podgrafu. Ty lze použít k přístupu k veřejným stavovým proměnným a k volání funkcí kontraktu v aktuálním bloku. -A common pattern is to access the contract from which an event originates. This is achieved with the following code: +Běžným vzorem je přístup ke smlouvě, ze které událost pochází. Toho lze dosáhnout pomocí následujícího kódu: ```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' +// Import vygenerované třídy smlouvy a vygenerované třídy události Transfer +import { ERC20Contract, Transfer as TransferEvent } z '../generated/ERC20Contract/ERC20Contract' +// Importovat vygenerovanou třídu entit +import { Transfer } z "../generated/schema export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event + // Vázat smlouvu na adresu, která událost vyslala let contract = ERC20Contract.bind(event.address) - // Access state variables and functions by calling them + // Přístup ke stavovým proměnným a funkcím jejich voláním let erc20Symbol = contract.symbol() } ``` -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type +`Transfer` je zde aliasován na `TransferEvent`, aby nedošlo ke konfliktu názvů s typ entity -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. +Pokud má smlouva `ERC20Contract` na platformě Ethereum veřejnou funkci pouze pro čtení s názvem `symbol`, lze ji volat pomocí `.symbol()`. Pro veřejné stavové proměnné se automaticky vytvoří metoda se stejným názvem. -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. +Jakákoli jiná smlouva, která je součástí podgrafu, může být importována z vygenerovaného kódu a může být svázána s platnou adresou. -#### Handling Reverted Calls +#### Zpracování vrácených volání -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: +Pokud se metody vaší smlouvy určené pouze pro čtení mohou vrátit, měli byste to řešit voláním vygenerované metody smlouvy s předponou `try_`. Například kontrakt Gravity vystavuje metodu `gravatarToOwner`. Tento kód by byl schopen zvládnout revert v této metodě: ```typescript let gravity = Gravity.bind(event.address) @@ -513,11 +513,11 @@ if (callResult.reverted) { } ``` -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. +Všimněte si, že uzel Graf připojený ke klientovi Geth nebo Infura nemusí detekovat všechny reverty, pokud na to spoléháte, doporučujeme použít uzel Graf připojený ke klientovi Parity. -#### Encoding/Decoding ABI +#### Kódování/dekódování ABI -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. +Data lze kódovat a dekódovat podle formátu kódování ABI Ethereum pomocí funkcí `encode` a `decode` v modulu `ethereum`. ```typescript import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' @@ -534,11 +534,11 @@ let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! let decoded = ethereum.decode('(address,uint256)', encoded) ``` -For more information: +Více informací: - [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) - Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). +- Více [složitý příklad](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). ### Logging API @@ -546,27 +546,27 @@ For more information: import { log } from '@graphprotocol/graph-ts' ``` -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. +API `log` umožňuje dílčím grafům zaznamenávat informace do standardního výstupu uzlu Graf uzel a do Průzkumníka grafů. Zprávy lze protokolovat pomocí různých úrovní protokolu. Pro sestavení zpráv protokolu z argumentu je k dispozici základní syntaxe formátovacího řetězce. -The `log` API includes the following functions: +`log` API obsahuje následující funkce: -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. +- `log.debug(fmt: string, args: Array): void` - zaznamená ladicí zprávu. +- `log.info(fmt: string, args: Array): void` - zaznamená informační zprávu. +- `log.warning(fmt: string, args: Array): void` - zaznamená varování. +- `log.error(fmt: string, args: Array): void` - zaznamená chybovou zprávu. +- `log.critical(fmt: string, args: Array): void` - zaznamená kritickou zprávu _a_ ukončí podgraf. -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. +`log` API přebírá formátovací řetězec a pole řetězcových hodnot. Poté nahradí zástupné symboly řetězcovými hodnotami z pole. První zástupný symbol „{}“ bude nahrazen první hodnotou v poli, druhý zástupný symbol „{}“ bude nahrazen druhou hodnotou a tak dále. ```typescript log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) ``` -#### Logging one or more values +#### Zaznamenávání jedné nebo více hodnot -##### Logging a single value +##### Zaznamenávání jedné hodnoty -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: +V níže uvedeném příkladu je řetězcová hodnota "A" předána do pole a stane se z ní `['A']`, než je zapsána: ```typescript let myValue = 'A' @@ -577,9 +577,9 @@ export function handleSomeEvent(event: SomeEvent): void { } ``` -##### Logging a single entry from an existing array +##### Protokolování jedné položky z existujícího pole -In the example below, only the first value of the argument array is logged, despite the array containing three values. +V příkladu níže je zaznamenána pouze první hodnota pole argumentů, přestože pole obsahuje tři hodnoty. ```typescript let myArray = ['A', 'B', 'C'] @@ -590,7 +590,7 @@ export function handleSomeEvent(event: SomeEvent): void { } ``` -#### Logging multiple entries from an existing array +#### Protokolování více záznamů z existujícího pole Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. @@ -614,9 +614,9 @@ export function handleSomeEvent(event: SomeEvent): void { } ``` -##### Logging event information +##### Zaznamenávání informací o událostech -The example below logs the block number, block hash and transaction hash from an event: +Níže uvedený příklad zaznamenává číslo bloku, hash bloku a hash transakce z události: ```typescript import { log } from '@graphprotocol/graph-ts' @@ -636,31 +636,31 @@ export function handleSomeEvent(event: SomeEvent): void { import { ipfs } from '@graphprotocol/graph-ts' ``` -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. +Chytré smlouvy příležitostně ukotvují soubory IPFS v řetězci. To umožňuje mapování získat hashe IPFS ze smlouvy a načíst odpovídající soubory z IPFS. Data souborů budou vrácena jako `Bajty`, což obvykle vyžaduje další zpracování, např. pomocí API `json` zdokumentovaného později na této stránce. -Given an IPFS hash or path, reading a file from IPFS is done as follows: +Při zadání hashe nebo cesty IPFS se čtení souboru ze systému IPFS provádí následujícím způsobem: ```typescript -// Put this inside an event handler in the mapping +// Vložte to do obsluhy události v mapování let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' let data = ipfs.cat(hash) -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported +// Cesty jako `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` +// které obsahují soubory v adresářích, jsou také podporovány let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) +let data = ipfs.cat(cesta) ``` -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. +**Poznámka:** `ipfs.cat` není v současné době deterministický. Pokud se soubor nepodaří načíst přes síť IPFS před vypršením požadavku, vrátí se `null`. Z tohoto důvodu se vždy vyplatí zkontrolovat výsledek na `null`. -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: +Pomocí nástroje `ipfs.map` je také možné zpracovávat větší soubory proudovým způsobem. Funkce očekává hash nebo cestu k souboru IPFS, název zpětného volání a příznaky pro úpravu chování: ```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' +import { JSONValue, Value } z '@graphprotocol/graph-ts' export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values + // Podrobnosti o zpracování viz dokumentace k JSONValue + // s hodnotami JSON let obj = value.toObject() let id = obj.get('id') let title = obj.get('title') @@ -669,23 +669,23 @@ export function processItem(value: JSONValue, userData: Value): void { return } - // Callbacks can also created entities + // Callbacky mohou také vytvářet entity let newItem = new Item(id) newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" + newitem.parent = userData.toString() // Nastavit rodiče na "parentId" newitem.save() } -// Put this inside an event handler in the mapping +// Toto vložte do obsluhy události v mapování ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) -// Alternatively, use `ipfs.mapJSON` +// Případně použijte `ipfs.mapJSON` ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) ``` -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. +V současné době je podporován pouze příznak `json`, který musí být předán souboru `ipfs.map`. S příznakem `json` se soubor IPFS musí skládat z řady hodnot JSON, jedna hodnota na řádek. Volání příkazu `ipfs.map` přečte každý řádek souboru, deserializuje jej do hodnoty `JSONValue` a pro každou z nich zavolá zpětné volání. Zpětné volání pak může použít operace entit k uložení dat z `JSONValue`. Změny entit se uloží až po úspěšném ukončení obsluhy, která volala `ipfs.map`; do té doby se uchovávají v paměti, a velikost souboru, který může `ipfs.map` zpracovat, je proto omezená. -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. +Při úspěchu vrátí `ipfs.map` hodnotu `void`. Pokud vyvolání zpětného volání způsobí chybu, obslužná rutina, která vyvolala `ipfs.map`, se přeruší a podgraf se označí jako neúspěšný. ### Crypto API @@ -693,7 +693,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes import { crypto } from '@graphprotocol/graph-ts' ``` -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: +API `crypto` zpřístupňuje kryptografické funkce pro použití v mapování. Nyní je k dispozici pouze jedna: - `crypto.keccak256(input: ByteArray): ByteArray` @@ -703,14 +703,14 @@ The `crypto` API makes a cryptographic functions available for use in mappings. import { json, JSONValueKind } from '@graphprotocol/graph-ts' ``` -JSON data can be parsed using the `json` API: +Data JSON lze analyzovat pomocí API `json`: -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed +- `json.fromBytes(data: Bytes): JSONValue` - analyzuje data JSON z pole `Bytes` interpretovaného jako platná posloupnost UTF-8 +- `json.try_fromBytes(data: Bytes): Výsledek` - bezpečná verze `json.fromBytes`, vrací chybovou variantu, pokud se parsování nezdařilo +- `json.fromString(data: string): JSONValue` - analyzuje data JSON z platného UTF-8 `Řetězce` +- `json.try_fromString(data: string): Výsledek` - bezpečná verze `json.fromString`, vrací chybovou variantu, pokud se parsování nezdařilo -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: +Třída `JSONValue` poskytuje způsob, jak vytáhnout hodnoty z libovolného dokumentu JSON. Protože hodnoty JSON mohou být logické, číselné, pole a další, je `JSONValue` vybavena vlastností `kind` pro kontrolu typu hodnoty: ```typescript let value = json.fromBytes(...) @@ -719,59 +719,59 @@ if (value.kind == JSONValueKind.BOOL) { } ``` -In addition, there is a method to check if the value is `null`: +Kromě toho existuje metoda pro kontrolu, zda je hodnota `null`: - `value.isNull(): boolean` -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: +Pokud je typ hodnoty jistý, lze ji převést na [vestavěný typ](#built-in-types) pomocí jedné z následujících metod: - `value.toBool(): boolean` - `value.toI64(): i64` - `value.toF64(): f64` - `value.toBigInt(): BigInt` - `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +- `value.toArray(): Array` - (a poté převést `JSONValue` pomocí jedné z 5 výše uvedených metod) + +### Převody typů Reference + +| Zdroj(e) | Destinace | Funkce převodu | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From 8abe970db0687ff17414ad57ab3b3a471955ea15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:21 -0400 Subject: [PATCH 579/924] New translations api.mdx (German) --- website/pages/de/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/de/developing/graph-ts/api.mdx b/website/pages/de/developing/graph-ts/api.mdx index eaff2f178d6a..d1c8233ee2d2 100644 --- a/website/pages/de/developing/graph-ts/api.mdx +++ b/website/pages/de/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() There are two ways to update an existing entity: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Changing properties is straight forward in most cases, thanks to the generated property setters: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From 926883494b9407e3d1f806eb84c0deceeced7a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:22 -0400 Subject: [PATCH 580/924] New translations api.mdx (Italian) --- website/pages/it/developing/graph-ts/api.mdx | 506 +++++++++---------- 1 file changed, 253 insertions(+), 253 deletions(-) diff --git a/website/pages/it/developing/graph-ts/api.mdx b/website/pages/it/developing/graph-ts/api.mdx index 45bfad8f7bfb..a8fc15bea20c 100644 --- a/website/pages/it/developing/graph-ts/api.mdx +++ b/website/pages/it/developing/graph-ts/api.mdx @@ -1,73 +1,73 @@ --- -title: AssemblyScript API +title: API AssemblyScript --- -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) +> Nota: se si hai creato un subgraph prima di `graph-cli`/`graph-ts` versione `0.22.0`, stai usando una versione precedente di AssemblyScript. Consigliamo di dare un'occhiata alla [`Guida alla migrazione`](/release-notes/assemblyscript-migration-guide) -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: +Questa pagina documenta quali API integrate possono essere utilizzate per scrivere mappature di subgraph. Sono disponibili due tipi di API: -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. +- la [libreria Graph TypeScript](https://github.com/graphprotocol/graph-ts) (`graph-ts`) e +- codice generato da file di subgraph da `graph codegen`. -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. +È anche possibile aggiungere altre librerie come dipendenze, purché siano compatibili con [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Poiché questo è il linguaggio in cui sono scritte le mappature, il wiki [AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki) è una buona fonte per le caratteristiche del linguaggio e delle librerie standard. -## API Reference +## Riferimento API -The `@graphprotocol/graph-ts` library provides the following APIs: +La libreria `@graphprotocol/graph-ts` fornisce le seguenti API: -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. +- Un'API `ethereum` per lavorare con gli smart contract di Ethereum, gli eventi, i blocchi, le transazioni e i valori di Ethereum. +- Un'API `store` per caricare e salvare entità da e verso il Graph Node store. +- Un'API `log` per registrare i messaggi nell'output del the Graph Node e in Graph Explorer. +- Un'API `ipfs` per caricare i file da IPFS. +- Un'API `json` per analizzare i dati JSON. +- Un'API `crypto` per utilizzare le funzioni crittografiche. +- Primitive di basso livello per tradurre tra diversi sistemi di tipi come Ethereum, JSON, GraphQL e AssemblyScript. -### Versions +### Versioni -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. +La `apiVersion` nel manifest del subgraph specifica la versione dell'API di mappatura che viene eseguita da the Graph Node per un dato subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Versione | Note di rilascio | +| :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Aggiunte le classi `TransactionReceipt` e `Log` ai tipi di Ethereum
    Aggiunto il campo `receipt` all'oggetto Ethereum Event | +| 0.0.6 | Aggiunto il campo `nonce` all'oggetto Ethereum Transaction
    Aggiunto `baseFeePerGas` all'oggetto Ethereum Block | +| 0.0.5 | AssemblyScript aggiornato alla versione 0.19.10 (questo include modifiche di rottura, consultare la [`Guida alla migrazione`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` rinominato in `ethereum.transaction.gasLimit` | +| 0.0.4 | Aggiunto il campo `functionSignature` all'oggetto Ethereum SmartContractCall | +| 0.0.3 | Aggiunto il campo `from` all'oggetto Ethereum Call
    `etherem.call.address` rinominato in `ethereum.call.to` | +| 0.0.2 | Aggiunto il campo `input` all'oggetto Ethereum Transaction | -### Built-in Types +### Tipi integrati -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). +La documentazione sui tipi di base integrati in AssemblyScript è disponibile nel [wiki AssemblyScript] (https://github.com/AssemblyScript/assemblyscript/wiki/Types). -The following additional types are provided by `@graphprotocol/graph-ts`. +I seguenti tipi aggiuntivi sono forniti da `@graphprotocol/graph-ts`. #### ByteArray ```typescript -import { ByteArray } from '@graphprotocol/graph-ts' +importare { ByteArray } da '@graphprotocol/graph-ts' ``` -`ByteArray` represents an array of `u8`. +`ByteArray` rappresenta un array di `u8`. _Construction_ -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. +- `fromI32(x: i32): ByteArray` - Decompone `x` in byte. +- `fromHexString(hex: string): ByteArray` - La lunghezza dell'input deve essere pari. Il prefisso `0x` è facoltativo. _Type conversions_ -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. +- `toHexString(): string` - Converte in una stringa esadecimale con prefisso `0x`. +- `toString(): string` - Interpreta i byte come una string UTF-8. +- `toBase58(): string` - Codifica i byte in una stringa base58. +- `toU32(): u32` - Interpreta i byte come un `u32` little-endian. Viene lanciata in caso di overflow. +- `toI32(): i32` - Interpreta l'array di byte come un `i32` little-endian. Viene lanciata in caso di overflow. _Operators_ -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` +- equals(y: ByteArray): bool`- può essere scritto come`x == y\`. +- `concat(other: ByteArray) : ByteArray` - restituisce un nuovo `ByteArray` costituito da `this` direttamente seguito da `other` +- `concatI32(other: i32) : ByteArray` - restituisce un nuovo `ByteArray` costituito da `this` direttamente seguito dalla rappresentazione in byte di `other` #### BigDecimal @@ -75,32 +75,32 @@ _Operators_ import { BigDecimal } from '@graphprotocol/graph-ts' ``` -`BigDecimal` is used to represent arbitrary precision decimals. +`BigDecimal` è usato per rappresentare decimali di precisione arbitraria. -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. +> Nota: [Internamente](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` è memorizzato nel formato [IEEE-754 decimal128 floating-point](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), che supporta 34 cifre decimali di significante. Questo rende `BigDecimal` inadatto a rappresentare tipi a virgola fissa che possono estendersi oltre le 34 cifre, come un Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) o equivalente. _Construction_ -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. +- `constructor(bigInt: BigInt)` - crea un `BigDecimal` da un `BigInt`. +- `static fromString(s: string): BigDecimal` - analizza una stringa decimale. _Type conversions_ -- `toString(): string` – prints to a decimal string. +- `toString(): string` - stampa una stringa decimale. _Math_ -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. +- `plus(y: BigDecimal): BigDecimal` - può essere scritto come `x + y`. +- `minus(y: BigDecimal): BigDecimal` - può essere scritto come `x - y`. +- `times(y: BigDecimal): BigDecimal` - può essere scritto come `x * y`. +- `div(y: BigDecimal): BigDecimal` - può essere scritto come `x / y`. +- `equals(y: BigDecimal): bool` - può essere scritto come `x == y`. +- `notEqual(y: BigDecimal): bool` - può essere scritto come `x != y`. +- `lt(y: BigDecimal): bool` – può essere scritto come `x < y`. +- `le(y: BigDecimal): bool` – può essere scritto come `x <= y`. +- `gt(y: BigDecimal): bool` – può essere scritto come `x > y`. +- `ge(y: BigDecimal): bool` – può essere scritto come `x >= y`. +- `neg(): BigDecimal` - può essere scritto come `-x`. #### BigInt @@ -108,53 +108,53 @@ _Math_ import { BigInt } from '@graphprotocol/graph-ts' ``` -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. +`BigInt` è usato per rappresentare i grandi numeri interi. Questo include i valori Ethereum di tipo da `uint32` a `uint256` e da `int64` a `int256`. Tutto ciò che è inferiore a `uint32`, come `int32`, `uint24` o `int8` è rappresentato come `i32`. -The `BigInt` class has the following API: +La classe `BigInt` ha la seguente API: _Construction_ -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. +- `BigInt.fromI32(x: i32): BigInt` - crea un `BigInt` da un `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. +- `BigInt.fromString(s: string): BigInt`- Analizza un `BigInt` da una stringa. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` - Interpreta `bytes` come un intero senza segno, little-endian. Se l'input è big-endian, chiamare prima `.reverse()`. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromSignedBytes(x: Bytes): BigInt` - Interpreta `bytes` come un intero firmato, little-endian. Se l'input è big-endian, chiamare prima `.reverse()`. _Type conversions_ -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. +- `x.toHex(): string` - trasforma `BigInt` in una stringa di caratteri esadecimali. -- `x.toString(): string` – turns `BigInt` into a decimal number string. +- `x.toString(): string` - trasforma `BigInt` in una stringa di numeri decimali. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. +- `x.toI32(): i32` - restituisce il `BigInt` come `i32`; fallisce se il valore non entra in `i32`. È una buona idea controllare prima `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. +- `x.toBigDecimal(): BigDecimal` - converte in un decimale senza parti frazionarie. _Math_ -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. +- `x.plus(y: BigInt): BigInt` - può essere scritto come `x + y`. +- `x.minus(y: BigInt): BigInt` - può essere scritto come `x - y`. +- `x.times(y: BigInt): BigInt` - può essere scritto come `x * y`. +- `x.div(y: BigInt): BigInt` - può essere scritto come `x / y`. +- `x.mod(y: BigInt): BigInt` - può essere scritto come `x % y`. +- `x.equals(y: BigInt): bool` - può essere scritto come `x == y`. +- `x.notEqual(y: BigInt): bool` - può essere scritto come `x != y`. +- `x.lt(y: BigInt): bool` - può essere scritto come `x < y`. +- `x.le(y: BigInt): bool` - può essere scritto come `x <= y`. +- `x.gt(y: BigInt): bool` - può essere scritto come `x > y`. +- `x.ge(y: BigInt): bool` - può essere scritto come `x >= y`. +- `x.neg(): BigInt` - può essere scritto come `-x`. +- `x.divDecimal(y: BigDecimal): BigDecimal` - divide per un decimale, dando un risultato decimale. +- `x.isZero(): bool` - Conviene prima verificare se il numero è zero. +- `x.isI32(): bool` - Controlla se il numero è compreso in un `i32`. +- `x.abs(): BigInt` - Valore assoluto. +- `x.pow(exp: u8): BigInt` - Esponenziale. +- `bitOr(x: BigInt, y: BigInt): BigInt` - può essere scritto come `x | y`. +- `bitAnd(x: BigInt, y: BigInt): BigInt` - può essere scritto come `x & y`. +- `leftShift(x: BigInt, bits: u8): BigInt` - può essere scritto come `x << y`. +- `rightShift(x: BigInt, bits: u8): BigInt` - può essere scritto come `x >> y`. #### TypedMap @@ -162,15 +162,15 @@ _Math_ import { TypedMap } from '@graphprotocol/graph-ts' ``` -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). +`TypedMap` può essere usato per memorizzare coppie key-value. Vedere [questo esempio] (https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). -The `TypedMap` class has the following API: +La classe `TypedMap` ha la seguente API: -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not +- `new TypedMap()` - crea una mappa vuota con chiavi di tipo `K` e valori di tipo `V` +- `map.set(chiave: K, valore: V): void` - imposta il valore di `chiave` su `valore` +- `map.getEntry(key: K): TypedMapEntry | null` - restituisce la coppia key-value per una `key` o `null` se la `key` non esiste nella mappa +- `map.get(chiave: K): V | null` - restituisce il valore di una `chiave` o `null` se la `chiave` non esiste nella mappa +- `map.isSet(key: K): bool` - restituisce `true` se la `key` esiste nella mappa e `false` se non esiste #### Bytes @@ -178,25 +178,25 @@ The `TypedMap` class has the following API: import { Bytes } from '@graphprotocol/graph-ts' ``` -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. +`Bytes` è usato per rappresentare array di byte di lunghezza arbitraria. Questo include i valori Ethereum di tipo `bytes`, `bytes32`, ecc. -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: +La classe `Bytes` estende [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) di AssemblyScript e supporta tutte le funzionalità di `Uint8Array`, oltre ai seguenti nuovi metodi: _Construction_ -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes +- `fromHexString(hex: string) : Bytes` - Converte la stringa `hex`, che deve essere composta da un numero pari di cifre esadecimali, in un `ByteArray`. La stringa `hex` può facoltativamente iniziare con `0x` +- `fromI32(i: i32) : Bytes` - Converte `i` in un array di byte _Type conversions_ -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) +- `b.toHex()` - restituisce una stringa esadecimale che rappresenta i byte nell'array +- `b.toString()` - converte i byte dell'array in una stringa di caratteri unicode +- `b.toBase58()` - trasforma un valore Ethereum Bytes in una codifica base58 (usata per gli hash IPFS) _Operators_ -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` +- `b.concat(other: Bytes) : Bytes` - - restituisce nuovi `Bytes` costituiti da `this` direttamente seguito da `other` +- `b.concatI32(other: i32) : ByteArray` - restituisce nuovi `Byte` costituiti da `this` direttamente seguito dalla rappresentazione in byte di `other` #### Address @@ -204,12 +204,12 @@ _Operators_ import { Address } from '@graphprotocol/graph-ts' ``` -`Address` extends `Bytes` to represent Ethereum `address` values. +`Address` estende `Bytes` per rappresentare i valori di `address` di Ethereum. -It adds the following method on top of the `Bytes` API: +Aggiunge il seguente metodo all'API `Bytes`: -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error +- `Address.fromString(s: string): Address` - crea un `Address` a partire da una stringa esadecimale +- `Address.fromBytes(b: Bytes): Address` - crea un `Address` da `b` che deve essere lungo esattamente 20 byte. Se si passa un valore con un numero di byte inferiore o superiore, risulterà in un errore ### Store API @@ -217,13 +217,13 @@ It adds the following method on top of the `Bytes` API: import { store } from '@graphprotocol/graph-ts' ``` -The `store` API allows to load, save and remove entities from and to the Graph Node store. +L'API `store` consente di caricare, salvare e rimuovere entità da e verso il Graph Node store. -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. +Le entità scritte nello store corrispondono uno a uno ai tipi `@entity` definiti nello schema GraphQL del subgraph. Per rendere comodo il lavoro con queste entità, il comando `graph codegen` fornito dalla [Graph CLI](https://github.com/graphprotocol/graph-cli) genera classi di entità, che sono subclassi del tipo built-in `Entity`, con getter e setter di proprietà per i campi dello schema e metodi per caricare e salvare queste entità. -#### Creating entities +#### Creazione di entità -The following is a common pattern for creating entities from Ethereum events. +Quello che segue è un modello comune per la creazione di entità a partire da eventi Ethereum. ```typescript // Import the Transfer event class generated from the ERC20 ABI @@ -248,13 +248,13 @@ export function handleTransfer(event: TransferEvent): void { } ``` -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. +Quando un evento `Transfer` viene incontrato durante l'elaborazione della chain, viene passato al gestore dell'evento `handleTransfer` usando il tipo `Transfer` generato (qui alias `TransferEvent` per evitare un conflitto di nomi con il tipo di entità). Questo tipo consente di accedere a dati quali la transazione genitore dell'evento e i suoi parametri. -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. +Ogni entità deve avere un ID univoco per evitare collisioni con altre entità. È abbastanza comune che i parametri degli eventi includano un identificatore unico che può essere utilizzato. Nota: l'uso dell'hash della transazione come ID presuppone che nessun altro evento della stessa transazione crei entità con questo hash come ID. -#### Loading entities from the store +#### Caricare le entità dallo store -If an entity already exists, it can be loaded from the store with the following: +Se un'entità esiste già, può essere caricata dall'archivio con la seguente procedura: ```typescript let id = event.transaction.hash // or however the ID is constructed @@ -266,15 +266,15 @@ if (transfer == null) { // Use the Transfer entity as before ``` -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. +Poiché l'entità potrebbe non esistere ancora nel negozio, il metodo `load` restituisce un valore di tipo `Transfer | null`. Potrebbe quindi essere necessario verificare il caso `null` prima di utilizzare il valore. -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. +> **Nota: ** Il caricamento delle entità è necessario solo se le modifiche apportate alla mappatura dipendono dai dati precedenti di un'entità. Vedere la sezione successiva per i due modi di aggiornare le entità esistenti. -#### Looking up entities created withing a block +#### Ricerca delle entità create all'interno di un blocco -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. +A partire da `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 e `@graphprotocol/graph-cli` v0.49.0 il metodo `loadInBlock` è disponibile per tutti i tipi di entità. -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. +L'API Store facilita il recupero delle entità create o aggiornate nel blocco corrente. Una situazione tipica è quella in cui un gestore crea una transazione da qualche evento sulla catena e un gestore successivo vuole accedere a questa transazione, se esiste. Nel caso in cui la transazione non esista, il subgraph dovrà andare nel database solo per scoprire che l'entità non esiste; se l'autore del subgraph sa già che l'entità deve essere stata creata nello stesso blocco, l'uso di loadInBlock evita questo viaggio nel database. Per alcuni subgraph, queste ricerche mancate possono contribuire in modo significativo al tempo di indicizzazione. ```typescript let id = event.transaction.hash // or however the ID is constructed @@ -286,13 +286,13 @@ if (transfer == null) { // Use the Transfer entity as before ``` -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. +> Nota: Se non esiste un'entità creata nel blocco dato, `loadInBlock` restituirà `null` anche se esiste un'entità con l'ID dato nel negozio. -#### Looking up derived entities +#### Ricerca di entità derivate -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. +A partire da `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 e `@graphprotocol/graph-cli` v0.51.0 è disponibile il metodo `loadRelated`. -This enables loading derived entity fields from within an event handler. For example, given the following schema: +Ciò consente di caricare i campi entità derivati da un gestore di eventi. Per esempio, dato il seguente schema: ```graphql type Token @entity { @@ -307,7 +307,7 @@ type Holder @entity { } ``` -The following code will load the `Token` entity that the `Holder` entity was derived from: +Il codice seguente carica l'entità `Token` da cui è derivata l'entità `Holder`: ```typescript let holder = Holder.load('test-id') @@ -315,14 +315,14 @@ let holder = Holder.load('test-id') let tokens = holder.tokens.load() ``` -#### Updating existing entities +#### Aggiornamento di entità esistenti -There are two ways to update an existing entity: +Esistono due modi per aggiornare un'entità esistente: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Caricare l'entità con, ad esempio, `Transfer.load(id)`, impostare le proprietà sull'entità, quindi `.save()` riportarla in archivio. +2. È sufficiente creare l'entità con, ad esempio, `new Transfer(id)`, impostare le proprietà sull'entità e quindi `.save()` nel negozio. Se l'entità esiste già, le modifiche vengono unite ad essa. -Changing properties is straight forward in most cases, thanks to the generated property setters: +La modifica delle proprietà è semplice nella maggior parte dei casi, grazie ai setter di proprietà generati: ```typescript let transfer = new Transfer(id) @@ -331,16 +331,16 @@ transfer.to = ... transfer.amount = ... ``` -It is also possible to unset properties with one of the following two instructions: +È anche possibile disattivare le proprietà con una delle due istruzioni seguenti: ```typescript transfer.from.unset() transfer.from = null ``` -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. +Questo funziona solo con le proprietà opzionali, cioè quelle dichiarate senza un `!` in GraphQL. Due esempi potrebbero essere `owner: Bytes` o `amount: BigInt`. -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. +L'aggiornamento delle proprietà degli array è un po' più complicato, poiché l'ottenimento di un array da un'entità crea una copia di tale array. Ciò significa che le proprietà dell'array devono essere impostate di nuovo in modo esplicito dopo aver modificato l'array. Quanto segue presuppone che l'entità abbia un campo `numbers: [BigInt!]!`. ```typescript // This won't work @@ -354,9 +354,9 @@ entity.numbers = numbers entity.save() ``` -#### Removing entities from the store +#### Rimozione di entità dal negozio -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: +Attualmente non c'è modo di rimuovere un'entità tramite i tipi generati. Per rimuovere un'entità è necessario passare il nome del tipo di entità e l'ID dell'entità a `store.remove`: ```typescript import { store } from '@graphprotocol/graph-ts' @@ -365,17 +365,17 @@ let id = event.transaction.hash store.remove('Transfer', id) ``` -### Ethereum API +### API Ethereum -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. +L'API di Ethereum fornisce l'accesso agli smart contract, alle variabili di stato pubbliche, alle funzioni dei contratti, agli eventi, alle transazioni, ai blocchi e alla codifica/decodifica dei dati di Ethereum. -#### Support for Ethereum Types +#### Supporto per i tipi di Ethereum -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. +Come per le entità, `graph codegen` genera classi per tutti gli smart contract e gli eventi utilizzati in un subgraph. Per questo, gli ABI dei contratti devono far parte dell'origine dati nel manifest del subgraph. In genere, i file ABI sono memorizzati in una cartella `abis/`. -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. +Con le classi generate, le conversioni tra i tipi di Ethereum e i [tipi incorporati](#built-in-types) avvengono dietro le quinte, in modo che gli autori dei subgraph non debbano preoccuparsene. -The following example illustrates this. Given a subgraph schema like +L'esempio seguente lo illustra. Dato uno schema di subgraph come ```graphql type Transfer @entity { @@ -386,7 +386,7 @@ type Transfer @entity { } ``` -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: +e una firma di evento `Transfer(address,address,uint256)` su Ethereum, i valori `from`, `to` e `amount` di tipo `address`, `address` e `uint256` sono convertiti in `Address` e `BigInt`, consentendo di passarli alle proprietà `Bytes!` e `BigInt!` dell'entità `Transfer`: ```typescript let id = event.transaction.hash @@ -397,9 +397,9 @@ transfer.amount = event.params.amount transfer.save() ``` -#### Events and Block/Transaction Data +#### Eventi e dati di blocco/transazione -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): +Gli eventi di Ethereum passati ai gestori di eventi, come l'evento `Transfer` negli esempi precedenti, non solo forniscono accesso ai parametri dell'evento, ma anche alla transazione genitore e al blocco di cui fanno parte. I seguenti dati possono essere ottenuti dalle istanze di `event` (queste classi fanno parte del modulo `ethereum` di `graph-ts`): ```typescript class Event { @@ -472,11 +472,11 @@ class Log { } ``` -#### Access to Smart Contract State +#### Accesso allo stato dello smart contract -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. +Il codice generato da `graph codegen` include anche classi per gli smart contract utilizzati nel subgraph. Queste possono essere utilizzate per accedere alle variabili di stato pubbliche e per chiamare le funzioni del contratto nel blocco corrente. -A common pattern is to access the contract from which an event originates. This is achieved with the following code: +Un modello comune è quello di accedere al contratto da cui proviene un evento. Questo si ottiene con il seguente codice: ```typescript // Import the generated contract class and generated Transfer event class @@ -493,15 +493,15 @@ export function handleTransfer(event: TransferEvent) { } ``` -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type +`Transfer` è alias di `TransferEvent` qui per evitare un conflitto di nomi con il tipo di entità -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. +Finché il `ERC20Contract` su Ethereum ha una funzione pubblica di sola lettura chiamata `symbol`, questa può essere chiamata con `.symbol()`. Per le variabili di stato pubbliche viene creato automaticamente un metodo con lo stesso nome. -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. +Qualsiasi altro contratto che faccia parte del subgraph può essere importato dal codice generato e può essere legato a un indirizzo valido. -#### Handling Reverted Calls +#### Gestione delle chiamate annullate -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: +Se i metodi di sola lettura del contratto possono essere annullati, si deve gestire la situazione chiamando il metodo del contratto generato con il prefisso `try_`. Per esempio, il contratto Gravity espone il metodo `gravatarToOwner`. Questo codice sarebbe in grado di gestire un revert in quel metodo: ```typescript let gravity = Gravity.bind(event.address) @@ -513,11 +513,11 @@ if (callResult.reverted) { } ``` -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. +Si noti che un Graph node collegato a un client Geth o Infura potrebbe non rilevare tutti i reverts; se si fa affidamento su questo si consiglia di utilizzare un Graph node collegato a un client Parity. -#### Encoding/Decoding ABI +#### Codifica/decodifica ABI -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. +I dati possono essere codificati e decodificati secondo il formato di codifica ABI di Ethereum utilizzando le funzioni `encode` e `decode` del modulo `ethereum`. ```typescript import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' @@ -534,39 +534,39 @@ let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! let decoded = ethereum.decode('(address,uint256)', encoded) ``` -For more information: +Per maggiori informazioni: - [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). +- Codifica/decodifica [libreria Rust/CLI](https://github.com/rust-ethereum/ethabi) +- Altro [esempio complesso](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). -### Logging API +### API di registrazione ```typescript import { log } from '@graphprotocol/graph-ts' ``` -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. +L'API `log` consente ai subgraph di registrare informazioni nell'output standard del Graph Node e nel Graph Explorer. I messaggi possono essere registrati utilizzando diversi livelli di log. Viene fornita una sintassi di base per comporre i messaggi di log a partire da un argomento. -The `log` API includes the following functions: +L'API `log` include le seguenti funzioni: -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. +- `log.debug(fmt: string, args: Array): void` - registra un messaggio di debug. +- `log.info(fmt: string, args: Array): void` - registra un messaggio informativo. +- `log.warning(fmt: string, args: Array): void` - registra un avviso. +- `log.error(fmt: string, args: Array): void` - registra un messaggio di errore. +- `log.critical(fmt: string, args: Array): void` - registra un messaggio critico _and_ termina il subgraph. -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. +L'API `log` accetta una stringa di formato e un array di valori stringa. Quindi sostituisce i segnaposto con i valori stringa dell'array. Il primo segnaposto `{}` viene sostituito dal primo valore dell'array, il secondo segnaposto `{}` viene sostituito dal secondo valore e così via. ```typescript log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) ``` -#### Logging one or more values +#### Registrazione di uno o più valori -##### Logging a single value +##### Registrazione di un singolo valore -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: +Nell'esempio seguente, il valore stringa "A" viene passato in un array per diventare `['A']` prima di essere registrato: ```typescript let myValue = 'A' @@ -577,9 +577,9 @@ export function handleSomeEvent(event: SomeEvent): void { } ``` -##### Logging a single entry from an existing array +##### Registrazione di una singola voce da un array esistente -In the example below, only the first value of the argument array is logged, despite the array containing three values. +Nell'esempio seguente, viene registrato solo il primo valore dell'array di argomenti, nonostante l'array contenga tre valori. ```typescript let myArray = ['A', 'B', 'C'] @@ -590,9 +590,9 @@ export function handleSomeEvent(event: SomeEvent): void { } ``` -#### Logging multiple entries from an existing array +#### Registrazione di più voci da una matrice esistente -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. +Ogni voce dell'array di argomenti richiede il proprio segnaposto `{}` nella stringa del messaggio di log. L'esempio seguente contiene tre segnaposto `{}` nel messaggio di log. Per questo motivo, tutti e tre i valori di `myArray` vengono registrati. ```typescript let myArray = ['A', 'B', 'C'] @@ -603,9 +603,9 @@ export function handleSomeEvent(event: SomeEvent): void { } ``` -##### Logging a specific entry from an existing array +##### Registrazione di una voce specifica da un array esistente -To display a specific value in the array, the indexed value must be provided. +Per visualizzare un valore specifico della matrice, è necessario fornire il valore indicizzato. ```typescript export function handleSomeEvent(event: SomeEvent): void { @@ -614,9 +614,9 @@ export function handleSomeEvent(event: SomeEvent): void { } ``` -##### Logging event information +##### Registrazione delle informazioni sugli eventi -The example below logs the block number, block hash and transaction hash from an event: +L'esempio seguente registra il numero di blocco, l'hash del blocco e l'hash della transazione di un evento: ```typescript import { log } from '@graphprotocol/graph-ts' @@ -636,9 +636,9 @@ export function handleSomeEvent(event: SomeEvent): void { import { ipfs } from '@graphprotocol/graph-ts' ``` -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. +Gli smart contract di tanto in tanto ancorano i file IPFS sulla chain. Ciò consente alle mappature di ottenere gli hash IPFS dal contratto e di leggere i file corrispondenti da IPFS. I dati del file saranno restituiti come `Byte`, che di solito richiedono un'ulteriore elaborazione, ad esempio con l'API `json` documentata più avanti in questa pagina. -Given an IPFS hash or path, reading a file from IPFS is done as follows: +Dato un hash o un percorso IPFS, la lettura di un file da IPFS avviene come segue: ```typescript // Put this inside an event handler in the mapping @@ -651,9 +651,9 @@ let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' let data = ipfs.cat(path) ``` -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. +**Nota:** `ipfs.cat` non è deterministico al momento. Se il file non può essere recuperato attraverso la rete IPFS prima che la richiesta si esaurisca, restituirà `null`. Per questo motivo, vale sempre la pena di controllare che il risultato non sia `null`. -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: +È anche possibile elaborare file di dimensioni maggiori in modo streaming con `ipfs.map`. La funzione si aspetta l'hash o il percorso di un file IPFS, il nome di un callback e i flag per modificare il suo comportamento: ```typescript import { JSONValue, Value } from '@graphprotocol/graph-ts' @@ -683,9 +683,9 @@ ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) ``` -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. +L'unico flag attualmente supportato è `json`, che deve essere passato a `ipfs.map`. Con il flag `json`, il file IPFS deve essere costituito da una serie di valori JSON, un valore per riga. La chiamata a `ipfs.map` leggerà ogni riga del file, la deserializzerà in un `JSONValue` e chiamerà il callback per ognuno di essi. Il callback può quindi utilizzare le operazioni sulle entità per memorizzare i dati dal `JSONValue`. Le modifiche alle entità vengono memorizzate solo quando il gestore che ha chiamato `ipfs.map` termina con successo; nel frattempo, vengono mantenute in memoria e la dimensione del file che `ipfs.map` può elaborare è quindi limitata. -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. +In caso di successo, `ipfs.map` restituisce `void`. Se una qualsiasi invocazione del callback causa un errore, il gestore che ha invocato `ipfs.map` viene interrotto e il subgraph viene contrassegnato come fallito. ### Crypto API @@ -693,7 +693,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes import { crypto } from '@graphprotocol/graph-ts' ``` -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: +L'API `crypto` rende disponibili funzioni crittografiche da usare nelle mappature. Al momento, ce n'è solo una: - `crypto.keccak256(input: ByteArray): ByteArray` @@ -703,14 +703,14 @@ The `crypto` API makes a cryptographic functions available for use in mappings. import { json, JSONValueKind } from '@graphprotocol/graph-ts' ``` -JSON data can be parsed using the `json` API: +I dati JSON possono essere analizzati utilizzando l'API `json`: -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed +- `json.fromBytes(data: Bytes): JSONValue` - analizza i dati JSON da un array di `Bytes` interpretati come una sequenza UTF-8 valida +- `json.try_fromBytes(data: Bytes): Result` - versione sicura di `json.fromBytes`, restituisce una variante di errore se il parsing è fallito +- `json.fromString(data: string): JSONValue` - analizza i dati JSON da una `string` UTF-8 valida +- `json.try_fromString(data: string): Result` - versione sicura di `json.fromString`, restituisce una variante di errore se il parsing è fallito -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: +La classe `JSONValue` fornisce un modo per estrarre valori da un documento JSON arbitrario. Poiché i valori JSON possono essere booleani, numeri, array e altro, `JSONValue` è dotato di una proprietà `kind` per verificare il tipo di valore: ```typescript let value = json.fromBytes(...) @@ -719,71 +719,71 @@ if (value.kind == JSONValueKind.BOOL) { } ``` -In addition, there is a method to check if the value is `null`: +Inoltre, esiste un metodo per verificare se il valore è `null`: - `value.isNull(): boolean` -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: +Quando il tipo di un valore è certo, può essere convertito in un [tipo incorporato](#built-in-types) usando uno dei seguenti metodi: - `value.toBool(): boolean` - `value.toI64(): i64` - `value.toF64(): f64` - `value.toBigInt(): BigInt` - `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: +- `value.toArray(): Array` - (e poi convertire `JSONValue` con uno dei 5 metodi precedenti) + +### Riferimento alle conversioni di tipo + +| Fonte(i) | Destinazione | Funzione di conversione | +| --------------------------------------- | --------------------------------------- | ----------------------------------------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() o s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() o s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | + +### Metadati della Data Source + +È possibile ispezionare l'indirizzo del contratto, la rete e il contesto dell'origine dati che ha invocato il gestore attraverso lo spazio dei nomi `dataSource`: - `dataSource.address(): Address` - `dataSource.network(): string` - `dataSource.context(): DataSourceContext` -### Entity and DataSourceContext +### Entità e DataSourceContext -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: +La classe base `Entity` e la classe figlia `DataSourceContext` hanno degli helper per impostare e ottenere dinamicamente i campi: - `setString(key: string, value: string): void` - `setI32(key: string, value: i32): void` @@ -798,11 +798,11 @@ The base `Entity` class and the child `DataSourceContext` class have helpers to - `getBoolean(key: string): boolean` - `getBigDecimal(key: string): BigDecimal` -### DataSourceContext in Manifest +### DataSourceContext nel manifesto -The `context` section within `dataSources` allows you to define key-value pairs that are accessible within your subgraph mappings. The available types are `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, and `BigInt`. +La sezione `contesto` all'interno di `dataSources` consente di definire coppie chiave-valore accessibili nelle mappature dei subgraph. I tipi disponibili sono `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List` e `BigInt`. -Here is a YAML example illustrating the usage of various types in the `context` section: +Ecco un esempio YAML che illustra l'uso di vari tipi nella sezione `context`: ```yaml dataSources: @@ -842,13 +842,13 @@ dataSources: data: '1000000000000000000000000' ``` -- `Bool`: Specifies a Boolean value (`true` or `false`). -- `String`: Specifies a String value. -- `Int`: Specifies a 32-bit integer. -- `Int8`: Specifies an 8-bit integer. -- `BigDecimal`: Specifies a decimal number. Must be quoted. -- `Bytes`: Specifies a hexadecimal string. -- `List`: Specifies a list of items. Each item needs to specify its type and data. -- `BigInt`: Specifies a large integer value. Must be quoted due to its large size. +- `Bool`: Specifica un valore booleano (`true` o `false`). +- `String`: Specifica un valore string. +- `Int`: Specifica un numero intero a 32 bit. +- `Int8`: Specifica un numero intero a 8 bit. +- `BigDecimal`: Specifica un numero decimale. Deve essere quotato. +- `Bytes`: Specifica una string esadecimale. +- `List`: Specifica un elenco di elementi. Ogni elemento deve specificare il suo tipo e i suoi dati. +- `BigInt`: Specifica un valore intero di grandi dimensioni. Deve essere quotato a causa delle sue grandi dimensioni. -This context is then accessible in your subgraph mapping files, enabling more dynamic and configurable subgraphs. +Questo contesto è quindi accessibile nei file di mappatura dei subgraph, consentendo di ottenere subgraph più dinamici e configurabili. From 94d2d86805eec9ca6e6e32ac311f1fea3887643b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:23 -0400 Subject: [PATCH 581/924] New translations api.mdx (Japanese) --- website/pages/ja/developing/graph-ts/api.mdx | 382 +++++++++---------- 1 file changed, 191 insertions(+), 191 deletions(-) diff --git a/website/pages/ja/developing/graph-ts/api.mdx b/website/pages/ja/developing/graph-ts/api.mdx index 40702b83261f..b4010176c7dd 100644 --- a/website/pages/ja/developing/graph-ts/api.mdx +++ b/website/pages/ja/developing/graph-ts/api.mdx @@ -2,45 +2,45 @@ title: AssemblyScript API --- -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) +> 注意: `graph-cli`/`graph-ts` のバージョン `0.22.0` より前にサブグラフを作成した場合、古いバージョンのAssemblyScriptを使用しているので、[`マイグレーションガイド`](/release-notes/assemblyscript-migration-guide) を参照することをお勧めします。 このページでは、サブグラフのマッピングを記述する際に、どのような組み込み API を使用できるかを説明します。 すぐに使える API は 2 種類あります: - the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. +- graph codegenによってサブグラフファイルから生成されたコードです。 -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. +また、AssemblyScriptとの互換性があれば、他のライブラリを依存関係に追加することも可能です。 マッピングはこの言語で書かれているので、言語や標準ライブラリの機能については、 AssemblyScript wikiが参考になります。 ## API リファレンス -The `@graphprotocol/graph-ts` library provides the following APIs: +@graphprotocol/graph-tsライブラリは、以下の API を提供しています: -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. +- Ethereum スマートコントラクト、イベント、ブロック、トランザクション、Ethereum の値を扱うためのethereumAPI +- エンティティをグラフノードのストアからロードしたり、ストアに保存したりするstoreAPI +- Graph Node の出力や Graph Explorer にメッセージを記録するためのlogAPI です +- IPFS からファイルをロードするipfsAPI +- JSON データを解析するためのjsonAPI +- 暗号機能を使用するためのcryptoAPI - Ethereum、JSON、GraphQL、AssemblyScript など、異なるタイプのシステム間で変換するための低レベルプリミティブ ### バージョン -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. +サブグラフマニフェストapiVersionは、特定のサブグラフのマッピングAPIバージョンを指定します。このバージョンは、Graph Nodeによって実行されます。 -| バージョン | リリースノート | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| バージョン | リリースノート | +| :---: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Ethereum タイプに `TransactionReceipt` と `Log` クラスを追加
    Ethereum Event オブジェクトに `receipt` フィールドを追加。 | +| 0.0.6 | Ethereum Transactionオブジェクトに`nonce`フィールドを追加
    Ethereum Blockオブジェクトに`baseFeePerGas`を追加。 | +| 0.0.5 | AssemblyScriptはバージョン0.19.10にアップグレードされました(このバージョンアップには変更点が含まれていますので Migration Guide) をご覧ください)。
    ethereum.transaction.gasUsedの名前がethereum.transaction.gasLimitに変更 | +| 0.0.4 | Ethereum SmartContractCall オブジェクトにfunctionSignatureフィールドを追加 | +| 0.0.3 | イーサリアムコールオブジェクトに`from`フィールドを追加
    `etherem.call.address`を`ethereum.call.to`に変更。 | +| 0.0.2 | Ethereum Transaction オブジェクトに inputフィールドを追加 | ### 組み込み型 -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). +AssemblyScriptに組み込まれている基本型に関するドキュメントは[AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types)にあります。 -The following additional types are provided by `@graphprotocol/graph-ts`. +以下の追加型は@graphprotocol/graph-tsで提供されています。 #### バイト配列 @@ -48,26 +48,26 @@ The following additional types are provided by `@graphprotocol/graph-ts`. '@graphprotocol/graph-ts'から{ ByteArray } をインポートします。 ``` -`ByteArray` represents an array of `u8`. +ByteArrayは、u8の配列を表します。 _Construction_ - `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. +- fromHexString(hex:: 文字列): ByteArray` - 入力長は偶数でなければなりません。0x`のプレフィックスはオプションとなります。 _Type conversions_ -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. +- `toHexString(): string` - `0x` を先頭に持つ 16 進文字列に変換します。 +- `toString(): string` - バイトを UTF-8 文字列として解釈します。 +- `toBase58(): string` - バイトをbase58の文字列にエンコードします。 +- `toU32(): u32` - バイトをリトルエンディアンの `u32` として解釈し、オーバーフローした場合にスローします。 +- `toI32(): i32` - バイト配列をリトルエンディアンの `i32` として解釈し、オーバーフローした場合にスローします。 _Operators_ -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` +- equals(y: ByteArray): bool`-`x == y\` と書くことができます。 +- `concat(other: ByteArray) : ByteArray` - `this` に `other` を直接続けた `ByteArray` を返します。 +- `concatI32(other: i32) : ByteArray` - `this` に `other` のバイト表現を直接続けた `ByteArray` を返します。 #### BigDecimal @@ -75,32 +75,32 @@ _Operators_ '@graphprotocol/graph-ts'から { BigDecimal } をインポートします。 ``` -`BigDecimal` is used to represent arbitrary precision decimals. +BigDecimalは、任意の精度の小数を表現するために使用されます。 -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. +> 注意: [内部的に](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` は [IEEE-754 decimal128 浮動小数点フォーマット](https://en.wikipedia.org/wiki/Decimal128_floating-point_format) で格納されます。このフォーマットはシグニフィカンドの小数点以下 34 桁をサポートしています。このため、 `BigDecimal` は、Solidity の [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) やそれに相当するような、34 桁よりも広い桁数の固定小数点型を表現するのには適していません。 _Construction_ -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. +- `constructor(bigInt: BigInt)` - `BigInt` から `BigDecimal` を生成します。 +- `static fromString(s: string): BigDecimal` - 10進数の文字列をパースします。 _Type conversions_ -- `toString(): string` – prints to a decimal string. +- toString(): string\` - 10進数の文字列を表示します。 _Math_ -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. +- `plus(y: BigDecimal): BigDecimal` - `x + y` と書くことができます。 +- `minus(y: BigDecimal): BigDecimal` - `x + y` と書くことができます。 +- `times(y: BigDecimal): BigDecimal` - `x + y` と書くことができます。 +- div(y: BigDecimal): BigDecimal`-`x / y\` と書くことができます。 +- equals(y: BigDecimal): bool`-`x == y\` と書くことができます。 +- notEqual(y: BigDecimal): bool`-`x != y\` と書くことができます。 +- lt(y: BigDecimal): bool`-`x \< y\` と書くことができます。 +- `le(y: BigDecimal): bool` - `x <= y` と書くことができます。 +- `gt(y: BigDecimal): bool` と書くことができます。 +- `ge(y: BigDecimal): bool`と書くことができます。 +- `neg(): BigDecimal` - `-x` と書くことができます。 #### BigInt @@ -108,53 +108,53 @@ _Math_ '@graphprotocol/graph-ts'から { BigInt } をインポートします。 ``` -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. +`BigInt` は大きな整数を表現するために使用されます。これには `uint32` から `uint256` と `int64` から `int256` 型のイーサリアムの値が含まれます。uint32`以下の値、例えば`int32`、`uint24`、`int8`は全て`i32\` として表現されます。 -The `BigInt` class has the following API: +BigIntクラスの API は以下の通りです。 _Construction_ -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. +- `BigInt.fromI32(x: i32): BigInt` - `i32` から `BigInt` を作成すします。 -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. +- `BigInt.fromString(s: string): BigInt`- 文字列から `BigInt` をパースします。 -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` - `bytes` を符号なし、リトルエンディアンの整数として解釈します。入力がビッグエンディアンの場合は、最初に `.reverse()` を呼び出します。 -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromSignedBytes(x: Bytes): BigInt` - `bytes` を符号付きのリトルエンディアン整数として解釈します。入力がビッグエンディアンの場合は、最初に `.reverse()` を呼び出します。 _Type conversions_ -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. +- `x.toHex(): string` - `BigInt` を16進数の文字列に変換します。 -- `x.toString(): string` – turns `BigInt` into a decimal number string. +- `x.toString(): string` - `BigInt` を10進数の文字列に変換します。 -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. +- `x.toI32(): i32` - `BigInt` を `i32` として返す。値が `i32` に収まらない場合は失敗します。まず `x.isI32()` をチェックするのが良いでしょう。 -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. +- `x.toBigDecimal(): BigDecimal` - 小数部のない10進数に変換します。 _Math_ -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. +- `x.plus(y: BigInt): BigInt` - `x + y` と書くことができます。 +- `x.minus(y: BigInt): BigInt` - `x - y` と書くことができます。 +- `x.times(y: BigInt): BigInt` - `x * y` と書くことができます。 +- `x.div(y: BigInt): BigInt` - `x / y` と書くことができます。 +- `x.mod(y: BigInt): BigInt` - `x % y` と書くことができます。 +- `x.equals(y: BigInt): bool - x == y` と書くことができます。 +- `x.notEqual(y: BigInt): bool - x = y` と書くことができます。 +- `x.lt(y: BigInt): bool - x < y` と書くことができます。 +- `x.le(y: BigInt): bool - x <= y` と書くことができます。 +- `x.gt(y: BigInt): bool - x > y` と書くことができます。 +- `x.ge(y: BigInt): bool - x >= y` と書くことができます。 +- `x.neg(): BigInt - -x` と書くことができます。 +- `x.divDecimal(y: BigDecimal): BigDecimal` - 小数点で割り、10進数の結果を返します。 +- `x.isZero(): bool` - 数がゼロかどうかをチェックするための便利な関数です。 +- `x.isI32(): bool` - 数が `i32` に収まるかどうかを調べます。 +- x.abs(): BigInt\` - 絶対値。 +- `x.pow(exp: u8): BigInt` - 指数。 +- `bitOr(x: BigInt, y: BigInt): BigInt` - `x | y` と書くことができます。 +- `bitAnd(x: BigInt, y: BigInt): BigInt` - `x & y` と書くことができます。 +- `leftShift(x: BigInt, bits: u8): BigInt` - `x << y` と書くことができます。 +- `rightShift(x: BigInt, bits: u8): BigInt` - `x >> y` と書くことができます。 #### TypedMap @@ -162,15 +162,15 @@ _Math_ '@graphprotocol/graph-ts'から { TypedMap } をインポートします。 ``` -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). +`TypedMap`はキーと値のペアを格納するために使用することができます。この例](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51)を参照してください。 -The `TypedMap` class has the following API: +`TypedMap`クラスは以下のAPIを持っています: -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not +- `new TypedMap()` - `K` 型のキーと `V` 型の値を持つ空のマップを作成します。 +- `map.set(key: K, value: V): void` - `key` の値を `value` に設定します。 +- `map.getEntry(key: K): TypedMapEntry | null` - `key` のキーと値のペアを返します。 +- `map.get(key: K): V | null` - `key` の値を返して、`key` がマップに存在しない場合は `null` を返します。 +- `map.isSet(key: K): bool` - `key` がマップに存在すれば `true` を返し、存在しなければ `false` を返します。 #### Bytes @@ -178,25 +178,25 @@ The `TypedMap` class has the following API: '@graphprotocol/graph-ts'から { Bytes } をインポートします。 ``` -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. +`Bytes`は任意の長さのバイト配列を表現するために使用されます。これには `bytes`、`bytes32` 型などのイーサリアム値が含まれます。 -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: +`Bytes`クラスはAssemblyScriptの[Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64)を拡張したもので、`Uint8Array`のすべての機能に加え、以下の新しいメソッドをサポートしています: _Construction_ -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes +- `fromHexString(hex: string) : Bytes` - 偶数桁の16進数からなる文字列 `hex` を `ByteArray` に変換します。文字列 `hex` はオプションで `0x` から始めることができます。 +- `fromI32(i: i32): Bytes` - `i` をバイト配列に変換します。 _Type conversions_ -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) +- `b.toHex()` - 配列のバイト数を16進数で表した文字列を返します。 +- `b.toString()` - 配列のバイト列をユニコード文字列に変換します。 +- `b.toBase58()` - イーサリアムバイトの値を base58 エンコーディングに変換します (IPFS ハッシュに使用) _Operators_ -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` +- `b.concat(other: Bytes): Bytes` - - `this` に `other` を直接連結した `Bytes` を返します。 +- `b.concatI32(other: i32) : ByteArray` - `this` に `other` のバイト表現を直接続けた `Bytes` を返します。 #### 住所 @@ -204,12 +204,12 @@ _Operators_ '@graphprotocol/graph-ts'から { Address } をインポートします。 ``` -`Address` extends `Bytes` to represent Ethereum `address` values. +アドレス `Address` はイーサリアムのアドレス `address` 値を表現するために `Bytes` を継承しています。 -It adds the following method on top of the `Bytes` API: +Bytesの API の上に以下のメソッドを追加しています。 -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error +- `Address.fromString(s: string): Address` - 16進数文字列から `Address` を作成します。 +- `Address.fromBytes(b: Bytes): Address` - `b` から `Address` を生成します。これは正確に20バイト長でなければなりません。それ以下のバイト数の値を渡すとエラーになります。 ### ストア API @@ -217,9 +217,9 @@ It adds the following method on top of the `Bytes` API: '@graphprotocol/graph-ts'から { store } をインポートします。 ``` -The `store` API allows to load, save and remove entities from and to the Graph Node store. +Store API は、グラフノードのストアにエンティティを読み込んだり、保存したり、削除したりすることができます。 -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. +Storeに書き込まれたエンティティは、サブグラフのGraphQLスキーマで定義された `@entity` 型に一対一でマッピングされます。これらのエンティティを便利に扱うために、[Graph CLI](https://github.com/graphprotocol/graph-cli) が提供する `graph codegen` コマンドはエンティティクラスを生成します。これは組み込みの `Entity` 型のサブクラスで、スキーマのフィールドのプロパティゲッターとセッター、およびこれらのエンティティをロードしたり保存したりするメソッドを持ちます。 #### エンティティの作成 @@ -248,7 +248,7 @@ export function handleTransfer(event: TransferEvent): void { } ``` -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. +チェーンの処理中に `Transfer` イベントが発生すると、生成された `Transfer` 型(エンティティ型との名前の衝突を避けるために、ここでは `TransferEvent` のエイリアス)を使用して `handleTransfer` イベントハンドラに渡されます。この型はイベントの親トランザクションやそのパラメータなどのデータにアクセスすることを可能にします。 各エンティティは、他のエンティティとの衝突を避けるために、ユニークな ID を持たなければなりません。 イベントのパラメータには、使用可能な一意の識別子が含まれているのが一般的です。 注:トランザクションのハッシュを ID として使用することは、同じトランザクション内の他のイベントがこのハッシュを ID としてエンティティを作成しないことを前提としています。 @@ -266,18 +266,18 @@ if (transfer == null) { // Use the Transfer entity as before ``` -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. +エンティティはまだストアに存在していない可能性があるため、loadメソッドはTransfer | null型の値を返します。 そのため、値を使用する前に、nullのケースをチェックする必要があるかもしれません。 -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. +> Note: エンティティのロードは、マッピングでの変更がエンティティの以前のデータに依存する場合にのみ必要です。 既存のエンティティを更新する 2 つの方法については、次のセクションを参照してください。 #### ブロック内で作成されたエンティティの検索 -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. +graph-node v0.31.0、@graphprotocol/graph-ts v0.30.0、および @graphprotocol/graph-cli v0.49.0 以降、 loadInBlock メソッドはすべてのエンティティ タイプで使用できます。 ストア API を使用すると、現在のブロックで作成または更新されたエンティティの取得が容易になります。この一般的な状況は、あるハンドラーがオンチェーン イベントからトランザクションを作成し、後のハンドラーがこのトランザクションが存在する場合にアクセスしようとすることです。トランザクションが存在しない場合、サブグラフはエンティティが存在しないことを確認するためだけにデータベースにアクセスする必要があります。エンティティが同じブロック内に作成されている必要があることをサブグラフの作成者がすでに知っている場合は、loadInBlock を使用すると、このデータベースのラウンドトリップが回避されます。一部のサブグラフでは、これらのルックアップの欠落がインデックス作成時間に大きく影響する可能性があります。 ```typescript -let id = event.transaction.hash // または ID が構築される方法 +let id =event.transaction.hash // または ID が構築される方法 let transfer = Transfer.loadInBlock(id) if (transfer == null) { transfer = 新しい転送(id) @@ -286,11 +286,11 @@ if (transfer == null) { // 以前と同様に Transfer エンティティを使用します ``` -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. +> 注: 指定されたブロックにエンティティが作成されていない場合、ストア内に指定された ID を持つエンティティが存在する場合でも、loadInBlock は null を返します。 #### 派生エンティティの検索 -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. +graph-node v0.31.0、@graphprotocol/graph-ts v0.31.0、および @graphprotocol/graph-cli v0.51.0 以降、loadMany メソッドが利用可能です。 これにより、イベント ハンドラー内から派生エンティティ フィールドをロードできるようになります。たとえば、次のスキーマがあるとします。 @@ -307,7 +307,7 @@ type Holder @entity { } ``` -The following code will load the `Token` entity that the `Holder` entity was derived from: +次のコードは、Holder エンティティの派生元である Token エンティティを読み込みます。 ```typescript let holder = Holder.load('test-id') @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() 既存のエンティティを更新するには 2 つの方法があります。 -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Transfer.load(id)などでエンティティをロードし、エンティティにプロパティを設定した後、.save()でストアに戻す。 +2. 単純にnew Transfer(id)でエンティティを作成し、エンティティにプロパティを設定し、ストアに .save()します。 エンティティがすでに存在する場合は、変更内容がマージされます。 プロパティの変更は、生成されたプロパティセッターのおかげで、ほとんどの場合、簡単です。 @@ -338,9 +338,9 @@ transfer.from.unset() transfer.from = null ``` -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. +これは、オプションのプロパティ、つまり GraphQL で!を付けずに宣言されているプロパティでのみ機能します。 例としては、owner: Bytesやamount: BigIntです。 -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. +エンティティから配列を取得すると、その配列のコピーが作成されるため、配列のプロパティの更新には少し手間がかかります。 つまり、配列を変更した後は、明示的に配列のプロパティを設定し直す必要があります。 次の例では、entity が numbers: [BigInt!]! を持っていると仮定します。 ```typescript // This won't work @@ -356,7 +356,7 @@ entity.save() #### ストアからのエンティティの削除 -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: +現在、生成された型を使ってエンティティを削除する方法はありません。 代わりに、エンティティを削除するには、エンティティタイプの名前とエンティティ ID をstore.removeに渡す必要があります。 ```typescript mport { store } from '@graphprotocol/graph-ts' @@ -371,9 +371,9 @@ Ethereum API は、スマートコントラクト、パブリックステート #### Ethereum タイプのサポート -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. +エンティティと同様に、graph codegenは、サブグラフで使用されるすべてのスマートコントラクトとイベントのためのクラスを生成します。 このためには、コントラクト ABI がサブグラフマニフェストのデータソースの一部である必要があります。 通常、ABI ファイルはabis/フォルダに格納されています。 -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. +生成されたクラスでは、Ethereum Typeと[built-in types](#built-in-types)間の変換が舞台裏で行われるため、サブグラフ作成者はそれらを気にする必要がありません。 以下の例で説明します。 以下のようなサブグラフのスキーマが与えられます。 @@ -386,7 +386,7 @@ type Transfer @entity { } ``` -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: +イーサリアムの `Transfer(address,address,uint256)` イベントシグネチャを使用すると、`from`, `to`, `uint256` 型の値は `Address` と `BigInt` に変換され、`Transfer` エンティティの `Bytes!` プロパティと `BigInt!` プロパティに渡すことができます: ```typescript let id = event.transaction.hash @@ -399,7 +399,7 @@ transfer.save() #### イベントとブロック/トランザクションデータ -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): +前述の例のTransferイベントのように、イベントハンドラに渡された Ethereum イベントは、イベントパラメータへのアクセスだけでなく、その親となるトランザクションや、それらが属するブロックへのアクセスも提供します。 event インスタンスからは、以下のデータを取得することができます(これらのクラスは、 graph-tsのethereumモジュールの一部です)。 ```typescript class Event { @@ -474,7 +474,7 @@ class Log { #### スマートコントラクトの状態へのアクセス -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. +graph codegenが生成するコードには、サブグラフで使用されるスマートコントラクトのクラスも含まれています。 これらを使って、パブリックな状態変数にアクセスしたり、現在のブロックにあるコントラクトの関数を呼び出したりすることができます。 よくあるパターンは、イベントが発生したコントラクトにアクセスすることです。 これは以下のコードで実現できます。 @@ -493,15 +493,15 @@ export function handleTransfer(event: TransferEvent) { } ``` -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type +Transferは、エンティティタイプとの名前の衝突を避けるために、ここではTransferEventにエイリアスされています。 -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. +Ethereum の ERC20Contractにsymbolというパブリックな読み取り専用の関数があれば、.symbol()で呼び出すことができます。 パブリックな状態変数については、同じ名前のメソッドが自動的に作成されます。 サブグラフの一部である他のコントラクトは、生成されたコードからインポートすることができ、有効なアドレスにバインドすることができます。 #### リバートされた呼び出しの処理 -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: +コントラクトの読み取り専用メソッドが復帰する可能性がある場合は、try\_を前置して生成されたコントラクトメソッドを呼び出すことで対処しなければなりません。 例えば、Gravity コントラクトではgravatarToOwnerメソッドを公開しています。 このコードでは、そのメソッドの復帰を処理することができます。 ```typescript let gravity = Gravity.bind(event.address) @@ -517,7 +517,7 @@ if (callResult.reverted) { #### 符号化/復号化 ABI -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. +ethereumモジュールのencode/ decode関数を使用して、Ethereum の ABI エンコーディングフォーマットに従ってデータをエンコード/デコードすることができます。 ```typescript import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' @@ -546,17 +546,17 @@ let decoded = ethereum.decode('(address,uint256)', encoded) '@graphprotocol/graph-ts'から{ log } をインポートします。 ``` -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. +log API は、サブグラフがグラフノードの標準出力やグラフエクスプローラに情報を記録するためのものです。 メッセージは、異なるログレベルを使って記録することができます。 基本的なフォーマット文字列の構文が提供されており、引数からログメッセージを構成することができます。 -The `log` API includes the following functions: +log API には以下の機能があります: -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. +- `log.debug(fmt: string, args: Array): void` - デバッグメッセージを記録します。 +- `log.info(fmt: string, args: Array): void` - インフォメーションメッセージを記録します。 +- `log.warning(fmt: string, args: Array): void` - 警告メッセージを記録します。 +- `log.error(fmt: string, args: Array): void` - エラーメッセージを記録します。 +- `log.critical(fmt: string, args: Array): void` - クリティカル・メッセージを記録して、サブグラフを終了します。 -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. +log API は、フォーマット文字列と文字列値の配列を受け取ります。 そして、プレースホルダーを配列の文字列値で置き換えます。 最初の{}プレースホルダーは配列の最初の値に置き換えられ、2 番目の{}プレースホルダーは 2 番目の値に置き換えられ、以下のようになります。 ```typescript log.info('表示されるメッセージ。{}, {}, {}', [value.toString(), anotherValue.toString(), 'すでに文字列']) @@ -566,7 +566,7 @@ log.info('表示されるメッセージ。{}, {}, {}', [value.toString(), anoth ##### 1 つの値を記録する -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: +以下の例では、文字列値 "A" を配列に渡して['A'] にしてからログに記録しています。 ```typescript let myValue = 'A' @@ -592,7 +592,7 @@ export function handleSomeEvent(event: SomeEvent): void { #### 既存の配列から複数のエントリを記録する -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. +引数配列の各エントリは、ログメッセージ文字列に独自のプレースホルダー{}を必要とします。 以下の例では、ログメッセージに 3 つのプレースホルダー{}が含まれています。 このため、myArrayの 3 つの値すべてがログに記録されます。 ```typescript let myArray = ['A', 'B', 'C'] @@ -636,7 +636,7 @@ export function handleSomeEvent(event: SomeEvent): void { '@graphprotocol/graph-ts'から { ipfs } をインポートします。 ``` -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. +スマートコントラクトは時折、チェーン上の IPFS ファイルをアンカリングします。 これにより、マッピングはコントラクトから IPFS ハッシュを取得し、IPFS から対応するファイルを読み取ることができます。 ファイルのデータはBytesとして返されますが、通常は、このページで後述する json API などを使ってさらに処理する必要があります。 IPFS のハッシュやパスが与えられた場合、IPFS からのファイルの読み込みは以下のように行われます。 @@ -651,9 +651,9 @@ let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' let data = ipfs.cat(path) ``` -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. +注: ipfs.cat は今のところ決定論的なものではありません。もし要求がタイムアウトする前にIPFSネットワーク上でファイルを取得できなければ、 nullを返します。このため、常に null の結果をチェックする価値があります。 -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: +また、ipfs.map.を使って、大きなファイルをストリーミングで処理することも可能です。 この関数は、IPFS ファイルのハッシュまたはパス、コールバックの名前、そして動作を変更するためのフラグを受け取ります。 ```typescript import { JSONValue, Value } from '@graphprotocol/graph-ts' @@ -683,9 +683,9 @@ ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) ``` -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. +現在サポートされているフラグは `json` だけで、これは `ipfs.map` に渡さなければなりません。json` フラグを指定すると、IPFS ファイルは一連の JSON 値で構成されます。ipfs.map` を呼び出すと、ファイルの各行を読み込んで `JSONValue` にデシリアライズし、それぞれのコールバックを呼び出します。コールバックは `JSONValue` からデータを格納するためにエンティティ操作を使用することができます。エンティティの変更は、`ipfs.map` を呼び出したハンドラが正常に終了したときのみ保存されます。その間はメモリ上に保持されるので、`ipfs.map` が処理できるファイルのサイズは制限されます。 -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. +成功すると,ipfs.mapは voidを返します。 コールバックの呼び出しでエラーが発生した場合、ipfs.mapを呼び出したハンドラは中止され、サブグラフは失敗とマークされます。 ### Crypto API @@ -693,7 +693,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes '@graphprotocol/graph-ts'から { crypto } をインポートします。 ``` -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: +crypto API は、マッピングで使用できる暗号化関数を提供します。 今のところ、1 つしかありません。 - `crypto.keccak256(input: ByteArray): ByteArray` @@ -703,14 +703,14 @@ The `crypto` API makes a cryptographic functions available for use in mappings. '@graphprotocol/graph-ts'から{ json, JSONValueKind } をインポートします。 ``` -JSON data can be parsed using the `json` API: +JSON データは、json API を使って解析することができます。 -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed +- `json.fromBytes(data: Bytes): JSONValue` - 有効な UTF-8 シーケンスとして解釈され、 `Bytes` 配列から JSON データをパースします。 +- `json.try_fromBytes(data: Bytes): Result` - `json.fromBytes` の安全バージョンで、パースに失敗した場合はエラーバリアントを返します。 +- `json.fromString(data: string): JSONValue` - 有効な UTF-8 `String` から JSON データをパースします。 +- `json.try_fromString(data: string): Result` - `json.fromString` の安全バージョンで、パースに失敗した場合はエラーバリアントを返します。 -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: +JSONValue クラスは、任意の JSON ドキュメントから値を引き出す方法を提供します。 JSON の値には、ブーリアン、数値、配列などがあるため、JSONValueには、値の種類をチェックするためのkindプロパティが付属しています。 ```typescript let value = json.fromBytes(...) @@ -719,63 +719,63 @@ if (value.kind == JSONValueKind.BOOL) { } ``` -In addition, there is a method to check if the value is `null`: +さらに、値がnullかどうかをチェックするメソッドもあります\`: - `value.isNull(): boolean` -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: +値の型が確実な場合は、以下のいずれかの方法で[組み込み型](#built-in-types)に変換することができます: - `value.toBool(): boolean` - `value.toI64(): i64` - `value.toF64(): f64` - `value.toBigInt(): BigInt` - `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) +- value.toArray(): Array`- (その後、上記の 5 つのメソッドのいずれかを使用して`JSONValue\` を変換します) ### タイプ 変換参照 -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | Bigint.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromString(s) | +| String | BigInt | BigDecimal.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### データソースのメタデータ -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: +ハンドラを起動したデータソースのコントラクトアドレス、ネットワーク、コンテキストは、以下のようにして調べることができます。 - `dataSource.address(): Address` - `dataSource.network(): string` @@ -783,7 +783,7 @@ You can inspect the contract address, network and context of the data source tha ### エンティティと DataSourceContext -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: +ベースとなるエンティティクラスと子クラスのDataSourceContextクラスには、フィールドを動的に設定・取得するためのヘルパーが用意されています。 - `setString(key: string, value: string): void` - `setI32(key: string, value: i32): void` @@ -798,11 +798,11 @@ The base `Entity` class and the child `DataSourceContext` class have helpers to - `getBoolean(key: string): boolean` - `getBigDecimal(key: string): BigDecimal` -### DataSourceContext in Manifest +### マニフェスト内のDataSourceContext -The `context` section within `dataSources` allows you to define key-value pairs that are accessible within your subgraph mappings. The available types are `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, and `BigInt`. +DataSources`の`context`セクションでは、サブグラフマッピング内でアクセス可能なキーと値のペアを定義することができます。使用可能な型は`Bool`、`String`、`Int`、`Int8`、`BigDecimal`、`Bytes`、`List`、`BigInt\` です。 -Here is a YAML example illustrating the usage of various types in the `context` section: +以下は `context` セクションのさまざまな型の使い方を示す YAML の例です: ```yaml dataSources: @@ -851,4 +851,4 @@ dataSources: - `List`: Specifies a list of items. Each item needs to specify its type and data. - `BigInt`: Specifies a large integer value. Must be quoted due to its large size. -This context is then accessible in your subgraph mapping files, enabling more dynamic and configurable subgraphs. +このコンテキストは、サブグラフのマッピング・ファイルからアクセスでき、よりダイナミックで設定可能なサブグラフを実現します。 From a294aa0c4210f707981b1c5e713c96e2d90bbc8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:24 -0400 Subject: [PATCH 582/924] New translations api.mdx (Korean) --- website/pages/ko/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/ko/developing/graph-ts/api.mdx b/website/pages/ko/developing/graph-ts/api.mdx index 45bfad8f7bfb..ab5e2b27b49e 100644 --- a/website/pages/ko/developing/graph-ts/api.mdx +++ b/website/pages/ko/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() There are two ways to update an existing entity: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Changing properties is straight forward in most cases, thanks to the generated property setters: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From 232d1b3f5f89cf74afed31bb81dd6c8c613e8cbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:25 -0400 Subject: [PATCH 583/924] New translations api.mdx (Dutch) --- website/pages/nl/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/nl/developing/graph-ts/api.mdx b/website/pages/nl/developing/graph-ts/api.mdx index 45bfad8f7bfb..ab5e2b27b49e 100644 --- a/website/pages/nl/developing/graph-ts/api.mdx +++ b/website/pages/nl/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() There are two ways to update an existing entity: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Changing properties is straight forward in most cases, thanks to the generated property setters: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From 22c555028f7665241ecab96f633b1488ae17b7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:26 -0400 Subject: [PATCH 584/924] New translations api.mdx (Polish) --- website/pages/pl/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/pl/developing/graph-ts/api.mdx b/website/pages/pl/developing/graph-ts/api.mdx index 45bfad8f7bfb..ab5e2b27b49e 100644 --- a/website/pages/pl/developing/graph-ts/api.mdx +++ b/website/pages/pl/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() There are two ways to update an existing entity: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Changing properties is straight forward in most cases, thanks to the generated property setters: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From fed3b9c3b3823aad1cb435172121dbdce6315ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:27 -0400 Subject: [PATCH 585/924] New translations api.mdx (Portuguese) --- website/pages/pt/developing/graph-ts/api.mdx | 425 ++++++++++--------- 1 file changed, 213 insertions(+), 212 deletions(-) diff --git a/website/pages/pt/developing/graph-ts/api.mdx b/website/pages/pt/developing/graph-ts/api.mdx index afbbad0dc2cb..1803d56140f9 100644 --- a/website/pages/pt/developing/graph-ts/api.mdx +++ b/website/pages/pt/developing/graph-ts/api.mdx @@ -2,45 +2,45 @@ title: API AssemblyScript --- -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) +> Nota: Se criou um subgraph antes da versão `0.22.0` do `graph-cli`/`graph-ts`, está a usar uma versão mais antiga do AssemblyScript. Favor conferir o [Guia de Migração](/release-notes/assemblyscript-migration-guide) Esta página documenta quais APIs embutidas podem ser usadas ao escrever mapeamentos de subgraph. Há dois tipos de API disponíveis do início: -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. +- a [biblioteca do Graph TypeScript](https://github.com/graphprotocol/graph-ts) (`graph-ts`) e +- códigos gerados a partir dos arquivos do subgraph por `graph codegen`. -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. +Também é possível adicionar outras bibliotecas como dependências, desde que sejam compatíveis com o [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Como esta é a linguagem na qual são escritos os mapeamentos, a [wiki do AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki) é uma boa referência para a linguagem e as características comuns das bibliotecas. ## Referência da API -The `@graphprotocol/graph-ts` library provides the following APIs: +A biblioteca `@graphprotocol/graph-ts` fornece as seguintes APIs: -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. +- Uma API `ethereum` para trabalhar com contratos inteligentes, eventos, blocos, transações, e valores no Ethereum. +- Uma API `store` para carregar e guardar entidades dentro e fora do armazenamento do Graph Node. +- Uma API `log` para gravar mensagens ao resultado do Graph Node e ao Graph Explorer. +- Uma API `ipfs` para carregar arquivos do IPFS. +- Uma API `json` para analisar dados em JSON. +- Uma API `crypto` para usar funções criptográficas. - Primitivos de baixo nível para traduzir entre sistemas de tipos diferentes, como Ethereum, JSON, GraphQL e AssemblyScript. ### Versões -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. +No manifest do subgraph, `apiVersion` especifica a versão da API de mapeamento, executada pelo Graph Node para um subgraph. -| Versão | Notas de atualização | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Versão | Notas de atualização | +| :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 0.0.7 | Classes `TransactionReceipt` e `Log` adicionadas aos tipos do EthereumCampo
    Campo `receipt` adicionado ao objeto Ethereum Event | +| 0.0.6 | Campo `nonce` adicionado ao objeto Ethereum TransactionCampo
    `baseFeePerGas` adicionado ao objeto Ethereum Block | +| 0.0.5 | AssemblyScript atualizado à versão 0.19.10 (inclui mudanças recentes, favor ler o [`Guia de Migração`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renomeado para `ethereum.transaction.gasLimit` | +| 0.0.4 | Campo `functionSignature` adicionado ao objeto Ethereum SmartContractCall | +| 0.0.3 | Campo `from` adicionado ao objeto Ethereum
    `Calletherem.call.address` renomeado para `ethereum.call.to` | +| 0.0.2 | Campo `input` adicionado ao objeto Ethereum Transaction | ### Tipos Embutidos -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). +A documentação sobre os tipos de base embutidos no AssemblyScript está na [wiki do AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki/Types). -The following additional types are provided by `@graphprotocol/graph-ts`. +Os seguintes tipos adicionais são fornecidos pelo `@graphprotocol/graph-ts`. #### ByteArray @@ -48,26 +48,26 @@ The following additional types are provided by `@graphprotocol/graph-ts`. import { ByteArray } from '@graphprotocol/graph-ts' ``` -`ByteArray` represents an array of `u8`. +`ByteArray` representa um arranjo de `u8`. -_Construction_ +_Construção_ -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. +- `fromI32(x: i32): ByteArray` - Decompõe x em bytes. +- `fromHexString(hex: string): ByteArray` — O comprimento da entrada deve ser par. É facultativo prefixar com 0x. -_Type conversions_ +_Conversões de tipo_ -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. +- `toHexString(): string` — Converte numa cadeia de caracteres hex prefixada com 0x\`. +- `toString(): string` — Interpreta os bytes como uma cadeia de caracteres UTF-8. +- `toBase58(): string` — Codifica os bytes como uma cadeia base58. +- `toU32(): u32` — Interpreta os bytes como um `u32` little-endian. Não funciona em caso de overflow. +- `toI32(): i32` - Interpreta o arranjo de byte como um `i32` little-endian. Não funciona em caso de overflow. -_Operators_ +_Operadores_ -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` +- `equals(y: ByteArray): bool` — pode ser escrito como x == y\`. +- `concat(other: ByteArray) : ByteArray` — retorna um novo `ByteArray` que consiste de `this` diretamente seguido de `other` +- `concatI32(other: i32) : ByteArray` — retorna um novo `ByteArray` que consiste de `this` diretamente seguido pela representação em byte de `other` #### BigDecimal @@ -75,32 +75,32 @@ _Operators_ import { BigDecimal } from '@graphprotocol/graph-ts' ``` -`BigDecimal` is used to represent arbitrary precision decimals. +O `BigDecimal` é usado para representar decimais de precisão arbitrária. -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. +> Nota: [Internalmente](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs), o `BigDecimal` é armazenado no [formato de ponto flutuante IEEE-754 decimal128](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), que apoia 34 dígitos decimais de significando. Portanto, o `BigDecimal` não serve para representar tipos de ponto fixo que possam exceder 34 dígitos, como um (ufixed256x18)[https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers] em Solidity ou equivalente. -_Construction_ +_Construção_ -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. +- `constructor(bigInt: BigInt)` – cria um `BigDecimal` a partir de um `BigInt`. +- `static fromString(s: string): BigDecimal` — faz uma análise sintática a partir de uma cadeia decimal. -_Type conversions_ +_Conversões de tipo_ -- `toString(): string` – prints to a decimal string. +- `toString(): string` — imprime para uma cadeia decimal. -_Math_ +_Matemática_ -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. +- `plus(y: BigDecimal): BigDecimal` — pode ser escrito como `x + y`. +- `minus(y: BigDecimal): BigDecimal` — pode ser escrito como `x - y`. +- `times(y: BigDecimal): BigDecimal` — pode ser `x * y`. +- `div(y: BigDecimal): BigDecimal` — pode ser escrito como `x / y`. +- `equals(y: BigDecimal): bool` — pode ser `x == y`. +- `notEqual(y: BigDecimal): bool` — pode ser `x != y`. +- `lt(y: BigDecimal): bool` — pode ser `x < y`. +- `le(y: BigDecimal): bool` – pode ser `x <= y`. +- `gt(y: BigDecimal): bool` – pode ser `x > y`. +- `ge(y: BigDecimal): bool` – pode ser `x >= y`. +- `neg(): BigDecimal` - pode ser `-x`. #### BigInt @@ -108,53 +108,53 @@ _Math_ import { BigInt } from '@graphprotocol/graph-ts' ``` -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. +O `BigInt` é usado para representar números inteiros grandes, inclusive valores em Ethereum de `uint32` até `uint256`, e `int64` até `int256`. Tudo abaixo de `uint32`, como o `int32`, `uint24` ou `int8` é representado como `i32`. -The `BigInt` class has the following API: +A classe `BigInt` tem a seguinte API: -_Construction_ +_Construção_ -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. +- `BigInt.fromI32(x: i32): BigInt` – cria um `BigInt` de um `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. +- `BigInt.fromString(s: string): BigInt`– Analisa um `BigInt` de uma cadeia. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` — Interpreta `bytes` como um inteiro little-endian, não assinado. Se a sua entrada for big-endian, chame pelo `.reverse()` primeiro. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromSignedBytes(x: Bytes): BigInt` — Interpreta `bytes` como um inteiro little-endian, assinado. Se a sua entrada for big-endian, chame pelo `.reverse()` primeiro. - _Type conversions_ + _Conversões de tipo_ -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. +- `x.toHex(): string` — transforma o `BigInt` numa cadeia de caracteres hexadecimais. -- `x.toString(): string` – turns `BigInt` into a decimal number string. +- `x.toString(): string` — transforma o `BigInt` numa cadeia de números decimais. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. +- `x.toI32(): i32` — retorna o `BigInt` como um `i32`; falha se o valor não couber no `i32`. É bom verificar o `x.isI32()` primeiro. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. +- `x.toBigDecimal(): BigDecimal` — converte num decimal sem fracionário. -_Math_ +_Matemática_ -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. +- `x.plus(y: BigInt): BigInt` – pode ser escrito como `x + y`. +- `x.minus(y: BigInt): BigInt` – pode ser escrito como `x - y`. +- `x.times(y: BigInt): BigInt` – pode ser escrito como `x * y`. +- `x.div(y: BigInt): BigInt` – pode ser escrito como `x / y`. +- `x.mod(y: BigInt): BigInt` – pode ser escrito como `x % y`. +- `x.equals(y: BigInt): bool` – pode ser escrito como `x == y`. +- `x.notEqual(y: BigInt): bool` – pode ser escrito como `x != y`. +- `x.lt(y: BigInt): bool` – pode ser escrito como `x < y`. +- `x.le(y: BigInt): bool` – pode ser escrito como `x <= y`. +- `x.gt(y: BigInt): bool` – pode ser escrito como `x > y`. +- `x.ge(y: BigInt): bool` – pode ser escrito como `x >= y`. +- `x.neg(): BigInt` – pode ser escrito como `-x`. +- `x.divDecimal(y: BigDecimal): BigDecimal` – divide por um decimal e dá um resultado decimal. +- `x.isZero(): bool` — Conveniência para conferir se o número é zero. +- `x.isl32(): bool` — Confere se o número cabe em um `i32`. +- `x.abs(): BigInt` — Valor absoluto. +- `x.pow(exp: u8): BigInt` — Exponenciação. +- `bitOr(x: BigInt, y: BigInt): BigInt` — pode ser escrito como `x | y`. +- `bitAnd(x: BigInt, y: BigInt): BigInt` — pode ser escrito como `x & y`. +- `leftShift(x: BigInt, bits: u8): BigInt` – pode ser escrito como `x << y`. +- `rightShift(x: BigInt, bits: u8): BigInt` – pode ser escrito como `x >> y`. #### TypedMap @@ -162,15 +162,16 @@ _Math_ import { TypedMap } from '@graphprotocol/graph-ts' ``` -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). +O `TypedMap` pode servir para armazenar pares de chave e valor (key e value +). Confira [este exemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). -The `TypedMap` class has the following API: +A classe `TypedMap` tem a seguinte API: -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not +- `new TypedMap()` — cria um mapa vazio com chaves do tipo `K` e valores do tipo `V` +- `map.set(key: K, value: V): void` — coloca o valor do `key` como `value` +- `map.getEntry(key: K): TypedMapEntry | null` — retorna o par de valor-chave para um `key` ou `null` se o `key` não existir no mapa +- `map.get(key: K): V | null` — retorna o valor para um `key` ou `null` se o `key` não existir no mapa +- `map.isSet(key: K): bool` — retorna `true` se o `key` existir no mapa e `false` se não existir #### Bytes @@ -178,25 +179,25 @@ The `TypedMap` class has the following API: import { Bytes } from '@graphprotocol/graph-ts' ``` -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. +O `Bytes` serve para representar arranjos de comprimento arbitrário de bytes. Isto inclui valores do Ethereum do tipo `bytes`, `bytes32`, etc. -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: +A classe `Bytes` estende o [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) do AssemblyScript. Isto apoia toda a funcionalidade `Uint8Array`, além dos novos métodos a seguir: -_Construction_ +_Construção_ -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes +- `fromHexString(hex: string) : Bytes` — Converte a cadeia `hex`, que deve consistir de um número par de dígitos hexadecimais para um `ByteArray`. Opcionalmente, a cadeia `hex` pode começar com `0x` +- `fromI32(i: i32) : Bytes` - Converte o `i` em um arranjo de bytes -_Type conversions_ +_Conversões de tipo_ -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) +- `b.toHex()` — retorna uma cadeia hexadecimal que representa os bytes no arranjo +- `b.toString()` — converte os bytes no arranjo para uma cadeia de caracteres em unicode +- `b.toBase58()` — transforma um valor de Ethereum Bytes numa codificação base58 (usado para hashes IPFS) -_Operators_ +_Operadores_ -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` +- `b.concat(other: Bytes) : Bytes` - - retorna um novo `Bytes` que consiste de `this` diretamente seguido por `other` +- `b.concatI32(other: i32) : ByteArray` — retorna um novo `Bytes` que consiste de `this` diretamente seguido pela representação em byte de `other` #### Address @@ -204,12 +205,12 @@ _Operators_ import { Address } from '@graphprotocol/graph-ts' ``` -`Address` extends `Bytes` to represent Ethereum `address` values. +`Address` estende o `Bytes` para representar valores de `address` do Ethereum. -It adds the following method on top of the `Bytes` API: +Ele adiciona o seguinte método em cima da API `Bytes`: -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error +- `Address.fromString(s: string): Address` — cria um `Address` a partir de uma cadeia hexadecimal +- `Address.fromBytes(b: Bytes): Address` — cria um `Address` a partir do `b`, que deve ter o comprimento exato de 20 bytes. Preencher um valor com menos ou mais bytes causará um erro ### Armazenamento da API @@ -217,9 +218,9 @@ It adds the following method on top of the `Bytes` API: import { store } from '@graphprotocol/graph-ts' ``` -The `store` API allows to load, save and remove entities from and to the Graph Node store. +A API `store` permite carregar, salvar e remover entidades do/para o armazenamento do Graph Node. -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. +As entidades escritas no armazenamento mapeam um-por-um com os tipos de `@entity` definidos no schema GraphQL do subgraph. Para trabalhar com estas entidades de forma conveniente, o comando `graph codegen` fornecido pelo [Graph CLI](https://github.com/graphprotocol/graph-cli) gera classes de entidades, que são subclasses do tipo embutido `Entity`, com getters e setters para os campos no schema e métodos para carregar e salvar estas entidades. #### Como criar entidades @@ -248,7 +249,7 @@ export function handleTransfer(event: TransferEvent): void { } ``` -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. +Quando um evento `Transfer` é encontrado durante o processamento da chain, ele é passado para o handler de evento `handleTransfer` com o tipo `Transfer` gerado (apelidado de `TransferEvent` aqui, para evitar confusões com o tipo de entidade). Este tipo permite o acesso a dados como a transação parente do evento e seus parâmetros. Cada entidade deve ter um ID única para evitar colisões com outras entidades. É bem comum que parâmetros de eventos incluam um identificador único a ser usado. Nota: usar o mesmo hash de transação como ID presume que nenhum outro evento na mesma transação criará entidades a usar este hash como o ID. @@ -266,13 +267,13 @@ if (transfer == null) { // Use a entidade Transfer como antes ``` -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. +Como a entidade pode ainda não existir no armazenamento, o método `load` retorna um valor de tipo `Transfer | null`. Portanto, é bom prestar atenção ao caso `null` antes de usar o valor. -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. +> **Nota:** Só é necessário carregar entidades se as mudanças feitas no mapeamento dependem dos dados anteriores de uma entidade. Veja a próxima seção para ver as duas maneiras de atualizar entidades existentes. #### Como consultar entidades criadas dentro de um bloco -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. +Desde o `graph-node` v0.31.0, o `@graphprotocol/graph-ts` v0.30.0 e o `@graphprotocol/graph-cli v0.49.0`, o método `loadInBlock` está disponível em todos os tipos de entidade. A API do armazenamento facilita o resgate de entidades que foram criadas ou atualizadas no bloco atual. Um caso comum: um handler cria uma Transação de algum evento on-chain, e um handler seguinte quer acessar esta transação caso ela exista. Se a transação não existe, o subgraph deve acessar o banco de dados para descobrir que a entidade não existe; se o autor do subgraph já souber que a entidade deve ter sido criada no mesmo bloco, o uso do loadInBlock evita esta volta pelo banco de dados. Para alguns subgraphs, estas consultas perdidas podem contribuir muito para o tempo de indexação. @@ -286,11 +287,11 @@ if (transfer == null) { // Use a entidade Transfer como antes ``` -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. +> Nota: se não houver nenhuma entidade criada no bloco dado, o `loadInBlock` retornará um `null` mesmo se houver uma entidade com o ID dado no armazenamento. #### Como buscar entidades derivadas -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. +A partir da versão 0.31.0 do `graph-node`, `@graphprotocol/graph-ts` v0.31.0 e a versão 0.51.0 do `@graphprotocol/graph-cli`, está disponível o método `loadRelated`. Isto permite o carregamento de campos de entidade derivada a partir de um event handler. Por exemplo, considerando o schema a seguir: @@ -307,7 +308,7 @@ type Holder @entity { } ``` -The following code will load the `Token` entity that the `Holder` entity was derived from: +O código a seguir carregará a entidade `Token` de que foi derivada a entidade `Holder`: ```typescript let holder = Holder.load('test-id') @@ -319,8 +320,8 @@ let tokens = holder.tokens.load() Há duas maneiras de atualizar uma entidade existente: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Carregar a entidade com, por ex., `Transfer.load(id)`, determinar as propriedades da entidade, e então usar o `.save()` para colocá-la no armazenamento. +2. Simplesmente criar a entidade com, por ex., `new Transfer(id)`, determinar as propriedades da entidade, e depois colocá-la no armazenamento com `.save()`. Se a entidade já existir, as mudanças serão integradas a ela. Geralmente é simples mudar propriedades, graças aos setters de propriedade gerados: @@ -338,9 +339,9 @@ transfer.from.unset() transfer.from = null ``` -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. +Isto só funciona com propriedades opcionais; por ex., propriedades declaradas sem um `!` no GraphQL. Dois exemplos seriam `owner: Bytes` ou `amount: BigInt`. -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. +Atualizar propriedades de arranjos é um processo um pouco mais envolvido, pois pegar um arranjo de uma entidade cria uma cópia deste mesmo arranjo. Isto significa que as propriedades de arranjos devem ser impostas explicitamente após mudar um arranjo. O seguinte assume que o `entity` tem um campo `numbers: [BigInt!]!`. ```typescript // Isto não funcionará @@ -356,7 +357,7 @@ entity.save() #### Como remover entidades do armazenamento -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: +Atualmente, não há como remover uma entidade através dos tipos gerados. Em vez disto, o processo requer a passagem do ID da entidade e do nome do tipo da mesma ao `store.remove`: ```typescript import { store } from '@graphprotocol/graph-ts' @@ -371,9 +372,9 @@ A API do Ethereum fornece acesso a contratos inteligentes, variáveis de estado #### Apoio para Tipos no Ethereum -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. +Assim como em entidades, o `graph codegen` gera classes para todos os contratos inteligentes e eventos usados em um subgraph. Para isto, as ABIs dos contratos devem ser parte da fonte de dados no manifest do subgraph. Tipicamente, os arquivos da ABI são armazenados em uma pasta `abis/`. -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. +Com as classes geradas, conversões entre tipos no Ethereum e os [tipos embutidos](#built-in-types) acontecem em segundo plano para que os autores de subgraphs não precisem se preocupar com elas. Veja um exemplo a seguir. Considerando um schema de subgraph como @@ -386,7 +387,7 @@ type Transfer @entity { } ``` -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: +e uma assinatura de evento `Transfer(address,address,uint256)` na Ethereum, os valores `from`, `to` e `amount` do tipo `address`, `address` and `uint256` são convertidos para `Address` and `BigInt`, o que permite que sejam passados para as propriedades `Bytes!` and `BigInt!` da entidade `Transfer`: ```typescript let id = event.transaction.hash @@ -399,7 +400,7 @@ transfer.save() #### Eventos e Dados de Blocos/Transações -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): +Eventos de Ethereum passados para handlers de eventos, como o evento `Transfer` nos exemplos anteriores, não só permitem acessar os parâmetros de evento, mas também sua transação parente e o bloco de qual fazem parte. Os seguintes dados podem ser obtidos de instâncias `event` (estas classes são parte do módulo `ethereum` no `graph-ts`): ```typescript class Event { @@ -474,7 +475,7 @@ class Log { #### Acesso ao Estado do Contrato Inteligente -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. +O código gerado pelo `graph codegen` também inclui classes para os contratos inteligentes usados no subgraph. Estes servem para acessar variáveis de estado público e funções de chamada do contrato no bloco atual. É comum acessar o contrato de qual origina um evento. Isto é feito com o seguinte código: @@ -493,15 +494,15 @@ export function handleTransfer(event: TransferEvent) { } ``` -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type +O `Transfer` é apelidado de `TransferEvent` aqui para evitar confusões de nomenclatura com o tipo da entidade -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. +Enquanto o `ERC20Contract` no Ethereum tiver uma função pública de apenas-leitura chamada `symbol`, ele pode ser chamado com o `.symbol()`. Para variáveis de estado público, um método com o mesmo nome é criado automaticamente. Qualquer outro contrato que seja parte do subgraph pode ser importado do código gerado e ligado a um endereço válido. #### Como Lidar com Chamadas Revertidas -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: +Se os métodos de apenas-leitura do seu contrato forem revertidos, chame o método do contrato gerado prefixado com `try_`. Por exemplo, o contrato do Gravity expõe o método `gravatarToOwner`. Este código poderia lidar com uma reversão naquele método: ```typescript let gravity = Gravity.bind(event.address) @@ -517,7 +518,7 @@ Note que um Graph Node conectado a um cliente Geth ou Infura pode não detectar #### ABI de Codificação/Decodificação -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. +Dados podem ser codificados e decodificados conforme o formato de codificação da ABI do Ethereum, através das funções `encode` e `decode` no módulo `ethereum`. ```typescript import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' @@ -537,8 +538,8 @@ let decoded = ethereum.decode('(address,uint256)', encoded) Para mais informações: - [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). +- Codificação e decodificação da [biblioteca/CLI do Rust](https://github.com/rust-ethereum/ethabi) +- Um [exemplo mais complexo](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). ### API de Logging @@ -546,17 +547,17 @@ Para mais informações: import { log } from '@graphprotocol/graph-ts' ``` -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. +A API `log` permite que os subgraphs gravem informações à saída padrão do Graph Node, assim como ao Graph Explorer. Mensagens podem ser gravadas com níveis diferentes de log. É fornecida uma sintaxe básica de formatação de strings para compor mensagens de log do argumento. -The `log` API includes the following functions: +A API `log` inclui as seguintes funções: -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. +- `log.debug(fmt: string, args: Array): void` — loga uma mensagem de debug. +- `log.info(fmt: string, args: Array): void` - loga uma mensagem de debug. +- `log.warning(fmt: string, args: Array): void` - loga um aviso. +- `log.error(fmt: string, args: Array): void` - loga uma mensagem de erro. +- `log.critical(fmt: string, args: Array): void` – loga uma mensagem crítica _e_ encerra o subgraph. -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. +A API `log` toma um string de formato e um arranjo de valores de string. Ele então substitui os temporários com os valores de strings do arranjo. O primeiro `{}` temporário é substituído pelo primeiro valor no arranjo, o segundo `{}` temporário é substituído pelo segundo valor, e assim por diante. ```typescript log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) @@ -566,7 +567,7 @@ log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue. ##### Como logar um único valor -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: +No exemplo abaixo, o valor de string "A" é passado a um arranjo para tornar-se `['A']` antes de ser registado no log: ```typescript let myValue = 'A' @@ -592,7 +593,7 @@ export function handleSomeEvent(event: SomeEvent): void { #### Como logar várias entradas de um arranjo existente -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. +Cada entrada no arranjo dos argumentos exige o seu próprio `{}` no string de mensagens de log. O exemplo abaixo contém três `{}` temporários na mensagem de log. Por causa disto, são registados todos os três valores no `myArray`. ```typescript let myArray = ['A', 'B', 'C'] @@ -636,7 +637,7 @@ export function handleSomeEvent(event: SomeEvent): void { import { ipfs } from '@graphprotocol/graph-ts' ``` -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. +Contratos inteligentes ocasionalmente ancoram arquivos IPFS on-chain. Assim, os mapeamentos obtém os hashes IPFS do contrato e lêem os arquivos correspondentes do IPFS. Os dados dos arquivos serão retornados como `Bytes`, o que costuma exigir mais processamento; por ex., com a API `json` documentada mais abaixo nesta página. Considerando um hash ou local IPFS, um arquivo do IPFS é lido da seguinte maneira: @@ -651,9 +652,9 @@ let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' let data = ipfs.cat(path) ``` -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. +**Nota**: O `ipfs.cat` não é determinístico no momento. Se o arquivo não puder ser retirado sobre a rede IPFS antes do tempo do pedido acabar, ele retornará um `null`. Com isto, sempre vale a pena procurar o `null` no resultado. -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: +Também é possível processar arquivos maiores em streaming com o `ipfs.map`. A função espera o hash ou local de um arquivo IPFS, o nome de um callback, e flags para modificar o seu comportamento: ```typescript import { JSONValue, Value } from '@graphprotocol/graph-ts' @@ -683,9 +684,9 @@ ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) ``` -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. +O único flag atualmente apoiado é o `json`, que deve ser passado ao `ipfs.map`. Com o flag `json`, o arquivo IPFS deve consistir de uma série de valores JSON, com um valor por linha. Chamar `ipfs.map`, irá ler cada linha no arquivo, desserializá-lo em um `JSONValue`, e chamar o callback para cada linha. O callback pode então armazenar dados do `JSONValue` com operações de entidade. As mudanças na entidade só serão armazenadas quando o handler que chamou o `ipfs.map` concluir com sucesso; enquanto isso, elas ficam na memória, e o tamanho do arquivo que o `ipfs.map` pode processar é então limitado. -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. +Em caso de sucesso, o `ipfs.map` retorna `void`. Se qualquer invocação do callback causar um erro, o handler que invocou o `ipfs.map` é abortado, e o subgraph é marcado como falho. ### API de Criptografia @@ -693,7 +694,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes import { crypto } from '@graphprotocol/graph-ts' ``` -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: +A API `crypto` disponibiliza funções criptográficas para uso em mapeamentos. No momento, apenas um está disponível: - `crypto.keccak256(input: ByteArray): ByteArray` @@ -703,14 +704,14 @@ The `crypto` API makes a cryptographic functions available for use in mappings. import { json, JSONValueKind } from '@graphprotocol/graph-ts' ``` -JSON data can be parsed using the `json` API: +Dados em JSON podem ser analisados com a API `json`: -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed +- `json.fromBytes(data: Bytes): JSONValue` — analisa dados JSON de um arranjo `Bytes` interpretado como uma sequência válida de UTF-8 +- `json.try_fromBytes(data: Bytes): Result`— versão segura do `json.fromBytes`, retorna um erro se houver falha no parsing +- `json.fromString(data: string): JSONValue` — faz parsing de dados JSON de um String em UTF-8 válido\` +- `json.try_fromString(data: string): Result` – versão segura do `json.fromString`, retorna um erro se houver falha no parsing -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: +A classe `JSONValue` fornece uma maneira de retirar valores de um documento JSON arbitrário. Como valores JSON podem ser booleans, números, arranjos e mais, o `JSONValue` vem com uma propriedade `kind` para conferir o tipo de um valor: ```typescript let value = json.fromBytes(...) @@ -719,63 +720,63 @@ if (value.kind == JSONValueKind.BOOL) { } ``` -In addition, there is a method to check if the value is `null`: +Além disso, há um método para conferir se o valor é `null`: - `value.isNull(): boolean` -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: +Quando o tipo de um valor é confirmado, ele pode ser convertido num [tipo embutido](#built-in-types) usando um dos seguintes métodos: - `value.toBool(): boolean` - `value.toI64(): i64` - `value.toF64(): f64` - `value.toBigInt(): BigInt` - `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) +- `value.toArray(): Array` - (e depois converter o `JSONValue` com um dos 5 métodos acima) ### Referência de Conversões de Tipos -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Fonte(s) | Destino | Função de conversão | +| ------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | nenhum | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | nenhum | +| Bytes (assinado) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (não assinado) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | nenhum | +| int32 | i32 | nenhum | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | nenhum | +| int64 - int256 | BigInt | nenhum | +| uint32 - uint256 | BigInt | nenhum | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadados de Fontes de Dados -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: +É possível inspecionar o endereço do contrato, a rede, e o contexto das fontes de dados que invocaram o handler através do namespace `dataSource`: - `dataSource.address(): Address` - `dataSource.network(): string` @@ -783,7 +784,7 @@ You can inspect the contract address, network and context of the data source tha ### Entidade e DataSourceContext -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: +A classe base `Entity` e a subclasse `DataSourceContext` têm helpers para determinar e retornar campos de forma dinâmica: - `setString(key: string, value: string): void` - `setI32(key: string, value: i32): void` @@ -800,9 +801,9 @@ The base `Entity` class and the child `DataSourceContext` class have helpers to ### DataSourceContext no Manifest -The `context` section within `dataSources` allows you to define key-value pairs that are accessible within your subgraph mappings. The available types are `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, and `BigInt`. +A seção `context` dentro do `dataSources` lhe permite definir pares key-value acessíveis dentro dos seus mapeamentos de subgraph. Os tipos disponíveis são `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, e `BigInt`. -Here is a YAML example illustrating the usage of various types in the `context` section: +Aqui está um exemplo de YAML que ilustra o uso de vários tipos na seção `context`: ```yaml dataSources: @@ -842,13 +843,13 @@ dataSources: data: '1000000000000000000000000' ``` -- `Bool`: Specifies a Boolean value (`true` or `false`). -- `String`: Specifies a String value. -- `Int`: Specifies a 32-bit integer. -- `Int8`: Specifies an 8-bit integer. -- `BigDecimal`: Specifies a decimal number. Must be quoted. -- `Bytes`: Specifies a hexadecimal string. -- `List`: Specifies a list of items. Each item needs to specify its type and data. -- `BigInt`: Specifies a large integer value. Must be quoted due to its large size. +- `Bool`: Especifica um valor Boolean (`true` ou `false`). +- `String`: Especifica um valor String. +- `Int`: Especifica um integral de 32 bits. +- `Int8`: Especifica um integral de 8 bits. +- `BigDecimal`: Especifica um número decimal. Deve ser citado. +- `Bytes`: Especifica um string hexadecimal. +- `List`: Especifica uma lista de itens. Cada item deve especificar o seu tipo e dados. +- `BigInt`: Especifica um valor integral largo. É necessário citar este devido ao seu grande tamanho. Este contexto, então, pode ser acessado nos seus arquivos de mapeamento de subgraph, o que resulta em subgraphs mais dinâmicos e configuráveis. From 799950f6e034c82a57d041f3d7886f32745cb5e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:28 -0400 Subject: [PATCH 586/924] New translations api.mdx (Russian) --- website/pages/ru/developing/graph-ts/api.mdx | 106 ++++++++++--------- 1 file changed, 54 insertions(+), 52 deletions(-) diff --git a/website/pages/ru/developing/graph-ts/api.mdx b/website/pages/ru/developing/graph-ts/api.mdx index 6669e951f9fa..ee862b0468c2 100644 --- a/website/pages/ru/developing/graph-ts/api.mdx +++ b/website/pages/ru/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Версия | Примечания к релизу | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Версия | Примечания к релизу | +| :----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Встроенные типы @@ -229,7 +229,7 @@ Entities written to the store map one-to-one to the `@entity` types defined in t // Импорт класса событий Transfer, сгенерированного из ERC20 ABI import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' -// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL +// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL import { Transfer } from '../generated/schema' событие // Обработчик события передачи @@ -263,6 +263,7 @@ if (transfer == null) { transfer = new Transfer(id) } + // Используйте объект Transfer, как и раньше ``` @@ -283,6 +284,7 @@ if (transfer == null) { transfer = new Transfer(id) } + // Используйте объект Transfer, как и раньше ``` @@ -319,8 +321,8 @@ let tokens = holder.tokens.load() Существует два способа обновить существующий объект: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Изменение свойств в большинстве случаев не вызывает затруднений благодаря сгенерированным установщикам свойств: @@ -659,8 +661,8 @@ It is also possible to process larger files in a streaming fashion with `ipfs.ma import { JSONValue, Value } from '@graphprotocol/graph-ts' export function processItem(value: JSONValue, userData: Value): void { - // Смотрите документацию по JsonValue для получения подробной информации о работе - // со значениями JSON +// Смотрите документацию по JsonValue для получения подробной информации о работе +// со значениями JSON let obj = value.toObject() let id = obj.get('id') let title = obj.get('title') @@ -669,7 +671,7 @@ export function processItem(value: JSONValue, userData: Value): void { return } - // Обратные вызовы также могут создавать объекты +// Обратные вызовы также могут создавать объекты let newItem = new Item(id) newItem.title = title.toString() newitem.parent = userData.toString() // Установите для родителя значение "parentId" @@ -734,44 +736,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Справка по преобразованию типов -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ----------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() или s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() или s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() или s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() или s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Метаданные источника данных From fd16e0d0bdcaa743ba3dd04d7cb9575d0e778790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:29 -0400 Subject: [PATCH 587/924] New translations api.mdx (Swedish) --- website/pages/sv/developing/graph-ts/api.mdx | 240 ++++++++++--------- 1 file changed, 125 insertions(+), 115 deletions(-) diff --git a/website/pages/sv/developing/graph-ts/api.mdx b/website/pages/sv/developing/graph-ts/api.mdx index 7b12c7bb5e49..82b1600993e1 100644 --- a/website/pages/sv/developing/graph-ts/api.mdx +++ b/website/pages/sv/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Versionsanteckningar | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Versionsanteckningar | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Inbyggda typer @@ -159,7 +159,7 @@ _Math_ #### TypedMap ```typescript -import { TypedMap } from '@graphprotocol/graph-ts' +import { TypedMap } from "@graphprotocol/graph-ts"; ``` `TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). @@ -175,7 +175,7 @@ The `TypedMap` class has the following API: #### Bytes ```typescript -import { Bytes } from '@graphprotocol/graph-ts' +import { Bytes } from "@graphprotocol/graph-ts"; ``` `Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. @@ -201,7 +201,7 @@ _Operators_ #### Address ```typescript -import { Address } from '@graphprotocol/graph-ts' +import { Address } from "@graphprotocol/graph-ts"; ``` `Address` extends `Bytes` to represent Ethereum `address` values. @@ -214,7 +214,7 @@ It adds the following method on top of the `Bytes` API: ### Store API ```typescript -import { store } from '@graphprotocol/graph-ts' +import { store } from "@graphprotocol/graph-ts"; ``` The `store` API allows to load, save and remove entities from and to the Graph Node store. @@ -227,24 +227,24 @@ Följande är ett vanligt mönster för att skapa entiteter från Ethereum-händ ```typescript // Importera händelseklassen Transfer som genererats från ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' +import { Transfer as TransferEvent } from "../generated/ERC20/ERC20"; // Importera entitetstypen Transfer som genererats från GraphQL-schemat -import { Transfer } from '../generated/schema' +import { Transfer } from "../generated/schema"; // Händelsehanterare för överföring export function handleTransfer(event: TransferEvent): void { // Skapa en Transfer-entitet, med transaktionshash som enhets-ID - let id = event.transaction.hash - let transfer = new Transfer(id) + let id = event.transaction.hash; + let transfer = new Transfer(id); // Ange egenskaper för entiteten med hjälp av händelseparametrarna - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount + transfer.from = event.params.from; + transfer.to = event.params.to; + transfer.amount = event.params.amount; // Spara entiteten till lagret - transfer.save() + transfer.save(); } ``` @@ -257,10 +257,10 @@ Varje entitet måste ha en unik ID för att undvika kollisioner med andra entite Om en entitet redan finns kan den laddas från lagret med följande: ```typescript -let id = event.transaction.hash // eller hur ID konstrueras -let transfer = Transfer.load(id) +let id = event.transaction.hash; // eller hur ID konstrueras +let transfer = Transfer.load(id); if (transfer == null) { - transfer = new Transfer(id) + transfer = new Transfer(id); } // Använd överföringsenheten som tidigare @@ -277,10 +277,10 @@ As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotoco API:et för lagret underlättar hämtningen av entiteter som skapades eller uppdaterades i det aktuella blocket. En vanlig situation för detta är att en hanterare skapar en transaktion från någon händelse på kedjan, och en senare hanterare vill komma åt denna transaktion om den finns. I det fall då transaktionen inte finns, måste subgraphen gå till databasen bara för att ta reda på att entiteten inte finns; om subgraphförfattaren redan vet att entiteten måste ha skapats i samma block, undviker man detta databasbesök genom att använda loadInBlock. För vissa subgrapher kan dessa missade sökningar bidra avsevärt till indexeringstiden. ```typescript -let id = event.transaction.hash // eller hur ID konstrueras -let transfer = Transfer.loadInBlock(id) +let id = event.transaction.hash; // eller hur ID konstrueras +let transfer = Transfer.loadInBlock(id); if (transfer == null) { - transfer = new Transfer(id) + transfer = new Transfer(id); } // Använd överföringsenheten som tidigare @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() Det finns två sätt att uppdatera en befintlig entitet: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Att ändra egenskaper är rakt fram i de flesta fall, tack vare de genererade egenskapsinställarna: @@ -334,7 +334,7 @@ transfer.amount = ... Det är också möjligt att avaktivera egenskaper med en av följande två instruktioner: ```typescript -transfer.from.unset() +transfer.from.unset(); transfer.from = null ``` @@ -344,14 +344,14 @@ Updating array properties is a little more involved, as the getting an array fro ```typescript // Detta kommer inte att fungera -entity.numbers.push(BigInt.fromI32(1)) -entity.save() +entity.numbers.push(BigInt.fromI32(1)); +entity.save(); // Detta kommer att fungera -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() +let numbers = entity.numbers; +numbers.push(BigInt.fromI32(1)); +entity.numbers = numbers; +entity.save(); ``` #### Ta bort entiteter från lagret @@ -389,12 +389,12 @@ type Transfer @entity { and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: ```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() +let id = event.transaction.hash; +let transfer = new Transfer(id); +transfer.from = event.params.from; +transfer.to = event.params.to; +transfer.amount = event.params.amount; +transfer.save(); ``` #### Händelser och Block/Transaktionsdata @@ -480,16 +480,19 @@ En vanlig mönster är att komma åt kontraktet från vilket en händelse härst ```typescript // Importera den genererade kontraktsklassen och den genererade klassen för överföringshändelser -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' +import { + ERC20Contract, + Transfer as TransferEvent, +} from "../generated/ERC20Contract/ERC20Contract"; // Importera den genererade entitetsklassen -import { Transfer } from '../generated/schema' +import { Transfer } from "../generated/schema"; export function handleTransfer(event: TransferEvent) { // Bind kontraktet till den adress som skickade händelsen - let contract = ERC20Contract.bind(event.address) + let contract = ERC20Contract.bind(event.address); // Åtkomst till tillståndsvariabler och funktioner genom att anropa dem - let erc20Symbol = contract.symbol() + let erc20Symbol = contract.symbol(); } ``` @@ -504,12 +507,12 @@ Andra kontrakt som är en del av subgraphen kan importeras från den genererade If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: ```typescript -let gravitera = gravitera.bind(event.address) -let callResult = gravitera_gravatarToOwner(gravatar) +let gravitera = gravitera.bind(event.address); +let callResult = gravitera_gravatarToOwner(gravatar); if (callResult.reverted) { - log.info('getGravatar reverted', []) + log.info("getGravatar reverted", []); } else { - let owner = callResult.value + let owner = callResult.value; } ``` @@ -543,7 +546,7 @@ För ytterligare information: ### API för loggning ```typescript -import { log } from '@graphprotocol/graph-ts' +import { log } from "@graphprotocol/graph-ts"; ``` The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. @@ -559,7 +562,11 @@ The `log` API includes the following functions: The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. ```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) +log.info("Message to be displayed: {}, {}, {}", [ + value.toString(), + anotherValue.toString(), + "already a string", +]); ``` #### Loggning av ett eller flera värden @@ -582,11 +589,11 @@ export function handleSomeEvent(event: SomeEvent): void { I exemplet nedan loggas endast det första värdet i argument arrayen, trots att arrayen innehåller tre värden. ```typescript -let myArray = ['A', 'B', 'C'] +let myArray = ["A", "B", "C"]; export function handleSomeEvent(event: SomeEvent): void { // Visar : "Mitt värde är: A" (Även om tre värden skickas till `log.info`) - log.info('Mitt värde är: {}', myArray) + log.info("Mitt värde är: {}", myArray); } ``` @@ -595,11 +602,14 @@ export function handleSomeEvent(event: SomeEvent): void { Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. ```typescript -let myArray = ['A', 'B', 'C'] +let myArray = ["A", "B", "C"]; export function handleSomeEvent(event: SomeEvent): void { // Visar: "Mitt första värde är: A, andra värdet är: B, tredje värdet är: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) + log.info( + "My first value is: {}, second value is: {}, third value is: {}", + myArray + ); } ``` @@ -610,7 +620,7 @@ För att visa ett specifikt värde i arrayen måste det indexeras och tillhandah ```typescript export function handleSomeEvent(event: SomeEvent): void { // Visar : "Mitt tredje värde är C" - log.info('My third value is: {}', [myArray[2]]) + log.info("My third value is: {}", [myArray[2]]); } ``` @@ -619,21 +629,21 @@ export function handleSomeEvent(event: SomeEvent): void { I exemplet nedan loggas blocknummer, blockhash och transaktionshash från en händelse: ```typescript -import { log } from '@graphprotocol/graph-ts' +import { log } from "@graphprotocol/graph-ts"; export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ + log.debug("Block number: {}, block hash: {}, transaction hash: {}", [ event.block.number.toString(), // "47596000" event.block.hash.toHexString(), // "0x..." event.transaction.hash.toHexString(), // "0x..." - ]) + ]); } ``` ### IPFS API ```typescript -import { ipfs } from '@graphprotocol/graph-ts' +import { ipfs } from "@graphprotocol/graph-ts" ``` Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. @@ -642,13 +652,13 @@ För att läsa en fil från IPFS med en given IPFS-hash eller sökväg görs fö ```typescript // Placera detta i en händelsehanterare i mappningen -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) +let hash = "QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D"; +let data = ipfs.cat(hash); // Sökvägar som `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` // som inkluderar filer i kataloger stöds också -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) +let path = "QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile"; +let data = ipfs.cat(path); ``` **Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. @@ -656,31 +666,31 @@ let data = ipfs.cat(path) It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: ```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' +import { JSONValue, Value } from "@graphprotocol/graph-ts"; export function processItem(value: JSONValue, userData: Value): void { // Se JSONValue-dokumentationen för mer information om hur man hanterar // med JSON-värden - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') + let obj = value.toObject(); + let id = obj.get("id"); + let title = obj.get("title"); if (!id || !title) { - return + return; } // Callbacks kan också skapa enheter - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Ange parent till "parentId" - newitem.save() + let newItem = new Item(id); + newItem.title = title.toString(); + newitem.parent = userData.toString(); // Ange parent till "parentId" + newitem.save(); } // Placera detta i en händelsehanterare i mappningen -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) +ipfs.map("Qm...", "processItem", Value.fromString("parentId"), ["json"]); // Alternativt kan du använda `ipfs.mapJSON`. -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) +ipfs.mapJSON("Qm...", "processItem", Value.fromString("parentId")); ``` The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. @@ -690,7 +700,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes ### Crypto API ```typescript -import { crypto } from '@graphprotocol/graph-ts' +import { crypto } from "@graphprotocol/graph-ts"; ``` The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: @@ -700,7 +710,7 @@ The `crypto` API makes a cryptographic functions available for use in mappings. ### JSON API ```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' +import { json, JSONValueKind } from "@graphprotocol/graph-ts" ``` JSON data can be parsed using the `json` API: @@ -734,44 +744,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Typkonverteringsreferens -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ------------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| Sträng (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | --------------------------------------------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| Sträng (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadata för datakälla From 3daf5d9eeb5e6fe9605bc225ba60ae505a61e827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:30 -0400 Subject: [PATCH 588/924] New translations api.mdx (Turkish) --- website/pages/tr/developing/graph-ts/api.mdx | 400 +++++++++---------- 1 file changed, 200 insertions(+), 200 deletions(-) diff --git a/website/pages/tr/developing/graph-ts/api.mdx b/website/pages/tr/developing/graph-ts/api.mdx index 5107de4579f6..57910776ed3d 100644 --- a/website/pages/tr/developing/graph-ts/api.mdx +++ b/website/pages/tr/developing/graph-ts/api.mdx @@ -2,72 +2,72 @@ title: AssemblyScript API'si --- -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) +> Not: `graph-cli`/`graph-ts` `0.22.0` sürümünden önce bir subgraph oluşturduysanız, AssemblyScript'in daha eski bir sürümünü kullanıyorsanız, [`MigrationXGuide`](/release-notes/assemblyscript-migration-guide) dosyasına göz atmanızı öneririz. Bu sayfa subgraph eşleştirmelerini yazarken bullanılabilen yerleşik API'leri belgelemektedir. Hazır olarak iki çeşit API mevcuttur: -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. +- [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) ve +- `graph codegen` tarafından subgraph dosyalarından oluşturulan kod. -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. +[AssemblyScript](https://github.com/AssemblyScript/assemblyscript) ile uyumlu oldukları sürece diğer kütüphaneleri bağımlılık olarak eklemek de mümkündür. Dil eşlemelerinin yazıldığı dil bu olduğundan, [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki), dil ve standart kütüphane özellikleri için iyi bir kaynaktır. ## API Referansı -The `@graphprotocol/graph-ts` library provides the following APIs: +`@graphprotocol/graph-ts` kütüphanesi aşağıdaki API'leri sağlar: -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. +- Ethereum akıllı sözleşmeleri, etkinlikleri, blokları, işlemleri ve Ethereum değerleriyle çalışmak için bir `ethereum` API'si. +- Varlıkları Graph Node deposuna yüklemek ve kaydetmek için bir `store` API. +- Mesajları Graph Node'u çıkışına ve Graph Gezginine kaydetmek için bir `log` API. +- IPFS'den dosya yüklemek için bir `ipfs` API'ı. +- JSON verilerini ayrıştırmak için bir `json` API. +- Şifreleme işlevlerini kullanmak için bir `crypto` API. - Ethereum, JSON, GraphQL ve AssemblyScript gibi farklı tip sistemler arası çeviri yapmak için düşük seviyeli yazılımlar. ### Sürümler -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. +Subgraph bildirimindeki `apiVersion`, belirli bir subgraph için Graph Node'u tarafından çalıştırılan eşleme API sürümünü belirtir. -| Sürüm | Sürüm Notları | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Sürüm | Sürüm Notları | +| :---: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Ethereum Event nesnesindeki Ethereum types
    Added `receipt` alanına `TransactionReceipt` ve `Log` sınıfları eklendi | +| 0.0.6 | Ethereum İşlemine `nonce` alanı eklendi. object
    Added `baseFeePerGas` Ethereum Block nesnesine eklendi | +| 0.0.5 | AssemblyScript 0.19.10 sürümüne yükseltildi (buna son değişiklikler dahildir, lütfen [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed`'in `ethereum.transaction.gasLimit` olarak yeniden adlandırılmasına bakın | +| 0.0.4 | Ethereum SmartContractCall nesnesine `functionSignature` alanı eklendi | +| 0.0.3 | `ethereum.call.to` olarak yeniden adlandırılan object
    `etherem.call.address` Ethereum Çağrısına `from` alanı eklendi | +| 0.0.2 | Ethereum İşlem nesnesine `input` alanı eklendi | ### Dahili Türler -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). +AssemblyScript'te yerleşik temel türlere ilişkin belgeler [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types)'te bulunabilir. -The following additional types are provided by `@graphprotocol/graph-ts`. +Aşağıdaki ek türler `@graphprotocol/graph-ts` tarafından sağlanmaktadır. #### ByteArray ```typescript -import { ByteArray } from '@graphprotocol/graph-ts' +{ ByteArray }'i '@graphprotocol/graph-ts' den içe aktar ``` -`ByteArray` represents an array of `u8`. +`ByteArray` bir `u8` dizisini temsil eder. _Construction_ -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. +- `fromI32(x: i32): ByteArray` - `x` 'yi baytlara ayrıştırır. +- `fromHexString(hex: string): ByteArray` - Giriş uzunluğu eşit olmalıdır. `0x` ile önek eklemek isteğe bağlıdır. _Type conversions_ -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. +- `toHexString(): string` - Ön eki `0x` olan onaltılık bir dizeye dönüştürür. +- `toString(): string` - Baytları UTF-8 dizesi olarak yorumlar. +- `toBase58(): string` - Baytları bir base58 dizesine kodlar. +- `toU32(): u32` - Baytları küçük endian `u32` olarak yorumlar. Taşma durumunda atar. +- `toI32(): i32` - Bayt dizisini küçük endian `i32` olarak yorumlar. Taşma durumunda atar. _Operators_ -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` +- `equals(y: ByteArray): bool` – `x == y` olarak yazılabilir. +- `concat(other: ByteArray) : ByteArray` - doğrudan `this` 'den ve ardından `other` 'dan oluşan yeni bir `ByteArray` döndürün. +- `concatI32(other: i32) : ByteArray` - doğrudan `this` 'den ve ardından `other` 'nin bayt temsilinden oluşan yeni bir `ByteArray` döndürür. #### BigDecimal @@ -75,32 +75,32 @@ _Operators_ import { BigDecimal } from '@graphprotocol/graph-ts' ``` -`BigDecimal` is used to represent arbitrary precision decimals. +`BigDecimal`, rastgele hassas ondalık sayıları temsil etmek için kullanılır. -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. +> Not: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal`, anlamlının 34 ondalık basamağını destekleyen [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format)'de saklanır. Bu, `BigDecimal`'ı, Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) veya eşdeğeri gibi 34 basamaktan daha geniş bir alana yayılabilen sabit nokta türlerini temsil etmek için uygunsuz hale getirir. _Construction_ -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. +- `constructor(bigInt: BigInt)` – `BigInt` 'den bir `BigDecimal` oluşturur. +- `static fromString(s: string): BigDecimal` – ondalık bir dizeden ayrıştırır. _Type conversions_ -- `toString(): string` – prints to a decimal string. +- `toString(): string` – ondalık dizgeye yazdırır. _Math_ -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. +- `plus(y: BigDecimal): BigDecimal` - `x + y` şeklinde yazılabilir. +- `minus(y: BigDecimal): BigDecimal` - `x - y` şeklinde yazılabilir. +- `times(y: BigDecimal): BigDecimal` - `x * y` şeklinde yazılabilir. +- `div(y: BigDecimal): BigDecimal` - `x / y` şeklinde yazılabilir. +- `equals(y: BigDecimal): bool` - `x == y` şeklinde yazılabilir. +- `notEqual(y: BigDecimal): bool` - `x != y` şeklinde yazılabilir. +- `lt(y: BigDecimal): bool` - `x < y` şeklinde yazılabilir. +- `le(y: BigDecimal): bool` - `x <= y` şeklinde yazılabilir. +- `gt(y: BigDecimal): bool` - `x > y` şeklinde yazılabilir. +- `ge(y: BigDecimal): bool` - `x >= y` şeklinde yazılabilir. +- `neg(): BigDecimal` - `-x` olarak yazılabilir. #### BigInt @@ -108,53 +108,53 @@ _Math_ import { BigInt } from '@graphprotocol/graph-ts' ``` -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. +`BigInt` büyük tamsayıları temsil etmek için kullanılır. Bu, `uint32` ila `uint256` ve `int64` ila `int256` türündeki Ethereum değerlerini içerir. Uint32`nin altındaki `int32`, `uint24`veya`int8`gibi her şey`i32\` olarak temsil edilir. -The `BigInt` class has the following API: +'BigInt' sınıfı aşağıdaki API'ye sahiptir: _Construction_ -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. +- `BigInt.fromI32(x: i32): BigInt` - bir `i32`den bir `BigInt` oluşturur. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. +- `BigInt.fromString(s: string): BigInt`- Bir dizgeden bir `BigInt` ayrıştırır. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` - `bytes`ı işaretsiz, little-endian bir tamsayı olarak yorumlar. Eğer girdiniz big-endian ise, önce `.reverse()` fonksiyonunu çağırın. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromSignedBytes(x: Bytes): BigInt` - `bytes`ı işaretli, little-endian tamsayı olarak yorumlar. Eğer girdiniz big-endian ise, önce `.reverse()` fonksiyonunu çağırın. _Type conversions_ -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. +- `x.toHex(): string` - `BigInt` öğesini onaltılık karakterlerden oluşan bir dizeye dönüştürür. -- `x.toString(): string` – turns `BigInt` into a decimal number string. +- `x.toString(): string` - `BigInt` öğesini ondalık sayı dizesine dönüştürür. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. +- `x.toI32(): i32` - `BigInt` değerini bir `i32` olarak döndürür; değer `i32` içine sığmazsa başarısız olur. Önce `x.isI32()` öğesini kontrol etmek iyi bir fikirdir. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. +- `x.toBigDecimal(): BigDecimal` - kesirli kısmı olmayan bir ondalık sayıya dönüştürür. _Math_ -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. +- `x.plus(y: BigInt): BigInt` - `x + y` şeklinde yazılabilir. +- `x.minus(y: BigInt): BigInt` - `x - y` şeklinde yazılabilir. +- `x.times(y: BigInt): BigInt` - `x * y` şeklinde yazılabilir. +- `x.div(y: BigInt): BigInt` - `x / y` şeklinde yazılabilir. +- `x.mod(y: BigInt): BigInt` - `x % y` şeklinde yazılabilir. +- `x.equals(y: BigInt): bool` - `x == y` şeklinde yazılabilir. +- `x.notEqual(y: BigInt): bool` - `x != y` şeklinde yazılabilir. +- `x.lt(y: BigInt): bool` - `x < y` şeklinde yazılabilir. +- `x.le(y: BigInt): bool` - `x <= y` şeklinde yazılabilir. +- `x.gt(y: BigInt): bool` - `x > y` şeklinde yazılabilir. +- `x.ge(y: BigInt): bool` - `x >= y` şeklinde yazılabilir. +- `x.neg(): BigInt` - `-x` olarak yazılabilir. +- `x.divDecimal(y: BigDecimal): BigDecimal` - ondalık bir sonuç vererek bir ondalık sayıya böler. +- `x.isZero(): bool` - Sayının sıfır olup olmadığını kontrol etmek için kolaylık. +- `x.isI32(): bool` - Sayının bir `i32` ye uyup uymadığını kontrol eder. +- `x.abs(): BigInt` - Mutlak değer. +- `x.pow(exp: u8): BigInt` - Üs alma. +- `bitOr(x: BigInt, y: BigInt): BigInt` - `x | y` şeklinde yazılabilir. +- `bitAnd(x: BigInt, y: BigInt): BigInt` - `x & y` şeklinde yazılabilir. +- `leftShift(x: BigInt, bits: u8): BigInt` - `x << y` şeklinde yazılabilir. +- `rightShift(x: BigInt, bits: u8): BigInt` - `x >> y` şeklinde yazılabilir. #### TypedMap @@ -162,15 +162,15 @@ _Math_ import { TypedMap } from '@graphprotocol/graph-ts' ``` -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). +`TypedMap` anahtar-değer çiftlerini saklamak için kullanılabilir. Bkz. [bu örneğe] (https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). -The `TypedMap` class has the following API: +`TypedMap` sınıfı aşağıdaki API'ye sahiptir: -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not +- `new TypedMap()` - `K` türünde anahtarları ve `V` türünde değerleri olan boş bir harita oluşturur +- `map.set(key: K, value: V): void` - `key` değerini `value` değerine ayarlar +- `map.getEntry(key: K): TypedMapEntry | null` - bir `key` için anahtar-değer çiftini veya `key` haritada mevcut değilse `null` değerini döndürür +- `map.get(anahtar: K): V | null` - bir `anahtar` için değeri veya `anahtar` haritada mevcut değilse `null` değerini döndürür +- `map.isSet(anahtar: K): bool` - `anahtar` haritada varsa `true`, yoksa `false` döndürür #### Baytlar @@ -178,25 +178,25 @@ The `TypedMap` class has the following API: import { Bytes } from '@graphprotocol/graph-ts' ``` -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. +`Bytes` rastgele uzunluktaki bayt dizilerini temsil etmek için kullanılır. Bu, `bytes`, `bytes32` vb. türdeki Ethereum değerlerini içerir. -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: +`Bytes` sınıfı AssemblyScript'in [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) sınıfını genişletir ve bu, tüm `Uint8Array` işlevselliğinin yanı sıra aşağıdaki yeni yöntemleri de destekler: _Construction_ -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes +- `fromHexString(hex: string) : Bytes` - Çift sayıda onaltılık basamaktan oluşması gereken `hex` dizesini bir `ByteArray` dizisine dönüştürür. hex`dizesi isteğe bağlı olarak`0x\` ile başlayabilir +- `fromI32(i: i32) : Bytes` - `i`yi bir bayt dizisine dönüştürür _Type conversions_ - `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) +- `b.toString()` - dizideki baytları unicode karakterlerden oluşan bir dizeye dönüştürür +- `b.toBase58()` - bir Ethereum Bayt değerini base58 kodlamasına dönüştürür (IPFS karmaları için kullanılır) _Operators_ -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` +- `b.concat(diğer: Bytes) : Bytes` - - doğrudan `this` ve ardından `other` öğelerinden oluşan yeni `Bytes` döndürür +- `b.concatI32(other: i32) : ByteArray` - doğrudan `this` ve ardından `other` bayt gösteriminden oluşan yeni `Bytes` döndürür #### Adres(Address) @@ -204,12 +204,12 @@ _Operators_ import { Address } from '@graphprotocol/graph-ts' ``` -`Address` extends `Bytes` to represent Ethereum `address` values. +`Address`, Ethereum `adres` değerlerini temsil etmek için `Bytes`ı genişletir. -It adds the following method on top of the `Bytes` API: +Bu, `Bytes` API'sinin üzerine aşağıdaki yöntemi ekler: -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error +- `Address.fromString(s: string): Address` - onaltılık dizeden bir `Address` oluşturur +- `Address.fromBytes(b: Bytes): Address` - `b` den tam olarak 20 bayt uzunluğunda olması gereken bir `Address` oluşturur. Daha az veya daha fazla bayt içeren bir değer iletmek hataya neden olur ### Store API @@ -219,7 +219,7 @@ import { store } from '@graphprotocol/graph-ts' The `store` API allows to load, save and remove entities from and to the Graph Node store. -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. +Depoya yazılan varlıklar, subgraph'in GraphQL şemasında tanımlanan `@entity` tipleriyle bire bir eşleşir. Bu varlıklarla çalışmayı kolaylaştırmak için, [Graph CLI] (https://github.com/graphprotocol/graph-cli) tarafından sağlanan `graph codegen` komutu, yerleşik `Entity` türünün alt sınıfları olan varlık sınıflarını, şemadaki alanlar için özellik alıcıları ve ayarlayıcıları ile bu varlıkları yüklemek ve kaydetmek için yöntemler oluşturur. #### Unsurların Oluşturulması @@ -237,18 +237,18 @@ export function handleTransfer(event: TransferEvent): void { // İşlem hash'ını olay kimliği olarak kullanarak bir Transfer varlığı oluşturun let id = event.transaction.hash let transfer = new Transfer(id) - + // Olay parametrelerini kullanarak varlığın özelliklerini ayarlayın transfer.from = event.params.from transfer.to = event.params.to transfer.amount = event.params.amount - + // Varlığı depoya kaydedin transfer.save() -} + } ``` -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. +Zincir işlenirken bir `Transfer` olayıyla karşılaşıldığında, oluşturulan `Transfer` türü (varlık türüyle adlandırma çakışmasını önlemek için burada `TransferEvent` olarak adlandırılmıştır) kullanılarak `handleTransfer` olay işleyicisine aktarılır. Bu tür, olayın ana işlemi ve parametreleri gibi verilere erişilmesini sağlar. Çakışmaları önlemek için her varlık benzersiz bir kimliğe sahip olmalıdır. Genellikle olay parametreleri, kullanılabilecek benzersiz bir tanımlayıcı içerir. Not: Kimlik olarak işlem hash'ını kullanmak aynı işlemdeki başka hiçbir olayın bu hash'ı kullanarak kimlik olarak varlık oluşturmayacağını varsayar. @@ -266,9 +266,9 @@ if (transfer == null) { // Transfer varlığı önceki gibi kullanılır ``` -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. +Varlık henüz depoda mevcut olmayabileceğinden, `load` yöntemi `Transfer | null` türünde bir değer döndürür. Bu nedenle, değeri kullanmadan önce `null` durumunu kontrol etmek gerekebilir. -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. +> **Not:** Varlıkların yüklenmesi yalnızca eşlemede yapılan değişiklikler bir varlığın önceki verilerine bağlıysa gereklidir. Mevcut varlıkları güncellemenin iki yolu için bir sonraki bölüme bakın. #### Bir blok içinde oluşturulan varlıkları arama @@ -286,7 +286,7 @@ if (transfer == null) { // Transfer varlığını daha önce olduğu gibi kullanın ``` -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. +> Not: Verilen blokta oluşturulmuş bir varlık yoksa, depoda verilen ID'ye sahip bir varlık olsa bile `loadInBlock` `null` değerini döndürecektir. #### Türetilmiş varlıkları arama @@ -307,7 +307,7 @@ type Holder @entity { } ``` -The following code will load the `Token` entity that the `Holder` entity was derived from: +Aşağıdaki kod, `Holder` varlığının türetildiği `Token` varlığını yükleyecektir: ```typescript let holder = Holder.load('test-id') @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() Mevcut bir varlığı güncellemenin iki yolu vardır: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Varlığı örneğin `Transfer.load(id)` ile yükleyin, varlık üzerindeki özellikleri ayarlayın ve ardından `.save()` ile depoya geri kaydedin. +2. Varlığı örneğin `new Transfer(id)` ile oluşturun, varlık üzerindeki özellikleri ayarlayın ve ardından `.save()` ile depoya kaydedin. Varlık zaten mevcutsa, değişiklikler onunla birleştirilir. Oluşturulan özellik ayarlayıcılar sayesinde çoğu durumda özellikerin değiştirilmesi kolaydır: @@ -338,9 +338,9 @@ transfer.from.unset() transfer.from = null ``` -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. +Bu yalnızca isteğe bağlı özelliklerle, yani GraphQL'de `!` olmadan bildirilen özelliklerle çalışır. İki örnek `owner: Bytes` veya `amount: BigInt` olabilir. -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. +Bir varlıktan bir dizi almak o dizinin bir kopyasını oluşturduğundan, dizi özelliklerini güncellemek biraz daha karmaşıktır. Bu, dizi değiştirildikten sonra dizi özelliklerinin açıkça yeniden ayarlanması gerektiği anlamına gelir. Aşağıda `entity`nin bir `numbers: [BigInt!]!` alanına sahip olduğunu varsayar. ```typescript // Bu işe yaramaz @@ -356,7 +356,7 @@ entity.save() #### Depodan varlık kaldırma -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: +Şu anda oluşturulan türler aracılığıyla bir varlığı kaldırmanın bir yolu yoktur. Bunun yerine, bir varlığı kaldırmak için varlık türünün adını ve varlık kimliğini `store.remove` dosyasına aktarmak gerekir: ```typescript import { store } from '@graphprotocol/graph-ts' @@ -371,9 +371,9 @@ Ethereum API'si, akıllı sözleşmelere, genel durum değişkenlerine, sözleş #### Ethereum Türleri İçin Destek -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. +Varlıklarda olduğu gibi, `graph codegen` bir subgraph'te kullanılan tüm akıllı sözleşmeler ve olaylar için sınıflar üretir. Bunun için, sözleşme ABI'lerinin subgraph bildirimindeki veri kaynağının bir parçası olması gerekir. Tipik olarak, ABI dosyaları bir `abis/` klasöründe saklanır. -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. +Oluşturulan sınıflarla, Ethereum türleri ve [built-in types](#built-in-types) arasındaki dönüşümler perde arkasında gerçekleşir, böylece subgraph yazarlarının bunlar hakkında endişelenmesine gerek kalmaz. Aşağıdaki örnek bunu açıklar. Aşağıdaki gibi bir subgraph şeması verildiğinde @@ -386,7 +386,7 @@ type Transfer @entity { } ``` -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: +ve Ethereum'daki bir `Transfer(address,address,uint256)` olay imzası, `adress`, `address` ve `uint256` türündeki `from`, `to` ve `amount` değerleri `Address` ve `BigInt` değerlerine dönüştürülerek `Transfer` varlığının `Bytes!` ve `BigInt!` özelliklerine aktarılmalarına olanak tanır: ```typescript let id = event.transaction.hash @@ -399,7 +399,7 @@ transfer.save() #### Olaylar ve Blok/İşlem Verileri -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): +Önceki örneklerdeki `Transfer` olayı gibi olay işleyicilerine aktarılan Ethereum olayları, yalnızca olay parametrelerine değil, aynı zamanda ana işlemlerine ve parçası oldukları bloğa da erişim sağlar. Aşağıdaki veriler `event` örneklerinden elde edilebilir (bu sınıflar `graph-ts` içindeki `ethereum` modülünün bir parçasıdır): ```typescript class Event { @@ -474,7 +474,7 @@ class Log { #### Akıllı Sözleşme Durumuna Erişim -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. +`graph codegen` tarafından üretilen kod, subgraph'te kullanılan akıllı sözleşmeler için sınıflar da içerir. Bunlar, genel durum değişkenlerine erişmek ve mevcut bloktaki sözleşmenin işlevlerini çağırmak için kullanılabilir. Yaygın bir model, bir olayın kaynaklandığı sözleşmeye erişmektir. Bu, aşağıdaki kodla elde edilir: @@ -493,15 +493,15 @@ export function handleTransfer(event: TransferEvent) { } ``` -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type +Varlık türü ile adlandırma çakışmasını önlemek için `Transfer` burada `TransferEvent` olarak adlandırılmıştır -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. +Ethereum üzerindeki `ERC20Contract`, `symbol` adında salt okunur bir genel fonksiyona sahip olduğu sürece, `.symbol()` ile çağrılabilir. Herkese açık durum değişkenleri için aynı ada sahip bir yöntem otomatik olarak oluşturulur. Subgraph parçası olan diğer tüm sözleşmelerde oluşturulan koddan içe aktarılabilir ve geçerli bir adrese bağlanabilir. #### Geri Dönen Çağrıları Yönetme -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: +Sözleşmenizin salt okunur yöntemleri geri dönebilirse, bunu `try_` ile ön eklenmiş oluşturulan sözleşme yöntemini çağırarak ele almalısınız. Örneğin, Gravity sözleşmesi `gravatarToOwner` yöntemini sunar. Bu kod, bu yöntemdeki bir geri dönüşü idare edebilecektir: ```typescript let gravity = Gravity.bind(event.address) @@ -517,10 +517,10 @@ Bir Geth veya Infura istemcisine bağlı bir Graph düğümünün tüm geri dön #### ABI Kodlama/Çözme -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. +Veriler, `ethereum` modülündeki `encode` ve `decode` fonksiyonları kullanılarak Ethereum'un ABI kodlama formatına göre kodlanabilir ve çözülebilir. ```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' +{ Address, BigInt, ethereum } 'i '@graphprotocol/graph-ts' 'den içe aktar let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), @@ -538,7 +538,7 @@ Daha fazla bilgi için: - [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) - Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). +- Daha fazlası [karmaşık örnek](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). ### Logging API @@ -548,15 +548,15 @@ import { log } from '@graphprotocol/graph-ts' The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. -The `log` API includes the following functions: +`log` API'si aşağıdaki fonksiyonları içerir: -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. +- `log.debug(fmt: string, args: Array): void` - bir hata ayıklama mesajını günlüğe kaydeder. +- `log.info(fmt: string, args: Array): void` - bir bilgilendirme mesajını günlüğe kaydeder. +- `log.warning(fmt: string, args: Array): void` - bir uyarıyı günlüğe kaydeder. +- `log.error(fmt: string, args: Array): void` - bir hata mesajını günlüğe kaydeder. +- `log.critical(fmt: string, args: Array): void` - kritik bir mesajı günlüğe kaydeder _and_ subgraph'i sonlandırır. -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. +`log` API'si bir format dizesi ve bir dizi dize değeri alır. Daha sonra yer tutucuları dizideki dize değerleriyle değiştirir. İlk `{}` yer tutucusu dizideki ilk değerle değiştirilir, ikinci `{}` yer tutucusu ikinci değerle değiştirilir ve bu böyle devam eder. ```typescript log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) @@ -566,7 +566,7 @@ log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue. ##### Tek bir değerin loglanması -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: +Aşağıdaki örnekte, "A" dize değeri günlüğe kaydedilmeden önce `['A']` haline gelmek üzere bir diziye aktarılır: ```typescript let myValue = 'A' @@ -592,7 +592,7 @@ export function handleSomeEvent(event: SomeEvent): void { #### Mevcut bir diziden birden çok girişi kaydetme -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. +Argümanlar dizisindeki her giriş, günlük mesajı dizesinde kendi yer tutucusunu `{}` gerektirir. Aşağıdaki örnek, günlük iletisinde üç yer tutucu `{}` içerir. Bu nedenle, `myArray` içindeki üç değer de günlüğe kaydedilir. ```typescript let myArray = ['A', 'B', 'C'] @@ -636,7 +636,7 @@ export function handleSomeEvent(event: SomeEvent): void { import { ipfs } from '@graphprotocol/graph-ts' ``` -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. +Akıllı sözleşmeler zaman zaman IPFS dosyalarını zincire bağlar. Bu, eşlemelerin sözleşmeden IPFS karmalarını almasına ve ilgili dosyaları IPFS'den okumasına olanak tanır. Dosya verileri "Bayt" olarak döndürülür; bu genellikle daha fazla işlem gerektirir; bu sayfada daha sonra belgelenen `json` API'si ile birlikte. IPFS hash'ı veya yolu verildiğinde, bir dosyayı IPFS'den okuma şu şekilde yapılır: @@ -652,9 +652,9 @@ let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' let data = ipfs.cat(path) ``` -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. +**Not:** `ipfs.cat` şu anda deterministik değildir. Dosya, istek zaman aşımına uğramadan IPFS ağı üzerinden alınamazsa, `null` sonucunu döndürür. Bu nedenle, `null` sonucunu her zaman kontrol etmeye değer. -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: +`ipfs.map` ile daha büyük dosyaları akış tarzında işlemek de mümkündür. İşlev, bir IPFS dosyası için karma veya yol, bir geri çağırmanın adı ve davranışını değiştirmek için işaretler bekler: ```typescript import { JSONValue, Value } from '@graphprotocol/graph-ts' @@ -684,9 +684,9 @@ ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) ``` -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. +Şu anda desteklenen tek bayrak `ipfs.map` dosyasına aktarılması gereken `json` bayrağıdır. json`bayrağı ile IPFS dosyası, her satırda bir değer olmak üzere bir dizi JSON değerinden oluşmalıdır.`ipfs.map`çağrısı dosyadaki her satırı okuyacak, bir`JSONValue`haline getirecek ve her biri için geri çağırmayı çağıracaktır. Geri arama daha sonra`JSONValue`dan veri depolamak için varlık işlemlerini kullanabilir. Varlık değişiklikleri yalnızca `ipfs.map`i çağıran işleyici başarıyla tamamlandığında saklanır; bu arada bellekte tutulurlar ve`ipfs.map\` in işleyebileceği dosyanın boyutu bu nedenle sınırlıdır. -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. +Başarı durumunda, `ipfs.map` `void` döndürür. Geri aramanın herhangi bir çağrısı bir hataya neden olursa, `ipfs.map` çağrısını yapan işleyici iptal edilir ve subgraph başarısız olarak işaretlenir. ### Kripto(Crypto) API'si @@ -694,24 +694,24 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes import { crypto } from '@graphprotocol/graph-ts' ``` -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: +`crypto` API, eşlemelerde kullanılmak üzere kriptografik işlevler sağlar. Şu anda sadece bir tane var: - `crypto.keccak256(input: ByteArray): ByteArray` ### JSON API ```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' +{ json, JSONValueKind }'i '@graphprotocol/graph-ts' 'den içe aktar ``` -JSON data can be parsed using the `json` API: +JSON verileri `json` API kullanılarak ayrıştırılabilir: -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed +- `json.fromBytes(data: Bytes): JSONValue` - JSON verilerini geçerli bir UTF-8 dizisi olarak yorumlanan bir `Bytes` dizisinden ayrıştırır +- `json.try_fromBytes(data: Bytes): Result` - `json.fromBytes` öğesinin güvenli sürümüdür, ayrıştırma başarısız olursa bir hata değişkeni döndürür +- `json.fromString(data: string): JSONValue` - JSON verilerini geçerli bir UTF-8 `String`den ayrıştırır +- `json.try_fromString(data: string): Result` - `json.fromString`in güvenli sürümüdür, ayrıştırma başarısız olursa bir hata değişkeni döndürür -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: +`JSONValue` sınıfı, rastgele bir JSON belgesinden değerleri çekmenin bir yolunu sağlar. JSON değerleri booleanlar, sayılar, diziler ve daha fazlası olabileceğinden, `JSONValue` bir değerin türünü kontrol etmek için bir `kind` özelliği ile birlikte gelir: ```typescript let value = json.fromBytes(...) @@ -720,63 +720,63 @@ if (value.kind == JSONValueKind.BOOL) { } ``` -In addition, there is a method to check if the value is `null`: +Ek olarak, değerin `null` olup olmadığını kontrol etmek için bir yöntem vardır: - `value.isNull(): boolean` -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: +Bir değerin türü belli olduğunda, aşağıdaki yöntemlerden biri kullanılarak bir [built-in type](#built-in-types) 'a dönüştürülebilir: - `value.toBool(): boolean` - `value.toI64(): i64` - `value.toF64(): f64` - `value.toBigInt(): BigInt` - `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) +- `value.toArray(): Array` - (ve ardından `JSONValue` öğesini yukarıdaki 5 yöntemden biriyle dönüştürün) ### Tip Dönüşümleri Referansı -| Source(s) | Destination | Conversion function | -| ----------------- | ----------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | Dizgi (onaltılık) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | Dizgi (onaltılık) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| Dizgi (onaltılık) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Kaynak(lar) | Hedef | Dönüştürme işlevi | +| ----------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Veri Kaynağı Meta Verileri -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: +İşleyiciyi çağıran veri kaynağının sözleşme adresini, ağını ve bağlamını `dataSource` ad alanı aracılığıyla inceleyebilirsiniz: - `dataSource.address(): Address` - `dataSource.network(): string` @@ -784,7 +784,7 @@ You can inspect the contract address, network and context of the data source tha ### Varlık ve VeriKaynağıBağlamı -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: +Temel `Entity` sınıfı ve alt `DataSourceContext` sınıfı, alanları dinamik olarak ayarlamak ve almak için yardımcılara sahiptir: - `setString(key: string, value: string): void` - `setI32(key: string, value: i32): void` @@ -801,9 +801,9 @@ The base `Entity` class and the child `DataSourceContext` class have helpers to ### Manifest'teki DataSourceContext -The `context` section within `dataSources` allows you to define key-value pairs that are accessible within your subgraph mappings. The available types are `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, and `BigInt`. +`dataSources` içindeki `context` bölümü, subgraph eşlemeleriniz içinde erişilebilen anahtar-değer çiftlerini tanımlamanıza olanak tanır. Kullanılabilir türler `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List` ve `BigInt` şeklindedir. -Here is a YAML example illustrating the usage of various types in the `context` section: +İşte `context` bölümünde çeşitli türlerin kullanımını gösteren bir YAML örneği: ```yaml dataSources: @@ -843,13 +843,13 @@ dataSources: data: '1000000000000000000000000' ``` -- `Bool`: Specifies a Boolean value (`true` or `false`). -- `String`: Specifies a String value. -- `Int`: Specifies a 32-bit integer. -- `Int8`: Specifies an 8-bit integer. -- `BigDecimal`: Specifies a decimal number. Must be quoted. -- `Bytes`: Specifies a hexadecimal string. -- `List`: Specifies a list of items. Each item needs to specify its type and data. -- `BigInt`: Specifies a large integer value. Must be quoted due to its large size. +- `Bool`: Bir Boolean değeri belirtir (`true` veya `false`). +- `String`: Bir String değeri belirtir. +- `Int`: 32 bitlik bir tamsayı belirtir. +- `Int8`: 8 bitlik bir tamsayı belirtir. +- `BigDecimal`: Bir ondalık sayı belirtir. Tırnak içine alınmalıdır. +- `Bytes`: Onaltılık bir dize belirtir. +- `List`: Bir öğe listesi belirtir. Her öğenin türünü ve verilerini belirtmesi gerekir. +- `BigInt`: Büyük bir tamsayı değeri belirtir. Büyük boyutu nedeniyle tırnak içine alınmalıdır. Bu bağlama daha sonra subgraph eşleştirme dosyalarınızdan erişilebilir ve böylece daha dinamik ve yapılandırılabilir subgraphlar elde edebilirsiniz. From 993555d9ebdde4f537d635b327b2bc646fbea70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:31 -0400 Subject: [PATCH 589/924] New translations api.mdx (Ukrainian) --- website/pages/uk/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/uk/developing/graph-ts/api.mdx b/website/pages/uk/developing/graph-ts/api.mdx index 45bfad8f7bfb..ab5e2b27b49e 100644 --- a/website/pages/uk/developing/graph-ts/api.mdx +++ b/website/pages/uk/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() There are two ways to update an existing entity: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Changing properties is straight forward in most cases, thanks to the generated property setters: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From 4113cdb04988270e4a385106ccf6c97d3820c832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:32 -0400 Subject: [PATCH 590/924] New translations api.mdx (Chinese Simplified) --- website/pages/zh/developing/graph-ts/api.mdx | 434 +++++++++---------- 1 file changed, 217 insertions(+), 217 deletions(-) diff --git a/website/pages/zh/developing/graph-ts/api.mdx b/website/pages/zh/developing/graph-ts/api.mdx index d67a78af0456..8acdaea60b1d 100644 --- a/website/pages/zh/developing/graph-ts/api.mdx +++ b/website/pages/zh/developing/graph-ts/api.mdx @@ -2,45 +2,45 @@ title: AssemblyScript API --- -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) +> 注意:如果您在 `graph-cli`/`graph-ts` 版本 `0.22.0` 之前创建了子图,那么您正在使用较旧版本的 AssemblyScript,我们建议查看[`迁移指南`](/release-notes/assemblyscript-migration-guide)。 此页面记录了编写子图映射时可以使用的内置 API。有两种开箱即用的 API: -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. +- [Graph TypeScript库](https://github.com/graphprotocol/graph-ts) (`graph-ts`) 和 +- 通过 `graph codegen` 生成的子图文件中的代码。 -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. +也可以添加其他库作为依赖项,只要它们与[AssemblyScript](https://github.com/AssemblyScript/assemblyscript)兼容即可。由于这是语言映射所写的,因此[AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki)是语言和标准库特性的良好来源。 ## API 参考 -The `@graphprotocol/graph-ts` library provides the following APIs: +@graphprotocol/graph-ts 库提供以下 API: -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. +- 用于处理以太坊智能合约、事件、区块、交易和以太坊价值的以太坊 API。 +- 用于与图形节点交互,存储和加载实体的 存储 API。 +- 用于将消息记录Graph节点输出和Graph浏览器的log API。 +- 用于从 IPFS 加载文件的ipfs API。 +- 用于解析 JSON 数据的json API。 +- 使用加密功能的crypto API。 - 用于在不同类型系统(例如 Ethereum、JSON、GraphQL 和 AssemblyScript)之间进行转换的低级原语。 ### 版本 -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. +子图清单中的 `apiVersion` 指定了由 Graph Node 运行的特定子图的映射 API 版本。 -| 版本 | Release 说明 | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| 版本 | Release 说明 | +| :---: | ------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | 添加了 `TransactionReceipt` 和 `Log` 类到以太坊类型。
    已将 `receipt` 字段添加到Ethereum Event对象。 | +| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加
    baseFeePerGas字段 | +| 0.0.5 | AssemblyScript 升级到版本 0.19.10(这包括重大更改,参阅
    迁移指南)ethereum.transaction.gasUsed 重命名为 ethereum.transaction.gasLimit | +| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 | +| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。
    `etherem.call.address` 被重命名为 `ethereum.call.to`。 | +| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 | ### 内置类型 -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). +关于内置于 AssemblyScript 中的基本类型的文档可以在[AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types)中找到。 -The following additional types are provided by `@graphprotocol/graph-ts`. +以下额外的类型由 `@graphprotocol/graph-ts` 提供。 #### 字节数组 @@ -48,26 +48,26 @@ The following additional types are provided by `@graphprotocol/graph-ts`. 从'@graphprotocol/graph-ts'导入{ ByteArray } ``` -`ByteArray` represents an array of `u8`. +`ByteArray` 表示一个 `u8` 类型的数组。 -_Construction_ +结构 -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. +- `fromI32(x: i32): ByteArray` - 将 `x` 分解为字节。 +- `fromHexString(hex: string): ByteArray` - 输入长度必须是偶数。在十六进制字符串中添加 `0x` 前缀是可选的。 -_Type conversions_ +类型转换 -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. +- `toHexString(): string` - 转换为以 `0x` 前缀的十六进制字符串。 +- `toString(): string` - 将字节解释为 UTF-8 字符串。 +- `toBase58(): string` - 将字节编码为 base58 字符串。 +- `toU32(): u32` - 将字节解释为小端 `u32`。在溢出的情况下会抛出异常。 +- `toI32(): i32` - 将字节数组解释为小端 `i32`。在溢出的情况下会抛出异常。 -_Operators_ +操作符 -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` +- `equals(y: ByteArray): bool` – 可以写成 `x == y`。 +- `concat(other: ByteArray) : ByteArray` - 返回一个新的 `ByteArray`,由 `this` 直接跟随 `other` 构成。 +- `concatI32(other: i32) : ByteArray` - 返回一个新的 `ByteArray`,由 `this` 直接跟随 `other` 的字节表示构成。 #### BigDecimal @@ -75,32 +75,32 @@ _Operators_ 从“@Graphprotocol/graph-ts”导入{ BigDecimal } ``` -`BigDecimal` is used to represent arbitrary precision decimals. +BigDecimal 用于表示任意精度的小数。 -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. +> 注意:[内部](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` 存储在[IEEE-754 十进制128位浮点格式](https://en.wikipedia.org/wiki/Decimal128_floating-point_format)中,支持34位十进制数字的有效位数。这使得 `BigDecimal` 不适合表示超过34位数字的固定点类型,比如 Solidity 中的 [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) 或相当类型。 -_Construction_ +结构 -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. +- `constructor(bigInt: BigInt)` – 从一个 `BigInt` 创建一个 `BigDecimal`。 +- `static fromString(s: string): BigDecimal` – 从一个十进制字符串解析。 -_Type conversions_ +类型转换 -- `toString(): string` – prints to a decimal string. +- toString (): string - 打印为十进制字符串。 -_Math_ +数学方法 -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. +- `plus(y: BigDecimal): BigDecimal` – 可以写成 `x + y`。 +- `minus(y: BigDecimal): BigDecimal` – 可以写成 `x - y`。 +- `times(y: BigDecimal): BigDecimal` – 可以写成 `x * y`。 +- `div(y: BigDecimal): BigDecimal` – 可以写成 `x / y`。 +- `equals(y: BigDecimal): bool` – 可以写成 `x == y`。 +- `notEqual(y: BigDecimal): bool` – 可以写成 `x != y`。 +- `lt(y: BigDecimal): bool` – 可以写成 `x < y`。 +- `le(y: BigDecimal): bool` – 可以写成 `x <= y`。 +- `gt(y: BigDecimal): bool` – 可以写成 `x > y`。 +- `ge(y: BigDecimal): bool` – 可以写成 `x >= y`。 +- `neg(): BigDecimal` - 可以写成 `-x`。 #### BigInt @@ -108,53 +108,53 @@ _Math_ 从'@graphprotocol/graph-ts'导入{ BigInt } ``` -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. +`BigInt` 用于表示大整数。这包括以太坊中的类型 `uint32` 到 `uint256` 和 `int64` 到 `int256` 的数值。所有小于 `uint32` 的数值,比如 `int32`、`uint24` 或 `int8` 都被表示为 `i32`。 -The `BigInt` class has the following API: +BigInt 类具有以下 API: -_Construction_ +结构 -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. +- `BigInt.fromI32(x: i32): BigInt` – 从 i32 创建一个 BigInt。 -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. +- `BigInt.fromString(s: string): BigInt` – 从字符串解析一个 BigInt。 -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – 将 bytes 解释为无符号的小端整数。如果你的输入是大端的,请先调用.reverse()。 -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. +- `BigInt.fromSignedBytes(x: Bytes): BigInt` – 将 bytes 解释为有符号的小端整数。如果你的输入是大端的,请先调用.reverse()。 - _Type conversions_ + 类型转换 -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. +- `x.toHex(): string` – 将 BigInt 转换为十六进制字符的字符串。 -- `x.toString(): string` – turns `BigInt` into a decimal number string. +- `x.toString(): string` – 将 BigInt 转换为十进制数字字符串。 -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. +- `x.toI32(): i32` – 将 BigInt 作为 i32 返回;如果值不适合 i32,则失败。最好先检查 x.isI32()。 -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. +- `x.toBigDecimal(): BigDecimal` - 转换为没有小数部分的十进制数。 -_Math_ +数学方法 -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. +- `x.plus(y: BigInt): BigInt` – 可以写成 `x + y`. +- `x.minus(y: BigInt): BigInt` – 可以写成`x - y`. +- `x.times(y: BigInt): BigInt` – 可以写成 `x * y`. +- `x.div(y: BigInt): BigInt` – 可以写成 `x / y`. +- `x.mod(y: BigInt): BigInt` – 可以写成 `x % y`. +- `x.equals(y: BigInt): bool` – 可以写成 `x == y`. +- `x.notEqual(y: BigInt): bool` – 可以写成 `x != y`. +- `x.lt(y: BigInt): bool` – 可以写成 `x < y`. +- `x.le(y: BigInt): bool` – 可以写成 `x <= y`. +- `x.gt(y: BigInt): bool` – 可以写成 `x > y`. +- `x.ge(y: BigInt): bool` – 可以写成 `x >= y`. +- `x.neg(): BigInt` – 可以写成 `-x`. +- `x.divDecimal(y: BigDecimal): BigDecimal` – 除以一个十进制数,得到十进制数格式的结果。 +- `x.isZero(): bool` – 方便检查数字是否为零。 +- `x.isI32(): bool` – 检查数字是否适合i32类型。 +- `x.abs(): BigInt` – 绝对值。 +- `x.pow(exp: u8): BigInt` – 指数。 +- `bitOr(x: BigInt, y: BigInt): BigInt` – 可以写成 `x | y`. +- `bitAnd(x: BigInt, y: BigInt): BigInt` – 可以写成 `x & y`. +- `leftShift(x: BigInt, bits: u8): BigInt` – 可以写成 `x << y`. +- `rightShift(x: BigInt, bits: u8): BigInt` – 可以写成 `x >> y`. #### 类型化映射 @@ -162,15 +162,15 @@ _Math_ 从'@graphprotocol/graph-ts'导入{ TypedMap } ``` -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). +`TypedMap` 可用于存储键值对。请参阅[此示例](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51)。 -The `TypedMap` class has the following API: +TypedMap 类具有以下 API: -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not +- `new TypedMap()` - 创建一个键类型为 `K`,值类型为 `V` 的空映射。 +- `map.set(key: K, value: V): void` – 将 `key` 的值设置为 `value`。 +- `map.getEntry(key: K): TypedMapEntry | null` – 返回键为 `key` 的键值对,如果映射中不存在该键,则返回 `null`。 +- `map.get(key: K): V | null` – 返回键为 `key` 的值,如果映射中不存在该键,则返回 `null`。 +- `map.isSet(key: K): bool` – 如果映射中存在 `key` 则返回 `true`,否则返回 `false`。 #### 字节 @@ -178,25 +178,25 @@ The `TypedMap` class has the following API: 从 '@graphprotocol/graph-ts'导入{ Bytes } ``` -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. +字节用于表示任意长度的字节数组,包括字节类型的以太坊值、 bytes32等。 -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: +`Bytes` 类扩展了 AssemblyScript 的 [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64),支持所有 `Uint8Array` 的功能,以及以下新方法: -_Construction_ +结构 -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes +- `fromHexString(hex: string): Bytes` - 将字符串 `hex` 转换为一个 `ByteArray`。字符串 `hex` 必须由偶数个十六进制数字组成,并且可选地以 `0x` 开头。 +- `fromI32(i: i32): Bytes` - 将 `i` 转换为一个字节数组。 -_Type conversions_ +类型转换 -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) +- `b.toHex()` – 返回表示数组中字节的十六进制字符串。 +- `b.toString()` – 将数组中的字节转换为 Unicode 字符串。 +- `b.toBase58()` – 将以太坊的字节数值转换为 base58 编码(用于 IPFS 哈希)。 -_Operators_ +操作符 -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` +- `b.concat(other: Bytes): Bytes` - 返回一个新的 `Bytes`,由 `this` 直接跟随 `other` 组成。 +- `b.concatI32(other: i32): ByteArray` - 返回一个新的 `Bytes`,由 `this` 直接跟随 `other` 的字节表示组成。 #### 地址 @@ -204,12 +204,12 @@ _Operators_ 从 '@graphprotocol/graph-ts'导入{ Address } ``` -`Address` extends `Bytes` to represent Ethereum `address` values. +`Address` 扩展了 `Bytes`,用于表示以太坊的 `address` 值。 -It adds the following method on top of the `Bytes` API: +除了 `Bytes` API 之外,它还添加了以下方法: -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error +- `Address.fromString(s: string): Address` – 从十六进制字符串创建一个 `Address`。 +- `Address.fromBytes(b: Bytes): Address` – 从 `b` 创建一个 `Address`,`b` 必须恰好为 20 个字节长。传入长度不足或超过 20 字节的值将导致错误。 ### 商店API @@ -217,9 +217,9 @@ It adds the following method on top of the `Bytes` API: 从 '@graphprotocol/graph-ts'导入 { store } ``` -The `store` API allows to load, save and remove entities from and to the Graph Node store. +`store` API 允许从和到 Graph Node 存储加载、保存和删除实体。 -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. +写入存储的实体与子图的 GraphQL 模式中定义的 `@entity` 类型一一对应。为了方便处理这些实体,由 [Graph CLI](https://github.com/graphprotocol/graph-cli) 提供的 `graph codegen` 命令会生成实体类,这些类是内置 `Entity` 类的子类,具有模式中字段的属性 getter 和 setter,以及加载和保存这些实体的方法。 #### 创建实体 @@ -248,7 +248,7 @@ export function handleTransfer(event: TransferEvent): void { } ``` -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. +如果在处理链时遇到 Transfer 事件,它会使用生成的 Transfer 类型(别名为 TransferEvent 以避免与实体类型的命名冲突) 传递给 handleTransfer 事件处理器。 此类型允许访问事件的母交易及其参数等数据。 每个实体都必须有一个唯一的 ID 以避免与其他实体发生冲突。 事件参数包含可以使用的唯一标识符是相当常见的。 注意:使用交易hash作为 ID 时, 假定同一交易中没有其他事件创建以该hash作为 ID 的实体。 @@ -266,13 +266,13 @@ if (transfer == null) { // Use the Transfer entity as before ``` -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. +由于实体可能尚未存在于存储中,因此 `load` 方法返回一个类型为 `Transfer | null` 的值。因此,在使用该值之前可能需要检查 `null` 情况。 -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. +> **注意:** 只有在映射中的更改依赖于实体的先前数据时,加载实体才是必要的。请参阅下一节,了解更新现有实体的两种方法。 #### 查找在区块中创建的实体 -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. +截至 `graph-node` v0.31.0、`@graphprotocol/graph-ts` v0.30.0 和 `@graphprotocol/graph-cli` v0.49.0,所有实体类型上都提供了 `loadInBlock` 方法。 存储API有助于检索在当前区块中创建或更新的实体。这方面的一种典型情况是,一个处理程序从某个链上事件创建一个,之交易后的处理程序希望访问该交易(如果存在)。在交易不存在的情况下,子图必须去数据库才能发现实体不存在;如果子图作者已经知道实体必须是在同一个区块中创建的,那么使用loadInBlock可以避免这种数据库往返。对于某些子图,这些遗漏的查找可能会显著增加索引时间。 @@ -286,11 +286,11 @@ if (transfer == null) { // Use the Transfer entity as before ``` -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. +> 注意: 如果在给定的区块中没有创建实体,则 `loadInBlock` 将返回 `null`,即使存储中存在具有给定 ID 的实体也是如此。 #### 查找派生实体 -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. +在 `graph-node` v0.31.0、`@graphprotocol/graph-ts` v0.31.0 和 `@graphprotocol/graph-cli` v0.51.0 中引入了 `loadRelated` 方法。 这允许从事件处理程序中加载派生实体字段。例如,给定以下模式: @@ -307,11 +307,11 @@ type Holder @entity { } ``` -The following code will load the `Token` entity that the `Holder` entity was derived from: +以下代码将加载Holder实体来源的Token实体: ```typescript let holder = Holder.load('test-id') -// Load the Token entities associated with a given holder +// 加载与给定持有人相关联的 Token 实体。 let tokens = holder.tokens.load() ``` @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() 有两种方法可以更新现有实体: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. 利用 Transfer.load(id)加载实体,在实体上设置属性,然后调用.save() 将其返回到存储。 +2. 使用 new Transfer(id)创建实体,在实体上设置属性,然后调用.save()将其保存到存储。 如果实体已经存在,则将更改合并到其中。 由于生成的属性设置器,在大多数情况下更改属性是直截了当的: @@ -338,9 +338,9 @@ transfer.from.unset() transfer.from = null ``` -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. +这只适用于可选属性,即在 GraphQL 中声明时没有使用 `!` 的属性。两个例子是 `owner: Bytes` 或 `amount: BigInt`。 -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. +更新数组属性稍微复杂一些,因为从实体获取数组会创建该数组的副本。这意味着在更改数组后,必须显式地重新设置数组属性。以下假设 `entity` 有一个 `numbers: [BigInt!]!` 字段。 ```typescript // This won't work @@ -356,7 +356,7 @@ entity.save() #### 从存储中删除实体 -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: +目前无法通过生成的类型来删除实体。相反,要删除实体,需要将实体类型的名称和实体ID传递给 `store.remove` 方法: ```typescript import { store } from '@graphprotocol/graph-ts' @@ -371,9 +371,9 @@ store.remove('Transfer', id) #### 对以太坊类型的支持 -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. +与实体一样,`graph codegen` 为子图中使用的所有智能合约和事件生成类。为此,合约 ABI 需要作为子图清单中数据源的一部分。通常,ABI 文件存储在一个名为 `abis/` 的文件夹中。 -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. +通过生成的类,以太坊类型和内置类型之间的转换在幕后进行,这样子图作者就不必担心它们。 以下示例说明了这一点。 给定一个子图模式,如 @@ -385,7 +385,7 @@ type Transfer @entity { } ``` -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: +对于以太坊上的 `Transfer(address,address,uint256)` 事件签名,类型为 `address`、`address` 和 `uint256` 的 `from`、`to` 和 `amount` 值被转换为 `Address` 和 `BigInt`,从而允许它们传递给 `Transfer` 实体的 `Bytes!` 和 `BigInt!` 属性: ```typescript let id = event.transaction.hash.toHex() @@ -398,7 +398,7 @@ transfer.save() #### 事件和区块/交易数据 -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): +传递给事件处理程序的以太坊事件(例如前面示例中的 `Transfer` 事件)不仅提供对事件参数的访问,还提供对其父事务和它们所在的区块的访问。以下数据可以从 `event` 实例中获取(这些类是 `graph-ts` 中的 `ethereum` 模块的一部分): ```typescript class Event { @@ -473,7 +473,7 @@ class Log { #### 访问智能合约状态 -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. +由 `graph codegen` 生成的代码还包括用于子图中使用的智能合约的类。这些类可以用于访问智能合约在当前区块上的公共状态变量和调用函数。 一种常见的模式是访问事件起源的合约。 这是通过以下代码实现的: @@ -492,15 +492,15 @@ export function handleTransfer(event: TransferEvent) { } ``` -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type +这里将 `Transfer` 别名为 `TransferEvent`,以避免与实体类型产生命名冲突。 -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. +只要以太坊上的 `ERC20Contract` 有一个名为 `symbol` 的公共只读函数,就可以使用 `.symbol()` 来调用它。对于公共状态变量,将自动生成一个同名的方法。 作为子图一部分的任何其他合约都可以从生成的代码中导入,并且可以绑定到一个有效地址。 #### 处理重复调用 -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: +如果您的合约的只读方法可能回滚,则应通过在生成的合约方法前加上 `try_` 来处理。例如,Gravity 合约暴露了 `gravatarToOwner` 方法。下面的代码可以处理该方法中的回滚: ```typescript let gravity = Gravity.bind(event.address) @@ -516,7 +516,7 @@ if (callResult.reverted) { #### 编码/解码 ABI -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. +数据可以按照以太坊的 ABI 编码格式使用 `ethereum` 模块中的 `encode` 和 `decode` 函数进行编码和解码。 ```typescript import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' @@ -535,9 +535,9 @@ let decoded = ethereum.decode('(address,uint256)', encoded) 查询更多的信息: -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). +- [ABI 规范](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) +- 您可以使用[Rust Ethereum ABI 库/CLI](https://github.com/rust-ethereum/ethabi)来进行编码和解码。 +- 更复杂的示例可以在[这里](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72)找到。 ### 日志记录 API @@ -545,17 +545,17 @@ let decoded = ethereum.decode('(address,uint256)', encoded) 从 '@graphprotocol/graph-ts'导入 { log } ``` -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. +`log` API 允许子图将信息记录到 Graph Node 的标准输出以及 Graph Explorer。可以使用不同的日志级别记录消息。提供了一种基本的格式字符串语法来从参数组成日志消息。 -The `log` API includes the following functions: +`log` API 包括以下函数: -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. +- `log.debug(fmt: string, args: Array): void` - 记录调试消息。 +- `log.info(fmt: string, args: Array): void` - 记录信息消息。 +- `log.warning(fmt: string, args: Array): void` - 记录警告消息。 +- `log.error(fmt: string, args: Array): void` - 记录错误消息。 +- `log.critical(fmt: string, args: Array): void` – 记录关键消息并终止子图。 -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. +`log` API 接受一个格式字符串和一个字符串值数组。然后,它用数组中的字符串值替换占位符。第一个 `{}` 占位符会被数组中的第一个值替换,第二个 `{}` 占位符会被第二个值替换,依此类推。 ```typescript log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) @@ -565,7 +565,7 @@ log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue. ##### 记录单个值 -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: +在下面的示例中,字符串值 "A" 被传入一个数组中成为 `['A']`,然后被记录: ```typescript let myValue = 'A' @@ -591,7 +591,7 @@ export function handleSomeEvent(event: SomeEvent): void { #### 从现有数组记录多个条目 -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. +在日志消息字符串中,参数数组中的每个条目都需要自己的占位符 {}。下面的示例包含了日志消息中的三个占位符 {}。因此,myArray 中的所有三个值都被记录。 ```typescript let myArray = ['A', 'B', 'C'] @@ -635,7 +635,7 @@ export function handleSomeEvent(event: SomeEvent): void { 从 '@graphprotocol/graph-ts'导入{ ipfs } ``` -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. +智能合约偶尔会在链上固定 IPFS 文件。这允许映射从合约获取 IPFS 哈希并从 IPFS 读取相应的文件。文件数据将作为 `Bytes` 返回,通常需要进一步处理,例如使用稍后在本页面中记录的 `json` API。 给定一个 IPFS hash或路径,从 IPFS 读取文件的过程如下: @@ -650,9 +650,9 @@ let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' let data = ipfs.cat(path) ``` -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. +**注意:** 目前 `ipfs.cat` 不是确定性的。如果在请求超时之前无法从 IPFS 网络检索到文件,则会返回 `null`。因此,始终值得检查结果是否为 `null`。 -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: +还可以使用 ipfs.map 以流式处理的方式处理较大的文件。该函数需要 IPFS 文件的哈希或路径、回调函数的名称以及修改其行为的标志: ```typescript import { JSONValue, Value } from '@graphprotocol/graph-ts' @@ -682,9 +682,9 @@ ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) ``` -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. +当前仅支持的标志是 `json`,必须传递给 `ipfs.map`。使用 `json` 标志时,IPFS 文件必须由一系列 JSON 值组成,每行一个值。`ipfs.map` 的调用将读取文件中的每一行,将其反序列化为 `JSONValue` 并为每个值调用回调函数。然后,回调函数可以使用实体操作将数据存储到 `JSONValue` 中。仅当调用 `ipfs.map` 的处理程序成功完成时,才会存储实体更改;在此期间,它们将保留在内存中,因此 `ipfs.map` 可以处理的文件大小受到限制。 -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. +成功时,`ipfs.map` 返回 `void`。如果回调的任何调用导致错误,则调用 `ipfs.map` 的处理程序将被中止,并且子图被标记为失败。 ### Crypto API @@ -692,7 +692,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes 从'@graphprotocol/graph-ts'导入{ crypto } ``` -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: +`crypto` API 为映射中的使用提供了加密函数。目前,只有一个函数可用: - `crypto.keccak256(input: ByteArray): ByteArray` @@ -702,14 +702,14 @@ The `crypto` API makes a cryptographic functions available for use in mappings. 从'@graphprotocol/graph-ts'导入{ json, JSONValueKind } ``` -JSON data can be parsed using the `json` API: +JSON 数据可以使用 json API 进行解析: -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed +- `json.fromBytes(data: Bytes): JSONValue` – 从有效的 UTF-8 序列的 `Bytes` 数组中解析 JSON 数据 +- `json.try_fromBytes(data: Bytes): Result` – `json.fromBytes` 的安全版本,如果解析失败,则返回错误变体 +- `json.fromString(data: string): JSONValue` – 从有效的 UTF-8 `String` 解析 JSON 数据 +- `json.try_fromString(data: string): Result` – `json.fromString` 的安全版本,如果解析失败,则返回错误变体 -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: +`JSONValue` 类提供了一种从任意 JSON 文档中提取值的方法。由于 JSON 值可以是布尔值、数字、数组等,因此 `JSONValue` 带有一个 `kind` 属性用于检查值的类型: ```typescript let value = json.fromBytes(...) @@ -718,63 +718,63 @@ if (value.kind == JSONValueKind.BOOL) { } ``` -In addition, there is a method to check if the value is `null`: +此外,还有一个方法用于检查值是否为 `null`: - `value.isNull(): boolean` -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: +当值的类型确定时,可以使用以下方法之一将其转换为[内置类型](#built-in-types): - `value.toBool(): boolean` - `value.toI64(): i64` - `value.toF64(): f64` - `value.toBigInt(): BigInt` - `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) +- `value.toArray(): Array` - (然后使用上述 5 种方法之一将 `JSONValue` 转换) ### 类型转换参考 -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() 或 s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| 源类型 | 目标类型 | 转换函数 | +| --------------------------------------- | --------------------------------------- | ----------------------------------------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() 或 s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toU64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### 数据源元数据 -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: +您可以通过 `dataSource` 命名空间检查调用处理程序的数据源的合约地址、网络和上下文: - `dataSource.address(): Address` - `dataSource.network(): string` @@ -782,11 +782,11 @@ You can inspect the contract address, network and context of the data source tha ### Entity 和 DataSourceContext -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: +基础的 `Entity` 类和子类 `DataSourceContext` 类都有助于动态设置和获取字段的帮助函数: - `setString(key: string, value: string): void` - `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` +- `setI32(key: string, value: i32): void` - `setBytes(key: string, value: Bytes): void` - `setBoolean(key: string, value: bool): void` - `setBigDecimal(key, value: BigDecimal): void` @@ -797,11 +797,11 @@ The base `Entity` class and the child `DataSourceContext` class have helpers to - `getBoolean(key: string): boolean` - `getBigDecimal(key: string): BigDecimal` -### DataSourceContext in Manifest +### 清单文件中的 DataSourceContext -The `context` section within `dataSources` allows you to define key-value pairs that are accessible within your subgraph mappings. The available types are `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`, `List`, and `BigInt`. +`dataSources` 内的 `context` 部分允许您定义在子图映射中可访问的键值对。可用的类型包括 `Bool`、`String`、`Int`、`Int8`、`BigDecimal`、`Bytes`、`List` 和 `BigInt`。 -Here is a YAML example illustrating the usage of various types in the `context` section: +以下是一个 YAML 示例,说明了在 context 部分使用各种类型的情况: ```yaml dataSources: @@ -841,13 +841,13 @@ dataSources: data: '1000000000000000000000000' ``` -- `Bool`: Specifies a Boolean value (`true` or `false`). -- `String`: Specifies a String value. -- `Int`: Specifies a 32-bit integer. -- `Int8`: Specifies an 8-bit integer. -- `BigDecimal`: Specifies a decimal number. Must be quoted. -- `Bytes`: Specifies a hexadecimal string. -- `List`: Specifies a list of items. Each item needs to specify its type and data. -- `BigInt`: Specifies a large integer value. Must be quoted due to its large size. +- `Bool`:指定一个布尔值(`true` 或 `false`)。 +- `String`:指定一个字符串值。 +- `Int`:指定一个32位整数。 +- `Int8`:指定一个8位整数。 +- `BigDecimal`:指定一个十进制数。必须用引号括起来。 +- `Bytes`:指定一个十六进制字符串。 +- `List`:指定一个项目列表。每个项目都需要指定其类型和数据。 +- `BigInt`:指定一个大整数值。由于其较大,必须用引号括起来。 -This context is then accessible in your subgraph mapping files, enabling more dynamic and configurable subgraphs. +该上下文可以在您的子图映射文件中访问,从而实现更加动态和可配置的子图。 From 5b59037aa5b1b913fc810c7f30df60c48ea99794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:34 -0400 Subject: [PATCH 591/924] New translations api.mdx (Urdu (Pakistan)) --- website/pages/ur/developing/graph-ts/api.mdx | 94 ++++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/website/pages/ur/developing/graph-ts/api.mdx b/website/pages/ur/developing/graph-ts/api.mdx index d2c95c6053d8..b03a3dea1dda 100644 --- a/website/pages/ur/developing/graph-ts/api.mdx +++ b/website/pages/ur/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| ورزن | جاری کردہ نوٹس | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| ورزن | جاری کردہ نوٹس | +| :---: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | | 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### بلٹ ان اقسام @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() موجودہ ہستی کو اپ ڈیٹ کرنے کے دو طریقے ہیں: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. پراپرٹیز کو تبدیل کرنا زیادہ تر معاملات میں سیدھا آگے ہے، جنریٹڈ پراپرٹی سیٹرز کی بدولت: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### تبادلوں کا حوالہ ٹائپ کریں -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### ڈیٹا ماخذ میٹا ڈیٹا From 5cd1938736709cc78b1a2b0cbe2852dcb4799803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:35 -0400 Subject: [PATCH 592/924] New translations api.mdx (Vietnamese) --- website/pages/vi/developing/graph-ts/api.mdx | 102 +++++++++---------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/website/pages/vi/developing/graph-ts/api.mdx b/website/pages/vi/developing/graph-ts/api.mdx index 5a93ec9ee4b6..85610543f920 100644 --- a/website/pages/vi/developing/graph-ts/api.mdx +++ b/website/pages/vi/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Phiên bản | Ghi chú phát hành | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Phiên bản | Ghi chú phát hành | +| :-------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Các loại cài sẵn @@ -211,7 +211,7 @@ It adds the following method on top of the `Bytes` API: - `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string - `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error -### API cửa hàng +### Store API ```typescript import { store } from '@graphprotocol/graph-ts' @@ -252,7 +252,7 @@ When a `Transfer` event is encountered while processing the chain, it is passed Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. -#### Tải các thực thể từ cửa hàng +#### Loading entities from the store If an entity already exists, it can be loaded from the store with the following: @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() There are two ways to update an existing entity: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Changing properties is straight forward in most cases, thanks to the generated property setters: @@ -354,7 +354,7 @@ entity.numbers = numbers entity.save() ``` -#### Xóa các thực thể khỏi cửa hàng +#### Removing entities from the store There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Tham chiếu Chuyển đổi Loại -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Siêu Dữ liệu Nguồn Dữ liệu From 20e74ef2fd2e4a6d2390d61c18b3678f13ae0941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:36 -0400 Subject: [PATCH 593/924] New translations api.mdx (Marathi) --- website/pages/mr/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/mr/developing/graph-ts/api.mdx b/website/pages/mr/developing/graph-ts/api.mdx index e92d7cbf0bc3..c3aacbae1b40 100644 --- a/website/pages/mr/developing/graph-ts/api.mdx +++ b/website/pages/mr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| आवृत्ती | रिलीझ नोट्स | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| आवृत्ती | रिलीझ नोट्स | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### अंगभूत प्रकार @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() विद्यमान घटक अद्यतनित करण्याचे दोन मार्ग आहेत: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. व्युत्पन्न केलेल्या प्रॉपर्टी सेटरला धन्यवाद, बहुतेक प्रकरणांमध्ये गुणधर्म बदलणे सरळ पुढे आहे: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### प्रकार रूपांतरण संदर्भ -| Source(s) | Destination | Conversion function | -| ----------------------- | ----------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| स्ट्रिंग (हेक्साडेसिमल) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| स्ट्रिंग (हेक्साडेसिमल) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### डेटा स्रोत मेटाडेटा From 55b970bf804774943a3156a3ae250d858db6a2bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:37 -0400 Subject: [PATCH 594/924] New translations api.mdx (Hindi) --- website/pages/hi/developing/graph-ts/api.mdx | 102 +++++++++---------- 1 file changed, 49 insertions(+), 53 deletions(-) diff --git a/website/pages/hi/developing/graph-ts/api.mdx b/website/pages/hi/developing/graph-ts/api.mdx index 4d7e5d751d23..3bf086fc0ce9 100644 --- a/website/pages/hi/developing/graph-ts/api.mdx +++ b/website/pages/hi/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| संस्करण | रिलीज नोट्स | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| संस्करण | रिलीज नोट्स | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### अंतर्निहित प्रकार @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() किसी मौजूदा निकाय को अद्यतन करने के दो तरीके हैं: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. ज्यादातर मामलों में गुण बदलना सीधे आगे है, उत्पन्न संपत्ति सेटर्स के लिए धन्यवाद: @@ -559,11 +559,7 @@ The `log` API includes the following functions: The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. ```typescript -log.info('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [ - value.toString(), - OtherValue.toString(), - 'पहले से ही एक स्ट्रिंग', -]) +log.info ('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [value.toString (), OtherValue.toString (), 'पहले से ही एक स्ट्रिंग']) ``` #### एक या अधिक मान लॉग करना @@ -738,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### प्रकार रूपांतरण संदर्भ -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() या s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() या s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() या s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() या s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### डेटा स्रोत मेटाडेटा From 1c952f5f0c2ab640face4182f789fdd834176bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:38 -0400 Subject: [PATCH 595/924] New translations api.mdx (Yoruba) --- website/pages/yo/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/yo/developing/graph-ts/api.mdx b/website/pages/yo/developing/graph-ts/api.mdx index 45bfad8f7bfb..ab5e2b27b49e 100644 --- a/website/pages/yo/developing/graph-ts/api.mdx +++ b/website/pages/yo/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -319,8 +319,8 @@ let tokens = holder.tokens.load() There are two ways to update an existing entity: -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. +1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. +2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. Changing properties is straight forward in most cases, thanks to the generated property setters: @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From fdc9616c255743a88ac92cc1d55f1a8049fbdba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:38 -0400 Subject: [PATCH 596/924] New translations supported-networks.json (Romanian) --- website/pages/ro/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/ro/developing/supported-networks.json b/website/pages/ro/developing/supported-networks.json index 5d06eb1bf08d..5e12392b8c7d 100644 --- a/website/pages/ro/developing/supported-networks.json +++ b/website/pages/ro/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Network", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From 057501d987fb27052df252ecc64b31936fda6479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:39 -0400 Subject: [PATCH 597/924] New translations supported-networks.json (French) --- website/pages/fr/developing/supported-networks.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/website/pages/fr/developing/supported-networks.json b/website/pages/fr/developing/supported-networks.json index 3155b8c62b03..de15337ae53a 100644 --- a/website/pages/fr/developing/supported-networks.json +++ b/website/pages/fr/developing/supported-networks.json @@ -1,8 +1,9 @@ { - "network": "Network", + "network": "Réseau", "cliName": "Nom du CLI", "chainId": "ID de la chaîne", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Réseau décentralisé" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Réseau décentralisé", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From 5fa9713070ee4979faf69e32e828ded47bc87948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:40 -0400 Subject: [PATCH 598/924] New translations supported-networks.json (Spanish) --- website/pages/es/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/es/developing/supported-networks.json b/website/pages/es/developing/supported-networks.json index a134116ab4a3..a1f4760729cf 100644 --- a/website/pages/es/developing/supported-networks.json +++ b/website/pages/es/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Red", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From 79438eccac1ac47a0c2e3797cac66356adf31c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:41 -0400 Subject: [PATCH 599/924] New translations supported-networks.json (Arabic) --- website/pages/ar/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/ar/developing/supported-networks.json b/website/pages/ar/developing/supported-networks.json index 5d06eb1bf08d..5e12392b8c7d 100644 --- a/website/pages/ar/developing/supported-networks.json +++ b/website/pages/ar/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Network", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From ab097ee2cab6a6611ef58dfad770b99b9e8a052b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:42 -0400 Subject: [PATCH 600/924] New translations supported-networks.json (Czech) --- website/pages/cs/developing/supported-networks.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/website/pages/cs/developing/supported-networks.json b/website/pages/cs/developing/supported-networks.json index 5d06eb1bf08d..dd5c19f2524b 100644 --- a/website/pages/cs/developing/supported-networks.json +++ b/website/pages/cs/developing/supported-networks.json @@ -1,8 +1,9 @@ { - "network": "Network", - "cliName": "CLI Name", - "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "network": "Síť", + "cliName": "Název CLI", + "chainId": "ID řetězce", + "studioAndHostedService": "Studio a hostovaná služba", + "decentralizedNetwork": "Decentralizovaná síť", + "supportedByUpgradeIndexer": "Podporováno pouze aktualizací Indexer", + "supportsSubstreams": "Podporuje Substreams" } From a0692646f36ef4429c103cc1326bc6e6253d1d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:43 -0400 Subject: [PATCH 601/924] New translations supported-networks.json (German) --- website/pages/de/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/de/developing/supported-networks.json b/website/pages/de/developing/supported-networks.json index 5d06eb1bf08d..5e12392b8c7d 100644 --- a/website/pages/de/developing/supported-networks.json +++ b/website/pages/de/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Network", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From 8724d58a0a40fd2d3b1b28fea9e72241fff55088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:43 -0400 Subject: [PATCH 602/924] New translations supported-networks.json (Italian) --- website/pages/it/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/it/developing/supported-networks.json b/website/pages/it/developing/supported-networks.json index c2be29dcb133..fa21cfc48534 100644 --- a/website/pages/it/developing/supported-networks.json +++ b/website/pages/it/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "La rete", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From b2ef33d84f430ed06ed51b501d0ed8941e5a0f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:44 -0400 Subject: [PATCH 603/924] New translations supported-networks.json (Japanese) --- website/pages/ja/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/ja/developing/supported-networks.json b/website/pages/ja/developing/supported-networks.json index 66bd8a6895e0..e85b15747865 100644 --- a/website/pages/ja/developing/supported-networks.json +++ b/website/pages/ja/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "ネットワーク", "cliName": "CLI名", "chainId": "チェーンID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "分散型ネットワーク" + "studioAndHostedService": "スタジオとホスティングサービス", + "decentralizedNetwork": "分散型ネットワーク", + "supportedByUpgradeIndexer": "アップグレードインデクサーでのみサポート", + "supportsSubstreams": "サブストリームをサポート" } From 669b0d8f613386cc1c9f40bddb5fb600ca4f4845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:45 -0400 Subject: [PATCH 604/924] New translations supported-networks.json (Korean) --- website/pages/ko/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/ko/developing/supported-networks.json b/website/pages/ko/developing/supported-networks.json index 5d06eb1bf08d..5e12392b8c7d 100644 --- a/website/pages/ko/developing/supported-networks.json +++ b/website/pages/ko/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Network", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From f7f1f241aeb0c20ea4376bdbf2aaf53a70e518f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:46 -0400 Subject: [PATCH 605/924] New translations supported-networks.json (Dutch) --- website/pages/nl/developing/supported-networks.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/website/pages/nl/developing/supported-networks.json b/website/pages/nl/developing/supported-networks.json index 5d06eb1bf08d..f80c16edfff8 100644 --- a/website/pages/nl/developing/supported-networks.json +++ b/website/pages/nl/developing/supported-networks.json @@ -1,8 +1,9 @@ { - "network": "Network", + "network": "Netwerk", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From 245cff425102968762ce09ead42fb67affac04fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:47 -0400 Subject: [PATCH 606/924] New translations supported-networks.json (Polish) --- website/pages/pl/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/pl/developing/supported-networks.json b/website/pages/pl/developing/supported-networks.json index 5d06eb1bf08d..5e12392b8c7d 100644 --- a/website/pages/pl/developing/supported-networks.json +++ b/website/pages/pl/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Network", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From e46e9c98c7a4ac68ba8f8a1c13002286dff5fc6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:47 -0400 Subject: [PATCH 607/924] New translations supported-networks.json (Portuguese) --- website/pages/pt/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/pt/developing/supported-networks.json b/website/pages/pt/developing/supported-networks.json index a3be638d8630..540247599f40 100644 --- a/website/pages/pt/developing/supported-networks.json +++ b/website/pages/pt/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Rede", "cliName": "Nome na CLI", "chainId": "ID da Chain", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Rede Descentralizada" + "studioAndHostedService": "Studio e Serviço Hospedado", + "decentralizedNetwork": "Rede Descentralizada", + "supportedByUpgradeIndexer": "Apoiado apenas por Indexadores de atualização", + "supportsSubstreams": "Apoia Substreams" } From 337fbf3206af69c8189abd531a21011fd930fa9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:48 -0400 Subject: [PATCH 608/924] New translations supported-networks.json (Russian) --- website/pages/ru/developing/supported-networks.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/website/pages/ru/developing/supported-networks.json b/website/pages/ru/developing/supported-networks.json index be1a7d975c79..dd4ad15cc08b 100644 --- a/website/pages/ru/developing/supported-networks.json +++ b/website/pages/ru/developing/supported-networks.json @@ -1,8 +1,9 @@ { - "network": "Network", + "network": "Сеть", "cliName": "Название CLI", "chainId": "ID чейна", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Децентрализованная сеть" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Децентрализованная сеть", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From bbe47f1b1f56168578b9ec44bc3ba8bb20b6db09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:49 -0400 Subject: [PATCH 609/924] New translations supported-networks.json (Swedish) --- website/pages/sv/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/sv/developing/supported-networks.json b/website/pages/sv/developing/supported-networks.json index d82a87f3ace0..b3b8866abbae 100644 --- a/website/pages/sv/developing/supported-networks.json +++ b/website/pages/sv/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Nätverk", "cliName": "Kommandoradsgränssnitt namn", "chainId": "Kedje-ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentraliserat Nätverk" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentraliserat Nätverk", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From 2556f5991129a3becd8b6f5c1fe126cc9d9ec47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:50 -0400 Subject: [PATCH 610/924] New translations supported-networks.json (Turkish) --- website/pages/tr/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/tr/developing/supported-networks.json b/website/pages/tr/developing/supported-networks.json index c456813f402f..5b9f2c56f4ce 100644 --- a/website/pages/tr/developing/supported-networks.json +++ b/website/pages/tr/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Ağ", "cliName": "CLI Adı", "chainId": "Zincir Kimliği", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Merkeziyetsiz Ağ" + "studioAndHostedService": "Stüdyo ve Barındırılan Hizmet", + "decentralizedNetwork": "Merkeziyetsiz Ağ", + "supportedByUpgradeIndexer": "Yalnızca yükseltme dizinleyicisi tarafından desteklenir", + "supportsSubstreams": "Substream'leri Destekler" } From d511e700723d3cb3a226e0f3d1682dddde60f0c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:51 -0400 Subject: [PATCH 611/924] New translations supported-networks.json (Ukrainian) --- website/pages/uk/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/uk/developing/supported-networks.json b/website/pages/uk/developing/supported-networks.json index 5d06eb1bf08d..5e12392b8c7d 100644 --- a/website/pages/uk/developing/supported-networks.json +++ b/website/pages/uk/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Network", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From 29145bca326df7c4d1bf486f408ca2f2643484c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:51 -0400 Subject: [PATCH 612/924] New translations supported-networks.json (Chinese Simplified) --- website/pages/zh/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/zh/developing/supported-networks.json b/website/pages/zh/developing/supported-networks.json index 420f4e2cc112..5e6294cec90e 100644 --- a/website/pages/zh/developing/supported-networks.json +++ b/website/pages/zh/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "网络", "cliName": "CLI名字", "chainId": "链id", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "去中心化网络" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "去中心化网络", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From f0c423918e84aeddb47589fca894d09c477a6064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:52 -0400 Subject: [PATCH 613/924] New translations supported-networks.json (Urdu (Pakistan)) --- website/pages/ur/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/ur/developing/supported-networks.json b/website/pages/ur/developing/supported-networks.json index d145aa4d2159..1286c4859e34 100644 --- a/website/pages/ur/developing/supported-networks.json +++ b/website/pages/ur/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "نیٹ ورک", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From 37697ffe9d2894e6ff1359b320ec91e5472be5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:53 -0400 Subject: [PATCH 614/924] New translations supported-networks.json (Vietnamese) --- website/pages/vi/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/vi/developing/supported-networks.json b/website/pages/vi/developing/supported-networks.json index 3538a4752257..ce2e98ccfe7c 100644 --- a/website/pages/vi/developing/supported-networks.json +++ b/website/pages/vi/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Mạng lưới", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From 9c8073a2f7e1493a11e8fcde3470d190ce95c999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:54 -0400 Subject: [PATCH 615/924] New translations supported-networks.json (Marathi) --- website/pages/mr/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/mr/developing/supported-networks.json b/website/pages/mr/developing/supported-networks.json index 5d06eb1bf08d..5e12392b8c7d 100644 --- a/website/pages/mr/developing/supported-networks.json +++ b/website/pages/mr/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Network", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From c9ba86f61486379ca0b3f2083bdcd55c4c2dfaf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:55 -0400 Subject: [PATCH 616/924] New translations supported-networks.json (Hindi) --- website/pages/hi/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/hi/developing/supported-networks.json b/website/pages/hi/developing/supported-networks.json index ae1a69bfc019..d09515af0489 100644 --- a/website/pages/hi/developing/supported-networks.json +++ b/website/pages/hi/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "नेटवर्क", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From 84487940148643162968ff3871baf532a1de4fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:56 -0400 Subject: [PATCH 617/924] New translations supported-networks.json (Yoruba) --- website/pages/yo/developing/supported-networks.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/yo/developing/supported-networks.json b/website/pages/yo/developing/supported-networks.json index 5d06eb1bf08d..5e12392b8c7d 100644 --- a/website/pages/yo/developing/supported-networks.json +++ b/website/pages/yo/developing/supported-networks.json @@ -2,7 +2,8 @@ "network": "Network", "cliName": "CLI Name", "chainId": "Chain ID", - "hostedService": "Hosted Service", - "subgraphStudio": "Subgraph Studio", - "decentralizedNetwork": "Decentralized Network" + "studioAndHostedService": "Studio and Hosted Service", + "decentralizedNetwork": "Decentralized Network", + "supportedByUpgradeIndexer": "Supported only by upgrade Indexer", + "supportsSubstreams": "Supports Substreams" } From a0616c9d767757c27ad61fc0416e6d3d7f1da280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:56 -0400 Subject: [PATCH 618/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Romanian) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/ro/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/ro/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/ro/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/ro/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 570dcda4cb677a7638dc52d3d6cff2598a9ee332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:57 -0400 Subject: [PATCH 619/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (French) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/website/pages/fr/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/fr/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..6dc329c45023 100644 --- a/website/pages/fr/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/fr/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -1,27 +1,35 @@ --- -title: Subgraph ID vs Deployment ID +title: Identifiant du Subgraph VS. Identifiant de déploiement --- -A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. +Un Subgraph est identifié par un identifiant Subgraph (Subpgraph ID), et chaque version de ce subgraph est identifiée par un identifiant de déploiement (Deployment ID). -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +Lors de l'exécution d'une requête sur un Subgraph, n'importe quel ID peut être utilisé (Subraph ID, Deployment ID). Cependant, il y a d'importantes différences entre ces deux options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) -## Deployment ID +## Identifiant du Subgraph -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +Chaque Subgraph a un indentifiant. Cet identifiant est unique. Il s'agit de l'identifiant du Subgraph (Subgraph ID). Cet identifiant reste identique au fil des versions d'un Subgraph. Lorsque des requêtes sont executées en utilisant l'identifiant du Subgraph (Subgraph ID), aucune version n'est spécifiée par défaut. Cela signifie que la version du Subgraph répondant à votre requête ne sera pas nécessairement la dernière version. Par défaut, la plus récente version synchronisée et saine du Subgraph sera utilisée. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +Exemple d'endpoint utilisant l'identifiant du Subgraph: -Example endpoint that uses Deployment ID: +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` + +## Identifiant de déploiement + +Depuis un Subgraph deployé, il est possible de sélectionner une version parmi l'intégralité des versions précédemment déployées. Chaque version a un identifiant de déploiement (Deployment ID) unique. + +Lorsque vous utilisez un identifiant de déploiement (Deployment ID) afin d'exécuter une requête sur un Subgraph, vous spécifiez directement une version de Subgraph à requêter. Cela signifie que c'est cette version spécifique du Subgraph - avec cet identifiant de déploiement - qui répondra à votre requête. + +Exemple d'endpoint utilisant l'identifiant de déploiement: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## À savoir : Identifiant du Subgraph VS. Identifiant de déploiement -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +Si vous souhaitez être certain que la dernière version de votre Subgraph sera celle utilisée par votre requête, vous devriez utiliser l'identifiant de déploiement (Deployment ID). Cela nécessite que vous mettiez à jour l'identifiant de déploiement de votre Subgraph depuis le front-end de votre application lorsque vous publiez une nouvelle version de votre Subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +Si vous souhaitez qu'une version spécifique de votre Subgraph soit utilisée par votre requête, vous devriez également utiliser l'identifiant de déploiement (Deployment ID). -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +Si vous n'avez pas besoin d'utiliser la dernière version de votre Subgraph pour vos requêtes, vous pouvez utiliser l'identifiant du Subgraph (Subgraph ID) directement. Cependant, ayez en tête qu'une version plus ancienne de votre Subgraph pourra être utilisée pour répondre à vos requêtes en utilisant cette méthode. From eb41340ad5b03fa2dfc91fa2444b4c7eec1811d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:58 -0400 Subject: [PATCH 620/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Spanish) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/es/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/es/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/es/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/es/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 219bb9a4580649cd269e65bb2835534ff6f91dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:17:59 -0400 Subject: [PATCH 621/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Arabic) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/ar/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/ar/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/ar/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/ar/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 349e0497738292541f42b00431abb96e4cf7ee24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:00 -0400 Subject: [PATCH 622/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Czech) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/website/pages/cs/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/cs/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..446286fc0b45 100644 --- a/website/pages/cs/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/cs/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -1,27 +1,35 @@ --- -title: Subgraph ID vs Deployment ID +title: ID podgrafu vs. ID nasazení --- -A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. +Podgraf je identifikován ID podgrafu a každá verze podgrafu je identifikována ID nasazení. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +Při dotazování na podgraf lze použít obě ID. Mezi oběma možnostmi však existují některé důležité rozdíly. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) -## Deployment ID +## ID podgrafu -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +ID podgrafu je jedinečný identifikátor podgrafu. Zůstává konstantní ve všech verzích podgrafu. Při dotazování pomocí ID podgrafu se verze neurčuje. To znamená, že verze podgrafu, která odpovídá na váš dotaz, nemusí být nejnovější verzí. Spíše to bude nejnovější verze, která je synchronizovaná a zdravá. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +Příklad koncového bodu, který používá ID podgrafu: -Example endpoint that uses Deployment ID: +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` + +## ID nasazení + +Při prohlížení nasazeného podgrafu jsou k dispozici dříve nasazené verze, které lze vybrat. Každá verze v tomto seznamu má jedinečné ID nasazení. + +Při zadávání dotazů pomocí ID nasazení zadáváte verzi tohoto podgrafu, na kterou se má dotazovat. To znamená, že verze podgrafu, která odpoví na váš dotaz, bude verze určená ID nasazení. + +Příklad koncového bodu, který používá ID nasazení: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Úvahy při použití ID podgrafu vs. ID nasazení -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +Pokud chcete zajistit, aby na vaše dotazy odpovídala nejnovější verze podgrafu, měli byste použít ID nasazení. To vyžaduje, abyste ID nasazení aktualizovali ve svém frontendu vždy, když zveřejníte novou verzi subgrafu. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +Pokud chcete mít jistotu, že se dotazujete na konkrétní verzi podgrafu, měli byste použít také ID nasazení. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +Pokud nepotřebujete zajistit, aby na vaše dotazy odpovídala vždy nejnovější verze podgrafu, můžete použít ID podgrafu. Uvědomte si však, že to může vést k tomu, že na vaše dotazy bude odpovídat starší verze vašeho podgrafu. From 9a8199516cd7753671cdab0c45be11a27609426c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:00 -0400 Subject: [PATCH 623/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (German) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/de/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/de/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/de/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/de/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From a6dff24a5b0fe5ddfa284d669aa53cabb70be673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:01 -0400 Subject: [PATCH 624/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Italian) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/it/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/it/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/it/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/it/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 7018f110606699568596b19fdac691a47b84a151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:02 -0400 Subject: [PATCH 625/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Japanese) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/website/pages/ja/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/ja/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..12718190865f 100644 --- a/website/pages/ja/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/ja/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -2,26 +2,34 @@ title: Subgraph ID vs Deployment ID --- -A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. +サブグラフはサブグラフIDで識別され、サブグラフの各バージョンはデプロイメントIDで識別されます。 -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +サブグラフをクエリする場合、どちらのIDも使用できます。しかし、この2つのオプションには重要な違いがあります。 -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +Subgraph IDは、サブグラフの一意な識別子です。このIDは、サブグラフのすべてのバージョンで一定のものです。Subgraph IDを使用してクエリを実行する場合、バージョンは指定されません。つまり、クエリに応答するサブグラフのバージョンは、最新バージョンとは限りません。むしろ、同期された健全な最新バージョンになります。 + +Subgraph ID を使用するエンドポイントの例: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +デプロイされたサブグラフを表示しているとき、以前にデプロイされたバージョンを選択することができます。そのリスト内の各バージョンは、ユニークななDeployment IDを持っています。 -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +Deployment IDを使用してクエリを実行する場合、そのサブグラフのバージョンを指定してクエリを実行します。つまり、クエリに応答するサブグラフのバージョンは、Deployment IDで指定されたバージョンになります。 -Example endpoint that uses Deployment ID: +Deployment ID を使用するエンドポイントの例: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Subgraph IDとDeployment IDを使い分ける際の注意点 -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +最新バージョンのサブグラフが確実にクエリに応答するようにするには、Deployment IDを使用する必要があります。この場合、サブグラフの新バージョンを公開するたびに、フロントエンドでDeployment IDを更新する必要があります。 -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +サブグラフの特定のバージョンをクエリしていることを確認したい場合は、Deployment IDも使用します。 -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +最新バージョンのサブグラフが常にクエリに応答することを保証する必要がない場合は、Subgraph IDを使用することができます。しかし、この場合、古いバージョンのサブグラフがクエリに応答する可能性があることに注意してください。 From 0da5abf51e3c8178a990935a597e026423d97932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:03 -0400 Subject: [PATCH 626/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Korean) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/ko/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/ko/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/ko/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/ko/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 8db42d580448811563a7becbb4865211886b005e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:03 -0400 Subject: [PATCH 627/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Dutch) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/nl/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/nl/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/nl/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/nl/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 4cbe314713230531b6d020d0df80d656942cabee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:04 -0400 Subject: [PATCH 628/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Polish) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/pl/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/pl/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/pl/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/pl/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 1e78c509da04e39bee45cc001cdcb79f7c3f1ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:05 -0400 Subject: [PATCH 629/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Portuguese) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/website/pages/pt/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/pt/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..1b600df7e472 100644 --- a/website/pages/pt/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/pt/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -1,27 +1,35 @@ --- -title: Subgraph ID vs Deployment ID +title: ID de Subgraph contra ID de Lançamento --- -A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. +Um subgraph é identificado por um ID de Subgraph, e cada versão do subgraph é identificada por um ID de Lançamento. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +Ao consultar um subgraph, qualquer dos dois IDs pode ser usado. Porém, há algumas diferenças importantes entre as duas opções. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) -## Deployment ID +## ID de Subgraph -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +A ID de Subgraph é uma identificadora única para um subgraph, que permanece constante por todas as versões de um subgraph. Quando a ID do Subgraph é usada para uma consulta, você não especifica uma versão. Isto significa que a versão do subgraph que responde ao seu query pode não ser a versão mais recente. Em vez disto, será a versão mais recente que estiver sincronizada e saudável. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +Exemplo de endpoint que usa ID de Subgraph: -Example endpoint that uses Deployment ID: +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` + +## ID de Lançamento + +Ao visualizar um subgraph lançado, as versões anteriores estão disponíveis para seleção. Cada versão naquela lista tem um ID de Lançamento único. + +Ao fazer queries com o ID de Lançamento, é especificada uma versão daquele subgraph para consultar. Isto significa que a versão do subgraph que responderá ao seu query será a versão especificada pelo ID de Lançamento. + +Exemplo de endpoint que usa ID de Lançamento: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerações ao Usar ID de Subgraph contra ID de Lançamento -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +Se quiser garantir que a versão mais recente do seu subgraph responda aos seus queries, é necessário usar o ID de Lançamento. Isto exige a atualização do ID de Lançamento no seu frontend quando for editada uma versão nova do seu subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +Se quiser garantir que está a consultar uma versão específica do seu subgraph, use também a ID de Lançamento. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +Se não precisas garantir que a versão mais recente do seu subgraph sempre responda aos seus queries, use a ID de Subgraph. Entretando, fique ciente que isto pode fazer com que os seus queries sejam respondidos por uma versão mais antiga do seu subgraph. From 019afb9ad8e63d2bd3122e92e25a870649f72fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:06 -0400 Subject: [PATCH 630/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Russian) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/ru/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/ru/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/ru/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/ru/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From f5298f858e3c265323bb33b33712bbdef5ad19de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:07 -0400 Subject: [PATCH 631/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Swedish) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/sv/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/sv/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/sv/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/sv/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 4b045dc28320ebbf67966f8b6c596d992f570cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:08 -0400 Subject: [PATCH 632/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Turkish) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/website/pages/tr/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/tr/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..8fc33301e424 100644 --- a/website/pages/tr/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/tr/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -1,27 +1,35 @@ --- -title: Subgraph ID vs Deployment ID +title: Subgraph Kimliği vs Dağıtım Kimliği --- -A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. +Bir subgraph, bir Subgraph Kimliği ile tanımlanır ve subgraph'in her sürümü, bir Dağıtım Kimliği ile tanımlanır. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +Bir subgraph'i sorgularken her iki ID de kullanılabilir. Ancak, iki seçenek arasında bazı önemli farklar vardır. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) -## Deployment ID +## Subgraph Kimliği -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +Subgraph kimliği, bir subgraph için benzersiz bir tanımlayıcıdır. Bir subgraph'in tüm sürümlerinde sabit kalır. Sorgular Subgraph Kimliği kullanılarak yapıldığında, bir sürüm belirtmezsiniz. Bu, sorgunuza yanıt veren subgraph'in sürümünün en son sürüm olmayabileceği anlamına gelir. Bunun yerine, senkronize edilmiş ve sağlıklı olan en son sürüm olacaktır. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +Subgraph Kimliğini kullanan örnek uç nokta: -Example endpoint that uses Deployment ID: +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` + +## Dağıtım Kimliği + +Deploy edilmiş bir subgraph'i görüntülerken, daha önce konuşlandırılmış sürümler seçim için kullanılabilir. Bu listedeki her sürümün benzersiz bir Dağıtım Kimliği vardır. + +Dağıtım Kimliğini kullanarak sorgu yaptığınızda, o subgraph'in sorgulanacak bir sürümünü belirtmiş olursunuz. Bu, sorgunuza yanıt veren subgraph'in sürümünün Dağıtım Kimliği tarafından belirtilen sürüm olacağı anlamına gelir. + +Dağıtım Kimliğini kullanan örnek uç nokta: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Subgraph Kimliği ve Dağıtım Kimliği Kullanırken Dikkat Edilecek Hususlar -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +Subgraph'inizin en son sürümünün sorgularınıza yanıt verdiğinden emin olmak istiyorsanız Dağıtım Kimliğini kullanmalısınız. Bu, subgraph'inizin yeni bir sürümünü her yayınladığınızda ön ucunuzdaki Dağıtım Kimliğini güncellemenizi gerektirir. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +Subgraph'inizin belirli bir sürümünü sorguladığınızdan emin olmak istiyorsanız Dağıtım Kimliğini de kullanmalısınız. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +Subgraph'inizin en son sürümünün her zaman sorularınıza yanıt vereceğinden emin olmanız gerekmiyorsa Subgraph Kimliğini kullanabilirsiniz. Ancak bunun, sorularınızın subgraph'inizin eski bir sürümü tarafından yanıtlanmasıyla sonuçlanabileceğini unutmayın. From 0f9ae1ad6c2432e7e78dc4650e688a9130ce4514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:08 -0400 Subject: [PATCH 633/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Ukrainian) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/uk/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/uk/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/uk/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/uk/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 0538bac363e166b462094321cd91257599dba3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:09 -0400 Subject: [PATCH 634/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Chinese Simplified) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/zh/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/zh/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/zh/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/zh/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From bf23010c47e101b2efbe3cd7021f0954776e4e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:10 -0400 Subject: [PATCH 635/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Urdu (Pakistan)) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/website/pages/ur/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/ur/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..23dd3ea36a43 100644 --- a/website/pages/ur/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/ur/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -1,27 +1,35 @@ --- -title: Subgraph ID vs Deployment ID +title: سب گراف شناخت بمقابلہ تعیناتی شناخت --- -A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. +سب گراف کی شناخت سب گراف شناخت کے ذریعے کی جاتی ہے، اور سب گراف کے ہر ورژن کی شناخت ایک تعیناتی شناخت سے ہوتی ہے۔ -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +سب گراف سے کیوری کرتے وقت، یا تو شناخت استعمال کی جا سکتی ہے۔ تاہم، دو اختیارات کے درمیان کچھ اہم اختلافات ہیں. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) -## Deployment ID +## سب گراف شناخت -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +سب گراف شناخت سب گراف کے لیے ایک منفرد شناخت کنندہ ہے۔ یہ سب گراف کے تمام ورژنز میں مستقل رہتا ہے۔ جب سب گراف شناخت کا استعمال کرتے ہوئے کیوریز کی جاتی ہیں، تو آپ کسی ورژن کی وضاحت نہیں کر رہے ہیں۔ اس کا مطلب ہے کہ سب گراف کا وہ ورژن جو آپ کے کیوری کا جواب دیتا ہے وہ تازہ ترین ورژن نہیں ہوسکتا ہے۔ بلکہ، یہ سب سے حالیہ ورژن ہوگا جو مطابقت پذیر اور صحت مند ہے۔ -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +مثالی اینڈ پوائنٹ جو سب گراف شناخت استعمال کرتا ہے: -Example endpoint that uses Deployment ID: +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` + +## تعیناتی شناخت + +جب آپ تعینات کردہ سب گراف دیکھ رہے ہوتے ہیں، تو پہلے سے تعینات ورژن انتخاب کے لیے دستیاب ہوتے ہیں۔ اس فہرست میں ہر ورژن کی ایک منفرد تعیناتی شناخت ہے۔ + +جب آپ تعیناتی شناخت کا استعمال کرتے ہوئے کیوریز کرتے ہیں، تو آپ کیوری کے لیے اس سب گراف کا ایک ورژن بتا رہے ہوتے ہیں۔ اس کا مطلب ہے کہ سب گراف کا وہ ورژن جو آپ کے کیوری کا جواب دیتا ہے وہی ورژن ہو گا جو تعیناتی شناخت کے ذریعے بیان کیا گیا ہے۔ + +مثالی اینڈ پوائنٹ جو سب گراف شناخت استعمال کرتا ہے: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## سب گراف شناخت بمقابلہ تعیناتی شناخت استعمال کرتے وقت غور و فکر -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +اگر آپ اس بات کو یقینی بنانا چاہتے ہیں کہ آپ کے سب گراف کا تازہ ترین ورژن آپ کے کیوریز کا جواب دیتا ہے، تو آپ کو تعیناتی شناخت استعمال کرنا چاہیے۔ اس کے لیے آپ کو اپنے فرنٹ اینڈ میں تعیناتی شناخت کو اپ ڈیٹ کرنے کی ضرورت ہوتی ہے جب بھی آپ اپنے سب گراف کا نیا ورژن شائع کرتے ہیں۔ -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +اگر آپ یہ یقینی بنانا چاہتے ہیں کہ آپ اپنے سب گراف کے مخصوص ورژن سے کیوری کر رہے ہیں، تو آپ کو تعیناتی شناخت بھی استعمال کرنی چاہیے۔ -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +اگر آپ کو یہ یقینی بنانے کی ضرورت نہیں ہے کہ آپ کے سب گراف کا تازہ ترین ورژن ہمیشہ آپ کی کیوریز کا جواب دیتا ہے، تو آپ سب گراف شناخت استعمال کر سکتے ہیں۔ تاہم، آگاہ رہیں کہ اس کے نتیجے میں آپ کی کیوریز کا جواب آپ کے سب گراف کے پرانے ورژن کے ذریعے دیا جا سکتا ہے۔ From 70e44951b32ce78b0cecd559cacf69974475dca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:11 -0400 Subject: [PATCH 636/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Vietnamese) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/vi/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/vi/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/vi/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/vi/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 2e2a9f1c22e0324b851ee89106f2952c0d7ea945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:12 -0400 Subject: [PATCH 637/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Marathi) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/mr/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/mr/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/mr/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/mr/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From b5c8771f7ca0ee1887ec9cfa82c63fd656a79aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:12 -0400 Subject: [PATCH 638/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Hindi) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/hi/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/hi/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/hi/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/hi/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From fb037a17f0a7ce9b473f16870243cd8b2a6e6450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:18:13 -0400 Subject: [PATCH 639/924] New translations querying-by-subgraph-id-vs-deployment-id.mdx (Yoruba) --- ...erying-by-subgraph-id-vs-deployment-id.mdx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/website/pages/yo/querying/querying-by-subgraph-id-vs-deployment-id.mdx b/website/pages/yo/querying/querying-by-subgraph-id-vs-deployment-id.mdx index 25a955931e7a..d6f9a8c3c171 100644 --- a/website/pages/yo/querying/querying-by-subgraph-id-vs-deployment-id.mdx +++ b/website/pages/yo/querying/querying-by-subgraph-id-vs-deployment-id.mdx @@ -4,24 +4,32 @@ title: Subgraph ID vs Deployment ID A subgraph is identified by a Subgraph ID, and each version of the subgraph is identified by a Deployment ID. -When querying a subgraph, either ID can be used, though it is generally suggested that the Deployment ID is used due to its ability to specify a specific version of a subgraph. +When querying a subgraph, either ID can be used. However, there are some important differences between the two options. -Here are some key differences between the two IDs: ![](/img/subgraph-id-vs-deployment-id.png) +![](/img/subgraph-id-vs-deployment-id.png) + +## Subgraph ID + +The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. When queries are made using the Subgraph ID, you are not specifying a version. This means that the version of the subgraph that responds to your query may not be the latest version. Rather, it will be the most recent version that is synced and healthy. + +Example endpoint that uses Subgraph ID: + +`https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` ## Deployment ID -The Deployment ID is the IPFS hash of the compiled manifest file, which refers to other files on IPFS instead of relative URLs on the computer. For example, the compiled manifest can be accessed via: `https://api.thegraph.com/ipfs/api/v0/cat?arg=QmQKXcNQQRdUvNRMGJiE2idoTu9fo5F5MRtKztH4WyKxED`. To change the Deployment ID, one can simply update the manifest file, such as modifying the description field as described in the [subgraph manifest documentation](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md#13-top-level-api). +When you're viewing a deployed subgraph, previously deployed versions are available for selection. Each version in that list has a unique Deployment ID. -When queries are made using a subgraph's Deployment ID, we are specifying a version of that subgraph to query. Using the Deployment ID to query a specific subgraph version results in a more sophisticated and robust setup as there is full control over the subgraph version being queried. However, this results in the need of updating the query code manually every time a new version of the subgraph is published. +When you make queries using the Deployment ID, you are specifying a version of that subgraph to query. This means that the version of the subgraph that responds to your query will be the version specified by the Deployment ID. Example endpoint that uses Deployment ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/QmfYaVdSSekUeK6expfm47tP8adg3NNdEGnVExqswsSwaB` -## Subgraph ID +## Considerations When Using Subgraph ID vs Deployment ID -The Subgraph ID is a unique identifier for a subgraph. It remains constant across all versions of a subgraph. It is recommended to use the Subgraph ID to query the latest version of a subgraph, although there are some caveats. +If you want to ensure that the latest version of your subgraph responds to your queries, you should use the Deployment ID. This requires you to update the Deployment ID in your frontend whenever you publish a new version of your subgraph. -Be aware that querying using Subgraph ID may result in queries being responded to by an older version of the subgraph due to the new version needing time to sync. Also, new versions could introduce breaking schema changes. +If you want to ensure you are querying a specific version of your subgraph, you should also use Deployment ID. -Example endpoint that uses Subgraph ID: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/FL3ePDCBbShPvfRJTaSCNnehiqxsPHzpLud6CpbHoeKW` +If you do not need to ensure that the latest version of your subgraph always responds to your queries, you can use the Subgraph ID. However, be aware that this may result in your queries being responded to by an older version of your subgraph. From 209714029fe77f6a61d8fdda1776fcdbfdfaf041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:55:37 -0400 Subject: [PATCH 640/924] New translations supported-networks.mdx (Czech) --- website/pages/cs/developing/supported-networks.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/cs/developing/supported-networks.mdx b/website/pages/cs/developing/supported-networks.mdx index 01196d6b84fe..67dc043c56a9 100644 --- a/website/pages/cs/developing/supported-networks.mdx +++ b/website/pages/cs/developing/supported-networks.mdx @@ -3,7 +3,7 @@ title: Podporované sítě --- export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' -import { SupportedNetworksTable } z '@/src/supportedNetworks' +import { SupportedNetworksTable } from '@/src/supportedNetworks' From 6ff1810d0c80ace7a4c6175a1e0b8d973920a248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:55:41 -0400 Subject: [PATCH 641/924] New translations supported-networks.mdx (Turkish) --- website/pages/tr/developing/supported-networks.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/tr/developing/supported-networks.mdx b/website/pages/tr/developing/supported-networks.mdx index d90f7dd6e853..a73d74cbdee6 100644 --- a/website/pages/tr/developing/supported-networks.mdx +++ b/website/pages/tr/developing/supported-networks.mdx @@ -2,8 +2,8 @@ title: Desteklenen Ağlar --- -{ getStaticPropsForSupportedNetworks as getStaticProps }'i '@/src/buildGetStaticProps''den dışa aktar -{ SupportedNetworksTable }'yi '@/src/supportedNetworks''den içe aktar +export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { SupportedNetworksTable } from '@/src/supportedNetworks' From 711a9cb5fe01acfbe378b93b3327a15447ccf2cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:56:05 -0400 Subject: [PATCH 642/924] New translations arweave.mdx (Dutch) --- website/pages/nl/cookbook/arweave.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/nl/cookbook/arweave.mdx b/website/pages/nl/cookbook/arweave.mdx index 8636cc9d4923..7d15392f6bc5 100644 --- a/website/pages/nl/cookbook/arweave.mdx +++ b/website/pages/nl/cookbook/arweave.mdx @@ -25,7 +25,7 @@ The Graph stelt je in staat om aangepaste open API's genaamd "Subgraphs" te bouw Voor het kunnen bouwen en implementeren van Arweave Subgraphs, heb je twee paketten nodig: -1. `@graphprotocol/graph-cli` hierboven versie 0.30.2 - dit is een command-line tool voor het bouwen en implementeren van Subgraphs. Date: Fri, 12 Apr 2024 16:56:13 -0400 Subject: [PATCH 643/924] New translations near.mdx (Czech) --- website/pages/cs/cookbook/near.mdx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/website/pages/cs/cookbook/near.mdx b/website/pages/cs/cookbook/near.mdx index 7404c78ce863..6eda57f33c43 100644 --- a/website/pages/cs/cookbook/near.mdx +++ b/website/pages/cs/cookbook/near.mdx @@ -29,15 +29,13 @@ Podgrafy jsou založeny na událostech, což znamená, že naslouchají událost `@graphprotocol/graph-ts` je knihovna typů specifických pro podgrafy. -Vývoj podgrafů NEAR vyžaduje `graph-cli` nad verzí `0.23.0` a `graph-ts` nad verzí `0.23.0 +Vývoj podgrafů NEAR vyžaduje `graph-cli` nad verzí `0.23.0` a `graph-ts` nad verzí `0.23.0`. -
    -

    Vytváření subgrafu NEAR je velmi podobné vytváření subgrafu, který indexuje Ethereum.

    -
    +> Vytváření subgrafu NEAR je velmi podobné vytváření subgrafu, který indexuje Ethereum. -

    Definice podgrafů má tři aspekty:

    +Definice podgrafů má tři aspekty: -

    subgraph.yaml: manifest podgrafu definující zdroje dat, které vás zajímají, a způsob jejich zpracování. NEAR je nový druh` zdroje dat. +**subgraph.yaml:** manifest podgrafu definující zdroje dat, které vás zajímají, a způsob jejich zpracování. NEAR je nový `druh` zdroje dat. **schema.graphql:** soubor se schématem, který definuje, jaká data jsou uložena pro váš podgraf, a jak je možné je dotazovat pomocí GraphQL. Požadavky na podgrafy NEAR jsou pokryty [existující dokumentací](/developing/creating-a-subgraph#the-graphql-schema). From 08801a14624bfef1d304cc864ccbf8fd5bd183b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:56:18 -0400 Subject: [PATCH 644/924] New translations near.mdx (Chinese Simplified) --- website/pages/zh/cookbook/near.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/zh/cookbook/near.mdx b/website/pages/zh/cookbook/near.mdx index 09037254b5ec..030d73032a7d 100644 --- a/website/pages/zh/cookbook/near.mdx +++ b/website/pages/zh/cookbook/near.mdx @@ -229,7 +229,7 @@ graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 ## 查询 NEAR 子图 -NEAR 子图的 GraphQL 端点由模式定义和现有的 API 接口决定。更多信息,请访问 <0 href="/querying/graphql-api">GraphQLAPI文档。 +NEAR 子图的 GraphQL 端点由模式定义和现有的 API 接口决定。更多信息,请访问 [GraphQLAPI文档](/querying/graphql-api)。 ## 示例子图 From 207af3c319c554c04e4b95c8028bae784be2dae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:58:17 -0400 Subject: [PATCH 645/924] New translations indexing.mdx (French) --- website/pages/fr/network/indexing.mdx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/website/pages/fr/network/indexing.mdx b/website/pages/fr/network/indexing.mdx index 3aed4193949b..82d105c1006e 100644 --- a/website/pages/fr/network/indexing.mdx +++ b/website/pages/fr/network/indexing.mdx @@ -751,14 +751,10 @@ indexer cost set model my_model.agora ### Enjeu dans le protocole -Les premières étapes pour participer au réseau en tant qu'indexeur consistent à approuver le protocole, à investir des fonds et (éventuellement) à configurer une adresse d'opérateur pour les interactions quotidiennes du protocole. _ **Remarque** : Aux fins de ces instructions, Remix sera utilisé pour l'interaction contractuelle, mais n'hésitez pas à utiliser l'outil de votre choix ([OneClickDapp](https://oneclickdapp.com/), - -ABItopic et [MyCrypto](https://www.mycrypto.com/account) sont quelques autres outils connus)._

    +Les premières étapes pour participer au réseau en tant qu'indexeur consistent à approuver le protocole, à investir des fonds et (éventuellement) à configurer une adresse d'opérateur pour les interactions quotidiennes du protocole. _ **Remarque** : Aux fins de ces instructions, Remix sera utilisé pour l'interaction contractuelle, mais n'hésitez pas à utiliser l'outil de votre choix ([OneClickDapp](https://oneclickdapp.com/), [ABItopic](https://abitopic.io/) et [MyCrypto](https://www.mycrypto.com/account) sont quelques autres outils connus)._ Once an Indexer has staked GRT in the protocol, the [Indexer components](/network/indexing#indexer-components) can be started up and begin their interactions with the network. - - #### Approuver les jetons 1. Ouvrez l'[application Remix](https://remix.ethereum.org/) dans un navigateur @@ -773,8 +769,6 @@ Once an Indexer has staked GRT in the protocol, the [Indexer components](/networ 6. Appelez la fonction `approve(spender, montant)` pour approuver le contrat de Staking. Remplissez `spender` avec l'adresse du contrat de Staking (`0xF55041E37E12cD407ad00CE2910B8269B01263b9`) et `montant` avec les jetons à miser (en wei). - - #### Jetons de mise 1. Ouvrez l'[application Remix](https://remix.ethereum.org/) dans un navigateur @@ -793,15 +787,10 @@ Once an Indexer has staked GRT in the protocol, the [Indexer components](/networ 8. (Facultatif) Afin de contrôler la distribution des récompenses et d'attirer stratégiquement les délégués, les indexeurs peuvent mettre à jour leurs paramètres de délégation en mettant à jour leur indexingRewardCut (parties par million), queryFeeCut (parties par million) et cooldownBlocks (nombre de blocs). Pour ce faire, appelez `setDelegationParameters()`. L'exemple suivant définit queryFeeCut pour distribuer 95 % des remises sur les requêtes à l'indexeur et 5 % aux délégués, définit indexingRewardCut pour distribuer 60 % des récompenses d'indexation à l'indexeur et 40 % aux délégués, et définit `thecooldownBlocks`. période à 500 blocs. - - ``` setDelegationParameters(950000, 600000, 500) ``` - - - ### La durée de vie d'une allocation Après avoir été créée par un indexeur, une allocation saine passe par quatre états. From 7ec798a14341ca44763218ba2dd64b5951285bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:58:24 -0400 Subject: [PATCH 646/924] New translations indexing.mdx (Ukrainian) --- website/pages/uk/network/indexing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/uk/network/indexing.mdx b/website/pages/uk/network/indexing.mdx index a795eae0c6bd..64e07ca91ea6 100644 --- a/website/pages/uk/network/indexing.mdx +++ b/website/pages/uk/network/indexing.mdx @@ -622,7 +622,7 @@ indexer-cli надає модуль `actions` для ручної роботи - Дія, додана до черги стороннім оптимізатором або користувачем indexer-cli - Індексатор може використовувати `indexer-cli` для перегляду всіх дій у черзі - Індексатор (або інша програма) може затверджувати або скасовувати дії у черзі за допомогою `indexer-cli`. Команди затвердження та скасування приймають на вхід масив ідентифікаторів дій. -- Виконавець регулярно проводить опитування черги на предмет схвалення дій. Він бере `approved` дії з черги, пробує виконати їх і потім оновлює значення в db в залежності від статусу виконання до` success` або ` failed`. +- Виконавець регулярно проводить опитування черги на предмет схвалення дій. Він бере `approved` дії з черги, пробує виконати їх і потім оновлює значення в db в залежності від статусу виконання до `success` або `failed`. - Якщо дія успішна, виконавець забезпечить наявність правила індексації, яке підкаже агенту, як керувати розподілом далі, що корисно при виконанні ручних дій під час перебування агента в режимі `auto` або ` oversight`. - Індексатор може стежити за чергою дій, щоб бачити історію виконання дій і при необхідності повторно затверджувати та оновлювати елементи дій, якщо вони не були виконані. У черзі дій відображається історія всіх дій, поставлених у чергу і виконаних. From 79ba6147f0c9dadb97ee355dc4414b4ba53d122c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:59:09 -0400 Subject: [PATCH 647/924] New translations querying-from-an-application.mdx (Italian) --- website/pages/it/querying/querying-from-an-application.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/it/querying/querying-from-an-application.mdx b/website/pages/it/querying/querying-from-an-application.mdx index 27ca605e2bb5..fc10e7ce544a 100644 --- a/website/pages/it/querying/querying-from-an-application.mdx +++ b/website/pages/it/querying/querying-from-an-application.mdx @@ -136,7 +136,7 @@ export default App **⚠️ Avviso importante** -`graph-client` è perfettamente integrato con altri client GraphQL come Apollo client, URQL o React Query; troverete degli esempi nel repository ufficiale. +`graph-client` è perfettamente integrato con altri client GraphQL come Apollo client, URQL o React Query; [troverete degli esempi nel repository ufficiale](https://github.com/graphprotocol/graph-client/tree/main/examples). Tuttavia, se scegliete un altro client, tenete presente che **non sarete in grado di utilizzare la gestione dei Subgraph Cross-chain o la Paginazione Automatica, che sono caratteristiche fondamentali per effettuare query di The Graph**. From ad8d5d16eb2c6599b199b67eeb09e9f8d2393d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:59:28 -0400 Subject: [PATCH 648/924] New translations assemblyscript-migration-guide.mdx (Russian) --- .../ru/release-notes/assemblyscript-migration-guide.mdx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx index ca3800da3b9e..4839cf7e4b60 100644 --- a/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx @@ -17,11 +17,10 @@ title: Руководство по миграции AssemblyScript - Теперь `TypedArray` можно создавать, используя `ArrayBuffer`6 с помощью [нового статического метода `wrap`](https://www.assemblyscript.org/stdlib/typedarray.html#static-members) ([v0.8.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.8.1)) - Новые функции стандартной библиотеки: `String#toUpperCase`, `String#toLowerCase`, `String#localeCompare` и `TypedArray#set` ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) - Добавлена поддержка x instanceof GenericClass ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) -- Добавлен `StaticArray`, более эффективный вариант массива ( -v0.9.3) - - - Добавлен `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -- Реализован аргумент `radix` для `Number#toString` (v0.10.1) +- Добавлен `StaticArray`, более эффективный вариант массива ([v0.9.3](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.3)) +- Добавлен `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) +- Реализован аргумент `radix` для `Number#toString` ( +v0.10.1) - Добавлена поддержка разделителей в литералах с плавающей точкой ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) - Добавлена поддержка функций первого класса ([v0.14.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.0)) From 4afe5cf2b7adec5f4c25768b7672b6b32f25d390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 16:59:58 -0400 Subject: [PATCH 649/924] New translations grafting.mdx (Czech) --- website/pages/cs/cookbook/grafting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/cs/cookbook/grafting.mdx b/website/pages/cs/cookbook/grafting.mdx index 420b3a8078d6..c021c7da19ed 100644 --- a/website/pages/cs/cookbook/grafting.mdx +++ b/website/pages/cs/cookbook/grafting.mdx @@ -145,7 +145,7 @@ Jakmile ověříte, že se podgraf správně indexuje, můžete jej rychle aktua Náhradní podgraf.yaml bude mít novou adresu smlouvy. K tomu může dojít při aktualizaci dapp, novém nasazení kontraktu atd. 1. Přejděte na [The Graph Studio UI](https://thegraph.com/studio/) a vytvořte subgraf na testovací síti Goerli s názvem `graft-replacement` -2. Vytvořte nový manifest. Soubor `subgraph.yaml` pro `graph-replacement` obsahuje odlišnou adresu smlouvy a nové informace o tom, jak by měl probíhat proces roubování. Jedná se o `blok` poslední událost vysílanou starou smlouvou, na kterou se zaměřujete, a o `base` starého podgrafu. ID podgrafu `base` je `ID nasazení` vašeho původního podgrafu `graph-example`. Tuto informaci najdete v uživatelském rozhraní The Graph Studio. +2. Vytvořte nový manifest. Soubor `subgraph.yaml` pro `graph-replacement` obsahuje odlišnou adresu smlouvy a nové informace o tom, jak by měl probíhat proces roubování. Jedná se o `blok` [poslední událost vysílanou](https://goerli.etherscan.io/tx/0x800c92fcc0edbd26f74e19ad058c62008a47c7789f2064023b987028343dd498) starou smlouvou, na kterou se zaměřujete, a o `base` starého podgrafu. ID podgrafu `base` je `ID nasazení` vašeho původního podgrafu `graph-example`. Tuto informaci najdete v uživatelském rozhraní The Graph Studio. 3. Postupujte podle pokynů v části `AUTH & DEPLOY` na stránce podgrafu ve složce `graft-replacement` z repozitáře 4. Po dokončení ověřte, zda se podgraf správně indexuje. Pokud spustíte následující příkaz v The Graph Playground From cb12747878ebc099e1f55416a3fa0aeff95e476f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:00:42 -0400 Subject: [PATCH 650/924] New translations glossary.mdx (Arabic) --- website/pages/ar/glossary.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ar/glossary.mdx b/website/pages/ar/glossary.mdx index b426a4b74d06..fea39cbbe23b 100644 --- a/website/pages/ar/glossary.mdx +++ b/website/pages/ar/glossary.mdx @@ -6,7 +6,7 @@ title: قائمة المصطلحات - **الاستعلام**: طلب للحصول على البيانات. في حالة الغراف، الاستعلام هو طلب للحصول على البيانات من غراف فرعي ما وسيتم الرد عليه بواسطة مفهرس ما. -- GraphQL : لغة استعلام لواجهات برمجة التطبيقات (APIs) يستخدم GraphQL للاستعلام عن السوبغرافات. +- **GraphQL**: لغة استعلام لواجهات برمجة التطبيقات (APIs) يستخدم GraphQL للاستعلام عن السوبغرافات. - **نقطة النهاية (Endpoint)**: عنوان URL يمكن استخدامه للاستعلام عن سبغراف. نقطة الاختبار لـ سبغراف استوديو هي: `https://api.studio.thegraph.com/query///` ونقطة نهاية مستكشف الغراف هي: `https://gateway.thegraph.com/api//subgraphs/id/` تُستخدم نقطة نهاية مستكشف الغراف للاستعلام عن سبغرافات على شبكة الغراف اللامركزية. From 033ec989db2cc75e11992edbdaf4ad292114aa7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:02:22 -0400 Subject: [PATCH 651/924] New translations new-chain-integration.mdx (Czech) --- website/pages/cs/new-chain-integration.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/cs/new-chain-integration.mdx b/website/pages/cs/new-chain-integration.mdx index 802fabe16fc0..8e94e9a7b4e2 100644 --- a/website/pages/cs/new-chain-integration.mdx +++ b/website/pages/cs/new-chain-integration.mdx @@ -48,17 +48,17 @@ Aby mohl uzel Grafu přijímat data z řetězce EVM, musí uzel RPC zpřístupni **Začněte přípravou místního prostředí** 1. [Clone Graph Node](https://github.com/graphprotocol/graph-node) -2. Modify [this line](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) to include the new network name and the EVM JSON RPC compliant URL - > Do not change the env var name itself. It must remain `ethereum` even if the network name is different. -3. Run an IPFS node or use the one used by The Graph: https://api.thegraph.com/ipfs/ +2. Upravte [tento řádek](https://github.com/graphprotocol/graph-node/blob/master/docker/docker-compose.yml#L22) tak, aby obsahoval nový název sítě a URL adresu EVM kompatibilní s JSON RPC + > Samotný název env var neměňte. Musí zůstat `ethereum`, i když je název sítě jiný. +3. Spusťte uzel IPFS nebo použijte ten, který používá Graf: https://api.thegraph.com/ipfs/ -**Test the integration by locally deploying a subgraph** +**Testování integrace lokálním nasazením podgrafu** 1. Install [graph-cli](https://github.com/graphprotocol/graph-cli) -2. Create a simple example subgraph. Some options are below: - 1. The pre-packed [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) smart contract and subgraph is a good starting point - 2. Bootstrap a local subgraph from any existing smart contract or solidity dev environment [using Hardhat with a Graph plugin](https://github.com/graphprotocol/hardhat-graph) -3. Adapt the resulting `subgraph.yaml` by changing [`dataSources.network`](http://dataSources.network) to the same name previously passed on to Graph Node. +2. Vytvořte jednoduchý příklad podgrafu. Některé možnosti jsou uvedeny níže: + 1. Předpřipravený chytrá smlouva [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) a podgraf je dobrým výchozím bodem + 2. Zavedení lokálního podgrafu z jakéhokoli existujícího chytrého kontraktu nebo vývojového prostředí Solidity [pomocí Hardhat s plugin Graph](https://github.com/graphprotocol/hardhat-graph) +3. Upravte výsledný soubor `subgraph.yaml` změnou názvu [`dataSources.network`](http://dataSources.network) na stejný název, který byl dříve předán z Uzel Graf. 4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` 5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` From d7ce17ee4ef6d47b390259775366265097471310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:03:12 -0400 Subject: [PATCH 652/924] New translations api.mdx (Japanese) --- website/pages/ja/developing/graph-ts/api.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ja/developing/graph-ts/api.mdx b/website/pages/ja/developing/graph-ts/api.mdx index b4010176c7dd..e904e9bc7013 100644 --- a/website/pages/ja/developing/graph-ts/api.mdx +++ b/website/pages/ja/developing/graph-ts/api.mdx @@ -730,7 +730,7 @@ if (value.kind == JSONValueKind.BOOL) { - `value.toF64(): f64` - `value.toBigInt(): BigInt` - `value.toString(): string` -- value.toArray(): Array`- (その後、上記の 5 つのメソッドのいずれかを使用して`JSONValue\` を変換します) +- `value.toArray(): Array` - (その後、上記の 5 つのメソッドのいずれかを使用して `JSONValue` を変換します) ### タイプ 変換参照 From f0e28ea9baaafb4de434441c12c6021a68eb2eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Rouleau?= Date: Fri, 12 Apr 2024 17:21:51 -0400 Subject: [PATCH 653/924] Run pnpm check:fix + some manual fixes --- website/pages/ar/billing.mdx | 2 +- website/pages/ar/cookbook/near.mdx | 8 +- .../ar/cookbook/subgraph-debug-forking.mdx | 8 +- .../ar/developing/creating-a-subgraph.mdx | 22 +- website/pages/ar/developing/graph-ts/api.mdx | 92 +++---- .../ar/developing/unit-testing-framework.mdx | 10 +- website/pages/ar/network/benefits.mdx | 70 +++--- website/pages/ar/network/delegating.mdx | 4 +- website/pages/ar/network/indexing.mdx | 34 +-- website/pages/ar/new-chain-integration.mdx | 2 +- website/pages/ar/operating-graph-node.mdx | 14 +- website/pages/ar/querying/graphql-api.mdx | 14 +- .../ar/querying/querying-best-practices.mdx | 16 +- .../assemblyscript-migration-guide.mdx | 5 + .../cs/cookbook/subgraph-debug-forking.mdx | 2 +- .../cs/developing/creating-a-subgraph.mdx | 22 +- website/pages/cs/developing/graph-ts/api.mdx | 92 +++---- .../cs/developing/unit-testing-framework.mdx | 10 +- website/pages/cs/network/benefits.mdx | 70 +++--- website/pages/cs/network/delegating.mdx | 4 +- website/pages/cs/network/indexing.mdx | 32 +-- website/pages/cs/operating-graph-node.mdx | 14 +- website/pages/cs/querying/graphql-api.mdx | 14 +- website/pages/cs/quick-start.mdx | 2 +- .../assemblyscript-migration-guide.mdx | 5 + .../de/arbitrum/l2-transfer-tools-faq.mdx | 2 +- .../de/developing/creating-a-subgraph.mdx | 22 +- website/pages/de/developing/graph-ts/api.mdx | 92 +++---- .../de/developing/unit-testing-framework.mdx | 10 +- website/pages/de/network/benefits.mdx | 70 +++--- website/pages/de/network/indexing.mdx | 32 +-- website/pages/de/operating-graph-node.mdx | 14 +- website/pages/de/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/es/cookbook/cosmos.mdx | 2 +- .../es/cookbook/subgraph-debug-forking.mdx | 2 +- .../deploying-a-subgraph-to-hosted.mdx | 2 +- .../es/developing/creating-a-subgraph.mdx | 30 +-- website/pages/es/developing/graph-ts/api.mdx | 92 +++---- .../es/developing/unit-testing-framework.mdx | 10 +- website/pages/es/network/benefits.mdx | 73 +++--- website/pages/es/network/indexing.mdx | 32 +-- website/pages/es/new-chain-integration.mdx | 3 +- website/pages/es/operating-graph-node.mdx | 14 +- website/pages/es/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../graphql-validations-migration-guide.mdx | 1 - .../fr/arbitrum/l2-transfer-tools-faq.mdx | 6 +- website/pages/fr/cookbook/cosmos.mdx | 44 ++-- website/pages/fr/cookbook/near.mdx | 50 ++-- .../fr/cookbook/upgrading-a-subgraph.mdx | 2 +- .../deploying-a-subgraph-to-hosted.mdx | 4 +- .../fr/developing/creating-a-subgraph.mdx | 46 ++-- website/pages/fr/developing/graph-ts/api.mdx | 92 +++---- .../fr/developing/unit-testing-framework.mdx | 12 +- website/pages/fr/network/benefits.mdx | 73 +++--- website/pages/fr/network/delegating.mdx | 6 +- website/pages/fr/network/indexing.mdx | 32 +-- website/pages/fr/operating-graph-node.mdx | 14 +- website/pages/fr/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 15 +- .../graphql-validations-migration-guide.mdx | 6 +- .../hi/cookbook/subgraph-debug-forking.mdx | 4 +- .../deploying-a-subgraph-to-hosted.mdx | 6 +- .../hi/developing/creating-a-subgraph.mdx | 22 +- website/pages/hi/developing/graph-ts/api.mdx | 98 ++++---- .../hi/developing/unit-testing-framework.mdx | 14 +- website/pages/hi/network/benefits.mdx | 70 +++--- website/pages/hi/network/delegating.mdx | 8 +- website/pages/hi/network/indexing.mdx | 38 +-- website/pages/hi/operating-graph-node.mdx | 14 +- website/pages/hi/querying/graphql-api.mdx | 16 +- .../assemblyscript-migration-guide.mdx | 5 + .../deploying-a-subgraph-to-hosted.mdx | 4 +- .../it/developing/creating-a-subgraph.mdx | 22 +- website/pages/it/developing/graph-ts/api.mdx | 92 +++---- .../it/developing/unit-testing-framework.mdx | 10 +- website/pages/it/network/benefits.mdx | 73 +++--- website/pages/it/network/delegating.mdx | 8 +- website/pages/it/network/indexing.mdx | 34 +-- website/pages/it/operating-graph-node.mdx | 14 +- website/pages/it/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../ja/cookbook/subgraph-debug-forking.mdx | 12 +- .../ja/developing/creating-a-subgraph.mdx | 72 +++--- website/pages/ja/developing/graph-ts/api.mdx | 92 +++---- .../ja/developing/unit-testing-framework.mdx | 10 +- website/pages/ja/glossary.mdx | 4 +- website/pages/ja/network/benefits.mdx | 70 +++--- website/pages/ja/network/indexing.mdx | 38 +-- website/pages/ja/operating-graph-node.mdx | 16 +- website/pages/ja/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/ja/sunrise.mdx | 4 +- .../ko/arbitrum/l2-transfer-tools-faq.mdx | 5 +- .../ko/developing/creating-a-subgraph.mdx | 22 +- website/pages/ko/developing/graph-ts/api.mdx | 92 +++---- .../ko/developing/unit-testing-framework.mdx | 10 +- website/pages/ko/network/benefits.mdx | 70 +++--- website/pages/ko/network/indexing.mdx | 34 +-- website/pages/ko/operating-graph-node.mdx | 14 +- website/pages/ko/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../mr/cookbook/subgraph-debug-forking.mdx | 4 +- .../deploying-a-subgraph-to-hosted.mdx | 2 +- .../mr/developing/creating-a-subgraph.mdx | 22 +- website/pages/mr/developing/graph-ts/api.mdx | 92 +++---- .../mr/developing/unit-testing-framework.mdx | 10 +- website/pages/mr/network/benefits.mdx | 70 +++--- website/pages/mr/network/delegating.mdx | 6 +- website/pages/mr/network/indexing.mdx | 36 +-- website/pages/mr/operating-graph-node.mdx | 14 +- website/pages/mr/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/nl/arbitrum/arbitrum-faq.mdx | 3 +- .../nl/developing/creating-a-subgraph.mdx | 22 +- website/pages/nl/developing/graph-ts/api.mdx | 92 +++---- .../nl/developing/unit-testing-framework.mdx | 10 +- website/pages/nl/network/benefits.mdx | 75 +++--- website/pages/nl/network/delegating.mdx | 6 +- website/pages/nl/network/indexing.mdx | 34 +-- website/pages/nl/operating-graph-node.mdx | 14 +- website/pages/nl/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../pl/developing/creating-a-subgraph.mdx | 22 +- website/pages/pl/developing/graph-ts/api.mdx | 92 +++---- .../pl/developing/unit-testing-framework.mdx | 10 +- website/pages/pl/network/benefits.mdx | 70 +++--- website/pages/pl/network/indexing.mdx | 34 +-- website/pages/pl/operating-graph-node.mdx | 14 +- website/pages/pl/querying/graphql-api.mdx | 14 +- website/pages/pl/quick-start.mdx | 2 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/pt/cookbook/arweave.mdx | 10 +- .../pt/developing/creating-a-subgraph.mdx | 22 +- website/pages/pt/developing/graph-ts/api.mdx | 95 ++++--- .../pt/developing/unit-testing-framework.mdx | 10 +- website/pages/pt/network/benefits.mdx | 70 +++--- website/pages/pt/network/delegating.mdx | 6 +- website/pages/pt/network/indexing.mdx | 36 +-- website/pages/pt/operating-graph-node.mdx | 14 +- website/pages/pt/querying/graphql-api.mdx | 14 +- .../querying/querying-from-an-application.mdx | 2 +- .../assemblyscript-migration-guide.mdx | 5 + .../graphql-validations-migration-guide.mdx | 13 +- .../ro/developing/creating-a-subgraph.mdx | 22 +- website/pages/ro/developing/graph-ts/api.mdx | 92 +++---- .../ro/developing/unit-testing-framework.mdx | 10 +- website/pages/ro/network/benefits.mdx | 70 +++--- website/pages/ro/network/indexing.mdx | 34 +-- website/pages/ro/operating-graph-node.mdx | 14 +- website/pages/ro/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../ru/developing/creating-a-subgraph.mdx | 32 +-- website/pages/ru/developing/graph-ts/api.mdx | 102 ++++---- .../ru/developing/unit-testing-framework.mdx | 12 +- website/pages/ru/network/benefits.mdx | 73 +++--- website/pages/ru/network/delegating.mdx | 4 +- website/pages/ru/network/indexing.mdx | 38 +-- website/pages/ru/operating-graph-node.mdx | 14 +- website/pages/ru/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 159 +----------- .../graphql-validations-migration-guide.mdx | 10 +- .../sv/cookbook/subgraph-debug-forking.mdx | 2 +- .../deploying-a-subgraph-to-hosted.mdx | 4 +- .../sv/developing/creating-a-subgraph.mdx | 137 +++++----- .../pages/sv/developing/developer-faqs.mdx | 2 +- website/pages/sv/developing/graph-ts/api.mdx | 236 +++++++++--------- .../sv/developing/unit-testing-framework.mdx | 12 +- website/pages/sv/network/benefits.mdx | 70 +++--- website/pages/sv/network/delegating.mdx | 9 +- website/pages/sv/network/indexing.mdx | 32 +-- website/pages/sv/operating-graph-node.mdx | 14 +- .../pages/sv/querying/distributed-systems.mdx | 24 +- website/pages/sv/querying/graphql-api.mdx | 14 +- .../sv/querying/querying-best-practices.mdx | 26 +- .../querying/querying-from-an-application.mdx | 30 +-- .../assemblyscript-migration-guide.mdx | 127 +++++----- .../tr/developing/creating-a-subgraph.mdx | 22 +- website/pages/tr/developing/graph-ts/api.mdx | 96 +++---- .../tr/developing/unit-testing-framework.mdx | 10 +- website/pages/tr/network/benefits.mdx | 70 +++--- website/pages/tr/network/delegating.mdx | 6 +- website/pages/tr/network/indexing.mdx | 34 +-- website/pages/tr/operating-graph-node.mdx | 84 +------ .../tr/publishing/publishing-a-subgraph.mdx | 2 +- website/pages/tr/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/tr/sunrise.mdx | 4 +- .../uk/developing/creating-a-subgraph.mdx | 22 +- website/pages/uk/developing/graph-ts/api.mdx | 92 +++---- .../uk/developing/unit-testing-framework.mdx | 10 +- website/pages/uk/network/benefits.mdx | 73 +++--- website/pages/uk/network/delegating.mdx | 6 +- website/pages/uk/network/indexing.mdx | 38 +-- website/pages/uk/operating-graph-node.mdx | 14 +- website/pages/uk/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../pages/ur/chain-integration-overview.mdx | 3 +- website/pages/ur/cookbook/cosmos.mdx | 2 +- website/pages/ur/cookbook/near.mdx | 4 +- .../ur/cookbook/subgraph-debug-forking.mdx | 2 +- .../deploying-a-subgraph-to-hosted.mdx | 10 +- .../ur/developing/creating-a-subgraph.mdx | 24 +- website/pages/ur/developing/graph-ts/api.mdx | 90 +++---- .../substreams-powered-subgraphs-faq.mdx | 3 +- .../ur/developing/unit-testing-framework.mdx | 10 +- website/pages/ur/network/benefits.mdx | 77 +++--- website/pages/ur/network/delegating.mdx | 7 +- website/pages/ur/network/indexing.mdx | 34 +-- website/pages/ur/new-chain-integration.mdx | 2 +- website/pages/ur/operating-graph-node.mdx | 14 +- website/pages/ur/querying/graphql-api.mdx | 16 +- .../ur/querying/querying-best-practices.mdx | 6 +- .../assemblyscript-migration-guide.mdx | 5 + .../graphql-validations-migration-guide.mdx | 3 +- website/pages/ur/sunrise.mdx | 4 +- .../vi/developing/creating-a-subgraph.mdx | 22 +- website/pages/vi/developing/graph-ts/api.mdx | 92 +++---- .../vi/developing/unit-testing-framework.mdx | 10 +- website/pages/vi/network/benefits.mdx | 70 +++--- website/pages/vi/network/indexing.mdx | 34 +-- website/pages/vi/operating-graph-node.mdx | 14 +- website/pages/vi/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/yo/arbitrum/arbitrum-faq.mdx | 3 +- .../yo/developing/creating-a-subgraph.mdx | 22 +- website/pages/yo/developing/graph-ts/api.mdx | 92 +++---- .../yo/developing/unit-testing-framework.mdx | 10 +- website/pages/yo/network/benefits.mdx | 70 +++--- website/pages/yo/network/indexing.mdx | 34 +-- website/pages/yo/operating-graph-node.mdx | 14 +- website/pages/yo/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../zh/cookbook/subgraph-debug-forking.mdx | 6 +- .../deploying-a-subgraph-to-hosted.mdx | 4 +- .../zh/developing/creating-a-subgraph.mdx | 76 +++--- website/pages/zh/developing/graph-ts/api.mdx | 90 +++---- .../zh/developing/unit-testing-framework.mdx | 16 +- .../zh/managing/deprecating-a-subgraph.mdx | 2 +- website/pages/zh/network/benefits.mdx | 72 +++--- website/pages/zh/network/delegating.mdx | 7 +- website/pages/zh/network/indexing.mdx | 40 +-- website/pages/zh/operating-graph-node.mdx | 14 +- website/pages/zh/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + 246 files changed, 3472 insertions(+), 3603 deletions(-) diff --git a/website/pages/ar/billing.mdx b/website/pages/ar/billing.mdx index 7321e41ffccf..763ebdbdaf2a 100644 --- a/website/pages/ar/billing.mdx +++ b/website/pages/ar/billing.mdx @@ -152,7 +152,7 @@ This is how you can purchase GRT on Uniswap. 1. انتقل إلى [ Uniswap ](https://app.uniswap.org/#/swap) وقم بتوصيل محفظتك. 2. حدد التوكن الذي ترغب في استبداله. حدد ETH. 3. حدد التوكن الذي ترغب في تبديله. حدد GRT. - - تأكد من تبديل التوكن الصحيح. عنوان العقد الذكي GRT هو: ` 0xc944E90C64B2c07662A292be6244BDf05Cda44a7 ` + - تأكد من تبديل التوكن الصحيح. عنوان العقد الذكي GRT هو: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` 4. الرجاء إدخال كمية ETH التي ترغب في تحويلها. 5. انقر على زر "مبادلة". 6. قم بتأكيد المعاملة في محفظتك وانتظر حتى تتم المعالجة. diff --git a/website/pages/ar/cookbook/near.mdx b/website/pages/ar/cookbook/near.mdx index 3a453ab24c79..40e13f93cbd1 100644 --- a/website/pages/ar/cookbook/near.mdx +++ b/website/pages/ar/cookbook/near.mdx @@ -29,13 +29,13 @@ title: بناء Subgraphs على NEAR `graphprotocol/graph-ts@` هي مكتبة لأنواع خاصة بـ subgraph. -تطوير NEAR subgraph يتطلب `graph-cli` بإصدار أعلى من ` 0.23.0 ` و `graph-ts` بإصدار أعلى من ` 0.23.0 `. +تطوير NEAR subgraph يتطلب `graph-cli` بإصدار أعلى من `0.23.0` و `graph-ts` بإصدار أعلى من `0.23.0`. > Building a NEAR subgraph is very similar to building a subgraph that indexes Ethereum. هناك ثلاثة جوانب لتعريف الـ subgraph: -**subgraph.yaml:** الـ subgraph manifest ، وتحديد مصادر البيانات ذات الأهمية ، وكيف يجب أن تتم معالجتها.علما أن NEAR هو ` نوع ` جديد لمصدر البيانات. +**subgraph.yaml:** الـ subgraph manifest ، وتحديد مصادر البيانات ذات الأهمية ، وكيف يجب أن تتم معالجتها.علما أن NEAR هو `نوع` جديد لمصدر البيانات. **schema.graphql:** a schema file that defines what data is stored for your subgraph, and how to query it via GraphQL. The requirements for NEAR subgraphs are covered by [the existing documentation](/developing/creating-a-subgraph#the-graphql-schema). @@ -73,7 +73,7 @@ dataSources: ``` - NEAR subgraphs يقدم `نوعا ` جديدا من مصدر بيانات (`near`) -- يجب أن يتوافق الـ `network` مع شبكة على Graph Node المضيفة. في الخدمة المستضافة ، الشبكة الرئيسية لـ NEAR هي ` near-mainnet ` ، وشبكة NEAR's testnet هي ` near-testnet ` +- يجب أن يتوافق الـ `network` مع شبكة على Graph Node المضيفة. في الخدمة المستضافة ، الشبكة الرئيسية لـ NEAR هي `near-mainnet` ، وشبكة NEAR's testnet هي `near-testnet` - NEAR data sources introduce an optional `source.account` field, which is a human-readable ID corresponding to a [NEAR account](https://docs.near.org/docs/concepts/account). This can be an account or a sub-account. - NEAR data sources introduce an alternative optional `source.accounts` field, which contains optional suffixes and prefixes. At least prefix or suffix must be specified, they will match the any account starting or ending with the list of values respectively. The example below would match: `[app|good].*[morning.near|morning.testnet]`. If only a list of prefixes or suffixes is necessary the other field can be omitted. @@ -165,7 +165,7 @@ class ReceiptWithOutcome { These types are passed to block & receipt handlers: - معالجات الكتلة ستتلقى`Block` -- معالجات الاستلام ستتلقى` ReceiptWithOutcome ` +- معالجات الاستلام ستتلقى`ReceiptWithOutcome` Otherwise, the rest of the [AssemblyScript API](/developing/assemblyscript-api) is available to NEAR subgraph developers during mapping execution. diff --git a/website/pages/ar/cookbook/subgraph-debug-forking.mdx b/website/pages/ar/cookbook/subgraph-debug-forking.mdx index 202b13a497c6..0d331deab109 100644 --- a/website/pages/ar/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ar/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ title: Quick and Easy Subgraph Debugging Using Forks عندما تنشر subgraph إلى Graph node بعيدة للقيام بالفهرسة ويفشل عند الكتلة _ X _ ، فإن الخبر الجيد هو أن Graph node ستظل تقدم استعلامات GraphQL باستخدام مخزنها(store)، والذي تمت مزامنته للكتلة(block) _ X _. هذا عظيم! هذا يعني أنه يمكننا الاستفادة من هذا المخزن "المحدث" لإصلاح الأخطاء التي تظهر عند فهرسة الكتلة _ X _. -باختصار ، سنقوم _ بتفريع (fork) الـ subgraph الفاشل _ من Graph node بعيدة والتي تضمن فهرسة الـ subgraph للكتلة * X * وذلك من أجل توفير الـ subgraph المنشور محليًا والذي يتم تصحيحه عندالكتلة_X_ مع عرض محدث لحالة الفهرسة. +باختصار ، سنقوم _ بتفريع (fork) الـ subgraph الفاشل _ من Graph node بعيدة والتي تضمن فهرسة الـ subgraph للكتلة _ X _ وذلك من أجل توفير الـ subgraph المنشور محليًا والذي يتم تصحيحه عندالكتلة*X* مع عرض محدث لحالة الفهرسة. ## من فضلك ، أرني بعض الأكواد! @@ -69,14 +69,14 @@ Oops, how unfortunate, when I deploy my perfect looking subgraph to the [Hosted وأنا أجيب: -1. ` fork-base ` هو عنوان URL "الأساسي" ،فمثلا عند إلحاق _subgraph id_ ، يكون عنوان URL الناتج (`/`) هو GraphQL endpoint صالح لمخزن الـ subgraph. +1. `fork-base` هو عنوان URL "الأساسي" ،فمثلا عند إلحاق _subgraph id_ ، يكون عنوان URL الناتج (`/`) هو GraphQL endpoint صالح لمخزن الـ subgraph. 2. الـتفريع سهل ، فلا داعي للقلق: ```bash $ graph deploy --debug-fork --ipfs http://localhost:5001 --node http://localhost:8020 ``` -أيضًا ، لا تنس تعيين حقل ` dataSources.source.startBlock ` في subgraph manifest لرقم الكتلة(block) التي بها المشكلة، حتى تتمكن من تخطي فهرسة الكتل الغير ضرورية والاستفادة من التفريع! +أيضًا ، لا تنس تعيين حقل `dataSources.source.startBlock` في subgraph manifest لرقم الكتلة(block) التي بها المشكلة، حتى تتمكن من تخطي فهرسة الكتل الغير ضرورية والاستفادة من التفريع! لذلك ، هذا ما أفعله: @@ -90,7 +90,7 @@ $ cargo run -p graph-node --release -- \ --fork-base https://api.thegraph.com/subgraphs/id/ ``` -1. بعد فحص دقيق ، لاحظت أن هناك عدم تطابق في تمثيلات الـ ` id ` المستخدمة عند فهرسة ` Gravatar ` في المعالجين الخاصين بي. بينما ` handleNewGravatar ` يحول (`event.params.id.toHex()`) إلى سداسي ، `handleUpdatedGravatar` يستخدم int32 (`event.params.id.toI32()`) مما يجعل ` handleUpdatedGravatar ` قلقا من "Gravatar not found!". أنا أجعلهم كلاهما يحولان ` id ` إلى سداسي. +1. بعد فحص دقيق ، لاحظت أن هناك عدم تطابق في تمثيلات الـ `id` المستخدمة عند فهرسة `Gravatar` في المعالجين الخاصين بي. بينما `handleNewGravatar` يحول (`event.params.id.toHex()`) إلى سداسي ، `handleUpdatedGravatar` يستخدم int32 (`event.params.id.toI32()`) مما يجعل `handleUpdatedGravatar` قلقا من "Gravatar not found!". أنا أجعلهم كلاهما يحولان `id` إلى سداسي. 2. بعد إجراء التغييرات ، قمت بنشر الـ subgraph الخاص بي على Graph node المحلية **_وتفريع الـsubgraph الفاشل_** وضبط `dataSources.source.startBlock` إلى `6190343` في `subgraph.yaml`: ```bash diff --git a/website/pages/ar/developing/creating-a-subgraph.mdx b/website/pages/ar/developing/creating-a-subgraph.mdx index b74a65ae3e64..96986ffd3407 100644 --- a/website/pages/ar/developing/creating-a-subgraph.mdx +++ b/website/pages/ar/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| النوع | الوصف | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | مصفوفة Byte ، ممثلة كسلسلة سداسية عشرية. يشيع استخدامها في Ethereum hashes وعناوينه. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| النوع | الوصف | +| --- | --- | +| `Bytes` | مصفوفة Byte ، ممثلة كسلسلة سداسية عشرية. يشيع استخدامها في Ethereum hashes وعناوينه. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **ملاحظة:** مصدر البيانات الجديد سيعالج فقط الاستدعاءات والأحداث للكتلة التي تم إنشاؤها فيه وجميع الكتل التالية ، ولكنه لن يعالج البيانات التاريخية ، أي البيانات الموجودة في الكتل السابقة. -> +> > إذا كانت الكتل السابقة تحتوي على بيانات ذات صلة بمصدر البيانات الجديد ، فمن الأفضل فهرسة تلك البيانات من خلال قراءة الحالة الحالية للعقد وإنشاء كيانات تمثل تلك الحالة في وقت إنشاء مصدر البيانات الجديد. ### سياق مصدر البيانات @@ -716,7 +716,7 @@ dataSources: ``` > **ملاحظة:** يمكن البحث عن كتلة إنشاء العقد بسرعة على Etherscan: -> +> > 1. ابحث عن العقد بإدخال عنوانه في شريط البحث. > 2. انقر فوق hash إجراء الإنشاء في قسم `Contract Creator`. > 3. قم بتحميل صفحة تفاصيل الإجراء(transaction) حيث ستجد كتلة البدء لذلك العقد. diff --git a/website/pages/ar/developing/graph-ts/api.mdx b/website/pages/ar/developing/graph-ts/api.mdx index add87572e5df..06ad54feb70b 100644 --- a/website/pages/ar/developing/graph-ts/api.mdx +++ b/website/pages/ar/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| الاصدار | ملاحظات الإصدار | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| الاصدار | ملاحظات الإصدار | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### الأنواع المضمنة (Built-in) @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### مرجع تحويلات الأنواع -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### البيانات الوصفية لمصدر البيانات diff --git a/website/pages/ar/developing/unit-testing-framework.mdx b/website/pages/ar/developing/unit-testing-framework.mdx index 395932bc4b99..54b83b009125 100644 --- a/website/pages/ar/developing/unit-testing-framework.mdx +++ b/website/pages/ar/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/ar/network/benefits.mdx b/website/pages/ar/network/benefits.mdx index 346ae4cfcab2..a54a14a768c9 100644 --- a/website/pages/ar/network/benefits.mdx +++ b/website/pages/ar/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| البنية الأساسية | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| البنية الأساسية | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| البنية الأساسية | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| البنية الأساسية | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| البنية الأساسية | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| البنية الأساسية | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/ar/network/delegating.mdx b/website/pages/ar/network/delegating.mdx index eea33ceb91da..e5a9fb6b8955 100644 --- a/website/pages/ar/network/delegating.mdx +++ b/website/pages/ar/network/delegating.mdx @@ -32,9 +32,7 @@ Whenever a Delegator wants to undelegate, their tokens are subject to a 28-day u One thing to consider as well is choosing an Indexer wisely. If you choose an Indexer who was not trustworthy, or not doing a good job, you will want to undelegate, which means you will be losing a lot of opportunities to earn rewards, which can be just as bad as burning GRT. -
    - لاحظ 0.5٪ رسوم التفويض ، بالإضافة إلى فترة 28 يوما لإلغاء التفويض. -
    +
    لاحظ 0.5٪ رسوم التفويض ، بالإضافة إلى فترة 28 يوما لإلغاء التفويض.
    ### اختيار مفهرس جدير بالثقة مع عائد جيد للمفوضين diff --git a/website/pages/ar/network/indexing.mdx b/website/pages/ar/network/indexing.mdx index 26ba96bbe16d..abe53eae2f89 100644 --- a/website/pages/ar/network/indexing.mdx +++ b/website/pages/ar/network/indexing.mdx @@ -63,7 +63,7 @@ Allocations are continuously accruing rewards while they're active and allocated - انتقل إلى [ واجهة Etherscan لعقد المكافآت Rewards contract ](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) * لاستدعاء `getRewards()`: - - قم بتوسيع ** 10 .الحصول على المكافآت ** القائمة المنسدلة. + - قم بتوسيع ** 10 .الحصول على المكافآت ** القائمة المنسدلة. - أدخل ** معرّف التخصيص ** في الإدخال. - انقر فوق الزر ** الاستعلام **. @@ -113,11 +113,11 @@ The `queryFeeCut` and `indexingRewardCut` values are delegation parameters that - **كبيرة** - مُعدة لفهرسة جميع ال subgraphs المستخدمة حاليا وأيضا لخدمة طلبات حركة مرور البيانات ذات الصلة. | Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| ----- |:---------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| صغير | 4 | 8 | 1 | 4 | 16 | -| قياسي | 8 | 30 | 1 | 12 | 48 | -| متوسط | 16 | 64 | 2 | 32 | 64 | -| كبير | 72 | 468 | 3.5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| صغير | 4 | 8 | 1 | 4 | 16 | +| قياسي | 8 | 30 | 1 | 12 | 48 | +| متوسط | 16 | 64 | 2 | 32 | 64 | +| كبير | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ At the center of an Indexer's infrastructure is the Graph Node which monitors th #### Graph Node -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| ------ | ------------------------------------------------------- | ------------------------------------------------------------------- | ----------------- | -------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | -| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | -| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | +| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | +| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | #### خدمة المفهرس -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| ------ | ------------------------------------------------------------ | --------------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | port-- | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | port-- | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | metrics-port-- | - | #### وكيل المفهرس(Indexer Agent) diff --git a/website/pages/ar/new-chain-integration.mdx b/website/pages/ar/new-chain-integration.mdx index 278e07ed2054..7f7a29c0d860 100644 --- a/website/pages/ar/new-chain-integration.mdx +++ b/website/pages/ar/new-chain-integration.mdx @@ -15,7 +15,7 @@ title: تكامل الشبكات الجديدة **1. استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية** -إذا كانت سلسلة الكتل متوافقة مع آلة الإيثريوم الافتراضية وإذا كان العميل/العقدة يوفر واجهة برمجة التطبيقات القياسية لاستدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية، ، فإنه يمكن لعقدة الغراف فهرسة هذه السلسلة الجديدة. لمزيد من المعلومات، يرجى الاطلاع على [اختبار استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية] (تكامل_سلسة_جديدة #اختبار_استدعاء_إجراء_عن_بُعد_باستخدام_تمثيل_كائنات_جافا_سكريبت_لآلة_التشغيل_الافتراضية\_لإثريوم). +إذا كانت سلسلة الكتل متوافقة مع آلة الإيثريوم الافتراضية وإذا كان العميل/العقدة يوفر واجهة برمجة التطبيقات القياسية لاستدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية، ، فإنه يمكن لعقدة الغراف فهرسة هذه السلسلة الجديدة. لمزيد من المعلومات، يرجى الاطلاع على [اختبار استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية] (تكامل*سلسة*جديدة #اختبار*استدعاء*إجراء*عن*بُعد*باستخدام*تمثيل*كائنات*جافا*سكريبت*لآلة*التشغيل*الافتراضية_لإثريوم). **2. فايرهوز** diff --git a/website/pages/ar/operating-graph-node.mdx b/website/pages/ar/operating-graph-node.mdx index b467b1fc0395..646ec2d5dffd 100644 --- a/website/pages/ar/operating-graph-node.mdx +++ b/website/pages/ar/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| ------ | ------------------------------------------------------- | ------------------------------------------------------------------- | ----------------- | -------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | -| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | -| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | +| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | +| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/ar/querying/graphql-api.mdx b/website/pages/ar/querying/graphql-api.mdx index 6c81b7756f3a..5807eba74fab 100644 --- a/website/pages/ar/querying/graphql-api.mdx +++ b/website/pages/ar/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| رمز | عامل التشغيل | الوصف | -| ----------- | ------------ | --------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | لدمج عبارات بحث متعددة في فلتر للكيانات التي تتضمن جميع العبارات المتوفرة | -| | | `أو` | الاستعلامات التي تحتوي على عبارات بحث متعددة مفصولة بواسطة عامل التشغيل or ستعيد جميع الكيانات المتطابقة من أي عبارة متوفرة | -| `<->` | `Follow by` | يحدد المسافة بين كلمتين. | -| `:*` | `Prefix` | يستخدم عبارة البحث prefix للعثور على الكلمات التي تتطابق بادئتها (مطلوب حرفان.) | +| رمز | عامل التشغيل | الوصف | +| --- | --- | --- | +| `&` | `And` | لدمج عبارات بحث متعددة في فلتر للكيانات التي تتضمن جميع العبارات المتوفرة | +| | | `أو` | الاستعلامات التي تحتوي على عبارات بحث متعددة مفصولة بواسطة عامل التشغيل or ستعيد جميع الكيانات المتطابقة من أي عبارة متوفرة | +| `<->` | `Follow by` | يحدد المسافة بين كلمتين. | +| `:*` | `Prefix` | يستخدم عبارة البحث prefix للعثور على الكلمات التي تتطابق بادئتها (مطلوب حرفان.) | #### Examples diff --git a/website/pages/ar/querying/querying-best-practices.mdx b/website/pages/ar/querying/querying-best-practices.mdx index b5501c497ce3..24f0e802e02a 100644 --- a/website/pages/ar/querying/querying-best-practices.mdx +++ b/website/pages/ar/querying/querying-best-practices.mdx @@ -16,7 +16,7 @@ title: أفضل الممارسات للاستعلام على عكس REST API ، فإن GraphQL API مبنية على مخطط يحدد الاستعلامات التي يمكن تنفيذها. -على سبيل المثال ، طلب الاستعلام للحصول على توكن باستخدام استعلام ` token ` سيبدو كما يلي: +على سبيل المثال ، طلب الاستعلام للحصول على توكن باستخدام استعلام `token` سيبدو كما يلي: ```graphql query GetToken($id: ID!) { @@ -40,7 +40,7 @@ query GetToken($id: ID!) { تستخدم استعلامات GraphQL لغة GraphQL ، التي تم تحديدها في [المواصفات](https://spec.graphql.org/). -يتكون استعلام ` GetToken ` أعلاه من أجزاء متعددة للغة (تم استبدالها أدناه بـ placeholders ` [...] `): +يتكون استعلام `GetToken` أعلاه من أجزاء متعددة للغة (تم استبدالها أدناه بـ placeholders `[...]`): ```graphql query [operationName]([variableName]: [variableType]) { @@ -54,9 +54,9 @@ query [operationName]([variableName]: [variableType]) { على الرغم من أن قائمة القواعد التي يجب اتباعها طويلة، إلا أن هناك قواعد أساسية يجب أخذها في الاعتبار عند كتابة استعلامات GraphQL: -- يجب استخدام كل ` queryName ` مرة واحدة فقط لكل عملية. -- يجب استخدام كل ` field ` مرة واحدة فقط في التحديد (لا يمكننا الاستعلام عن ` id ` مرتين ضمن ` token `) -- بعض ` field ` أو الاستعلامات (مثل `tokens`) ترجع أنواعًا معقدة تتطلب تحديدًا للحقول الفرعية. عدم تقديم تحديد عندما يكون متوقعًا (أو تقديم تحديد عندما لا يكون متوقعًا - على سبيل المثال ، الـ ` id `) سيؤدي إلى ظهور خطأ. لمعرفة نوع الحقل ، يرجى الرجوع إلى [ The Graph Explorer ](/network/explorer). +- يجب استخدام كل `queryName` مرة واحدة فقط لكل عملية. +- يجب استخدام كل `field` مرة واحدة فقط في التحديد (لا يمكننا الاستعلام عن `id` مرتين ضمن `token`) +- بعض `field` أو الاستعلامات (مثل `tokens`) ترجع أنواعًا معقدة تتطلب تحديدًا للحقول الفرعية. عدم تقديم تحديد عندما يكون متوقعًا (أو تقديم تحديد عندما لا يكون متوقعًا - على سبيل المثال ، الـ `id`) سيؤدي إلى ظهور خطأ. لمعرفة نوع الحقل ، يرجى الرجوع إلى [ The Graph Explorer ](/network/explorer). - يجب أن يكون أي متغير تم تعيينه لوسيط متطابقًا مع نوعه. - في قائمة المتغيرات المعطاة ، يجب أن يكون كل واحد منها فريدًا. - يجب استخدام جميع المتغيرات المحددة. @@ -308,7 +308,7 @@ query { Such repeated fields (`id`, `active`, `status`) bring many issues: - harder to read for more extensive queries -- عند استخدام الأدوات التي تنشئ أنواع TypeScript بناءً على الاستعلامات (_المزيد عن ذلك في القسم الأخير_)، و ` newDelate ` و ` oldDelegate ` سينتج عنهما واجهتين مضمنتان متمايزتين. +- عند استخدام الأدوات التي تنشئ أنواع TypeScript بناءً على الاستعلامات (_المزيد عن ذلك في القسم الأخير_)، و `newDelate` و `oldDelegate` سينتج عنهما واجهتين مضمنتان متمايزتين. A refactored version of the query would be the following: @@ -431,8 +431,8 @@ In order to keep up with the mentioned above best practices and syntactic rules, [Setup the "operations-recommended"](https://github.com/dotansimha/graphql-eslint#available-configs) config will enforce essential rules such as: -- ` @ graphql-eslint / field-on-right-type `: هل يتم استخدام الحقل على النوع المناسب؟ -- ` @ graphql-eslint / no-unused variables `: هل يجب أن يبقى المتغير المعطى غير مستخدم؟ +- `@ graphql-eslint / field-on-right-type`: هل يتم استخدام الحقل على النوع المناسب؟ +- `@ graphql-eslint / no-unused variables`: هل يجب أن يبقى المتغير المعطى غير مستخدم؟ - و اكثر! This will allow you to **catch errors without even testing queries** on the playground or running them in production! diff --git a/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx index 9674f1777573..84e00f13b4e1 100644 --- a/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ let a = a + b ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + ستحتاج إلى إعادة تسمية المتغيرات المكررة إذا كان لديك variable shadowing. + ### مقارانات Null + من خلال إجراء الترقية على ال Subgraph الخاص بك ، قد تحصل أحيانًا على أخطاء مثل هذه: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + لحل المشكلة يمكنك ببساطة تغيير عبارة `if` إلى شيء مثل هذا: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + لإصلاح هذه المشكلة ، يمكنك إنشاء متغير للوصول إلى الخاصية حتى يتمكن المترجم من القيام بعملية التحقق من الـ nullability: ```typescript diff --git a/website/pages/cs/cookbook/subgraph-debug-forking.mdx b/website/pages/cs/cookbook/subgraph-debug-forking.mdx index 24fbcc650686..a5bc7e36fb76 100644 --- a/website/pages/cs/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/cs/cookbook/subgraph-debug-forking.mdx @@ -12,7 +12,7 @@ V kontextu ladění vám ** vidličkování podgrafů** umožňuje ladit neúsp ## Co?! Jak? -Pokud nasadíte podgraf do vzdáleného uzlu Graph pro indexování a dojde k selhání bloku_X_, dobrou zprávou je, že uzel Graph bude stále obsluhovat dotazy GraphQL pomocí svého úložiště, které je synchronizováno s blokem_X_. skvělé! To znamená, že můžeme využít tohoto "aktuálního" úložiště k odstranění chyb vznikajících při indexování bloku _X_. +Pokud nasadíte podgraf do vzdáleného uzlu Graph pro indexování a dojde k selhání bloku*X*, dobrou zprávou je, že uzel Graph bude stále obsluhovat dotazy GraphQL pomocí svého úložiště, které je synchronizováno s blokem*X*. skvělé! To znamená, že můžeme využít tohoto "aktuálního" úložiště k odstranění chyb vznikajících při indexování bloku _X_. V kostce budeme _vidličkovat chybový podgraf_ z vzdáleného uzlu grafu, který je zaručeně indexován až do bloku _X_, aby poskytl lokálně nasazenému podgrafu, který je laděn v bloku _X_, aktuální pohled na stav indexace. diff --git a/website/pages/cs/developing/creating-a-subgraph.mdx b/website/pages/cs/developing/creating-a-subgraph.mdx index dd60bb2cc10d..b5759149e88b 100644 --- a/website/pages/cs/developing/creating-a-subgraph.mdx +++ b/website/pages/cs/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ U některých typů entit je `id` vytvořeno z id dvou jiných entit; to je mož V našem GraphQL API podporujeme následující skaláry: -| Typ | Popis | -| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bajtů` | Pole bajtů reprezentované jako hexadecimální řetězec. Běžně se používá pro hashe a adresy Ethereum. | -| `Řetězec` | Skalár pro hodnoty `řetězce`. Nulové znaky nejsou podporovány a jsou automaticky odstraněny. | -| `Boolean` | Skalár pro hodnoty `boolean`. | -| `Int` | Specifikace GraphQL definuje `Int` na velikost 32 bajtů. | -| `Int8` | Celé číslo se znaménkem o velikosti 8 bajtů, známé také jako 64bitové celé číslo se znaménkem, může uchovávat hodnoty v rozsahu od -9 223 372 036 854 775 808 do 9 223 372 036 854 775 807. Přednostně se používá k reprezentaci `i64` z ethereum. | -| `BigInt` | Velká celá čísla. Používá se pro typy `uint32`, `int64`, `uint64`, ..., `uint256` společnosti Ethereum. Poznámka: Vše pod `uint32`, jako například `int32`, `uint24` nebo `int8`, je reprezentováno jako `i32`. | -| `BigDecimal` | `BigDecimal` Desetinná čísla s vysokou přesností reprezentovaná jako signifikand a exponent. Rozsah exponentu je od -6143 do +6144. Zaokrouhleno na 34 významných číslic. | +| Typ | Popis | +| --- | --- | +| `Bajtů` | Pole bajtů reprezentované jako hexadecimální řetězec. Běžně se používá pro hashe a adresy Ethereum. | +| `Řetězec` | Skalár pro hodnoty `řetězce`. Nulové znaky nejsou podporovány a jsou automaticky odstraněny. | +| `Boolean` | Skalár pro hodnoty `boolean`. | +| `Int` | Specifikace GraphQL definuje `Int` na velikost 32 bajtů. | +| `Int8` | Celé číslo se znaménkem o velikosti 8 bajtů, známé také jako 64bitové celé číslo se znaménkem, může uchovávat hodnoty v rozsahu od -9 223 372 036 854 775 808 do 9 223 372 036 854 775 807. Přednostně se používá k reprezentaci `i64` z ethereum. | +| `BigInt` | Velká celá čísla. Používá se pro typy `uint32`, `int64`, `uint64`, ..., `uint256` společnosti Ethereum. Poznámka: Vše pod `uint32`, jako například `int32`, `uint24` nebo `int8`, je reprezentováno jako `i32`. | +| `BigDecimal` | `BigDecimal` Desetinná čísla s vysokou přesností reprezentovaná jako signifikand a exponent. Rozsah exponentu je od -6143 do +6144. Zaokrouhleno na 34 významných číslic. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Poznámka:** Nový zdroj dat bude zpracovávat pouze volání a události pro blok, ve kterém byl vytvořen, a všechny následující bloky, ale nebude zpracovávat historická data, tj. data obsažená v předchozích blocích. -> +> > Pokud předchozí bloky obsahují data relevantní pro nový zdroj dat, je nejlepší tato data indexovat načtením aktuálního stavu smlouvy a vytvořením entit reprezentujících tento stav v době vytvoření nového zdroje dat. ### Kontext zdroje dat @@ -716,7 +716,7 @@ dataSources: ``` > **Poznámka:** Blok pro vytvoření smlouvy lze rychle vyhledat v Etherscan: -> +> > 1. Vyhledejte smlouvu zadáním její adresy do vyhledávacího řádku. > 2. Klikněte na hash transakce vytvoření v sekci `Tvůrce smlouvy`. > 3. Načtěte stránku s podrobnostmi o transakci, kde najdete počáteční blok pro danou smlouvu. diff --git a/website/pages/cs/developing/graph-ts/api.mdx b/website/pages/cs/developing/graph-ts/api.mdx index 0d3e6b33310e..3f934597bd11 100644 --- a/website/pages/cs/developing/graph-ts/api.mdx +++ b/website/pages/cs/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ Knihovna `@graphprotocol/graph-ts` poskytuje následující API: `apiVersion` v manifestu podgrafu určuje verzi mapovacího API, kterou pro daný podgraf používá uzel Graf. -| Verze | Poznámky vydání | -| :---: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Přidání tříd `TransactionReceipt` a `Log` do typů Ethereum\<0/Přidání pole `receipt` do objektu Ethereum událost | -| 0.0.6 | Přidáno pole `nonce` do objektu Ethereum Transaction
    Přidáno `baseFeePerGas` do objektu Ethereum bloku | +| Verze | Poznámky vydání | +| :-: | --- | +| 0.0.7 | Přidání tříd `TransactionReceipt` a `Log` do typů Ethereum\<0/Přidání pole `receipt` do objektu Ethereum událost | +| 0.0.6 | Přidáno pole `nonce` do objektu Ethereum Transaction
    Přidáno `baseFeePerGas` do objektu Ethereum bloku | | 0.0.5 | AssemblyScript povýšen na verzi 0.19.10 (obsahuje rozbíjející změny, viz [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` přejmenováno na `ethereum.transaction.gasLimit` | -| 0.0.4 | Přidání pole `functionSignature` do objektu Ethereum SmartContractCall | -| 0.0.3 | Do objektu Ethereum Call přidáno pole `from`
    `etherem.call.address` přejmenováno na `ethereum.call.to` | -| 0.0.2 | Přidání pole `input` do objektu Ethereum Transackce | +| 0.0.4 | Přidání pole `functionSignature` do objektu Ethereum SmartContractCall | +| 0.0.3 | Do objektu Ethereum Call přidáno pole `from`
    `etherem.call.address` přejmenováno na `ethereum.call.to` | +| 0.0.2 | Přidání pole `input` do objektu Ethereum Transackce | ### Vestavěné typy @@ -143,7 +143,7 @@ _Math_ - `x.notEqual(y: BigInt): bool` –lze zapsat jako `x != y`. - `x.lt(y: BigInt): bool` – lze zapsat jako `x < y`. - `x.le(y: BigInt): bool` – lze zapsat jako `x <= y`. -- `x.gt(y: BigInt): bool` – lze zapsat jako `x > y`. +- `x.gt(y: BigInt): bool` – lze zapsat jako `x > y`. - `x.ge(y: BigInt): bool` – lze zapsat jako `x >= y`. - `x.neg(): BigInt` – lze zapsat jako `-x`. - `x.divDecimal(y: BigDecimal): BigDecimal` – dělí desetinným číslem, čímž získá desetinný výsledek. @@ -734,44 +734,44 @@ Pokud je typ hodnoty jistý, lze ji převést na [vestavěný typ](#built-in-typ ### Převody typů Reference -| Zdroj(e) | Destinace | Funkce převodu | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Zdroj(e) | Destinace | Funkce převodu | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/cs/developing/unit-testing-framework.mdx b/website/pages/cs/developing/unit-testing-framework.mdx index 81ae89accd3f..69093e150a10 100644 --- a/website/pages/cs/developing/unit-testing-framework.mdx +++ b/website/pages/cs/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/cs/network/benefits.mdx b/website/pages/cs/network/benefits.mdx index ec33c75b4ae5..02655bef5cdb 100644 --- a/website/pages/cs/network/benefits.mdx +++ b/website/pages/cs/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastruktura | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastruktura | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastruktura | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastruktura | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastruktura | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastruktura | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/cs/network/delegating.mdx b/website/pages/cs/network/delegating.mdx index df6ce204f133..18b3a90c7ce0 100644 --- a/website/pages/cs/network/delegating.mdx +++ b/website/pages/cs/network/delegating.mdx @@ -44,8 +44,8 @@ To je důležitá část, kterou je třeba pochopit. Nejprve si probereme tři v Indexační podíl na odměně - Indexační podíl na odměně je část odměny, kterou si indexátor ponechá pro sebe. To znamená, že pokud je nastavena na 100%, jako delegát získáte 0 odměn za indexaci. Pokud se v uživatelském rozhraní zobrazí hodnota 80%, znamená to, že jako delegát obdržíte 20%. Důležitá poznámka - na začátku sítě budou odměny za indexování tvořit většinu odměn.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Nejlepší indexátor dává delegátům 90 % odměn. Na - prostřední dává delegátům 20 % odměn. Spodní dává delegátům ~83 %.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Nejlepší indexátor dává delegátům 90 % odměn. Na prostřední dává + delegátům 20 % odměn. Spodní dává delegátům ~83 %.*
    - Snížení poplatku za dotaz - Funguje stejně jako snížení odměny za indexování. Jedná se však konkrétně o výnosy z poplatků za dotaz, které indexátor vybere. Je třeba poznamenat, že na začátku sítě budou výnosy z poplatků za dotazování ve srovnání s odměnou za indexaci velmi malé. Doporučujeme věnovat pozornost síti, abyste zjistili, kdy začnou být poplatky za dotazování v síti významnější. diff --git a/website/pages/cs/network/indexing.mdx b/website/pages/cs/network/indexing.mdx index 6eb088873b8c..61567ffe302a 100644 --- a/website/pages/cs/network/indexing.mdx +++ b/website/pages/cs/network/indexing.mdx @@ -113,11 +113,11 @@ Indexátory se mohou odlišovat použitím pokročilých technik pro rozhodován - **Large** - Připraveno k indexování všech aktuálně nepoužívaných příbuzných podgrafů. | Nastavení | Postgres
    (CPUs) | Postgres
    (paměť v GBs) | Postgres
    (disk v TBs) | VMs
    (CPUs) | VMs
    (paměť v GBs) | -| --------- |:--------------------------:|:---------------------------------:|:--------------------------------:|:---------------------:|:----------------------------:| -| Malé | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Střední | 16 | 64 | 2 | 32 | 64 | -| Velký | 72 | 468 | 3.5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Malé | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Střední | 16 | 64 | 2 | 32 | 64 | +| Velký | 72 | 468 | 3.5 | 48 | 184 | ### Jaká jsou základní bezpečnostní opatření, která by měl indexátor přijmout? @@ -149,20 +149,20 @@ Poznámka: Pro podporu agilního škálování se doporučuje oddělit dotazová #### Uzel Graf -| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | -| ---- | ---------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | -| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | -| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | -| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | +| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | +| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | #### Služba Indexer -| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | -| ---- | --------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (pro placené dotazy na podgrafy) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Metriky Prometheus | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (pro placené dotazy na podgrafy) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Metriky Prometheus | /metrics | --metrics-port | - | #### Agent indexátoru diff --git a/website/pages/cs/operating-graph-node.mdx b/website/pages/cs/operating-graph-node.mdx index 504a6b22ad8c..6b1190311ea1 100644 --- a/website/pages/cs/operating-graph-node.mdx +++ b/website/pages/cs/operating-graph-node.mdx @@ -77,13 +77,13 @@ Kompletní příklad konfigurace Kubernetes naleznete v úložišti [indexer](ht Když je Graf Uzel spuštěn, zpřístupňuje následující ports: -| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | -| ---- | ---------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | -| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | -| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | -| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | +| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | +| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | > **Důležité**: Dávejte pozor na veřejné vystavování portů - **administrační porty** by měly být uzamčeny. To se týká i koncového bodu JSON-RPC uzlu Graf. diff --git a/website/pages/cs/querying/graphql-api.mdx b/website/pages/cs/querying/graphql-api.mdx index 68099a5e08a9..315ee3fe4445 100644 --- a/website/pages/cs/querying/graphql-api.mdx +++ b/website/pages/cs/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Popis | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Popis | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/cs/quick-start.mdx b/website/pages/cs/quick-start.mdx index f30837fd77ee..13af4b54b95d 100644 --- a/website/pages/cs/quick-start.mdx +++ b/website/pages/cs/quick-start.mdx @@ -48,7 +48,7 @@ Při inicializaci podgrafu vás nástroj CLI požádá o následující informac - Ethereum síť (nepovinné): možná budete muset zadat, ze které sítě kompatibilní s EVM bude váš subgraf indexovat data. - Adresa zakázky: Vyhledejte adresu chytré smlouvy, ze které se chcete dotazovat na data. - ABI: Pokud se ABI nevyplňuje automaticky, je třeba jej zadat ručně jako soubor JSON. -- Počáteční blok: Doporučuje se zadat počáteční blok, abyste ušetřili čas, zatímco váš subgraf indexuje data blockchainu. Počáteční blok můžete vyhledat tak, že najdete blok, ve kterém byl váš kontrakt nasazen. +- Počáteční blok: Doporučuje se zadat počáteční blok, abyste ušetřili čas, zatímco váš subgraf indexuje data blockchainu. Počáteční blok můžete vyhledat tak, že najdete blok, ve kterém byl váš kontrakt nasazen. - Název smlouvy: zadejte název své smlouvy. - Indexovat události smlouvy jako entity: doporučujeme nastavit tuto hodnotu na true, protože se automaticky přidá mapování do vašeho subgrafu pro každou emitovanou událost - Přidat další smlouvu(nepovinné): můžete přidat další smlouvu diff --git a/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx b/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx index aaa199b28aab..8997891e0538 100644 --- a/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Pokud jste použili stínování proměnných, musíte duplicitní proměnné přejmenovat. + ### Nulová srovnání + Při aktualizaci podgrafu může někdy dojít k těmto chybám: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Pro vyřešení můžete jednoduše změnit příkaz `if` na něco takového: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Chcete-li tento problém vyřešit, můžete vytvořit proměnnou pro přístup k této vlastnosti, aby překladač mohl provést kouzlo kontroly nulovatelnosti: ```typescript diff --git a/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx index cdb3cd27b4e1..eb4fda3fc003 100644 --- a/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx @@ -64,7 +64,7 @@ Die Übertragungszeit beträgt etwa 20 Minuten. Die Arbitrum-Brücke arbeitet im ### Wird mein Subgraph noch auffindbar sein, nachdem ich ihn auf L2 übertragen habe? -Ihr Subgraph ist nur in dem Netzwerk auffindbar, in dem er veröffentlicht ist. Wenn Ihr Subgraph zum Beispiel auf Arbitrum One ist, können Sie ihn nur im Explorer auf Arbitrum One finden und nicht auf Ethereum. Bitte vergewissern Sie sich, dass Sie Arbitrum One in der Netzwerkumschaltung oben auf der Seite ausgewählt haben, um sicherzustellen, dass Sie sich im richtigen Netzwerk befinden. Nach der Übertragung wird der L1-Subgraph als veraltet angezeigt. +Ihr Subgraph ist nur in dem Netzwerk auffindbar, in dem er veröffentlicht ist. Wenn Ihr Subgraph zum Beispiel auf Arbitrum One ist, können Sie ihn nur im Explorer auf Arbitrum One finden und nicht auf Ethereum. Bitte vergewissern Sie sich, dass Sie Arbitrum One in der Netzwerkumschaltung oben auf der Seite ausgewählt haben, um sicherzustellen, dass Sie sich im richtigen Netzwerk befinden. Nach der Übertragung wird der L1-Subgraph als veraltet angezeigt. ### Muss mein Subgraph ( Teilgraph ) veröffentlicht werden, um ihn zu übertragen? diff --git a/website/pages/de/developing/creating-a-subgraph.mdx b/website/pages/de/developing/creating-a-subgraph.mdx index 8945579b5b92..721920020b13 100644 --- a/website/pages/de/developing/creating-a-subgraph.mdx +++ b/website/pages/de/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/de/developing/graph-ts/api.mdx b/website/pages/de/developing/graph-ts/api.mdx index d1c8233ee2d2..bfc56dce2aa6 100644 --- a/website/pages/de/developing/graph-ts/api.mdx +++ b/website/pages/de/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/de/developing/unit-testing-framework.mdx b/website/pages/de/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/de/developing/unit-testing-framework.mdx +++ b/website/pages/de/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/de/network/benefits.mdx b/website/pages/de/network/benefits.mdx index 10158195162f..cf9a39833987 100644 --- a/website/pages/de/network/benefits.mdx +++ b/website/pages/de/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastruktur | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastruktur | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastruktur | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastruktur | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastruktur | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastruktur | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/de/network/indexing.mdx b/website/pages/de/network/indexing.mdx index b0de4567f4fc..8d273d73853d 100644 --- a/website/pages/de/network/indexing.mdx +++ b/website/pages/de/network/indexing.mdx @@ -113,11 +113,11 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. | Konfiguration | Postgres
    (CPUs) | Postgres
    (Speicher in GB) | Postgres
    (Festplatte in TB) | VMs
    (CPUs) | VMs
    (Speicher in GB) | -| ------------- |:--------------------------:|:------------------------------------:|:--------------------------------------:|:---------------------:|:-------------------------------:| -| Klein | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Mittel | 16 | 64 | 2 | 32 | 64 | -| Groß | 72 | 468 | 3.5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Klein | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Mittel | 16 | 64 | 2 | 32 | 64 | +| Groß | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Der Graph-Knoten -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | ----------------- | -| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | -| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | +| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | #### Indexer Service -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| ---- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL-HTTP-Server
    (für kostenpflichtige Subgraf-Abfragen) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL-HTTP-Server
    (für kostenpflichtige Subgraf-Abfragen) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus-Metriken | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/de/operating-graph-node.mdx b/website/pages/de/operating-graph-node.mdx index 25767bd3fa65..0e24f48252df 100644 --- a/website/pages/de/operating-graph-node.mdx +++ b/website/pages/de/operating-graph-node.mdx @@ -77,13 +77,13 @@ Eine vollständige Kubernetes-Beispielkonfiguration finden Sie im [Indexer-Repos Wenn es ausgeführt wird, stellt Graph Node die folgenden Ports zur Verfügung: -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | ----------------- | -| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | -| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | +| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | > **Wichtig**: Seien Sie vorsichtig, wenn Sie Ports öffentlich zugänglich machen - **Administrationsports** sollten gesperrt bleiben. Dies schließt den JSON-RPC-Endpunkt des Graph-Knotens ein. diff --git a/website/pages/de/querying/graphql-api.mdx b/website/pages/de/querying/graphql-api.mdx index 1bc64a267db7..fc1b29586442 100644 --- a/website/pages/de/querying/graphql-api.mdx +++ b/website/pages/de/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Beschreibung | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Beschreibung | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Beispiele diff --git a/website/pages/de/release-notes/assemblyscript-migration-guide.mdx b/website/pages/de/release-notes/assemblyscript-migration-guide.mdx index 058c48b32e6f..fb1ad8beb382 100644 --- a/website/pages/de/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/de/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/es/cookbook/cosmos.mdx b/website/pages/es/cookbook/cosmos.mdx index a9721e2f2680..11c2684860a1 100644 --- a/website/pages/es/cookbook/cosmos.mdx +++ b/website/pages/es/cookbook/cosmos.mdx @@ -170,7 +170,7 @@ Cada tipo de handler viene con su propia estructura de datos que se pasa como ar - Los handlers de transacciones reciben el tipo `TransactionData`. - Los handlers de mensajes reciben el tipo `MessageData`. -Como parte de `MessageData`, el message handler recibe un contexto de transacción, que contiene la información más importante sobre una transacción que abarca un mensaje. El contexto de transacción también está disponible en el tipo ` EventData `, pero solo cuando el evento correspondiente está asociado con una transacción. Además, todos los controladores reciben una referencia a un bloque (` HeaderOnlyBlock `). +Como parte de `MessageData`, el message handler recibe un contexto de transacción, que contiene la información más importante sobre una transacción que abarca un mensaje. El contexto de transacción también está disponible en el tipo `EventData`, pero solo cuando el evento correspondiente está asociado con una transacción. Además, todos los controladores reciben una referencia a un bloque (`HeaderOnlyBlock`). Puedes encontrar una lista completa de los tipos para la integración Cosmos aquí [here](https://github.com/graphprotocol/graph-ts/blob/4c064a8118dff43b110de22c7756e5d47fcbc8df/chain/cosmos.ts). diff --git a/website/pages/es/cookbook/subgraph-debug-forking.mdx b/website/pages/es/cookbook/subgraph-debug-forking.mdx index 60d186925d16..1e2d42925fad 100644 --- a/website/pages/es/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/es/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ En el contexto de la depuración, **subgraph forking** te permite depurar tu sub Cuando implementas un subgrafo en un nodo Graph remoto para la indexación y falla en el bloque _X_, la buena noticia es que el nodo Graph seguirá atendiendo consultas de GraphQL usando su tienda, que está sincronizado para bloquear _X_. ¡Genial! Esto significa que podemos aprovechar esta tienda "actualizada" para corregir los errores que surgen al indexar el bloque _X_. -En pocas palabras, vamos a _bifurcar el subgrafo fallido_ desde un nodo de Graph remoto que garantiza que el subgrafo se indexe para bloquear *X* para proporcionar al subgrafo implementado localmente que se está depurando en el bloque _X_ una vista actualizada del estado de indexación. +En pocas palabras, vamos a _bifurcar el subgrafo fallido_ desde un nodo de Graph remoto que garantiza que el subgrafo se indexe para bloquear _X_ para proporcionar al subgrafo implementado localmente que se está depurando en el bloque _X_ una vista actualizada del estado de indexación. ## ¡Por favor, muéstrame algo de código! diff --git a/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx index 4c769e143bdb..70c75d3049ef 100644 --- a/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx @@ -157,7 +157,7 @@ dataSources: kind: ethereum/events ``` -Ahora está listo para ` yarn deploy `. +Ahora está listo para `yarn deploy`. **Nota:** como se mencionó anteriormente, desde `graph-cli 0.32.0` puedes ejecutar directamente `yarn deploy` con la opción`--network`: diff --git a/website/pages/es/developing/creating-a-subgraph.mdx b/website/pages/es/developing/creating-a-subgraph.mdx index 6cf6502bd6e0..5271e6ac9f14 100644 --- a/website/pages/es/developing/creating-a-subgraph.mdx +++ b/website/pages/es/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Para algunos tipos de entidad, el `id` se construye a partir de los id de otras Admitimos los siguientes escalares en nuestra API GraphQL: -| Tipo | Descripción | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, representado como un string hexadecimal. Comúnmente utilizado para los hashes y direcciones de Ethereum. | -| `String` | Escalar para valores `string`. Los caracteres nulos no son compatibles y se eliminan automáticamente. | -| `Boolean` | Escalar para valores `boolean`. | -| `Int` | La especificación GraphQL define `Int` con un tamaño de 32 bytes. | -| `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` | Números enteros grandes. Se utiliza para los tipos `uint32`, `int64`, `uint64`, ..., `uint256` de Ethereum. Nota: Todo por debajo de `uint32`, como `int32`, `uint24` o `int8` se representa como `i32`. | -| `BigDecimal` | `BigDecimal` Decimales de alta precisión representados como un signo y un exponente. El rango de exponentes va de -6143 a +6144. Redondeado a 34 dígitos significativos. | +| Tipo | Descripción | +| --- | --- | +| `Bytes` | Byte array, representado como un string hexadecimal. Comúnmente utilizado para los hashes y direcciones de Ethereum. | +| `String` | Escalar para valores `string`. Los caracteres nulos no son compatibles y se eliminan automáticamente. | +| `Boolean` | Escalar para valores `boolean`. | +| `Int` | La especificación GraphQL define `Int` con un tamaño de 32 bytes. | +| `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` | Números enteros grandes. Se utiliza para los tipos `uint32`, `int64`, `uint64`, ..., `uint256` de Ethereum. Nota: Todo por debajo de `uint32`, como `int32`, `uint24` o `int8` se representa como `i32`. | +| `BigDecimal` | `BigDecimal` Decimales de alta precisión representados como un signo y un exponente. El rango de exponentes va de -6143 a +6144. Redondeado a 34 dígitos significativos. | #### Enums @@ -481,10 +481,10 @@ Diccionarios de idiomas admitidos: Algoritmos admitidos para ordenar los resultados: -| Algoritmos | Descripción | -| ------------------- | -------------------------------------------------------------------------------------------------- | -| rango | Usa la calidad de coincidencia (0-1) de la consulta de texto completo para ordenar los resultados. | -| rango de proximidad | Similar al rango, pero también incluye la proximidad de los matches. | +| Algoritmos | Descripción | +| --- | --- | +| rango | Usa la calidad de coincidencia (0-1) de la consulta de texto completo para ordenar los resultados. | +| rango de proximidad | Similar al rango, pero también incluye la proximidad de los matches. | ## Escribir Mappings @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Un nuevo origen de datos sólo procesará las llamadas y los eventos del bloque en el que fue creado y todos los bloques siguientes, pero no procesará los datos históricos, es decir, los datos que están contenidos en bloques anteriores. -> +> > Si los bloques anteriores contienen datos relevantes para la nueva fuente de datos, lo mejor es indexar esos datos leyendo el estado actual del contrato y creando entidades que representen ese estado en el momento de crear la nueva fuente de datos. ### Contexto de la fuente de datos @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** El bloque de creación del contrato se puede buscar rápidamente en Etherscan: -> +> > 1. Busca el contrato introduciendo su dirección en la barra de búsqueda. > 2. Haz clic en el hash de la transacción de creación en la sección `Contract Creator`. > 3. Carga la página de detalles de la transacción, donde encontrarás el bloque inicial de ese contrato. diff --git a/website/pages/es/developing/graph-ts/api.mdx b/website/pages/es/developing/graph-ts/api.mdx index 6ff9e20f8926..89e46d83e4d2 100644 --- a/website/pages/es/developing/graph-ts/api.mdx +++ b/website/pages/es/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Notas del lanzamiento | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Notas del lanzamiento | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Tipos Incorporados @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Referencias de Tipo de Conversiones -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadatos de la Fuente de Datos diff --git a/website/pages/es/developing/unit-testing-framework.mdx b/website/pages/es/developing/unit-testing-framework.mdx index 84f9bd46d732..514f692ac6e9 100644 --- a/website/pages/es/developing/unit-testing-framework.mdx +++ b/website/pages/es/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ La salida del log incluye la duración de la ejecución de la prueba. Aquí hay Esto significa que has utilizado `console.log` en tu código, que no es compatible con AssemblyScript. Considera usar la [API de registro](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) La falta de coincidencia en los argumentos se debe a la falta de coincidencia en `graph-ts` y `matchstick-as`. La mejor manera de solucionar problemas como este es actualizar todo a la última versión publicada. diff --git a/website/pages/es/network/benefits.mdx b/website/pages/es/network/benefits.mdx index ebbd4529f7b7..c0e6d9fedf40 100644 --- a/website/pages/es/network/benefits.mdx +++ b/website/pages/es/network/benefits.mdx @@ -27,53 +27,54 @@ Los costos de consulta pueden variar; el costo cotizado es el promedio al moment ## Usuario de bajo volumen (menos de 30,000 consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -|:--------------------------------:|:-----------------------------------------:|:---------------------------------------------------------------------:| -| Costo mensual del servidor\* | $350 por mes | $0 | -| Costos de consulta | $0+ | ~$15 por mes | -| Tiempo de ingeniería | $400 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 30,000 (autoescalando) | -| Costo por consulta | $0 | $0.0005 | -| Infraestructura | Centralizado | Descentralizado | -| Redundancia geográfica | $750+ por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $750+ | ~$15 | +| Comparación de costos | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Costo mensual del servidor\* | $350 por mes | $0 | +| Costos de consulta | $0+ | ~$15 por mes | +| Tiempo de ingeniería | $400 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 30,000 (autoescalando) | +| Costo por consulta | $0 | $0.0005 | +| Infraestructura | Centralizado | Descentralizado | +| Redundancia geográfica | $750+ por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $750+ | ~$15 | ## Usuario de Volumen Medio (3,000,000+ consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -|:--------------------------------:|:-------------------------------------------:|:---------------------------------------------------------------------:| -| Costo mensual del servidor\* | $350 por mes | $0 | -| Costos de consulta | $500 por mes | $750 por mes | -| Tiempo de ingeniería | $800 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 3,000,000+ | -| Costo por consulta | $0 | $0.00025 | -| Infraestructura | Centralizado | Descentralizado | -| Gastos de ingeniería | $200 por hora | Incluido | -| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $1,650+ | $750 | +| Comparación de costos | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Costo mensual del servidor\* | $350 por mes | $0 | +| Costos de consulta | $500 por mes | $750 por mes | +| Tiempo de ingeniería | $800 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 3,000,000+ | +| Costo por consulta | $0 | $0.00025 | +| Infraestructura | Centralizado | Descentralizado | +| Gastos de ingeniería | $200 por hora | Incluido | +| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $1,650+ | $750 | ## Usuario de alto volumen (30,000,000+ consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -|:--------------------------------:|:-------------------------------------------:|:---------------------------------------------------------------------:| -| Costo mensual del servidor\* | $1100 por mes, por nodo | $0 | -| Costos de consulta | $4000 | $4,500 por mes | -| Número de nodos necesarios | 10 | No aplica | -| Tiempo de ingeniería | $6,000 o más por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 30,000,000+ | -| Costo por consulta | $0 | $0.00015 | -| Infraestructura | Centralizado | Descentralizado | -| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $11,000+ | $4,500 | +| Comparación de costos | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Costo mensual del servidor\* | $1100 por mes, por nodo | $0 | +| Costos de consulta | $4000 | $4,500 por mes | +| Número de nodos necesarios | 10 | No aplica | +| Tiempo de ingeniería | $6,000 o más por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 30,000,000+ | +| Costo por consulta | $0 | $0.00015 | +| Infraestructura | Centralizado | Descentralizado | +| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $11,000+ | $4,500 | \*incluidos los costos de copia de seguridad: $50-$100 por mes Tiempo de ingeniería basado en un supuesto de $200 por hora -utilizando la función de presupuesto máximo de consulta en la pestaña de facturación presupuestaria, manteniendo una alta calidad de servicio +utilizando la función de presupuesto máximo de consulta en la pestaña de facturación presupuestaria, +manteniendo una alta calidad de servicio Costos estimados son solo para los subgrafos de Ethereum Mainnet — los costos son aún más altos cuando se aloja un `graph-node` en otras redes. diff --git a/website/pages/es/network/indexing.mdx b/website/pages/es/network/indexing.mdx index 9b272559f5a6..b3ed8579fb0b 100644 --- a/website/pages/es/network/indexing.mdx +++ b/website/pages/es/network/indexing.mdx @@ -113,11 +113,11 @@ Los indexadores pueden diferenciarse aplicando técnicas avanzadas para tomar de - **Grande**: Preparado para indexar todos los subgrafos utilizados actualmente y atender solicitudes para el tráfico relacionado. | Configuración | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| ------------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Pequeño | 4 | 8 | 1 | 4 | 16 | -| Estándar | 8 | 30 | 1 | 12 | 48 | -| Medio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3,5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Pequeño | 4 | 8 | 1 | 4 | 16 | +| Estándar | 8 | 30 | 1 | 12 | 48 | +| Medio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3,5 | 48 | 184 | ### ¿Qué precauciones básicas de seguridad debe tomar un Indexador? @@ -149,20 +149,20 @@ Nota: Para admitir el escalado ágil, se recomienda que las inquietudes de consu #### Graph Node -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| ------ | -------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------- | -| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | -| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | -| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| --- | --- | --- | --- | --- | +| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | +| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | +| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | #### Servicio de Indexador -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| ------ | --------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | Servidor HTTP GraphQL
    (para consultas de subgrafo pagadas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| --- | --- | --- | --- | --- | +| 7600 | Servidor HTTP GraphQL
    (para consultas de subgrafo pagadas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Métricas de Prometheus | /metrics | --metrics-port | - | #### Agente Indexador diff --git a/website/pages/es/new-chain-integration.mdx b/website/pages/es/new-chain-integration.mdx index d9217c7a4a9e..737ab77226a4 100644 --- a/website/pages/es/new-chain-integration.mdx +++ b/website/pages/es/new-chain-integration.mdx @@ -4,8 +4,7 @@ title: Integración de nuevas redes El Graph Node actualmente puede indexar datos de los siguientes tipos de cadena: -- Ethereum, a través de EVM JSON-RPC y [Ethereum Firehose] - (https://github.com/streamingfast/firehose-ethereum) +- Ethereum, a través de EVM JSON-RPC y [Ethereum Firehose] (https://github.com/streamingfast/firehose-ethereum) - NEAR, a través de [NEAR Firehose] (https://github.com/streamingfast/near-firehose-indexer) - Cosmos, a través de [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) - Arweave, a través de [Arweave Firehose](https://github.com/graphprotocol/firehose-arweave) diff --git a/website/pages/es/operating-graph-node.mdx b/website/pages/es/operating-graph-node.mdx index 4f31998c3146..759184d08cd7 100644 --- a/website/pages/es/operating-graph-node.mdx +++ b/website/pages/es/operating-graph-node.mdx @@ -77,13 +77,13 @@ Puedes encontrar un ejemplo completo de configuración de Kubernetes en el [Inde Cuando está funcionando, Graph Node muestra los siguientes puertos: -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| ------ | -------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------- | -| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | -| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | -| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| --- | --- | --- | --- | --- | +| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | +| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | +| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | > **Importante**: Ten cuidado con exponer puertos públicamente - los **puertos de administración** deben mantenerse bloqueados. Esto incluye el punto final JSON-RPC de Graph Node. diff --git a/website/pages/es/querying/graphql-api.mdx b/website/pages/es/querying/graphql-api.mdx index 321ec705c482..2eac7116dad8 100644 --- a/website/pages/es/querying/graphql-api.mdx +++ b/website/pages/es/querying/graphql-api.mdx @@ -208,7 +208,7 @@ En el siguiente ejemplo, estamos filtrando desafíos con `coutcome` `succeeded` ``` > **Azúcar sintáctico**: Puedes simplificar la consulta anterior eliminando el operador `and` pasando una subexpresión separada por comas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Las consultas de búsqueda de texto completo tienen un campo obligatorio, `text` Operadores de búsqueda de texto completo: -| Símbolo | Operador | Descripción | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Para combinar varios términos de búsqueda en un filtro para entidades que incluyen todos los términos proporcionados | -| | | `O` | Las consultas con varios términos de búsqueda separados por o el operador devolverá todas las entidades que coincidan con cualquiera de los términos proporcionados | -| `<->` | `Follow by` | Especifica la distancia entre dos palabras. | -| `:*` | `Prefijo` | Utilice el término de búsqueda del prefijo para encontrar palabras cuyo prefijo coincida (se requieren 2 caracteres.) | +| Símbolo | Operador | Descripción | +| --- | --- | --- | +| `&` | `And` | Para combinar varios términos de búsqueda en un filtro para entidades que incluyen todos los términos proporcionados | +| | | `O` | Las consultas con varios términos de búsqueda separados por o el operador devolverá todas las entidades que coincidan con cualquiera de los términos proporcionados | +| `<->` | `Follow by` | Especifica la distancia entre dos palabras. | +| `:*` | `Prefijo` | Utilice el término de búsqueda del prefijo para encontrar palabras cuyo prefijo coincida (se requieren 2 caracteres.) | #### Ejemplos diff --git a/website/pages/es/release-notes/assemblyscript-migration-guide.mdx b/website/pages/es/release-notes/assemblyscript-migration-guide.mdx index c3770a5c9ef7..bfc973f982dd 100644 --- a/website/pages/es/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/es/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Tendrás que cambiar el nombre de las variables duplicadas si tienes una variable shadowing. + ### Comparaciones Nulas + Al hacer la actualización en un subgrafo, a veces pueden aparecer errores como estos: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Para solucionarlo puedes simplemente cambiar la declaración `if` por algo así: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Para solucionar este problema, puedes crear una variable para ese acceso a la propiedad de manera que el compilador pueda hacer la magia de la comprobación de nulidad: ```typescript diff --git a/website/pages/es/release-notes/graphql-validations-migration-guide.mdx b/website/pages/es/release-notes/graphql-validations-migration-guide.mdx index 5bdf39587e84..fefc282fe99e 100644 --- a/website/pages/es/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/es/release-notes/graphql-validations-migration-guide.mdx @@ -408,7 +408,6 @@ query { user { id image # 'image' requiere un conjunto de selección para subcampos! - } } ``` diff --git a/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx index d43463682da5..45ec79e9d4f9 100644 --- a/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx @@ -336,13 +336,11 @@ Si vous n’avez transféré aucun solde de contrat de vesting à L2 et que votr ### J’utilise mon contrat de vesting pour investir dans mainnet. Puis-je transférer ma participation à Arbitrum? -Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat d’acquisition L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat d’acquisition dans Explorer. Si -votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. +Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat d’acquisition L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat d’acquisition dans Explorer. Si votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. ### J’utilise mon contrat de vesting pour déléguer sur mainnet. Puis-je transférer mes délégations à Arbitrum? -Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat de vesting L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat de vesting dans Explorer. Si -votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. +Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat de vesting L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat de vesting dans Explorer. Si votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. ### Puis-je spécifier un bénéficiaire différent pour mon contrat de vesting sur L2? diff --git a/website/pages/fr/cookbook/cosmos.mdx b/website/pages/fr/cookbook/cosmos.mdx index 4cb8ecd18801..ad5486175d46 100644 --- a/website/pages/fr/cookbook/cosmos.mdx +++ b/website/pages/fr/cookbook/cosmos.mdx @@ -48,30 +48,30 @@ La définition d'un subgraph comporte trois éléments clés : Le manifeste du subgraph (`subgraph.yaml`) identifie les sources de données du subgraph, les déclencheurs d'intérêt et les fonctions (`handlers`) qui doivent être exécutées en réponse à ces déclencheurs. Vous trouverez ci-dessous un exemple de manifeste de subgraph pour un subgraph Cosmos : ```yaml -version spec : 0.0.5 -description : Exemple de subgraph Cosmos +version spec: 0.0.5 +description: Exemple de subgraph Cosmos schéma: - fichier : ./schema.graphql # lien vers le fichier de schéma + fichier: ./schema.graphql # lien vers le fichier de schéma les sources de données: - - genre : cosmos - nom : CosmosHub - réseau : cosmoshub-4 # Cela changera pour chaque blockchain basée sur le cosmos. Dans ce cas, l’exemple utilise le mainnet Cosmos Hub. - source: - startBlock : 0 # Requis pour Cosmos, définissez-le sur 0 pour démarrer l'indexation à partir de la genèse de la chaîne - cartographie : - Version api : 0.0.7 - langage : wasm/assemblyscript - gestionnaires de blocs : - - handler: handleNewBlock # le nom de la fonction dans le fichier de mappage - Gestionnaires d'événements : - - event : récompenses # le type d'événement qui sera géré - handler: handleReward # le nom de la fonction dans le fichier de mappage - Gestionnaires de transactions : - - handler: handleTransaction # le nom de la fonction dans le fichier de mappage - Gestionnaires de messages : - - message : /cosmos.staking.v1beta1.MsgDelegate # le type d'un message - handler : handleMsgDelegate # le nom de la fonction dans le fichier de mappage - fichier : ./src/mapping.ts # lien vers le fichier avec les mappages Assemblyscript + - genre: cosmos + nom: CosmosHub + réseau: cosmoshub-4 # Cela changera pour chaque blockchain basée sur le cosmos. Dans ce cas, l’exemple utilise le mainnet Cosmos Hub. + source: + startBlock: 0 # Requis pour Cosmos, définissez-le sur 0 pour démarrer l'indexation à partir de la genèse de la chaîne + cartographie: + Version api: 0.0.7 + langage: wasm/assemblyscript + gestionnaires de blocs: + - handler: handleNewBlock # le nom de la fonction dans le fichier de mappage + Gestionnaires d'événements: + - event: récompenses # le type d'événement qui sera géré + handler: handleReward # le nom de la fonction dans le fichier de mappage + Gestionnaires de transactions: + - handler: handleTransaction # le nom de la fonction dans le fichier de mappage + Gestionnaires de messages: + - message: /cosmos.staking.v1beta1.MsgDelegate # le type d'un message + handler: handleMsgDelegate # le nom de la fonction dans le fichier de mappage + fichier: ./src/mapping.ts # lien vers le fichier avec les mappages Assemblyscript ``` - Les subgraphs cosmos introduisent un nouveau `type` de source de données (`cosmos`). diff --git a/website/pages/fr/cookbook/near.mdx b/website/pages/fr/cookbook/near.mdx index 938ad8a0922f..b1e19c5a58e9 100644 --- a/website/pages/fr/cookbook/near.mdx +++ b/website/pages/fr/cookbook/near.mdx @@ -53,23 +53,23 @@ $ graph build # génère le Web Assembly à partir des fichiers AssemblyScript, Le manifeste de subgraph (`subgraph.yaml`) identifie les sources de données pour le subgraph, les déclencheurs d'intérêt et les fonctions qui doivent être exécutées en réponse à ces déclencheurs. Voici un exemple de manifeste de subgraph pour un subgraph NEAR: ```yaml -specVersion : 0.0.2 -schema : - file : ./src/schema.graphql # lien vers le fichier de schéma -dataSources : - - kind : near - network : near-mainnet - source : - account : app.good-morning.near # Cette source de données surveillera ce compte - startBlock : 10662188 # Requis pour NEAR - mapping : - apiVersion : 0.0.5 - language : wasm/assemblyscript - blockHandlers : - - handler : handleNewBlock # le nom de la fonction dans le fichier de mapping - receiptHandlers : - - handler : handleReceipt # le nom de la fonction dans le fichier de mappage - file : ./src/mapping.ts # lien vers le fichier contenant les mappings Assemblyscript +specVersion: 0.0.2 +schema: + file: ./src/schema.graphql # lien vers le fichier de schéma +dataSources: + - kind: near + network: near-mainnet + source: + account: app.good-morning.near # Cette source de données surveillera ce compte + startBlock: 10662188 # Requis pour NEAR + mapping: + apiVersion: 0.0.5 + language: wasm/assemblyscript + blockHandlers: + - handler: handleNewBlock # le nom de la fonction dans le fichier de mapping + receiptHandlers: + - handler: handleReceipt # le nom de la fonction dans le fichier de mappage + file: ./src/mapping.ts # lien vers le fichier contenant les mappings Assemblyscript ``` - Les subgraphs NEAR introduisent un nouveau `type` de source de données (`near`) @@ -79,12 +79,12 @@ dataSources : ```yaml comptes: - préfixes : - - application - - bien - suffixes : - - matin.près - - matin.testnet + préfixes: + - application + - bien + suffixes: + - matin.près + - matin.testnet ``` Les fichiers de données NEAR prennent en charge deux types de gestionnaires : @@ -259,8 +259,8 @@ Si un `compte` est spécifié, il correspondra uniquement au nom exact du compte ```yaml comptes: - suffixes : - - mintbase1.near + suffixes: + - mintbase1.near ``` ### Les subgraphs NEAR peuvent-ils faire des appels de view aux comptes NEAR pendant les mappings? diff --git a/website/pages/fr/cookbook/upgrading-a-subgraph.mdx b/website/pages/fr/cookbook/upgrading-a-subgraph.mdx index aa8894a26644..fa1225a9d7df 100644 --- a/website/pages/fr/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/fr/cookbook/upgrading-a-subgraph.mdx @@ -134,7 +134,7 @@ Toutes nos félicitations! Vous êtes désormais un pionnier de la décentralisa ```graphql { - stakers(block : { number_gte : 14486109 }) { + stakers(block: { number_gte: 14486109 }) { id } } diff --git a/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx index e4e1379c8942..2a9f63ada4c2 100644 --- a/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx @@ -186,8 +186,8 @@ et ```json { - "réseau": "goerli", - "adresse": "0xabc..." + "réseau": "goerli", + "adresse": "0xabc..." } ``` diff --git a/website/pages/fr/developing/creating-a-subgraph.mdx b/website/pages/fr/developing/creating-a-subgraph.mdx index 73db1fe19107..f5a3f5c9891e 100644 --- a/website/pages/fr/developing/creating-a-subgraph.mdx +++ b/website/pages/fr/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Pour certains types d'entités, l'`id` est construit à partir des identifiants 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` | La spécification GraphQL définit `Int` pour avoir une taille de 32 octets. | -| `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 **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 @@ -716,7 +716,7 @@ dataSources: ``` > **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. @@ -906,12 +906,12 @@ Dans la fonction de gestionnaire, le reçu est accessible dans le champ `Event.r À 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) | `nonFatalErrors` | -| [Recherche en texte intégral](#defining-fulltext-search-fields) | `fullTextSearch` | -| [La greffe](#grafting-onto-existing-subgraphs) | `grafting` | -| [IPFS sur les contrats Ethereum](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` ou `nonDeterministicIpfs` | +| Fonctionnalité | Nom | +| --- | --- | +| [Erreurs non fatales](#non-fatal-errors) | `nonFatalErrors` | +| [Recherche en texte intégral](#defining-fulltext-search-fields) | `fullTextSearch` | +| [La greffe](#grafting-onto-existing-subgraphs) | `grafting` | +| [IPFS sur les contrats Ethereum](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` ou `nonDeterministicIpfs` | 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 : @@ -1166,7 +1166,7 @@ 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 { +export function handleTransfer(event: TransferEvent): void { let token = Token.load(event.params.tokenId.toString()) if (!token) { token = new Token(event.params.tokenId.toString()) diff --git a/website/pages/fr/developing/graph-ts/api.mdx b/website/pages/fr/developing/graph-ts/api.mdx index b13a30605e61..f7bf1a3715f1 100644 --- a/website/pages/fr/developing/graph-ts/api.mdx +++ b/website/pages/fr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Notes de version | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Notes de version | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Types intégrés @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Référence des conversions de types -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Métadonnées de la source de données diff --git a/website/pages/fr/developing/unit-testing-framework.mdx b/website/pages/fr/developing/unit-testing-framework.mdx index 51a8a15d219e..bb0bd1d30bef 100644 --- a/website/pages/fr/developing/unit-testing-framework.mdx +++ b/website/pages/fr/developing/unit-testing-framework.mdx @@ -901,7 +901,7 @@ Les utilisateurs peuvent également simuler une panne critique, comme ceci : ```typescript test('Tout faire exploser', () => { - log.critical('Boom!') + log.critical('Boom!') }) ``` @@ -1082,15 +1082,15 @@ La sortie du journal inclut la durée de l’exécution du test. Voici un exempl Cela signifie que vous avez utilisé `console.log` dans votre code, ce qui n'est pas pris en charge par AssemblyScript. Veuillez envisager d'utiliser l'[API Logging](/developing/assemblyscript-api/#logging-api) > ERREUR TS2554 : attendu ? arguments, mais j'ai eu ?. -> +> > renvoyer le nouveau ethereum.Block (defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt) ; -> +> > dans ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > renvoyer un nouveau ethereum.Transaction (defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt) ; -> +> > dans ~lib/matchstick-as/assembly/defaults.ts(24,12) L'inadéquation des arguments est causée par une inadéquation entre `graph-ts` et `matchstick-as`. La meilleure façon de résoudre des problèmes comme celui-ci est de tout mettre à jour vers la dernière version publiée. diff --git a/website/pages/fr/network/benefits.mdx b/website/pages/fr/network/benefits.mdx index 93e03fdda0df..a6e3fd0c75b9 100644 --- a/website/pages/fr/network/benefits.mdx +++ b/website/pages/fr/network/benefits.mdx @@ -27,53 +27,54 @@ Les coûts des requêtes peuvent varier ; le coût indiqué est la moyenne au m ## Utilisateur à faible volume (moins de 30 000 requêtes par mois) -| Cost Comparison | Auto-hébergé | Réseau de The Graph | -|:------------------------------:|:-----------------------------------------:|:---------------------------------------------------------------------------:| -| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | -| Frais de requête | + 0 $ | ~15 $ au mois | -| Temps d'ingénierie | 400 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | 30 000 (automatique mise à l'échelle) | -| Tarif par requête | 0 $ | 0,0005 $ | -| Les infrastructures | Centralisée | Décentralisée | -| La redondance géographique | 750$+ par nœud complémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | + 750 $ | ~15 $ | +| Cost Comparison | Auto-hébergé | Réseau de The Graph | +| :-: | :-: | :-: | +| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | +| Frais de requête | + 0 $ | ~15 $ au mois | +| Temps d'ingénierie | 400 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | 30 000 (automatique mise à l'échelle) | +| Tarif par requête | 0 $ | 0,0005 $ | +| Les infrastructures | Centralisée | Décentralisée | +| La redondance géographique | 750$+ par nœud complémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | + 750 $ | ~15 $ | ## Utilisateur moyen (3 000 000+ demandes par mois) -| Comparaison de coût | Auto-hébergé | Réseau de The Graph | -|:------------------------------:|:------------------------------------------:|:---------------------------------------------------------------------------:| -| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | -| Frais de requête | 500 $ au mois | 750 $ au mois | -| Temps d'ingénierie | 800 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | + 3 000 000 | -| Tarif par requête | 0 $ | 0,00025 $ | -| L'infrastructure | Centralisée | Décentralisée | -| Frais d'ingénierie | 200 $ au mois | Compris | -| La redondance géographique | 1 200 $ coût total par nœud supplémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | $1,650+ | $750 | +| Comparaison de coût | Auto-hébergé | Réseau de The Graph | +| :-: | :-: | :-: | +| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | +| Frais de requête | 500 $ au mois | 750 $ au mois | +| Temps d'ingénierie | 800 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | + 3 000 000 | +| Tarif par requête | 0 $ | 0,00025 $ | +| L'infrastructure | Centralisée | Décentralisée | +| Frais d'ingénierie | 200 $ au mois | Compris | +| La redondance géographique | 1 200 $ coût total par nœud supplémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | $1,650+ | $750 | ## L'utilisateur de volume conséquent (30 000 000+ requêtes au mois) -| Cost Comparison | Auto-hébergé | Réseau de The Graph | -|:------------------------------:|:-----------------------------------------------:|:---------------------------------------------------------------------------:| -| Coût mensuel du serveur\* | $1100 per month, per node | 0 $ | -| Frais de requête | $4000 | $4,500 per month | -| Nombre de nœuds obligatoires | 10 | Sans objet | -| Temps d'ingénierie | $6,000 or more per month | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | + 30 000 000 | -| Tarif par requête | 0 $ | 0,00015 $ | -| L'infrastructure | Centralisée | Décentralisée | -| La redondance géographique | 1 200 $ de coûts totaux par nœud supplémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | + 11 000 $ | $4,500 | +| Cost Comparison | Auto-hébergé | Réseau de The Graph | +| :-: | :-: | :-: | +| Coût mensuel du serveur\* | $1100 per month, per node | 0 $ | +| Frais de requête | $4000 | $4,500 per month | +| Nombre de nœuds obligatoires | 10 | Sans objet | +| Temps d'ingénierie | $6,000 or more per month | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | + 30 000 000 | +| Tarif par requête | 0 $ | 0,00015 $ | +| L'infrastructure | Centralisée | Décentralisée | +| La redondance géographique | 1 200 $ de coûts totaux par nœud supplémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | + 11 000 $ | $4,500 | \*y compris les coûts de sauvegarde : $50-$ à 100 dollars au mois Temps d'ingénierie basé sur une hypothèse de 200 $ de l'heure - en utilisant la fonction "max query budget" dans l'onglet "budget billing", tout en maintenant une qualité de service élevée + en utilisant la fonction "max query budget" dans l'onglet "budget billing", tout en maintenant une qualité de +service élevée Les coûts estimés ne concernent que les subgraphs du Mainnet Ethereum - les coûts sont encore plus élevés en cas d'auto-hébergement d'un `graph-node` sur d'autres réseaux. diff --git a/website/pages/fr/network/delegating.mdx b/website/pages/fr/network/delegating.mdx index 980ace6dad0d..1f6648e16226 100644 --- a/website/pages/fr/network/delegating.mdx +++ b/website/pages/fr/network/delegating.mdx @@ -33,8 +33,8 @@ Lorsqu'un délégué souhaite se dé-déléguer, ses jetons sont soumis à une p Il convient également de choisir judicieusement un indexeur. Si vous choisissez un indexeur qui n'est pas digne de confiance ou qui ne fait pas du bon travail, vous voudrez annuler la délégation, ce qui signifie que vous perdrez beaucoup d'occasions de gagner des récompenses, ce qui peut être tout aussi grave que de brûler des TRG.
    - !Délégation débondage](/img/Delegation-Unbonding.png) _Notez la commission de 0,5% dans l'interface utilisateur de la délégation, ainsi que la période de débondage de 28 jours. - de 28 jours + !Délégation débondage](/img/Delegation-Unbonding.png) _Notez la commission de 0,5% dans l'interface utilisateur de la + délégation, ainsi que la période de débondage de 28 jours. de 28 jours
    ### Choisir un indexeur digne de confiance avec une rémunération équitable pour les délégués @@ -45,7 +45,7 @@ Réduction de la récompense d'indexation - La réduction de la récompense d'in
    ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Le meilleur indexeur donne aux délégués 90 % des récompenses. Le - celui du milieu donne 20 % aux délégués. Celui du bas donne aux délégués environ 83 %.* + celui du milieu donne 20 % aux délégués. Celui du bas donne aux délégués environ 83 %.*
    - Réduction des frais de requête – Cela fonctionne exactement comme la réduction des récompenses d’indexation. Cependant, cela concerne spécifiquement les retours sur les frais de requête collectés par l’indexeur. Il convient de noter qu’au démarrage du réseau, les retours sur les frais de requête seront très faibles par rapport à la récompense d’indexation. Il est recommandé de prêter attention au réseau pour déterminer quand les frais de requête sur le réseau commenceront à être plus importants. diff --git a/website/pages/fr/network/indexing.mdx b/website/pages/fr/network/indexing.mdx index 82d105c1006e..c6045ec4adcd 100644 --- a/website/pages/fr/network/indexing.mdx +++ b/website/pages/fr/network/indexing.mdx @@ -113,11 +113,11 @@ Les indexeurs peuvent se différencier en appliquant des techniques avancées po - **Large** : Prêt à indexer tous les subgraphs actuellement utilisés et à répondre aux demandes pour le trafic associé. | Installation | Postgres
    (CPUs) | Postgres
    (mémoire en Gbs) | Postgres
    (disque en TB) | VMs
    (CPUs) | VMs
    (mémoire en Gbs) | -| ------------ |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| -| Petit | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 11 | 12 | 48 | -| Moyen | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | | +| --- | :-: | :-: | :-: | :-: | :-: | +| Petit | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 11 | 12 | 48 | +| Moyen | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | | ### Quelles sont les précautions de sécurité de base qu’un indexeur doit prendre ? @@ -149,20 +149,20 @@ Remarque : Pour prendre en charge la mise à l'échelle agile, il est recommand #### Nœud de The Graph -| Port | Objectif | Routes | Paramètre CLI | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Objectif | Routes | Paramètre CLI | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/fr/operating-graph-node.mdx b/website/pages/fr/operating-graph-node.mdx index 60e9383e74c0..3f8f8b844054 100644 --- a/website/pages/fr/operating-graph-node.mdx +++ b/website/pages/fr/operating-graph-node.mdx @@ -77,13 +77,13 @@ Un exemple complet de configuration de Kubernetes est disponible dans le [dépô Lorsqu'il est en cours d'exécution, Graph Node expose les ports suivants : -| Port | Objectif | Routes | Paramètre CLI | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important** : Soyez prudent lorsque vous exposez les ports publiquement : les **ports d'administration** doivent rester verrouillés. Cela inclut le point de terminaison Graph Node JSON-RPC. diff --git a/website/pages/fr/querying/graphql-api.mdx b/website/pages/fr/querying/graphql-api.mdx index 842b3bb27033..2fe9bc582f62 100644 --- a/website/pages/fr/querying/graphql-api.mdx +++ b/website/pages/fr/querying/graphql-api.mdx @@ -210,7 +210,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -324,12 +324,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Utilisez le terme de recherche de préfixe pour trouver les mots dont le préfixe correspond (2 caractères requis.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Utilisez le terme de recherche de préfixe pour trouver les mots dont le préfixe correspond (2 caractères requis.) | #### Exemples diff --git a/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx index e782a13b7e2b..f5f9aa6d440c 100644 --- a/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Vous devrez renommer vos variables en double si vous conservez une observation de variables. + ### Comparaisons nulles + En effectuant la mise à niveau sur votre subgraph, vous pouvez parfois obtenir des erreurs comme celles-ci : ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Pour résoudre, vous pouvez simplement remplacer l'instruction `if` par quelque chose comme ceci : ```typescript @@ -209,7 +213,7 @@ Dans ces cas-là, vous pouvez utiliser la fonction `changetype` : class Bytes extends Uint8Array {} let uint8Array = new Uint8Array(2) -changetype(uint8Array ) // fonctionne :) +changetype(uint8Array) // fonctionne :) ``` ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Pour résoudre ce problème, vous pouvez créer une variable pour l'accès à cette propriété afin que le compilateur puisse effectuer la vérification magique de la nullité : ```typescript @@ -401,7 +406,7 @@ type Total @entity { let total = Total.load('latest') if (total === null) { - total = new Total('latest') // initialise déjà les propriétés non-nullables + total = new Total('latest') // initialise déjà les propriétés non-nullables } total.amount = total.amount + BigInt.fromI32(1) @@ -483,12 +488,12 @@ Vous ne pouvez désormais plus définir de champs dans vos types qui sont des li ```graphql type Something @entity { - id: Bytes! + id: Bytes! } type MyEntity @entity { - id: Bytes! - invalidField: [Something]! # n'est plus valide + id: Bytes! + invalidField: [Something]! # n'est plus valide } ``` diff --git a/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx b/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx index c3ce4f6a32f5..f0c63bc8feed 100644 --- a/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx @@ -103,7 +103,7 @@ query myData { } query myData2 { - # renommer la deuxième requête + # renommer la deuxième requête name } ``` @@ -158,7 +158,7 @@ _Solution:_ ```graphql query myData($id: String) { - # conserver la variable pertinente (ici : `$id: String`) + # conserver la variable pertinente (ici : `$id: String`) id ...MyFields } @@ -259,7 +259,7 @@ query { ```graphql # Différents arguments peuvent conduire à des données différentes, -# donc nous ne pouvons pas supposer que les champs seront les mêmes. +# donc nous ne pouvons pas supposer que les champs seront les mêmes. query { dogs { doesKnowCommand(dogCommand: SIT) diff --git a/website/pages/hi/cookbook/subgraph-debug-forking.mdx b/website/pages/hi/cookbook/subgraph-debug-forking.mdx index 32e1df5a58dd..60d88d3f07c9 100644 --- a/website/pages/hi/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/hi/cookbook/subgraph-debug-forking.mdx @@ -8,11 +8,11 @@ title: फोर्क्स का उपयोग करके त्वरि **सबग्राफ फोर्किंग** आलसी ढंग से _दूसरे_ सबग्राफ के स्टोर (आमतौर पर एक परोक्ष सबग्राफ) से इकाइयां को लाने की प्रक्रिया है। -डिबगिंग के संदर्भ में, **सबग्राफ फोर्किंग** आपको ब्लॉक_X_ को सिंक-अप करने के लिए बिना प्रतीक्षा किए ब्लॉक _X_ पर अपने विफल सबग्राफ को डीबग करने की अनुमति देता है । +डिबगिंग के संदर्भ में, **सबग्राफ फोर्किंग** आपको ब्लॉक*X* को सिंक-अप करने के लिए बिना प्रतीक्षा किए ब्लॉक _X_ पर अपने विफल सबग्राफ को डीबग करने की अनुमति देता है । ## क्या?! कैसे? -जब आप अनुक्रमण के लिए एक दूरस्थ ग्राफ़ नोड पर एक सबग्राफ तैनात करते हैं और यह ब्लॉक _X_ करने में विफल रहता है, तो अच्छी खबर यह है कि ग्राफ़ नोड अभी भी अपने स्टोर का उपयोग करके ग्राफ़क्यूएल क्वेरी को सर्व करेगा, जो ब्लॉक_X_ में सिंक-अप है। एक दम बढ़िया! इसका मतलब यह है कि ब्लॉक _X_ को अनुक्रमित करते समय उत्पन्न होने वाली बग को ठीक करने के लिए हम इस "अप-टू-डेट" स्टोर का लाभ उठा सकते हैं। +जब आप अनुक्रमण के लिए एक दूरस्थ ग्राफ़ नोड पर एक सबग्राफ तैनात करते हैं और यह ब्लॉक _X_ करने में विफल रहता है, तो अच्छी खबर यह है कि ग्राफ़ नोड अभी भी अपने स्टोर का उपयोग करके ग्राफ़क्यूएल क्वेरी को सर्व करेगा, जो ब्लॉक*X* में सिंक-अप है। एक दम बढ़िया! इसका मतलब यह है कि ब्लॉक _X_ को अनुक्रमित करते समय उत्पन्न होने वाली बग को ठीक करने के लिए हम इस "अप-टू-डेट" स्टोर का लाभ उठा सकते हैं। संक्षेप में, हम एक दूरस्थ ग्राफ नोड से _असफल सबग्राफ को फोर्क करने जा रहे हैं_ जो सबग्राफ को ब्लॉक _X_ तक अनुक्रमित होने की गारंटी देता है ताकि ब्लॉक _X_ पर डिबग किए जा रहे स्थानीय रूप से तैनात सबग्राफ को इंडेक्सिंग स्थिति का एक अप-टू-डेट दृश्य प्रदान हो सकें। diff --git a/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx index c0066e9fdc84..6d3eca9af3bf 100644 --- a/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx @@ -98,9 +98,9 @@ Options: } ``` -**ध्यान दें:** कॉन्फ़िग फ़ाइल में आपको कोई `टेम्प्लेट` (यदि आपके पास है) निर्दिष्ट करने की आवश्यकता नहीं है, केवल ` डेटा सोर्स `। यदि `subgraph.yaml` फ़ाइल में कोई `टेम्प्लेट` घोषित है, तो उनका नेटवर्क स्वचालित रूप से `--network` विकल्प के साथ निर्दिष्ट एक में अपडेट हो जाएगा. +**ध्यान दें:** कॉन्फ़िग फ़ाइल में आपको कोई `टेम्प्लेट` (यदि आपके पास है) निर्दिष्ट करने की आवश्यकता नहीं है, केवल `डेटा सोर्स`। यदि `subgraph.yaml` फ़ाइल में कोई `टेम्प्लेट` घोषित है, तो उनका नेटवर्क स्वचालित रूप से `--network` विकल्प के साथ निर्दिष्ट एक में अपडेट हो जाएगा. -अब, मान लें कि आप अपने सबग्राफ को ` mainnet ` और `goerli` नेटवर्क पर तैनात करना चाहते हैं, और यह आपका `subgraph.yaml` है: +अब, मान लें कि आप अपने सबग्राफ को `mainnet` और `goerli` नेटवर्क पर तैनात करना चाहते हैं, और यह आपका `subgraph.yaml` है: ```yaml # ... @@ -159,7 +159,7 @@ dataSources: अब आप `yarn deploy` करने के लिए तैयार हैं| -**ध्यान दें:** जैसा कि पहले उल्लेख किया गया है, `graph-cli 0.32.0` के बाद से आप सीधे `yarn deploy` चला सकते हैं ` --नेटवर्क ` विकल्प के साथ: +**ध्यान दें:** जैसा कि पहले उल्लेख किया गया है, `graph-cli 0.32.0` के बाद से आप सीधे `yarn deploy` चला सकते हैं `--नेटवर्क` विकल्प के साथ: ```sh # Using default networks.json file diff --git a/website/pages/hi/developing/creating-a-subgraph.mdx b/website/pages/hi/developing/creating-a-subgraph.mdx index 50f6bf0e7492..b146210f6aec 100644 --- a/website/pages/hi/developing/creating-a-subgraph.mdx +++ b/website/pages/hi/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ type GravatarDeclined @entity { हम अपने ग्राफक्यूएल एपीआई में निम्नलिखित स्केलर्स का समर्थन करते हैं: -| प्रकार | विवरण | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | बाइट सरणी, एक हेक्साडेसिमल स्ट्रिंग के रूप में दर्शाया गया है। आमतौर पर एथेरियम हैश और पतों के लिए उपयोग किया जाता है। | -| `String` | `स्ट्रिंग` मानों के लिए स्केलर। अशक्त वर्ण समर्थित नहीं हैं और स्वचालित रूप से हटा दिए जाते हैं। | -| `Boolean` | `boolean` मानों के लिए स्केलर। | -| `Int` | ग्राफक्लाइन स्पेक `Int` को 32 बाइट्स के आकार के रूप में परिभाषित करता है। | -| `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` | बड़े पूर्णांक। एथेरियम के `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारों के लिए उपयोग किया जाता है। नोट: `uint32` के नीचे सब कुछ, जैसे `int32`, `uint24` या `int8` को `i32` के रूप में दर्शाया गया है। | -| `BigDecimal` | `BigDecimal` उच्च परिशुद्धता दशमलव एक महत्व और एक प्रतिपादक के रूप में दर्शाया गया है। एक्सपोनेंट रेंज -6143 से +6144 तक है। 34 महत्वपूर्ण अंकों तक गोल। | +| प्रकार | विवरण | +| --- | --- | +| `Bytes` | बाइट सरणी, एक हेक्साडेसिमल स्ट्रिंग के रूप में दर्शाया गया है। आमतौर पर एथेरियम हैश और पतों के लिए उपयोग किया जाता है। | +| `String` | `स्ट्रिंग` मानों के लिए स्केलर। अशक्त वर्ण समर्थित नहीं हैं और स्वचालित रूप से हटा दिए जाते हैं। | +| `Boolean` | `boolean` मानों के लिए स्केलर। | +| `Int` | ग्राफक्लाइन स्पेक `Int` को 32 बाइट्स के आकार के रूप में परिभाषित करता है। | +| `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` | बड़े पूर्णांक। एथेरियम के `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारों के लिए उपयोग किया जाता है। नोट: `uint32` के नीचे सब कुछ, जैसे `int32`, `uint24` या `int8` को `i32` के रूप में दर्शाया गया है। | +| `BigDecimal` | `BigDecimal` उच्च परिशुद्धता दशमलव एक महत्व और एक प्रतिपादक के रूप में दर्शाया गया है। एक्सपोनेंट रेंज -6143 से +6144 तक है। 34 महत्वपूर्ण अंकों तक गोल। | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **ध्यान दें:** एक नया डेटा स्रोत केवल उस ब्लॉक के लिए कॉल और ईवेंट को प्रोसेस करेगा जिसमें इसे बनाया गया था और सभी बाद के ब्लॉक, लेकिन ऐतिहासिक डेटा, यानी डेटा को प्रोसेस नहीं करेगा जो पिछले ब्लॉकों में निहित है। -> +> > यदि पिछले ब्लॉक में नए डेटा स्रोत के लिए प्रासंगिक डेटा है, तो उस डेटा को अनुबंध की वर्तमान स्थिति को पढ़कर और नए डेटा स्रोत के निर्माण के समय उस स्थिति का प्रतिनिधित्व करने वाली संस्थाओं का निर्माण करना सबसे अच्छा है। ### डेटा स्रोत प्रसंग @@ -716,7 +716,7 @@ dataSources: ``` > **ध्यान दें:** इथरस्कैन पर अनुबंध निर्माण ब्लॉक को जल्दी से देखा जा सकता है: -> +> > 1. खोज बार में उसका पता दर्ज करके अनुबंध की खोज करें। > 2. `अनुबंध निर्माता` अनुभाग में निर्माण लेनदेन हैश पर क्लिक करें। > 3. लेन-देन विवरण पृष्ठ लोड करें जहां आपको उस अनुबंध के लिए प्रारंभ ब्लॉक मिलेगा। diff --git a/website/pages/hi/developing/graph-ts/api.mdx b/website/pages/hi/developing/graph-ts/api.mdx index 3bf086fc0ce9..89ee43d6d0bb 100644 --- a/website/pages/hi/developing/graph-ts/api.mdx +++ b/website/pages/hi/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| संस्करण | रिलीज नोट्स | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| संस्करण | रिलीज नोट्स | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### अंतर्निहित प्रकार @@ -559,7 +559,11 @@ The `log` API includes the following functions: The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. ```typescript -log.info ('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [value.toString (), OtherValue.toString (), 'पहले से ही एक स्ट्रिंग']) +log.info('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [ + value.toString(), + OtherValue.toString(), + 'पहले से ही एक स्ट्रिंग', +]) ``` #### एक या अधिक मान लॉग करना @@ -734,44 +738,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### प्रकार रूपांतरण संदर्भ -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() या s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() या s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() या s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() या s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### डेटा स्रोत मेटाडेटा diff --git a/website/pages/hi/developing/unit-testing-framework.mdx b/website/pages/hi/developing/unit-testing-framework.mdx index 099384d0267b..c84914d9ebd0 100644 --- a/website/pages/hi/developing/unit-testing-framework.mdx +++ b/website/pages/hi/developing/unit-testing-framework.mdx @@ -409,7 +409,7 @@ describe('handleUpdatedGravatars', () => { उदाहरण: -प्रत्येक परीक्षण के बाद ` afterEach ` के अंदर का कोड निष्पादित होगा। +प्रत्येक परीक्षण के बाद `afterEach` के अंदर का कोड निष्पादित होगा। ```typescript import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" @@ -448,7 +448,7 @@ describe("handleUpdatedGravatar", () => { }) ``` -उस वर्णन में प्रत्येक परीक्षण के बाद ` afterEach ` के अंदर का कोड निष्पादित होगा +उस वर्णन में प्रत्येक परीक्षण के बाद `afterEach` के अंदर का कोड निष्पादित होगा ```typescript import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). इसका अर्थ है कि आपने अपने कोड में `console.log` का उपयोग किया है, जो कि असेंबलीस्क्रिप्ट द्वारा समर्थित नहीं है। कृपया [लॉगिंग API](/Developing/assemblyscript-api/#logging-api) का उपयोग करने पर विचार करें > त्रुटि TS2554: अपेक्षित? तर्क, लेकिन मिला ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > त्रुटि TS2554: अपेक्षित? तर्क, लेकिन मिला ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) तर्कों में बेमेल `ग्राफ़-टीएस` और `मैचस्टिक-एज़` में बेमेल होने के कारण होता है। इस तरह की समस्याओं को ठीक करने का सबसे अच्छा तरीका है कि सभी चीज़ों को नवीनतम रिलीज़ किए गए संस्करण में अपडेट कर दिया जाए. diff --git a/website/pages/hi/network/benefits.mdx b/website/pages/hi/network/benefits.mdx index fe2a99679c50..b145895e7853 100644 --- a/website/pages/hi/network/benefits.mdx +++ b/website/pages/hi/network/benefits.mdx @@ -27,47 +27,47 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## कम मात्रा वाले उपयोगकर्ता (प्रति माह 30,000 से कम प्रश्न) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -|:------------------------------:|:---------------------------------------:|:----------------------------------------------------------------------:| -| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | -| पूछताछ लागत | $0+ | ~ $ 15 प्रति माह | -| इंजीनियरिंग का समय | $ 400 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000 (ऑटो स्केलिंग) | -| लागत प्रति क्वेरी | $0 | $0.0005 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| भौगोलिक अतिरेक | $750+ प्रति अतिरिक्त नोड | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $750+ | ~$15 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | +| पूछताछ लागत | $0+ | ~ $ 15 प्रति माह | +| इंजीनियरिंग का समय | $ 400 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000 (ऑटो स्केलिंग) | +| लागत प्रति क्वेरी | $0 | $0.0005 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| भौगोलिक अतिरेक | $750+ प्रति अतिरिक्त नोड | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $750+ | ~$15 | ## मध्यम मात्रा उपयोगकर्ता (3,000,000+ प्रश्न प्रति माह) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -|:------------------------------:|:------------------------------------------:|:----------------------------------------------------------------------:| -| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | -| पूछताछ लागत | $ 500 प्रति माह | $750 प्रति माह | -| इंजीनियरिंग का समय | $800 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 3,000,000+ | -| लागत प्रति क्वेरी | $0 | $0.00025 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| इंजीनियरिंग खर्च | $ 200 प्रति घंटा | शामिल | -| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $1,650+ | $750 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | +| पूछताछ लागत | $ 500 प्रति माह | $750 प्रति माह | +| इंजीनियरिंग का समय | $800 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 3,000,000+ | +| लागत प्रति क्वेरी | $0 | $0.00025 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| इंजीनियरिंग खर्च | $ 200 प्रति घंटा | शामिल | +| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $1,650+ | $750 | ## उच्च मात्रा उपयोगकर्ता (30,000,000+ प्रश्न प्रति माह) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -|:------------------------------:|:-------------------------------------------:|:----------------------------------------------------------------------:| -| मासिक सर्वर लागत\* | $1100 प्रति माह, प्रति नोड | $0 | -| पूछताछ लागत | $4000 | $4,500 per month | -| आवश्यक नोड्स की संख्या | 10 | Not applicable | -| इंजीनियरिंग का समय | $6,000 or more per month | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000,000+ | -| लागत प्रति क्वेरी | $0 | $0.00015 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $11,000+ | $4,500 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्वर लागत\* | $1100 प्रति माह, प्रति नोड | $0 | +| पूछताछ लागत | $4000 | $4,500 per month | +| आवश्यक नोड्स की संख्या | 10 | Not applicable | +| इंजीनियरिंग का समय | $6,000 or more per month | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000,000+ | +| लागत प्रति क्वेरी | $0 | $0.00015 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $11,000+ | $4,500 | \*बैकअप की लागत सहित: $50-$100 प्रति माह diff --git a/website/pages/hi/network/delegating.mdx b/website/pages/hi/network/delegating.mdx index 3ced69566ba6..b66e0e9e4ce2 100644 --- a/website/pages/hi/network/delegating.mdx +++ b/website/pages/hi/network/delegating.mdx @@ -33,8 +33,8 @@ title: Delegating एक बात पर भी विचार करना चाहिए कि एक इंडेक्सर को बुद्धिमानी से चुनना है। यदि आप एक ऐसे इंडेक्सर को चुनते हैं जो भरोसेमंद नहीं था, या अच्छा काम नहीं कर रहा था, तो आप अनाधिकृत करना चाहेंगे, जिसका अर्थ है कि आप पुरस्कार अर्जित करने के बहुत सारे अवसर खो देंगे, जो जीआरटी जलाने जितना ही बुरा हो सकता है।
    - ![डेलिगेशन अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलीगेशन UI में 0.5% शुल्क और साथ ही 28 दिन पर ध्यान दें - बंधन अवधि._ + ![डेलिगेशन अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलीगेशन UI में 0.5% शुल्क और साथ ही 28 दिन पर ध्यान दें बंधन + अवधि._
    ### डेलीगेटर्स के लिए उचित इनाम भुगतान के साथ एक भरोसेमंद इंडेक्सर चुनना @@ -44,8 +44,8 @@ title: Delegating इंडेक्सिंग रिवार्ड कट - इंडेक्सिंग रिवार्ड कट उन रिवॉर्ड्स का हिस्सा है जो इंडेक्सर अपने लिए रखेंगे। इसका मतलब है कि अगर इसे 100% पर सेट किया जाता है, तो डेलिगेटर के तौर पर आपको 0 इंडेक्सिंग रिवॉर्ड्स मिलेंगे। यदि आप यूआई में 80% देखते हैं, तो इसका मतलब है कि एक प्रतिनिधि के रूप में, आपको 20% प्राप्त होगा। एक महत्वपूर्ण नोट - नेटवर्क की शुरुआत में, इंडेक्सिंग रिवार्ड्स अधिकांश पुरस्कारों के लिए जिम्मेदार होंगे।
    - ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *शीर्ष इंडेक्सर डेलीगेटर्स को पुरस्कारों का 90% दे रहा है। - बीच वाला प्रतिनिधि को 20% दे रहा है। नीचे वाला डेलिगेटरों को ~83% दे रहा है।* + ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *शीर्ष इंडेक्सर डेलीगेटर्स को पुरस्कारों का 90% दे रहा है। बीच + वाला प्रतिनिधि को 20% दे रहा है। नीचे वाला डेलिगेटरों को ~83% दे रहा है।*
    - प्रश्न शुल्क कट - यह बिल्कुल इंडेक्सिंग रिवार्ड कट की तरह काम करता है। हालाँकि, यह विशेष रूप से इंडेक्सर द्वारा एकत्र की जाने वाली क्वेरी फीस पर रिटर्न के लिए है। यह ध्यान दिया जाना चाहिए कि नेटवर्क की शुरुआत में, इंडेक्सिंग रिवार्ड की तुलना में क्वेरी फीस से रिटर्न बहुत कम होगा। यह निर्धारित करने के लिए नेटवर्क पर ध्यान देने की सिफारिश की जाती है कि नेटवर्क में क्वेरी शुल्क कब अधिक महत्वपूर्ण होने लगेगा। diff --git a/website/pages/hi/network/indexing.mdx b/website/pages/hi/network/indexing.mdx index 399bca439431..4af09b4d7fd8 100644 --- a/website/pages/hi/network/indexing.mdx +++ b/website/pages/hi/network/indexing.mdx @@ -112,12 +112,12 @@ Once an allocation has been closed the rebates are available to be claimed by th - **माध्यम** - प्रोडक्शन इंडेक्सर प्रति सेकंड 100 सबग्राफ और 200-500 अनुरोधों का समर्थन करता है। - **बड़ा** - वर्तमान में उपयोग किए जाने वाले सभी सबग्राफ को अनुक्रमित करने और संबंधित ट्रैफ़िक के अनुरोधों को पूरा करने के लिए तैयार है। -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### एक इंडेक्सर को कौन सी बुनियादी सुरक्षा सावधानियां बरतनी चाहिए? @@ -149,20 +149,20 @@ Once an allocation has been closed the rebates are available to be claimed by th #### ग्राफ नोड -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | -------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | -------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -559,7 +559,7 @@ graph indexer status - `ग्राफ़ अनुक्रमणिका क्रियाएँ स्वीकृत निष्पादित करती हैं` - कार्यकर्ता को स्वीकृत क्रियाओं को तुरंत निष्पादित करने के लिए बाध्य करें -सभी आदेश जो आउटपुट में नियम प्रदर्शित करते हैं, समर्थित आउटपुट स्वरूपों (`तालिका`, `yaml`, और `json`) के बीच ` का उपयोग करके चुन सकते हैं - आउटपुट ` तर्क। +सभी आदेश जो आउटपुट में नियम प्रदर्शित करते हैं, समर्थित आउटपुट स्वरूपों (`तालिका`, `yaml`, और `json`) के बीच `का उपयोग करके चुन सकते हैं - आउटपुट` तर्क। #### Indexing rules @@ -623,7 +623,7 @@ graph indexer rules delete QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK - सभी कतारबद्ध क्रियाओं को देखने के लिए इंडेक्सर `indexer-cli` का उपयोग कर सकता है - इंडेक्सर (या अन्य सॉफ़्टवेयर) `इंडेक्सर-क्ली` का उपयोग करके कतार में क्रियाओं को स्वीकृत या रद्द कर सकता है। स्वीकृति और रद्द करने के आदेश इनपुट के रूप में क्रिया आईडी की एक सरणी लेते हैं। - निष्पादन कार्यकर्ता नियमित रूप से स्वीकृत कार्यों के लिए कतार का चुनाव करता है। यह कतार से `अनुमोदित` कार्यों को पकड़ लेगा, उन्हें निष्पादित करने का प्रयास करेगा, और निष्पादन की स्थिति के आधार पर डीबी में मूल्यों को `सफलता` या `विफल< पर अपडेट करेगा। /0>. -
  • If an action is successful the worker will ensure that there is an indexing rule present that tells the agent how to manage the allocation moving forward, useful when taking manual actions while the agent is in auto` or `oversight` mode. +
  • If an action is successful the worker will ensure that there is an indexing rule present that tells the agent how to manage the allocation moving forward, useful when taking manual actions while the agent is in auto` or `oversight` mode. - अनुक्रमणक क्रिया निष्पादन के इतिहास को देखने के लिए क्रिया कतार की निगरानी कर सकता है और यदि आवश्यक हो तो निष्पादन विफल होने पर क्रिया आइटम को पुन: अनुमोदित और अद्यतन कर सकता है। क्रिया कतार पंक्तिबद्ध और की गई सभी कार्रवाइयों का इतिहास प्रदान करती है। डेटा मॉडल: diff --git a/website/pages/hi/operating-graph-node.mdx b/website/pages/hi/operating-graph-node.mdx index 6dbe487e2a81..5d53c0fe05a7 100644 --- a/website/pages/hi/operating-graph-node.mdx +++ b/website/pages/hi/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ जब यह चल रहा होता है तो ग्राफ़ नोड निम्नलिखित पोर्ट को उजागर करता है: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | -------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **महत्वपूर्ण**: बंदरगाहों को सार्वजनिक रूप से उजागर करने के बारे में सावधान रहें - **प्रशासन बंदरगाहों** को बंद रखा जाना चाहिए। इसमें ग्राफ़ नोड JSON-RPC समापन बिंदु शामिल है। diff --git a/website/pages/hi/querying/graphql-api.mdx b/website/pages/hi/querying/graphql-api.mdx index 81d663ed1277..353a62ef15a7 100644 --- a/website/pages/hi/querying/graphql-api.mdx +++ b/website/pages/hi/querying/graphql-api.mdx @@ -93,7 +93,7 @@ When querying a collection, the `first` parameter can be used to paginate from t #### उदाहरण का उपयोग करना `पहले` और `छोड़ें` -क्वेरी 10 ` टोकन ` इकाइयां, संग्रह की शुरुआत से 10 स्थानों से ऑफसेट: +क्वेरी 10 `टोकन` इकाइयां, संग्रह की शुरुआत से 10 स्थानों से ऑफसेट: ```graphql { @@ -208,7 +208,7 @@ This can be useful if you are looking to fetch only entities which have changed, ``` > **सिंटैक्टिक शुगर:** आप `और` ऑपरेटर को कॉमा द्वारा अलग किए गए सब-एक्सप्रेशन को पास करके उपरोक्त क्वेरी को सरल बना सकते हैं। -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search query fields provide an expressive text search API that can be a पूर्ण पाठ खोज ऑपरेटर: -| प्रतीक | ऑपरेटर | विवरण | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | सभी प्रदान किए गए शब्दों को शामिल करने वाली संस्थाओं के लिए एक से अधिक खोज शब्दों को फ़िल्टर में संयोजित करने के लिए | -| | | `Or` | या ऑपरेटर द्वारा अलग किए गए एकाधिक खोज शब्दों वाली क्वेरी सभी संस्थाओं को प्रदान की गई शर्तों में से किसी से मेल के साथ वापस कर देगी | -| `<->` | `Follow by` | दो शब्दों के बीच की दूरी निर्दिष्ट करें। | -| `:*` | `Prefix` | उन शब्दों को खोजने के लिए उपसर्ग खोज शब्द का उपयोग करें जिनके उपसर्ग मेल खाते हैं (2 वर्ण आवश्यक हैं।) | +| प्रतीक | ऑपरेटर | विवरण | +| --- | --- | --- | +| `&` | `And` | सभी प्रदान किए गए शब्दों को शामिल करने वाली संस्थाओं के लिए एक से अधिक खोज शब्दों को फ़िल्टर में संयोजित करने के लिए | +| | | `Or` | या ऑपरेटर द्वारा अलग किए गए एकाधिक खोज शब्दों वाली क्वेरी सभी संस्थाओं को प्रदान की गई शर्तों में से किसी से मेल के साथ वापस कर देगी | +| `<->` | `Follow by` | दो शब्दों के बीच की दूरी निर्दिष्ट करें। | +| `:*` | `Prefix` | उन शब्दों को खोजने के लिए उपसर्ग खोज शब्द का उपयोग करें जिनके उपसर्ग मेल खाते हैं (2 वर्ण आवश्यक हैं।) | #### उदाहरण diff --git a/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx b/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx index a6d16d2d7def..2182133b8d48 100644 --- a/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + यदि आपके पास वेरिएबल शैडोइंग है, तो आपको अपने डुप्लिकेट वेरिएबल्स का नाम बदलने की आवश्यकता होगी। + ### Null Comparisons + अपने सबग्राफ पर अपग्रेड करने से, कभी-कभी आपको इस तरह की त्रुटियाँ मिल सकती हैं: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + हल करने के लिए आप केवल `if` कथन को कुछ इस तरह से बदल सकते हैं: ```typescript @@ -283,6 +287,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ``` + इस समस्या को ठीक करने के लिए, आप उस प्रॉपर्टी एक्सेस के लिए एक वेरिएबल बना सकते हैं ताकि कंपाइलर अशक्तता जांच जादू कर सके: ```typescript diff --git a/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx index af34304a72ee..91d5b46913fe 100644 --- a/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx @@ -135,7 +135,7 @@ Questo è l'aspetto del file di configurazione delle reti: Ora possiamo eseguire uno dei seguenti comandi: ```sh -# Utilizzo di un file predefinito networks.json +# Utilizzo di un file predefinito networks.json yarn build --network goerli # Utilizzo di un file con nome personalizzato @@ -162,7 +162,7 @@ Ora si è pronti per `yarn deploy`. **Nota:** Come già menzionato, da `graph-cli 0.32.0` è possibile eseguire direttamente `yarn deploy` con l'opzione `--network`: ```sh -# Utilizzo di un file predefinito networks.json +# Utilizzo di un file predefinito networks.json yarn deploy --network goerli # Utilizzo di un file con nome personalizzato diff --git a/website/pages/it/developing/creating-a-subgraph.mdx b/website/pages/it/developing/creating-a-subgraph.mdx index fb645f168931..f9e351698857 100644 --- a/website/pages/it/developing/creating-a-subgraph.mdx +++ b/website/pages/it/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Per alcuni tipi di entità, l'`id` è costruito a partire dagli id di altre due Nella nostra API GraphQL supportiamo i seguenti scalari: -| Tipo | Descrizione | -| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, rappresentato come una stringa esadecimale. Comunemente utilizzato per gli hash e gli indirizzi di Ethereum. | -| `String` | Scalare per valori `string`. I caratteri nulli non sono supportati e vengono rimossi automaticamente. | -| `Boolean` | Scalare per valori `boolean`. | -| `Int` | Le specifiche di GraphQL definiscono che `Int` ha una dimensione di 32 byte. | -| `Int8` | Un intero firmato a 8 byte, noto anche come intero firmato a 64 bit, può memorizzare valori nell'intervallo da -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. È preferibile utilizzare questo per rappresentare `i64` da ethereum. | -| `BigInt` | Numeri interi grandi. Utilizzati per i tipi `uint32`, `int64`, `uint64`, ..., `uint256` di Ethereum. Nota: Tutto ciò che è inferiore a `uint32` come `int32`, `uint24` oppure `int8` è rappresentato come `i32`. | -| `BigDecimal` | `BigDecimal` Decimali ad alta precisione rappresentati come un significante e un esponente. L'intervallo degli esponenti va da -6143 a +6144. Arrotondato a 34 cifre significative. | +| Tipo | Descrizione | +| --- | --- | +| `Bytes` | Byte array, rappresentato come una stringa esadecimale. Comunemente utilizzato per gli hash e gli indirizzi di Ethereum. | +| `String` | Scalare per valori `string`. I caratteri nulli non sono supportati e vengono rimossi automaticamente. | +| `Boolean` | Scalare per valori `boolean`. | +| `Int` | Le specifiche di GraphQL definiscono che `Int` ha una dimensione di 32 byte. | +| `Int8` | Un intero firmato a 8 byte, noto anche come intero firmato a 64 bit, può memorizzare valori nell'intervallo da -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. È preferibile utilizzare questo per rappresentare `i64` da ethereum. | +| `BigInt` | Numeri interi grandi. Utilizzati per i tipi `uint32`, `int64`, `uint64`, ..., `uint256` di Ethereum. Nota: Tutto ciò che è inferiore a `uint32` come `int32`, `uint24` oppure `int8` è rappresentato come `i32`. | +| `BigDecimal` | `BigDecimal` Decimali ad alta precisione rappresentati come un significante e un esponente. L'intervallo degli esponenti va da -6143 a +6144. Arrotondato a 34 cifre significative. | #### Enum @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Una nuova data source elaborerà solo le chiamate e gli eventi del blocco in cui è stata creata e di tutti i blocchi successivi, ma non elaborerà i dati storici, cioè quelli contenuti nei blocchi precedenti. -> +> > Se i blocchi precedenti contengono dati rilevanti per la nuova data source, è meglio indicizzare tali dati leggendo lo stato attuale del contratto e creando entità che rappresentino tale stato al momento della creazione della nuova data source. ### Contesto del Data Source @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** Il blocco di creazione del contratto può essere rapidamente consultato su Etherscan: -> +> > 1. Cercare il contratto inserendo l'indirizzo nella barra di ricerca. > 2. Fare clic sull'hash della transazione di creazione nella sezione `Contract Creator`. > 3. Caricare la pagina dei dettagli della transazione, dove si trova il blocco iniziale per quel contratto. diff --git a/website/pages/it/developing/graph-ts/api.mdx b/website/pages/it/developing/graph-ts/api.mdx index a8fc15bea20c..c685cbab4370 100644 --- a/website/pages/it/developing/graph-ts/api.mdx +++ b/website/pages/it/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ La libreria `@graphprotocol/graph-ts` fornisce le seguenti API: La `apiVersion` nel manifest del subgraph specifica la versione dell'API di mappatura che viene eseguita da the Graph Node per un dato subgraph. -| Versione | Note di rilascio | -| :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Aggiunte le classi `TransactionReceipt` e `Log` ai tipi di Ethereum
    Aggiunto il campo `receipt` all'oggetto Ethereum Event | -| 0.0.6 | Aggiunto il campo `nonce` all'oggetto Ethereum Transaction
    Aggiunto `baseFeePerGas` all'oggetto Ethereum Block | -| 0.0.5 | AssemblyScript aggiornato alla versione 0.19.10 (questo include modifiche di rottura, consultare la [`Guida alla migrazione`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` rinominato in `ethereum.transaction.gasLimit` | -| 0.0.4 | Aggiunto il campo `functionSignature` all'oggetto Ethereum SmartContractCall | -| 0.0.3 | Aggiunto il campo `from` all'oggetto Ethereum Call
    `etherem.call.address` rinominato in `ethereum.call.to` | -| 0.0.2 | Aggiunto il campo `input` all'oggetto Ethereum Transaction | +| Versione | Note di rilascio | +| :-: | --- | +| 0.0.7 | Aggiunte le classi `TransactionReceipt` e `Log` ai tipi di Ethereum
    Aggiunto il campo `receipt` all'oggetto Ethereum Event | +| 0.0.6 | Aggiunto il campo `nonce` all'oggetto Ethereum Transaction
    Aggiunto `baseFeePerGas` all'oggetto Ethereum Block | +| 0.0.5 | AssemblyScript aggiornato alla versione 0.19.10 (questo include modifiche di rottura, consultare la [`Guida alla migrazione`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` rinominato in `ethereum.transaction.gasLimit` | +| 0.0.4 | Aggiunto il campo `functionSignature` all'oggetto Ethereum SmartContractCall | +| 0.0.3 | Aggiunto il campo `from` all'oggetto Ethereum Call
    `etherem.call.address` rinominato in `ethereum.call.to` | +| 0.0.2 | Aggiunto il campo `input` all'oggetto Ethereum Transaction | ### Tipi integrati @@ -734,44 +734,44 @@ Quando il tipo di un valore è certo, può essere convertito in un [tipo incorpo ### Riferimento alle conversioni di tipo -| Fonte(i) | Destinazione | Funzione di conversione | -| --------------------------------------- | --------------------------------------- | ----------------------------------------------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() o s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() o s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Fonte(i) | Destinazione | Funzione di conversione | +| -------------------- | -------------------- | --------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() o s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() o s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadati della Data Source diff --git a/website/pages/it/developing/unit-testing-framework.mdx b/website/pages/it/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/it/developing/unit-testing-framework.mdx +++ b/website/pages/it/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/it/network/benefits.mdx b/website/pages/it/network/benefits.mdx index 74d915452816..482b5fbbcd0d 100644 --- a/website/pages/it/network/benefits.mdx +++ b/website/pages/it/network/benefits.mdx @@ -27,53 +27,54 @@ I costi di query possono variare; il costo indicato è quello medio al momento d ## Utente di basso volume (meno di 30.000 query al mese) -| Confronto costi | Self Hosted | The Graph Network | -|:----------------------------------:|:---------------------------------------:|:-----------------------------------------------------------------------------:| -| Costo mensile del server\* | $350 al mese | $0 | -| Costi di query | $0+ | ~$15 al mese | -| Tempo di progettazione | $400 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità di infra | 30,000 (autoscaling) | -| Costo per query | $0 | $0.0005 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Ridondanza geografica | $750+ per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $750+ | ~$15 | +| Confronto costi | Self Hosted | The Graph Network | +| :-: | :-: | :-: | +| Costo mensile del server\* | $350 al mese | $0 | +| Costi di query | $0+ | ~$15 al mese | +| Tempo di progettazione | $400 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità di infra | 30,000 (autoscaling) | +| Costo per query | $0 | $0.0005 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Ridondanza geografica | $750+ per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $750+ | ~$15 | ## Utente di medio volume (3,000,000+ di query al mese) -| Confronto dei costi | Self Hosted | The Graph Network | -|:----------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------------------:| -| Costo mensile del server\* | $350 al mese | $0 | -| Costi di query | $500 al mese | $750 al mese | -| Tempo di progettazione | $800 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità dell'infrastruttura | 3,000,000+ | -| Costo per query | $0 | $0.00025 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Costi di ingegneria | $200 all'ora | Incluso | -| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $1,650+ | $750 | +| Confronto dei costi | Self Hosted | The Graph Network | +| :-: | :-: | :-: | +| Costo mensile del server\* | $350 al mese | $0 | +| Costi di query | $500 al mese | $750 al mese | +| Tempo di progettazione | $800 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità dell'infrastruttura | 3,000,000+ | +| Costo per query | $0 | $0.00025 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Costi di ingegneria | $200 all'ora | Incluso | +| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $1,650+ | $750 | ## Utente di alto volume (3,000,000+ di query al mese) -| Confronto costi | Self Hosted | The Graph Network | -|:----------------------------------:|:-------------------------------------------:|:-----------------------------------------------------------------------------:| -| Costo mensile del server\* | $1100 al mese, per nodo | $0 | -| Costi di query | $4000 | $4,500 al mese | -| Numero di nodi necessari | 10 | Non applicabile | -| Tempo di progettazione | $6.000 o più al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità di infra | 30,000,000+ | -| Costo per query | $0 | $0.00015 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $11,000+ | $4,500 | +| Confronto costi | Self Hosted | The Graph Network | +| :-: | :-: | :-: | +| Costo mensile del server\* | $1100 al mese, per nodo | $0 | +| Costi di query | $4000 | $4,500 al mese | +| Numero di nodi necessari | 10 | Non applicabile | +| Tempo di progettazione | $6.000 o più al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità di infra | 30,000,000+ | +| Costo per query | $0 | $0.00015 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $11,000+ | $4,500 | \*inclusi i costi per il backup: $50-$100 al mese Tempo di progettazione basato su un'ipotesi di $200 all'ora - utilizzando la funzione di budget massimo della query nella scheda di fatturazione del budget, mantenendo un'alta qualità del servizio + utilizzando la funzione di budget massimo della query nella scheda di fatturazione del budget, mantenendo un'alta +qualità del servizio I costi previsti sono solo per i subgraph di Ethereum Mainnet - i costi sono ancora più alti quando si ospita un `graph-node` su altre reti. diff --git a/website/pages/it/network/delegating.mdx b/website/pages/it/network/delegating.mdx index 8f07f0b33986..344420fccebd 100644 --- a/website/pages/it/network/delegating.mdx +++ b/website/pages/it/network/delegating.mdx @@ -33,8 +33,8 @@ Ogni volta che un Delegator vuole riottenere i suoi token, questi sono soggetti Una cosa da considerare è anche la scelta oculata di un Indexer. Se scegliete un Indexer che non è affidabile o che non sta facendo un buon lavoro, vorrete annullare la delega, il che significa che perderete molte opportunità di guadagnare ricompense, il che può essere altrettanto negativo che bruciare GRT.
    - ![Sblocco di Delegator](/img/Delegation-Unbonding.png) _Nota la commissione del 0,5% nel UI della delegazione, così come il periodo di sblocco di 28 giorni. - periodo di sblocco._ + ![Sblocco di Delegator](/img/Delegation-Unbonding.png) _Nota la commissione del 0,5% nel UI della delegazione, così + come il periodo di sblocco di 28 giorni. periodo di sblocco._
    ### Scegliere un Indexer affidabile con una giusta ricompensa per i Delegator @@ -44,8 +44,8 @@ Questa è una parte importante da capire. Per prima cosa discutiamo di tre valor Taglio della ricompensa di indicizzazione - Il taglio della ricompensa di indicizzazione è la parte delle ricompense che l'Indexer terrà per sé. Ciò significa che se è impostato al 100%, come delegator riceverete 0 ricompense di indicizzazione. Se nel UI vedete 80%, significa che come Delegator riceverete il 20%. Una nota importante: all'inizio della rete, le ricompense di indicizzazione rappresentano la maggior parte delle ricompense.
    - ![Taglio delle ricompense dell'indicizzazione](/img/Indexing-Reward-Cut.png) *Il top Indexer sta dando ai Delegator il 90% delle ricompense. Il - centrale dà ai Delegator il 20%. Quello in basso dà ai Delegator ~83%.* + ![Taglio delle ricompense dell'indicizzazione](/img/Indexing-Reward-Cut.png) *Il top Indexer sta dando ai Delegator il + 90% delle ricompense. Il centrale dà ai Delegator il 20%. Quello in basso dà ai Delegator ~83%.*
    - Taglio delle tariffe di query - Funziona esattamente come il Taglio della ricompensa di indicizzazione. Tuttavia, riguarda specificamente i rendimenti delle tariffe di query raccolte dal Indexer. Va notato che all'inizio della rete, i rendimenti delle tariffe di query saranno molto ridotti rispetto alla ricompensa di indicizzazione. Si raccomanda di prestare attenzione alla rete per determinare quando le tariffe di query nella rete inizieranno a essere più significative. diff --git a/website/pages/it/network/indexing.mdx b/website/pages/it/network/indexing.mdx index 514e7ea925cb..33a42fc96831 100644 --- a/website/pages/it/network/indexing.mdx +++ b/website/pages/it/network/indexing.mdx @@ -112,12 +112,12 @@ Gli Indexer possono differenziarsi applicando tecniche avanzate per prendere dec - **Medio** - Indexer di produzione che supporta 100 subgraph e 200-500 richieste al secondo. - **Grande** - È pronto a indicizzare tutti i subgraph attualmente utilizzati e a servire le richieste per il relativo traffico. -| Setup | Postgres
    (CPUs) | Postgres
    (memoria in GBs) | Postgres
    (disco in TBs) | VMs
    (CPUs) | VMs
    (memoria in GBs) | -| -------- |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| -| Piccolo | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memoria in GBs) | Postgres
    (disco in TBs) | VMs
    (CPUs) | VMs
    (memoria in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Piccolo | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3.5 | 48 | 184 | ### Quali sono le precauzioni di base per la sicurezza che un Indexer dovrebbe adottare? @@ -149,20 +149,20 @@ Nota: Per supportare una scalabilità agile, si consiglia di separare le attivit #### Graph Node -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| ----- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | #### Servizio Indexer -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| ----- | --------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (per le query di subgraph a pagamento) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (per le query di subgraph a pagamento) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Metriche di Prometheus | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/it/operating-graph-node.mdx b/website/pages/it/operating-graph-node.mdx index de919de98b04..e81d14915e40 100644 --- a/website/pages/it/operating-graph-node.mdx +++ b/website/pages/it/operating-graph-node.mdx @@ -77,13 +77,13 @@ Un esempio completo di configurazione Kubernetes si trova nel [repository indexe Quando è in funzione, Graph Node espone le seguenti porte: -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| ----- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | > **Importante**: fare attenzione a esporre le porte pubblicamente - le porte di **amministrazione** devono essere tenute sotto chiave. Questo include l'endpoint JSON-RPC del Graph Node. diff --git a/website/pages/it/querying/graphql-api.mdx b/website/pages/it/querying/graphql-api.mdx index 2a1b9a54eef7..d3dd3c57a549 100644 --- a/website/pages/it/querying/graphql-api.mdx +++ b/website/pages/it/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Nell'esempio seguente, si filtrano le sfide con `outcome` `succeeded` e `number` ``` > **Syntactic sugar:** Si può semplificare la query precedente eliminando l'operatore `and` passando una sottoespressione separata da virgole. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Le query di ricerca fulltext hanno un campo obbligatorio, `text`, per fornire i Operatori di ricerca fulltext: -| Simbolo | Operatore | Descrizione | -| ----------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Per combinare più termini di ricerca in un filtro per le entità che includono tutti i termini forniti | -| | | `Or` | Le query con più termini di ricerca separati dall'operatore Or restituiranno tutte le entità con una corrispondenza tra i termini forniti | -| `<->` | `Follow by` | Specifica la distanza tra due parole. | -| `:*` | `Prefisso` | Utilizzare il termine di ricerca del prefisso per trovare le parole il cui prefisso corrisponde (sono richiesti 2 caratteri.) | +| Simbolo | Operatore | Descrizione | +| --- | --- | --- | +| `&` | `And` | Per combinare più termini di ricerca in un filtro per le entità che includono tutti i termini forniti | +| | | `Or` | Le query con più termini di ricerca separati dall'operatore Or restituiranno tutte le entità con una corrispondenza tra i termini forniti | +| `<->` | `Follow by` | Specifica la distanza tra due parole. | +| `:*` | `Prefisso` | Utilizzare il termine di ricerca del prefisso per trovare le parole il cui prefisso corrisponde (sono richiesti 2 caratteri.) | #### Esempi diff --git a/website/pages/it/release-notes/assemblyscript-migration-guide.mdx b/website/pages/it/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/it/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/it/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/ja/cookbook/subgraph-debug-forking.mdx b/website/pages/ja/cookbook/subgraph-debug-forking.mdx index c186dbdf805c..134e7b12cc1a 100644 --- a/website/pages/ja/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ja/cookbook/subgraph-debug-forking.mdx @@ -6,15 +6,15 @@ title: フォークを用いた迅速かつ容易なサブグラフのデバッ ## さて、それは何でしょうか? -**サブグラフのフォーク**とは、_他_のサブグラフのストア(通常はリモート) からエンティティをフェッチするプロセスです。 +**サブグラフのフォーク**とは、*他*のサブグラフのストア(通常はリモート) からエンティティをフェッチするプロセスです。 -デバッグの文脈では、**サブグラフのフォーク**により、ブロック_X_への同期を待つことなく、ブロック_X_で失敗したサブグラフのデバッグを行うことができます。 +デバッグの文脈では、**サブグラフのフォーク**により、ブロック*X*への同期を待つことなく、ブロック*X*で失敗したサブグラフのデバッグを行うことができます。 ## その方法は? -インデックス作成のためにリモートのGraphノードにサブグラフをデプロイし、ブロック_X_で失敗した場合でも、ブロック_X_と同期しているストアを使用して GraphQL クエリを提供することができます。つまり、ブロック _X_ のインデックス作成時に発生するバグを修正するために、この最新のストアを利用できるのです。 +インデックス作成のためにリモートのGraphノードにサブグラフをデプロイし、ブロック*X*で失敗した場合でも、ブロック*X*と同期しているストアを使用して GraphQL クエリを提供することができます。つまり、ブロック _X_ のインデックス作成時に発生するバグを修正するために、この最新のストアを利用できるのです。 -簡単に言うと、ブロック_X_でデバッグされているローカルにデプロイされたサブグラフにインデックス状態の最新のビューを提供するために、ブロック_X_までインデックスされたサブグラフを持つことが保証されているリモートGraphノードから _失敗したサブグラフをフォーク_しようとしているのです。 +簡単に言うと、ブロック*X*でデバッグされているローカルにデプロイされたサブグラフにインデックス状態の最新のビューを提供するために、ブロック*X*までインデックスされたサブグラフを持つことが保証されているリモートGraphノードから *失敗したサブグラフをフォーク*しようとしているのです。 ## コードを見てみましょう @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -この場合、残念なことに、この完璧に見えるサブグラフを[HostedService](https://thegraph.com/hosted-service/) にデプロイすると、_"Gravatar not found!"_というエラーで失敗してしまいます。 +この場合、残念なことに、この完璧に見えるサブグラフを[HostedService](https://thegraph.com/hosted-service/) にデプロイすると、*"Gravatar not found!"*というエラーで失敗してしまいます。 通常の試すであろう修正方法: @@ -69,7 +69,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { 回答: -1. `fork-base`は「ベース」URLで、_subgraph id_が追加されたときのURL (`/`) はサブグラフのストアに対する有効な GraphQL endpoint であることを示します。 +1. `fork-base`は「ベース」URLで、*subgraph id*が追加されたときのURL (`/`) はサブグラフのストアに対する有効な GraphQL endpoint であることを示します。 2. フォーキングは簡単であり煩雑な手間はありません ```bash diff --git a/website/pages/ja/developing/creating-a-subgraph.mdx b/website/pages/ja/developing/creating-a-subgraph.mdx index 60c6a37bde89..e21a11c9829c 100644 --- a/website/pages/ja/developing/creating-a-subgraph.mdx +++ b/website/pages/ja/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Null 以外のフィールド 'name' の null 値が解決されました GraphQL API では、以下の Scalar をサポートしています: -| タイプ | 説明書き | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte 配列で、16 進数の文字列で表されます。Ethereum のハッシュやアドレスによく使われます。 | -| `String` | `string`値の Scalar であり、Null 文字はサポートされておらず、自動的に削除されます。 | -| `Boolean` | `boolean`値を表す Scalar。 | -| `Int` | Int GraphQL の仕様では、`Int`のサイズは 32 バイトと定義されています。 | -| `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` | 大きな整数。Ethereum の`uint32`, `int64`, `uint64`, ..., `uint256` タイプに使用されます。注: `int32`, `uint24` `int8`など`uint32`以下のものは`i32`として表現されます。 | -| `BigDecimal` | `BigDecimal`は、高精度の 10 進数を記号と指数で表します。指数の範囲は -6143 ~ +6144 です。有効数字 34 桁にまとめられます。 | +| タイプ | 説明書き | +| --- | --- | +| `Bytes` | Byte 配列で、16 進数の文字列で表されます。Ethereum のハッシュやアドレスによく使われます。 | +| `String` | `string`値の Scalar であり、Null 文字はサポートされておらず、自動的に削除されます。 | +| `Boolean` | `boolean`値を表す Scalar。 | +| `Int` | Int GraphQL の仕様では、`Int`のサイズは 32 バイトと定義されています。 | +| `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` | 大きな整数。Ethereum の`uint32`, `int64`, `uint64`, ..., `uint256` タイプに使用されます。注: `int32`, `uint24` `int8`など`uint32`以下のものは`i32`として表現されます。 | +| `BigDecimal` | `BigDecimal`は、高精度の 10 進数を記号と指数で表します。指数の範囲は -6143 ~ +6144 です。有効数字 34 桁にまとめられます。 | #### Enums @@ -458,33 +458,33 @@ query { サポートされている言語の辞書: -| コード | 辞書 | -| ------ | --------- | -| simple | General | -| da | Danish | -| nl | Dutch | -| en | English | -| fi | Finnish | -| fr | French | -| de | German | -| hu | Hungarian | -| it | Italian | -| no | Norwegian | -| pt | ポルトガル語 | -| ro | Romanian | -| ru | Russian | -| es | Spanish | -| sv | Swedish | -| tr | Turkish | +| コード | 辞書 | +| ------ | ------------ | +| simple | General | +| da | Danish | +| nl | Dutch | +| en | English | +| fi | Finnish | +| fr | French | +| de | German | +| hu | Hungarian | +| it | Italian | +| no | Norwegian | +| pt | ポルトガル語 | +| ro | Romanian | +| ru | Russian | +| es | Spanish | +| sv | Swedish | +| tr | Turkish | ### ランキングアルゴリズム サポートされている結果の順序付けのアルゴリズム: -| アルゴリズム | 説明書き | -| ------------- | ---------------------------------------- | -| rank | フルテキストクエリのマッチ品質 (0-1) を使用して結果を並べ替えます。 | -| proximityRank | ProximityRank rank に似ていますが、マッチの近接性も含みます。 | +| アルゴリズム | 説明書き | +| ------------- | ------------------------------------------------------------------- | +| rank | フルテキストクエリのマッチ品質 (0-1) を使用して結果を並べ替えます。 | +| proximityRank | ProximityRank rank に似ていますが、マッチの近接性も含みます。 | ## マッピングの記述 @@ -580,7 +580,7 @@ import { Gravatar } from '../generated/schema' EVM 互換のスマート コントラクトの一般的なパターンは、レジストリ コントラクトまたはファクトリ コントラクトの使用です。1 つのコントラクトが、それぞれ独自の状態とイベントを持つ任意の数の他のコントラクトを作成、管理、または参照します。 -これらのサブコントラクトのアドレスは、事前にわかっている場合とわかっていない場合があり、これらのコントラクトの多くは、時間の経過とともに作成および/または追加される可能性があります。このような場合、単一のデータ ソースまたは固定数のデータ ソースを定義することは不可能であり、より動的なアプローチ、つまり _データ ソース テンプレート_が必要とされるのはこのためです。 +これらのサブコントラクトのアドレスは、事前にわかっている場合とわかっていない場合があり、これらのコントラクトの多くは、時間の経過とともに作成および/または追加される可能性があります。このような場合、単一のデータ ソースまたは固定数のデータ ソースを定義することは不可能であり、より動的なアプローチ、つまり *データ ソース テンプレート*が必要とされるのはこのためです。 ### メインコントラクトのデータソース @@ -660,7 +660,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **注:** 新しいデータ ソースは、それが作成されたブロックとそれに続くすべてのブロックの呼び出しとイベントのみを処理しますが、履歴データ (データなど) は処理しません。それは前のブロックに含まれています。 -> +> > 以前のブロックに新しいデータソースに関連するデータが含まれている場合は、コントラクトの現在の状態を読み取り、新しいデータソースが作成された時点でその状態を表すエンティティを作成することで、そのデータにインデックスを付けることが最善です。 ### データソースコンテクスト @@ -717,7 +717,7 @@ dataSources: ``` > **注:** コントラクト作成ブロックは、Etherscan ですばやく検索できます。 -> +> > 1. 検索バーにアドレスを入力してコントラクトを検索します。 > 2. `Contract Creator` セクションの作成トランザクションハッシュをクリックします。 > 3. トランザクションの詳細ページを読み込んで、そのコントラクトの開始ブロックを見つけます。 @@ -907,9 +907,9 @@ eventHandlers: `specVersion` `0.0.4`以降、サブグラフ機能はマニフェストファイルのトップレベルにある`features`セクションで、以下の表のように`camelCase` の名前を使って明示的に宣言する必要があります: -| 特徴 | 名前 | +| 特徴 | 名前 | | --------------------------------------------------------- | --------------------------------------------------- | -| [致命的でないエラー](#non-fatal-errors) | `nonFatalErrors` | +| [致命的でないエラー](#non-fatal-errors) | `nonFatalErrors` | | [Full-text Search](#defining-fulltext-search-fields) | `fullTextSearch` | | [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | | [IPFS on Ethereum Contracts](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | diff --git a/website/pages/ja/developing/graph-ts/api.mdx b/website/pages/ja/developing/graph-ts/api.mdx index e904e9bc7013..4a702fedf0d4 100644 --- a/website/pages/ja/developing/graph-ts/api.mdx +++ b/website/pages/ja/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ title: AssemblyScript API サブグラフマニフェストapiVersionは、特定のサブグラフのマッピングAPIバージョンを指定します。このバージョンは、Graph Nodeによって実行されます。 -| バージョン | リリースノート | -| :---: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Ethereum タイプに `TransactionReceipt` と `Log` クラスを追加
    Ethereum Event オブジェクトに `receipt` フィールドを追加。 | -| 0.0.6 | Ethereum Transactionオブジェクトに`nonce`フィールドを追加
    Ethereum Blockオブジェクトに`baseFeePerGas`を追加。 | +| バージョン | リリースノート | +| :-: | --- | +| 0.0.7 | Ethereum タイプに `TransactionReceipt` と `Log` クラスを追加
    Ethereum Event オブジェクトに `receipt` フィールドを追加。 | +| 0.0.6 | Ethereum Transactionオブジェクトに`nonce`フィールドを追加
    Ethereum Blockオブジェクトに`baseFeePerGas`を追加。 | | 0.0.5 | AssemblyScriptはバージョン0.19.10にアップグレードされました(このバージョンアップには変更点が含まれていますので Migration Guide) をご覧ください)。
    ethereum.transaction.gasUsedの名前がethereum.transaction.gasLimitに変更 | -| 0.0.4 | Ethereum SmartContractCall オブジェクトにfunctionSignatureフィールドを追加 | -| 0.0.3 | イーサリアムコールオブジェクトに`from`フィールドを追加
    `etherem.call.address`を`ethereum.call.to`に変更。 | -| 0.0.2 | Ethereum Transaction オブジェクトに inputフィールドを追加 | +| 0.0.4 | Ethereum SmartContractCall オブジェクトにfunctionSignatureフィールドを追加 | +| 0.0.3 | イーサリアムコールオブジェクトに`from`フィールドを追加
    `etherem.call.address`を`ethereum.call.to`に変更。 | +| 0.0.2 | Ethereum Transaction オブジェクトに inputフィールドを追加 | ### 組み込み型 @@ -277,7 +277,7 @@ graph-node v0.31.0、@graphprotocol/graph-ts v0.30.0、および @graphprotocol/ ストア API を使用すると、現在のブロックで作成または更新されたエンティティの取得が容易になります。この一般的な状況は、あるハンドラーがオンチェーン イベントからトランザクションを作成し、後のハンドラーがこのトランザクションが存在する場合にアクセスしようとすることです。トランザクションが存在しない場合、サブグラフはエンティティが存在しないことを確認するためだけにデータベースにアクセスする必要があります。エンティティが同じブロック内に作成されている必要があることをサブグラフの作成者がすでに知っている場合は、loadInBlock を使用すると、このデータベースのラウンドトリップが回避されます。一部のサブグラフでは、これらのルックアップの欠落がインデックス作成時間に大きく影響する可能性があります。 ```typescript -let id =event.transaction.hash // または ID が構築される方法 +let id = event.transaction.hash // または ID が構築される方法 let transfer = Transfer.loadInBlock(id) if (transfer == null) { transfer = 新しい転送(id) @@ -734,44 +734,44 @@ if (value.kind == JSONValueKind.BOOL) { ### タイプ 変換参照 -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | Bigint.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromString(s) | -| String | BigInt | BigDecimal.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | Bigint.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromString(s) | +| String | BigInt | BigDecimal.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### データソースのメタデータ diff --git a/website/pages/ja/developing/unit-testing-framework.mdx b/website/pages/ja/developing/unit-testing-framework.mdx index 9d74495ab2bd..49601a107de7 100644 --- a/website/pages/ja/developing/unit-testing-framework.mdx +++ b/website/pages/ja/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). これは、コード内で`console.log`を使用していることを意味し、AssemblyScriptではサポートされていません。[Logging API](/developing/assemblyscript-api/#logging-api) の利用をご検討ください。 > ERROR TS2554: 期待された引数は? -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: 期待された引数は? -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) 引数の不一致は、`graph-ts`と`matchstick-as`の不一致によって起こります。このような問題を解決する最善の方法は、すべてを最新のリリース版にアップデートすることです。 diff --git a/website/pages/ja/glossary.mdx b/website/pages/ja/glossary.mdx index abee880b8eb3..167d4ed1fdcf 100644 --- a/website/pages/ja/glossary.mdx +++ b/website/pages/ja/glossary.mdx @@ -78,8 +78,8 @@ title: 用語集 - **L2転送ツール**:ネットワーク参加者がイーサリアムメインネットからArbitrum Oneにネットワーク関連資産を転送できるようにするスマートコントラクトとUIです。ネットワーク参加者は、委任されたGRT、サブグラフ、キュレーションシェア、およびインデクサーのセルフステークを転送できます。 -- サブグラフを Graph Network に**_アップグレード_する**: サブグラフをホストされたサービスから Graph Network に移動するプロセス。 +- サブグラフを Graph Network に***アップグレード*する**: サブグラフをホストされたサービスから Graph Network に移動するプロセス。 -- サブグラフ**の_更新_**: サブグラフのマニフェスト、スキーマ、または更新を含む新しいサブグラフ バージョンをリリースするプロセス。マッピング。 +- サブグラフ**の*更新***: サブグラフのマニフェスト、スキーマ、または更新を含む新しいサブグラフ バージョンをリリースするプロセス。マッピング。 - **移行**:サブグラフの古いバージョンから新しいバージョンに移行するキュレーション共有のプロセスです(例えば、v0.0.1がv0.0.2に更新される場合)。 diff --git a/website/pages/ja/network/benefits.mdx b/website/pages/ja/network/benefits.mdx index 93018679bfd6..be92fd79639e 100644 --- a/website/pages/ja/network/benefits.mdx +++ b/website/pages/ja/network/benefits.mdx @@ -27,47 +27,47 @@ Graph の分散型ネットワークは、堅牢なインデックス作成と ## ローボリュームユーザー(月間30,000クエリ以下) -| コスト比較 | セルフホスト | グラフネットワーク | -|:-----------------------:|:---------------------------------------:|:-----------------------------------:| -| 月額サーバー代 | $350/月 | $0 | -| クエリコスト | $0+ | ~$15/月 | -| エンジニアリングタイム | $400/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 30,000(オートスケーリング) | -| クエリごとのコスト | $0 | $0.0005 | -| インフラストラクチャ | 集中管理型 | 分散型 | -| 地理的な冗長性 | 追加1ノードにつき$750+ | 含まれる | -| アップタイム | バリエーション | 99.9%+ | -| 月額費用合計 | $750+ | ~$15 | +| コスト比較 | セルフホスト | グラフネットワーク | +| :-: | :-: | :-: | +| 月額サーバー代 | $350/月 | $0 | +| クエリコスト | $0+ | ~$15/月 | +| エンジニアリングタイム | $400/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 30,000(オートスケーリング) | +| クエリごとのコスト | $0 | $0.0005 | +| インフラストラクチャ | 集中管理型 | 分散型 | +| 地理的な冗長性 | 追加1ノードにつき$750+ | 含まれる | +| アップタイム | バリエーション | 99.9%+ | +| 月額費用合計 | $750+ | ~$15 | ## ミディアムボリュームユーザー(月間3,000,000クエリ以上) -| コスト比較 | セルフホスト | グラフネットワーク | -|:-----------------------:|:------------------------------------------:|:-----------------------------------:| -| 月額サーバー代 | $350/月 | $0 | -| クエリコスト | $500/月 | $750/月 | -| エンジニアリングタイム | $800/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 3,000,000+ | -| クエリごとのコスト | $0 | $0.00025 | -| インフラストラクチャ | 中央管理型 | 分散型 | -| エンジニアリングコスト | $200/時 | 含まれる | -| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | -| アップタイム | 変動 | 99.9%+ | -| 月額費用合計 | $1,650+ | $750 | +| コスト比較 | セルフホスト | グラフネットワーク | +| :-: | :-: | :-: | +| 月額サーバー代 | $350/月 | $0 | +| クエリコスト | $500/月 | $750/月 | +| エンジニアリングタイム | $800/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 3,000,000+ | +| クエリごとのコスト | $0 | $0.00025 | +| インフラストラクチャ | 中央管理型 | 分散型 | +| エンジニアリングコスト | $200/時 | 含まれる | +| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | +| アップタイム | 変動 | 99.9%+ | +| 月額費用合計 | $1,650+ | $750 | ## ハイボリュームユーザー(月間30,000,000クエリ以上) -| コスト比較 | セルフホスト | グラフネットワーク | -|:-----------------------:|:-------------------------------------------:|:-----------------------------------:| -| 月額サーバー代 | $1100/月(ノードごと) | $0 | -| クエリコスト | $4000 | $4,500/月 | -| 必要ノード数 | 10 | 該当なし | -| エンジニアリングタイム | $6,000/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 30,000,000+ | -| クエリごとのコスト | $0 | $0.00015 | -| インフラストラクチャ | 集中管理型 | 分散型 | -| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | -| アップタイム | 変動 | 99.9%+ | -| 月額費用合計 | $11,000+ | $4,500 | +| コスト比較 | セルフホスト | グラフネットワーク | +| :-: | :-: | :-: | +| 月額サーバー代 | $1100/月(ノードごと) | $0 | +| クエリコスト | $4000 | $4,500/月 | +| 必要ノード数 | 10 | 該当なし | +| エンジニアリングタイム | $6,000/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 30,000,000+ | +| クエリごとのコスト | $0 | $0.00015 | +| インフラストラクチャ | 集中管理型 | 分散型 | +| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | +| アップタイム | 変動 | 99.9%+ | +| 月額費用合計 | $11,000+ | $4,500 | \*バックアップ費用含む:月額$50〜$100 diff --git a/website/pages/ja/network/indexing.mdx b/website/pages/ja/network/indexing.mdx index 6e7daf5e2b76..1f65adb35093 100644 --- a/website/pages/ja/network/indexing.mdx +++ b/website/pages/ja/network/indexing.mdx @@ -112,12 +112,12 @@ Use Etherscan to call `getRewards()`: - **Medium** - 100 個のサブグラフと 1 秒あたり 200 ~ 500 のリクエストをサポートするプロダクションインデクサー - **Large** - 現在使用されているすべてのサブグラフのインデックスを作成し、関連するトラフィックのリクエストに対応します -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### インデクサーが取るべきセキュリティ対策は? @@ -149,20 +149,20 @@ Use Etherscan to call `getRewards()`: #### グラフノード -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ------------------------------------------------------- | ------------------------------------------------------ | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ------------------------------------------------------------ | --------------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -730,10 +730,10 @@ default => 0.1 * $SYSTEM_LOAD; 上記のモデルを使用したクエリのコスト計算の例: -| クエリ | 価格 | +| クエリ | 価格 | | ---------------------------------------------------------------------------- | ------- | | { pairs(skip: 5000) { id } } | 0.5 GRT | -| { トークン { シンボル } } | 0.1 GRT | +| { トークン { シンボル } } | 0.1 GRT | | { pairs(skip: 5000) { id { tokens } symbol } } | 0.6 GRT | #### コストモデルの適用 diff --git a/website/pages/ja/operating-graph-node.mdx b/website/pages/ja/operating-graph-node.mdx index cec1b7f2f4fa..7b6aef1d16ba 100644 --- a/website/pages/ja/operating-graph-node.mdx +++ b/website/pages/ja/operating-graph-node.mdx @@ -26,7 +26,7 @@ title: オペレーティンググラフノード ### IPFSノード -IPFS ノード(バージョン 未満) - サブグラフのデプロイメタデータは IPFS ネットワーク上に保存されます。 グラフノードは、サブグラフのデプロイ時に主に IPFS ノードにアクセスし、サブグラフマニフェストと全てのリンクファイルを取得します。 ネットワーク・インデクサーは独自の IPFS ノードをホストする必要はありません。 ネットワーク用の IPFS ノードは、https://ipfs.network.thegraph.com でホストされています。 +IPFS ノード(バージョン 未満) - サブグラフのデプロイメタデータは IPFS ネットワーク上に保存されます。 グラフノードは、サブグラフのデプロイ時に主に IPFS ノードにアクセスし、サブグラフマニフェストと全てのリンクファイルを取得します。 ネットワーク・インデクサーは独自の IPFS ノードをホストする必要はありません。 ネットワーク用の IPFS ノードは、https://ipfs.network.thegraph.com でホストされています。 ### Prometheus メトリクスサーバー @@ -77,13 +77,13 @@ Kubernetesの完全な設定例は、[indexerリポジトリ](https://github.com グラフノードは起動時に以下のポートを公開します。 -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ------------------------------------------------------- | ------------------------------------------------------ | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **重要**: ポートを公に公開する場合は注意してください。**管理ポート**はロックしておく必要があります。ノードの JSON-RPC エンドポイント diff --git a/website/pages/ja/querying/graphql-api.mdx b/website/pages/ja/querying/graphql-api.mdx index 3d503ece126e..bb65c50d2929 100644 --- a/website/pages/ja/querying/graphql-api.mdx +++ b/website/pages/ja/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Graph Node [`v0.30.0`](https://github.com/graphprotocol/graph-node/releases/tag/ ``` > **シンタックス シュガー:** コンマで区切られた部分式を渡すことで `and` 演算子を削除することで、上記のクエリを簡素化できます。 -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) 全文検索演算子: -| シンボル | オペレーター | 説明書き | -| ----------- | ----------- | --------------------------------------------------------- | -| `&` | `と` | 複数の検索語を組み合わせて、指定したすべての検索語を含むエンティティをフィルタリングします。 | -| | | `Or` | 複数の検索語をオペレーターで区切って検索すると、指定した語のいずれかにマッチするすべてのエンティティが返されます。 | -| `<->` | `Follow by` | 2 つの単語の間の距離を指定します。 | -| `:*` | `プレフィックス` | プレフィックス検索語を使って、プレフィックスが一致する単語を検索します(2 文字必要) | +| シンボル | オペレーター | 説明書き | +| --- | --- | --- | +| `&` | `と` | 複数の検索語を組み合わせて、指定したすべての検索語を含むエンティティをフィルタリングします。 | +| | | `Or` | 複数の検索語をオペレーターで区切って検索すると、指定した語のいずれかにマッチするすべてのエンティティが返されます。 | +| `<->` | `Follow by` | 2 つの単語の間の距離を指定します。 | +| `:*` | `プレフィックス` | プレフィックス検索語を使って、プレフィックスが一致する単語を検索します(2 文字必要) | #### 例 diff --git a/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx index 82a7d23de3f8..766fbb6c80a3 100644 --- a/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + 変数シャドウイングを行っていた場合は、重複する変数の名前を変更する必要があります。 + ### Null 比較 + サブグラフのアップグレードを行うと、時々以下のようなエラーが発生することがあります。 ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + 解決するには、 `if` 文を以下のように変更するだけです。 ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + この問題を解決するには、そのプロパティアクセスのための変数を作成して、コンパイラが nullability check のマジックを行うようにします。 ```typescript diff --git a/website/pages/ja/sunrise.mdx b/website/pages/ja/sunrise.mdx index da5776901775..6eb05e59e427 100644 --- a/website/pages/ja/sunrise.mdx +++ b/website/pages/ja/sunrise.mdx @@ -12,9 +12,7 @@ Sunriseは、The Graphに取り組むEdge & Nodeが主導するイニシアチ ### Sunriseの各フェーズとは? -**Sunray**:ホスティングサービスチェーンのサポート、シームレスなアップグレードフローの提供、The Graph Networkでの無料プランの提供。 -**Sunbeam**:サブグラフ開発者がサブグラフをThe Graph Networkにアップグレードするためのアップグレードウィンドウ。詳細は近日中に発表されます。 -**Sunrise**:トラフィックがThe Graph Networkに移動すると、ホストされているサービスのエンドポイントが失効します。 +**Sunray**:ホスティングサービスチェーンのサポート、シームレスなアップグレードフローの提供、The Graph Networkでの無料プランの提供。 **Sunbeam**:サブグラフ開発者がサブグラフをThe Graph Networkにアップグレードするためのアップグレードウィンドウ。詳細は近日中に発表されます。 **Sunrise**:トラフィックがThe Graph Networkに移動すると、ホストされているサービスのエンドポイントが失効します。 ### インフラは自分で用意する必要がありますか? diff --git a/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx index 602b2a2c3aa2..de12152a1f00 100644 --- a/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx @@ -22,8 +22,7 @@ The exception is with smart contract wallets like multisigs: these are smart con ### 만약 7일 안에 이체를 완료하지 못하면 어떻게 되나요? -L2 전송 도구는 Arbitrum의 기본 메커니즘을 사용하여 L1에서 L2로 메시지를 보냅니다. 이 메커니즘은 "재시도 가능한 티켓"이라고 하며 Arbitrum GRT 브리지를 포함한 모든 네이티브 토큰 브리지를 사용하여 사용됩니다. 재시도 가능한 티켓에 대해 자세히 읽을 수 있습니다 [Arbitrum 문서] -(https://docs.arbitrum.io/arbos/l1-to-l2-messaging). +L2 전송 도구는 Arbitrum의 기본 메커니즘을 사용하여 L1에서 L2로 메시지를 보냅니다. 이 메커니즘은 "재시도 가능한 티켓"이라고 하며 Arbitrum GRT 브리지를 포함한 모든 네이티브 토큰 브리지를 사용하여 사용됩니다. 재시도 가능한 티켓에 대해 자세히 읽을 수 있습니다 [Arbitrum 문서] (https://docs.arbitrum.io/arbos/l1-to-l2-messaging). 자산(하위 그래프, 스테이크, 위임 또는 큐레이션) 을 L2로 이전하면 L2에서 재시도 가능한 티켓을 생성하는 Arbitrum GRT 브리지를 통해 메시지가 전송됩니다. 전송 도구에는 거래에 일부 ETH 값이 포함되어 있으며, 이는 1) 티켓 생성 비용을 지불하고 2) L2에서 티켓을 실행하기 위해 가스 비용을 지불하는 데 사용됩니다. 그러나 티켓이 L2에서 실행될 준비가 될 때까지 가스 가격이 시간에 따라 달라질 수 있으므로 이 자동 실행 시도가 실패할 수 있습니다. 그런 일이 발생하면 Arbitrum 브릿지는 재시도 가능한 티켓을 최대 7일 동안 유지하며 누구나 티켓 "사용"을 재시도할 수 있습니다(Arbitrum에 브릿지된 일부 ETH가 있는 지갑이 필요함). @@ -41,8 +40,6 @@ If you have the L1 transaction hash (which you can find by looking at the recent - - 1. 이더리움 메인넷에서 전송 시작 2. 확인을 위해 20분 정도 기다리세요 diff --git a/website/pages/ko/developing/creating-a-subgraph.mdx b/website/pages/ko/developing/creating-a-subgraph.mdx index db9e8a024571..39f58ac2083b 100644 --- a/website/pages/ko/developing/creating-a-subgraph.mdx +++ b/website/pages/ko/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/ko/developing/graph-ts/api.mdx b/website/pages/ko/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/ko/developing/graph-ts/api.mdx +++ b/website/pages/ko/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/ko/developing/unit-testing-framework.mdx b/website/pages/ko/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/ko/developing/unit-testing-framework.mdx +++ b/website/pages/ko/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/ko/network/benefits.mdx b/website/pages/ko/network/benefits.mdx index 09c0548bfc4f..864672b16515 100644 --- a/website/pages/ko/network/benefits.mdx +++ b/website/pages/ko/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/ko/network/indexing.mdx b/website/pages/ko/network/indexing.mdx index 842a5c8e0c74..9bdc2fb2eb7e 100644 --- a/website/pages/ko/network/indexing.mdx +++ b/website/pages/ko/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/ko/operating-graph-node.mdx b/website/pages/ko/operating-graph-node.mdx index a7dd15e7a84c..4f0f856db111 100644 --- a/website/pages/ko/operating-graph-node.mdx +++ b/website/pages/ko/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/ko/querying/graphql-api.mdx b/website/pages/ko/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/ko/querying/graphql-api.mdx +++ b/website/pages/ko/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/mr/cookbook/subgraph-debug-forking.mdx b/website/pages/mr/cookbook/subgraph-debug-forking.mdx index 06ceb8df1ce1..ae08df06ed38 100644 --- a/website/pages/mr/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/mr/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ title: फॉर्क्स वापरून जलद आणि सुलभ जेव्हा तुम्ही इंडेक्सिंगसाठी रिमोट ग्राफ नोडवर सबग्राफ उपयोजित करता आणि तो ब्लॉक _X_ वर अयशस्वी होतो, तेव्हा चांगली बातमी अशी आहे की आलेख नोड अजूनही त्याचे स्टोअर वापरून GraphQL क्वेरी सर्व्ह करेल, जे _X_ अवरोधित करण्यासाठी समक्रमित केले आहे. खूप छान आहे! याचा अर्थ ब्लॉक _X_ अनुक्रमित करताना उद्भवणाऱ्या बगचे निराकरण करण्यासाठी आम्ही या "अप-टू-डेट" स्टोअरचा लाभ घेऊ शकतो. -थोडक्यात, आम्ही एका रिमोट ग्राफ नोडवरून _अयशस्वी सबग्राफ फोर्क करणार आहोत_ ज्याला *X* ब्लॉक _X_ वर डीबग केलेला स्थानिकरित्या उपयोजित सबग्राफ प्रदान करण्यासाठी अनुक्रमणिका स्थितीचे अद्ययावत दृश्य. +थोडक्यात, आम्ही एका रिमोट ग्राफ नोडवरून _अयशस्वी सबग्राफ फोर्क करणार आहोत_ ज्याला _X_ ब्लॉक _X_ वर डीबग केलेला स्थानिकरित्या उपयोजित सबग्राफ प्रदान करण्यासाठी अनुक्रमणिका स्थितीचे अद्ययावत दृश्य. ## कृपया, मला काही कोड दाखवा! @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -अरेरे, किती दुर्दैवी आहे, जेव्हा मी माझा परिपूर्ण दिसणारा सबग्राफ [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर तैनात करतो तेव्हा तो *"Gravatar आढळले नाही!"* त्रुटी. +अरेरे, किती दुर्दैवी आहे, जेव्हा मी माझा परिपूर्ण दिसणारा सबग्राफ [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर तैनात करतो तेव्हा तो _"Gravatar आढळले नाही!"_ त्रुटी. निराकरण करण्याचा प्रयत्न करण्याचा नेहमीचा मार्ग आहे: diff --git a/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx index 3f0b45cc25a7..ef5d4a07489c 100644 --- a/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: होस्ट केलेल्या सेवेसाठी सब ## होस्ट केलेले सेवा खाते तयार करा -होस्ट केलेली सेवा वापरण्यापूर्वी, आमच्या होस्ट केलेल्या सेवेमध्ये खाते तयार करा. त्यासाठी तुम्हाला [Github](https://github.com/) खात्याची आवश्यकता असेल; जर तुमच्याकडे नसेल, तर तुम्हाला ते प्रथम तयार करावे लागेल. त्यानंतर, [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर नेव्हिगेट करा, _'Github सह साइन अप करा' वर क्लिक करा _बटण, आणि Github चा अधिकृतता प्रवाह पूर्ण करा. +होस्ट केलेली सेवा वापरण्यापूर्वी, आमच्या होस्ट केलेल्या सेवेमध्ये खाते तयार करा. त्यासाठी तुम्हाला [Github](https://github.com/) खात्याची आवश्यकता असेल; जर तुमच्याकडे नसेल, तर तुम्हाला ते प्रथम तयार करावे लागेल. त्यानंतर, [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर नेव्हिगेट करा, *'Github सह साइन अप करा' वर क्लिक करा *बटण, आणि Github चा अधिकृतता प्रवाह पूर्ण करा. ## प्रवेश टोकन साठवा diff --git a/website/pages/mr/developing/creating-a-subgraph.mdx b/website/pages/mr/developing/creating-a-subgraph.mdx index 5b2aa532c95d..060f832cf1b3 100644 --- a/website/pages/mr/developing/creating-a-subgraph.mdx +++ b/website/pages/mr/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ type GravatarDeclined @entity { We support the following scalars in our GraphQL API: -| प्रकार | वर्णन | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `बाइट्स` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `स्ट्रिंग` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `बुलियन` | `बूलियन` मूल्यांसाठी स्केलर. | -| `इंट` | GraphQL spec `Int` ला ३२ बाइट्सचा आकार ठरवतो. | -| `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` | मोठे पूर्णांक. इथरियमच्या `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारांसाठी वापरले जाते. टीप: `uint32` खाली सर्व काही, जसे की `int32`, `uint24` किंवा `int8` `i32` म्हणून प्रस्तुत केले जाते 0>. | -| `बिग डेसिमल` | `BigDecimal` उच्च सुस्पष्टता दशांश एक महत्त्वपूर्ण आणि घातांक म्हणून प्रस्तुत केले जाते. घातांक श्रेणी −6143 ते +6144 पर्यंत आहे. 34 लक्षणीय अंकांपर्यंत पूर्णांक. | +| प्रकार | वर्णन | +| --- | --- | +| `बाइट्स` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `स्ट्रिंग` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `बुलियन` | `बूलियन` मूल्यांसाठी स्केलर. | +| `इंट` | GraphQL spec `Int` ला ३२ बाइट्सचा आकार ठरवतो. | +| `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` | मोठे पूर्णांक. इथरियमच्या `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारांसाठी वापरले जाते. टीप: `uint32` खाली सर्व काही, जसे की `int32`, `uint24` किंवा `int8` `i32` म्हणून प्रस्तुत केले जाते 0>. | +| `बिग डेसिमल` | `BigDecimal` उच्च सुस्पष्टता दशांश एक महत्त्वपूर्ण आणि घातांक म्हणून प्रस्तुत केले जाते. घातांक श्रेणी −6143 ते +6144 पर्यंत आहे. 34 लक्षणीय अंकांपर्यंत पूर्णांक. | #### एनम्स @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **टीप:** नवीन डेटा स्रोत केवळ तो ज्या ब्लॉकमध्ये तयार केला गेला होता आणि पुढील सर्व ब्लॉकसाठी कॉल्स आणि इव्हेंटवर प्रक्रिया करेल, परंतु ऐतिहासिक डेटावर प्रक्रिया करणार नाही, म्हणजे, डेटावर प्रक्रिया करणार नाही. जे आधीच्या ब्लॉक्समध्ये समाविष्ट आहे. -> +> > पूर्वीच्या ब्लॉक्समध्ये नवीन डेटा स्रोताशी संबंधित डेटा असल्यास, कराराची वर्तमान स्थिती वाचून आणि नवीन डेटा स्रोत तयार करताना त्या स्थितीचे प्रतिनिधित्व करणारी संस्था तयार करून तो डेटा अनुक्रमित करणे सर्वोत्तम आहे. ### डेटा स्रोत संदर्भ @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/mr/developing/graph-ts/api.mdx b/website/pages/mr/developing/graph-ts/api.mdx index c3aacbae1b40..16f403727d60 100644 --- a/website/pages/mr/developing/graph-ts/api.mdx +++ b/website/pages/mr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| आवृत्ती | रिलीझ नोट्स | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| आवृत्ती | रिलीझ नोट्स | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### अंगभूत प्रकार @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### प्रकार रूपांतरण संदर्भ -| Source(s) | Destination | Conversion function | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| स्ट्रिंग (हेक्साडेसिमल) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| ----------------------- | ----------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| स्ट्रिंग (हेक्साडेसिमल) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### डेटा स्रोत मेटाडेटा diff --git a/website/pages/mr/developing/unit-testing-framework.mdx b/website/pages/mr/developing/unit-testing-framework.mdx index 6910325a0758..85fdc6571ca1 100644 --- a/website/pages/mr/developing/unit-testing-framework.mdx +++ b/website/pages/mr/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ ___ ___ _ _ _ _ _ याचा अर्थ तुम्ही तुमच्या कोडमध्ये `console.log` वापरले आहे, जे असेंबलीस्क्रिप्टद्वारे समर्थित नाही. कृपया [लॉगिंग API](/developing/assemblyscript-api/#logging-api) वापरण्याचा विचार करा > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > त्रुटी TS2554: अपेक्षित आहे? युक्तिवाद, पण मिळाले?. -> +> > नवीन ethereum.Transaction परत करा(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) `graph-ts` आणि `matchstick-as` मधील जुळत नसल्यामुळे वितर्कांमधील जुळत नाही. यासारख्या समस्यांचे निराकरण करण्याचा सर्वोत्तम मार्ग म्हणजे नवीनतम रिलीझ केलेल्या आवृत्तीवर सर्वकाही अद्यतनित करणे. diff --git a/website/pages/mr/network/benefits.mdx b/website/pages/mr/network/benefits.mdx index bacc3941bb26..c3322af4ad95 100644 --- a/website/pages/mr/network/benefits.mdx +++ b/website/pages/mr/network/benefits.mdx @@ -27,47 +27,47 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## कमी आवाज वापरकर्ता (दरमहा 30,000 पेक्षा कमी क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -|:----------------------------:|:---------------------------------------:|:------------------------------------------------------------------------:| -| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | -| क्वेरी खर्च | $0+ | दरमहा ~$15 | -| अभियांत्रिकी वेळ | दरमहा $400 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000 (ऑटोस्केलिंग) | -| प्रति क्वेरी खर्च | $0 | $0.0005 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड $750+ | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $750+ | ~$15 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | +| क्वेरी खर्च | $0+ | दरमहा ~$15 | +| अभियांत्रिकी वेळ | दरमहा $400 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000 (ऑटोस्केलिंग) | +| प्रति क्वेरी खर्च | $0 | $0.0005 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड $750+ | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $750+ | ~$15 | ## मध्यम व्हॉल्यूम वापरकर्ता (दरमहा 3,000,000+ क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -|:----------------------------:|:------------------------------------------:|:------------------------------------------------------------------------:| -| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | -| क्वेरी खर्च | दरमहा $500 | दरमहा $750 | -| अभियांत्रिकी वेळ | दरमहा $800 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 3,000,000+ | -| प्रति क्वेरी खर्च | $0 | $0.00025 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| अभियांत्रिकी खर्च | $200 प्रति तास | समाविष्ट | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $1,650+ | $750 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | +| क्वेरी खर्च | दरमहा $500 | दरमहा $750 | +| अभियांत्रिकी वेळ | दरमहा $800 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 3,000,000+ | +| प्रति क्वेरी खर्च | $0 | $0.00025 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| अभियांत्रिकी खर्च | $200 प्रति तास | समाविष्ट | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $1,650+ | $750 | ## उच्च व्हॉल्यूम वापरकर्ता (दरमहा 30,000,000+ क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -|:----------------------------:|:-------------------------------------------:|:------------------------------------------------------------------------:| -| मासिक सर्व्हर खर्च\* | प्रति नोड, प्रति महिना $1100 | $0 | -| क्वेरी खर्च | $4000 | दरमहा $4,500 | -| आवश्यक नोड्सची संख्या | 10 | लागू नाही | -| अभियांत्रिकी वेळ | दरमहा $6,000 किंवा अधिक | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000,000+ | -| प्रति क्वेरी खर्च | $0 | $0.00015 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $11,000+ | $4,500 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्व्हर खर्च\* | प्रति नोड, प्रति महिना $1100 | $0 | +| क्वेरी खर्च | $4000 | दरमहा $4,500 | +| आवश्यक नोड्सची संख्या | 10 | लागू नाही | +| अभियांत्रिकी वेळ | दरमहा $6,000 किंवा अधिक | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000,000+ | +| प्रति क्वेरी खर्च | $0 | $0.00015 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $11,000+ | $4,500 | \*बॅकअपच्या खर्चासह: $50-$100 प्रति महिना diff --git a/website/pages/mr/network/delegating.mdx b/website/pages/mr/network/delegating.mdx index 4370f27cb5c4..74e6bf0d8e10 100644 --- a/website/pages/mr/network/delegating.mdx +++ b/website/pages/mr/network/delegating.mdx @@ -34,7 +34,7 @@ Listed below are the main risks of being a Delegator in the protocol.
    ![प्रतिनिधी अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलिगेशन UI मध्ये 0.5% शुल्क तसेच २८ दिवसांची नोंद घ्या - अनबॉन्डिंग कालावधी._ + अनबॉन्डिंग कालावधी._
    ### Choosing a trustworthy Indexer with a fair reward payout for Delegators @@ -44,8 +44,8 @@ Listed below are the main risks of being a Delegator in the protocol. इंडेक्सिंग रिवॉर्ड कट - इंडेक्सिंग रिवॉर्ड कट हा रिवॉर्डचा भाग आहे जो इंडेक्सर स्वतःसाठी ठेवतो. याचा अर्थ 100% वर सेट केल्यास, प्रतिनिधी म्हणून तुम्हाला 0 इंडेक्सिंग रिवॉर्ड मिळतील. तुम्हाला UI मध्ये 80% दिसल्यास, याचा अर्थ प्रतिनिधी म्हणून, तुम्हाला 20% मिळेल. एक महत्त्वाची टीप - नेटवर्कच्या सुरूवातीस, बहुसंख्य पुरस्कारांसाठी अनुक्रमणिका रिवॉर्ड्स असतील.
    - ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *टॉप इंडेक्सर प्रतिनिधींना 90% बक्षिसे देत आहे. द - मधला प्रतिनिधी 20% देत आहे. सर्वात खालचा भाग प्रतिनिधींना ~83% देत आहे.* + ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *टॉप इंडेक्सर प्रतिनिधींना 90% बक्षिसे देत आहे. द मधला + प्रतिनिधी 20% देत आहे. सर्वात खालचा भाग प्रतिनिधींना ~83% देत आहे.*
    - क्वेरी फी कट - हे इंडेक्सिंग रिवॉर्ड कट प्रमाणेच कार्य करते. तथापि, हे विशेषत: इंडेक्सर गोळा केलेल्या क्वेरी शुल्कावरील परताव्यासाठी आहे. हे लक्षात घेतले पाहिजे की नेटवर्कच्या सुरूवातीस, अनुक्रमणिकेच्या रिवॉर्डच्या तुलनेत क्वेरी फीमधून मिळणारे रिटर्न खूपच कमी असेल. नेटवर्कमधील क्वेरी शुल्क अधिक लक्षणीय केव्हा सुरू होईल हे निर्धारित करण्यासाठी नेटवर्ककडे लक्ष देण्याची शिफारस केली जाते. diff --git a/website/pages/mr/network/indexing.mdx b/website/pages/mr/network/indexing.mdx index 9cdbc569d607..4ead6f7ae74b 100644 --- a/website/pages/mr/network/indexing.mdx +++ b/website/pages/mr/network/indexing.mdx @@ -112,12 +112,12 @@ Once an allocation has been closed the rebates are available to be claimed by th - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| ------ |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| मानक | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| मानक | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Once an allocation has been closed the rebates are available to be claimed by th #### आलेख नोड -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -623,7 +623,7 @@ graph indexer rules delete QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK - Indexer can use the `indexer-cli` to view all queued actions - इंडेक्सर (किंवा इतर सॉफ्टवेअर) `indexer-cli` वापरून रांगेतील क्रिया मंजूर किंवा रद्द करू शकतात. मंजूर आणि रद्द आदेश इनपुट म्हणून अॅक्शन आयडीचा अॅरे घेतात. - अंमलबजावणी कर्मचारी नियमितपणे मंजूर कृतींसाठी रांगेत मतदान करतात. ते रांगेतील `मंजूर` क्रिया पकडेल, त्या कार्यान्वित करण्याचा प्रयत्न करेल आणि अंमलबजावणीच्या स्थितीनुसार `यशस्वी` किंवा `अयशस्वी< वर db मधील मूल्ये अपडेट करेल. /code>.
  • -
  • एखादी कृती यशस्वी झाल्यास कार्यकर्ता खात्री करेल की एक अनुक्रमणिका नियम उपस्थित आहे जो एजंटला वाटप कसे व्यवस्थापित करावे हे सांगते, एजंट ऑटो` किंवा ` मध्ये असताना मॅन्युअल क्रिया करताना उपयुक्त oversight` मोड. +
  • एखादी कृती यशस्वी झाल्यास कार्यकर्ता खात्री करेल की एक अनुक्रमणिका नियम उपस्थित आहे जो एजंटला वाटप कसे व्यवस्थापित करावे हे सांगते, एजंट ऑटो` किंवा ` मध्ये असताना मॅन्युअल क्रिया करताना उपयुक्त oversight` मोड. - इंडेक्सर कारवाईच्या अंमलबजावणीचा इतिहास पाहण्यासाठी कृती रांगेचे निरीक्षण करू शकतो आणि आवश्यक असल्यास क्रिया आयटमची अंमलबजावणी अयशस्वी झाल्यास पुन्हा मंजूर आणि अद्यतनित करू शकतो. कृती रांग रांगेत लावलेल्या आणि केलेल्या सर्व क्रियांचा इतिहास प्रदान करते. Data model: diff --git a/website/pages/mr/operating-graph-node.mdx b/website/pages/mr/operating-graph-node.mdx index 598d94037dae..fe9e6c5fb9f3 100644 --- a/website/pages/mr/operating-graph-node.mdx +++ b/website/pages/mr/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **महत्त्वाचे**: पोर्ट सार्वजनिकपणे उघड करण्याबाबत सावधगिरी बाळगा - **प्रशासन पोर्ट** लॉक डाउन ठेवले पाहिजेत. यामध्ये ग्राफ नोड JSON-RPC एंडपॉइंटचा समावेश आहे. diff --git a/website/pages/mr/querying/graphql-api.mdx b/website/pages/mr/querying/graphql-api.mdx index de35e41f2124..b66f2673be24 100644 --- a/website/pages/mr/querying/graphql-api.mdx +++ b/website/pages/mr/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | वर्णन | -| ----------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `आणि` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `किंवा` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `द्वारे अनुसरण करा` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | वर्णन | +| --- | --- | --- | +| `&` | `आणि` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `किंवा` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `द्वारे अनुसरण करा` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx index 2d735415bebb..a170ebec8cda 100644 --- a/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ However now this isn't possible anymore, and the compiler returns this error: ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/nl/arbitrum/arbitrum-faq.mdx b/website/pages/nl/arbitrum/arbitrum-faq.mdx index 457f2a55409b..a48dc60d2789 100644 --- a/website/pages/nl/arbitrum/arbitrum-faq.mdx +++ b/website/pages/nl/arbitrum/arbitrum-faq.mdx @@ -45,8 +45,7 @@ Please help [test the network](https://testnet.thegraph.com/explorer) on L2 and ## Zijn er risico's verbonden met het schalen van het netwerk naar L2? -Alle smart contracts zijn grondig [ge-audit] -(https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Alle smart contracts zijn grondig [ge-audit] (https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). Alles is grondig getest, en een eventualiteiten plan is gemaakt en klaargezet voor een veilige en naadloze transitie. Details kunnen [hier](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20) gevonden worden. diff --git a/website/pages/nl/developing/creating-a-subgraph.mdx b/website/pages/nl/developing/creating-a-subgraph.mdx index db9e8a024571..39f58ac2083b 100644 --- a/website/pages/nl/developing/creating-a-subgraph.mdx +++ b/website/pages/nl/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/nl/developing/graph-ts/api.mdx b/website/pages/nl/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/nl/developing/graph-ts/api.mdx +++ b/website/pages/nl/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/nl/developing/unit-testing-framework.mdx b/website/pages/nl/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/nl/developing/unit-testing-framework.mdx +++ b/website/pages/nl/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/nl/network/benefits.mdx b/website/pages/nl/network/benefits.mdx index ccb2babe1b4c..86608928d730 100644 --- a/website/pages/nl/network/benefits.mdx +++ b/website/pages/nl/network/benefits.mdx @@ -5,7 +5,7 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg Het gedecentraliseerde netwerk van The Graph is ontworpen en verfijnd om een robuuste ervaring te creëren bij het indexeren en opvragen van data. Het netwerk wordt iedere dag sterker door de duizenden bijdragers wereldwijd. -De voordelen van dit gedecentraliseerde protocol is dat het niet gerepliceerd kan worden door een `graph-node` lokaal te laten werken. Het Graph Netwerk is betrouwbaarder, efficiënter en goedkoper. +De voordelen van dit gedecentraliseerde protocol is dat het niet gerepliceerd kan worden door een `graph-node` lokaal te laten werken. Het Graph Netwerk is betrouwbaarder, efficiënter en goedkoper. Hier is een analyse: @@ -27,53 +27,54 @@ Kosten per query kunnen variëren; de genoemde kosten zijn het gemiddelde op het ## Gebruiker met een laag volume (minder dan 30.000 queries per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -|:--------------------------:|:---------------------------------------:|:------------------------------------------------------------------------------------------------:| -| Maandelijkse serverkosten | $350 per maand | $0 | -| Querykosten | $0+ | ~$15 per maand | -| Onderhoud tijd | $400 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000 (schaalt automatisch) | -| Kosten per query | $0 | $0,0005 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Geografische redundantie | $750+ per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $750+ | ~$15 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +| :-: | :-: | :-: | +| Maandelijkse serverkosten | $350 per maand | $0 | +| Querykosten | $0+ | ~$15 per maand | +| Onderhoud tijd | $400 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000 (schaalt automatisch) | +| Kosten per query | $0 | $0,0005 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Geografische redundantie | $750+ per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $750+ | ~$15 | ## Gebruiker met een gemiddeld volume (3.000.000+ queries per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -|:---------------------------:|:-----------------------------------------:|:------------------------------------------------------------------------------------------------:| -| Maandelijkse serverkosten | $350 per maand | $0 | -| Querykosten | $500 per maand | $750 per maand | -| Onderhoud | $800 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 3000000+ | -| Kosten per query | $0 | $0,00025 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Technische personeelskosten | $200 per uur | Inbegrepen | -| Geografische redundantie | $1200 totale kosten per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $1650+ | $750 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +| :-: | :-: | :-: | +| Maandelijkse serverkosten | $350 per maand | $0 | +| Querykosten | $500 per maand | $750 per maand | +| Onderhoud | $800 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 3000000+ | +| Kosten per query | $0 | $0,00025 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Technische personeelskosten | $200 per uur | Inbegrepen | +| Geografische redundantie | $1200 totale kosten per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $1650+ | $750 | ## Gebruiker met een hoog volume (30.000.000+ query's per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -|:--------------------------:|:------------------------------------------:|:------------------------------------------------------------------------------------------------:| -| Maandelijkse serverkosten | $1100 per maand, per node | $0 | -| Querykosten | $4000 | $4500 per maand | -| Aantal benodigde nodes | 10 | Niet van toepassing | -| Onderhoud | $6000 of meer per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000000+ | -| Kosten per query | $0 | $0.00015 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Geografische redundantie | $1200 in totale kosten per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $11000+ | $4500 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +| :-: | :-: | :-: | +| Maandelijkse serverkosten | $1100 per maand, per node | $0 | +| Querykosten | $4000 | $4500 per maand | +| Aantal benodigde nodes | 10 | Niet van toepassing | +| Onderhoud | $6000 of meer per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000000+ | +| Kosten per query | $0 | $0.00015 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Geografische redundantie | $1200 in totale kosten per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $11000+ | $4500 | \*inclusief kosten voor een back-up: $50-$100 per maand Onderhoud tijd gebaseerd op $200 per uur -gebruikmakend van de maximale querybudgetfunctie in het budgetfacturatietabblad, met behoud van hoge kwaliteit van de service +gebruikmakend van de maximale querybudgetfunctie in het budgetfacturatietabblad, met behoud van hoge +kwaliteit van de service Geschatte kosten gelden alleen voor Ethereum Mainnet-subgraphs - de kosten zijn nog hoger bij zelfhosting van een `graph-node` op andere netwerken. diff --git a/website/pages/nl/network/delegating.mdx b/website/pages/nl/network/delegating.mdx index 9cf383d14f26..505bc480d83c 100644 --- a/website/pages/nl/network/delegating.mdx +++ b/website/pages/nl/network/delegating.mdx @@ -33,7 +33,8 @@ Wanneer een Delegeerder een delegatie wil sluiten, zijn hun tokens gebonden aan Een andere overweging is ook het wijs kiezen van een Indexeerder. Als je een Indexeerder kiest die niet betrouwbaar was of zijn werk niet goed doet, wil je je delegatie sluiten, wat betekent dat je veel kansen om beloningen te ontvangen zal missen wat net zo slecht kan zijn als GRT verbranden.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Let op de 0,5% belasting in de Delegatie UI, evenals de 28-daagse ontbindingsperiode_ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Let op de 0,5% belasting in de Delegatie UI, evenals de + 28-daagse ontbindingsperiode_
    ### Het kiezen van een betrouwbare Indexeerder met een eerlijke beloningsuitbetaling voor Delegeerders @@ -43,7 +44,8 @@ Dit is een belangrijk aspect om te begrijpen. Laten we eerst drie zeer belangrij Indexing Reward Cut - De indexing reward cut is het deel van de beloningen dat de Indexeerder voor zichzelf zal houden. Dat betekent dat als het is ingesteld op 100%, je als delegeerder 0% van de beloningen voor het indexeren krijgt. Als je 80% ziet op de website, betekent dit dat je als Delegeerder 20% van de beloningen ontvangt. Een belangrijke opmerking - aan het begin van het netwerk zullen Indexing Rewards het grootste deel van de beloningen uitmaken.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *De bovenste Indexeerder geeft Delegeerders 90% van de beloningen. De middelste geeft Delegeerders 20%. De onderste geeft Delegeerders ~83%.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *De bovenste Indexeerder geeft Delegeerders 90% van de + beloningen. De middelste geeft Delegeerders 20%. De onderste geeft Delegeerders ~83%.*
    - Query Fee Cut - Dit werkt precies hetzelfde als de Indexing Reward Cut. Dit is echter specifiek voor opbrengsten uit de querykosten die de Indexer binnen krijgt. Aan het begin van het netwerk zullen de opbrengsten uit querykosten erg klein zijn in vergelijking met de opbrengsten van het indexeren. Het wordt aanbevolen om aandacht te besteden aan het netwerkactiviteit om te bepalen wanneer de querykosten in het netwerk significant zullen worden. diff --git a/website/pages/nl/network/indexing.mdx b/website/pages/nl/network/indexing.mdx index 842a5c8e0c74..9bdc2fb2eb7e 100644 --- a/website/pages/nl/network/indexing.mdx +++ b/website/pages/nl/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/nl/operating-graph-node.mdx b/website/pages/nl/operating-graph-node.mdx index a7dd15e7a84c..4f0f856db111 100644 --- a/website/pages/nl/operating-graph-node.mdx +++ b/website/pages/nl/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/nl/querying/graphql-api.mdx b/website/pages/nl/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/nl/querying/graphql-api.mdx +++ b/website/pages/nl/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx b/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/pl/developing/creating-a-subgraph.mdx b/website/pages/pl/developing/creating-a-subgraph.mdx index db9e8a024571..39f58ac2083b 100644 --- a/website/pages/pl/developing/creating-a-subgraph.mdx +++ b/website/pages/pl/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/pl/developing/graph-ts/api.mdx b/website/pages/pl/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/pl/developing/graph-ts/api.mdx +++ b/website/pages/pl/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/pl/developing/unit-testing-framework.mdx b/website/pages/pl/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/pl/developing/unit-testing-framework.mdx +++ b/website/pages/pl/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/pl/network/benefits.mdx b/website/pages/pl/network/benefits.mdx index 09c0548bfc4f..864672b16515 100644 --- a/website/pages/pl/network/benefits.mdx +++ b/website/pages/pl/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/pl/network/indexing.mdx b/website/pages/pl/network/indexing.mdx index 842a5c8e0c74..9bdc2fb2eb7e 100644 --- a/website/pages/pl/network/indexing.mdx +++ b/website/pages/pl/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/pl/operating-graph-node.mdx b/website/pages/pl/operating-graph-node.mdx index a7dd15e7a84c..4f0f856db111 100644 --- a/website/pages/pl/operating-graph-node.mdx +++ b/website/pages/pl/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/pl/querying/graphql-api.mdx b/website/pages/pl/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/pl/querying/graphql-api.mdx +++ b/website/pages/pl/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/pl/quick-start.mdx b/website/pages/pl/quick-start.mdx index 96627e4a43e1..da9324f4ad3d 100644 --- a/website/pages/pl/quick-start.mdx +++ b/website/pages/pl/quick-start.mdx @@ -1,5 +1,5 @@ --- -title: " Na start" +title: ' Na start' --- This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. diff --git a/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx b/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/pt/cookbook/arweave.mdx b/website/pages/pt/cookbook/arweave.mdx index 1799ed4b4819..1b730d68ff80 100644 --- a/website/pages/pt/cookbook/arweave.mdx +++ b/website/pages/pt/cookbook/arweave.mdx @@ -86,7 +86,7 @@ dataSources: - A rede deve corresponder a uma rede no Graph Node que a hospeda. No serviço hospedado, a mainnet do Arweave é `arweave-mainnet` - Fontes de dados no Arweave introduzem um campo `source.owner` opcional, a chave pública de uma carteira no Arweave -Fontes de dados no Arweave apoiam duas categorias de *handlers*: +Fontes de dados no Arweave apoiam duas categorias de _handlers_: - `blockHandlers` - Executar em cada bloco novo no Arweave. Nenhum `source.owner` é exigido. - `transactionHandlers` — Executar em todas as transações onde o `source.owner` da fonte de dados é o dono. Atualmente, um dono é exigido para o `transactionHandlers`; caso utilizadores queiram processar todas as transações, eles devem providenciar "" como o `source.owner` @@ -97,15 +97,15 @@ Fontes de dados no Arweave apoiam duas categorias de *handlers*: > Nota: Transações no [Bundlr](https://bundlr.network/) não são apoiadas presentemente. -## Definição de *Schema* +## Definição de _Schema_ A definição de Schema descreve a estrutura do banco de dados resultado do subgraph, e os relacionamentos entre entidades. Isto é agnóstico da fonte de dados original. Há mais detalhes na definição de schema de subgraph [aqui](/developing/creating-a-subgraph/#the-graphql-schema). ## Mapeamentos de AssemblyScript -Os *handlers* para eventos de processamento são escritos em [AssemblyScript](https://www.assemblyscript.org/). +Os _handlers_ para eventos de processamento são escritos em [AssemblyScript](https://www.assemblyscript.org/). -O *indexing* do Arweave introduz categorias de dados específicas ao Arweave ao [API do AssemblyScript](/developing/assemblyscript-api/). +O _indexing_ do Arweave introduz categorias de dados específicas ao Arweave ao [API do AssemblyScript](/developing/assemblyscript-api/). ```tsx class Block { @@ -146,7 +146,7 @@ class Transaction { } ``` -*Handlers* de bloco recebem um `Block`, enquanto transações recebem uma `Transaction`. +_Handlers_ de bloco recebem um `Block`, enquanto transações recebem uma `Transaction`. Escrever os mapeamentos de um Subgraph no Arweave é muito similar à escrita dos mapeamentos de um Subgraph no Ethereum. Para mais informações, clique [aqui](/developing/creating-a-subgraph/#writing-mappings). diff --git a/website/pages/pt/developing/creating-a-subgraph.mdx b/website/pages/pt/developing/creating-a-subgraph.mdx index 8b8b9b90cb3b..ba8846de21a1 100644 --- a/website/pages/pt/developing/creating-a-subgraph.mdx +++ b/website/pages/pt/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Para alguns tipos de entidade, o `id` é construído das id's de duas outras ent Nós apoiamos os seguintes escalares na nossa API do GraphQL: -| Tipo | Descrição | -| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Arranjo de bytes, representado como string hexadecimal. Usado frequentemente por hashes e endereços no Ethereum. | -| `String` | Escalar para valores `string`. Caracteres nulos são removidos automaticamente. | -| `Boolean` | Escalar para valores `boolean`. | -| `Int` | A especificação do GraphQL define que o `Int` tem um tamanho de 32 bytes. | -| `Int8` | Um número inteiro assinado em 8 bits, também conhecido como um número inteiro assinado em 64 bits, pode armazenar valores de -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. Prefira usar isto para representar o `i64` do ethereum. | -| `BigInt` | Números inteiros grandes. Usados para os tipos `uint32`, `int64`, `uint64`, ..., `uint256` do Ethereum. Nota: Tudo abaixo de `uint32`, como `int32`, `uint24` ou `int8` é representado como `i32`. | -| `BigDecimal` | `BigDecimal` Decimais de alta precisão representados como um significando e um exponente. O alcance de exponentes é de -6143 até +6144. Arredondado para 34 dígitos significantes. | +| Tipo | Descrição | +| --- | --- | +| `Bytes` | Arranjo de bytes, representado como string hexadecimal. Usado frequentemente por hashes e endereços no Ethereum. | +| `String` | Escalar para valores `string`. Caracteres nulos são removidos automaticamente. | +| `Boolean` | Escalar para valores `boolean`. | +| `Int` | A especificação do GraphQL define que o `Int` tem um tamanho de 32 bytes. | +| `Int8` | Um número inteiro assinado em 8 bits, também conhecido como um número inteiro assinado em 64 bits, pode armazenar valores de -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. Prefira usar isto para representar o `i64` do ethereum. | +| `BigInt` | Números inteiros grandes. Usados para os tipos `uint32`, `int64`, `uint64`, ..., `uint256` do Ethereum. Nota: Tudo abaixo de `uint32`, como `int32`, `uint24` ou `int8` é representado como `i32`. | +| `BigDecimal` | `BigDecimal` Decimais de alta precisão representados como um significando e um exponente. O alcance de exponentes é de -6143 até +6144. Arredondado para 34 dígitos significantes. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Uma nova fonte de dados só processará as chamadas e eventos para o bloco onde ele foi criado e todos os blocos a seguir. Porém, não serão processados dados históricos, por ex, contidos em blocos anteriores. -> +> > Se blocos anteriores conterem dados relevantes à nova fonte, é melhor indexá-los ao ler o estado atual do contrato e criar entidades que representem aquele estado na hora que a nova fonte de dados for criada. ### Contextos de Fontes de Dados @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** O bloco da criação do contrato pode ser buscado rapidamente no Etherscan: -> +> > 1. Procure pelo contrato ao inserir o seu endereço na barra de busca. > 2. Clique no hash da transação da criação na seção `Contract Creator`. > 3. Carregue a página dos detalhes da transação, onde encontrará o bloco inicial para aquele contrato. diff --git a/website/pages/pt/developing/graph-ts/api.mdx b/website/pages/pt/developing/graph-ts/api.mdx index 1803d56140f9..f38455660f1a 100644 --- a/website/pages/pt/developing/graph-ts/api.mdx +++ b/website/pages/pt/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ A biblioteca `@graphprotocol/graph-ts` fornece as seguintes APIs: No manifest do subgraph, `apiVersion` especifica a versão da API de mapeamento, executada pelo Graph Node para um subgraph. -| Versão | Notas de atualização | -| :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| 0.0.7 | Classes `TransactionReceipt` e `Log` adicionadas aos tipos do EthereumCampo
    Campo `receipt` adicionado ao objeto Ethereum Event | -| 0.0.6 | Campo `nonce` adicionado ao objeto Ethereum TransactionCampo
    `baseFeePerGas` adicionado ao objeto Ethereum Block | -| 0.0.5 | AssemblyScript atualizado à versão 0.19.10 (inclui mudanças recentes, favor ler o [`Guia de Migração`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renomeado para `ethereum.transaction.gasLimit` | -| 0.0.4 | Campo `functionSignature` adicionado ao objeto Ethereum SmartContractCall | -| 0.0.3 | Campo `from` adicionado ao objeto Ethereum
    `Calletherem.call.address` renomeado para `ethereum.call.to` | -| 0.0.2 | Campo `input` adicionado ao objeto Ethereum Transaction | +| Versão | Notas de atualização | +| :-: | --- | +| 0.0.7 | Classes `TransactionReceipt` e `Log` adicionadas aos tipos do EthereumCampo
    Campo `receipt` adicionado ao objeto Ethereum Event | +| 0.0.6 | Campo `nonce` adicionado ao objeto Ethereum TransactionCampo
    `baseFeePerGas` adicionado ao objeto Ethereum Block | +| 0.0.5 | AssemblyScript atualizado à versão 0.19.10 (inclui mudanças recentes, favor ler o [`Guia de Migração`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renomeado para `ethereum.transaction.gasLimit` | +| 0.0.4 | Campo `functionSignature` adicionado ao objeto Ethereum SmartContractCall | +| 0.0.3 | Campo `from` adicionado ao objeto Ethereum
    `Calletherem.call.address` renomeado para `ethereum.call.to` | +| 0.0.2 | Campo `input` adicionado ao objeto Ethereum Transaction | ### Tipos Embutidos @@ -162,8 +162,7 @@ _Matemática_ import { TypedMap } from '@graphprotocol/graph-ts' ``` -O `TypedMap` pode servir para armazenar pares de chave e valor (key e value -). Confira [este exemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). +O `TypedMap` pode servir para armazenar pares de chave e valor (key e value ). Confira [este exemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). A classe `TypedMap` tem a seguinte API: @@ -735,44 +734,44 @@ Quando o tipo de um valor é confirmado, ele pode ser convertido num [tipo embut ### Referência de Conversões de Tipos -| Fonte(s) | Destino | Função de conversão | -| ------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | nenhum | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | nenhum | -| Bytes (assinado) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (não assinado) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | nenhum | -| int32 | i32 | nenhum | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | nenhum | -| int64 - int256 | BigInt | nenhum | -| uint32 - uint256 | BigInt | nenhum | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Fonte(s) | Destino | Função de conversão | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | nenhum | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | nenhum | +| Bytes (assinado) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (não assinado) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | nenhum | +| int32 | i32 | nenhum | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | nenhum | +| int64 - int256 | BigInt | nenhum | +| uint32 - uint256 | BigInt | nenhum | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadados de Fontes de Dados diff --git a/website/pages/pt/developing/unit-testing-framework.mdx b/website/pages/pt/developing/unit-testing-framework.mdx index d6357b02f6d8..9acb78b6abde 100644 --- a/website/pages/pt/developing/unit-testing-framework.mdx +++ b/website/pages/pt/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ A saída do log inclui a duração do teste. Veja um exemplo: Isto significa que usou o `console.log` no seu código, que não é apoiado pelo AssemblyScript. Considere usar a [API de Logging](/developing/assemblyscript-api/#logging-api) > `ERROR TS2554: Expected ? arguments, but got ?.` -> +> > `return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt);` -> +> > `in ~lib/matchstick-as/assembly/defaults.ts(18,12)` -> +> > `ERROR TS2554: Expected ? arguments, but got ?.` -> +> > `return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt);` -> +> > `in ~lib/matchstick-as/assembly/defaults.ts(24,12)` A diferença nos argumentos é causada pela diferença no `graph-ts` e no `matchstick-as`. Problemas como este são melhor resolvidos ao atualizar tudo para a versão mais recente. diff --git a/website/pages/pt/network/benefits.mdx b/website/pages/pt/network/benefits.mdx index 7465acbb3b36..ce56b07f42a5 100644 --- a/website/pages/pt/network/benefits.mdx +++ b/website/pages/pt/network/benefits.mdx @@ -27,47 +27,47 @@ Os custos de consulta podem variar; o custo citado é o normal até o fechamento ## Utilizador de Baixo Volume (menos de 30 mil queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -|:-------------------------------:|:---------------------------------------:|:-----------------------------------------------------------------:| -| Custo mensal de servidor\* | $350 por mês | $0 | -| Custos de query | $0+ | ~$15 por mês | -| Tempo de engenharia | $400 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 30.000 (autoescala) | -| Custo por query | $0 | $0.0005 | -| Infraestrutura | Centralizada | Descentralizada | -| Redundância geográfica | $750+ por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $750+ | ~$15 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +| :-: | :-: | :-: | +| Custo mensal de servidor\* | $350 por mês | $0 | +| Custos de query | $0+ | ~$15 por mês | +| Tempo de engenharia | $400 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 30.000 (autoescala) | +| Custo por query | $0 | $0.0005 | +| Infraestrutura | Centralizada | Descentralizada | +| Redundância geográfica | $750+ por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $750+ | ~$15 | ## Utilizador de Volume Médio (3.000.000+ queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -|:-------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------:| -| Custo mensal de servidor\* | $350 por mês | $0 | -| Custos de query | $500 por mês | $750 por mês | -| Tempo de engenharia | $800 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 3.000.000+ | -| Custo por query | $0 | $0.00025 | -| Infraestrutura | Centralizada | Descentralizada | -| Custo de engenharia | $200 por hora | Incluído | -| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $1.650+ | $750 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +| :-: | :-: | :-: | +| Custo mensal de servidor\* | $350 por mês | $0 | +| Custos de query | $500 por mês | $750 por mês | +| Tempo de engenharia | $800 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 3.000.000+ | +| Custo por query | $0 | $0.00025 | +| Infraestrutura | Centralizada | Descentralizada | +| Custo de engenharia | $200 por hora | Incluído | +| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $1.650+ | $750 | ## Utilizador de Volume Alto (30.000.000+ queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -|:-------------------------------:|:-------------------------------------------:|:-----------------------------------------------------------------:| -| Custo mensal de servidor\* | $1.100 por mês, por node | $0 | -| Custos de query | $4.000 | $4.500 por mês | -| Número de nodes necessário | 10 | Não se aplica | -| Tempo de engenharia | $6.000 ou mais por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 30.000.000+ | -| Custo por query | $0 | $0.00015 | -| Infraestrutura | Centralizada | Descentralizada | -| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $11.000+ | $4.500 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +| :-: | :-: | :-: | +| Custo mensal de servidor\* | $1.100 por mês, por node | $0 | +| Custos de query | $4.000 | $4.500 por mês | +| Número de nodes necessário | 10 | Não se aplica | +| Tempo de engenharia | $6.000 ou mais por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 30.000.000+ | +| Custo por query | $0 | $0.00015 | +| Infraestrutura | Centralizada | Descentralizada | +| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $11.000+ | $4.500 | \*com custos de backup incluídos: $50-$100 por mês diff --git a/website/pages/pt/network/delegating.mdx b/website/pages/pt/network/delegating.mdx index 1eff5f9b506c..38324efaa954 100644 --- a/website/pages/pt/network/delegating.mdx +++ b/website/pages/pt/network/delegating.mdx @@ -33,7 +33,8 @@ Se um Delegado quiser cancelar a sua delegação, seus tokens estarão sujeitos Considere escolher um Indexador com muito cuidado. Se escolher um Indexador que não é de confiança, ou não fez um bom trabalho, talvez queira cancelar a sua delegação, o que implica em sacrificar muitas oportunidades de recompensa, o que pode ser tão lamentável quanto queimar GRT.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Perceba a taxa de 0.5% na interface da Delegação, além do período de separação de 28 dias._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Perceba a taxa de 0.5% na interface da Delegação, além do + período de separação de 28 dias._
    ### Como escolher um Indexador de confiança, com um pagamento justo para Delegantes @@ -43,7 +44,8 @@ Isto é importante. Primeiro, vamos discutir três valores muito importantes: os Porção da Recompensa de Indexação - Esta é a porção das recompensas que o Indexador guardará para si. Isto significa que, se configurada para 100%, o Delegante receberá 0 recompensas de indexação. Se ver 80% na interface, isto significa que, como Delegado, receberá 20%. Importante saber que no começo da rede, as Recompensas de Indexação contarão como a maioria das recompensas.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *O Indexador acima está a dar 90% das recompensas aos Delegantes, o do meio dá 20%, e o de baixo dá cerca de 83%.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *O Indexador acima está a dar 90% das recompensas aos Delegantes, + o do meio dá 20%, e o de baixo dá cerca de 83%.*
    - Porção da Taxa de Recompensa - Isto funciona exatamente como a Porção da Recompensa de Indexação, sendo especificamente para retornos nas taxas de consulta coletadas pelo Indexador. Perceba que, no começo da rede, os retornos de taxas de query serão muito menores que a recompensa de indexação. Vale prestar atenção na rede para determinar quando as taxas de consulta na rede começarão a ser mais significantes. diff --git a/website/pages/pt/network/indexing.mdx b/website/pages/pt/network/indexing.mdx index 2e04edc3b940..e22041a8bb18 100644 --- a/website/pages/pt/network/indexing.mdx +++ b/website/pages/pt/network/indexing.mdx @@ -63,7 +63,7 @@ Use o Etherscan para chamar o `getRewards()`: - Navegue à [interface do Etherscan para o contrato de Recompensas](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) * Para chamar o `getRewards()`: - - Abra o *dropdown* **10. getRewards**. + - Abra o _dropdown_ **10. getRewards**. - Insira a **allocationID**. - Clique no botão **Query**. @@ -112,12 +112,12 @@ Os Indexadores podem se diferenciar ao aplicar técnicas avançadas para decidir - **Médio** — Indexador de Produção. Apoia 100 subgraphs e 200 – 500 pedidos por segundo. - **Grande** — Preparado para indexar todos os subgraphs usados atualmente e servir pedidos para o tráfego relacionado. -| Setup | Postgres
    (CPUs) | Postgres
    (memória em GBs) | Postgres
    (disco em TBs) | VMs
    (CPUs) | VMs
    (memória em GBs) | -| ------- |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| -| Pequeno | 4 | 8 | 1 | 4 | 16 | -| Normal | 8 | 30 | 1 | 12 | 48 | -| Médio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memória em GBs) | Postgres
    (disco em TBs) | VMs
    (CPUs) | VMs
    (memória em GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Pequeno | 4 | 8 | 1 | 4 | 16 | +| Normal | 8 | 30 | 1 | 12 | 48 | +| Médio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3.5 | 48 | 184 | ### Há alguma precaução básica de segurança que um Indexador deve tomar? @@ -149,20 +149,20 @@ Nota: Para apoiar o escalamento ágil, recomendamos que assuntos de consulta e i #### Graph Node -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| ----- | ------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | Servidor HTTP GraphQL
    (para consultas de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | -| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | -| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| --- | --- | --- | --- | --- | +| 8000 | Servidor HTTP GraphQL
    (para consultas de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | +| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | +| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | #### Serviço Indexador -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| ----- | ------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | Servidor HTTP GraphQL
    (para consultas de subgraph pagas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| --- | --- | --- | --- | --- | +| 7600 | Servidor HTTP GraphQL
    (para consultas de subgraph pagas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Agente Indexador diff --git a/website/pages/pt/operating-graph-node.mdx b/website/pages/pt/operating-graph-node.mdx index c0267166d1be..c9684ffc559f 100644 --- a/website/pages/pt/operating-graph-node.mdx +++ b/website/pages/pt/operating-graph-node.mdx @@ -77,13 +77,13 @@ Veja uma configuração de exemplo completa do Kubernetes no [repositório de in Durante a execução, o Graph Node expõe as seguintes portas: -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| ----- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | Servidor HTTP GraphQL
    (para queries de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | -| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | -| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| --- | --- | --- | --- | --- | +| 8000 | Servidor HTTP GraphQL
    (para queries de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | +| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | +| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | > **Importante:** Cuidado ao expor portas publicamente; as **portas de administração** devem ser trancadas a sete chaves. Isto inclui o endpoint JSON-RPC do Graph Node. diff --git a/website/pages/pt/querying/graphql-api.mdx b/website/pages/pt/querying/graphql-api.mdx index 207c226d9d8e..733da228a890 100644 --- a/website/pages/pt/querying/graphql-api.mdx +++ b/website/pages/pt/querying/graphql-api.mdx @@ -208,7 +208,7 @@ No seguinte exemplo, filtramos por desafios com `outcome`, `succeeded` e `number ``` > **Açúcar sintático**: pode simplificar a consulta acima ao retirar o operador `and`, com o passe de uma subexpressão separada por vírgulas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Buscas fulltext têm um campo obrigatório, `text`, para ofertar termos de busca Operadores de busca fulltext: -| Símbolo | Operador | Descrição | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Para combinar múltiplos termos de busca num filtro para entidades que incluem todos os termos fornecidos | -| | | `Or` | Consultas com vários termos de busca separados pelo operador `or` retornarão todas as entidades com uma correspondência de qualquer termo providenciado | -| `<->` | `Follow by` | Especifica a distância entre duas palavras. | -| `:*` | `Prefix` | Use o prefixo para encontrar palavras que correspondem a tal prefixo (2 caracteres necessários.) | +| Símbolo | Operador | Descrição | +| --- | --- | --- | +| `&` | `And` | Para combinar múltiplos termos de busca num filtro para entidades que incluem todos os termos fornecidos | +| | | `Or` | Consultas com vários termos de busca separados pelo operador `or` retornarão todas as entidades com uma correspondência de qualquer termo providenciado | +| `<->` | `Follow by` | Especifica a distância entre duas palavras. | +| `:*` | `Prefix` | Use o prefixo para encontrar palavras que correspondem a tal prefixo (2 caracteres necessários.) | #### Exemplos diff --git a/website/pages/pt/querying/querying-from-an-application.mdx b/website/pages/pt/querying/querying-from-an-application.mdx index 6cea3da1b2c0..de13777f23d5 100644 --- a/website/pages/pt/querying/querying-from-an-application.mdx +++ b/website/pages/pt/querying/querying-from-an-application.mdx @@ -102,7 +102,7 @@ Finalmente, atualize o seu arquivo `.ts` para usar os documentos digitados em Gr import React, { useEffect } from 'react' // ... // nós importamos tipos e documentos em graphql do código gerado -(`..graphclient/`) +;`..graphclient/` import { ExampleQueryDocument, ExampleQueryQuery, execute } from '../.graphclient' function App() { diff --git a/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx b/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx index df425838fea1..ce410b9ed255 100644 --- a/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Renomeie as suas variáveis duplicadas, se tinha o sombreamento variável. + ### Comparações de Nulos + Ao fazer a atualização no seu subgraph, às vezes aparecem erros como este: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Para resolver isto, basta mudar a declaração `if` para algo assim: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Para consertar este problema, vale criar uma variável para aquele acesso à propriedade, para que o compilador faça a magia da checagem de anulabilidade: ```typescript diff --git a/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx b/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx index 0bb187eb6fc0..3103ee0c6de5 100644 --- a/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx @@ -256,8 +256,7 @@ query { } ``` -**Conflicting fields with arguments (#OverlappingFieldsCanBeMergedRule)** -(Campos em conflito com argumentos) +**Conflicting fields with arguments (#OverlappingFieldsCanBeMergedRule)** (Campos em conflito com argumentos) ```graphql # Argumentos diferentes podem levar a dados diferentes, @@ -468,10 +467,10 @@ Estas referências desconhecidas devem ser consertadas: - caso contrário, remova ### Fragment: invalid spread or definition + (Fragment: espalhamento ou definição inválidos) -**Invalid Fragment spread (#PossibleFragmentSpreadsRule)** -(Espalhamento de fragment inválido) +**Invalid Fragment spread (#PossibleFragmentSpreadsRule)** (Espalhamento de fragment inválido) Um Fragment não pode ser espalhado em um tipo não aplicável. @@ -511,8 +510,7 @@ fragment inlineFragOnScalar on Dog { ### Uso de Diretivas -**Directive cannot be used at this location (#KnownDirectivesRule)** -(A diretiva não pode ser usada neste local) +**Directive cannot be used at this location (#KnownDirectivesRule)** (A diretiva não pode ser usada neste local) Apenas diretivas GraphQL (`@...`) apoiadas pela API do The Graph podem ser usadas. @@ -529,8 +527,7 @@ query { _Nota: `@stream`, `@live`, e `@defer` não têm apoio._ -**Directive can only be used once at this location (#UniqueDirectivesPerLocationRule)** -(A diretiva só pode ser usada neste local uma vez) +**Directive can only be used once at this location (#UniqueDirectivesPerLocationRule)** (A diretiva só pode ser usada neste local uma vez) As diretivas apoiadas pelo The Graph só podem ser usadas uma vez por local. diff --git a/website/pages/ro/developing/creating-a-subgraph.mdx b/website/pages/ro/developing/creating-a-subgraph.mdx index db9e8a024571..39f58ac2083b 100644 --- a/website/pages/ro/developing/creating-a-subgraph.mdx +++ b/website/pages/ro/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/ro/developing/graph-ts/api.mdx b/website/pages/ro/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/ro/developing/graph-ts/api.mdx +++ b/website/pages/ro/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/ro/developing/unit-testing-framework.mdx b/website/pages/ro/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/ro/developing/unit-testing-framework.mdx +++ b/website/pages/ro/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/ro/network/benefits.mdx b/website/pages/ro/network/benefits.mdx index 09c0548bfc4f..864672b16515 100644 --- a/website/pages/ro/network/benefits.mdx +++ b/website/pages/ro/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/ro/network/indexing.mdx b/website/pages/ro/network/indexing.mdx index 842a5c8e0c74..9bdc2fb2eb7e 100644 --- a/website/pages/ro/network/indexing.mdx +++ b/website/pages/ro/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/ro/operating-graph-node.mdx b/website/pages/ro/operating-graph-node.mdx index a7dd15e7a84c..4f0f856db111 100644 --- a/website/pages/ro/operating-graph-node.mdx +++ b/website/pages/ro/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/ro/querying/graphql-api.mdx b/website/pages/ro/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/ro/querying/graphql-api.mdx +++ b/website/pages/ro/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/ru/developing/creating-a-subgraph.mdx b/website/pages/ru/developing/creating-a-subgraph.mdx index 5829d571fedb..6b0b51c8aa7e 100644 --- a/website/pages/ru/developing/creating-a-subgraph.mdx +++ b/website/pages/ru/developing/creating-a-subgraph.mdx @@ -82,7 +82,7 @@ graph add
    [] Параметр `--merge-entities` определяет, как разработчик хотел бы обрабатывать конфликты имен `entity` и `event`: -- Если `true`: новый ` dataSource ` должен использовать существующие ` eventHandlers` & `entities`. +- Если `true`: новый `dataSource` должен использовать существующие ` eventHandlers` & `entities`. - Если `false`: следует создать новую сущность и обработчик событий с помощью `${dataSourceName}{EventName}`. Контракт `address` будет записан в `networks.json` для соответствующей сети. @@ -146,7 +146,7 @@ dataSources: - `description`: понятное описание того, что представляет собой субграф. Это описание отображается в Graph Explorer при развертывании субграфа в хостинговом сервисе. -- ` repository `: URL-адрес репозитория, в котором можно найти манифест субграфа. Это также отображается в The Graph Explorer. +- `repository`: URL-адрес репозитория, в котором можно найти манифест субграфа. Это также отображается в The Graph Explorer. - `features`: список всех используемых имен [функций](#experimental-features). @@ -248,15 +248,15 @@ Null value resolved for non-null field 'name' Мы поддерживаем следующие скаляры в нашем GraphQL API: -| Тип | Описание | -| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Массив байтов, представленный в виде шестнадцатеричной строки. Обычно используется для хэшей и адресов Ethereum. | -| `String` | Скаляр для значений `string`. Нулевые символы не поддерживаются и автоматически удаляются. | -| `Boolean` | Скаляр для значений `boolean`. | -| `Int` | Спецификация GraphQL определяет `Int` как имеющий размер 32 байта. | -| `Int8` | 8-байтовое целое число со знаком, также называемое 64-битным целым числом со знаком, может хранить значения в диапазоне от -9 223 372 036 854 775 808 до 9 223 372 036 854 775 807. Предпочтительно использовать это для представления `i64` из Ethereum. | -| `BigInt` | Большие целые числа. Используются для типов Ethereum `uint32`, `int64`, `uint64`, ..., `uint256`. Примечание: Все, что находится ниже `uint32`, например, `int32`, `uint24` или `int8`, представлено как `i32`. | -| `BigDecimal` | `BigDecimal` Десятичные дроби высокой точности, представленные в виде значащего числа и экспоненты. Диапазон значений экспоненты от -6143 до +6144. Округляется до 34 значащих цифр. | +| Тип | Описание | +| --- | --- | +| `Bytes` | Массив байтов, представленный в виде шестнадцатеричной строки. Обычно используется для хэшей и адресов Ethereum. | +| `String` | Скаляр для значений `string`. Нулевые символы не поддерживаются и автоматически удаляются. | +| `Boolean` | Скаляр для значений `boolean`. | +| `Int` | Спецификация GraphQL определяет `Int` как имеющий размер 32 байта. | +| `Int8` | 8-байтовое целое число со знаком, также называемое 64-битным целым числом со знаком, может хранить значения в диапазоне от -9 223 372 036 854 775 808 до 9 223 372 036 854 775 807. Предпочтительно использовать это для представления `i64` из Ethereum. | +| `BigInt` | Большие целые числа. Используются для типов Ethereum `uint32`, `int64`, `uint64`, ..., `uint256`. Примечание: Все, что находится ниже `uint32`, например, `int32`, `uint24` или `int8`, представлено как `i32`. | +| `BigDecimal` | `BigDecimal` Десятичные дроби высокой точности, представленные в виде значащего числа и экспоненты. Диапазон значений экспоненты от -6143 до +6144. Округляется до 34 значащих цифр. | #### Перечисления @@ -450,7 +450,7 @@ query { } ``` -> **[Управление функциями](#experimental-features):** Начиная с `specVersion` `0.0.4` и далее, ` fullTextSearch ` должно быть объявлено в разделе `features` в манифесте субграфа. +> **[Управление функциями](#experimental-features):** Начиная с `specVersion` `0.0.4` и далее, `fullTextSearch` должно быть объявлено в разделе `features` в манифесте субграфа. ### Поддерживаемые языки @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Примечание:** Новый источник данных будет обрабатывать только вызовы и события для блока, в котором он был создан, и всех последующих блоков, но не будет обрабатывать исторические данные, т.е. данные, которые содержатся в предыдущих блоках. -> +> > Если предыдущие блоки содержат данные, относящиеся к новому источнику данных, лучше всего проиндексировать эти данные, считывая текущее состояние контракта и создавая сущности, представляющие это состояние на момент создания нового источника данных. ### Контекст источника данных @@ -716,7 +716,7 @@ dataSources: ``` > **Примечание:** Блок создания контракта можно быстро найти в Etherscan: -> +> > 1. Найдите контракт, введя его адрес в строке поиска. > 2. Нажмите на хэш транзакции создания в разделе `Contract Creator`. > 3. Загрузите страницу сведений о транзакции, где вы найдете начальный блок для этого контракта. @@ -756,7 +756,7 @@ dataSources: handler: handleCreateGravatar ``` -` function ` - это нормализованная сигнатура функции, по которой можно фильтровать вызовы. Свойство `handler` - это имя функции в вашем мэппинге, которую вы хотели бы выполнить при вызове целевой функции в контракте источника данных. +`function` - это нормализованная сигнатура функции, по которой можно фильтровать вызовы. Свойство `handler` - это имя функции в вашем мэппинге, которую вы хотели бы выполнить при вызове целевой функции в контракте источника данных. ### Функция мэппинга @@ -792,7 +792,7 @@ filter: _Определенный обработчик будет вызван один раз для каждого блока, содержащего обращение к контракту (источнику данных), в соответствии с которым определен обработчик._ -> **Примечание:** Фильтр ` call ` в настоящее время зависит от Parity tracing API. Некоторые сети, такие как BNB chain и Arbitrium, не поддерживают этот API. Если субграф, индексирующий одну из этих сетей, содержит один или несколько обработчиков блоков с фильтром `call`, синхронизация не начнется. +> **Примечание:** Фильтр `call` в настоящее время зависит от Parity tracing API. Некоторые сети, такие как BNB chain и Arbitrium, не поддерживают этот API. Если субграф, индексирующий одну из этих сетей, содержит один или несколько обработчиков блоков с фильтром `call`, синхронизация не начнется. Отсутствие фильтра для обработчика блоков гарантирует, что обработчик вызывается для каждого блока. Источник данных может содержать только один обработчик блоков для каждого типа фильтра. diff --git a/website/pages/ru/developing/graph-ts/api.mdx b/website/pages/ru/developing/graph-ts/api.mdx index ee862b0468c2..bcd8b829a24b 100644 --- a/website/pages/ru/developing/graph-ts/api.mdx +++ b/website/pages/ru/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Версия | Примечания к релизу | -| :----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Версия | Примечания к релизу | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Встроенные типы @@ -229,7 +229,7 @@ Entities written to the store map one-to-one to the `@entity` types defined in t // Импорт класса событий Transfer, сгенерированного из ERC20 ABI import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' -// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL +// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL import { Transfer } from '../generated/schema' событие // Обработчик события передачи @@ -263,7 +263,6 @@ if (transfer == null) { transfer = new Transfer(id) } - // Используйте объект Transfer, как и раньше ``` @@ -284,7 +283,6 @@ if (transfer == null) { transfer = new Transfer(id) } - // Используйте объект Transfer, как и раньше ``` @@ -661,8 +659,8 @@ It is also possible to process larger files in a streaming fashion with `ipfs.ma import { JSONValue, Value } from '@graphprotocol/graph-ts' export function processItem(value: JSONValue, userData: Value): void { -// Смотрите документацию по JsonValue для получения подробной информации о работе -// со значениями JSON + // Смотрите документацию по JsonValue для получения подробной информации о работе + // со значениями JSON let obj = value.toObject() let id = obj.get('id') let title = obj.get('title') @@ -671,7 +669,7 @@ export function processItem(value: JSONValue, userData: Value): void { return } -// Обратные вызовы также могут создавать объекты + // Обратные вызовы также могут создавать объекты let newItem = new Item(id) newItem.title = title.toString() newitem.parent = userData.toString() // Установите для родителя значение "parentId" @@ -736,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Справка по преобразованию типов -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() или s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() или s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ----------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() или s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() или s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Метаданные источника данных diff --git a/website/pages/ru/developing/unit-testing-framework.mdx b/website/pages/ru/developing/unit-testing-framework.mdx index 7e7e69bc9b0e..c1b2101a874b 100644 --- a/website/pages/ru/developing/unit-testing-framework.mdx +++ b/website/pages/ru/developing/unit-testing-framework.mdx @@ -371,7 +371,7 @@ describe("handleNewGravatars, () => { ```typescript import { describe, test, beforeEach } from 'matchstick-as/assembly/index' -import { handleUpdatedGravatar, handleNewGravatar } from "../../src/gravity" +import { handleUpdatedGravatar, handleNewGravatar } from '../../src/gravity' describe('handleUpdatedGravatars', () => { beforeEach(() => { @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). Это означает, что Вы использовали в своем коде `console.log`, который не поддерживается AssemblyScript. Пожалуйста, рассмотрите возможность использования [API логирования](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Несовпадение в аргументах вызвано несоответствием в `graph-ts` и `matchstick-as`. Лучший способ устранить проблемы, подобные этой, - обновить всё до последней выпущенной версии. diff --git a/website/pages/ru/network/benefits.mdx b/website/pages/ru/network/benefits.mdx index 2d482b34f48c..05dfe6b13c35 100644 --- a/website/pages/ru/network/benefits.mdx +++ b/website/pages/ru/network/benefits.mdx @@ -27,53 +27,54 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## Пользователь с небольшим количеством запросов (менее 30 000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -|:---------------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | -| Стоимость запроса | $0+ | ~$15 в месяц | -| Время разработки | $400 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000 (автоматическое масштабирование) | -| Стоимость одного запроса | $0 | $0.0005 | -| Инфраструктура | Централизованная | Децентрализованная | -| Географическая избыточность | $750+ за каждую дополнительную ноду | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $750+ | ~$15 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +| :-: | :-: | :-: | +| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | +| Стоимость запроса | $0+ | ~$15 в месяц | +| Время разработки | $400 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000 (автоматическое масштабирование) | +| Стоимость одного запроса | $0 | $0.0005 | +| Инфраструктура | Централизованная | Децентрализованная | +| Географическая избыточность | $750+ за каждую дополнительную ноду | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $750+ | ~$15 | ## Пользователь со средним количеством запросов (более 3,000,000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -|:---------------------------------:|:-------------------------------------------------------------:|:---------------------------------------------------------------:| -| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | -| Стоимость запроса | $500 в месяц | $750 в месяц | -| Время разработки | $800 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 3,000,000+ | -| Стоимость одного запроса | $0 | $0.00025 | -| Инфраструктура | Централизованная | Децентрализованная | -| Инженерные расходы | $200 в час | Включено | -| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $1,650+ | $750 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +| :-: | :-: | :-: | +| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | +| Стоимость запроса | $500 в месяц | $750 в месяц | +| Время разработки | $800 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 3,000,000+ | +| Стоимость одного запроса | $0 | $0.00025 | +| Инфраструктура | Централизованная | Децентрализованная | +| Инженерные расходы | $200 в час | Включено | +| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $1,650+ | $750 | ## Пользователь с высоким количеством запросов (более 30,000,000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -|:---------------------------------:|:-------------------------------------------------------------:|:---------------------------------------------------------------:| -| Ежемесячная стоимость сервера\* | $1100 в месяц за ноду | $0 | -| Стоимость запроса | $4000 | $4,500 в месяц | -| Необходимое количество нод | 10 | Не подходит | -| Время разработки | $6,000 или больше в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000,000+ | -| Стоимость одного запроса | $0 | $0.00015 | -| Инфраструктура | Централизованная | Децентрализованная | -| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $11,000+ | $4,500 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +| :-: | :-: | :-: | +| Ежемесячная стоимость сервера\* | $1100 в месяц за ноду | $0 | +| Стоимость запроса | $4000 | $4,500 в месяц | +| Необходимое количество нод | 10 | Не подходит | +| Время разработки | $6,000 или больше в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000,000+ | +| Стоимость одного запроса | $0 | $0.00015 | +| Инфраструктура | Централизованная | Децентрализованная | +| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $11,000+ | $4,500 | \* включая расходы на резервное копирование: $50-$100 в месяц Время разработки основано на предположении о $200 в час -используя функцию максимального бюджета запроса на вкладке бюджетное выставление счетов, сохраняя при этом высокое качество обслуживания +используя функцию максимального бюджета запроса на вкладке бюджетное выставление счетов, сохраняя при этом +высокое качество обслуживания Предполагаемые затраты указаны только для субграфов в основной сети Ethereum — затраты еще выше при самостоятельном размещении `graph-node` в других сетях. diff --git a/website/pages/ru/network/delegating.mdx b/website/pages/ru/network/delegating.mdx index ed6f3a0c5332..5d2bdf1326a5 100644 --- a/website/pages/ru/network/delegating.mdx +++ b/website/pages/ru/network/delegating.mdx @@ -33,8 +33,8 @@ title: Делегирование Еще одним аспектом, который стоит учитывать, является разумный выбор Индексатора. Если вы выберете ненадежного или некомпетентного Индексатора, вам, возможно, захочется отозвать делегирование, что в свою очередь означает потерю множества возможностей для получения вознаграждений. Это может быть столь плохо, как и сжигание токенов GRT.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Обратите внимание на комиссию в размере 0,5% в пользовательском интерфейсе Delegation, а также на 28-дневный срок - период разблокировки._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Обратите внимание на комиссию в размере 0,5% в + пользовательском интерфейсе Delegation, а также на 28-дневный срок период разблокировки._
    ### Выбор надежного Индексатора со справедливым распределением вознаграждений для Делегаторов diff --git a/website/pages/ru/network/indexing.mdx b/website/pages/ru/network/indexing.mdx index 6269c5fd4f9d..ab88480b0ba3 100644 --- a/website/pages/ru/network/indexing.mdx +++ b/website/pages/ru/network/indexing.mdx @@ -113,11 +113,11 @@ Once an allocation has been closed the rebates are available to be claimed by th - **Large** – готовность индексировать все используемые в настоящее время подграфы и обслуживать запросы на соответствующий трафик. | Настройка | Postgres
    (ЦП) | Postgres
    (память в ГБ) | Postgres
    (диск в ТБ) | VMs
    (ЦП) | VMs
    (память в ГБ) | -| --------- |:------------------------:|:---------------------------------:|:-------------------------------:|:-------------------:|:----------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### Какие основные меры безопасности следует предпринять индексатору? @@ -149,26 +149,26 @@ Once an allocation has been closed the rebates are available to be claimed by th #### Graph Node -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| ---- | ------------------------------------------------------------ | ---------------------------------------------------- | ----------------- | ---------------- | -| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | -| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | -| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| --- | --- | --- | --- | --- | +| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | +| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | +| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | #### Indexer Service -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | HTTP-сервер GraphQL
    (для платных запросов к подграфам) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| --- | --- | --- | --- | --- | +| 7600 | HTTP-сервер GraphQL
    (для платных запросов к подграфам) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Показатели Prometheus | /metrics | --metrics-port | - | #### Indexer Agent -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| ---- | ------------------------------- | ------------ | ------------------------- | --------------------------------------- | -| 8000 | API для управления индексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| --- | --- | --- | --- | --- | +| 8000 | API для управления индексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### Настройка серверной инфраструктуры с помощью Terraform в Google Cloud diff --git a/website/pages/ru/operating-graph-node.mdx b/website/pages/ru/operating-graph-node.mdx index 22601fc637b7..dd51cc588968 100644 --- a/website/pages/ru/operating-graph-node.mdx +++ b/website/pages/ru/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ Во время работы Graph Node предоставляет следующие порты: -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| ---- | ------------------------------------------------------------ | ---------------------------------------------------- | ----------------- | ---------------- | -| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | -| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | -| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| --- | --- | --- | --- | --- | +| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | +| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | +| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | > **Важно**. Будьте осторожны, открывая порты для общего доступа — **порты администрирования** должны быть заблокированы. Это касается конечных точек Graph Node JSON-RPC. diff --git a/website/pages/ru/querying/graphql-api.mdx b/website/pages/ru/querying/graphql-api.mdx index 9bcb91258a9d..2637a70c52e8 100644 --- a/website/pages/ru/querying/graphql-api.mdx +++ b/website/pages/ru/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { ``` > **Syntactic sugar:**. Вы можете упростить приведенный выше запрос, удалив оператор `and`, передав подвыражение, разделенное запятыми. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) Полнотекстовые поисковые операторы: -| Символ | Оператор | Описание | -| ----------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Для объединения нескольких условий поиска в фильтр для объектов, которые включают все указанные условия | -| | | `Or` | Запросы с несколькими условиями поиска, разделенные оператором or, вернут все объекты, которые соответствуют любому из предоставленных условий | -| `<->` | `Follow by` | Укажите расстояние между двумя словами. | -| `:*` | `Prefix` | Используйте поисковый запрос по префиксу, чтобы найти слова с соответствующим префиксом (необходимо 2 символа) | +| Символ | Оператор | Описание | +| --- | --- | --- | +| `&` | `And` | Для объединения нескольких условий поиска в фильтр для объектов, которые включают все указанные условия | +| | | `Or` | Запросы с несколькими условиями поиска, разделенные оператором or, вернут все объекты, которые соответствуют любому из предоставленных условий | +| `<->` | `Follow by` | Укажите расстояние между двумя словами. | +| `:*` | `Prefix` | Используйте поисковый запрос по префиксу, чтобы найти слова с соответствующим префиксом (необходимо 2 символа) | #### Примеры diff --git a/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx index 4839cf7e4b60..fc783e57bfc5 100644 --- a/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx @@ -19,21 +19,16 @@ title: Руководство по миграции AssemblyScript - Добавлена поддержка x instanceof GenericClass ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) - Добавлен `StaticArray`, более эффективный вариант массива ([v0.9.3](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.3)) - Добавлен `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -- Реализован аргумент `radix` для `Number#toString` ( -v0.10.1)
  • - - - Добавлена поддержка разделителей в литералах с плавающей точкой ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) +- Реализован аргумент `radix` для `Number#toString` ([v0.10.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.1)) +- Добавлена поддержка разделителей в литералах с плавающей точкой ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) - Добавлена поддержка функций первого класса ([v0.14.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.0)) - Добавление встроенных модулей: `i32/i64/f32/f64.add/sub/mul` ([v0.14.13](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.13)) - Внедрение `Array/TypedArray/String#at` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) - Добавлена поддержка литеральных строк шаблона ([v0.18.17](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.17)) - Добавление `encodeURI(Component)` и `decodeURI(Component)` ([v0.18.27](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.27)) -- Добавление `toString`, `toDateString` и `toTimeString` к `Date` ([v0.18.29](https://github.com/ AssemblyScript/assemblyscript/releases/tag/v0.18.29)) -- Добавление `toUTCString` для `Date` (v0.18.30) - - - Добавление встроенного типа `nonnull/NonNullable` ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) - - +- Добавление `toString`, `toDateString` и `toTimeString` к `Date` ([v0.18.29](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.29)) +- Добавление `toUTCString` для `Date` ([v0.18.30](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.30)) +- Добавление встроенного типа `nonnull/NonNullable` ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) ### Оптимизации @@ -42,21 +37,15 @@ v0.10.1) - Кэширование большего количества обращений к полям в std Map и Set ([v0.17.8](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.8)) - Оптимизация по двум степеням в `ipow32/64` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) - - ### Прочее - Тип литерала массива теперь можно определить по его содержимому ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) - Стандартная библиотека обновлена до версии Unicode 13.0.0 ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) - - ## Как выполнить обновление? 1. Измените мэппинги `apiVersion` в `subgraph.yaml` на `0.0.6`: - - ```yaml ... dataSources: @@ -67,11 +56,8 @@ dataSources: ... ``` - 2. Обновите используемый Вами `graph-cli` до `latest` версии, выполнив: - - ```bash # если он у Вас установлен глобально npm install --global @graphprotocol/graph-cli@latest @@ -80,31 +66,21 @@ npm install --global @graphprotocol/graph-cli@latest npm install --save-dev @graphprotocol/graph-cli@latest ``` - 3. Сделайте то же самое для `graph-ts`, но вместо глобальной установки сохраните его в своих основных зависимостях: - - ```bash npm install --save @graphprotocol/graph-ts@latest ``` - 4. Следуйте остальной части руководства, чтобы исправить языковые изменения. 5. Снова запустите `codegen` и `deploy`. - - ## Критические изменения - - ### Обнуляемость В более старой версии AssemblyScript можно было создать такой код: - - ```typescript function load(): Value | null { ... } @@ -112,11 +88,8 @@ let maybeValue = load(); maybeValue.aMethod(); ``` - Однако в новой версии, поскольку значение обнуляемо, требуется проверка, например, такая: - - ```typescript let maybeValue = load() @@ -125,39 +98,28 @@ if (maybeValue) { } ``` - Или принудительно вот такая: - - ```typescript let maybeValue = load()! // прерывается во время выполнения, если значение равно null maybeValue.aMethod() ``` - Если Вы не уверены, что выбрать, мы рекомендуем всегда использовать безопасную версию. Если значение не существует, Вы можете просто выполнить раннее выражение if с возвратом в обработчике субграфа. - - ### Затенение переменных Раньше можно было сделать [затенение переменных](https://en.wikipedia.org/wiki/Variable_shadowing) и код, подобный этому, работал: - - ```typescript let a = 10 let b = 20 let a = a + b ``` - Однако теперь это больше невозможно, и компилятор возвращает эту ошибку: - - ```typescript ERROR TS2451: Cannot redeclare block-scoped variable 'a' @@ -166,16 +128,12 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' in assembly/index.ts(4,3) ``` - Вам нужно будет переименовать дублированные переменные, если Вы используете затенение переменных. - ### Нулевые сравнения Выполняя обновление своего субграфа, иногда Вы можете получить такие ошибки: - - ```typescript ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt'. if (decimals == null) { @@ -183,11 +141,8 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i in src/mappings/file.ts(41,21) ``` - Чтобы решить эту проблему, Вы можете просто изменить оператор `if` на что-то вроде этого: - - ```typescript if (!decimals) { @@ -196,23 +151,17 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i if (decimals === null) { ``` - Подобное относится к случаям, когда вместо == используется !=. - - ### Кастинг Раньше для кастинга обычно использовалось ключевое слово `as`, например: - - ```typescript let byteArray = new ByteArray(10) let uint8Array = byteArray as Uint8Array // equivalent to: byteArray ``` - Однако это работает только в двух случаях: - Примитивный кастинг (между такими типами, как `u8`, `i32`, `bool`; например: `let b: isize = 10; b as usize`); @@ -220,8 +169,6 @@ let uint8Array = byteArray as Uint8Array // equivalent to: byteArray Примеры: - - ```typescript // примитивный кастинг let a: usize = 10 @@ -229,9 +176,6 @@ let b: isize = 5 let c: usize = a + (b as usize) ``` - - - ```typescript // укрупнение по наследованию классов class Bytes extends Uint8Array {} @@ -240,14 +184,11 @@ let bytes = new Bytes(2) // bytes // то же, что: bytes as Uint8Array ``` - Есть два сценария, в которых Вы можете захотеть выполнить преобразование, но использовать `as`/`var` **небезопасно**: - Понижение уровня наследования классов (superclass → subclass) - Между двумя типами, имеющими общий супер класс - - ```typescript // понижение уровня наследования классов class Bytes extends Uint8Array {} @@ -256,9 +197,6 @@ let uint8Array = new Uint8Array(2) // uint8Array // перерывы в работе :( ``` - - - ```typescript // между двумя типами, имеющими общий суперкласс class Bytes extends Uint8Array {} @@ -268,11 +206,8 @@ let bytes = new Bytes(2) // bytes // перерывы в работе :( ``` - В таких случаях можно использовать функцию `changetype`: - - ```typescript // понижение уровня наследования классов class Bytes extends Uint8Array {} @@ -281,9 +216,6 @@ let uint8Array = new Uint8Array(2) changetype(uint8Array) // работает :) ``` - - - ```typescript // между двумя типами, имеющими общий суперкласс class Bytes extends Uint8Array {} @@ -293,11 +225,8 @@ let bytes = new Bytes(2) changetype(bytes) // работает :) ``` - Если Вы просто хотите удалить значение NULL, Вы можете продолжать использовать оператор `as` (или `variable`), но помните, что значение не может быть нулевым, иначе оно сломается. - - ```typescript // удалить значение NULL let previousBalance = AccountBalance.load(balanceId) // AccountBalance | null @@ -309,7 +238,6 @@ if (previousBalance != null) { let newBalance = new AccountBalance(balanceId) ``` - В случае обнуления мы рекомендуем Вам обратить внимание на [функцию проверки обнуления](https://www.assemblyscript.org/basics.html#nullability-checks), это сделает ваш код чище 🙂 Также мы добавили еще несколько статических методов в некоторые типы, чтобы облегчить кастинг: @@ -319,14 +247,10 @@ let newBalance = new AccountBalance(balanceId) - BigInt.fromByteArray - ByteArray.fromBigInt - - ### Проверка нулевого значения с доступом к свойству Чтобы применить [функцию проверки на нулевое значение](https://www.assemblyscript.org/basics.html#nullability-checks), Вы можете использовать операторы `if` или тернарный оператор (`?` и `:`) следующим образом: - - ```typescript let something: string | null = 'data' @@ -343,11 +267,8 @@ if (something) { } ``` - Однако это работает только тогда, когда Вы выполняете `if` / тернарную операцию для переменной, а не для доступа к свойству, например: - - ```typescript class Container { data: string | null @@ -359,11 +280,8 @@ container.data = 'data' let somethingOrElse: string = container.data ? container.data : 'else' // не компилируется ``` - В результате чего выдается ошибка: - - ```typescript ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/string/String'. @@ -371,11 +289,8 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Чтобы решить эту проблему, Вы можете создать переменную для доступа к этому свойству, чтобы компилятор мог выполнять проверку допустимости значений NULL: - - ```typescript class Container { data: string | null @@ -389,15 +304,10 @@ let data = container.data let somethingOrElse: string = data ? data : 'else' // компилируется просто отлично :) ``` - - - ### Перегрузка оператора при доступе к свойствам Если Вы попытаетесь суммировать (например) тип, допускающий значение Null (из доступа к свойству), с типом, не допускающим значение Null, компилятор AssemblyScript вместо того, чтобы выдать предупреждение об ошибке компиляции, предупреждающую, что одно из значений допускает значение Null, просто компилируется молча, давая возможность сломать код во время выполнения. - - ```typescript class BigInt extends Uint8Array { @operator('+') @@ -420,11 +330,8 @@ let wrapper = new Wrapper(y) wrapper.n = wrapper.n + x // не выдает ошибок времени компиляции, как это должно быть ``` - Мы открыли вопрос по этому поводу для компилятора AssemblyScript, но пока, если Вы выполняете подобные операции в своих мэппингах субграфов, Вам следует изменить их так, чтобы перед этим выполнялась проверка на нулевое значение. - - ```typescript let wrapper = new Wrapper(y) @@ -435,37 +342,26 @@ if (!wrapper.n) { wrapper.n = wrapper.n + x // теперь `n` гарантированно будет BigInt ``` - - - ### Инициализация значения Если у Вас есть такой код: - - ```typescript var value: Type // null value.x = 10 value.y = 'content' ``` - Он будет скомпилирован, но сломается во время выполнения. Это происходит из-за того, что значение не было инициализировано, поэтому убедитесь, что Ваш субграф инициализировал свои значения, например так: - - ```typescript var value = new Type() // initialized value.x = 10 value.y = 'content' ``` - Также, если у Вас есть свойства, допускающие значение NULL, в объекте GraphQL, например: - - ```graphql type Total @entity { id: Bytes! @@ -473,11 +369,8 @@ type Total @entity { } ``` - И у Вас есть код, аналогичный этому: - - ```typescript let total = Total.load('latest') @@ -488,11 +381,8 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` - Вам необходимо убедиться, что значение `total.amount` инициализировано, потому что, если Вы попытаетесь получить доступ к сумме, как в последней строке, произойдет сбой. Таким образом, Вы либо инициализируете его первым: - - ```typescript let total = Total.load('latest') @@ -504,11 +394,8 @@ if (total === null) { total.tokens = total.tokens + BigInt.fromI32(1) ``` - Или Вы можете просто изменить свою схему GraphQL, чтобы не использовать тип, допускающий значение NULL для этого свойства. Тогда мы инициализируем его нулем на этапе `codegen` 😉 - - ```graphql type Total @entity { id: Bytes! @@ -516,9 +403,6 @@ type Total @entity { } ``` - - - ```typescript let total = Total.load('latest') @@ -529,15 +413,10 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` - - - ### Инициализация свойств класса Если Вы экспортируете какие-либо классы со свойствами, которые являются другими классами (декларированными Вами или стандартной библиотекой), то это выглядит следующим образом: - - ```typescript class Thing {} @@ -546,11 +425,8 @@ export class Something { } ``` - Компилятор выдаст ошибку, потому что Вам нужно либо добавить инициализатор для свойств, являющихся классами, либо добавить оператор `!`: - - ```typescript export class Something { constructor(public value: Thing) {} @@ -573,63 +449,44 @@ export class Something { } ``` - - - ### Инициализация массива Класс `Array` по-прежнему принимает число для инициализации длины списка, однако Вам следует соблюдать осторожность, поскольку такие операции, как `.push`, фактически увеличивают размер, а не добавляют его в начало, например: - - ```typescript let arr = new Array(5) // ["", "", "", "", ""] arr.push('something') // ["", "", "", "", "", "something"] // size 6 :( ``` - В зависимости от используемых типов, например, допускающих значение NULL, и способа доступа к ним, можно столкнуться с ошибкой времени выполнения, подобной этой: - - ``` ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/array.ts, line 110, column 40, with message: Element type must be nullable if array is holey wasm backtrace: 0: 0x19c4 - !~lib/@graphprotocol/graph-ts/index/format 1: 0x1e75 - !~lib/@graphprotocol/graph-ts/common/collections/Entity#constructor 2: 0x30b9 - !node_modules/@graphprotocol/graph-ts/global/global/id_of_type ``` - Для того чтобы фактически начать, Вы должны либо инициализировать `Array` нулевым размером, следующим образом: - - ```typescript let arr = new Array(0) // [] arr.push('something') // ["something"] ``` - Или Вы должны изменить его через индекс: - - ```typescript let arr = new Array(5) // ["", "", "", "", ""] arr[0] = 'something' // ["something", "", "", "", ""] ``` - - - ### Схема GraphQL Это не прямое изменение AssemblyScript, но Вам, возможно, придется обновить файл `schema.graphql`. Теперь Вы больше не можете определять поля в своих типах, которые являются списками, не допускающими значение NULL. Если у Вас такая схема: - - ```graphql type Something @entity { id: Bytes! @@ -641,11 +498,8 @@ type MyEntity @entity { } ``` - Вам нужно добавить `!` к элементу типа List, например, так: - - ```graphql type Something @entity { id: Bytes! @@ -657,11 +511,8 @@ type MyEntity @entity { } ``` - Изменение произошло из-за различий в допустимости значений NULL между версиями AssemblyScript и связано с файлом `src/generated/schema.ts` (путь по умолчанию, возможно, Вы его изменили). - - ### Прочее - `Map#set` и `Set#add` согласованы со спецификацией, произведён возврат к `this` ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) diff --git a/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx b/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx index 3a7f9b2fe642..8da2d2e032b9 100644 --- a/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx @@ -284,8 +284,8 @@ query { ```graphql query { - # В конце концов, у нас есть два определения "x", указывающие - # на разные поля! + # В конце концов, у нас есть два определения "x", указывающие + # на разные поля! ...A ...B } @@ -439,7 +439,7 @@ query { ```graphql query purposes { # Если в схеме "name" определено как "String", - # этот запрос не пройдёт валидацию. + # этот запрос не пройдёт валидацию. purpose(name: 1) { id } @@ -449,8 +449,8 @@ query purposes { query purposes($name: Int!) { # Если "name" определено в схеме как `String`, - # этот запрос не пройдёт валидацию, потому что - # используемая переменная имеет тип `Int` + # этот запрос не пройдёт валидацию, потому что + # используемая переменная имеет тип `Int` purpose(name: $name) { id } diff --git a/website/pages/sv/cookbook/subgraph-debug-forking.mdx b/website/pages/sv/cookbook/subgraph-debug-forking.mdx index 0478b8509e8d..0fdaaf7411c0 100644 --- a/website/pages/sv/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/sv/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ I samband med felsökning låter **subgraf forking** dig felsöka din misslyckad När du distribuerar en subgraf till en avlägsen Graph-nod för indexering och den misslyckas vid block _X_, är den goda nyheten att Graph-noden fortfarande kommer att betjäna GraphQL-frågor med hjälp av sitt lager, som synkroniseras för att blockera _X_. Toppen! Det betyder att vi kan dra nytta av denna "up-to-date" butik för att fixa de buggar som uppstår vid indexering av block _X_. -I ett nötskal, vi ska _gaffla den misslyckade subgrafen_ från en avlägsen Graph-nod som garanterat har subgrafen indexerad upp till blocket *X* för att ge den lokalt distribuerade subgrafen som felsöks i blocket _X_ en uppdaterad vy av indexeringstillståndet. +I ett nötskal, vi ska _gaffla den misslyckade subgrafen_ från en avlägsen Graph-nod som garanterat har subgrafen indexerad upp till blocket _X_ för att ge den lokalt distribuerade subgrafen som felsöks i blocket _X_ en uppdaterad vy av indexeringstillståndet. ## Snälla, visa mig lite kod! diff --git a/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx index 9e47b0462385..07d5bc4775ec 100644 --- a/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx @@ -42,7 +42,7 @@ Du distribuerar subgrafen genom att köra `yarn deploy` Efter att ha distribuerat subgrafen kommer Graph Explorer att växla till att visa synkroniseringsstatusen för din subgraf. Beroende på mängden data och antalet händelser som måste extraheras från historiska block, från och med genesisblocket, kan synkronisering ta från några minuter till flera timmar. -Undergrafens status växlar till ` Synced ` när Graph Node har extraherat alla data från historiska block. Graph Node fortsätter att inspektera block för din undergraf när dessa block minas. +Undergrafens status växlar till `Synced` när Graph Node har extraherat alla data från historiska block. Graph Node fortsätter att inspektera block för din undergraf när dessa block minas. ## Omdistribuera en subgraf @@ -270,7 +270,7 @@ Graf Nod visar en graphql-slutpunkt som du kan fråga för att kontrollera statu } ``` -Detta kommer att ge dig `chainHeadBlock` som du kan jämföra med `latestBlock` på din subgraf för att kontrollera om den körs efter. ` synced ` informerar om subgrafen någonsin har kommit ikapp kedjan. `health` kan för närvarande ta värdena `healthy` om inga fel inträffade, eller `failed` om det fanns ett fel som stoppade subgrafens framsteg. I det här fallet kan du kontrollera fältet `fatalError` för detaljer om detta fel. +Detta kommer att ge dig `chainHeadBlock` som du kan jämföra med `latestBlock` på din subgraf för att kontrollera om den körs efter. `synced` informerar om subgrafen någonsin har kommit ikapp kedjan. `health` kan för närvarande ta värdena `healthy` om inga fel inträffade, eller `failed` om det fanns ett fel som stoppade subgrafens framsteg. I det här fallet kan du kontrollera fältet `fatalError` för detaljer om detta fel. ## Policy för arkivering av undergrafer för värdtjänster diff --git a/website/pages/sv/developing/creating-a-subgraph.mdx b/website/pages/sv/developing/creating-a-subgraph.mdx index d6bb42a330e7..c635a7b21aaa 100644 --- a/website/pages/sv/developing/creating-a-subgraph.mdx +++ b/website/pages/sv/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ För vissa entitetstyper konstrueras `id` från id:erna hos två andra entiteter Vi stödjer följande skalartyper i vår GraphQL API: -| Typ | Beskrivning | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Bytematris, representerad som en hexadecimal sträng. Vanligt används för Ethereum-hashar och adresser. | -| `String` | Skalär för `string`-värden. Nolltecken stöds inte och tas automatiskt bort. | -| `Boolean` | Skalär för `boolean`-värden. | -| `Int` | Enligt GraphQL specifikationen har `Int` en storlek på 32 byte. | -| `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` | Stora heltal. Används för Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` typer. Observera: Allt under `uint32`, som `int32`, `uint24` eller `int8` representeras som `i32`. | -| `BigDecimal` | `BigDecimal` Högprecisionsdecimaler representerade som en signifikant och en exponent. Exponentområdet är från −6143 till +6144. Avrundat till 34 signifikanta siffror. | +| Typ | Beskrivning | +| --- | --- | +| `Bytes` | Bytematris, representerad som en hexadecimal sträng. Vanligt används för Ethereum-hashar och adresser. | +| `String` | Skalär för `string`-värden. Nolltecken stöds inte och tas automatiskt bort. | +| `Boolean` | Skalär för `boolean`-värden. | +| `Int` | Enligt GraphQL specifikationen har `Int` en storlek på 32 byte. | +| `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` | Stora heltal. Används för Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` typer. Observera: Allt under `uint32`, som `int32`, `uint24` eller `int8` representeras som `i32`. | +| `BigDecimal` | `BigDecimal` Högprecisionsdecimaler representerade som en signifikant och en exponent. Exponentområdet är från −6143 till +6144. Avrundat till 34 signifikanta siffror. | #### Enums @@ -422,12 +422,7 @@ type _Schema_ name: "bandSearch" language: en algorithm: rank - include: [ - { - entity: "Band" - fields: [{ name: "name" }, { name: "description" }, { name: "bio" }] - } - ] + include: [{ entity: "Band", fields: [{ name: "name" }, { name: "description" }, { name: "bio" }] }] ) type Band @entity { @@ -567,13 +562,13 @@ import { // The events classes: NewGravatar, UpdatedGravatar, -} from "../generated/Gravity/Gravity"; +} from '../generated/Gravity/Gravity' ``` Utöver detta genereras en klass för varje entitetstyp i subgrafens GraphQL-schema. Dessa klasser tillhandahåller typsäker entitetsladdning, läs- och skrivåtkomst till entitetsfält samt en `save()`-metod för att skriva entiteter till lagret. Alla entitetsklasser skrivs till `/schema.ts`, vilket gör att mappningar kan importera dem med ```javascript -import { Gravatar } from "../generated/schema" +import { Gravatar } from '../generated/schema' ``` > **Observera:** Kodgenerering måste utföras igen efter varje ändring av GraphQL-schemat eller ABIn som ingår i manifestet. Det måste också utföras minst en gång innan du bygger eller distribuerar subgrafet. @@ -596,7 +591,7 @@ dataSources: name: Factory network: mainnet source: - address: "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95" + address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' abi: Factory mapping: kind: ethereum/events @@ -654,17 +649,17 @@ templates: I det sista steget uppdaterar du mappningen av huvudkontraktet för att skapa en dynamisk datakällinstans från en av mallarna. I det här exemplet ändrar du mappningen av huvudkontraktet för att importera mallen `Exchange` och anropar metoden `Exchange.create(address)` för att börja indexera det nya växlingskontraktet. ```typescript -import { Exchange } from "../generated/templates"; +import { Exchange } from '../generated/templates' export function handleNewExchange(event: NewExchange): void { // Start indexing the exchange; `event.params.exchange` is the // address of the new exchange contract - Exchange.create(event.params.exchange); + Exchange.create(event.params.exchange) } ``` > ** Notera:** En ny datakälla bearbetar endast anrop och händelser för det block där den skapades och alla efterföljande block, men bearbetar inte historiska data, dvs. data som finns i tidigare block. -> +> > Om tidigare block innehåller data som är relevanta för den nya datakällan, är det bäst att indexera dessa data genom att läsa kontraktets aktuella status och skapa enheter som representerar denna status vid den tidpunkt då den nya datakällan skapas. ### Kontext för datakälla @@ -672,22 +667,22 @@ export function handleNewExchange(event: NewExchange): void { Datakällans kontext gör det möjligt att skicka extra konfiguration när en mall instansieras. I vårt exempel kan vi säga att börser är associerade med ett visst handelspar, vilket ingår i händelsen `NewExchange`. Den informationen kan skickas till den instansierade datakällan, så här: ```typescript -import { Exchange } from "../generated/templates"; +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); + let context = new DataSourceContext() + context.setString('tradingPair', event.params.tradingPair) + Exchange.createWithContext(event.params.exchange, context) } ``` Inuti en mappning av mallen `Exchange` kan kontexten sedan nås: ```typescript -import { dataSource } from "@graphprotocol/graph-ts"; +import { dataSource } from '@graphprotocol/graph-ts' -let context = dataSource.context(); -let tradingPair = context.getString("tradingPair") +let context = dataSource.context() +let tradingPair = context.getString('tradingPair') ``` Det finns sättare och hämtare som `setString` och `getString` för alla värdestyper. @@ -702,7 +697,7 @@ dataSources: name: ExampleSource network: mainnet source: - address: "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95" + address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' abi: ExampleContract startBlock: 6627917 mapping: @@ -721,7 +716,7 @@ dataSources: ``` > **Observera:** Blocket där kontraktet skapades kan snabbt sökas upp på Etherscan: -> +> > 1. Sök efter kontraktet genom att ange dess adress i sökfältet. > 2. Klicka på transaktionshashen för skapandet i avsnittet `Kontraktsskapare`. > 3. Ladda sidan med transaktionsdetaljer där du hittar startblocket för det kontraktet. @@ -744,7 +739,7 @@ dataSources: name: Gravity network: mainnet source: - address: "0x731a10897d267e19b34503ad902d0a29173ba4b1" + address: '0x731a10897d267e19b34503ad902d0a29173ba4b1' abi: Gravity mapping: kind: ethereum/events @@ -768,15 +763,15 @@ dataSources: Varje anropsbehandlare tar en enda parameter med en typ som motsvarar namnet på den kallade funktionen. I det ovanstående exempelsubgrafet innehåller kartläggningen en hanterare för när funktionen `createGravatar` anropas och tar emot en `CreateGravatarCall`-parameter som ett argument: ```typescript -import { CreateGravatarCall } from "../generated/Gravity/Gravity"; -import { Transaction } from "../generated/schema"; +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(); + let id = call.transaction.hash + let transaction = new Transaction(id) + transaction.displayName = call.inputs._displayName + transaction.imageUrl = call.inputs._imageUrl + transaction.save() } ``` @@ -807,7 +802,7 @@ dataSources: name: Gravity network: dev source: - address: "0x731a10897d267e19b34503ad902d0a29173ba4b1" + address: '0x731a10897d267e19b34503ad902d0a29173ba4b1' abi: Gravity mapping: kind: ethereum/events @@ -859,9 +854,9 @@ Den definierade hanteraren med filtret once kommer att anropas endast en gång i ```ts export function handleOnce(block: ethereum.Block): void { - let data = new InitialData(Bytes.fromUTF8("initial")); - data.data = "Setup data here"; - data.save(); + let data = new InitialData(Bytes.fromUTF8('initial')) + data.data = 'Setup data here' + data.save() } ``` @@ -870,12 +865,12 @@ export function handleOnce(block: ethereum.Block): void { Mappningsfunktionen tar emot ett `ethereum.Block` som sitt enda argument. Liksom mappningsfunktioner för händelser kan denna funktion komma åt befintliga subgrafiska enheter i lagret, anropa smarta kontrakt och skapa eller uppdatera enheter. ```typescript -import { ethereum } from "@graphprotocol/graph-ts"; +import { ethereum } from '@graphprotocol/graph-ts' export function handleBlock(block: ethereum.Block): void { - let id = block.hash; - let entity = new Block(id); - entity.save(); + let id = block.hash + let entity = new Block(id) + entity.save() } ``` @@ -1128,26 +1123,26 @@ const cid = dataSource.stringParam() Exempel på hanterare: ```typescript -import { json, Bytes, dataSource } from "@graphprotocol/graph-ts"; -import { TokenMetadata } from "../generated/schema"; +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(); + 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"); + 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.name = name.toString() + tokenMetadata.image = image.toString() + tokenMetadata.externalURL = externalURL.toString() + tokenMetadata.description = description.toString() } - tokenMetadata.save(); + tokenMetadata.save() } } ``` @@ -1166,29 +1161,29 @@ För Arweave, från och med version 0.33.0 kan Graph Node hämta filer som är l Exempel: ```typescript -import { TokenMetadata as TokenMetadataTemplate } from "../generated/templates"; +import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates' -const ipfshash = "QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm"; +const ipfshash = 'QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm' //Denna exempelkod är för en undergraf för kryptosamverkan. Ovanstående ipfs-hash är en katalog med tokenmetadata för alla kryptosamverkande NFT:er. export function handleTransfer(event: TransferEvent): void { - let token = Token.load(event.params.tokenId.toString()); + let token = Token.load(event.params.tokenId.toString()) if (!token) { - token = new Token(event.params.tokenId.toString()); - token.tokenID = event.params.tokenId; + token = new Token(event.params.tokenId.toString()) + token.tokenID = event.params.tokenId - token.tokenURI = "/" + event.params.tokenId.toString() + ".json"; - const tokenIpfsHash = ipfshash + token.tokenURI; + token.tokenURI = '/' + event.params.tokenId.toString() + '.json' + const tokenIpfsHash = ipfshash + token.tokenURI //Detta skapar en sökväg till metadata för en enskild Crypto coven NFT. Den konkaterar katalogen med "/" + filnamn + ".json" - token.ipfsURI = tokenIpfsHash; + token.ipfsURI = tokenIpfsHash - TokenMetadataTemplate.create(tokenIpfsHash); + TokenMetadataTemplate.create(tokenIpfsHash) } - token.updatedAtTimestamp = event.block.timestamp; - token.owner = event.params.to.toHexString(); - token.save(); + token.updatedAtTimestamp = event.block.timestamp + token.owner = event.params.to.toHexString() + token.save() } ``` diff --git a/website/pages/sv/developing/developer-faqs.mdx b/website/pages/sv/developing/developer-faqs.mdx index 11d0890e4d60..85dc3131826b 100644 --- a/website/pages/sv/developing/developer-faqs.mdx +++ b/website/pages/sv/developing/developer-faqs.mdx @@ -71,7 +71,7 @@ Inom en subgraf behandlas händelser alltid i den ordning de visas i blocken, oa Ja, du kan göra detta genom att importera `graph-ts` enligt exemplet nedan: ```javascript -import { dataSource } from "@graphprotocol/graph-ts" +import { dataSource } from '@graphprotocol/graph-ts' dataSource.network() dataSource.address() diff --git a/website/pages/sv/developing/graph-ts/api.mdx b/website/pages/sv/developing/graph-ts/api.mdx index 82b1600993e1..800841c7bc18 100644 --- a/website/pages/sv/developing/graph-ts/api.mdx +++ b/website/pages/sv/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Versionsanteckningar | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Versionsanteckningar | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Inbyggda typer @@ -159,7 +159,7 @@ _Math_ #### TypedMap ```typescript -import { TypedMap } from "@graphprotocol/graph-ts"; +import { TypedMap } from '@graphprotocol/graph-ts' ``` `TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). @@ -175,7 +175,7 @@ The `TypedMap` class has the following API: #### Bytes ```typescript -import { Bytes } from "@graphprotocol/graph-ts"; +import { Bytes } from '@graphprotocol/graph-ts' ``` `Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. @@ -201,7 +201,7 @@ _Operators_ #### Address ```typescript -import { Address } from "@graphprotocol/graph-ts"; +import { Address } from '@graphprotocol/graph-ts' ``` `Address` extends `Bytes` to represent Ethereum `address` values. @@ -214,7 +214,7 @@ It adds the following method on top of the `Bytes` API: ### Store API ```typescript -import { store } from "@graphprotocol/graph-ts"; +import { store } from '@graphprotocol/graph-ts' ``` The `store` API allows to load, save and remove entities from and to the Graph Node store. @@ -227,24 +227,24 @@ Följande är ett vanligt mönster för att skapa entiteter från Ethereum-händ ```typescript // Importera händelseklassen Transfer som genererats från ERC20 ABI -import { Transfer as TransferEvent } from "../generated/ERC20/ERC20"; +import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' // Importera entitetstypen Transfer som genererats från GraphQL-schemat -import { Transfer } from "../generated/schema"; +import { Transfer } from '../generated/schema' // Händelsehanterare för överföring export function handleTransfer(event: TransferEvent): void { // Skapa en Transfer-entitet, med transaktionshash som enhets-ID - let id = event.transaction.hash; - let transfer = new Transfer(id); + let id = event.transaction.hash + let transfer = new Transfer(id) // Ange egenskaper för entiteten med hjälp av händelseparametrarna - transfer.from = event.params.from; - transfer.to = event.params.to; - transfer.amount = event.params.amount; + transfer.from = event.params.from + transfer.to = event.params.to + transfer.amount = event.params.amount // Spara entiteten till lagret - transfer.save(); + transfer.save() } ``` @@ -257,10 +257,10 @@ Varje entitet måste ha en unik ID för att undvika kollisioner med andra entite Om en entitet redan finns kan den laddas från lagret med följande: ```typescript -let id = event.transaction.hash; // eller hur ID konstrueras -let transfer = Transfer.load(id); +let id = event.transaction.hash // eller hur ID konstrueras +let transfer = Transfer.load(id) if (transfer == null) { - transfer = new Transfer(id); + transfer = new Transfer(id) } // Använd överföringsenheten som tidigare @@ -277,10 +277,10 @@ As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotoco API:et för lagret underlättar hämtningen av entiteter som skapades eller uppdaterades i det aktuella blocket. En vanlig situation för detta är att en hanterare skapar en transaktion från någon händelse på kedjan, och en senare hanterare vill komma åt denna transaktion om den finns. I det fall då transaktionen inte finns, måste subgraphen gå till databasen bara för att ta reda på att entiteten inte finns; om subgraphförfattaren redan vet att entiteten måste ha skapats i samma block, undviker man detta databasbesök genom att använda loadInBlock. För vissa subgrapher kan dessa missade sökningar bidra avsevärt till indexeringstiden. ```typescript -let id = event.transaction.hash; // eller hur ID konstrueras -let transfer = Transfer.loadInBlock(id); +let id = event.transaction.hash // eller hur ID konstrueras +let transfer = Transfer.loadInBlock(id) if (transfer == null) { - transfer = new Transfer(id); + transfer = new Transfer(id) } // Använd överföringsenheten som tidigare @@ -334,7 +334,7 @@ transfer.amount = ... Det är också möjligt att avaktivera egenskaper med en av följande två instruktioner: ```typescript -transfer.from.unset(); +transfer.from.unset() transfer.from = null ``` @@ -344,14 +344,14 @@ Updating array properties is a little more involved, as the getting an array fro ```typescript // Detta kommer inte att fungera -entity.numbers.push(BigInt.fromI32(1)); -entity.save(); +entity.numbers.push(BigInt.fromI32(1)) +entity.save() // Detta kommer att fungera -let numbers = entity.numbers; -numbers.push(BigInt.fromI32(1)); -entity.numbers = numbers; -entity.save(); +let numbers = entity.numbers +numbers.push(BigInt.fromI32(1)) +entity.numbers = numbers +entity.save() ``` #### Ta bort entiteter från lagret @@ -389,12 +389,12 @@ type Transfer @entity { and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: ```typescript -let id = event.transaction.hash; -let transfer = new Transfer(id); -transfer.from = event.params.from; -transfer.to = event.params.to; -transfer.amount = event.params.amount; -transfer.save(); +let id = event.transaction.hash +let transfer = new Transfer(id) +transfer.from = event.params.from +transfer.to = event.params.to +transfer.amount = event.params.amount +transfer.save() ``` #### Händelser och Block/Transaktionsdata @@ -480,19 +480,16 @@ En vanlig mönster är att komma åt kontraktet från vilket en händelse härst ```typescript // Importera den genererade kontraktsklassen och den genererade klassen för överföringshändelser -import { - ERC20Contract, - Transfer as TransferEvent, -} from "../generated/ERC20Contract/ERC20Contract"; +import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' // Importera den genererade entitetsklassen -import { Transfer } from "../generated/schema"; +import { Transfer } from '../generated/schema' export function handleTransfer(event: TransferEvent) { // Bind kontraktet till den adress som skickade händelsen - let contract = ERC20Contract.bind(event.address); + let contract = ERC20Contract.bind(event.address) // Åtkomst till tillståndsvariabler och funktioner genom att anropa dem - let erc20Symbol = contract.symbol(); + let erc20Symbol = contract.symbol() } ``` @@ -507,12 +504,12 @@ Andra kontrakt som är en del av subgraphen kan importeras från den genererade If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: ```typescript -let gravitera = gravitera.bind(event.address); -let callResult = gravitera_gravatarToOwner(gravatar); +let gravitera = gravitera.bind(event.address) +let callResult = gravitera_gravatarToOwner(gravatar) if (callResult.reverted) { - log.info("getGravatar reverted", []); + log.info('getGravatar reverted', []) } else { - let owner = callResult.value; + let owner = callResult.value } ``` @@ -546,7 +543,7 @@ För ytterligare information: ### API för loggning ```typescript -import { log } from "@graphprotocol/graph-ts"; +import { log } from '@graphprotocol/graph-ts' ``` The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. @@ -562,11 +559,7 @@ The `log` API includes the following functions: The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. ```typescript -log.info("Message to be displayed: {}, {}, {}", [ - value.toString(), - anotherValue.toString(), - "already a string", -]); +log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) ``` #### Loggning av ett eller flera värden @@ -589,11 +582,11 @@ export function handleSomeEvent(event: SomeEvent): void { I exemplet nedan loggas endast det första värdet i argument arrayen, trots att arrayen innehåller tre värden. ```typescript -let myArray = ["A", "B", "C"]; +let myArray = ['A', 'B', 'C'] export function handleSomeEvent(event: SomeEvent): void { // Visar : "Mitt värde är: A" (Även om tre värden skickas till `log.info`) - log.info("Mitt värde är: {}", myArray); + log.info('Mitt värde är: {}', myArray) } ``` @@ -602,14 +595,11 @@ export function handleSomeEvent(event: SomeEvent): void { Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. ```typescript -let myArray = ["A", "B", "C"]; +let myArray = ['A', 'B', 'C'] export function handleSomeEvent(event: SomeEvent): void { // Visar: "Mitt första värde är: A, andra värdet är: B, tredje värdet är: C" - log.info( - "My first value is: {}, second value is: {}, third value is: {}", - myArray - ); + log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) } ``` @@ -620,7 +610,7 @@ För att visa ett specifikt värde i arrayen måste det indexeras och tillhandah ```typescript export function handleSomeEvent(event: SomeEvent): void { // Visar : "Mitt tredje värde är C" - log.info("My third value is: {}", [myArray[2]]); + log.info('My third value is: {}', [myArray[2]]) } ``` @@ -629,21 +619,21 @@ export function handleSomeEvent(event: SomeEvent): void { I exemplet nedan loggas blocknummer, blockhash och transaktionshash från en händelse: ```typescript -import { log } from "@graphprotocol/graph-ts"; +import { log } from '@graphprotocol/graph-ts' export function handleSomeEvent(event: SomeEvent): void { - log.debug("Block number: {}, block hash: {}, transaction hash: {}", [ + log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ event.block.number.toString(), // "47596000" event.block.hash.toHexString(), // "0x..." event.transaction.hash.toHexString(), // "0x..." - ]); + ]) } ``` ### IPFS API ```typescript -import { ipfs } from "@graphprotocol/graph-ts" +import { ipfs } from '@graphprotocol/graph-ts' ``` Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. @@ -652,13 +642,13 @@ För att läsa en fil från IPFS med en given IPFS-hash eller sökväg görs fö ```typescript // Placera detta i en händelsehanterare i mappningen -let hash = "QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D"; -let data = ipfs.cat(hash); +let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' +let data = ipfs.cat(hash) // Sökvägar som `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` // som inkluderar filer i kataloger stöds också -let path = "QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile"; -let data = ipfs.cat(path); +let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' +let data = ipfs.cat(path) ``` **Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. @@ -666,31 +656,31 @@ let data = ipfs.cat(path); It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: ```typescript -import { JSONValue, Value } from "@graphprotocol/graph-ts"; +import { JSONValue, Value } from '@graphprotocol/graph-ts' export function processItem(value: JSONValue, userData: Value): void { // Se JSONValue-dokumentationen för mer information om hur man hanterar // med JSON-värden - let obj = value.toObject(); - let id = obj.get("id"); - let title = obj.get("title"); + let obj = value.toObject() + let id = obj.get('id') + let title = obj.get('title') if (!id || !title) { - return; + return } // Callbacks kan också skapa enheter - let newItem = new Item(id); - newItem.title = title.toString(); - newitem.parent = userData.toString(); // Ange parent till "parentId" - newitem.save(); + let newItem = new Item(id) + newItem.title = title.toString() + newitem.parent = userData.toString() // Ange parent till "parentId" + newitem.save() } // Placera detta i en händelsehanterare i mappningen -ipfs.map("Qm...", "processItem", Value.fromString("parentId"), ["json"]); +ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) // Alternativt kan du använda `ipfs.mapJSON`. -ipfs.mapJSON("Qm...", "processItem", Value.fromString("parentId")); +ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) ``` The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. @@ -700,7 +690,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes ### Crypto API ```typescript -import { crypto } from "@graphprotocol/graph-ts"; +import { crypto } from '@graphprotocol/graph-ts' ``` The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: @@ -710,7 +700,7 @@ The `crypto` API makes a cryptographic functions available for use in mappings. ### JSON API ```typescript -import { json, JSONValueKind } from "@graphprotocol/graph-ts" +import { json, JSONValueKind } from '@graphprotocol/graph-ts' ``` JSON data can be parsed using the `json` API: @@ -744,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Typkonverteringsreferens -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | --------------------------------------------------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| Sträng (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| Sträng (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadata för datakälla diff --git a/website/pages/sv/developing/unit-testing-framework.mdx b/website/pages/sv/developing/unit-testing-framework.mdx index 769e00134d83..1496196edc7a 100644 --- a/website/pages/sv/developing/unit-testing-framework.mdx +++ b/website/pages/sv/developing/unit-testing-framework.mdx @@ -52,7 +52,7 @@ eller /node_modules/gluegun/build/index.js:13 throw up; ``` -Se till att du använder en nyare version av Node.js eftersom graph-cli inte längre stöder **v10.19.0**, och det är fortfarande standardversionen för nya Ubuntu-bilder på WSL. Till exempel är Matchstick bekräftat fungerande på WSL med **v18.1.0**. Du kan byta till den antingen via** nvm ** eller genom att uppdatera din globala Node.js. Glöm inte att ta bort `node_modules` och köra ` npm install `igen efter att du har uppdaterat Node.js! Sedan, se till att du har **libpq** installerat, du kan göra det genom att köra +Se till att du använder en nyare version av Node.js eftersom graph-cli inte längre stöder **v10.19.0**, och det är fortfarande standardversionen för nya Ubuntu-bilder på WSL. Till exempel är Matchstick bekräftat fungerande på WSL med **v18.1.0**. Du kan byta till den antingen via** nvm ** eller genom att uppdatera din globala Node.js. Glöm inte att ta bort `node_modules` och köra `npm install`igen efter att du har uppdaterat Node.js! Sedan, se till att du har **libpq** installerat, du kan göra det genom att köra ``` sudo apt-get install libpq-dev @@ -1081,15 +1081,15 @@ Loggutmatningen innehåller testkörningens varaktighet. Här är ett exempel: Det betyder att du har använt `console.log` i din kod, som inte stöds av AssemblyScript. Överväg att använda [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Motsägelsen i argumenten beror på en motsägelse i `graph-ts` och `matchstick-as`. Det bästa sättet att åtgärda problem som detta är att uppdatera allt till den senaste utgivna versionen. diff --git a/website/pages/sv/network/benefits.mdx b/website/pages/sv/network/benefits.mdx index e8713d003ce3..c94c62e684dc 100644 --- a/website/pages/sv/network/benefits.mdx +++ b/website/pages/sv/network/benefits.mdx @@ -27,47 +27,47 @@ Frågekostnaderna kan variera; den citerade kostnaden är genomsnittet vid publi ## Användare Med Låg Volym (färre än 30,000 frågor per månad) -| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | -|:-------------------------------:|:---------------------------------------:|:-------------------------------------------------------------:| -| Månatlig kostnad för server\* | $350 per månad | $0 | -| Kostnad för frågor | $0+ | ~$15 per månad | -| Konstruktionstid | $400 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 30 000 (automatisk skalning) | -| Kostnad per fråga | $0 | $0.0005 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Geografisk redundans | $750+ per extra nod | Inkluderat | -| Drifttid | Varierande | 99.9%+ | -| Total Månadskostnad | $750+ | ~$15 | +| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | +| :-: | :-: | :-: | +| Månatlig kostnad för server\* | $350 per månad | $0 | +| Kostnad för frågor | $0+ | ~$15 per månad | +| Konstruktionstid | $400 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 30 000 (automatisk skalning) | +| Kostnad per fråga | $0 | $0.0005 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Geografisk redundans | $750+ per extra nod | Inkluderat | +| Drifttid | Varierande | 99.9%+ | +| Total Månadskostnad | $750+ | ~$15 | ## Medium volym användare (3,000,000+ förfrågningar per månad) -| Kostnadsjämförelse | Egen Värd | Graph Nätverk | -|:-----------------------------:|:------------------------------------------:|:-------------------------------------------------------------:| -| Månadskostnad för server\* | $350 per månad | $0 | -| Kostnad för frågor | $500 per månad | $750 per månad | -| Ingenjörstid | $800 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 3,000,000+ | -| Kostnad per fråga | $0 | $0.00025 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Kostnader för ingenjörsarbete | $200 per timme | Inkluderat | -| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | -| Drifttid | Varierar | 99.9%+ | -| Total Månadskostnad | $1,650+ | $750 | +| Kostnadsjämförelse | Egen Värd | Graph Nätverk | +| :-: | :-: | :-: | +| Månadskostnad för server\* | $350 per månad | $0 | +| Kostnad för frågor | $500 per månad | $750 per månad | +| Ingenjörstid | $800 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 3,000,000+ | +| Kostnad per fråga | $0 | $0.00025 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Kostnader för ingenjörsarbete | $200 per timme | Inkluderat | +| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | +| Drifttid | Varierar | 99.9%+ | +| Total Månadskostnad | $1,650+ | $750 | ## Användare Med Hög Volym (30,000,000+ frågor per månad) -| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | -|:----------------------------:|:-------------------------------------------:|:-------------------------------------------------------------:| -| Månadskostnad för server\* | $1100 per månad, per nod | $0 | -| Kostnad för frågor | $4000 | $4,500 per månad | -| Antal noder som behövs | 10 | Ej tillämpligt | -| Ingenjörstid | $6,000 eller mer per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 30,000,000+ | -| Kostnad per fråga | $0 | $0.00015 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | -| Drifttid | Varierar | 99.9%+ | -| Total Månadskostnad | $11,000+ | $4,500 | +| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | +| :-: | :-: | :-: | +| Månadskostnad för server\* | $1100 per månad, per nod | $0 | +| Kostnad för frågor | $4000 | $4,500 per månad | +| Antal noder som behövs | 10 | Ej tillämpligt | +| Ingenjörstid | $6,000 eller mer per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 30,000,000+ | +| Kostnad per fråga | $0 | $0.00015 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | +| Drifttid | Varierar | 99.9%+ | +| Total Månadskostnad | $11,000+ | $4,500 | \*inklusive kostnader för backup: $50-$100 per månad diff --git a/website/pages/sv/network/delegating.mdx b/website/pages/sv/network/delegating.mdx index 65204d68d29d..27bad461386c 100644 --- a/website/pages/sv/network/delegating.mdx +++ b/website/pages/sv/network/delegating.mdx @@ -33,8 +33,8 @@ När som helst en Delegater vill upphäva sin delegering är deras tokens förem En sak att tänka på är också att välja en Indexer klokt. Om du väljer en Indexer som inte var pålitlig eller inte gjorde ett bra jobb, kommer du att vilja upphäva, vilket innebär att du kommer att förlora många möjligheter att tjäna belöningar, vilket kan vara lika dåligt som att bränna GRT.
    - ![Delegation upphävning](/img/Delegation-Upphävning.png) _Observera avgiften -på 0,5% i Delegation UI, samt den 28 dagar långa upphävningsperioden._ + ![Delegation upphävning](/img/Delegation-Upphävning.png) _Observera avgiften på 0,5% i Delegation UI, samt den 28 + dagar långa upphävningsperioden._
    ### Att välja en pålitlig Indexer med en rättvis belöningsutbetalning till Delegater @@ -44,9 +44,8 @@ Detta är en viktig del att förstå. Först låt oss diskutera tre mycket vikti Indexing Reward Cut - Indexing reward cut är den del av belöningarna som Indexer kommer att behålla för sig själva. Det betyder om den är inställd på 100%, som en Delegater kommer du att få 0 indexing rewards. Om du ser 80% i UI, innebär det att du som Delegater kommer att få 20%. En viktig notering - i början av nätverket kommer Indexing Rewards att utgöra majoriteten av belöningarna.
    - ![Indexing Edward Cut](/img/Indexing-Edward-Cut.png) *Den översta Indexet ger -Delegater 90% av belöningarna. Den mellersta ger Delegater 20%. Den nedersta -ger Delegater ~83%.* + ![Indexing Edward Cut](/img/Indexing-Edward-Cut.png) *Den översta Indexet ger Delegater 90% av belöningarna. Den + mellersta ger Delegater 20%. Den nedersta ger Delegater ~83%.*
    - Query Fee Cut - Detta fungerar precis som Indexing Reward Cut. Detta gäller dock för avkastningen på frågebetalningar som Indexer samlar in. Det bör noteras att i början av nätverket kommer avkastningen från frågebetalningar att vara mycket små jämfört med indexeringsbelöningen. Det rekommenderas att uppmärksamma nätverket för att avgöra när frågebetalningarna i nätverket kommer att börja vara mer betydande. diff --git a/website/pages/sv/network/indexing.mdx b/website/pages/sv/network/indexing.mdx index f48375d7043a..609035dec6fc 100644 --- a/website/pages/sv/network/indexing.mdx +++ b/website/pages/sv/network/indexing.mdx @@ -113,11 +113,11 @@ Indexers kan skilja sig åt genom att tillämpa avancerade tekniker för att fat - **Stor** - Förberedd för att indexera alla för närvarande använda subgrafer och att ta emot förfrågningar för relaterad trafik. | Konfiguration | Postgres
    (CPU:er) | Postgres
    (minne i GB) | Postgres
    (disk i TB) | VM:er
    (CPU:er) | VM:er
    (minne i GB) | -| ------------- |:----------------------------:|:--------------------------------:|:-------------------------------:|:-------------------------:|:-----------------------------:| -| Liten | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Stor | 72 | 468 | 3,5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Liten | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Stor | 72 | 468 | 3,5 | 48 | 184 | ### Vilka grundläggande säkerhetsåtgärder bör en Indexer vidta? @@ -149,20 +149,20 @@ Observera: För att stödja smidig skalning rekommenderas det att fråge- och in #### Graf Node -| Port | Syfte | Vägar | CLI-argument | Miljövariabel | -| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------- | -| 8000 | GraphQL HTTP-server
    (för subgraf-förfrågningar) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (för subgraf-prenumerationer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | -| 8030 | Subgrafindexeringsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-metrar | /metrics | --metrics-port | - | +| Port | Syfte | Vägar | CLI-argument | Miljövariabel | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP-server
    (för subgraf-förfrågningar) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (för subgraf-prenumerationer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | +| 8030 | Subgrafindexeringsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-metrar | /metrics | --metrics-port | - | #### Indexertjänst -| Port | Syfte | Vägar | CLI-argument | Miljövariabel | -| ---- | ------------------------------------------------------------------ | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP-server
    (för betalda subgraf-förfrågningar) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus-metrar | /metrics | --metrics-port | - | +| Port | Syfte | Vägar | CLI-argument | Miljövariabel | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP-server
    (för betalda subgraf-förfrågningar) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus-metrar | /metrics | --metrics-port | - | #### Indexeragent diff --git a/website/pages/sv/operating-graph-node.mdx b/website/pages/sv/operating-graph-node.mdx index 203e83bab78a..20fe3667765e 100644 --- a/website/pages/sv/operating-graph-node.mdx +++ b/website/pages/sv/operating-graph-node.mdx @@ -77,13 +77,13 @@ En komplett exempelkonfiguration för Kubernetes finns i [indexer repository](ht När Graph Node är igång exponerar den följande portar: -| Port | Syfte | Rutter | Argument för CLI | Miljö Variabel | -| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------- | -| 8000 | GraphQL HTTP-server
    (för frågor om undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (för prenumerationer på undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | -| 8030 | Status för indexering av undergrafer API | /graphql | --index-node-port | - | -| 8040 | Prometheus mätvärden | /metrics | --metrics-port | - | +| Port | Syfte | Rutter | Argument för CLI | Miljö Variabel | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP-server
    (för frågor om undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (för prenumerationer på undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | +| 8030 | Status för indexering av undergrafer API | /graphql | --index-node-port | - | +| 8040 | Prometheus mätvärden | /metrics | --metrics-port | - | > **Viktigt**: Var försiktig med att exponera portar offentligt - **administrationsportar** bör hållas säkra. Detta inkluderar JSON-RPC-slutpunkten för Graph Node. diff --git a/website/pages/sv/querying/distributed-systems.mdx b/website/pages/sv/querying/distributed-systems.mdx index 3143d4859eb8..365340f65a1b 100644 --- a/website/pages/sv/querying/distributed-systems.mdx +++ b/website/pages/sv/querying/distributed-systems.mdx @@ -84,8 +84,8 @@ Här kommer vi att använda argumentet `block: { hash: $blockHash }` för att bi /// Gets a list of domain names from a single block using pagination async function getDomainNames() { // Set a cap on the maximum number of items to pull. - let pages = 5; - const perPage = 1000; + let pages = 5 + const perPage = 1000 // The first query will get the first page of results and also get the block // hash so that the remainder of the queries are consistent with the first. @@ -100,34 +100,34 @@ async function getDomainNames() { hash } } - }`; + }` - let data = await graphql(listDomainsQuery, { perPage }); - let result = data.domains.map((d) => d.name); - let blockHash = data._meta.block.hash; + let data = await graphql(listDomainsQuery, { perPage }) + let result = data.domains.map((d) => d.name) + let blockHash = data._meta.block.hash - let query; + let query // Continue fetching additional pages until either we run into the limit of // 5 pages total (specified above) or we know we have reached the last page // because the page has fewer entities than a full page. while (data.domains.length == perPage && --pages) { - let lastID = data.domains[data.domains.length - 1].id; + let lastID = data.domains[data.domains.length - 1].id query = ` query ListDomains($perPage: Int!, $lastID: ID!, $blockHash: Bytes!) { domains(first: $perPage, where: { id_gt: $lastID }, block: { hash: $blockHash }) { name id } - }`; + }` - data = await graphql(query, { perPage, lastID, blockHash }); + data = await graphql(query, { perPage, lastID, blockHash }) // Accumulate domain names into the result for (domain of data.domains) { - result.push(domain.name); + result.push(domain.name) } } - return result; + return result } ``` diff --git a/website/pages/sv/querying/graphql-api.mdx b/website/pages/sv/querying/graphql-api.mdx index 303ee3c400df..3823820de6eb 100644 --- a/website/pages/sv/querying/graphql-api.mdx +++ b/website/pages/sv/querying/graphql-api.mdx @@ -208,7 +208,7 @@ I följande exempel filtrerar vi efter utmaningar med `utfall` `lyckades` och `n ``` > **Syntactic sugar:** Du kan förenkla ovanstående fråga genom att ta bort `and`-operatorn och istället skicka ett underuttryck separerat med kommatecken. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltextsökförfrågningar har ett obligatoriskt fält, `text`, för att tillha Fulltextsökoperatorer: -| Symbol | Operatör | Beskrivning | -| ----------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `Och` | För att kombinera flera söktermer till ett filter för entiteter som inkluderar alla de angivna termerna | -| | | `Eller` | Förfrågningar med flera söktermer separerade av ellipsen kommer att returnera alla entiteter med en matchning från någon av de angivna termerna | -| `<->` | `Följs av` | Ange avståndet mellan två ord. | -| `:*` | `Prefix` | Använd prefixsöktermen för att hitta ord vars prefix matchar (2 tecken krävs.) | +| Symbol | Operatör | Beskrivning | +| --- | --- | --- | +| `&` | `Och` | För att kombinera flera söktermer till ett filter för entiteter som inkluderar alla de angivna termerna | +| | | `Eller` | Förfrågningar med flera söktermer separerade av ellipsen kommer att returnera alla entiteter med en matchning från någon av de angivna termerna | +| `<->` | `Följs av` | Ange avståndet mellan två ord. | +| `:*` | `Prefix` | Använd prefixsöktermen för att hitta ord vars prefix matchar (2 tecken krävs.) | #### Exempel diff --git a/website/pages/sv/querying/querying-best-practices.mdx b/website/pages/sv/querying/querying-best-practices.mdx index 99d76809e653..5d5201189515 100644 --- a/website/pages/sv/querying/querying-best-practices.mdx +++ b/website/pages/sv/querying/querying-best-practices.mdx @@ -81,7 +81,7 @@ Men, som det anges i ["Frågehantering från en applikation"](/querying/querying Så här ställer du en fråga till The Graph med `graph-client`: ```tsx -import { execute } from "../.graphclient"; +import { execute } from '../.graphclient' const query = ` query GetToken($id: ID!) { @@ -90,13 +90,13 @@ query GetToken($id: ID!) { owner } } -`; +` const variables = { id: '1' } async function main() { - const result = await execute(query, variables); + const result = await execute(query, variables) // `result` är fullständigt typad! - console.log(result); + console.log(result) } main() @@ -115,15 +115,15 @@ Nu när vi har gått igenom de grundläggande reglerna för syntax för GraphQL- En vanlig (dålig) praxis är att dynamiskt bygga upp frågesträngar enligt följande: ```tsx -const id = params.id; -const fields = ["id", "owner"]; +const id = params.id +const fields = ['id', 'owner'] const query = ` query GetToken { token(id: ${id}) { - ${fields.join("\n")} + ${fields.join('\n')} } } -`; +` // Execute query... ``` @@ -138,9 +138,9 @@ Medan det tidigare avsnittet genererar en giltig GraphQL-fråga har den **många Av dessa skäl rekommenderas det alltid att skriva frågor som statiska strängar: ```tsx -import { execute } from "your-favorite-graphql-client"; +import { execute } from 'your-favorite-graphql-client' -const id = params.id; +const id = params.id const query = ` query GetToken($id: ID!) { token(id: $id) { @@ -148,7 +148,7 @@ query GetToken($id: ID!) { owner } } -`; +` const result = await execute(query, { variables: { @@ -171,9 +171,9 @@ Ibland vill vi inkludera fältet `owner` endast under vissa villkor. För detta kan vi utnyttja direktivet `@include(if:...)` på följande sätt: ```tsx -import { execute } from "your-favorite-graphql-client"; +import { execute } from 'your-favorite-graphql-client' -const id = params.id; +const id = params.id const query = ` query GetToken($id: ID!, $includeOwner: Boolean) { token(id: $id) { diff --git a/website/pages/sv/querying/querying-from-an-application.mdx b/website/pages/sv/querying/querying-from-an-application.mdx index 4ddf84530e0a..b25e2b3868c0 100644 --- a/website/pages/sv/querying/querying-from-an-application.mdx +++ b/website/pages/sv/querying/querying-from-an-application.mdx @@ -163,9 +163,9 @@ npm install @apollo/client graphql Sedan kan du göra en förfrågan till API:et med följande kod: ```javascript -import { ApolloClient, InMemoryCache, gql } from "@apollo/client"; +import { ApolloClient, InMemoryCache, gql } from '@apollo/client' -const APIURL = "https://api.studio.thegraph.com/query///"; +const APIURL = 'https://api.studio.thegraph.com/query///' const tokensQuery = ` query { @@ -176,20 +176,20 @@ const tokensQuery = ` metadataURI } } -`; +` const client = new ApolloClient({ uri: APIURL, cache: new InMemoryCache(), -}); +}) client .query({ query: gql(tokensQuery), }) - .then((data) => console.log("Subgraph data: ", data)) + .then((data) => console.log('Subgraph data: ', data)) .catch((err) => { - console.log("Error fetching data: ", err); + console.log('Error fetching data: ', err) }) ``` @@ -207,20 +207,20 @@ const tokensQuery = ` metadataURI } } -`; +` client .query({ query: gql(tokensQuery), variables: { first: 10, - orderBy: "createdAtTimestamp", - orderDirection: "desc", + orderBy: 'createdAtTimestamp', + orderDirection: 'desc', }, }) - .then((data) => console.log("Subgraph data: ", data)) + .then((data) => console.log('Subgraph data: ', data)) .catch((err) => { - console.log("Error fetching data: ", err); + console.log('Error fetching data: ', err) }) ``` @@ -244,9 +244,9 @@ npm install urql graphql Sedan kan du göra en förfrågan till API:et med följande kod: ```javascript -import { createClient } from "urql"; +import { createClient } from 'urql' -const APIURL = "https://api.thegraph.com/subgraphs/name/username/subgraphname"; +const APIURL = 'https://api.thegraph.com/subgraphs/name/username/subgraphname' const tokensQuery = ` query { @@ -257,11 +257,11 @@ const tokensQuery = ` metadataURI } } -`; +` const client = createClient({ url: APIURL, -}); +}) const data = await client.query(tokensQuery).toPromise() ``` diff --git a/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx b/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx index afa4a7df4747..97c6bb95635a 100644 --- a/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx @@ -91,17 +91,17 @@ maybeValue.aMethod(); Men i den nyare versionen, eftersom värdet är nullable, måste du kontrollera, så här: ```typescript -let maybeValue = load(); +let maybeValue = load() if (maybeValue) { - maybeValue.aMethod(); // `maybeValue` is not null anymore + maybeValue.aMethod() // `maybeValue` is not null anymore } ``` Eller gör så här: ```typescript -let maybeValue = load()!; // bryts i runtime om värdet är null +let maybeValue = load()! // bryts i runtime om värdet är null maybeValue.aMethod() ``` @@ -113,8 +113,8 @@ Om du är osäker på vilken du ska välja, rekommenderar vi alltid att använda Tidigare kunde du använda [variabelskuggning](https://en.wikipedia.org/wiki/Variable_shadowing) och kod som detta skulle fungera: ```typescript -let a = 10; -let b = 20; +let a = 10 +let b = 20 let a = a + b ``` @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Du måste döpa om dina duplicerade variabler om du hade variabelskuggning. + ### Jämförelser med nollvärden + När du gör uppgraderingen av din subgraf kan du ibland få fel som dessa: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + För att lösa problemet kan du helt enkelt ändra `if`-satsen till något i den här stilen: ```typescript @@ -154,8 +158,8 @@ Samma gäller om du använder != istället för ==. Det vanliga sättet att göra kasting tidigare var att bara använda nyckelordet `as`, som så här: ```typescript -let byteArray = new ByteArray(10); -let uint8Array = byteArray as Uint8Array; // motsvarande: byteArray +let byteArray = new ByteArray(10) +let uint8Array = byteArray as Uint8Array // motsvarande: byteArray ``` Detta fungerar dock endast i två scenarier: @@ -167,8 +171,8 @@ Exempel: ```typescript // primitive casting -let a: usize = 10; -let b: isize = 5; +let a: usize = 10 +let b: isize = 5 let c: usize = a + (b as usize) ``` @@ -176,7 +180,7 @@ let c: usize = a + (b as usize) // upcasting on class inheritance class Bytes extends Uint8Array {} -let bytes = new Bytes(2); +let bytes = new Bytes(2) // bytes // same as: bytes as Uint8Array ``` @@ -189,7 +193,7 @@ Det finns två scenarier där du kan vilja casta, men att använda `as`/`var` // downcasting om klassarv class Bytes extends Uint8Array {} -let uint8Array = new Uint8Array(2); +let uint8Array = new Uint8Array(2) // uint8Array // breaks in runtime :( ``` @@ -198,7 +202,7 @@ let uint8Array = new Uint8Array(2); class Bytes extends Uint8Array {} class ByteArray extends Uint8Array {} -let bytes = new Bytes(2); +let bytes = new Bytes(2) // bytes // breaks in runtime :( ``` @@ -208,8 +212,8 @@ I dessa fall kan du använda funktionen `changetype`: // downcasting om klassarv class Bytes extends Uint8Array {} -let uint8Array = new Uint8Array(2); -changetype(uint8Array); // works :) +let uint8Array = new Uint8Array(2) +changetype(uint8Array) // works :) ``` ```typescript @@ -217,18 +221,18 @@ changetype(uint8Array); // works :) class Bytes extends Uint8Array {} class ByteArray extends Uint8Array {} -let bytes = new Bytes(2); -changetype(bytes); // works :) +let bytes = new Bytes(2) +changetype(bytes) // works :) ``` Om du bara vill ta bort nullability kan du fortsätta använda `as`-operatorn (eller `variable`), men se till att du vet att värdet inte kan vara null, annars kommer det att bryta. ```typescript // ta bort ogiltighet -let previousBalance = AccountBalance.load(balanceId); // AccountBalance | null +let previousBalance = AccountBalance.load(balanceId) // AccountBalance | null if (previousBalance != null) { - return previousBalance as AccountBalance; // safe remove null + return previousBalance as AccountBalance // safe remove null } let newBalance = new AccountBalance(balanceId) @@ -248,18 +252,18 @@ Vi har också lagt till några fler statiska metoder i vissa typer för att unde För att använda [nullability check feature](https://www.assemblyscript.org/basics.html#nullability-checks) kan du använda antingen `if`-satser eller den ternära operatorn (`?` och `:`) så här: ```typescript -let something: string | null = "data"; +let something: string | null = 'data' -let somethingOrElse = something ? something : "else"; +let somethingOrElse = something ? something : 'else' // or -let somethingOrElse; +let somethingOrElse if (something) { - somethingOrElse = something; + somethingOrElse = something } else { - somethingOrElse = "else"; + somethingOrElse = 'else' } ``` @@ -270,10 +274,10 @@ class Container { data: string | null } -let container = new Container(); -container.data = "data"; +let container = new Container() +container.data = 'data' -let somethingOrElse: string = container.data ? container.data : "else"; // Kompilerar inte +let somethingOrElse: string = container.data ? container.data : 'else' // Kompilerar inte ``` Vilket ger detta fel: @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + För att åtgärda problemet kan du skapa en variabel för den egenskapen så att kompilatorn kan utföra den magiska nollbarhetskontrollen: ```typescript @@ -291,12 +296,12 @@ class Container { data: string | null } -let container = new Container(); -container.data = "data"; +let container = new Container() +container.data = 'data' -let data = container.data; +let data = container.data -let somethingOrElse: string = data ? data : "else"; // kompilerar helt okej :) +let somethingOrElse: string = data ? data : 'else' // kompilerar helt okej :) ``` ### Operatörsöverladdning med egenskapsaccess @@ -305,7 +310,7 @@ Om du försöker summera (till exempel) en nullable typ (från en property acces ```typescript class BigInt extends Uint8Array { - @operator("+") + @operator('+') plus(other: BigInt): BigInt { // ... } @@ -315,26 +320,26 @@ class Wrapper { public constructor(public n: BigInt | null) {} } -let x = BigInt.fromI32(2); -let y: BigInt | null = null; +let x = BigInt.fromI32(2) +let y: BigInt | null = null -x + y; // ge kompileringsfel om ogiltighet +x + y // ge kompileringsfel om ogiltighet -let wrapper = new Wrapper(y); +let wrapper = new Wrapper(y) -wrapper.n = wrapper.n + x; // ger inte kompileringsfel som det borde +wrapper.n = wrapper.n + x // ger inte kompileringsfel som det borde ``` Vi har öppnat en fråga om AssemblyScript-kompilatorn för detta, men om du gör den här typen av operationer i dina subgraf-mappningar bör du ändra dem så att de gör en null-kontroll innan den. ```typescript -let wrapper = new Wrapper(y); +let wrapper = new Wrapper(y) if (!wrapper.n) { - wrapper.n = BigInt.fromI32(0); + wrapper.n = BigInt.fromI32(0) } -wrapper.n = wrapper.n + x; // nu är `n` garanterat ett BigInt +wrapper.n = wrapper.n + x // nu är `n` garanterat ett BigInt ``` ### Initialisering av värde @@ -342,17 +347,17 @@ wrapper.n = wrapper.n + x; // nu är `n` garanterat ett BigInt Om du har någon kod som denna: ```typescript -var value: Type; // null -value.x = 10; -value.y = "content" +var value: Type // null +value.x = 10 +value.y = 'content' ``` Det kommer att kompilera men brytas vid körning, det händer eftersom värdet inte har initialiserats, så se till att din subgraf har initialiserat sina värden, så här: ```typescript -var value = new Type(); // initialized -value.x = 10; -value.y = "content" +var value = new Type() // initialized +value.x = 10 +value.y = 'content' ``` Även om du har nullable properties i en GraphQL-entitet, som denna: @@ -367,10 +372,10 @@ type Total @entity { Och du har en kod som liknar den här: ```typescript -let total = Total.load("latest"); +let total = Total.load('latest') if (total === null) { - total = new Total("latest") + total = new Total('latest') } total.amount = total.amount + BigInt.fromI32(1) @@ -379,11 +384,11 @@ total.amount = total.amount + BigInt.fromI32(1) Du måste se till att initialisera värdet `total.amount`, för om du försöker komma åt som i den sista raden för summan, kommer det att krascha. Så antingen initialiserar du det först: ```typescript -let total = Total.load("latest") +let total = Total.load('latest') if (total === null) { - total = new Total("latest") - total.amount = BigInt.fromI32(0); + total = new Total('latest') + total.amount = BigInt.fromI32(0) } total.tokens = total.tokens + BigInt.fromI32(1) @@ -399,10 +404,10 @@ type Total @entity { ``` ```typescript -let total = Total.load("latest"); +let total = Total.load('latest') if (total === null) { - total = new Total("latest"); // initierar redan icke-nullställbara egenskaper + total = new Total('latest') // initierar redan icke-nullställbara egenskaper } total.amount = total.amount + BigInt.fromI32(1) @@ -430,17 +435,17 @@ export class Something { // or export class Something { - value: Thing; + value: Thing constructor(value: Thing) { - this.value = value; + this.value = value } } // or export class Something { - value!: Thing; + value!: Thing } ``` @@ -449,9 +454,9 @@ export class Something { Klassen `Array` accepterar fortfarande ett tal för att initiera längden på listan, men du bör vara försiktig eftersom operationer som `.push` faktiskt ökar storleken istället för att lägga till i början, till exempel: ```typescript -let arr = new Array(5); // ["", "", "", "", ""] +let arr = new Array(5) // ["", "", "", "", ""] -arr.push("something"); // ["", "", "", "", "", "something"] // size 6 :( +arr.push('something') // ["", "", "", "", "", "something"] // size 6 :( ``` Beroende på vilka typer du använder, t.ex. nullable-typer, och hur du kommer åt dem, kan du stöta på ett runtime-fel som det här: @@ -463,17 +468,17 @@ ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/ar För att faktiskt trycka i början bör du antingen initiera `Array` med storlek noll, så här: ```typescript -let arr = new Array(0); // [] +let arr = new Array(0) // [] -arr.push("something"); // ["something"] +arr.push('something') // ["something"] ``` Eller så bör du mutera den via index: ```typescript -let arr = new Array(5); // ["", "", "", "", ""] +let arr = new Array(5) // ["", "", "", "", ""] -arr[0] = "something"; // ["something", "", "", "", ""] +arr[0] = 'something' // ["something", "", "", "", ""] ``` ### GraphQL-schema diff --git a/website/pages/tr/developing/creating-a-subgraph.mdx b/website/pages/tr/developing/creating-a-subgraph.mdx index 4cc6f0946d55..dfdd32dac09d 100644 --- a/website/pages/tr/developing/creating-a-subgraph.mdx +++ b/website/pages/tr/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Bazı varlık türleri için `id`, iki diğer varlığın id'lerinden oluşturul GraphQL API'mizde aşağıdaki skalerleri destekliyoruz: -| Tür | Tanım | -| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Baytlar` | Byte dizisi, onaltılık bir dizgi olarak temsil edilir. Ethereum hash değerleri ve adresleri için yaygın olarak kullanılır. | -| `Dizgi(String)` | `string` değerleri için skaler. Null karakterleri desteklenmez ve otomatik olarak kaldırılır. | -| `Boolean` | `boolean` değerleri için skaler. | -| `Int` | GraphQL özellikleri, `Int`'in 32 bayt boyutunda olduğunu tanımlar. | -| `Int8` | 64 bitlik işaretli tam sayı olarak da bilinen 8 baytlık işaretli tam sayı, -9,223,372,036,854,775,808 ila 9,223,372,036,854,775,807 aralığındaki değerleri depolayabilir. Ethereum'dan `i64`'ü temsil etmek için bunu kullanmayı tercih edin. | -| `BigInt` | Büyük tamsayılar. Ethereum'un `uint32`, `int64`, `uint64`, ..., `uint256` türleri için kullanılır. Not: `int32`, `uint24` veya `int8` gibi `uint32`'nin altındaki her şey `i32`olarak temsil edilir. | -| `BigDecimal` | `BigDecimal` Yüksek hassasiyetli ondalık sayılar, bir anlamlı ve bir üsle temsil edilir. Üs aralığı -6143 ila +6144 arasındadır. 34 anlamlı rakama yuvarlanır. | +| Tür | Tanım | +| --- | --- | +| `Baytlar` | Byte dizisi, onaltılık bir dizgi olarak temsil edilir. Ethereum hash değerleri ve adresleri için yaygın olarak kullanılır. | +| `Dizgi(String)` | `string` değerleri için skaler. Null karakterleri desteklenmez ve otomatik olarak kaldırılır. | +| `Boolean` | `boolean` değerleri için skaler. | +| `Int` | GraphQL özellikleri, `Int`'in 32 bayt boyutunda olduğunu tanımlar. | +| `Int8` | 64 bitlik işaretli tam sayı olarak da bilinen 8 baytlık işaretli tam sayı, -9,223,372,036,854,775,808 ila 9,223,372,036,854,775,807 aralığındaki değerleri depolayabilir. Ethereum'dan `i64`'ü temsil etmek için bunu kullanmayı tercih edin. | +| `BigInt` | Büyük tamsayılar. Ethereum'un `uint32`, `int64`, `uint64`, ..., `uint256` türleri için kullanılır. Not: `int32`, `uint24` veya `int8` gibi `uint32`'nin altındaki her şey `i32`olarak temsil edilir. | +| `BigDecimal` | `BigDecimal` Yüksek hassasiyetli ondalık sayılar, bir anlamlı ve bir üsle temsil edilir. Üs aralığı -6143 ila +6144 arasındadır. 34 anlamlı rakama yuvarlanır. | #### Numaralandırmalar @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Not:** Yeni bir veri kaynağı, oluşturulduğu blok ve tüm takip eden bloklar için yalnızca çağrıları ve olayları işleyecektir, ancak önceki bloklarda bulunan geçmiş verileri işlemeyecektir. -> +> > Eğer önceki bloklar, yeni veri kaynağı için ilgili veri içeriyorsa, o veriyi indekslemek için sözleşmenin mevcut durumunu okuyarak ve yeni veri kaynağı oluşturulurken o zaman dilimindeki durumu temsil eden varlıklar oluşturarak yapmak en iyisidir. ### Veri Kaynağı Bağlamı @@ -716,7 +716,7 @@ dataSources: ``` > **Not:** Sözleşme oluşturma bloğu hızlı bir şekilde Etherscan'da aranabilir: -> +> > 1. Arama çubuğuna adresini girerek sözleşmeyi arayın. > 2. `Contract Creator` bölümünde oluşturma işlemi hash'ına tıklayın. > 3. İşlem detayları sayfasını yükleyin ve bu sözleşme için başlangıç bloğunu bulacaksınız. diff --git a/website/pages/tr/developing/graph-ts/api.mdx b/website/pages/tr/developing/graph-ts/api.mdx index 57910776ed3d..a96922aadada 100644 --- a/website/pages/tr/developing/graph-ts/api.mdx +++ b/website/pages/tr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ Bu sayfa subgraph eşleştirmelerini yazarken bullanılabilen yerleşik API'leri Subgraph bildirimindeki `apiVersion`, belirli bir subgraph için Graph Node'u tarafından çalıştırılan eşleme API sürümünü belirtir. -| Sürüm | Sürüm Notları | -| :---: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Ethereum Event nesnesindeki Ethereum types
    Added `receipt` alanına `TransactionReceipt` ve `Log` sınıfları eklendi | -| 0.0.6 | Ethereum İşlemine `nonce` alanı eklendi. object
    Added `baseFeePerGas` Ethereum Block nesnesine eklendi | +| Sürüm | Sürüm Notları | +| :-: | --- | +| 0.0.7 | Ethereum Event nesnesindeki Ethereum types
    Added `receipt` alanına `TransactionReceipt` ve `Log` sınıfları eklendi | +| 0.0.6 | Ethereum İşlemine `nonce` alanı eklendi. object
    Added `baseFeePerGas` Ethereum Block nesnesine eklendi | | 0.0.5 | AssemblyScript 0.19.10 sürümüne yükseltildi (buna son değişiklikler dahildir, lütfen [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed`'in `ethereum.transaction.gasLimit` olarak yeniden adlandırılmasına bakın | -| 0.0.4 | Ethereum SmartContractCall nesnesine `functionSignature` alanı eklendi | -| 0.0.3 | `ethereum.call.to` olarak yeniden adlandırılan object
    `etherem.call.address` Ethereum Çağrısına `from` alanı eklendi | -| 0.0.2 | Ethereum İşlem nesnesine `input` alanı eklendi | +| 0.0.4 | Ethereum SmartContractCall nesnesine `functionSignature` alanı eklendi | +| 0.0.3 | `ethereum.call.to` olarak yeniden adlandırılan object
    `etherem.call.address` Ethereum Çağrısına `from` alanı eklendi | +| 0.0.2 | Ethereum İşlem nesnesine `input` alanı eklendi | ### Dahili Türler @@ -237,15 +237,15 @@ export function handleTransfer(event: TransferEvent): void { // İşlem hash'ını olay kimliği olarak kullanarak bir Transfer varlığı oluşturun let id = event.transaction.hash let transfer = new Transfer(id) - + // Olay parametrelerini kullanarak varlığın özelliklerini ayarlayın transfer.from = event.params.from transfer.to = event.params.to transfer.amount = event.params.amount - + // Varlığı depoya kaydedin transfer.save() - } +} ``` Zincir işlenirken bir `Transfer` olayıyla karşılaşıldığında, oluşturulan `Transfer` türü (varlık türüyle adlandırma çakışmasını önlemek için burada `TransferEvent` olarak adlandırılmıştır) kullanılarak `handleTransfer` olay işleyicisine aktarılır. Bu tür, olayın ana işlemi ve parametreleri gibi verilere erişilmesini sağlar. @@ -735,44 +735,44 @@ Bir değerin türü belli olduğunda, aşağıdaki yöntemlerden biri kullanıla ### Tip Dönüşümleri Referansı -| Kaynak(lar) | Hedef | Dönüştürme işlevi | -| ----------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Kaynak(lar) | Hedef | Dönüştürme işlevi | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Veri Kaynağı Meta Verileri diff --git a/website/pages/tr/developing/unit-testing-framework.mdx b/website/pages/tr/developing/unit-testing-framework.mdx index c5e1bf917439..b6229c498b5c 100644 --- a/website/pages/tr/developing/unit-testing-framework.mdx +++ b/website/pages/tr/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Tutulan kayıt çıktısı test çalışma süresini içerir. İşte buna bir ö Bu, AssemblyScript tarafından desteklenmeyen `console.log`'u kullandığınız anlamına gelmektedir. Lütfen [Logging API](/developing/assemblyscript-api/#logging-api) kullanmayı düşünün > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Argümanlardaki uyumsuzluk, `graph-ts` ve `matchstick-as` arasındaki uyumsuzluktan kaynaklanır. Bu gibi sorunları düzeltmenin en iyi yolu her şeyi en son yayınlanan sürüme güncellemektir. diff --git a/website/pages/tr/network/benefits.mdx b/website/pages/tr/network/benefits.mdx index 6b888d327926..633b6a7740c8 100644 --- a/website/pages/tr/network/benefits.mdx +++ b/website/pages/tr/network/benefits.mdx @@ -27,47 +27,47 @@ Sorgu maliyetleri değişebilir; alıntılanan maliyet, yayın tarihindeki (Aral ## Düşük Hacimli Kullanıcı (ayda 30.000'den az sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -|:------------------------------:|:---------------------------------------:|:-------------------------------------------------------------------------:| -| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | -| Sorgu maliyetleri | 0$ + | Aylık yaklaşık 15$ | -| Mühendislik süresi | Aylık 400$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 30.000 (otomatik ölçeklendirme) | -| Sorgu başına maliyet | 0$ | 0.0005$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Coğrafi fazlalıklar | Ek node başına 750$+ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | $750+ | ~$15 | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +| :-: | :-: | :-: | +| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | +| Sorgu maliyetleri | 0$ + | Aylık yaklaşık 15$ | +| Mühendislik süresi | Aylık 400$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 30.000 (otomatik ölçeklendirme) | +| Sorgu başına maliyet | 0$ | 0.0005$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Coğrafi fazlalıklar | Ek node başına 750$+ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | $750+ | ~$15 | ## Orta Hacimli Kullanıcı (ayda 3.000.000'den fazla sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -|:------------------------------:|:------------------------------------------:|:-------------------------------------------------------------------------:| -| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | -| Sorgu maliyetleri | Aylık 500$ | Aylık 750$ | -| Mühendislik süresi | Aylık 800$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 3,000,000+ | -| Sorgu başına maliyet | 0$ | 0.00025$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Mühendislik gideri | Saatlik 200$ | Dahil | -| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | 1,650$+ | 750$ | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +| :-: | :-: | :-: | +| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | +| Sorgu maliyetleri | Aylık 500$ | Aylık 750$ | +| Mühendislik süresi | Aylık 800$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 3,000,000+ | +| Sorgu başına maliyet | 0$ | 0.00025$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Mühendislik gideri | Saatlik 200$ | Dahil | +| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | 1,650$+ | 750$ | ## Yüksek Hacimli Kullanıcı (ayda 30.000.000'den fazla sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -|:------------------------------:|:-------------------------------------------:|:-------------------------------------------------------------------------:| -| Aylık sunucu maliyeti\* | Node başına aylık 1100$ | 0$ | -| Sorgu maliyetleri | 4000$ | Aylık 4500$ | -| Gerekli node sayısı | 10 | Şart yok | -| Mühendislik süresi | Ayda 6.000 $ veya daha fazlası | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 30,000,000+ | -| Sorgu başına maliyet | 0$ | 0.00015$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | 11,000$+ | 4500$ | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +| :-: | :-: | :-: | +| Aylık sunucu maliyeti\* | Node başına aylık 1100$ | 0$ | +| Sorgu maliyetleri | 4000$ | Aylık 4500$ | +| Gerekli node sayısı | 10 | Şart yok | +| Mühendislik süresi | Ayda 6.000 $ veya daha fazlası | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 30,000,000+ | +| Sorgu başına maliyet | 0$ | 0.00015$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | 11,000$+ | 4500$ | \*yedekleme maliyetleri dahil: aylık $50-$100 diff --git a/website/pages/tr/network/delegating.mdx b/website/pages/tr/network/delegating.mdx index c2f28e949987..ba7c066ce8a2 100644 --- a/website/pages/tr/network/delegating.mdx +++ b/website/pages/tr/network/delegating.mdx @@ -33,7 +33,8 @@ Bir delegatör, stak ettiği tokenları geri almak istediğinde, tokenları 28 g Dikkate alınması gereken bir şey de akıllıca bir indeksleyici seçmektir. Güvenilir olmayan veya iyi bir iş çıkarmayan bir indeksleyici seçerseniz, stake ettiğiniz token’ları geri almak istersiniz. Bu da GRT'yi yakmak kadar kötü olabilecek olan bir durum gibidir, yani ödül kazanmak için birçok fırsatı kaybedeceğiniz anlamına gelir.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Delegasyon Kullanıcı Arayüzündeki %0,5 ücreti ve 28 günlük ayrılma süresini bir yere not edin._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Delegasyon Kullanıcı Arayüzündeki %0,5 ücreti ve 28 günlük + ayrılma süresini bir yere not edin._
    ### Delegatörler İçin Adil Bir Ödül Ödemesi Olan Güvenilir Bir İndeksleyici Seçme @@ -43,7 +44,8 @@ Bu anlaşılması gereken önemli bir kısımdır. Öncelikle, Delegasyon Parame İndeksleme Ödül Kesintisi - İndeksleme ödül kesintisi, ödüllerin indeksleyicinin kendisi için tutacağı kısmıdır. Bu, %100'e ayarlanırsa, delegatörn olarak 0 indeksleme ödülü alacağınız anlamına gelir. Kullanıcı arayüzünde %80 görürseniz, bu bir delegatör olarak %20 alacağınız anlamına gelir. Önemli bir not - ağın başlangıcında, indeksleme ödülleri, ödüllerin çoğuna sahip olacaktır.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *En iyi indeksleyici, delegatörlere ödüllerin %90'ını veriyor. Ortadaki, delegatörlere %20 veriyor. Alttaki, delegatörlere ~%83 veriyor.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *En iyi indeksleyici, delegatörlere ödüllerin %90'ını veriyor. + Ortadaki, delegatörlere %20 veriyor. Alttaki, delegatörlere ~%83 veriyor.*
    - Sorgu Ücreti Kesintisi - Bu, tam olarak indeksleme ödül kesintisi gibi çalışır. Ancak bu, özellikle indeksleyicinin topladığı sorgu ücretlerinin getirileri içindir. Ağın başlangıcında, sorgu ücretlerinden elde edilen getirilerin, indeksleme ödülüne kıyasla çok küçük olacağı belirtilmelidir. Ağdaki sorgu ücretlerinin ne zaman daha belirgin olmaya başlayacağını belirlemek için ağa dikkat edilmesi önerilir. diff --git a/website/pages/tr/network/indexing.mdx b/website/pages/tr/network/indexing.mdx index fb6a2cf1d2bf..27c87c872378 100644 --- a/website/pages/tr/network/indexing.mdx +++ b/website/pages/tr/network/indexing.mdx @@ -112,12 +112,12 @@ Bir tahsisat kapatıldıktan sonra iadeler İndeksleyici tarafından talep edile - **Orta** - 100 subgraph ve saniyede 200-500 isteği destekleyen Üretim İndeksleyici. - **Yüksek** - Şu anda kullanılan tüm subgraphları indekslemek ve ilgili trafik için istekleri sunmak için hazırlanmıştır. -| Kurulum | Postgres
    (CPU'lar) | Postgres
    (GB cinsinden bellek) | Postgres
    (TB cinsinden disk) | VM'ler
    (CPU'lar) | VM'ler
    (GB cinsinden bellek) | -| -------- |:-----------------------------:|:-----------------------------------------:|:---------------------------------------:|:---------------------------:|:---------------------------------------:| -| Düşük | 4 | 8 | 1 | 4 | 16 | -| Standart | 8 | 30 | 1 | 12 | 48 | -| Orta | 16 | 64 | 2 | 32 | 64 | -| Yüksek | 72 | 468 | 3.5 | 48 | 184 | +| Kurulum | Postgres
    (CPU'lar) | Postgres
    (GB cinsinden bellek) | Postgres
    (TB cinsinden disk) | VM'ler
    (CPU'lar) | VM'ler
    (GB cinsinden bellek) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Düşük | 4 | 8 | 1 | 4 | 16 | +| Standart | 8 | 30 | 1 | 12 | 48 | +| Orta | 16 | 64 | 2 | 32 | 64 | +| Yüksek | 72 | 468 | 3.5 | 48 | 184 | ### Bir İndeksleyicinin alması gereken bazı temel güvenlik önlemleri nelerdir? @@ -149,20 +149,20 @@ Not: Çevik ölçeklendirmeyi desteklemek için, sorgulama ve indeksleme endişe #### Graph Node -| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | -| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | -| 8000 | GraphQL HTTP sunucusu
    ( subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    ( subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | -| 8030 | Subgraph indeksleme durum API'si | /graphql | --index-node-port | - | -| 8040 | Prometheus metrikleri | /metrics | --metrics-port | - | +| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP sunucusu
    ( subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    ( subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | +| 8030 | Subgraph indeksleme durum API'si | /graphql | --index-node-port | - | +| 8040 | Prometheus metrikleri | /metrics | --metrics-port | - | #### İndeksleyici Hizmeti -| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | -| ---- | ------------------------------------------------------------------ | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP sunucusu
    (ücretli subgraph sorguları için) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrikleri | /metrics | --metrics-port | - | +| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP sunucusu
    (ücretli subgraph sorguları için) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrikleri | /metrics | --metrics-port | - | #### İndeksleyici Aracı diff --git a/website/pages/tr/operating-graph-node.mdx b/website/pages/tr/operating-graph-node.mdx index ebd935a64695..41f96f2faec4 100644 --- a/website/pages/tr/operating-graph-node.mdx +++ b/website/pages/tr/operating-graph-node.mdx @@ -77,13 +77,13 @@ Tam Kubernetes örnek yapılandırması [indeksleyici Github deposunda](https:// Graph Düğümü çalışırken aşağıdaki portları açar: -| Port | Amaç | Routes | CLI Argümanı | Ortam Değişkeni | -| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | -| 8000 | GraphQL HTTP sunucusu
    (subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | -| 8030 | Subgraph indeksleme durumu API'ı | /graphql | --index-node-port | - | -| 8040 | Prometheus ölçümleri | /metrics | --metrics-port | - | +| Port | Amaç | Routes | CLI Argümanı | Ortam Değişkeni | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP sunucusu
    (subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | +| 8030 | Subgraph indeksleme durumu API'ı | /graphql | --index-node-port | - | +| 8040 | Prometheus ölçümleri | /metrics | --metrics-port | - | > **Önemli**: Bağlantı noktalarını herkese açık olarak açarken dikkatli olun - **yönetim portları** kilitli tutulmalıdır. Bu, Graph Düğümü JSON-RPC uç noktasını içerir. @@ -114,24 +114,16 @@ indexers = [ "<.. list of all indexing nodes ..>" ] #### Birden Fazla Graph Düğümü -Graph Düğümü indeksleme farklı düğümler arasında indekslemeyi ve sorgulamayı ayırmak için birden fazla Graph Düğüm örneği çalıştırarak yatay olarak ölçeklenebilir. Bu, daha sonra `config.toml` dosyasında [özel sorgu düğümleri](#dedicated-query-nodes) , - -blok alıcıları ve [dağıtım kuralları](#deployment-rules) ile düğümler arasında subgrapları bölmek için kullanılmak üzere, farklı bir `node_id` ile yapılandırılmış Graph Düğümü başlatarak yapılabilir (örneğin Docker Compose dosyasında).

    - - +Graph Düğümü indeksleme, indekslemeyi ve sorgulamayı farklı düğümler arasında bölmek için birden fazla Graph Düğümü örneğini çalıştırarak yatay olarak ölçeklenebilir. Bu, başlangıçta farklı bir `node_id` ile yapılandırılmış Graph Düğümlerini çalıştırarak (örneğin, Docker Compose dosyasında) yapılabilir; bu daha sonra `config.toml` dosyasında kullanılabilir. [özel sorgu düğümlerini](#dedicated-query-nodes) belirtmek, [besleyicileri engellemek](#dedicated-block-ingestor) ve alt grafikleri [dağıtım kuralları](#deployment-rules) ile düğümlere bölmek için. > Birden fazla Graph Düğümü, aynı veritabanını kullanacak şekilde yapılandırılabilir ve veritabanı sharding kullanılarak yatay olarak ölçeklenebilir. - - #### Dağıtım kuralları Birden fazla Graph Düğümü verildiğinde, aynı subgraph'ın çarpışmalara yol açacak şekilde iki farklı düğüm tarafından indekslenmesinin önüne geçmek için yeni subgraphlar'ın dağıtımını yönetmek gereklidir. Bu, veritabanı sharding kullanılıyorsa bir subgraph'ın verilerinin hangi `shard`'da saklanması gerektiğini de belirtebilen dağıtım kurallarını kullanılarak yapılabilir. Dağıtım kuralları, karar vermek için subgraph adı ve dağıtımın indekslediği ağ ile eşleşebilir. Örnek dağıtım kuralı yapılandırması: - - ```toml [deployment] [[deployment.rule]] @@ -158,27 +150,19 @@ indexers = [ ] ``` - Dağıtım kuralları hakkında daha fazlasını [buradan](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#controlling-deployment) okuyun. - - #### Özelleştirilmiş sorgu düğümleri Düğümler, yapılandırma dosyasına aşağıdakini dahil ederek açıkça sorgu düğümleri olarak yapılandırılabilir: - - ```toml [general] query = "" ``` - --node-id'si düzenli ifade ile eşleşen herhangi bir düğüm, sadece sorgulara yanıt vermek üzere ayarlanacaktır. - - #### Sharding ile veritabanı ölçeklendirme Çoğu kullanım durumu için, tek bir Postgres veritabanı bir graph-düğümü örneğini desteklemek için yeterlidir. Bir graph-düğümü örneği tek bir Postgres veritabanından daha büyük hale geldiğinde, bu graph düğümü verilerinin depolanmasını birden fazla Postgres veritabanına yaymak mümkündür. Tüm veritabanları birlikte, graph-düğümü örneğinin deposunu oluşturur. Her tekil veritabanına bir shard denir. @@ -187,30 +171,21 @@ Shard'lar, subgraph dağıtımlarını birden çok veritabanına bölmek için k Sharding, Graph Düğümü'nün üzerine koyduğu yükü mevcut veritabanınıza koyamadığınızda ve veritabanı boyutunu artıramayacağınızda faydalı hale gelir. - - > Genellikle, shard'larla başlamadan önce tek bir veritabanını mümkün olduğunca büyük hale getirmek daha mantıklıdır. Tek bir istisna, sorgu trafiği subgraphlar arasında çokta eşit olmayan bir şekilde bölünmesidir. Bu durumda, yüksek-hacimli subgraphlar'ın bir shard'da tutulması ve geriye kalan her şeyin diğer bir shard'da tutulması, yüksek hacimli subgraphlar için verinin veritabanı dahili önbellekte kalması ve düşük hacimli subgraphlar'daki daha az ihtiyaç duyulan veriler tarafından değiştirilmemesi daha olası olduğu için çok yardımcı olabilir. Bağlantı yapılandırması açısından postgresql.conf'da max_connections değerinin 400 (veya belki de 200) olarak ayarlanması ve store_connection_wait_time_ms ve store_connection_checkout_count Prometheus metriklerine bakılması önerilir. Belirgin bekleme süreleri (5 milisaniye'nin üzerinde herhangi bir değer) yetersiz bağlantıların mevcut olduğunun bir işaretidir; yüksek bekleme süreleri veritabanının çok yoğun olması gibi sebeplerden de kaynaklanabilir. Ancak, veritabanı genel olarak stabil görünüyorsa, yüksek bekleme süreleri bağlantı sayısını arttırma ihtiyacını belirtir. Yapılandırmada her graph-düğümü örneğinin ne kadar bağlantı kullanabileceği bir üst sınırdır ve Graph Düğümü bunları gereksiz bulmadığı sürece açık tutmaz. Depolama yapılandırması hakkında daha fazla bilgi için [burayı](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-multiple-databases) okuyabilirsiniz. - - #### Özelleştirilmiş blok alınması Birden fazla düğüm yapılandırılmışsa yeni blokları işleme sorumluluğu olan bir düğüm belirtmek gerekecektir, böylece yapılandırılmış tüm dizin düğümleri zincir başını sorgulamaz. Bu, zincir (`chains`) ad alanının bir parçası olarak yapılır ve blok yüklemek için kullanılacak düğüm kimliği(`node_id`) belirtilir: - - ```toml [chains] ingestor = "block_ingestor_node" ``` - - - #### Birden fazla ağın desteklenmesi Graph Protokolü, indeksleme ödülleri için desteklenen ağların sayısını arttırıyor ve bir indekleyicinin işlemek isteyebileceği desteklenmeyen ağları indeksleyen birçok subgraph mevcut. c`config.toml` dosyası şunlar gibi anlamlı ve esnek yapılandırmaları destekler: @@ -221,8 +196,6 @@ Graph Protokolü, indeksleme ödülleri için desteklenen ağların sayısını `[chains]` bölümü, graph-düğümü'nün bağlandığı ethereum sağlayıcılarını ve her zincir için blokların ve diğer üst verilerin nerede depolandığını kontrol eder. Aşağıdaki örnek, mainnet için blokların vip shard'da depolandığı ve kovan için blokların primary shard'da depolandığı olmak üzere iki zinciri, mainnet ve kovan'ı yapılandırır. Mainnet zinciri iki farklı sağlayıcı kullanabilirken, kovan yalnızca bir sağlayıcıya sahiptir. - - ```toml [chains] ingestor = "block_ingestor_node" @@ -237,17 +210,12 @@ shard = "primary" provider = [ { label = "kovan", url = "http://..", features = [] } ] ``` - Sağlayıcı yapılandırması hakkında daha fazla bilgi için [burayı](https://github.com/graphprotocol/graph-node/blob/master/docs/config.md#configuring-ethereum-providers) okuyabilirsiniz. - - ### Ortam değişkenleri Graph Düğümü, özellikleri etkinleştirebilen veya Graph Düğümü davranışını değiştirebilen bir dizi çevre değişkeni destekler. Bunlar [burada](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md) belgelenmiştir. - - ### Sürekli dağıtım Gelişmiş yapılandırmaya sahip ölçeklendirilmiş bir dizinleme kurulumu işleten kullanıcılar, Graph Düğümler'ini Kubernetes ile yönetmekten faydalanabilirler. @@ -255,30 +223,22 @@ Gelişmiş yapılandırmaya sahip ölçeklendirilmiş bir dizinleme kurulumu iş - İndeksleyici github deposunda bir [Kubernetes referansı örneği](https://github.com/graphprotocol/indexer/tree/main/k8s) bulunmaktadır - [Launchpad](https://docs.graphops.xyz/launchpad/intro), GraphOps tarafından yönetilen Kubernetes üzerinde Graph Protokol indeksleyicisi çalıştırmak için kullanılan bir araç setidir. Graph Düğümü dağıtımını yönetmek için bir dizi Helm şeması ve bir CLI sağlar. - - ### Graph Düğümü Yönetimi Çalışan bir Graph Düğümüne (veya Graph Düğümlerine) sahip olunduktan sonra, dağıtılan subgraplar'ın bu düğümler üzerinde yönetilmesi zorluğu ortaya çıkar. Subgraphlar'ı yönetmeye yardımcı olmak için Graph Düğümü, bir dizi araç sunar. - - #### Kayıt tutma Graph Düğümü'nün kayıtları, Graph Düğümü ve belirli subgraphlar'ın hata ayıklanması ve optimizasyonu için faydalı bilgiler sağlayabilir. Graph Düğümü, `GRAPH_LOG` ortam değişkeni aracılığıyla farklı kayıt seviyelerini destekler ve şu seviyeleri içerir: error, warn, info, debug veya trace. Ek olarak, `GRAPH_LOG_QUERY_TIMING` `gql` olarak ayarlanması GraphQL sorgularının nasıl çalıştığı hakkında daha fazla ayrıntı sağlar (ancak bu, büyük bir kayıt hacmi oluşturacaktır). - - #### Görüntüleme & uyarma Graph Düğümü, varsayılan olarak 8040 port'undaki Prometheus uç noktası aracılığıyla metrikleri sağlar. Ardından Grafana, bu metrikleri görselleştirmek için kullanılabilir. İndeksleyici github deposu [Grafana yapılandırmasına bir örnek](https://github.com/graphprotocol/indexer/blob/main/k8s/base/grafana.yaml) sağlar. - - #### Graphman `graphman`, Graph Düğümü'nün bakım aracıdır ve farklı günlük görevlerinin teşhis ve çözümüne yardımcı olur. @@ -287,20 +247,14 @@ Graphman komutu, resmi konteynerlara dahil edilmiştir ve graph-düğümü konte `graphman` komutlarının tam belgeleri Graph Düğümü github deposunda mevcuttur. Graph Düğümü `/docs`'da bulunan \[/docs/graphman.md\] (https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md) bağlantısına bakın - - ### Subgraphlarla çalışma - - #### İndeksleme durum API'si Varsayılan olarak 8030/graphql port'unda mevcut olan indeksleme durumu API'si, farklı subgraphlar için indeksleme durumunu ve ispatlarını kontrol etmek, subgraph özelliklerini incelemek ve daha fazlasını yapmak için çeşitli yöntemler sunar. Tam şema [burada](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql) mevcut. - - #### Endeksleme performansı İndeksleme sürecinin üç ayrı parçası bulunmaktadır: @@ -324,8 +278,6 @@ Bu aşamalar boru hattında (yani eşzamanlı olarak yürütülebilir), ancak bi Subgraph indeksleme metrikleri, indeksleme yavaşlığının temel nedenini teşhis etmede yardımcı olabilir. Bazı durumlarda, sorun subgraph'ın kendisiyle ilgilidir, ancak diğer durumlarda, geliştirilmiş ağ sağlayıcıları, azaltılmış veritabanı çekişmesi ve diğer yapılandırma iyileştirmeleri indeksleme performansını belirgin şekilde artırabilir. - - #### Başarısıız subgraphlar İndekslemesi sırasında subgraphlar beklenmedik veri, beklendiği gibi çalışmayan bir bileşen veya olay işleyicilerinde veya yapılandırmada bir hata olması durumunda başarısız olabilir. İki genel başarısızlık türü mevcuttur: @@ -335,12 +287,8 @@ Subgraph indeksleme metrikleri, indeksleme yavaşlığının temel nedenini teş Bazı durumlarda, başarısızlık indeksleyici tarafından çözülebilir (örneğin, hatanın doğru türde sağlayıcıya sahip olmamasından kaynaklanması durumunda, gerekli sağlayıcı eklenirse indeksleme devam ettirilebilir). Ancak diğer durumlarda, subgraph kodunda bir değişiklik gereklidir. - - > Belirleyici başarısızlıklar, başarısız blok için oluşturulan İndeksleme Kanıtı ile "final" olarak kabul edilirken, deterministik olmayan başarısızlıklar subgraph'ın "unfail"i idare edip indekslememye devam edebileceğinden "final" olarak kabul edilmez. Bazı durumlarda, deterministik olmayan etiketi yanlış olabilir ve subgraph hatayı asla aşamayabilir. Bu tür başarısızlıklar, Graph Düğümü github deposunda bir sorun olarak bildirilmelidir. - - #### Blok ve çağrı önbelleği Graph Düğümü, sağlayıcıdan tekrar alma işlemini kaydetmek için depoda belirli verileri önbelleğe alır. Bloklar ve `eth_calls` sonuçları önbelleğe alınır (bu sonuncusu belirli bir bloktan itibaren önbelleğe alınır). Bu önbellekleme, azca değiştirilmiş bir subgraph'ın "yeniden senkronizasyonu" sırasında indeksleme hızını büyük ölçüde artırabilir. @@ -350,12 +298,10 @@ Ancak bazı örneklerde, Ethereum düğümü bir süre boyunca yanlış veri sa Örneğin tx makbuzu etkinlik eksikliği gibi bir blok önbellek tutarsızlığı şüphesi varsa: 1. zincir ismini bulmak için `graphman chain list`. -2. `graphman chain check-blocks by-number `, önbelleğe alınan bloğun sağlayıcıyla eşleşip eşleşmediğini kontrol edecek ve eşleşmiyorsa bloğu önbellekten silecek. - 1. Bir fark varsa, tüm önbelleği `graphman chain truncate ` ile kesmek daha güvenli olabilir. +2. `graphman chain check-blocks by-number `, önbelleğe alınan bloğun sağlayıcıyla eşleşip eşleşmediğini kontrol edecek ve eşleşmiyorsa bloğu önbellekten silecek. + 1. Bir fark varsa, tüm önbelleği `graphman chain truncate ` ile kesmek daha güvenli olabilir. 2. Blok sağlayıcıyla eşleşirse, sorun doğrudan sağlayıcıya karşı hata ayıklanabilir. - - #### Sorgulama sorunları ve hataları Bir subgraph indekslendikten sonra, indeksleyiciler subgraph'ın ayrılmış sorgu son noktası aracılığıyla sorguları sunmayı bekleyebilirler. İndeksleyiciler önemli sorgu hacmi sunmayı umuyorlarsa, bunun için ayrılmış bir sorgu düğümü önerilir ve çok yüksek sorgu hacimleri durumunda indeksleyiciler sorguların indeksleme sürecini etkilememesi için replika shardlar yapılandırmak isteyebilirler. @@ -364,14 +310,10 @@ Bununla birlikte, özel bir sorgu düğümü ve replikalarda bile, belirli sorgu Tek bir "sihirli çözüm" yoktur, ancak yavaş sorguların önlenmesi, teşhisi ve işlenmesi için bir dizi araç bulunmaktadır. - - ##### Sorgu önbellekleme Graph Düğümü, varsayılan olarak GraphQL sorgularını önbelleğe alarak veritabanı yükünü önemli ölçüde azaltabilir. Bu, `GRAPH_QUERY_CACHE_BLOCKS` ve `GRAPH_QUERY_CACHE_MAX_MEM` ayarları ile daha da yapılandırılabilir - [buradan](https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md#graphql-caching) daha fazla bilgi edinin. - - ##### Sorguların analizi Sorunlu sorgular genellikle iki şekilde ortaya çıkar. Bazı durumlarda, kullanıcılar kendileri belirli bir sorgunun yavaş olduğunu bildirirler. Bu durumda zorluk, yavaşlığın nedenini teşhis etmektir - genel bir sorun mu, yoksa subgraph'a veya sorguya özgü mü olduğunu belirlemek ve tabii ki mümkünse sonra çözmek olacaktır. @@ -382,8 +324,6 @@ Diğer durumlarda, tetikleyici sorgu düğümündee yüksek bellek kullanımı o Yavaş bir sorgu verildiğinde, indeksleyicilerin birkaç seçeneği vardır. Tabii ki, sorunlu sorgunun gönderilme maliyetini önemli ölçüde artırmak için maliyet modelini değiştirebilirler. Bu, o sorgunun sıklığında azalmaya neden olabilir. Ancak, genellikle sorunun temek nedenini çözmez. - - ##### Hesabımsı optimizasyon Varlıkları depolayan veritabanı tablolarının genellikle iki çeşit olduğu görünmektedir: oluşturulduktan sonra hiçbir zaman güncellenmeyen mesela finansal işlemler listesine benzer şeyler saklayan olan 'işlemimsi' ve varlıkların çok sık güncellendiği, mesela her işlem kaydedildiğinde değiştirilen finansal hesaplar gibi şeyler saklayan 'hesabımsı'. Hesabımsı tablolar, birçok varlık sürümünü içermelerine rağmen, nispeten az sayıda farklı varlığa sahip olmasıyla bilinir. Çoğu durumda, böyle bir tabloda farklı varlık sayısı, toplam satır (varlık sürümleri) sayısının %1'ine eşittir @@ -398,12 +338,8 @@ Bir tablonun hesabımsı olduğu belirlendikten sonra `graphman stats account-li Uniswapımsı subgraplar için, çift (`pair`) ve `token` tabloları bu optimizasyon için en uygun adaylardır ve veritabanı yükü üzerinde etkili bir etkiye sahip olabilirler. - - #### Subgraphları kaldırma - - > Bu, Graph Node 0.29.x sürümünde kullanılabilir olan yeni bir fonksiyonelliktir Bir noktada indeksleyici, belirli bir subgraph'ı kaldırmak isteyebilir. Bu, tüm indekslenmiş verileri ve bir dağıtımı silen `graphman drop` komutuyla kolayca gerçekleştirilebilir. Dağıtım, subgraph adı, bir IPFS hash `Qm..` veya veritabanı ad alanı `sgdNNN` olarak belirtilebilir. Daha fazla belgeye [buradan](https://github.com/graphprotocol/graph-node/blob/master/docs/graphman.md#-drop) erişilebilir. diff --git a/website/pages/tr/publishing/publishing-a-subgraph.mdx b/website/pages/tr/publishing/publishing-a-subgraph.mdx index 5ea9a59a3679..b217d55b13bd 100644 --- a/website/pages/tr/publishing/publishing-a-subgraph.mdx +++ b/website/pages/tr/publishing/publishing-a-subgraph.mdx @@ -4,7 +4,7 @@ title: Merkeziyetsiz Ağa Bir Subgraph Yayınlamak Subgraph'iniz [Subgraph Studio'ya deploy edildikten](/deploying/deploying-a-subgraph-to-studio) sonra, onu test edip üretime sokmaya hazırsınız, ardından merkeziyetsiz ağda yayınlayabilirsiniz. -Merkeziyetsiz ağda bir subgraph yayınlamak, [küratörlerin](/network/curating) ona sinyal göndermeye ve [indeksleyicilerin](/network/indexing) onu indekslemeye başlamasını sağlar. +Merkeziyetsiz ağda bir subgraph yayınlamak, [küratörlerin](/network/curating) ona sinyal göndermeye ve [indeksleyicilerin](/network/indexing) onu indekslemeye başlamasını sağlar. diff --git a/website/pages/tr/querying/graphql-api.mdx b/website/pages/tr/querying/graphql-api.mdx index 84ba2a601058..4e817f0e579d 100644 --- a/website/pages/tr/querying/graphql-api.mdx +++ b/website/pages/tr/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Aşağıdaki örnekte, `outcome` değeri `succeeded` olan ve `number` değeri `1 ``` > **Syntactic sugar:** Yukarıdaki sorguyu, virgülle ayrılmış bir alt ifade geçirerek, `and` operatörünü kaldırarak basitleştirebilirsiniz. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Tam metin arama sorgularının kullanması gereken bir zorunlu alanı vardır, b Tam metin arama operatörleri: -| Sembol | Operatör | Tanımlama | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Birden fazla arama terimini, sağlanan tüm terimleri içeren varlıklar için bir filtrede birleştirmek için kullanılır | -| | | `Or` | Or, işleciyle ayrılmış birden çok arama terimi içeren sorgular, sağlanan terimlerden herhangi biriyle eşleşen tüm varlıkları döndürür | -| `<->` | `Follow by` | İki kelime arasındaki mesafeyi belirtir. | -| `:*` | `Prefix` | Ön eki eşleşen kelimeleri bulmak için önek arama terimini kullanın (2 karakter gereklidir.) | +| Sembol | Operatör | Tanımlama | +| --- | --- | --- | +| `&` | `And` | Birden fazla arama terimini, sağlanan tüm terimleri içeren varlıklar için bir filtrede birleştirmek için kullanılır | +| | | `Or` | Or, işleciyle ayrılmış birden çok arama terimi içeren sorgular, sağlanan terimlerden herhangi biriyle eşleşen tüm varlıkları döndürür | +| `<->` | `Follow by` | İki kelime arasındaki mesafeyi belirtir. | +| `:*` | `Prefix` | Ön eki eşleşen kelimeleri bulmak için önek arama terimini kullanın (2 karakter gereklidir.) | #### Örnekler diff --git a/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx index a54f163e8541..338c85951884 100644 --- a/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Değişken gölgelemeniz varsa, yinelenen değişkenlerinizi yeniden adlandırmanız gerekir. + ### Null Karşılaştırmaları + Subgraph'inizde yükseltme yaparak, bazen aşağıdaki gibi hatalar alabilirsiniz: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Çözmek için `if` ifadesini aşağıdaki gibi değiştirebilirsiniz: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Bu sorunu çözmek için, bu özellik erişimi için bir değişken oluşturabilirsiniz, böylece derleyici geçersizlik denetimi sihrini yapabilir: ```typescript diff --git a/website/pages/tr/sunrise.mdx b/website/pages/tr/sunrise.mdx index 5c749abd441d..b1df7292ebed 100644 --- a/website/pages/tr/sunrise.mdx +++ b/website/pages/tr/sunrise.mdx @@ -12,9 +12,7 @@ Bu plan, yeni yayınlanan subgraphlar üzerinde sorgular sunmak için bir yükse ### Merkeziyetsiz verinin doğuşunun aşamaları nelerdir? -**Sunray**: Barındırılan hizmet zincirleri için desteği etkinleştirin, sorunsuz bir yükseltme akışı sunun, Graph Network'te ücretsiz bir plan sunun. -**Sunbeam**: Subgraph geliştiricilerinin subgraph'lerini Graph Network'e yükseltmeleri gereken yükseltme penceresi. Bunun başlangıcı ve süresi yakında açıklanacak. -**Sunrise**: Barındırılan hizmet uç noktalarının süresi, trafik Graph Network'e taşındıkça sona erecektir. +**Sunray**: Barındırılan hizmet zincirleri için desteği etkinleştirin, sorunsuz bir yükseltme akışı sunun, Graph Network'te ücretsiz bir plan sunun. **Sunbeam**: Subgraph geliştiricilerinin subgraph'lerini Graph Network'e yükseltmeleri gereken yükseltme penceresi. Bunun başlangıcı ve süresi yakında açıklanacak. **Sunrise**: Barındırılan hizmet uç noktalarının süresi, trafik Graph Network'e taşındıkça sona erecektir. ### Kendi altyapımı çalıştırmam gerekiyor mu? diff --git a/website/pages/uk/developing/creating-a-subgraph.mdx b/website/pages/uk/developing/creating-a-subgraph.mdx index e557d92701e6..aae315292349 100644 --- a/website/pages/uk/developing/creating-a-subgraph.mdx +++ b/website/pages/uk/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/uk/developing/graph-ts/api.mdx b/website/pages/uk/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/uk/developing/graph-ts/api.mdx +++ b/website/pages/uk/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/uk/developing/unit-testing-framework.mdx b/website/pages/uk/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/uk/developing/unit-testing-framework.mdx +++ b/website/pages/uk/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/uk/network/benefits.mdx b/website/pages/uk/network/benefits.mdx index 08bfd02f8129..b12002a1b0ec 100644 --- a/website/pages/uk/network/benefits.mdx +++ b/website/pages/uk/network/benefits.mdx @@ -27,53 +27,54 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Малоактивний користувач (менше ніж 30 000 запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -|:-----------------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------:| -| Щомісячна плата за сервер\* | $350 на місяць | $0 | -| Вартість запитів | $0+ | ~$15 на місяць | -| Час технічного обслуговування | $400 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30 000 (автомасштабування) | -| Вартість одного запиту | $0 | $0.0005 | -| Інфраструктура | Централізована | Децентралізована | -| Географічне резервування | $750+ за кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $750+ | ~$15 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +| :-: | :-: | :-: | +| Щомісячна плата за сервер\* | $350 на місяць | $0 | +| Вартість запитів | $0+ | ~$15 на місяць | +| Час технічного обслуговування | $400 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30 000 (автомасштабування) | +| Вартість одного запиту | $0 | $0.0005 | +| Інфраструктура | Централізована | Децентралізована | +| Географічне резервування | $750+ за кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $750+ | ~$15 | ## Середній користувач (3 000 000+ запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -|:-----------------------------------------:|:-----------------------------------------------:|:-----------------------------------------------------------------:| -| Щомісячна плата за сервер\* | $350 на місяць | $0 | -| Вартість запитів | $500 на місяць | $750 на місяць | -| Час технічного обслуговування | $800 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 3,000,000+ | -| Вартість одного запиту | $0 | $0.00025 | -| Інфраструктура | Централізована | Децентралізована | -| Інженерно-технічні витрати | $200 на годину | Включено | -| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $1,650+ | $750 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +| :-: | :-: | :-: | +| Щомісячна плата за сервер\* | $350 на місяць | $0 | +| Вартість запитів | $500 на місяць | $750 на місяць | +| Час технічного обслуговування | $800 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 3,000,000+ | +| Вартість одного запиту | $0 | $0.00025 | +| Інфраструктура | Централізована | Децентралізована | +| Інженерно-технічні витрати | $200 на годину | Включено | +| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $1,650+ | $750 | ## Високоактивний користувач (30 000 000+ запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -|:-----------------------------------------:|:-----------------------------------------------:|:-----------------------------------------------------------------:| -| Щомісячна плата за сервер\* | $1100 на місяць, за одну ноду | $0 | -| Вартість запитів | $4000 | $4,500 на місяць | -| Кількість необхідних нод | 10 | Не стосується | -| Час технічного обслуговування | $6,000 і більше на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30,000,000+ | -| Вартість одного запиту | $0 | $0.00015 | -| Інфраструктура | Централізована | Децентралізована | -| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $11,000+ | $4,500 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +| :-: | :-: | :-: | +| Щомісячна плата за сервер\* | $1100 на місяць, за одну ноду | $0 | +| Вартість запитів | $4000 | $4,500 на місяць | +| Кількість необхідних нод | 10 | Не стосується | +| Час технічного обслуговування | $6,000 і більше на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30,000,000+ | +| Вартість одного запиту | $0 | $0.00015 | +| Інфраструктура | Централізована | Децентралізована | +| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $11,000+ | $4,500 | \*включаючи витрати на резервне копіювання: $50-$100 на місяць Час технічного обслуговування, розрахований на основі припущення $200 за годину -використання функції максимального бюджету запиту у вкладці бюджетного тарифоутворення зі збереженням високої якості обслуговування +використання функції максимального бюджету запиту у вкладці бюджетного тарифоутворення зі збереженням +високої якості обслуговування Estimated costs are only for Ethereum Mainnet subgraphs — costs are even higher when self hosting a `graph-node` on other networks. diff --git a/website/pages/uk/network/delegating.mdx b/website/pages/uk/network/delegating.mdx index a4fe90cf6c5a..64584883d14b 100644 --- a/website/pages/uk/network/delegating.mdx +++ b/website/pages/uk/network/delegating.mdx @@ -33,7 +33,8 @@ title: Делегування Важливо також враховувати, що вибір індексатора має бути обґрунтованим. Якщо ви вирішите обрати індексатора, який не заслуговує на довіру або погано виконує свою роботу, ви побажаєте відмовитися від делегування, а це означає, що ви втратите багато можливостей заробити винагороду, що може бути так само погано, як і спалювання GRT.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Зверніть увагу на комісію в розмірі 0,5% в Інтерфейсі для делегацій, а також на 28-денний період розблокування._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Зверніть увагу на комісію в розмірі 0,5% в Інтерфейсі для + делегацій, а також на 28-денний період розблокування._
    ### Вибір надійного індексатора зі справедливою винагородою для делегатів @@ -43,7 +44,8 @@ title: Делегування Частина винагороди за індексацію (Indexing Reward Cut) — це частина винагороди, яку індексатор залишає собі. Це означає, що якщо вона встановлена на рівні 100%, то як делегат ви отримаєте 0% за індексацію. Якщо в інтерфейсі ви бачите 80%, це означає, що як делегат ви отримаєте 20%. Важливе зауваження — на початку роботи мережі винагороди за індексацію будуть складати більшу частину доходів.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Найкращий індексатор віддає делегатам 90% від суми винагороди. Середній - 20%. Найменший індексатор дає ~83%. * + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Найкращий індексатор віддає делегатам 90% від суми винагороди. + Середній - 20%. Найменший індексатор дає ~83%. *
    - Частина від винагороди за запити — працює точно так само, як і за індексацію. Однак, це стосується саме повернення комісії за запити, яку отримує індексатор. Слід зазначити, що на початку роботи мережі прибуток від комісійних за запити буде дуже малий в порівнянні з винагородою за індексацію. Рекомендується стежити за мережею, щоб визначити, коли комісія за запити в мережі почне бути більш значущою. diff --git a/website/pages/uk/network/indexing.mdx b/website/pages/uk/network/indexing.mdx index 64e07ca91ea6..933e55faa68e 100644 --- a/website/pages/uk/network/indexing.mdx +++ b/website/pages/uk/network/indexing.mdx @@ -113,11 +113,11 @@ Query fees are collected by the gateway and distributed to indexers according to - **Large** - підготовлений для індексації всіх підграфів, що використовуються наразі, і обслуговування запитів на відповідний трафік. | Налаштування | Postgres
    (CPU) | Postgres
    (пам'ять в GB) | Postgres
    (диск у ТБ) | VMs
    (Центральні CPU) | VMs
    (пам'ять у ГБ) | -| ------------ |:-------------------------:|:----------------------------------:|:-------------------------------:|:-------------------------------:|:-----------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### Яких основних заходів безпеки повинен дотримуватися індексатор? @@ -149,26 +149,26 @@ Query fees are collected by the gateway and distributed to indexers according to #### Graph Node -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | -| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | -| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | -| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | -| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| --- | --- | --- | --- | --- | +| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | +| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | +| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | +| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | #### Служба індексації -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | HTTP-сервер GraphQL
    (для платних запитів до підграфів) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| --- | --- | --- | --- | --- | +| 7600 | HTTP-сервер GraphQL
    (для платних запитів до підграфів) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Метрики Prometheus | /metrics | --metrics-port | - | #### Агент індексації -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| ---- | ------------------------------ | ------------ | ------------------------- | --------------------------------------- | -| 8000 | API для керування індексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| --- | --- | --- | --- | --- | +| 8000 | API для керування індексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### Налаштування серверної інфраструктури з використанням Terraform на Google Cloud diff --git a/website/pages/uk/operating-graph-node.mdx b/website/pages/uk/operating-graph-node.mdx index b198c70ca3ed..7bcb6ac9dab6 100644 --- a/website/pages/uk/operating-graph-node.mdx +++ b/website/pages/uk/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | -| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | -| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | -| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | -| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| --- | --- | --- | --- | --- | +| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | +| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | +| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | +| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/uk/querying/graphql-api.mdx b/website/pages/uk/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/uk/querying/graphql-api.mdx +++ b/website/pages/uk/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx b/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/ur/chain-integration-overview.mdx b/website/pages/ur/chain-integration-overview.mdx index 6855823bae83..f09de51959b9 100644 --- a/website/pages/ur/chain-integration-overview.mdx +++ b/website/pages/ur/chain-integration-overview.mdx @@ -7,8 +7,7 @@ title: چین انٹیگریشن کے عمل کا جائزہ ## مرحلہ 1. تکنیکی انٹیگریشن - ٹیمیں غیر ای وی ایم پر مبنی چینز کے لیے گراف نوڈ انٹیگریشن اور فائر ہوز پر کام کرتی ہیں۔ [یہ طریقہ ہے](/new-chain-integration/). -- ٹیمیں فورم تھریڈ بنا کر پروٹوکول انٹیگریشن کا عمل شروع کرتی ہیں [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71)(گورننس اور GIPs کے تحت نئے ڈیٹا ذرائع ذیلی زمرہ) - ۔ پہلے سے طے شدہ فورم ٹیمپلیٹ کا استعمال لازمی ہے. +- ٹیمیں فورم تھریڈ بنا کر پروٹوکول انٹیگریشن کا عمل شروع کرتی ہیں [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71)(گورننس اور GIPs کے تحت نئے ڈیٹا ذرائع ذیلی زمرہ) ۔ پہلے سے طے شدہ فورم ٹیمپلیٹ کا استعمال لازمی ہے. ## مرحلہ 2۔ انٹیگریشن کی توثیق diff --git a/website/pages/ur/cookbook/cosmos.mdx b/website/pages/ur/cookbook/cosmos.mdx index 5880b8348d76..df28c5b1eecf 100644 --- a/website/pages/ur/cookbook/cosmos.mdx +++ b/website/pages/ur/cookbook/cosmos.mdx @@ -165,7 +165,7 @@ class Any { ہر ہینڈلر کی قسم اس کے اپنے ڈیٹا ڈھانچے کے ساتھ آتی ہے جو میپنگ فنکشن کی دلیل کے طور پر پاس کی جاتی ہے. -- بلاک ہینڈلرز کو ` Block ` قسم موصول ہوتی ہے. +- بلاک ہینڈلرز کو `Block` قسم موصول ہوتی ہے. - ایونٹ ہینڈلرز کو `EventData` قسم موصول ہوتی ہے. - ٹرانزیکشن ہینڈلرز کو `TransactionData` قسم موصول ہوتی ہے. - میسج ہینڈلرز کو `MessageData` قسم موصول ہوتی ہے. diff --git a/website/pages/ur/cookbook/near.mdx b/website/pages/ur/cookbook/near.mdx index 875a1ca0f300..5fe26e7fa413 100644 --- a/website/pages/ur/cookbook/near.mdx +++ b/website/pages/ur/cookbook/near.mdx @@ -72,7 +72,7 @@ dataSources: file: ./src/mapping.ts # link to the file with the Assemblyscript mappings ``` -- NEAR سب گراف ڈیٹا ماخذ کا ایک نیا ` kind ` متعارف کراتے ہیں (`near`) +- NEAR سب گراف ڈیٹا ماخذ کا ایک نیا `kind` متعارف کراتے ہیں (`near`) - `network` ہوسٹنگ گراف نوڈ پر موجود نیٹ ورک کے مطابق ہونا چاہیے۔ ہوسٹڈ سروس پر، NEAR کا مین نیٹ `near-mainnet` ہے، اور NEAR کا ٹیسٹ نیٹ ہے `near-testnet` - NEAR ڈیٹا کے ذرائع ایک اختیاری `source.account` فیلڈ متعارف کراتے ہیں، جو کہ ایک [ سے متعلق انسانی پڑھنے کے قابل ID ہے۔ اکاؤنٹ کے قریب](https://docs.near.org/docs/concepts/account)۔ یہ ایک اکاؤنٹ یا سب اکاؤنٹ ہو سکتا ہے. - NEAR ڈیٹا کے ذرائع ایک متبادل اختیاری `source.accounts` فیلڈ متعارف کراتے ہیں، جس میں اختیاری لاحقے اور سابقے ہوتے ہیں۔ کم از کم سابقہ ​​یا لاحقہ متعین ہونا ضروری ہے، وہ بالترتیب اقدار کی فہرست کے ساتھ شروع یا ختم ہونے والے کسی بھی اکاؤنٹ سے مماثل ہوں گے۔ نیچے دی گئی مثال مماثل ہوگی: `[app|good].*[morning.near|morning.testnet]`۔ اگر صرف سابقوں یا لاحقوں کی فہرست ضروری ہو تو دوسری فیلڈ کو چھوڑا جا سکتا ہے. @@ -255,7 +255,7 @@ NEAR سپورٹ بیٹا میں ہے، جس کا مطلب ہے کہ API میں ### کیا رسید ہینڈلرز اکاؤنٹس اور ان کے سب اکاؤنٹس کو متحرک کریں گے؟ -اگر ایک ` account ` متعین کیا گیا ہے، تو وہ صرف صحیح اکاؤنٹ کے نام سے مماثل ہوگا۔ مثال کے طور پر، اکاؤنٹس اور سب اکاؤنٹس سے ملنے کے لیے مخصوص ` prefixes ` اور ` suffixes` کے ساتھ، `accounts` فیلڈ کی وضاحت کرکے سب اکاؤنٹس کو ملانا ممکن ہے۔ درج ذیل تمام `mintbase1.near` سب اکاؤنٹس سے مماثل ہوں گے: +اگر ایک `account` متعین کیا گیا ہے، تو وہ صرف صحیح اکاؤنٹ کے نام سے مماثل ہوگا۔ مثال کے طور پر، اکاؤنٹس اور سب اکاؤنٹس سے ملنے کے لیے مخصوص `prefixes` اور ` suffixes` کے ساتھ، `accounts` فیلڈ کی وضاحت کرکے سب اکاؤنٹس کو ملانا ممکن ہے۔ درج ذیل تمام `mintbase1.near` سب اکاؤنٹس سے مماثل ہوں گے: ```yaml accounts: diff --git a/website/pages/ur/cookbook/subgraph-debug-forking.mdx b/website/pages/ur/cookbook/subgraph-debug-forking.mdx index 0f1fb3a56d32..764a7294c0d6 100644 --- a/website/pages/ur/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ur/cookbook/subgraph-debug-forking.mdx @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -افوہ، کتنی بدقسمتی کی بات ہے، جب میں اپنے بہترین نظر آنے والے سب گراف کو [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) میں تعینات کرتا ہوں تو یہ *"گراوتار نہیں ملا!"* خرابی. +افوہ، کتنی بدقسمتی کی بات ہے، جب میں اپنے بہترین نظر آنے والے سب گراف کو [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) میں تعینات کرتا ہوں تو یہ _"گراوتار نہیں ملا!"_ خرابی. درست کرنے کی کوشش کرنے کا معمول کا طریقہ یہ ہے: diff --git a/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx index 0e84d4713cbd..e4b3f587760d 100644 --- a/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا ## ہوسٹڈ سروس اکاؤنٹ بنائیں -ہوسٹڈ سروس استعمال کرنے سے پہلے، ہماری ہوسٹڈ سروس میں ایک اکاؤنٹ بنائیں۔ اس کے لیے آپ کو ایک [گٹ ہب](https://github.com/) اکاؤنٹ کی ضرورت ہوگی۔ اگر آپ کے پاس نہیں ہے تو آپ کو پہلے اسے بنانے کی ضرورت ہے۔ پھر، [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) پر جائیں، _'گٹ ہب کے ساتھ سائن اپ کریں' پر کلک کریں۔ _بٹن، اور گٹ ہب کی اجازت کے بہاؤ کو مکمل کریں. +ہوسٹڈ سروس استعمال کرنے سے پہلے، ہماری ہوسٹڈ سروس میں ایک اکاؤنٹ بنائیں۔ اس کے لیے آپ کو ایک [گٹ ہب](https://github.com/) اکاؤنٹ کی ضرورت ہوگی۔ اگر آپ کے پاس نہیں ہے تو آپ کو پہلے اسے بنانے کی ضرورت ہے۔ پھر، [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) پر جائیں، *'گٹ ہب کے ساتھ سائن اپ کریں' پر کلک کریں۔ *بٹن، اور گٹ ہب کی اجازت کے بہاؤ کو مکمل کریں. ## ایکسیس ٹوکن سٹور کریں @@ -20,7 +20,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا **تصویر** - سب گراف کے لیے پیش نظارہ تصویر اور تھمب نیل کے طور پر استعمال کرنے کے لیے ایک تصویر منتخب کریں. -**سب گراف کا نام** - اکاؤنٹ کے نام کے ساتھ جس کے تحت سب گراف بنایا گیا ہے، یہ `account-name/subgraph-name`-سٹائل نام کی بھی وضاحت کرے گا جو تعیناتیوں اور گراف کیو ایل اینڈ پوائنٹس کے لیے استعمال ہوتا ہے۔ _اس فیلڈ کو بعد میں تبدیل نہیں کیا جاسکتا۔_ +**سب گراف کا نام** - اکاؤنٹ کے نام کے ساتھ جس کے تحت سب گراف بنایا گیا ہے، یہ `account-name/subgraph-name`-سٹائل نام کی بھی وضاحت کرے گا جو تعیناتیوں اور گراف کیو ایل اینڈ پوائنٹس کے لیے استعمال ہوتا ہے۔ _اس فیلڈ کو بعد میں تبدیل نہیں کیا جاسکتا۔_ **اکاونٹ** - وہ اکاؤنٹ جس کے تحت سب گراف بنایا گیا ہے۔ یہ کسی فرد یا تنظیم کا اکاؤنٹ ہو سکتا ہے۔ _سب گرافس کو بعد میں اکاؤنٹس کے درمیان منتقل نہیں کیا جا سکتا۔_ @@ -48,7 +48,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا اپنے سب گراف کی تعریف میں تبدیلی کرتے وقت، مثال کے طور پر، ہستی میپنگ میں کسی مسئلے کو حل کرنے کے لیے، اپنے سب گراف کے اپ ڈیٹ شدہ ورژن کو تعینات کرنے کے لیے اوپر `yarn deploy` کمانڈ دوبارہ چلائیں۔ سب گراف کی کسی بھی اپڈیٹ کے لیے ضروری ہے کہ گراف نوڈ آپ کے پورے سب گراف کو دوبارہ ترتیب دے، دوبارہ جینیسس بلاک سے شروع ہو. -اگر آپ کا پہلے سے تعینات کردہ سب گراف اب بھی حالت میں ہے ` Syncing `، تو اسے فوری طور پر نئے تعینات کردہ ورژن سے بدل دیا جائے گا۔ اگر پہلے سے تعینات کیا گیا سب گراف پہلے سے ہی مکمل طور پر مطابقت پذیر ہے، تو گراف نوڈ نئے تعینات شدہ ورژن کو ` Pending Version ` کے بطور نشان زد کرے گا، اسے بیک گراؤنڈ میں ہم آہنگ کرے گا، اور ایک بار مطابقت پذیر ہونے کے بعد صرف موجودہ تعینات کردہ ورژن کو نئے سے بدل دے گا۔ نیا ورژن ختم ہو گیا ہے. یہ یقینی بناتا ہے کہ نیا ورژن مطابقت پذیر ہونے کے دوران آپ کے پاس کام کرنے کے لیے ایک سب گراف موجود ہے. +اگر آپ کا پہلے سے تعینات کردہ سب گراف اب بھی حالت میں ہے `Syncing`، تو اسے فوری طور پر نئے تعینات کردہ ورژن سے بدل دیا جائے گا۔ اگر پہلے سے تعینات کیا گیا سب گراف پہلے سے ہی مکمل طور پر مطابقت پذیر ہے، تو گراف نوڈ نئے تعینات شدہ ورژن کو `Pending Version` کے بطور نشان زد کرے گا، اسے بیک گراؤنڈ میں ہم آہنگ کرے گا، اور ایک بار مطابقت پذیر ہونے کے بعد صرف موجودہ تعینات کردہ ورژن کو نئے سے بدل دے گا۔ نیا ورژن ختم ہو گیا ہے. یہ یقینی بناتا ہے کہ نیا ورژن مطابقت پذیر ہونے کے دوران آپ کے پاس کام کرنے کے لیے ایک سب گراف موجود ہے. ## سب گراف کو متعدد نیٹ ورکس پر تعینات کرنا @@ -98,7 +98,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا } ``` -**نوٹ:** آپ کو تشکیل فائل میں کسی بھی `templates` (اگر آپ کے پاس کوئی ہے) کی وضاحت کرنے کی ضرورت نہیں ہے، صرف ` dataSources `۔ اگر `subgraph.yaml` فائل میں کوئی بھی `templates` کا اعلان کیا گیا ہے، تو ان کا نیٹ ورک خود بخود `--network` اختیار کے ساتھ مخصوص کردہ سے اپ ڈیٹ ہوجائے گا. +**نوٹ:** آپ کو تشکیل فائل میں کسی بھی `templates` (اگر آپ کے پاس کوئی ہے) کی وضاحت کرنے کی ضرورت نہیں ہے، صرف `dataSources`۔ اگر `subgraph.yaml` فائل میں کوئی بھی `templates` کا اعلان کیا گیا ہے، تو ان کا نیٹ ورک خود بخود `--network` اختیار کے ساتھ مخصوص کردہ سے اپ ڈیٹ ہوجائے گا. اب، فرض کریں کہ آپ اپنے سب گراف کو `mainnet` اور `goerli` نیٹ ورکس پر تعینات کرنے کے قابل ہونا چاہتے ہیں، اور یہ آپ کا `subgraph.yaml` ہے: @@ -208,7 +208,7 @@ dataSources: kind: ethereum/events ``` -کسی بھی نیٹ ورک پر مینی فیسٹ بنانے کے لیے، آپ `package.json` میں دو اضافی کمانڈز شامل کر سکتے ہیں اور ساتھ ہی ` mustache ` پر انحصار: +کسی بھی نیٹ ورک پر مینی فیسٹ بنانے کے لیے، آپ `package.json` میں دو اضافی کمانڈز شامل کر سکتے ہیں اور ساتھ ہی `mustache` پر انحصار: ```json { diff --git a/website/pages/ur/developing/creating-a-subgraph.mdx b/website/pages/ur/developing/creating-a-subgraph.mdx index ca124aa9a714..a3659fab075b 100644 --- a/website/pages/ur/developing/creating-a-subgraph.mdx +++ b/website/pages/ur/developing/creating-a-subgraph.mdx @@ -156,7 +156,7 @@ dataSources: - `dataSources.source.endBlock`: بلاک کا اختیاری نمبر جس پر ڈیٹا سورس انڈیکس کرنا روکتا ہے، اس بلاک سمیت۔ کم از کم مخصوص ورژن درکار ہے: `0.0.9`۔ -- `dataSources.context`: کلیدی ویلیو کے جوڑے جو سب گراف میپنگ میں استعمال کیے جاسکتے ہیں۔ مختلف قسم کے ڈیٹا کو سپورٹ کرتا ہے جیسے `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, ` Bytes `، ` List `، اور `BigInt`۔ ہر متغیر کو اپنی ` type ` اور ` data ` کی وضاحت کرنے کی ضرورت ہے۔ یہ سیاق و سباق کے متغیرات پھر میپنگ فائلوں میں قابل رسائی ہوتے ہیں، جو سب گراف کی ترقی کے لیے مزید قابل ترتیب اختیارات پیش کرتے ہیں۔ +- `dataSources.context`: کلیدی ویلیو کے جوڑے جو سب گراف میپنگ میں استعمال کیے جاسکتے ہیں۔ مختلف قسم کے ڈیٹا کو سپورٹ کرتا ہے جیسے `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`، `List`، اور `BigInt`۔ ہر متغیر کو اپنی `type` اور `data` کی وضاحت کرنے کی ضرورت ہے۔ یہ سیاق و سباق کے متغیرات پھر میپنگ فائلوں میں قابل رسائی ہوتے ہیں، جو سب گراف کی ترقی کے لیے مزید قابل ترتیب اختیارات پیش کرتے ہیں۔ - `dataSources.mapping.entities`: وہ اینٹیٹیز جنہیں ڈیٹا سورس اسٹور کو لکھتا ہے۔ schema.graphql فائل میں ہر اینٹیٹی کے لیے اسکیما کی وضاحت کی گئی ہے. @@ -248,15 +248,15 @@ type GravatarDeclined @entity { ہم اپنے GraphQL API میں درج ذیل اسکیلرز کی حمایت کرتے ہیں: -| قسم | تفصیل | -| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Bytes` | Byte array، ایک ہیکساڈیسیمل سٹرنگ کے طور پر پیش کیا جاتا ہے. عام طور پر Ethereum hashes اور ایڈریسیس کے لیے استعمال ہوتا ہے. | -| `String` | `string` ویلیوز کے لیے اسکیلر. خالی حروف تعاون یافتہ نہیں ہیں اور خود بخود ہٹا دیے جاتے ہیں. | -| `Boolean` | `Boolean` ویلیوز کے لیے اسکیلر. | -| `Int` | GraphQL spec `Int` کی وضاحت کرتا ہے جس کا سائز 32 bytes ہے. | -| `Int8` | ایک 8-بائٹ دستخط شدہ عدد، جسے 64-بٹ دستخط شدہ عدد بھی کہا جاتا ہے، -9,223,372,036,854,775,808 سے لے کر 9,223,372,036,854,775,807 تک کی ویلیوز کو ذخیرہ کرسکتا ہے۔ ایتھیریم سے `i64` کی نمائندگی کرنے کے لیے اسے استعمال کرنے کو ترجیح دیں۔ | -| `BigInt` | بڑے integers۔ Ethereum کی `uint32`، `int64`، `uint64`، ..., `uint256` اقسام کے لیے استعمال کیا جاتا ہے. نوٹ: `uint32` کے نیچے ہر چیز، جیسے `int32`، `uint24` یا `int8` کو `i32` کے طور پر دکھایا گیا ہے. | -| `BigDecimal` | `BigDecimal` اعلی درستگی والے اعشاریہ ایک significand اور ایک exponent کے طور پر پیش کیا جاتے ہہیں. Exponent رینج −6143 سے +6144 تک ہے۔ 34 سگنیفیکینڈ ہندسوں پر rounded کیا گیا۔. | +| قسم | تفصیل | +| --- | --- | +| `Bytes` | Byte array، ایک ہیکساڈیسیمل سٹرنگ کے طور پر پیش کیا جاتا ہے. عام طور پر Ethereum hashes اور ایڈریسیس کے لیے استعمال ہوتا ہے. | +| `String` | `string` ویلیوز کے لیے اسکیلر. خالی حروف تعاون یافتہ نہیں ہیں اور خود بخود ہٹا دیے جاتے ہیں. | +| `Boolean` | `Boolean` ویلیوز کے لیے اسکیلر. | +| `Int` | GraphQL spec `Int` کی وضاحت کرتا ہے جس کا سائز 32 bytes ہے. | +| `Int8` | ایک 8-بائٹ دستخط شدہ عدد، جسے 64-بٹ دستخط شدہ عدد بھی کہا جاتا ہے، -9,223,372,036,854,775,808 سے لے کر 9,223,372,036,854,775,807 تک کی ویلیوز کو ذخیرہ کرسکتا ہے۔ ایتھیریم سے `i64` کی نمائندگی کرنے کے لیے اسے استعمال کرنے کو ترجیح دیں۔ | +| `BigInt` | بڑے integers۔ Ethereum کی `uint32`، `int64`، `uint64`، ..., `uint256` اقسام کے لیے استعمال کیا جاتا ہے. نوٹ: `uint32` کے نیچے ہر چیز، جیسے `int32`، `uint24` یا `int8` کو `i32` کے طور پر دکھایا گیا ہے. | +| `BigDecimal` | `BigDecimal` اعلی درستگی والے اعشاریہ ایک significand اور ایک exponent کے طور پر پیش کیا جاتے ہہیں. Exponent رینج −6143 سے +6144 تک ہے۔ 34 سگنیفیکینڈ ہندسوں پر rounded کیا گیا۔. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **نوٹ:** ایک نیا ڈیٹا سورس صرف اس بلاک کے لیے کالز اور ایونٹس پر کارروائی کرے گا جس میں اسے بنایا گیا تھا اور تمام مندرجہ ذیل بلاکس، لیکن تاریخی ڈیٹا، یعنی ڈیٹا پر کارروائی نہیں کرے گا جو پہلے سے بلاکس میں موجود ہے. -> +> > اگر پہلے والے بلاکس میں نئے ڈیٹا سورس سے متعلقہ ڈیٹا ہوتا ہے، تو یہ بہترین ہے کہ کنٹریکٹ کی موجودہ حالت کو پڑھ کر اور ڈیٹا کا نیا سورس بننے کے وقت اس سٹیٹ کی نمائندگی کرنے والی اینٹیٹیز بنا کر اس ڈیٹا کو انڈیکس کریں. ### ڈیٹا سورس سیاق و سباق @@ -716,7 +716,7 @@ dataSources: ``` > **نوٹ:** کنٹریکٹ تخلیق والے بلاک کو ایتھر سکین پر تیزی سے دیکھا جا سکتا ہے: -> +> > 1. سرچ بار میں اس کا ایڈریس درج کرکے کنٹریکٹ کو تلاش کریں. > 2. `Contract Creator` سیکشن میں تخلیق ٹرانزیکشن ہیش پر کلک کریں. > 3. ٹرانزیکشن کی تفصیلات کا صفحہ لوڈ کریں جہاں آپ کو اس کنٹریکٹ کے لیے اسٹارٹ بلاک ملے گا. diff --git a/website/pages/ur/developing/graph-ts/api.mdx b/website/pages/ur/developing/graph-ts/api.mdx index b03a3dea1dda..9a1ddc26b5dd 100644 --- a/website/pages/ur/developing/graph-ts/api.mdx +++ b/website/pages/ur/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| ورزن | جاری کردہ نوٹس | -| :---: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| ورزن | جاری کردہ نوٹس | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | | 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### بلٹ ان اقسام @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### تبادلوں کا حوالہ ٹائپ کریں -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### ڈیٹا ماخذ میٹا ڈیٹا diff --git a/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx b/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx index 979d460d6b6a..8cd83ceef138 100644 --- a/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx +++ b/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx @@ -44,8 +44,7 @@ Developed by [StreamingFast](https://www.streamingfast.io/), Substreams is an ex [StreamingFast](https://www.streamingfast.io/) کے ذریعے تیار کردہ، Firehose ایک بلاکچین ڈیٹا نکالنے کی پرت ہے جسے شروع سے بلاکچینز کی مکمل تاریخ کو اس رفتار سے پروسیس کرنے کے لیے ڈیزائن کیا گیا ہے جو پہلے نظر نہیں آتی تھیں۔ فائلوں پر مبنی اور سٹریمنگ فرسٹ اپروچ فراہم کرنا، یہ سٹریمنگ فاسٹ کے اوپن سورس ٹیکنالوجیز کے سوٹ کا بنیادی جزو اور سب اسٹریمز کی بنیاد ہے. -Firehose کے بارے میں مزید جاننے کے لیے[documentation] -(https://firehose.streamingfast.io/) پر جائیں. +Firehose کے بارے میں مزید جاننے کے لیے[documentation] (https://firehose.streamingfast.io/) پر جائیں. ## Firehose کے کیا فوائد ہیں؟ diff --git a/website/pages/ur/developing/unit-testing-framework.mdx b/website/pages/ur/developing/unit-testing-framework.mdx index c0d6ab8ea200..2f7372190bac 100644 --- a/website/pages/ur/developing/unit-testing-framework.mdx +++ b/website/pages/ur/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). اس کا مطلب ہے کہ آپ نے اپنے کوڈ میں `console.log` استعمال کیا ہے، جو اسمبلی اسکرپٹ سے تعاون یافتہ نہیں ہے۔ براہ کرم [لاگنگ API](/developing/assemblyscript-api/#logging-api) استعمال کرنے پر غور کریں > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) دلائل میں عدم مماثلت `graph-ts` اور `matchstick-as` میں عدم مماثلت کی وجہ سے ہوتی ہے۔ اس طرح کے مسائل کو حل کرنے کا بہترین طریقہ یہ ہے کہ ہر چیز کو تازہ ترین جاری کردہ ورژن میں اپ ڈیٹ کیا جائے. diff --git a/website/pages/ur/network/benefits.mdx b/website/pages/ur/network/benefits.mdx index f11155bd5c5a..dd0d9d2b3f80 100644 --- a/website/pages/ur/network/benefits.mdx +++ b/website/pages/ur/network/benefits.mdx @@ -27,53 +27,54 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## کم والیوم صارف (فی مہینہ 30,000 سے کم سوالات) -| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | -|:----------------------------:|:---------------------------------------:|:-------------------------------------------------------------------------------:| -| ماہانہ سرور کی قیمت/* | $350 فی مہینہ | $0 | -| استفسار کے اخراجات | $0+ | ~$15 فی مہینہ | -| انجینئرنگ کا وقت | $400 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000 (آٹو اسکیلنگ) | -| قیمت فی سوال | $0 | $0.0005 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| جغرافیائی فالتو پن | $750+ فی اضافی نوڈ | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $750+ | ~$15 | +| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | +| :-: | :-: | :-: | +| ماہانہ سرور کی قیمت/\* | $350 فی مہینہ | $0 | +| استفسار کے اخراجات | $0+ | ~$15 فی مہینہ | +| انجینئرنگ کا وقت | $400 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000 (آٹو اسکیلنگ) | +| قیمت فی سوال | $0 | $0.0005 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| جغرافیائی فالتو پن | $750+ فی اضافی نوڈ | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $750+ | ~$15 | ## درمیانے حجم کا صارف (3,000,000+ سوالات فی مہینہ) -| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | -|:----------------------------:|:------------------------------------------:|:-------------------------------------------------------------------------------:| -| ماہانہ سرور کی قیمت/* | $350 فی مہینہ | $0 | -| استفسار کے اخراجات | $500 فی مہینہ | $750 فی مہینہ | -| انجینئرنگ کا وقت | $800 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 3,000,000+ | -| قیمت فی سوال | $0 | $0.00025 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| انجینئرنگ کے اخراجات | $200 فی گھنٹہ | شامل | -| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $1,650+ | $750 | +| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | +| :-: | :-: | :-: | +| ماہانہ سرور کی قیمت/\* | $350 فی مہینہ | $0 | +| استفسار کے اخراجات | $500 فی مہینہ | $750 فی مہینہ | +| انجینئرنگ کا وقت | $800 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 3,000,000+ | +| قیمت فی سوال | $0 | $0.00025 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| انجینئرنگ کے اخراجات | $200 فی گھنٹہ | شامل | +| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $1,650+ | $750 | ## زیادہ حجم والا صارف (30,000,000+ سوالات فی مہینہ) -| اخراجات کا موازنہ | سیلف ہوسٹڈ | گراف نیٹ ورک | -|:----------------------------:|:-------------------------------------------:|:-------------------------------------------------------------------------------:| -| ماہانہ سرور کی قیمت/* | $1100 فی مہینہ، فی نوڈ | $0 | -| استفسار کے اخراجات | $4000 | $4,500 فی مہینہ | -| نوڈس کی تعداد درکار ہے | 10 | قابل اطلاق نہیں | -| انجینئرنگ کا وقت | $6,000 یا اس سے زیادہ فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000,000+ | -| قیمت فی سوال | $0 | $0.00015 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $11,000+ | $4,500 | - -/*بیک اپ کے اخراجات سمیت: $50-$100 فی مہینہ +| اخراجات کا موازنہ | سیلف ہوسٹڈ | گراف نیٹ ورک | +| :-: | :-: | :-: | +| ماہانہ سرور کی قیمت/\* | $1100 فی مہینہ، فی نوڈ | $0 | +| استفسار کے اخراجات | $4000 | $4,500 فی مہینہ | +| نوڈس کی تعداد درکار ہے | 10 | قابل اطلاق نہیں | +| انجینئرنگ کا وقت | $6,000 یا اس سے زیادہ فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000,000+ | +| قیمت فی سوال | $0 | $0.00015 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $11,000+ | $4,500 | + +/\*بیک اپ کے اخراجات سمیت: $50-$100 فی مہینہ $200 فی گھنٹہ کے مفروضے کی بنیاد پر انجینئرنگ کا وقت -بجٹ بلنگ ٹیب میں زیادہ سے زیادہ کیوری بجٹ فنکشن کا استعمال کرتے ہوئے، سروس کے اعلی معیار کو برقرار رکھتے ہوئے +بجٹ بلنگ ٹیب میں زیادہ سے زیادہ کیوری بجٹ فنکشن کا استعمال کرتے ہوئے، سروس کے اعلی معیار کو برقرار رکھتے +ہوئے تخمینی لاگتیں صرف ایتھیریم مینیٹ سب گراف کے لیے ہیں — دوسرے نیٹ ورکس پر `graph-node` کی خود ہوسٹڈ کرنے پر اخراجات اس سے بھی زیادہ ہوتے ہیں. diff --git a/website/pages/ur/network/delegating.mdx b/website/pages/ur/network/delegating.mdx index a9df7189a9ae..2e274a6d8aab 100644 --- a/website/pages/ur/network/delegating.mdx +++ b/website/pages/ur/network/delegating.mdx @@ -33,8 +33,8 @@ title: ڈیلیگیٹنگ غور کرنے کی ایک چیز یہ ہے کہ انڈیکسر کا انتخاب دانشمندی سے کریں۔اگر آپ انڈیکسر کا انتخاب کرتے ہیں جو قابل اعتماد نہیں تھا،یا اچھا کام نہیں کر رہا،آپ غیر منتخب کرنا چاہیں گے،جس کا مطلب ہے آپ انعامات حاصل کرنے کے بہت سے مواقع کھو رہے ہوں گے،جو GRT کو جلانے جیسا ہی برا ہو سکتا ہے.
    - [ڈیلیگیشن ان بانڈنگ](/img/Delegation-Unbonding.png) _ڈیلیگیشن UI میں 0.5% فیس نوٹ کریں، ساتھ ہی 28 دن - غیر بندھن کی مدت۔_ + [ڈیلیگیشن ان بانڈنگ](/img/Delegation-Unbonding.png) _ڈیلیگیشن UI میں 0.5% فیس نوٹ کریں، ساتھ ہی 28 دن غیر بندھن کی + مدت۔_
    ### ڈیلیگیٹرز کے لیے منصفانہ انعامی ادائیگی کے ساتھ ایک قابل اعتماد انڈیکسر کا انتخاب کرنا @@ -44,7 +44,8 @@ title: ڈیلیگیٹنگ انڈیکسنگ ریوارڈ کٹ - انڈیکسنگ ریوارڈ کٹ انعامات کا وہ حصہ ہے جو انڈیکسر اپنے لیے رکھے گا۔ اس کا مطلب ہے کہ اگر یہ 100% پر سیٹ ہے، بطور ڈیلیگیٹر آپ کو 0 انڈیکسنگ کےانعامات ملیں گے۔ اگر آپ UI میں 80٪ دیکھتے ہیں،اس کا مطلب ہے کہ بطور ڈیلیگیٹر، آپ کو 20% ملے گا۔ ایک اہم نوٹ - نیٹ ورک کے آغاز میں، انڈیکسنگ انعامات کی اکثریت کا حصہ ہوں گے.
    - ![انڈیکسنگ ریوارڈ کٹ](/img/Indexing-Reward-Cut.png) *سب سے اوپر انڈیکسر ڈیلیگیٹرز کو 90% انعامات دے رہا ہے. درمیان والا ڈیلیگیٹرز کو 20% دے رہا ہے۔ نیچے والا ڈیلیگیٹرز کو ~83% دے رہا ہے۔* + ![انڈیکسنگ ریوارڈ کٹ](/img/Indexing-Reward-Cut.png) *سب سے اوپر انڈیکسر ڈیلیگیٹرز کو 90% انعامات دے رہا ہے. درمیان + والا ڈیلیگیٹرز کو 20% دے رہا ہے۔ نیچے والا ڈیلیگیٹرز کو ~83% دے رہا ہے۔*
    - کیوری فیس کٹوتی - یہ بلکل انڈیکسنگ ریوارڈ کٹ کی طرح کام کرتا ہے. البتہ، یہ خاص طور پر انڈیکسر جمع کردہ کیوری کی فیس پر واپسی کے لیے ہے۔ واضح رہے کہ نیٹ ورک کے آغاز پر، کیوری فیس سے واپسی انڈیکسنگ کے انعامات کے مقابلے میں بہت کم ہوگی۔ اس بات کا تعین کرنے کے لیے نیٹ ورک پر توجہ دینے کی سفارش کی جاتی ہے کہ نیٹ ورک میں کیوری کی فیس کب زیادہ اہم ہونا شروع ہو گی. diff --git a/website/pages/ur/network/indexing.mdx b/website/pages/ur/network/indexing.mdx index 52062b9b6584..6b396ceccca7 100644 --- a/website/pages/ur/network/indexing.mdx +++ b/website/pages/ur/network/indexing.mdx @@ -112,12 +112,12 @@ query indexerAllocations { - **درمیانہ** - پروڈکشن انڈیکسر 100 سب گراف اور 200-500 درخواستیں فی سیکنڈ کو اٹھا سکتا ہے. - **بڑا** - تمام فی الحال زیر استعمال سب گرافس کو انڈیکس کرنے اور متعلقہ ٹریفک کے لیے درخواستیں پیش کرنے کے لیے تیار ہے. -| سیٹ اپ | Postgres
    (CPUs) | Postgres
    (GBs میں میموری) | Postgres
    (TBs میں ڈسک) | VMs
    (CPUs) | VMs
    (GBs میں میموری) | -| ------- |:--------------------------:|:------------------------------------:|:---------------------------------:|:---------------------:|:-------------------------------:| -| چھوٹا | 4 | 8 | 1 | 4 | 16 | -| معیاری | 8 | 30 | 1 | 12 | 48 | -| درمیانہ | 16 | 64 | 2 | 32 | 64 | -| بڑا | 72 | 468 | 3.5 | 48 | 184 | +| سیٹ اپ | Postgres
    (CPUs) | Postgres
    (GBs میں میموری) | Postgres
    (TBs میں ڈسک) | VMs
    (CPUs) | VMs
    (GBs میں میموری) | +| --- | :-: | :-: | :-: | :-: | :-: | +| چھوٹا | 4 | 8 | 1 | 4 | 16 | +| معیاری | 8 | 30 | 1 | 12 | 48 | +| درمیانہ | 16 | 64 | 2 | 32 | 64 | +| بڑا | 72 | 468 | 3.5 | 48 | 184 | ### وہ کون سی چند بنیادی حفاظتی تدابیر ہیں جو ایک انڈیکسر کو اختیار کرنی چاہیے؟ @@ -149,20 +149,20 @@ query indexerAllocations { #### گراف نوڈ -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | -| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | -| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | +| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | +| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | #### انڈیکسر سروس -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (ادا شدہ سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (ادا شدہ سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus میٹرکس | /metrics | --metrics-port | - | #### انڈیکسر ایجنٹ diff --git a/website/pages/ur/new-chain-integration.mdx b/website/pages/ur/new-chain-integration.mdx index 1f431f9239f6..b1a142fb672a 100644 --- a/website/pages/ur/new-chain-integration.mdx +++ b/website/pages/ur/new-chain-integration.mdx @@ -27,7 +27,7 @@ title: نئے نیٹ ورکس کو انٹیگریٹ کرنا نئے EVM چین انٹیگریٹرز سب سٹریمز کے فوائد اور اس کے بڑے پیمانے پر متوازی انڈیکسنگ کی صلاحیتوں کو دیکھتے ہوئے، Firehose پر مبنی نقطہ نظر پر بھی غور کر سکتے ہیں۔ دونوں کو سپورٹ کرنے سے ڈویلپرز کو نئی چین کے لیے سب سٹریمز کی تعمیر یا سب گراف کے درمیان انتخاب کرنے کی اجازت ملتی ہے۔ -> **نوٹ**: EVM چینز کے لیے فائر ہوز پر مبنی انٹیگریشن کے لیے اب بھی انڈیکسرز کو چین کے آرکائیو RPC نوڈ کو صحیح طریقے سے سب گرافس کو انڈیکس کرنے کے لیے چلانے کی ضرورت ہوگی۔ یہ فائر ہوز کی سمارٹ کنٹریکٹ سٹیٹ فراہم کرنے میں ناکامی کی وجہ سے ہے جو عام طور پر `eth_call` RPC طریقہ سے قابل رسائی ہے۔ (یہ یاد دلانے کے قابل ہے کہ ایتھ\_کالز [ڈویلپرز کے لیے اچھا عمل نہیں ہے](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) +> **نوٹ**: EVM چینز کے لیے فائر ہوز پر مبنی انٹیگریشن کے لیے اب بھی انڈیکسرز کو چین کے آرکائیو RPC نوڈ کو صحیح طریقے سے سب گرافس کو انڈیکس کرنے کے لیے چلانے کی ضرورت ہوگی۔ یہ فائر ہوز کی سمارٹ کنٹریکٹ سٹیٹ فراہم کرنے میں ناکامی کی وجہ سے ہے جو عام طور پر `eth_call` RPC طریقہ سے قابل رسائی ہے۔ (یہ یاد دلانے کے قابل ہے کہ ایتھ_کالز [ڈویلپرز کے لیے اچھا عمل نہیں ہے](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) --- diff --git a/website/pages/ur/operating-graph-node.mdx b/website/pages/ur/operating-graph-node.mdx index a5434224e20b..ef22e83ab99b 100644 --- a/website/pages/ur/operating-graph-node.mdx +++ b/website/pages/ur/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ جب یہ چل رہا ہوتا ہے گراف نوڈ مندرجہ ذیل پورٹس کو بے نقاب کرتا ہے: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | -| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | -| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | +| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | +| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | > **اہم**: پورٹس کو عوامی طور پر ظاہر کرنے میں محتاط رہیں - **انتظامی پورٹس** کو بند رکھا جانا چاہیے. اس میں گراف نوڈ کا JSON-RPC اینڈ پوائنٹ شامل ہے. diff --git a/website/pages/ur/querying/graphql-api.mdx b/website/pages/ur/querying/graphql-api.mdx index 0be6aaa6db53..47147daa2b13 100644 --- a/website/pages/ur/querying/graphql-api.mdx +++ b/website/pages/ur/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { ``` > **Syntactic شوگر:** آپ `and` آپریٹر کو ہٹا کر کوما سے الگ کردہ سب اظہار کو پاس کر کے مذکورہ کیوری کو آسان بنا سکتے ہیں. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) فل ٹیکسٹ سرچ آپریٹرز: -| علامت | آپریٹر | تفصیل | -| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | ایک سے زیادہ تلاش کی اصطلاحات کو ایک فلٹر میں یکجا کرنے کے لیے ان ہستیوں کے لیے جس میں فراہم کردہ تمام اصطلاحات شامل ہوں | -| | | `Or` | Or آپریٹر کے ذریعہ الگ کردہ متعدد تلاش کی اصطلاحات کے ساتھ کیوریز فراہم کردہ شرائط میں سے کسی سے بھی مماثلت کے ساتھ تمام ہستیوں کو واپس کریں گے | -| `<>` | `Follow by` | دو الفاظ کے درمیان فاصلہ بتائیں. | -| `:*` | `Prefix` | ایسے الفاظ تلاش کرنے کے لیے پریفکس ​​تلاش کی اصطلاح استعمال کریں جن کا سابقہ ​​مماثل ہو (۲ حروف درکار ہیں.) | +| علامت | آپریٹر | تفصیل | +| --- | --- | --- | +| `&` | `And` | ایک سے زیادہ تلاش کی اصطلاحات کو ایک فلٹر میں یکجا کرنے کے لیے ان ہستیوں کے لیے جس میں فراہم کردہ تمام اصطلاحات شامل ہوں | +| | | `Or` | Or آپریٹر کے ذریعہ الگ کردہ متعدد تلاش کی اصطلاحات کے ساتھ کیوریز فراہم کردہ شرائط میں سے کسی سے بھی مماثلت کے ساتھ تمام ہستیوں کو واپس کریں گے | +| `<>` | `Follow by` | دو الفاظ کے درمیان فاصلہ بتائیں. | +| `:*` | `Prefix` | ایسے الفاظ تلاش کرنے کے لیے پریفکس ​​تلاش کی اصطلاح استعمال کریں جن کا سابقہ ​​مماثل ہو (۲ حروف درکار ہیں.) | #### مثالیں @@ -408,7 +408,7 @@ GraphQL اسکیمے عام طور پر `queries`، `subscriptions` اور `muta اگر کوئی بلاک فراہم کیا جاتا ہے تو، میٹا ڈیٹا اس بلاک کا ہوتا ہے، اگر تازہ ترین انڈیکسڈ بلاک استعمال نہیں کیا جاتا ہے۔ اگر فراہم کیا گیا ہو، تو بلاک سب گراف کے اسٹارٹ بلاک کے بعد ہونا چاہیے، اور حال ہی میں انڈیکس کیے گئے بلاک سے کم یا اس کے برابر ہونا چاہیے. -` deployment ` ایک منفرد ID ہے، جو `subgraph.yaml` فائل کے IPFS CID سے مطابقت رکھتی ہے. +`deployment` ایک منفرد ID ہے، جو `subgraph.yaml` فائل کے IPFS CID سے مطابقت رکھتی ہے. `block` تازہ ترین بلاک کے بارے میں معلومات فراہم کرتا ہے (`_meta` کو بھیجی گئی کسی بھی بلاک کی رکاوٹوں کو مدنظر رکھتے ہوئے): diff --git a/website/pages/ur/querying/querying-best-practices.mdx b/website/pages/ur/querying/querying-best-practices.mdx index ec6adef80199..144a23d1f309 100644 --- a/website/pages/ur/querying/querying-best-practices.mdx +++ b/website/pages/ur/querying/querying-best-practices.mdx @@ -55,8 +55,8 @@ query [operationName]([variableName]: [variableType]) { اگرچہ نحوی کرنے اور نہ کرنے کی فہرست طویل ہے، لیکن GraphQL کی کیوریز لکھنے کی بات کرتے وقت ذہن میں رکھنے کے لیے ضروری اصول یہ ہیں: - ہر ایک `queryName` کو فی آپریشن صرف ایک بار استعمال کیا جانا چاہیے. -- ہر ایک ` field ` کو انتخاب میں صرف ایک بار استعمال کیا جانا چاہیے (ہم `token` کے تحت دو بار `id` سے کیوری نہیں کرسکتے ہیں) -- کچھ ` field ` یا کیوریز (جیسے `tokens`) پیچیدہ قسمیں واپس کرتے ہیں جن کے لیے سب فیلڈ کے انتخاب کی ضرورت ہوتی ہے۔ توقع کے وقت انتخاب فراہم نہ کرنا (یا توقع نہ ہونے پر انتخاب فراہم کرنا - مثال کے طور پر، `id` پر) ایک خرابی پیدا کرے گا۔ فیلڈ کی قسم جاننے کے لیے، براہ کرم [گراف ایکسپلورر](/network/explorer) سے رجوع کریں. +- ہر ایک `field` کو انتخاب میں صرف ایک بار استعمال کیا جانا چاہیے (ہم `token` کے تحت دو بار `id` سے کیوری نہیں کرسکتے ہیں) +- کچھ `field` یا کیوریز (جیسے `tokens`) پیچیدہ قسمیں واپس کرتے ہیں جن کے لیے سب فیلڈ کے انتخاب کی ضرورت ہوتی ہے۔ توقع کے وقت انتخاب فراہم نہ کرنا (یا توقع نہ ہونے پر انتخاب فراہم کرنا - مثال کے طور پر، `id` پر) ایک خرابی پیدا کرے گا۔ فیلڈ کی قسم جاننے کے لیے، براہ کرم [گراف ایکسپلورر](/network/explorer) سے رجوع کریں. - کسی دلیل کو تفویض کردہ کوئی بھی متغیر اس کی قسم سے مماثل ہونا چاہیے. - متغیرات کی دی گئی فہرست میں، ان میں سے ہر ایک منفرد ہونا چاہیے. - تمام متعین متغیرات کو استعمال کیا جانا چاہیے. @@ -166,7 +166,7 @@ const result = await execute(query, { **نوٹ: جامد کیوریز میں فیلڈز کو مشروط طور پر کیسے شامل کیا جائے** -ہم صرف ایک خاص شرط پر ` owner ` فیلڈ کو شامل کرنا چاہتے ہیں. +ہم صرف ایک خاص شرط پر `owner` فیلڈ کو شامل کرنا چاہتے ہیں. اس کے لیے، ہم ذیل میں `@include(if:...)` ہدایت کا فائدہ اٹھا سکتے ہیں: diff --git a/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx index 9c8d0512a4eb..31439d43c505 100644 --- a/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + اگر آپ کے پاس متغیر شیڈونگ ہے تو آپ کو اپنے ڈپلیکیٹ متغیرات کا نام تبدیل کرنے کی ضرورت ہوگی. + ### کالعدم موازنہ + اپنے سب گراف پر اپ گریڈ کرنے سے، بعض اوقات آپ کو اس طرح کی غلطیاں مل سکتی ہیں: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + حل کرنے کے لیے آپ صرف `if` اسٹیٹمنٹ کو اس طرح تبدیل کر سکتے ہیں: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + اس مسئلے کو حل کرنے کے لیے، آپ اس پراپرٹی تک رسائی کے لیے ایک متغیر بنا سکتے ہیں تاکہ مرتب کرنے والا منسوخی چیک میجک کر سکے: ```typescript diff --git a/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx b/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx index fb46d352b6b9..15d7aa4cf114 100644 --- a/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx @@ -4,8 +4,7 @@ title: GraphQL کی توثیق کی منتقلی گائیڈ جلد ہی `گراف نوڈ` [GraphQL توثیق کی تفصیلات](https://spec.graphql.org/June2018/#sec-Validation) کی 100% کوریج کو سپورٹ کرے گا. -`گراف نوڈ` کے پچھلے ورژن تمام توثیقوں کی حمایت نہیں کرتے تھے اور زیادہ خوبصورت جوابات فراہم کرتے تھے - لہذا، ابہام کی صورت میں، `گراف نوڈ` غلط گراف کیو ایل - آپریشن کے اجزاء کو نظر انداز کر رہا تھا. +`گراف نوڈ` کے پچھلے ورژن تمام توثیقوں کی حمایت نہیں کرتے تھے اور زیادہ خوبصورت جوابات فراہم کرتے تھے - لہذا، ابہام کی صورت میں، `گراف نوڈ` غلط گراف کیو ایل آپریشن کے اجزاء کو نظر انداز کر رہا تھا. GraphQL ویلیڈیشن سپورٹ آنے والی نئی خصوصیات اور گراف نیٹ ورک کے پیمانے پر کارکردگی کا ایک ستون ہے. diff --git a/website/pages/ur/sunrise.mdx b/website/pages/ur/sunrise.mdx index 2e91006ecc52..85be6e9eefd4 100644 --- a/website/pages/ur/sunrise.mdx +++ b/website/pages/ur/sunrise.mdx @@ -12,9 +12,7 @@ title: ڈیسینٹرالائزڈ ڈیٹا کے سن رائز کے اکثر پو ### ڈیسینٹرالائزڈ ڈیٹا کے سن رائز ہونے کے مراحل کیا ہیں؟ -**سن رے**: ہوسٹڈ سروس چینز کے لیے سپورٹ کو فعال کریں، بغیر کسی رکاوٹ کے اپ گریڈ فلو کی پیشکش کریں، گراف نیٹ ورک پر مفت پلان پیش کریں۔ -**سن بیم**: اپ گریڈ ونڈو جس میں سب گراف ڈویلپرز کو اپنے سب گرافس کو گراف نیٹ ورک میں اپ گریڈ کرنا ہوگا۔ اس کے آغاز اور طوالت کا جلد اعلان کیا جائے گا۔ -**سن رائز**: ہوسٹڈ سروس اینڈ پوائنٹس کی میعاد ختم ہو جائے گی کیونکہ ٹریفک گراف نیٹ ورک پر منتقل ہو جائے گی. +**سن رے**: ہوسٹڈ سروس چینز کے لیے سپورٹ کو فعال کریں، بغیر کسی رکاوٹ کے اپ گریڈ فلو کی پیشکش کریں، گراف نیٹ ورک پر مفت پلان پیش کریں۔ **سن بیم**: اپ گریڈ ونڈو جس میں سب گراف ڈویلپرز کو اپنے سب گرافس کو گراف نیٹ ورک میں اپ گریڈ کرنا ہوگا۔ اس کے آغاز اور طوالت کا جلد اعلان کیا جائے گا۔ **سن رائز**: ہوسٹڈ سروس اینڈ پوائنٹس کی میعاد ختم ہو جائے گی کیونکہ ٹریفک گراف نیٹ ورک پر منتقل ہو جائے گی. ### کیا مجھے اپنا انفراسٹرکچر چلانے کی ضرورت ہے؟ diff --git a/website/pages/vi/developing/creating-a-subgraph.mdx b/website/pages/vi/developing/creating-a-subgraph.mdx index 9e9c276d60e4..dbab1be03c36 100644 --- a/website/pages/vi/developing/creating-a-subgraph.mdx +++ b/website/pages/vi/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Loại | Miêu tả | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Mảng byte, được biểu diễn dưới dạng chuỗi thập lục phân. Thường được sử dụng cho các mã băm và địa chỉ Ethereum. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Loại | Miêu tả | +| --- | --- | +| `Bytes` | Mảng byte, được biểu diễn dưới dạng chuỗi thập lục phân. Thường được sử dụng cho các mã băm và địa chỉ Ethereum. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Lưu ý:** Nguồn dữ liệu mới sẽ chỉ xử lý các lệnh gọi và sự kiện cho khối mà nó được tạo và tất cả các khối tiếp theo, nhưng sẽ không xử lý dữ liệu lịch sử, tức là dữ liệu được chứa trong các khối trước đó. -> +> > Nếu các khối trước đó chứa dữ liệu có liên quan đến nguồn dữ liệu mới, tốt nhất là lập chỉ mục dữ liệu đó bằng cách đọc trạng thái hiện tại của hợp đồng và tạo các thực thể đại diện cho trạng thái đó tại thời điểm nguồn dữ liệu mới được tạo. ### Bối cảnh Nguồn Dữ liệu @@ -716,7 +716,7 @@ dataSources: ``` > **Lưu ý:** Khối tạo hợp đồng có thể được nhanh chóng tra cứu trên Etherscan: -> +> > 1. Tìm kiếm hợp đồng bằng cách nhập địa chỉ của nó vào thanh tìm kiếm. > 2. Nhấp vào băm giao dịch tạo trong phần `Contract Creator`. > 3. Tải trang chi tiết giao dịch nơi bạn sẽ tìm thấy khối bắt đầu cho hợp đồng đó. diff --git a/website/pages/vi/developing/graph-ts/api.mdx b/website/pages/vi/developing/graph-ts/api.mdx index 85610543f920..1469f236a9a2 100644 --- a/website/pages/vi/developing/graph-ts/api.mdx +++ b/website/pages/vi/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Phiên bản | Ghi chú phát hành | -| :-------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Phiên bản | Ghi chú phát hành | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Các loại cài sẵn @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Tham chiếu Chuyển đổi Loại -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Siêu Dữ liệu Nguồn Dữ liệu diff --git a/website/pages/vi/developing/unit-testing-framework.mdx b/website/pages/vi/developing/unit-testing-framework.mdx index b67edbb28b97..e0a3390bbb25 100644 --- a/website/pages/vi/developing/unit-testing-framework.mdx +++ b/website/pages/vi/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/vi/network/benefits.mdx b/website/pages/vi/network/benefits.mdx index c27a5f37f9f6..b2fa328ed82f 100644 --- a/website/pages/vi/network/benefits.mdx +++ b/website/pages/vi/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/vi/network/indexing.mdx b/website/pages/vi/network/indexing.mdx index cbff1daedbc3..8365be2856b1 100644 --- a/website/pages/vi/network/indexing.mdx +++ b/website/pages/vi/network/indexing.mdx @@ -112,12 +112,12 @@ Indexer có thể tự phân biệt bản thân bằng cách áp dụng các k - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Lớn** - Được chuẩn bị để index tất cả các subgraph hiện đang được sử dụng và phục vụ các yêu cầu cho lưu lượng truy cập liên quan. -| Cài đặt | Postgres
    (CPUs) | Postgres
    (bộ nhớ tính bằng GB) | Postgres
    (đĩa tính bằng TB) | VMs
    (CPUs) | VMs
    (bộ nhớ tính bằng GB) | -| ----------- |:--------------------------:|:-----------------------------------------:|:--------------------------------------:|:---------------------:|:------------------------------------:| -| Nhỏ | 4 | 8 | 1 | 4 | 16 | -| Tiêu chuẩn | 8 | 30 | 1 | 12 | 48 | -| Trung bình | 16 | 64 | 2 | 32 | 64 | -| Lớn | 72 | 468 | 3.5 | 48 | 184 | +| Cài đặt | Postgres
    (CPUs) | Postgres
    (bộ nhớ tính bằng GB) | Postgres
    (đĩa tính bằng TB) | VMs
    (CPUs) | VMs
    (bộ nhớ tính bằng GB) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Nhỏ | 4 | 8 | 1 | 4 | 16 | +| Tiêu chuẩn | 8 | 30 | 1 | 12 | 48 | +| Trung bình | 16 | 64 | 2 | 32 | 64 | +| Lớn | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Lưu ý: Để hỗ trợ mở rộng quy mô nhanh, bạn nên tách các mối #### Graph Node -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | -| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | -| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | -| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| --- | --- | --- | --- | --- | +| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | +| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | +| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | #### Dịch vụ Indexer -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| ---- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph có trả phí) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| --- | --- | --- | --- | --- | +| 7600 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph có trả phí) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Số liệu Prometheus | /metrics | --metrics-port | - | #### Đại lý Indexer diff --git a/website/pages/vi/operating-graph-node.mdx b/website/pages/vi/operating-graph-node.mdx index a600e22c0a05..7112da586680 100644 --- a/website/pages/vi/operating-graph-node.mdx +++ b/website/pages/vi/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | -| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | -| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | -| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| --- | --- | --- | --- | --- | +| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | +| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | +| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/vi/querying/graphql-api.mdx b/website/pages/vi/querying/graphql-api.mdx index 4acdfc3e2c56..d15b7659d204 100644 --- a/website/pages/vi/querying/graphql-api.mdx +++ b/website/pages/vi/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Biểu tượng | Toán tử | Miêu tả | -| ----------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Để kết hợp nhiều cụm từ tìm kiếm thành một bộ lọc cho các thực thể bao gồm tất cả các cụm từ được cung cấp | -| | | `Or` | Các truy vấn có nhiều cụm từ tìm kiếm được phân tách bằng toán tử hoặc sẽ trả về tất cả các thực thể có kết quả khớp với bất kỳ cụm từ nào được cung cấp | -| `<->` | `Follow by` | Chỉ định khoảng cách giữa hai từ. | -| `:*` | `Prefix` | Sử dụng cụm từ tìm kiếm tiền tố để tìm các từ có tiền tố khớp với nhau (yêu cầu 2 ký tự.) | +| Biểu tượng | Toán tử | Miêu tả | +| --- | --- | --- | +| `&` | `And` | Để kết hợp nhiều cụm từ tìm kiếm thành một bộ lọc cho các thực thể bao gồm tất cả các cụm từ được cung cấp | +| | | `Or` | Các truy vấn có nhiều cụm từ tìm kiếm được phân tách bằng toán tử hoặc sẽ trả về tất cả các thực thể có kết quả khớp với bất kỳ cụm từ nào được cung cấp | +| `<->` | `Follow by` | Chỉ định khoảng cách giữa hai từ. | +| `:*` | `Prefix` | Sử dụng cụm từ tìm kiếm tiền tố để tìm các từ có tiền tố khớp với nhau (yêu cầu 2 ký tự.) | #### Examples diff --git a/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx b/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx index 8536b657e78a..69c36218d8af 100644 --- a/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Bạn sẽ cần đổi tên các biến trùng lặp của mình nếu bạn có che biến. + ### So sánh Null + Bằng cách thực hiện nâng cấp trên subgraph của bạn, đôi khi bạn có thể gặp các lỗi như sau: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Để giải quyết, bạn có thể chỉ cần thay đổi câu lệnh `if` thành một cái gì đó như sau: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Để khắc phục sự cố này, bạn có thể tạo một biến cho quyền truy cập thuộc tính đó để trình biên dịch có thể thực hiện phép thuật kiểm tra tính nullability: ```typescript diff --git a/website/pages/yo/arbitrum/arbitrum-faq.mdx b/website/pages/yo/arbitrum/arbitrum-faq.mdx index 7c0e94324e40..61eaabee08aa 100644 --- a/website/pages/yo/arbitrum/arbitrum-faq.mdx +++ b/website/pages/yo/arbitrum/arbitrum-faq.mdx @@ -45,8 +45,7 @@ Jọwọ ṣe iranlọwọ [ṣe idanwo netiwọki](https://testnet.thegraph.com ## Ṣe awọn ewu eyikeyi wa ni nkan ṣe pẹlu iwọn nẹtiwọọki si L2? -Gbogbo awọn adehun ọlọgbọn ti jẹ daradara -[ayewo pipe](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Gbogbo awọn adehun ọlọgbọn ti jẹ daradara [ayewo pipe](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). Ohùn gbogbo tí ní ìdánwò dáradára, àti pé èrò airotẹlẹ kàn wá ní ayé láti ríi dájú wípé ìyípadà ailewu àti ailẹgbẹ. Àwọn àlàyé lè ṣé rí [níbi yìí](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20). diff --git a/website/pages/yo/developing/creating-a-subgraph.mdx b/website/pages/yo/developing/creating-a-subgraph.mdx index db9e8a024571..39f58ac2083b 100644 --- a/website/pages/yo/developing/creating-a-subgraph.mdx +++ b/website/pages/yo/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/yo/developing/graph-ts/api.mdx b/website/pages/yo/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/yo/developing/graph-ts/api.mdx +++ b/website/pages/yo/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/yo/developing/unit-testing-framework.mdx b/website/pages/yo/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/yo/developing/unit-testing-framework.mdx +++ b/website/pages/yo/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/yo/network/benefits.mdx b/website/pages/yo/network/benefits.mdx index 09c0548bfc4f..864672b16515 100644 --- a/website/pages/yo/network/benefits.mdx +++ b/website/pages/yo/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/yo/network/indexing.mdx b/website/pages/yo/network/indexing.mdx index 842a5c8e0c74..9bdc2fb2eb7e 100644 --- a/website/pages/yo/network/indexing.mdx +++ b/website/pages/yo/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/yo/operating-graph-node.mdx b/website/pages/yo/operating-graph-node.mdx index a7dd15e7a84c..4f0f856db111 100644 --- a/website/pages/yo/operating-graph-node.mdx +++ b/website/pages/yo/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/yo/querying/graphql-api.mdx b/website/pages/yo/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/yo/querying/graphql-api.mdx +++ b/website/pages/yo/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx b/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/zh/cookbook/subgraph-debug-forking.mdx b/website/pages/zh/cookbook/subgraph-debug-forking.mdx index efcc65b2e0d4..9df8b35a7650 100644 --- a/website/pages/zh/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/zh/cookbook/subgraph-debug-forking.mdx @@ -6,13 +6,13 @@ title: 使用分叉快速轻松地调试子图 ## 首先,让我们来看什么是子图分叉 -**子图分叉** 是从_另一个_ 子图的存储(通常是远程存储)中缓慢获取实体的过程。 +**子图分叉** 是从*另一个* 子图的存储(通常是远程存储)中缓慢获取实体的过程。 在调试时,**subgraph forking** 允许您在固定的区块 _X_ 中调试失败的子图,而无需等待区块同步 _X_。 ## 让我们看看这是如何做到的? -当您将子图部署到远程 Graph 节点进行索引而它在区块 _X_上失败时,好消息是Graph 节点仍能以同步至区块 _X_的数据响应GraphQL 查询。这意味着我们可以基于区块 _X_ 最新的数据来修复索引时出现的错误。 +当您将子图部署到远程 Graph 节点进行索引而它在区块 *X*上失败时,好消息是Graph 节点仍能以同步至区块 *X*的数据响应GraphQL 查询。这意味着我们可以基于区块 _X_ 最新的数据来修复索引时出现的错误。 简而言之,我们将从远程 Graph 节点 _分叉失败的子图_,保证子图索引更新至区块 *X*的数据, 以便基于更新至区块 _X_ 的数据在本地部署的子图进行调试,以反映索引数据的最新状态。 @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -糟糕,不幸的是,当我将完美的子图部署到 [托管服务](https://thegraph.com/hosted-service/) 时,它会报_“未找到 Gravatar!”_ 的错误。 +糟糕,不幸的是,当我将完美的子图部署到 [托管服务](https://thegraph.com/hosted-service/) 时,它会报*“未找到 Gravatar!”* 的错误。 尝试修复的常用方法是: diff --git a/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx index 48a779ee5571..ba8ae0f97b38 100644 --- a/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: 将子图部署到托管服务上 ## 创建托管服务账户 -在使用托管服务之前,在我们的托管服务中创建一个账户。您将需要一个 [Github 账户](https://github.com/); 如果您没有账户,则需要首先创建该账户。然后,导航到 [托管服务](https://thegraph.com/hosted-service/),单击_“ 注册Github”_按钮,完成 Github 的授权流程。 +在使用托管服务之前,在我们的托管服务中创建一个账户。您将需要一个 [Github 账户](https://github.com/); 如果您没有账户,则需要首先创建该账户。然后,导航到 [托管服务](https://thegraph.com/hosted-service/),单击*“ 注册Github”*按钮,完成 Github 的授权流程。 ## 存储访问令牌 @@ -42,7 +42,7 @@ title: 将子图部署到托管服务上 部署子图后,Graph浏览器将切换到显示子图的同步状态。根据需要从历史区块中提取的数据量和事件数量,从genesis区块开始,同步可能需要几分钟到几个小时。 -一旦Graph节点从历史区块中提取了所有数据,子图状态就会切换到` Synced `。在挖掘这些区块时,Graph节点将继续检查子图的区块。 +一旦Graph节点从历史区块中提取了所有数据,子图状态就会切换到`Synced`。在挖掘这些区块时,Graph节点将继续检查子图的区块。 ## 重新部署子图 diff --git a/website/pages/zh/developing/creating-a-subgraph.mdx b/website/pages/zh/developing/creating-a-subgraph.mdx index 4b422cf814e9..261219b482d3 100644 --- a/website/pages/zh/developing/creating-a-subgraph.mdx +++ b/website/pages/zh/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Null value resolved for non-null field 'name' 我们在 GraphQL API 中支持以下标量: -| 类型 | 描述 | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `字节` | 字节数组,表示为十六进制字符串。 通常用于以太坊hash和地址。 | -| `字符串` | `string` 值的标量。 不支持空字符,并会自动进行删除。 | -| `Boolean` | `boolean` 值的标量。 | -| `Int` | GraphQL 规范将 `Int` 定义为 32 字节的大小。 | -| `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` | 大整数。 用于以太坊的 `uint32`、`int64`、`uint64`、...、`uint256` 类型。 注意:`uint32`以下的所有类型,例如`int32`、`uint24`或`int8`都表示为`i32`。 | -| `BigDecimal` | `BigDecimal` 表示为有效数字和指数的高精度小数。 指数范围是 -6143 到 +6144。 四舍五入到 34 位有效数字。 | +| 类型 | 描述 | +| --- | --- | +| `字节` | 字节数组,表示为十六进制字符串。 通常用于以太坊hash和地址。 | +| `字符串` | `string` 值的标量。 不支持空字符,并会自动进行删除。 | +| `Boolean` | `boolean` 值的标量。 | +| `Int` | GraphQL 规范将 `Int` 定义为 32 字节的大小。 | +| `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` | 大整数。 用于以太坊的 `uint32`、`int64`、`uint64`、...、`uint256` 类型。 注意:`uint32`以下的所有类型,例如`int32`、`uint24`或`int8`都表示为`i32`。 | +| `BigDecimal` | `BigDecimal` 表示为有效数字和指数的高精度小数。 指数范围是 -6143 到 +6144。 四舍五入到 34 位有效数字。 | #### 枚举类型 @@ -458,33 +458,33 @@ query { 支持的语言词典: -| 代码 | 词典 | -| ------ | ----- | -| simple | 通用 | -| da | 丹麦语 | -| nl | 荷兰语 | -| en | 英语 | -| fi | 芬兰语 | -| fr | 法语 | -| de | 德语 | -| hu | 匈牙利语 | -| it | 意大利语 | -| no | 挪威语 | -| pt | 葡萄牙语 | +| 代码 | 词典 | +| ------ | ---------- | +| simple | 通用 | +| da | 丹麦语 | +| nl | 荷兰语 | +| en | 英语 | +| fi | 芬兰语 | +| fr | 法语 | +| de | 德语 | +| hu | 匈牙利语 | +| it | 意大利语 | +| no | 挪威语 | +| pt | 葡萄牙语 | | ro | 罗马尼亚语 | -| ru | 俄语 | -| es | 西班牙语 | -| sv | 瑞典语 | -| tr | 土耳其语 | +| ru | 俄语 | +| es | 西班牙语 | +| sv | 瑞典语 | +| tr | 土耳其语 | ### 排序算法 支持的排序结果算法: -| 算法 | 描述 | -| ------------- | -------------------------- | +| 算法 | 描述 | +| ------------- | --------------------------------------------- | | rank | 使用全文查询的匹配质量 (0-1) 对结果进行排序。 | -| proximityRank | 与 rank 类似,但也包括匹配的接近程度。 | +| proximityRank | 与 rank 类似,但也包括匹配的接近程度。 | ## 编写映射 @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **注意:** 新的数据源只会处理创建它的区块和所有后续区块的调用和事件,而不会处理历史数据,也就是包含在先前区块中的数据。 -> +> > 如果先前的区块包含与新数据源相关的数据,最好通过读取合约的当前状态,并在创建新数据源时创建表示该状态的实体来索引该数据。 ### 数据源背景 @@ -716,7 +716,7 @@ dataSources: ``` > **注意:** 合约创建区块可以在 Etherscan 上快速查找: -> +> > 1. 通过在搜索栏中输入合约地址来搜索合约。 > 2. 单击 `Contract Creator` 部分中的创建交易hash。 > 3. 加载交易详情页面,您将在其中找到该合约的起始区块。 @@ -906,11 +906,11 @@ eventHandlers: 从 `specVersion` `0.0.4` 开始,子图特征必须使用它们的 `camelCase` 名称,在清单文件顶层的 `features` 部分中显式声明,如下表所列: -| 特征 | 名称 | -| --------------------------- | --------------------------------------------------- | -| [非致命错误](#非致命错误) | `nonFatalErrors` | -| [全文搜索](#定义全文搜索字段) | `fullTextSearch` | -| [嫁接](#嫁接到现有子图) | `grafting` | +| 特征 | 名称 | +| ----------------------------------------- | --------------------------------------------------- | +| [非致命错误](#非致命错误) | `nonFatalErrors` | +| [全文搜索](#定义全文搜索字段) | `fullTextSearch` | +| [嫁接](#嫁接到现有子图) | `grafting` | | [以太坊合约上的IPFS](#以太坊合约上的IPFS) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | 例如,如果子图使用 **Full-Text Search** 和 **Non-fatal Errors** 功能,则清单中的 `features` 字段应为: @@ -990,7 +990,7 @@ _meta { > **注意:** 在初次升级到The Graph Network时,不建议使用grafting。可以在[这里](/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network)了解更多信息。 -首次部署子图时,它会在相应链的启动区块(或每个数据源定义的 `startBlock` 处)开始索引事件。在某些情况下,可以使用现有子图已经索引的数据并在更晚的区块上开始索引。 这种索引模式称为_Grafting_。 例如,嫁接在开发过程中非常有用,可以快速克服映射中的简单错误,或者在现有子图失败后暂时恢复工作。 +首次部署子图时,它会在相应链的启动区块(或每个数据源定义的 `startBlock` 处)开始索引事件。在某些情况下,可以使用现有子图已经索引的数据并在更晚的区块上开始索引。 这种索引模式称为*Grafting*。 例如,嫁接在开发过程中非常有用,可以快速克服映射中的简单错误,或者在现有子图失败后暂时恢复工作。 当 `subgraph.yaml` 中的子图清单在顶层包含 `graft` 区块时,子图被嫁接到基础子图: @@ -1163,7 +1163,7 @@ For Arweave, as of version 0.33.0 Graph Node can fetch files stored on Arweave b ```typescript import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates' -const ipfshash = "QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm" +const ipfshash = 'QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm' //This example code is for a Crypto coven subgraph. The above ipfs hash is a directory with token metadata for all crypto coven NFTs. export function handleTransfer(event: TransferEvent): void { diff --git a/website/pages/zh/developing/graph-ts/api.mdx b/website/pages/zh/developing/graph-ts/api.mdx index 8acdaea60b1d..c492fc65d087 100644 --- a/website/pages/zh/developing/graph-ts/api.mdx +++ b/website/pages/zh/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ title: AssemblyScript API 子图清单中的 `apiVersion` 指定了由 Graph Node 运行的特定子图的映射 API 版本。 -| 版本 | Release 说明 | -| :---: | ------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | 添加了 `TransactionReceipt` 和 `Log` 类到以太坊类型。
    已将 `receipt` 字段添加到Ethereum Event对象。 | -| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加
    baseFeePerGas字段 | +| 版本 | Release 说明 | +| :-: | --- | +| 0.0.7 | 添加了 `TransactionReceipt` 和 `Log` 类到以太坊类型。
    已将 `receipt` 字段添加到Ethereum Event对象。 | +| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加
    baseFeePerGas字段 | | 0.0.5 | AssemblyScript 升级到版本 0.19.10(这包括重大更改,参阅
    迁移指南)ethereum.transaction.gasUsed 重命名为 ethereum.transaction.gasLimit | -| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 | -| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。
    `etherem.call.address` 被重命名为 `ethereum.call.to`。 | -| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 | +| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 | +| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。
    `etherem.call.address` 被重命名为 `ethereum.call.to`。 | +| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 | ### 内置类型 @@ -733,44 +733,44 @@ if (value.kind == JSONValueKind.BOOL) { ### 类型转换参考 -| 源类型 | 目标类型 | 转换函数 | -| --------------------------------------- | --------------------------------------- | ----------------------------------------------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() 或 s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toU64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| 源类型 | 目标类型 | 转换函数 | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() 或 s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toU64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### 数据源元数据 diff --git a/website/pages/zh/developing/unit-testing-framework.mdx b/website/pages/zh/developing/unit-testing-framework.mdx index f62996008c36..4af36839c168 100644 --- a/website/pages/zh/developing/unit-testing-framework.mdx +++ b/website/pages/zh/developing/unit-testing-framework.mdx @@ -24,7 +24,7 @@ Postgres 安装命令: brew install postgresql ``` -创建到最新 libpq.5. lib_ 的符号链接,可能需要首先创建这个目录_`/usr/local/opt/postgreql/lib/` +创建到最新 libpq.5. lib* 的符号链接,可能需要首先创建这个目录*`/usr/local/opt/postgreql/lib/` ```sh ln -sf /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib /usr/local/opt/postgresql/lib/libpq.5.dylib @@ -225,7 +225,7 @@ test("handleNewGravatar() should create a new entity", () => { 例子: -`beforeAll`中的代码将在文件中的_all_测试之前执行一次。 +`beforeAll`中的代码将在文件中的*all*测试之前执行一次。 ```typescript import { describe, test, beforeAll } from "matchstick-as/assembly/index" @@ -285,7 +285,7 @@ describe("handleUpdatedGravatar()", () => { 例子: -`afterAll`中的代码将在文件中的_all_测试之后执行一次。 +`afterAll`中的代码将在文件中的*all*测试之后执行一次。 ```typescript import { describe, test, afterAll } from "matchstick-as/assembly/index" @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). 这意味着您在代码中使用了`console.log`,而AssemblyScript不支持此选项。请考虑使用[日志API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > 返回ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > 返回新ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) 参数不匹配是由`graph-ts` and `matchstick-as`不匹配造成的。解决此类问题的最佳方法是将所有内容更新到最新发布的版本。 diff --git a/website/pages/zh/managing/deprecating-a-subgraph.mdx b/website/pages/zh/managing/deprecating-a-subgraph.mdx index 375761f56bcd..ed9e25949fc9 100644 --- a/website/pages/zh/managing/deprecating-a-subgraph.mdx +++ b/website/pages/zh/managing/deprecating-a-subgraph.mdx @@ -5,7 +5,7 @@ title: 弃用子图 如果您想在 Graph浏览器上弃用您的子图,您来对地方了! 请按照以下步骤操作: 1. 在[这里](https://etherscan.io/address/0xadca0dd4729c8ba3acf3e99f3a9f471ef37b6825#writeProxyContract)访问合约地址。 -2. 使用`SubgraphID`作为参数调用` deprecateSubgraph `。 +2. 使用`SubgraphID`作为参数调用`deprecateSubgraph`。 3. 瞧! 您的子图将不再显示在Graph浏览器上的搜索中。 请注意以下事项: diff --git a/website/pages/zh/network/benefits.mdx b/website/pages/zh/network/benefits.mdx index a6e203c5894b..1d1b32f131db 100644 --- a/website/pages/zh/network/benefits.mdx +++ b/website/pages/zh/network/benefits.mdx @@ -27,49 +27,49 @@ Graph的去中心化网络经过精心设计和完善,创造了强大的索引 ## 低容量用户(每月少于30,000次查询) -| 成本比较 | 自托管 | Graph网络 | -|:----------------:|:---------------------------------------:|:---------------------:| -| 每月服务器费用 \* | 每月350美元 | 0美元 | -| 查询成本 | $0+ | ~15美元每月 | -| 工程时间 | 400美元每月 | 没有,内置在具有全球去中心化索引者的网络中 | -| 每月查询 | 受限于基础设施能力 | 30,000(自动扩缩) | -| 每个查询的成本 | 0美元 | $0.0005 | -| 基础设施 | 中心化 | 去中心化 | -| 异地备援 | 每个额外节点 $750 + | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | $750+ | ~$15 | +| 成本比较 | 自托管 | Graph网络 | +| :------------------: | :-------------------------------------: | :----------------------------------------: | +| 每月服务器费用 \* | 每月350美元 | 0美元 | +| 查询成本 | $0+ | ~15美元每月 | +| 工程时间 | 400美元每月 | 没有,内置在具有全球去中心化索引者的网络中 | +| 每月查询 | 受限于基础设施能力 | 30,000(自动扩缩) | +| 每个查询的成本 | 0美元 | $0.0005 | +| 基础设施 | 中心化 | 去中心化 | +| 异地备援 | 每个额外节点 $750 + | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | $750+ | ~$15 | ## 中等容量用户(每月超过3,000,000次查询) -| 成本比较 | 自托管 | Graph网络 | -|:----------------:|:-------------------------------------------:|:---------------------:| -| 每月服务器费用 \* | 每月350美元 | 0美元 | -| 查询成本 | 每月500美元 | 每月750美元 | +| 成本比较 | 自托管 | Graph网络 | +| :------------------: | :---------------------------------------------: | :----------------------------------------: | +| 每月服务器费用 \* | 每月350美元 | 0美元 | +| 查询成本 | 每月500美元 | 每月750美元 | | 工程时间 | 每月800美元 | 没有,内置在具有全球去中心化索引者的网络中 | -| 每月查询 | 受限于基础设施能力 | 3,000,000+ | -| 每个查询的成本 | 0美元 | 0.00025美元 | -| 基础设施 | 中心化 | 去中心化 | -| 工程费用 | 每小时200美元 | 包括在内 | -| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | 1650美元以上 | 750美元 | +| 每月查询 | 受限于基础设施能力 | 3,000,000+ | +| 每个查询的成本 | 0美元 | 0.00025美元 | +| 基础设施 | 中心化 | 去中心化 | +| 工程费用 | 每小时200美元 | 包括在内 | +| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | 1650美元以上 | 750美元 | ## 高容量用户(每月超过30,000,000次查询) -| 成本比较 | 自托管 | Graph网络 | -|:----------------:|:-------------------------------------------:|:---------------------:| -| 每月服务器费用 \* | 1100美元每月每节点 | 0美元 | -| 查询成本 | 4000美元 | 4500美元每月 | -| 需要的节点数量 | 10 | 不适用 | -| 工程时间 | 每月6000美元或以上 | 没有,内置在具有全球去中心化索引人的网络中 | -| 每月查询 | 受限于基础设施能力 | 30,000,000+ | -| 每个查询的成本 | 0美元 | 0.00015美元 | -| 基础设施 | 中心化 | 去中心化 | -| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | 11000+美元 | 4500美元 | - -* 包括后备费用: 每月$50-$100美元 +| 成本比较 | 自托管 | Graph网络 | +| :------------------: | :-------------------------------------------: | :----------------------------------------: | +| 每月服务器费用 \* | 1100美元每月每节点 | 0美元 | +| 查询成本 | 4000美元 | 4500美元每月 | +| 需要的节点数量 | 10 | 不适用 | +| 工程时间 | 每月6000美元或以上 | 没有,内置在具有全球去中心化索引人的网络中 | +| 每月查询 | 受限于基础设施能力 | 30,000,000+ | +| 每个查询的成本 | 0美元 | 0.00015美元 | +| 基础设施 | 中心化 | 去中心化 | +| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | 11000+美元 | 4500美元 | + +- 包括后备费用: 每月$50-$100美元 按每小时200美元的假设计算的工程时间 diff --git a/website/pages/zh/network/delegating.mdx b/website/pages/zh/network/delegating.mdx index 09208995ad22..9a0d6888d54c 100644 --- a/website/pages/zh/network/delegating.mdx +++ b/website/pages/zh/network/delegating.mdx @@ -32,9 +32,7 @@ title: 委托 还需要考虑的一件事是明智地选择索引人。 如果您选择了一个不值得信赖的 索引人,或者没有做好工作,您将想要取消委托,这意味着您将失去很多获得奖励的机会,这可能与耗费 GRT 一样糟糕。 -
    - 请注意委托用户界面中的0.5%费用,以及28天的解约期。 -
    +
    请注意委托用户界面中的0.5%费用,以及28天的解约期。
    ### 选择一个为委托人提供公平的奖励分配的值得信赖的索引人 @@ -43,7 +41,8 @@ title: 委托 索引奖励分成- 索引奖励分成是指索引人将为自己保留的那部分奖励。 这意味着,如果它被设置为 100%,作为一个委托人,你将获得 0 个索引奖励。 如果你在 UI 中看到 80%,这意味着作为委托人,你将获得 20%。 一个重要的说明 -在网络的初期,索引奖励将占奖励的大部分比重。
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *上 面的索引人分给委托人 90% 的收益。 中间的给委托人 20%。 下面的给委托人约 83%。 + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *上 面的索引人分给委托人 90% 的收益。 中间的给委托人 20%。 + 下面的给委托人约 83%。
    - 查询费分成-这与索引奖励分成的运作方式完全相同。 不过,这是专门针对索引人收取的查询费的回报。 需要注意的是,在网络初期,查询费的回报与索引奖励相比会非常小。 建议关注网络来确定网络中的查询费何时开始变的比较可观。 diff --git a/website/pages/zh/network/indexing.mdx b/website/pages/zh/network/indexing.mdx index 1218280c992d..1e3ae15b544a 100644 --- a/website/pages/zh/network/indexing.mdx +++ b/website/pages/zh/network/indexing.mdx @@ -113,11 +113,11 @@ Query fees are collected by the gateway and distributed to indexers according to - **大型** -准备对当前使用的所有子图进行索引,并为相关流量的请求提供服务。 | 设置 | (CPU 数量) | (内存 GB) | (硬盘 TB) | (CPU 数量) | (内存 GB) | -| -- |:--------:|:-------:|:-------:|:--------:|:-------:| -| 小型 | 4 | 8 | 1 | 4 | 16 | -| 标准 | 8 | 30 | 1 | 12 | 48 | -| 中型 | 16 | 64 | 2 | 32 | 64 | -| 大型 | 72 | 468 | 3.5 | 48 | 184 | +| ---- | :--------: | :-------: | :-------: | :--------: | :-------: | +| 小型 | 4 | 8 | 1 | 4 | 16 | +| 标准 | 8 | 30 | 1 | 12 | 48 | +| 中型 | 16 | 64 | 2 | 32 | 64 | +| 大型 | 72 | 468 | 3.5 | 48 | 184 | ### 索引人应该采取哪些基本的安全防范措施? @@ -149,26 +149,26 @@ Query fees are collected by the gateway and distributed to indexers according to #### Graph 节点 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| ---- | ------------------------------------ | ------------------------------------------------------------------- | ----------------- | ----- | -| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | -| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | -| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | +| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | +| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | #### 索引人服务 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| ---- | --------------------------------------- | --------------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP 服务器
    (用于付费子图查询) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP 服务器
    (用于付费子图查询) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus 指标 | /metrics | --metrics-port | - | #### 索引人代理 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| ---- | --------- | -- | ------------------------- | --------------------------------------- | -| 8000 | 索引人管理 API | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| ---- | -------------- | ---- | ------------------------- | --------------------------------------- | +| 8000 | 索引人管理 API | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### 在谷歌云上使用 Terraform 建立服务器基础设施 @@ -730,7 +730,7 @@ default => 0.1 * $SYSTEM_LOAD; 使用上述模型的查询成本计算示例: -| 询问 | 价格 | +| 询问 | 价格 | | ---------------------------------------------------------------------------- | ------- | | { pairs(skip: 5000) { id } } | 0.5 GRT | | { tokens { symbol } } | 0.1 GRT | diff --git a/website/pages/zh/operating-graph-node.mdx b/website/pages/zh/operating-graph-node.mdx index 9ed79ffbde45..78fa738fcf22 100644 --- a/website/pages/zh/operating-graph-node.mdx +++ b/website/pages/zh/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ 当运行Graph Node时,会暴露以下端口: -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| ---- | ------------------------------------ | ------------------------------------------------------------------- | ----------------- | ----- | -| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...

    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | -| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | -| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...

    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | +| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | +| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | > **重要**: 公开暴露端口时要小心 - **管理端口** 应保持锁定。 这包括下面详述的 Graph 节点 JSON-RPC 和索引人管理端点。 diff --git a/website/pages/zh/querying/graphql-api.mdx b/website/pages/zh/querying/graphql-api.mdx index c798bdfd4ec6..9ab99b1eb0c2 100644 --- a/website/pages/zh/querying/graphql-api.mdx +++ b/website/pages/zh/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { tokens(first: 1000, where: { id_gt: $last ``` > **语法糖:**您可以通过传递一个用逗号分隔的子表达式来删除`and`运算符,从而简化上述查询。 -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) 全文搜索运算符: -| 符号 | 运算符 | 描述 | -| ----------- | ----------- | ------------------------------------- | -| `&` | `And` | 用于将多个搜索词组合到包含所有提供词条的实体的过滤器中 | -| | | `Or` | 由 or 运算符分隔的多个搜索词的查询,将返回与任何提供的词匹配的所有实体 | -| `<->` | `Follow by` | 指定两个单词之间的距离。 | -| `:*` | `Prefix` | 使用前缀搜索词查找前缀匹配的单词(需要 2 个字符) | +| 符号 | 运算符 | 描述 | +| ------ | ----------- | ---------------------------------------------------------------------- | +| `&` | `And` | 用于将多个搜索词组合到包含所有提供词条的实体的过滤器中 | +| | | `Or` | 由 or 运算符分隔的多个搜索词的查询,将返回与任何提供的词匹配的所有实体 | +| `<->` | `Follow by` | 指定两个单词之间的距离。 | +| `:*` | `Prefix` | 使用前缀搜索词查找前缀匹配的单词(需要 2 个字符) | #### 例子 diff --git a/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx b/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx index 3ff2d318c88f..622bdeef307e 100644 --- a/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + 如果您有变量遮蔽的情况,则需要重命名重名变量。 + ### 空值比较 + 对子图进行升级后,有时您可能会遇到如下错误: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + 要解决此问题,您只需将 `if` 语句更改为如下所示代码: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + 要解决此问题,您可以为该属性访问创建一个变量,以便编译器可以执行可空性检查: ```typescript From 6623e2957f64fd245635a3c00f6cc571290a5db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:26 -0400 Subject: [PATCH 654/924] New translations cosmos.mdx (French) --- website/pages/fr/cookbook/cosmos.mdx | 44 ++++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/website/pages/fr/cookbook/cosmos.mdx b/website/pages/fr/cookbook/cosmos.mdx index ad5486175d46..4cb8ecd18801 100644 --- a/website/pages/fr/cookbook/cosmos.mdx +++ b/website/pages/fr/cookbook/cosmos.mdx @@ -48,30 +48,30 @@ La définition d'un subgraph comporte trois éléments clés : Le manifeste du subgraph (`subgraph.yaml`) identifie les sources de données du subgraph, les déclencheurs d'intérêt et les fonctions (`handlers`) qui doivent être exécutées en réponse à ces déclencheurs. Vous trouverez ci-dessous un exemple de manifeste de subgraph pour un subgraph Cosmos : ```yaml -version spec: 0.0.5 -description: Exemple de subgraph Cosmos +version spec : 0.0.5 +description : Exemple de subgraph Cosmos schéma: - fichier: ./schema.graphql # lien vers le fichier de schéma + fichier : ./schema.graphql # lien vers le fichier de schéma les sources de données: - - genre: cosmos - nom: CosmosHub - réseau: cosmoshub-4 # Cela changera pour chaque blockchain basée sur le cosmos. Dans ce cas, l’exemple utilise le mainnet Cosmos Hub. - source: - startBlock: 0 # Requis pour Cosmos, définissez-le sur 0 pour démarrer l'indexation à partir de la genèse de la chaîne - cartographie: - Version api: 0.0.7 - langage: wasm/assemblyscript - gestionnaires de blocs: - - handler: handleNewBlock # le nom de la fonction dans le fichier de mappage - Gestionnaires d'événements: - - event: récompenses # le type d'événement qui sera géré - handler: handleReward # le nom de la fonction dans le fichier de mappage - Gestionnaires de transactions: - - handler: handleTransaction # le nom de la fonction dans le fichier de mappage - Gestionnaires de messages: - - message: /cosmos.staking.v1beta1.MsgDelegate # le type d'un message - handler: handleMsgDelegate # le nom de la fonction dans le fichier de mappage - fichier: ./src/mapping.ts # lien vers le fichier avec les mappages Assemblyscript + - genre : cosmos + nom : CosmosHub + réseau : cosmoshub-4 # Cela changera pour chaque blockchain basée sur le cosmos. Dans ce cas, l’exemple utilise le mainnet Cosmos Hub. + source: + startBlock : 0 # Requis pour Cosmos, définissez-le sur 0 pour démarrer l'indexation à partir de la genèse de la chaîne + cartographie : + Version api : 0.0.7 + langage : wasm/assemblyscript + gestionnaires de blocs : + - handler: handleNewBlock # le nom de la fonction dans le fichier de mappage + Gestionnaires d'événements : + - event : récompenses # le type d'événement qui sera géré + handler: handleReward # le nom de la fonction dans le fichier de mappage + Gestionnaires de transactions : + - handler: handleTransaction # le nom de la fonction dans le fichier de mappage + Gestionnaires de messages : + - message : /cosmos.staking.v1beta1.MsgDelegate # le type d'un message + handler : handleMsgDelegate # le nom de la fonction dans le fichier de mappage + fichier : ./src/mapping.ts # lien vers le fichier avec les mappages Assemblyscript ``` - Les subgraphs cosmos introduisent un nouveau `type` de source de données (`cosmos`). From 6d5ca20e87cf93f37daa5f7199810013a1eac2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:26 -0400 Subject: [PATCH 655/924] New translations cosmos.mdx (Spanish) --- website/pages/es/cookbook/cosmos.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/es/cookbook/cosmos.mdx b/website/pages/es/cookbook/cosmos.mdx index 11c2684860a1..a9721e2f2680 100644 --- a/website/pages/es/cookbook/cosmos.mdx +++ b/website/pages/es/cookbook/cosmos.mdx @@ -170,7 +170,7 @@ Cada tipo de handler viene con su propia estructura de datos que se pasa como ar - Los handlers de transacciones reciben el tipo `TransactionData`. - Los handlers de mensajes reciben el tipo `MessageData`. -Como parte de `MessageData`, el message handler recibe un contexto de transacción, que contiene la información más importante sobre una transacción que abarca un mensaje. El contexto de transacción también está disponible en el tipo `EventData`, pero solo cuando el evento correspondiente está asociado con una transacción. Además, todos los controladores reciben una referencia a un bloque (`HeaderOnlyBlock`). +Como parte de `MessageData`, el message handler recibe un contexto de transacción, que contiene la información más importante sobre una transacción que abarca un mensaje. El contexto de transacción también está disponible en el tipo ` EventData `, pero solo cuando el evento correspondiente está asociado con una transacción. Además, todos los controladores reciben una referencia a un bloque (` HeaderOnlyBlock `). Puedes encontrar una lista completa de los tipos para la integración Cosmos aquí [here](https://github.com/graphprotocol/graph-ts/blob/4c064a8118dff43b110de22c7756e5d47fcbc8df/chain/cosmos.ts). From f1cec83c26eb39bd22f217f2d669c9be68710901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:32 -0400 Subject: [PATCH 656/924] New translations cosmos.mdx (Urdu (Pakistan)) --- website/pages/ur/cookbook/cosmos.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ur/cookbook/cosmos.mdx b/website/pages/ur/cookbook/cosmos.mdx index df28c5b1eecf..5880b8348d76 100644 --- a/website/pages/ur/cookbook/cosmos.mdx +++ b/website/pages/ur/cookbook/cosmos.mdx @@ -165,7 +165,7 @@ class Any { ہر ہینڈلر کی قسم اس کے اپنے ڈیٹا ڈھانچے کے ساتھ آتی ہے جو میپنگ فنکشن کی دلیل کے طور پر پاس کی جاتی ہے. -- بلاک ہینڈلرز کو `Block` قسم موصول ہوتی ہے. +- بلاک ہینڈلرز کو ` Block ` قسم موصول ہوتی ہے. - ایونٹ ہینڈلرز کو `EventData` قسم موصول ہوتی ہے. - ٹرانزیکشن ہینڈلرز کو `TransactionData` قسم موصول ہوتی ہے. - میسج ہینڈلرز کو `MessageData` قسم موصول ہوتی ہے. From 407d6f17d85dd47d355dd027bf1042d263576ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:35 -0400 Subject: [PATCH 657/924] New translations supported-networks.mdx (Romanian) --- website/pages/ro/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/ro/developing/supported-networks.mdx b/website/pages/ro/developing/supported-networks.mdx index 335f07c18968..d422754aa5ba 100644 --- a/website/pages/ro/developing/supported-networks.mdx +++ b/website/pages/ro/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Rețele suportate --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 1feab48be04bdb5f13bc93b5c3da83d6ecd6906f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:36 -0400 Subject: [PATCH 658/924] New translations supported-networks.mdx (French) --- website/pages/fr/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/fr/developing/supported-networks.mdx b/website/pages/fr/developing/supported-networks.mdx index 7504121f78f5..a5675b1f0214 100644 --- a/website/pages/fr/developing/supported-networks.mdx +++ b/website/pages/fr/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Réseaux supportés --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From e53fce9bf10fa5900f3f8d452dcf2c9d331c268d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:36 -0400 Subject: [PATCH 659/924] New translations supported-networks.mdx (Spanish) --- website/pages/es/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/es/developing/supported-networks.mdx b/website/pages/es/developing/supported-networks.mdx index d5eb03190a1c..f6f2fc3c9de8 100644 --- a/website/pages/es/developing/supported-networks.mdx +++ b/website/pages/es/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Redes admitidas --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From dddef0e3b72ee0cf548c50a1083e07c86493d78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:37 -0400 Subject: [PATCH 660/924] New translations supported-networks.mdx (Arabic) --- website/pages/ar/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/ar/developing/supported-networks.mdx b/website/pages/ar/developing/supported-networks.mdx index 8df633d1d26c..44a74bfc0e8e 100644 --- a/website/pages/ar/developing/supported-networks.mdx +++ b/website/pages/ar/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: الشبكات المدعومة --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From f139d848b2ff0cfd5676bf4e104825914d918910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:38 -0400 Subject: [PATCH 661/924] New translations supported-networks.mdx (Czech) --- website/pages/cs/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/cs/developing/supported-networks.mdx b/website/pages/cs/developing/supported-networks.mdx index 67dc043c56a9..e258ab4cca73 100644 --- a/website/pages/cs/developing/supported-networks.mdx +++ b/website/pages/cs/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Podporované sítě --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + Hostovaná služba se spoléhá na stabilitu a spolehlivost základních technologií, konkrétně na poskytované koncové body JSON RPC. Ropsten, Rinkeby a Kovan jsou vyřazeny. Více informací najdete na [Blogu nadace Ethereum](https://blog.ethereum.org/2022/06/21/testnet-deprecation). Od 25. února 2023 již nejsou Ropsten, Rinkeby a Kovan podporovány hostovanou službou. Goerli bude po sloučení udržován klientskými vývojáři a je rovněž podporován hostovanou službou. Vývojářům, kteří v současné době používají Ropsten, Rinkeby nebo Kovan jako staging/testovací prostředí, doporučujeme přejít na Goerli. From 09043dd2a43235ea0b377450511632c85a8a2e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:39 -0400 Subject: [PATCH 662/924] New translations supported-networks.mdx (German) --- website/pages/de/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/de/developing/supported-networks.mdx b/website/pages/de/developing/supported-networks.mdx index cd82305bfce2..91fe34b967c4 100644 --- a/website/pages/de/developing/supported-networks.mdx +++ b/website/pages/de/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Supported Networks --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 5d063e5bb2deee8ce456c3b9afd5a8dbf1a74a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:40 -0400 Subject: [PATCH 663/924] New translations supported-networks.mdx (Italian) --- website/pages/it/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/it/developing/supported-networks.mdx b/website/pages/it/developing/supported-networks.mdx index 08c9df030c11..5b4e9eaec617 100644 --- a/website/pages/it/developing/supported-networks.mdx +++ b/website/pages/it/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Reti supportate --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From f046cd2b1b2fa826c71b13a5c736c7c34090d0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:41 -0400 Subject: [PATCH 664/924] New translations supported-networks.mdx (Japanese) --- website/pages/ja/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/ja/developing/supported-networks.mdx b/website/pages/ja/developing/supported-networks.mdx index e50fde8f0d39..41a96a5e9e1c 100644 --- a/website/pages/ja/developing/supported-networks.mdx +++ b/website/pages/ja/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: サポートされているネットワーク --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + ホスティングサービスは、基盤となる技術、提供されたJSON RPCエンドポイントの安定性と信頼性に依存しています。 Ropsten、Rinkeby、Kovanは非推奨となっています。詳しくは[イーサリアム財団のブログ](https://blog.ethereum.org/2022/06/21/testnet-deprecation)をご覧ください。2023年2月25日をもって、Ropsten、Rinkeby、Kovanはホスティングサービスではサポートされなくなります。Goerliはマージ後もクライアント開発者によって保守され、ホストされたサービスによってもサポートされます。現在Ropsten, Rinkeby, Kovanをステージング/テスト環境として使用している開発者はGoerliに移行することをお勧めします。 From 6270a15b33ac2fc2e9b4f3549a7953a09fc6bdca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:42 -0400 Subject: [PATCH 665/924] New translations supported-networks.mdx (Korean) --- website/pages/ko/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/ko/developing/supported-networks.mdx b/website/pages/ko/developing/supported-networks.mdx index 4719cd60efe4..4d7ee2ea5284 100644 --- a/website/pages/ko/developing/supported-networks.mdx +++ b/website/pages/ko/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: 지원되는 네트워크들 --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 14bec8ca7a3187fc6c1193921a51f0bb8f5fb0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:43 -0400 Subject: [PATCH 666/924] New translations supported-networks.mdx (Dutch) --- website/pages/nl/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/nl/developing/supported-networks.mdx b/website/pages/nl/developing/supported-networks.mdx index 9c65eb268cc5..6b5cd52f8b52 100644 --- a/website/pages/nl/developing/supported-networks.mdx +++ b/website/pages/nl/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Ondersteunde Netwerken --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 1ee7a2e74d38a12a3fbc9992d4010f29b400d5a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:43 -0400 Subject: [PATCH 667/924] New translations supported-networks.mdx (Polish) --- website/pages/pl/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/pl/developing/supported-networks.mdx b/website/pages/pl/developing/supported-networks.mdx index 7ebc9a3bf6cf..3527784fd9ab 100644 --- a/website/pages/pl/developing/supported-networks.mdx +++ b/website/pages/pl/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Wspierane sieci --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 0b431c199850e16246b5db57172552ea81fbecf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:44 -0400 Subject: [PATCH 668/924] New translations supported-networks.mdx (Portuguese) --- website/pages/pt/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/pt/developing/supported-networks.mdx b/website/pages/pt/developing/supported-networks.mdx index 77d7911f3842..e4c0946d57ce 100644 --- a/website/pages/pt/developing/supported-networks.mdx +++ b/website/pages/pt/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Redes Apoiadas --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + O serviço hospedado depende da estabilidade das tecnologias subjacentes, principalmente os endpoints fornecidos em JSON RPC. Ropsten, Rinkeby e Kovan serão depreciadas; saiba mais no [blog da Ethereum Foundation](https://blog.ethereum.org/2022/06/21/testnet-deprecation). Desde 25 de fevereiro de 2023, Ropsten, Rinkeby e Kovan não são mais apoiados pelo serviço hospedado. A Goerli será mantida por programadores de clientes após o merge, e também tem apoio no serviço hospedado. Programadores que atualmente usam Ropsten, Rinkeby ou Kovan como seu ambiente de testes estão convidados a migrar à Goerli. From d26194a55689e318d6d1f542c440c308fc8c779f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:45 -0400 Subject: [PATCH 669/924] New translations supported-networks.mdx (Russian) --- website/pages/ru/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/ru/developing/supported-networks.mdx b/website/pages/ru/developing/supported-networks.mdx index daba34911b4b..5b4426ab4a88 100644 --- a/website/pages/ru/developing/supported-networks.mdx +++ b/website/pages/ru/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Поддерживаемые сети --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 35d8879c28ce4d7b22248564007c7db2ba2b448b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:46 -0400 Subject: [PATCH 670/924] New translations supported-networks.mdx (Swedish) --- website/pages/sv/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/sv/developing/supported-networks.mdx b/website/pages/sv/developing/supported-networks.mdx index 83d9fdfc287f..2429e3aa5275 100644 --- a/website/pages/sv/developing/supported-networks.mdx +++ b/website/pages/sv/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Stödda Nätverk --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 6a55c8bde4dbc3a40ca8cd3162948da2e86cd442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:47 -0400 Subject: [PATCH 671/924] New translations supported-networks.mdx (Turkish) --- website/pages/tr/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/tr/developing/supported-networks.mdx b/website/pages/tr/developing/supported-networks.mdx index a73d74cbdee6..99c6e6fa6239 100644 --- a/website/pages/tr/developing/supported-networks.mdx +++ b/website/pages/tr/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Desteklenen Ağlar --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + Barındırılan hizmet, altta yatan teknolojilerin, yani sağlanan JSON RPC uç noktalarının kararlılığına ve güvenilirliğine dayanır. Ropsten, Rinkeby ve Kovan kullanımdan kaldırılıyor. Daha fazlasını [Ethereum Vakfı Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation) yazısından okuyabilirsiniz. 25 Şubat 2023 itibarıyla Ropsten, Rinkeby ve Kovan artık barındırılan hizmet tarafından desteklenmiyor. Goerli'nin bakımı, birleşme sonrasında müşteri geliştiricileri tarafından gerçekleştirilecek ve aynı zamanda barındırılan hizmet tarafından da desteklenecek. Şu anda hazırlık/test ortamı olarak Ropsten, Rinkeby veya Kovan'ı kullanan geliştiricilerin Goerli'ye geçmeleri teşvik edilmektedir. From 3e6def66b0006698178afeb49af150b98049d6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:48 -0400 Subject: [PATCH 672/924] New translations supported-networks.mdx (Ukrainian) --- website/pages/uk/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/uk/developing/supported-networks.mdx b/website/pages/uk/developing/supported-networks.mdx index 398b3257db7a..08e5da5050ed 100644 --- a/website/pages/uk/developing/supported-networks.mdx +++ b/website/pages/uk/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Мережі, які підтримуються --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 91b60938a61fc4fccdd28a01c112759e5b5b429b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:49 -0400 Subject: [PATCH 673/924] New translations supported-networks.mdx (Chinese Simplified) --- website/pages/zh/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/zh/developing/supported-networks.mdx b/website/pages/zh/developing/supported-networks.mdx index c0bced3ae466..03bb22ed8683 100644 --- a/website/pages/zh/developing/supported-networks.mdx +++ b/website/pages/zh/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: 支持的网络 --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 5630a25ec64b6883711e3aeb5793bbe932389ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:49 -0400 Subject: [PATCH 674/924] New translations supported-networks.mdx (Urdu (Pakistan)) --- website/pages/ur/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/ur/developing/supported-networks.mdx b/website/pages/ur/developing/supported-networks.mdx index dee72d2419e3..df6f6ce29831 100644 --- a/website/pages/ur/developing/supported-networks.mdx +++ b/website/pages/ur/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: سپورٹڈ نیٹ ورکس --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 9a25a4360b78c36d5d6dbeb49a3acfbb97607877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:50 -0400 Subject: [PATCH 675/924] New translations supported-networks.mdx (Vietnamese) --- website/pages/vi/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/vi/developing/supported-networks.mdx b/website/pages/vi/developing/supported-networks.mdx index 8cc8159f29f4..e0a4131e98c2 100644 --- a/website/pages/vi/developing/supported-networks.mdx +++ b/website/pages/vi/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Các mạng được hỗ trợ --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From 7716961103bc3a1991cb1d28ec03ec6266d4b3fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:51 -0400 Subject: [PATCH 676/924] New translations supported-networks.mdx (Marathi) --- website/pages/mr/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/mr/developing/supported-networks.mdx b/website/pages/mr/developing/supported-networks.mdx index d033eeecc766..96e52c3e8c2c 100644 --- a/website/pages/mr/developing/supported-networks.mdx +++ b/website/pages/mr/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: समर्थित नेटवर्क --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From efd54ed167ee2257b2dc5e5f76bc11390d9c9164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:52 -0400 Subject: [PATCH 677/924] New translations supported-networks.mdx (Hindi) --- website/pages/hi/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/hi/developing/supported-networks.mdx b/website/pages/hi/developing/supported-networks.mdx index cf872395ac16..7fe452631e97 100644 --- a/website/pages/hi/developing/supported-networks.mdx +++ b/website/pages/hi/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: समर्थित नेटवर्क्स --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From efe2885a1bacc7c2c3e9ea979c879ca760a88ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:31:53 -0400 Subject: [PATCH 678/924] New translations supported-networks.mdx (Yoruba) --- website/pages/yo/developing/supported-networks.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/pages/yo/developing/supported-networks.mdx b/website/pages/yo/developing/supported-networks.mdx index cd82305bfce2..91fe34b967c4 100644 --- a/website/pages/yo/developing/supported-networks.mdx +++ b/website/pages/yo/developing/supported-networks.mdx @@ -2,11 +2,16 @@ title: Supported Networks --- -export { getStaticPropsForSupportedNetworks as getStaticProps } from '@/src/buildGetStaticProps' +import { getStaticPropsForSupportedNetworks } from '@/src/buildGetStaticProps' import { SupportedNetworksTable } from '@/src/supportedNetworks' +export const getStaticProps = getStaticPropsForSupportedNetworks(__filename) + +\* Preliminary network support via the [upgrade Indexer](https://thegraph.com/blog/upgrade-indexer/) +⁠ Supports Substreams + The hosted service relies on the stability and reliability of the underlying technologies, namely the provided JSON RPC endpoints. Ropsten, Rinkeby and Kovan are being deprecated. Read more on the [Ethereum Foundation Blog](https://blog.ethereum.org/2022/06/21/testnet-deprecation). As of Feb 25th 2023, Ropsten, Rinkeby and Kovan are no longer supported by the hosted service. Goerli will be maintained by client developers post-merge, and is also supported by the hosted service. Developers who currently use Ropsten, Rinkeby or Kovan as their staging/testing environment are encouraged to migrate to Goerli. From ad1d2c15880b8bda9f9fa623a0cede0bada5fc23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:14 -0400 Subject: [PATCH 679/924] New translations arweave.mdx (Portuguese) --- website/pages/pt/cookbook/arweave.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/pt/cookbook/arweave.mdx b/website/pages/pt/cookbook/arweave.mdx index 1b730d68ff80..1799ed4b4819 100644 --- a/website/pages/pt/cookbook/arweave.mdx +++ b/website/pages/pt/cookbook/arweave.mdx @@ -86,7 +86,7 @@ dataSources: - A rede deve corresponder a uma rede no Graph Node que a hospeda. No serviço hospedado, a mainnet do Arweave é `arweave-mainnet` - Fontes de dados no Arweave introduzem um campo `source.owner` opcional, a chave pública de uma carteira no Arweave -Fontes de dados no Arweave apoiam duas categorias de _handlers_: +Fontes de dados no Arweave apoiam duas categorias de *handlers*: - `blockHandlers` - Executar em cada bloco novo no Arweave. Nenhum `source.owner` é exigido. - `transactionHandlers` — Executar em todas as transações onde o `source.owner` da fonte de dados é o dono. Atualmente, um dono é exigido para o `transactionHandlers`; caso utilizadores queiram processar todas as transações, eles devem providenciar "" como o `source.owner` @@ -97,15 +97,15 @@ Fontes de dados no Arweave apoiam duas categorias de _handlers_: > Nota: Transações no [Bundlr](https://bundlr.network/) não são apoiadas presentemente. -## Definição de _Schema_ +## Definição de *Schema* A definição de Schema descreve a estrutura do banco de dados resultado do subgraph, e os relacionamentos entre entidades. Isto é agnóstico da fonte de dados original. Há mais detalhes na definição de schema de subgraph [aqui](/developing/creating-a-subgraph/#the-graphql-schema). ## Mapeamentos de AssemblyScript -Os _handlers_ para eventos de processamento são escritos em [AssemblyScript](https://www.assemblyscript.org/). +Os *handlers* para eventos de processamento são escritos em [AssemblyScript](https://www.assemblyscript.org/). -O _indexing_ do Arweave introduz categorias de dados específicas ao Arweave ao [API do AssemblyScript](/developing/assemblyscript-api/). +O *indexing* do Arweave introduz categorias de dados específicas ao Arweave ao [API do AssemblyScript](/developing/assemblyscript-api/). ```tsx class Block { @@ -146,7 +146,7 @@ class Transaction { } ``` -_Handlers_ de bloco recebem um `Block`, enquanto transações recebem uma `Transaction`. +*Handlers* de bloco recebem um `Block`, enquanto transações recebem uma `Transaction`. Escrever os mapeamentos de um Subgraph no Arweave é muito similar à escrita dos mapeamentos de um Subgraph no Ethereum. Para mais informações, clique [aqui](/developing/creating-a-subgraph/#writing-mappings). From 74bce1cc54d44f55582e2b1cf6cc488f391a4e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:18 -0400 Subject: [PATCH 680/924] New translations near.mdx (French) --- website/pages/fr/cookbook/near.mdx | 50 +++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/website/pages/fr/cookbook/near.mdx b/website/pages/fr/cookbook/near.mdx index b1e19c5a58e9..938ad8a0922f 100644 --- a/website/pages/fr/cookbook/near.mdx +++ b/website/pages/fr/cookbook/near.mdx @@ -53,23 +53,23 @@ $ graph build # génère le Web Assembly à partir des fichiers AssemblyScript, Le manifeste de subgraph (`subgraph.yaml`) identifie les sources de données pour le subgraph, les déclencheurs d'intérêt et les fonctions qui doivent être exécutées en réponse à ces déclencheurs. Voici un exemple de manifeste de subgraph pour un subgraph NEAR: ```yaml -specVersion: 0.0.2 -schema: - file: ./src/schema.graphql # lien vers le fichier de schéma -dataSources: - - kind: near - network: near-mainnet - source: - account: app.good-morning.near # Cette source de données surveillera ce compte - startBlock: 10662188 # Requis pour NEAR - mapping: - apiVersion: 0.0.5 - language: wasm/assemblyscript - blockHandlers: - - handler: handleNewBlock # le nom de la fonction dans le fichier de mapping - receiptHandlers: - - handler: handleReceipt # le nom de la fonction dans le fichier de mappage - file: ./src/mapping.ts # lien vers le fichier contenant les mappings Assemblyscript +specVersion : 0.0.2 +schema : + file : ./src/schema.graphql # lien vers le fichier de schéma +dataSources : + - kind : near + network : near-mainnet + source : + account : app.good-morning.near # Cette source de données surveillera ce compte + startBlock : 10662188 # Requis pour NEAR + mapping : + apiVersion : 0.0.5 + language : wasm/assemblyscript + blockHandlers : + - handler : handleNewBlock # le nom de la fonction dans le fichier de mapping + receiptHandlers : + - handler : handleReceipt # le nom de la fonction dans le fichier de mappage + file : ./src/mapping.ts # lien vers le fichier contenant les mappings Assemblyscript ``` - Les subgraphs NEAR introduisent un nouveau `type` de source de données (`near`) @@ -79,12 +79,12 @@ dataSources: ```yaml comptes: - préfixes: - - application - - bien - suffixes: - - matin.près - - matin.testnet + préfixes : + - application + - bien + suffixes : + - matin.près + - matin.testnet ``` Les fichiers de données NEAR prennent en charge deux types de gestionnaires : @@ -259,8 +259,8 @@ Si un `compte` est spécifié, il correspondra uniquement au nom exact du compte ```yaml comptes: - suffixes: - - mintbase1.near + suffixes : + - mintbase1.near ``` ### Les subgraphs NEAR peuvent-ils faire des appels de view aux comptes NEAR pendant les mappings? From 2f325badebfc75843964f64db6147dc54d70d86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:19 -0400 Subject: [PATCH 681/924] New translations near.mdx (Arabic) --- website/pages/ar/cookbook/near.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/ar/cookbook/near.mdx b/website/pages/ar/cookbook/near.mdx index 40e13f93cbd1..3a453ab24c79 100644 --- a/website/pages/ar/cookbook/near.mdx +++ b/website/pages/ar/cookbook/near.mdx @@ -29,13 +29,13 @@ title: بناء Subgraphs على NEAR `graphprotocol/graph-ts@` هي مكتبة لأنواع خاصة بـ subgraph. -تطوير NEAR subgraph يتطلب `graph-cli` بإصدار أعلى من `0.23.0` و `graph-ts` بإصدار أعلى من `0.23.0`. +تطوير NEAR subgraph يتطلب `graph-cli` بإصدار أعلى من ` 0.23.0 ` و `graph-ts` بإصدار أعلى من ` 0.23.0 `. > Building a NEAR subgraph is very similar to building a subgraph that indexes Ethereum. هناك ثلاثة جوانب لتعريف الـ subgraph: -**subgraph.yaml:** الـ subgraph manifest ، وتحديد مصادر البيانات ذات الأهمية ، وكيف يجب أن تتم معالجتها.علما أن NEAR هو `نوع` جديد لمصدر البيانات. +**subgraph.yaml:** الـ subgraph manifest ، وتحديد مصادر البيانات ذات الأهمية ، وكيف يجب أن تتم معالجتها.علما أن NEAR هو ` نوع ` جديد لمصدر البيانات. **schema.graphql:** a schema file that defines what data is stored for your subgraph, and how to query it via GraphQL. The requirements for NEAR subgraphs are covered by [the existing documentation](/developing/creating-a-subgraph#the-graphql-schema). @@ -73,7 +73,7 @@ dataSources: ``` - NEAR subgraphs يقدم `نوعا ` جديدا من مصدر بيانات (`near`) -- يجب أن يتوافق الـ `network` مع شبكة على Graph Node المضيفة. في الخدمة المستضافة ، الشبكة الرئيسية لـ NEAR هي `near-mainnet` ، وشبكة NEAR's testnet هي `near-testnet` +- يجب أن يتوافق الـ `network` مع شبكة على Graph Node المضيفة. في الخدمة المستضافة ، الشبكة الرئيسية لـ NEAR هي ` near-mainnet ` ، وشبكة NEAR's testnet هي ` near-testnet ` - NEAR data sources introduce an optional `source.account` field, which is a human-readable ID corresponding to a [NEAR account](https://docs.near.org/docs/concepts/account). This can be an account or a sub-account. - NEAR data sources introduce an alternative optional `source.accounts` field, which contains optional suffixes and prefixes. At least prefix or suffix must be specified, they will match the any account starting or ending with the list of values respectively. The example below would match: `[app|good].*[morning.near|morning.testnet]`. If only a list of prefixes or suffixes is necessary the other field can be omitted. @@ -165,7 +165,7 @@ class ReceiptWithOutcome { These types are passed to block & receipt handlers: - معالجات الكتلة ستتلقى`Block` -- معالجات الاستلام ستتلقى`ReceiptWithOutcome` +- معالجات الاستلام ستتلقى` ReceiptWithOutcome ` Otherwise, the rest of the [AssemblyScript API](/developing/assemblyscript-api) is available to NEAR subgraph developers during mapping execution. From 84ef67905e86631f17df447a629edff532cc9dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:25 -0400 Subject: [PATCH 682/924] New translations near.mdx (Urdu (Pakistan)) --- website/pages/ur/cookbook/near.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ur/cookbook/near.mdx b/website/pages/ur/cookbook/near.mdx index 5fe26e7fa413..875a1ca0f300 100644 --- a/website/pages/ur/cookbook/near.mdx +++ b/website/pages/ur/cookbook/near.mdx @@ -72,7 +72,7 @@ dataSources: file: ./src/mapping.ts # link to the file with the Assemblyscript mappings ``` -- NEAR سب گراف ڈیٹا ماخذ کا ایک نیا `kind` متعارف کراتے ہیں (`near`) +- NEAR سب گراف ڈیٹا ماخذ کا ایک نیا ` kind ` متعارف کراتے ہیں (`near`) - `network` ہوسٹنگ گراف نوڈ پر موجود نیٹ ورک کے مطابق ہونا چاہیے۔ ہوسٹڈ سروس پر، NEAR کا مین نیٹ `near-mainnet` ہے، اور NEAR کا ٹیسٹ نیٹ ہے `near-testnet` - NEAR ڈیٹا کے ذرائع ایک اختیاری `source.account` فیلڈ متعارف کراتے ہیں، جو کہ ایک [ سے متعلق انسانی پڑھنے کے قابل ID ہے۔ اکاؤنٹ کے قریب](https://docs.near.org/docs/concepts/account)۔ یہ ایک اکاؤنٹ یا سب اکاؤنٹ ہو سکتا ہے. - NEAR ڈیٹا کے ذرائع ایک متبادل اختیاری `source.accounts` فیلڈ متعارف کراتے ہیں، جس میں اختیاری لاحقے اور سابقے ہوتے ہیں۔ کم از کم سابقہ ​​یا لاحقہ متعین ہونا ضروری ہے، وہ بالترتیب اقدار کی فہرست کے ساتھ شروع یا ختم ہونے والے کسی بھی اکاؤنٹ سے مماثل ہوں گے۔ نیچے دی گئی مثال مماثل ہوگی: `[app|good].*[morning.near|morning.testnet]`۔ اگر صرف سابقوں یا لاحقوں کی فہرست ضروری ہو تو دوسری فیلڈ کو چھوڑا جا سکتا ہے. @@ -255,7 +255,7 @@ NEAR سپورٹ بیٹا میں ہے، جس کا مطلب ہے کہ API میں ### کیا رسید ہینڈلرز اکاؤنٹس اور ان کے سب اکاؤنٹس کو متحرک کریں گے؟ -اگر ایک `account` متعین کیا گیا ہے، تو وہ صرف صحیح اکاؤنٹ کے نام سے مماثل ہوگا۔ مثال کے طور پر، اکاؤنٹس اور سب اکاؤنٹس سے ملنے کے لیے مخصوص `prefixes` اور ` suffixes` کے ساتھ، `accounts` فیلڈ کی وضاحت کرکے سب اکاؤنٹس کو ملانا ممکن ہے۔ درج ذیل تمام `mintbase1.near` سب اکاؤنٹس سے مماثل ہوں گے: +اگر ایک ` account ` متعین کیا گیا ہے، تو وہ صرف صحیح اکاؤنٹ کے نام سے مماثل ہوگا۔ مثال کے طور پر، اکاؤنٹس اور سب اکاؤنٹس سے ملنے کے لیے مخصوص ` prefixes ` اور ` suffixes` کے ساتھ، `accounts` فیلڈ کی وضاحت کرکے سب اکاؤنٹس کو ملانا ممکن ہے۔ درج ذیل تمام `mintbase1.near` سب اکاؤنٹس سے مماثل ہوں گے: ```yaml accounts: From 0c3a968cc00b127189fbdbb680215ec66080b9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:28 -0400 Subject: [PATCH 683/924] New translations subgraph-debug-forking.mdx (Spanish) --- website/pages/es/cookbook/subgraph-debug-forking.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/es/cookbook/subgraph-debug-forking.mdx b/website/pages/es/cookbook/subgraph-debug-forking.mdx index 1e2d42925fad..60d186925d16 100644 --- a/website/pages/es/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/es/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ En el contexto de la depuración, **subgraph forking** te permite depurar tu sub Cuando implementas un subgrafo en un nodo Graph remoto para la indexación y falla en el bloque _X_, la buena noticia es que el nodo Graph seguirá atendiendo consultas de GraphQL usando su tienda, que está sincronizado para bloquear _X_. ¡Genial! Esto significa que podemos aprovechar esta tienda "actualizada" para corregir los errores que surgen al indexar el bloque _X_. -En pocas palabras, vamos a _bifurcar el subgrafo fallido_ desde un nodo de Graph remoto que garantiza que el subgrafo se indexe para bloquear _X_ para proporcionar al subgrafo implementado localmente que se está depurando en el bloque _X_ una vista actualizada del estado de indexación. +En pocas palabras, vamos a _bifurcar el subgrafo fallido_ desde un nodo de Graph remoto que garantiza que el subgrafo se indexe para bloquear *X* para proporcionar al subgrafo implementado localmente que se está depurando en el bloque _X_ una vista actualizada del estado de indexación. ## ¡Por favor, muéstrame algo de código! From a2d0bbeb26aeffc6599b6cd0439961f3b4659275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:28 -0400 Subject: [PATCH 684/924] New translations subgraph-debug-forking.mdx (Arabic) --- website/pages/ar/cookbook/subgraph-debug-forking.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/ar/cookbook/subgraph-debug-forking.mdx b/website/pages/ar/cookbook/subgraph-debug-forking.mdx index 0d331deab109..202b13a497c6 100644 --- a/website/pages/ar/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ar/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ title: Quick and Easy Subgraph Debugging Using Forks عندما تنشر subgraph إلى Graph node بعيدة للقيام بالفهرسة ويفشل عند الكتلة _ X _ ، فإن الخبر الجيد هو أن Graph node ستظل تقدم استعلامات GraphQL باستخدام مخزنها(store)، والذي تمت مزامنته للكتلة(block) _ X _. هذا عظيم! هذا يعني أنه يمكننا الاستفادة من هذا المخزن "المحدث" لإصلاح الأخطاء التي تظهر عند فهرسة الكتلة _ X _. -باختصار ، سنقوم _ بتفريع (fork) الـ subgraph الفاشل _ من Graph node بعيدة والتي تضمن فهرسة الـ subgraph للكتلة _ X _ وذلك من أجل توفير الـ subgraph المنشور محليًا والذي يتم تصحيحه عندالكتلة*X* مع عرض محدث لحالة الفهرسة. +باختصار ، سنقوم _ بتفريع (fork) الـ subgraph الفاشل _ من Graph node بعيدة والتي تضمن فهرسة الـ subgraph للكتلة * X * وذلك من أجل توفير الـ subgraph المنشور محليًا والذي يتم تصحيحه عندالكتلة_X_ مع عرض محدث لحالة الفهرسة. ## من فضلك ، أرني بعض الأكواد! @@ -69,14 +69,14 @@ Oops, how unfortunate, when I deploy my perfect looking subgraph to the [Hosted وأنا أجيب: -1. `fork-base` هو عنوان URL "الأساسي" ،فمثلا عند إلحاق _subgraph id_ ، يكون عنوان URL الناتج (`/`) هو GraphQL endpoint صالح لمخزن الـ subgraph. +1. ` fork-base ` هو عنوان URL "الأساسي" ،فمثلا عند إلحاق _subgraph id_ ، يكون عنوان URL الناتج (`/`) هو GraphQL endpoint صالح لمخزن الـ subgraph. 2. الـتفريع سهل ، فلا داعي للقلق: ```bash $ graph deploy --debug-fork --ipfs http://localhost:5001 --node http://localhost:8020 ``` -أيضًا ، لا تنس تعيين حقل `dataSources.source.startBlock` في subgraph manifest لرقم الكتلة(block) التي بها المشكلة، حتى تتمكن من تخطي فهرسة الكتل الغير ضرورية والاستفادة من التفريع! +أيضًا ، لا تنس تعيين حقل ` dataSources.source.startBlock ` في subgraph manifest لرقم الكتلة(block) التي بها المشكلة، حتى تتمكن من تخطي فهرسة الكتل الغير ضرورية والاستفادة من التفريع! لذلك ، هذا ما أفعله: @@ -90,7 +90,7 @@ $ cargo run -p graph-node --release -- \ --fork-base https://api.thegraph.com/subgraphs/id/ ``` -1. بعد فحص دقيق ، لاحظت أن هناك عدم تطابق في تمثيلات الـ `id` المستخدمة عند فهرسة `Gravatar` في المعالجين الخاصين بي. بينما `handleNewGravatar` يحول (`event.params.id.toHex()`) إلى سداسي ، `handleUpdatedGravatar` يستخدم int32 (`event.params.id.toI32()`) مما يجعل `handleUpdatedGravatar` قلقا من "Gravatar not found!". أنا أجعلهم كلاهما يحولان `id` إلى سداسي. +1. بعد فحص دقيق ، لاحظت أن هناك عدم تطابق في تمثيلات الـ ` id ` المستخدمة عند فهرسة ` Gravatar ` في المعالجين الخاصين بي. بينما ` handleNewGravatar ` يحول (`event.params.id.toHex()`) إلى سداسي ، `handleUpdatedGravatar` يستخدم int32 (`event.params.id.toI32()`) مما يجعل ` handleUpdatedGravatar ` قلقا من "Gravatar not found!". أنا أجعلهم كلاهما يحولان ` id ` إلى سداسي. 2. بعد إجراء التغييرات ، قمت بنشر الـ subgraph الخاص بي على Graph node المحلية **_وتفريع الـsubgraph الفاشل_** وضبط `dataSources.source.startBlock` إلى `6190343` في `subgraph.yaml`: ```bash From b8cea8ccf9a9250c22fc536687da55a4f208239b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:29 -0400 Subject: [PATCH 685/924] New translations subgraph-debug-forking.mdx (Czech) --- website/pages/cs/cookbook/subgraph-debug-forking.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/cs/cookbook/subgraph-debug-forking.mdx b/website/pages/cs/cookbook/subgraph-debug-forking.mdx index a5bc7e36fb76..24fbcc650686 100644 --- a/website/pages/cs/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/cs/cookbook/subgraph-debug-forking.mdx @@ -12,7 +12,7 @@ V kontextu ladění vám ** vidličkování podgrafů** umožňuje ladit neúsp ## Co?! Jak? -Pokud nasadíte podgraf do vzdáleného uzlu Graph pro indexování a dojde k selhání bloku*X*, dobrou zprávou je, že uzel Graph bude stále obsluhovat dotazy GraphQL pomocí svého úložiště, které je synchronizováno s blokem*X*. skvělé! To znamená, že můžeme využít tohoto "aktuálního" úložiště k odstranění chyb vznikajících při indexování bloku _X_. +Pokud nasadíte podgraf do vzdáleného uzlu Graph pro indexování a dojde k selhání bloku_X_, dobrou zprávou je, že uzel Graph bude stále obsluhovat dotazy GraphQL pomocí svého úložiště, které je synchronizováno s blokem_X_. skvělé! To znamená, že můžeme využít tohoto "aktuálního" úložiště k odstranění chyb vznikajících při indexování bloku _X_. V kostce budeme _vidličkovat chybový podgraf_ z vzdáleného uzlu grafu, který je zaručeně indexován až do bloku _X_, aby poskytl lokálně nasazenému podgrafu, který je laděn v bloku _X_, aktuální pohled na stav indexace. From 1d082de21cc07d1982388c91887cb92927e9268e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:30 -0400 Subject: [PATCH 686/924] New translations subgraph-debug-forking.mdx (Japanese) --- website/pages/ja/cookbook/subgraph-debug-forking.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/ja/cookbook/subgraph-debug-forking.mdx b/website/pages/ja/cookbook/subgraph-debug-forking.mdx index 134e7b12cc1a..c186dbdf805c 100644 --- a/website/pages/ja/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ja/cookbook/subgraph-debug-forking.mdx @@ -6,15 +6,15 @@ title: フォークを用いた迅速かつ容易なサブグラフのデバッ ## さて、それは何でしょうか? -**サブグラフのフォーク**とは、*他*のサブグラフのストア(通常はリモート) からエンティティをフェッチするプロセスです。 +**サブグラフのフォーク**とは、_他_のサブグラフのストア(通常はリモート) からエンティティをフェッチするプロセスです。 -デバッグの文脈では、**サブグラフのフォーク**により、ブロック*X*への同期を待つことなく、ブロック*X*で失敗したサブグラフのデバッグを行うことができます。 +デバッグの文脈では、**サブグラフのフォーク**により、ブロック_X_への同期を待つことなく、ブロック_X_で失敗したサブグラフのデバッグを行うことができます。 ## その方法は? -インデックス作成のためにリモートのGraphノードにサブグラフをデプロイし、ブロック*X*で失敗した場合でも、ブロック*X*と同期しているストアを使用して GraphQL クエリを提供することができます。つまり、ブロック _X_ のインデックス作成時に発生するバグを修正するために、この最新のストアを利用できるのです。 +インデックス作成のためにリモートのGraphノードにサブグラフをデプロイし、ブロック_X_で失敗した場合でも、ブロック_X_と同期しているストアを使用して GraphQL クエリを提供することができます。つまり、ブロック _X_ のインデックス作成時に発生するバグを修正するために、この最新のストアを利用できるのです。 -簡単に言うと、ブロック*X*でデバッグされているローカルにデプロイされたサブグラフにインデックス状態の最新のビューを提供するために、ブロック*X*までインデックスされたサブグラフを持つことが保証されているリモートGraphノードから *失敗したサブグラフをフォーク*しようとしているのです。 +簡単に言うと、ブロック_X_でデバッグされているローカルにデプロイされたサブグラフにインデックス状態の最新のビューを提供するために、ブロック_X_までインデックスされたサブグラフを持つことが保証されているリモートGraphノードから _失敗したサブグラフをフォーク_しようとしているのです。 ## コードを見てみましょう @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -この場合、残念なことに、この完璧に見えるサブグラフを[HostedService](https://thegraph.com/hosted-service/) にデプロイすると、*"Gravatar not found!"*というエラーで失敗してしまいます。 +この場合、残念なことに、この完璧に見えるサブグラフを[HostedService](https://thegraph.com/hosted-service/) にデプロイすると、_"Gravatar not found!"_というエラーで失敗してしまいます。 通常の試すであろう修正方法: @@ -69,7 +69,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { 回答: -1. `fork-base`は「ベース」URLで、*subgraph id*が追加されたときのURL (`/`) はサブグラフのストアに対する有効な GraphQL endpoint であることを示します。 +1. `fork-base`は「ベース」URLで、_subgraph id_が追加されたときのURL (`/`) はサブグラフのストアに対する有効な GraphQL endpoint であることを示します。 2. フォーキングは簡単であり煩雑な手間はありません ```bash From 469739833844fc303c321302fc3e9ae31e7db861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:33 -0400 Subject: [PATCH 687/924] New translations subgraph-debug-forking.mdx (Swedish) --- website/pages/sv/cookbook/subgraph-debug-forking.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/cookbook/subgraph-debug-forking.mdx b/website/pages/sv/cookbook/subgraph-debug-forking.mdx index 0fdaaf7411c0..0478b8509e8d 100644 --- a/website/pages/sv/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/sv/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ I samband med felsökning låter **subgraf forking** dig felsöka din misslyckad När du distribuerar en subgraf till en avlägsen Graph-nod för indexering och den misslyckas vid block _X_, är den goda nyheten att Graph-noden fortfarande kommer att betjäna GraphQL-frågor med hjälp av sitt lager, som synkroniseras för att blockera _X_. Toppen! Det betyder att vi kan dra nytta av denna "up-to-date" butik för att fixa de buggar som uppstår vid indexering av block _X_. -I ett nötskal, vi ska _gaffla den misslyckade subgrafen_ från en avlägsen Graph-nod som garanterat har subgrafen indexerad upp till blocket _X_ för att ge den lokalt distribuerade subgrafen som felsöks i blocket _X_ en uppdaterad vy av indexeringstillståndet. +I ett nötskal, vi ska _gaffla den misslyckade subgrafen_ från en avlägsen Graph-nod som garanterat har subgrafen indexerad upp till blocket *X* för att ge den lokalt distribuerade subgrafen som felsöks i blocket _X_ en uppdaterad vy av indexeringstillståndet. ## Snälla, visa mig lite kod! From 336e5f835132f1afbce20ccab70f045f135e599c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:34 -0400 Subject: [PATCH 688/924] New translations subgraph-debug-forking.mdx (Chinese Simplified) --- website/pages/zh/cookbook/subgraph-debug-forking.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/zh/cookbook/subgraph-debug-forking.mdx b/website/pages/zh/cookbook/subgraph-debug-forking.mdx index 9df8b35a7650..efcc65b2e0d4 100644 --- a/website/pages/zh/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/zh/cookbook/subgraph-debug-forking.mdx @@ -6,13 +6,13 @@ title: 使用分叉快速轻松地调试子图 ## 首先,让我们来看什么是子图分叉 -**子图分叉** 是从*另一个* 子图的存储(通常是远程存储)中缓慢获取实体的过程。 +**子图分叉** 是从_另一个_ 子图的存储(通常是远程存储)中缓慢获取实体的过程。 在调试时,**subgraph forking** 允许您在固定的区块 _X_ 中调试失败的子图,而无需等待区块同步 _X_。 ## 让我们看看这是如何做到的? -当您将子图部署到远程 Graph 节点进行索引而它在区块 *X*上失败时,好消息是Graph 节点仍能以同步至区块 *X*的数据响应GraphQL 查询。这意味着我们可以基于区块 _X_ 最新的数据来修复索引时出现的错误。 +当您将子图部署到远程 Graph 节点进行索引而它在区块 _X_上失败时,好消息是Graph 节点仍能以同步至区块 _X_的数据响应GraphQL 查询。这意味着我们可以基于区块 _X_ 最新的数据来修复索引时出现的错误。 简而言之,我们将从远程 Graph 节点 _分叉失败的子图_,保证子图索引更新至区块 *X*的数据, 以便基于更新至区块 _X_ 的数据在本地部署的子图进行调试,以反映索引数据的最新状态。 @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -糟糕,不幸的是,当我将完美的子图部署到 [托管服务](https://thegraph.com/hosted-service/) 时,它会报*“未找到 Gravatar!”* 的错误。 +糟糕,不幸的是,当我将完美的子图部署到 [托管服务](https://thegraph.com/hosted-service/) 时,它会报_“未找到 Gravatar!”_ 的错误。 尝试修复的常用方法是: From 0b464583d09476ec40b0968117e652a0f3736b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:35 -0400 Subject: [PATCH 689/924] New translations subgraph-debug-forking.mdx (Urdu (Pakistan)) --- website/pages/ur/cookbook/subgraph-debug-forking.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ur/cookbook/subgraph-debug-forking.mdx b/website/pages/ur/cookbook/subgraph-debug-forking.mdx index 764a7294c0d6..0f1fb3a56d32 100644 --- a/website/pages/ur/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ur/cookbook/subgraph-debug-forking.mdx @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -افوہ، کتنی بدقسمتی کی بات ہے، جب میں اپنے بہترین نظر آنے والے سب گراف کو [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) میں تعینات کرتا ہوں تو یہ _"گراوتار نہیں ملا!"_ خرابی. +افوہ، کتنی بدقسمتی کی بات ہے، جب میں اپنے بہترین نظر آنے والے سب گراف کو [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) میں تعینات کرتا ہوں تو یہ *"گراوتار نہیں ملا!"* خرابی. درست کرنے کی کوشش کرنے کا معمول کا طریقہ یہ ہے: From a892651f02685801727b6eda34f3498496c27c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:36 -0400 Subject: [PATCH 690/924] New translations subgraph-debug-forking.mdx (Marathi) --- website/pages/mr/cookbook/subgraph-debug-forking.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/mr/cookbook/subgraph-debug-forking.mdx b/website/pages/mr/cookbook/subgraph-debug-forking.mdx index ae08df06ed38..06ceb8df1ce1 100644 --- a/website/pages/mr/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/mr/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ title: फॉर्क्स वापरून जलद आणि सुलभ जेव्हा तुम्ही इंडेक्सिंगसाठी रिमोट ग्राफ नोडवर सबग्राफ उपयोजित करता आणि तो ब्लॉक _X_ वर अयशस्वी होतो, तेव्हा चांगली बातमी अशी आहे की आलेख नोड अजूनही त्याचे स्टोअर वापरून GraphQL क्वेरी सर्व्ह करेल, जे _X_ अवरोधित करण्यासाठी समक्रमित केले आहे. खूप छान आहे! याचा अर्थ ब्लॉक _X_ अनुक्रमित करताना उद्भवणाऱ्या बगचे निराकरण करण्यासाठी आम्ही या "अप-टू-डेट" स्टोअरचा लाभ घेऊ शकतो. -थोडक्यात, आम्ही एका रिमोट ग्राफ नोडवरून _अयशस्वी सबग्राफ फोर्क करणार आहोत_ ज्याला _X_ ब्लॉक _X_ वर डीबग केलेला स्थानिकरित्या उपयोजित सबग्राफ प्रदान करण्यासाठी अनुक्रमणिका स्थितीचे अद्ययावत दृश्य. +थोडक्यात, आम्ही एका रिमोट ग्राफ नोडवरून _अयशस्वी सबग्राफ फोर्क करणार आहोत_ ज्याला *X* ब्लॉक _X_ वर डीबग केलेला स्थानिकरित्या उपयोजित सबग्राफ प्रदान करण्यासाठी अनुक्रमणिका स्थितीचे अद्ययावत दृश्य. ## कृपया, मला काही कोड दाखवा! @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -अरेरे, किती दुर्दैवी आहे, जेव्हा मी माझा परिपूर्ण दिसणारा सबग्राफ [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर तैनात करतो तेव्हा तो _"Gravatar आढळले नाही!"_ त्रुटी. +अरेरे, किती दुर्दैवी आहे, जेव्हा मी माझा परिपूर्ण दिसणारा सबग्राफ [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर तैनात करतो तेव्हा तो *"Gravatar आढळले नाही!"* त्रुटी. निराकरण करण्याचा प्रयत्न करण्याचा नेहमीचा मार्ग आहे: From 29ad1607243969c6cf144d532e3837bae2376fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:36 -0400 Subject: [PATCH 691/924] New translations subgraph-debug-forking.mdx (Hindi) --- website/pages/hi/cookbook/subgraph-debug-forking.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/hi/cookbook/subgraph-debug-forking.mdx b/website/pages/hi/cookbook/subgraph-debug-forking.mdx index 60d88d3f07c9..32e1df5a58dd 100644 --- a/website/pages/hi/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/hi/cookbook/subgraph-debug-forking.mdx @@ -8,11 +8,11 @@ title: फोर्क्स का उपयोग करके त्वरि **सबग्राफ फोर्किंग** आलसी ढंग से _दूसरे_ सबग्राफ के स्टोर (आमतौर पर एक परोक्ष सबग्राफ) से इकाइयां को लाने की प्रक्रिया है। -डिबगिंग के संदर्भ में, **सबग्राफ फोर्किंग** आपको ब्लॉक*X* को सिंक-अप करने के लिए बिना प्रतीक्षा किए ब्लॉक _X_ पर अपने विफल सबग्राफ को डीबग करने की अनुमति देता है । +डिबगिंग के संदर्भ में, **सबग्राफ फोर्किंग** आपको ब्लॉक_X_ को सिंक-अप करने के लिए बिना प्रतीक्षा किए ब्लॉक _X_ पर अपने विफल सबग्राफ को डीबग करने की अनुमति देता है । ## क्या?! कैसे? -जब आप अनुक्रमण के लिए एक दूरस्थ ग्राफ़ नोड पर एक सबग्राफ तैनात करते हैं और यह ब्लॉक _X_ करने में विफल रहता है, तो अच्छी खबर यह है कि ग्राफ़ नोड अभी भी अपने स्टोर का उपयोग करके ग्राफ़क्यूएल क्वेरी को सर्व करेगा, जो ब्लॉक*X* में सिंक-अप है। एक दम बढ़िया! इसका मतलब यह है कि ब्लॉक _X_ को अनुक्रमित करते समय उत्पन्न होने वाली बग को ठीक करने के लिए हम इस "अप-टू-डेट" स्टोर का लाभ उठा सकते हैं। +जब आप अनुक्रमण के लिए एक दूरस्थ ग्राफ़ नोड पर एक सबग्राफ तैनात करते हैं और यह ब्लॉक _X_ करने में विफल रहता है, तो अच्छी खबर यह है कि ग्राफ़ नोड अभी भी अपने स्टोर का उपयोग करके ग्राफ़क्यूएल क्वेरी को सर्व करेगा, जो ब्लॉक_X_ में सिंक-अप है। एक दम बढ़िया! इसका मतलब यह है कि ब्लॉक _X_ को अनुक्रमित करते समय उत्पन्न होने वाली बग को ठीक करने के लिए हम इस "अप-टू-डेट" स्टोर का लाभ उठा सकते हैं। संक्षेप में, हम एक दूरस्थ ग्राफ नोड से _असफल सबग्राफ को फोर्क करने जा रहे हैं_ जो सबग्राफ को ब्लॉक _X_ तक अनुक्रमित होने की गारंटी देता है ताकि ब्लॉक _X_ पर डिबग किए जा रहे स्थानीय रूप से तैनात सबग्राफ को इंडेक्सिंग स्थिति का एक अप-टू-डेट दृश्य प्रदान हो सकें। From 3d3c8a306186a6ed7a9b34ee3fa3c1b2999727eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:38 -0400 Subject: [PATCH 692/924] New translations deploying-a-subgraph-to-hosted.mdx (French) --- website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx index 2a9f63ada4c2..e4e1379c8942 100644 --- a/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx @@ -186,8 +186,8 @@ et ```json { - "réseau": "goerli", - "adresse": "0xabc..." + "réseau": "goerli", + "adresse": "0xabc..." } ``` From 2568e5202219f0d93fc3c9593ba034e438d40411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:38 -0400 Subject: [PATCH 693/924] New translations deploying-a-subgraph-to-hosted.mdx (Spanish) --- website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx index 70c75d3049ef..4c769e143bdb 100644 --- a/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx @@ -157,7 +157,7 @@ dataSources: kind: ethereum/events ``` -Ahora está listo para `yarn deploy`. +Ahora está listo para ` yarn deploy `. **Nota:** como se mencionó anteriormente, desde `graph-cli 0.32.0` puedes ejecutar directamente `yarn deploy` con la opción`--network`: From 66d39eb1efcdfaa9a400b85be2fdfe740d964f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:40 -0400 Subject: [PATCH 694/924] New translations deploying-a-subgraph-to-hosted.mdx (Italian) --- website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx index 91d5b46913fe..af34304a72ee 100644 --- a/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx @@ -135,7 +135,7 @@ Questo è l'aspetto del file di configurazione delle reti: Ora possiamo eseguire uno dei seguenti comandi: ```sh -# Utilizzo di un file predefinito networks.json +# Utilizzo di un file predefinito networks.json yarn build --network goerli # Utilizzo di un file con nome personalizzato @@ -162,7 +162,7 @@ Ora si è pronti per `yarn deploy`. **Nota:** Come già menzionato, da `graph-cli 0.32.0` è possibile eseguire direttamente `yarn deploy` con l'opzione `--network`: ```sh -# Utilizzo di un file predefinito networks.json +# Utilizzo di un file predefinito networks.json yarn deploy --network goerli # Utilizzo di un file con nome personalizzato From ebeed29e6238d2251aa59c92f73569b6ccc6bdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:43 -0400 Subject: [PATCH 695/924] New translations deploying-a-subgraph-to-hosted.mdx (Swedish) --- website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx index 07d5bc4775ec..9e47b0462385 100644 --- a/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx @@ -42,7 +42,7 @@ Du distribuerar subgrafen genom att köra `yarn deploy` Efter att ha distribuerat subgrafen kommer Graph Explorer att växla till att visa synkroniseringsstatusen för din subgraf. Beroende på mängden data och antalet händelser som måste extraheras från historiska block, från och med genesisblocket, kan synkronisering ta från några minuter till flera timmar. -Undergrafens status växlar till `Synced` när Graph Node har extraherat alla data från historiska block. Graph Node fortsätter att inspektera block för din undergraf när dessa block minas. +Undergrafens status växlar till ` Synced ` när Graph Node har extraherat alla data från historiska block. Graph Node fortsätter att inspektera block för din undergraf när dessa block minas. ## Omdistribuera en subgraf @@ -270,7 +270,7 @@ Graf Nod visar en graphql-slutpunkt som du kan fråga för att kontrollera statu } ``` -Detta kommer att ge dig `chainHeadBlock` som du kan jämföra med `latestBlock` på din subgraf för att kontrollera om den körs efter. `synced` informerar om subgrafen någonsin har kommit ikapp kedjan. `health` kan för närvarande ta värdena `healthy` om inga fel inträffade, eller `failed` om det fanns ett fel som stoppade subgrafens framsteg. I det här fallet kan du kontrollera fältet `fatalError` för detaljer om detta fel. +Detta kommer att ge dig `chainHeadBlock` som du kan jämföra med `latestBlock` på din subgraf för att kontrollera om den körs efter. ` synced ` informerar om subgrafen någonsin har kommit ikapp kedjan. `health` kan för närvarande ta värdena `healthy` om inga fel inträffade, eller `failed` om det fanns ett fel som stoppade subgrafens framsteg. I det här fallet kan du kontrollera fältet `fatalError` för detaljer om detta fel. ## Policy för arkivering av undergrafer för värdtjänster From 8b6aca164df19108a8e0c7784eb3ba8463c71f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:44 -0400 Subject: [PATCH 696/924] New translations deploying-a-subgraph-to-hosted.mdx (Chinese Simplified) --- website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx index ba8ae0f97b38..48a779ee5571 100644 --- a/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: 将子图部署到托管服务上 ## 创建托管服务账户 -在使用托管服务之前,在我们的托管服务中创建一个账户。您将需要一个 [Github 账户](https://github.com/); 如果您没有账户,则需要首先创建该账户。然后,导航到 [托管服务](https://thegraph.com/hosted-service/),单击*“ 注册Github”*按钮,完成 Github 的授权流程。 +在使用托管服务之前,在我们的托管服务中创建一个账户。您将需要一个 [Github 账户](https://github.com/); 如果您没有账户,则需要首先创建该账户。然后,导航到 [托管服务](https://thegraph.com/hosted-service/),单击_“ 注册Github”_按钮,完成 Github 的授权流程。 ## 存储访问令牌 @@ -42,7 +42,7 @@ title: 将子图部署到托管服务上 部署子图后,Graph浏览器将切换到显示子图的同步状态。根据需要从历史区块中提取的数据量和事件数量,从genesis区块开始,同步可能需要几分钟到几个小时。 -一旦Graph节点从历史区块中提取了所有数据,子图状态就会切换到`Synced`。在挖掘这些区块时,Graph节点将继续检查子图的区块。 +一旦Graph节点从历史区块中提取了所有数据,子图状态就会切换到` Synced `。在挖掘这些区块时,Graph节点将继续检查子图的区块。 ## 重新部署子图 From 016c2bf74d31861a90806fa6754564b2f92d9126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:45 -0400 Subject: [PATCH 697/924] New translations deploying-a-subgraph-to-hosted.mdx (Urdu (Pakistan)) --- .../ur/deploying/deploying-a-subgraph-to-hosted.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx index e4b3f587760d..0e84d4713cbd 100644 --- a/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا ## ہوسٹڈ سروس اکاؤنٹ بنائیں -ہوسٹڈ سروس استعمال کرنے سے پہلے، ہماری ہوسٹڈ سروس میں ایک اکاؤنٹ بنائیں۔ اس کے لیے آپ کو ایک [گٹ ہب](https://github.com/) اکاؤنٹ کی ضرورت ہوگی۔ اگر آپ کے پاس نہیں ہے تو آپ کو پہلے اسے بنانے کی ضرورت ہے۔ پھر، [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) پر جائیں، *'گٹ ہب کے ساتھ سائن اپ کریں' پر کلک کریں۔ *بٹن، اور گٹ ہب کی اجازت کے بہاؤ کو مکمل کریں. +ہوسٹڈ سروس استعمال کرنے سے پہلے، ہماری ہوسٹڈ سروس میں ایک اکاؤنٹ بنائیں۔ اس کے لیے آپ کو ایک [گٹ ہب](https://github.com/) اکاؤنٹ کی ضرورت ہوگی۔ اگر آپ کے پاس نہیں ہے تو آپ کو پہلے اسے بنانے کی ضرورت ہے۔ پھر، [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) پر جائیں، _'گٹ ہب کے ساتھ سائن اپ کریں' پر کلک کریں۔ _بٹن، اور گٹ ہب کی اجازت کے بہاؤ کو مکمل کریں. ## ایکسیس ٹوکن سٹور کریں @@ -20,7 +20,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا **تصویر** - سب گراف کے لیے پیش نظارہ تصویر اور تھمب نیل کے طور پر استعمال کرنے کے لیے ایک تصویر منتخب کریں. -**سب گراف کا نام** - اکاؤنٹ کے نام کے ساتھ جس کے تحت سب گراف بنایا گیا ہے، یہ `account-name/subgraph-name`-سٹائل نام کی بھی وضاحت کرے گا جو تعیناتیوں اور گراف کیو ایل اینڈ پوائنٹس کے لیے استعمال ہوتا ہے۔ _اس فیلڈ کو بعد میں تبدیل نہیں کیا جاسکتا۔_ +**سب گراف کا نام** - اکاؤنٹ کے نام کے ساتھ جس کے تحت سب گراف بنایا گیا ہے، یہ `account-name/subgraph-name`-سٹائل نام کی بھی وضاحت کرے گا جو تعیناتیوں اور گراف کیو ایل اینڈ پوائنٹس کے لیے استعمال ہوتا ہے۔ _اس فیلڈ کو بعد میں تبدیل نہیں کیا جاسکتا۔_ **اکاونٹ** - وہ اکاؤنٹ جس کے تحت سب گراف بنایا گیا ہے۔ یہ کسی فرد یا تنظیم کا اکاؤنٹ ہو سکتا ہے۔ _سب گرافس کو بعد میں اکاؤنٹس کے درمیان منتقل نہیں کیا جا سکتا۔_ @@ -48,7 +48,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا اپنے سب گراف کی تعریف میں تبدیلی کرتے وقت، مثال کے طور پر، ہستی میپنگ میں کسی مسئلے کو حل کرنے کے لیے، اپنے سب گراف کے اپ ڈیٹ شدہ ورژن کو تعینات کرنے کے لیے اوپر `yarn deploy` کمانڈ دوبارہ چلائیں۔ سب گراف کی کسی بھی اپڈیٹ کے لیے ضروری ہے کہ گراف نوڈ آپ کے پورے سب گراف کو دوبارہ ترتیب دے، دوبارہ جینیسس بلاک سے شروع ہو. -اگر آپ کا پہلے سے تعینات کردہ سب گراف اب بھی حالت میں ہے `Syncing`، تو اسے فوری طور پر نئے تعینات کردہ ورژن سے بدل دیا جائے گا۔ اگر پہلے سے تعینات کیا گیا سب گراف پہلے سے ہی مکمل طور پر مطابقت پذیر ہے، تو گراف نوڈ نئے تعینات شدہ ورژن کو `Pending Version` کے بطور نشان زد کرے گا، اسے بیک گراؤنڈ میں ہم آہنگ کرے گا، اور ایک بار مطابقت پذیر ہونے کے بعد صرف موجودہ تعینات کردہ ورژن کو نئے سے بدل دے گا۔ نیا ورژن ختم ہو گیا ہے. یہ یقینی بناتا ہے کہ نیا ورژن مطابقت پذیر ہونے کے دوران آپ کے پاس کام کرنے کے لیے ایک سب گراف موجود ہے. +اگر آپ کا پہلے سے تعینات کردہ سب گراف اب بھی حالت میں ہے ` Syncing `، تو اسے فوری طور پر نئے تعینات کردہ ورژن سے بدل دیا جائے گا۔ اگر پہلے سے تعینات کیا گیا سب گراف پہلے سے ہی مکمل طور پر مطابقت پذیر ہے، تو گراف نوڈ نئے تعینات شدہ ورژن کو ` Pending Version ` کے بطور نشان زد کرے گا، اسے بیک گراؤنڈ میں ہم آہنگ کرے گا، اور ایک بار مطابقت پذیر ہونے کے بعد صرف موجودہ تعینات کردہ ورژن کو نئے سے بدل دے گا۔ نیا ورژن ختم ہو گیا ہے. یہ یقینی بناتا ہے کہ نیا ورژن مطابقت پذیر ہونے کے دوران آپ کے پاس کام کرنے کے لیے ایک سب گراف موجود ہے. ## سب گراف کو متعدد نیٹ ورکس پر تعینات کرنا @@ -98,7 +98,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا } ``` -**نوٹ:** آپ کو تشکیل فائل میں کسی بھی `templates` (اگر آپ کے پاس کوئی ہے) کی وضاحت کرنے کی ضرورت نہیں ہے، صرف `dataSources`۔ اگر `subgraph.yaml` فائل میں کوئی بھی `templates` کا اعلان کیا گیا ہے، تو ان کا نیٹ ورک خود بخود `--network` اختیار کے ساتھ مخصوص کردہ سے اپ ڈیٹ ہوجائے گا. +**نوٹ:** آپ کو تشکیل فائل میں کسی بھی `templates` (اگر آپ کے پاس کوئی ہے) کی وضاحت کرنے کی ضرورت نہیں ہے، صرف ` dataSources `۔ اگر `subgraph.yaml` فائل میں کوئی بھی `templates` کا اعلان کیا گیا ہے، تو ان کا نیٹ ورک خود بخود `--network` اختیار کے ساتھ مخصوص کردہ سے اپ ڈیٹ ہوجائے گا. اب، فرض کریں کہ آپ اپنے سب گراف کو `mainnet` اور `goerli` نیٹ ورکس پر تعینات کرنے کے قابل ہونا چاہتے ہیں، اور یہ آپ کا `subgraph.yaml` ہے: @@ -208,7 +208,7 @@ dataSources: kind: ethereum/events ``` -کسی بھی نیٹ ورک پر مینی فیسٹ بنانے کے لیے، آپ `package.json` میں دو اضافی کمانڈز شامل کر سکتے ہیں اور ساتھ ہی `mustache` پر انحصار: +کسی بھی نیٹ ورک پر مینی فیسٹ بنانے کے لیے، آپ `package.json` میں دو اضافی کمانڈز شامل کر سکتے ہیں اور ساتھ ہی ` mustache ` پر انحصار: ```json { From a73c6e3654f89e6212a657b7f9f8f428912a74db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:46 -0400 Subject: [PATCH 698/924] New translations deploying-a-subgraph-to-hosted.mdx (Marathi) --- website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx index ef5d4a07489c..3f0b45cc25a7 100644 --- a/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: होस्ट केलेल्या सेवेसाठी सब ## होस्ट केलेले सेवा खाते तयार करा -होस्ट केलेली सेवा वापरण्यापूर्वी, आमच्या होस्ट केलेल्या सेवेमध्ये खाते तयार करा. त्यासाठी तुम्हाला [Github](https://github.com/) खात्याची आवश्यकता असेल; जर तुमच्याकडे नसेल, तर तुम्हाला ते प्रथम तयार करावे लागेल. त्यानंतर, [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर नेव्हिगेट करा, *'Github सह साइन अप करा' वर क्लिक करा *बटण, आणि Github चा अधिकृतता प्रवाह पूर्ण करा. +होस्ट केलेली सेवा वापरण्यापूर्वी, आमच्या होस्ट केलेल्या सेवेमध्ये खाते तयार करा. त्यासाठी तुम्हाला [Github](https://github.com/) खात्याची आवश्यकता असेल; जर तुमच्याकडे नसेल, तर तुम्हाला ते प्रथम तयार करावे लागेल. त्यानंतर, [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर नेव्हिगेट करा, _'Github सह साइन अप करा' वर क्लिक करा _बटण, आणि Github चा अधिकृतता प्रवाह पूर्ण करा. ## प्रवेश टोकन साठवा From 172df2175a0897a08c7ec9cd9de8332a6d9ac8b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:32:47 -0400 Subject: [PATCH 699/924] New translations deploying-a-subgraph-to-hosted.mdx (Hindi) --- .../pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx index 6d3eca9af3bf..c0066e9fdc84 100644 --- a/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx @@ -98,9 +98,9 @@ Options: } ``` -**ध्यान दें:** कॉन्फ़िग फ़ाइल में आपको कोई `टेम्प्लेट` (यदि आपके पास है) निर्दिष्ट करने की आवश्यकता नहीं है, केवल `डेटा सोर्स`। यदि `subgraph.yaml` फ़ाइल में कोई `टेम्प्लेट` घोषित है, तो उनका नेटवर्क स्वचालित रूप से `--network` विकल्प के साथ निर्दिष्ट एक में अपडेट हो जाएगा. +**ध्यान दें:** कॉन्फ़िग फ़ाइल में आपको कोई `टेम्प्लेट` (यदि आपके पास है) निर्दिष्ट करने की आवश्यकता नहीं है, केवल ` डेटा सोर्स `। यदि `subgraph.yaml` फ़ाइल में कोई `टेम्प्लेट` घोषित है, तो उनका नेटवर्क स्वचालित रूप से `--network` विकल्प के साथ निर्दिष्ट एक में अपडेट हो जाएगा. -अब, मान लें कि आप अपने सबग्राफ को `mainnet` और `goerli` नेटवर्क पर तैनात करना चाहते हैं, और यह आपका `subgraph.yaml` है: +अब, मान लें कि आप अपने सबग्राफ को ` mainnet ` और `goerli` नेटवर्क पर तैनात करना चाहते हैं, और यह आपका `subgraph.yaml` है: ```yaml # ... @@ -159,7 +159,7 @@ dataSources: अब आप `yarn deploy` करने के लिए तैयार हैं| -**ध्यान दें:** जैसा कि पहले उल्लेख किया गया है, `graph-cli 0.32.0` के बाद से आप सीधे `yarn deploy` चला सकते हैं `--नेटवर्क` विकल्प के साथ: +**ध्यान दें:** जैसा कि पहले उल्लेख किया गया है, `graph-cli 0.32.0` के बाद से आप सीधे `yarn deploy` चला सकते हैं ` --नेटवर्क ` विकल्प के साथ: ```sh # Using default networks.json file From 08b6456dcfc1b844f2c30cbe5f7caae3419956d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:20 -0400 Subject: [PATCH 700/924] New translations creating-a-subgraph.mdx (Romanian) --- .../ro/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/ro/developing/creating-a-subgraph.mdx b/website/pages/ro/developing/creating-a-subgraph.mdx index 39f58ac2083b..db9e8a024571 100644 --- a/website/pages/ro/developing/creating-a-subgraph.mdx +++ b/website/pages/ro/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From c041f71eb561dcc12d9c39cecf2631162122bd98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:21 -0400 Subject: [PATCH 701/924] New translations creating-a-subgraph.mdx (French) --- .../fr/developing/creating-a-subgraph.mdx | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/website/pages/fr/developing/creating-a-subgraph.mdx b/website/pages/fr/developing/creating-a-subgraph.mdx index f5a3f5c9891e..73db1fe19107 100644 --- a/website/pages/fr/developing/creating-a-subgraph.mdx +++ b/website/pages/fr/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Pour certains types d'entités, l'`id` est construit à partir des identifiants 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` | La spécification GraphQL définit `Int` pour avoir une taille de 32 octets. | -| `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 **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 @@ -716,7 +716,7 @@ dataSources: ``` > **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. @@ -906,12 +906,12 @@ Dans la fonction de gestionnaire, le reçu est accessible dans le champ `Event.r À 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) | `nonFatalErrors` | -| [Recherche en texte intégral](#defining-fulltext-search-fields) | `fullTextSearch` | -| [La greffe](#grafting-onto-existing-subgraphs) | `grafting` | -| [IPFS sur les contrats Ethereum](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` ou `nonDeterministicIpfs` | +| Fonctionnalité | Nom | +| --------------------------------------------------------------- | --------------------------------------------------- | +| [Erreurs non fatales](#non-fatal-errors) | `nonFatalErrors` | +| [Recherche en texte intégral](#defining-fulltext-search-fields) | `fullTextSearch` | +| [La greffe](#grafting-onto-existing-subgraphs) | `grafting` | +| [IPFS sur les contrats Ethereum](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` ou `nonDeterministicIpfs` | 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 : @@ -1166,7 +1166,7 @@ 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 { +export function handleTransfer(event : TransferEvent) : void { let token = Token.load(event.params.tokenId.toString()) if (!token) { token = new Token(event.params.tokenId.toString()) From b5d913235bb7807d4ae33e03df131b768baa7e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:21 -0400 Subject: [PATCH 702/924] New translations creating-a-subgraph.mdx (Spanish) --- .../es/developing/creating-a-subgraph.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/es/developing/creating-a-subgraph.mdx b/website/pages/es/developing/creating-a-subgraph.mdx index 5271e6ac9f14..6cf6502bd6e0 100644 --- a/website/pages/es/developing/creating-a-subgraph.mdx +++ b/website/pages/es/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Para algunos tipos de entidad, el `id` se construye a partir de los id de otras Admitimos los siguientes escalares en nuestra API GraphQL: -| Tipo | Descripción | -| --- | --- | -| `Bytes` | Byte array, representado como un string hexadecimal. Comúnmente utilizado para los hashes y direcciones de Ethereum. | -| `String` | Escalar para valores `string`. Los caracteres nulos no son compatibles y se eliminan automáticamente. | -| `Boolean` | Escalar para valores `boolean`. | -| `Int` | La especificación GraphQL define `Int` con un tamaño de 32 bytes. | -| `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` | Números enteros grandes. Se utiliza para los tipos `uint32`, `int64`, `uint64`, ..., `uint256` de Ethereum. Nota: Todo por debajo de `uint32`, como `int32`, `uint24` o `int8` se representa como `i32`. | -| `BigDecimal` | `BigDecimal` Decimales de alta precisión representados como un signo y un exponente. El rango de exponentes va de -6143 a +6144. Redondeado a 34 dígitos significativos. | +| Tipo | Descripción | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, representado como un string hexadecimal. Comúnmente utilizado para los hashes y direcciones de Ethereum. | +| `String` | Escalar para valores `string`. Los caracteres nulos no son compatibles y se eliminan automáticamente. | +| `Boolean` | Escalar para valores `boolean`. | +| `Int` | La especificación GraphQL define `Int` con un tamaño de 32 bytes. | +| `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` | Números enteros grandes. Se utiliza para los tipos `uint32`, `int64`, `uint64`, ..., `uint256` de Ethereum. Nota: Todo por debajo de `uint32`, como `int32`, `uint24` o `int8` se representa como `i32`. | +| `BigDecimal` | `BigDecimal` Decimales de alta precisión representados como un signo y un exponente. El rango de exponentes va de -6143 a +6144. Redondeado a 34 dígitos significativos. | #### Enums @@ -481,10 +481,10 @@ Diccionarios de idiomas admitidos: Algoritmos admitidos para ordenar los resultados: -| Algoritmos | Descripción | -| --- | --- | -| rango | Usa la calidad de coincidencia (0-1) de la consulta de texto completo para ordenar los resultados. | -| rango de proximidad | Similar al rango, pero también incluye la proximidad de los matches. | +| Algoritmos | Descripción | +| ------------------- | -------------------------------------------------------------------------------------------------- | +| rango | Usa la calidad de coincidencia (0-1) de la consulta de texto completo para ordenar los resultados. | +| rango de proximidad | Similar al rango, pero también incluye la proximidad de los matches. | ## Escribir Mappings @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Un nuevo origen de datos sólo procesará las llamadas y los eventos del bloque en el que fue creado y todos los bloques siguientes, pero no procesará los datos históricos, es decir, los datos que están contenidos en bloques anteriores. -> +> > Si los bloques anteriores contienen datos relevantes para la nueva fuente de datos, lo mejor es indexar esos datos leyendo el estado actual del contrato y creando entidades que representen ese estado en el momento de crear la nueva fuente de datos. ### Contexto de la fuente de datos @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** El bloque de creación del contrato se puede buscar rápidamente en Etherscan: -> +> > 1. Busca el contrato introduciendo su dirección en la barra de búsqueda. > 2. Haz clic en el hash de la transacción de creación en la sección `Contract Creator`. > 3. Carga la página de detalles de la transacción, donde encontrarás el bloque inicial de ese contrato. From e8feeaf4eda5a2f3ce0b8daf9ef3180d857fbf29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:22 -0400 Subject: [PATCH 703/924] New translations creating-a-subgraph.mdx (Arabic) --- .../ar/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/ar/developing/creating-a-subgraph.mdx b/website/pages/ar/developing/creating-a-subgraph.mdx index 96986ffd3407..b74a65ae3e64 100644 --- a/website/pages/ar/developing/creating-a-subgraph.mdx +++ b/website/pages/ar/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| النوع | الوصف | -| --- | --- | -| `Bytes` | مصفوفة Byte ، ممثلة كسلسلة سداسية عشرية. يشيع استخدامها في Ethereum hashes وعناوينه. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| النوع | الوصف | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | مصفوفة Byte ، ممثلة كسلسلة سداسية عشرية. يشيع استخدامها في Ethereum hashes وعناوينه. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **ملاحظة:** مصدر البيانات الجديد سيعالج فقط الاستدعاءات والأحداث للكتلة التي تم إنشاؤها فيه وجميع الكتل التالية ، ولكنه لن يعالج البيانات التاريخية ، أي البيانات الموجودة في الكتل السابقة. -> +> > إذا كانت الكتل السابقة تحتوي على بيانات ذات صلة بمصدر البيانات الجديد ، فمن الأفضل فهرسة تلك البيانات من خلال قراءة الحالة الحالية للعقد وإنشاء كيانات تمثل تلك الحالة في وقت إنشاء مصدر البيانات الجديد. ### سياق مصدر البيانات @@ -716,7 +716,7 @@ dataSources: ``` > **ملاحظة:** يمكن البحث عن كتلة إنشاء العقد بسرعة على Etherscan: -> +> > 1. ابحث عن العقد بإدخال عنوانه في شريط البحث. > 2. انقر فوق hash إجراء الإنشاء في قسم `Contract Creator`. > 3. قم بتحميل صفحة تفاصيل الإجراء(transaction) حيث ستجد كتلة البدء لذلك العقد. From 04d3fa1cb93b57c121f8c0e7ef1f03a160d272cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:23 -0400 Subject: [PATCH 704/924] New translations creating-a-subgraph.mdx (Czech) --- .../cs/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/cs/developing/creating-a-subgraph.mdx b/website/pages/cs/developing/creating-a-subgraph.mdx index b5759149e88b..dd60bb2cc10d 100644 --- a/website/pages/cs/developing/creating-a-subgraph.mdx +++ b/website/pages/cs/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ U některých typů entit je `id` vytvořeno z id dvou jiných entit; to je mož V našem GraphQL API podporujeme následující skaláry: -| Typ | Popis | -| --- | --- | -| `Bajtů` | Pole bajtů reprezentované jako hexadecimální řetězec. Běžně se používá pro hashe a adresy Ethereum. | -| `Řetězec` | Skalár pro hodnoty `řetězce`. Nulové znaky nejsou podporovány a jsou automaticky odstraněny. | -| `Boolean` | Skalár pro hodnoty `boolean`. | -| `Int` | Specifikace GraphQL definuje `Int` na velikost 32 bajtů. | -| `Int8` | Celé číslo se znaménkem o velikosti 8 bajtů, známé také jako 64bitové celé číslo se znaménkem, může uchovávat hodnoty v rozsahu od -9 223 372 036 854 775 808 do 9 223 372 036 854 775 807. Přednostně se používá k reprezentaci `i64` z ethereum. | -| `BigInt` | Velká celá čísla. Používá se pro typy `uint32`, `int64`, `uint64`, ..., `uint256` společnosti Ethereum. Poznámka: Vše pod `uint32`, jako například `int32`, `uint24` nebo `int8`, je reprezentováno jako `i32`. | -| `BigDecimal` | `BigDecimal` Desetinná čísla s vysokou přesností reprezentovaná jako signifikand a exponent. Rozsah exponentu je od -6143 do +6144. Zaokrouhleno na 34 významných číslic. | +| Typ | Popis | +| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bajtů` | Pole bajtů reprezentované jako hexadecimální řetězec. Běžně se používá pro hashe a adresy Ethereum. | +| `Řetězec` | Skalár pro hodnoty `řetězce`. Nulové znaky nejsou podporovány a jsou automaticky odstraněny. | +| `Boolean` | Skalár pro hodnoty `boolean`. | +| `Int` | Specifikace GraphQL definuje `Int` na velikost 32 bajtů. | +| `Int8` | Celé číslo se znaménkem o velikosti 8 bajtů, známé také jako 64bitové celé číslo se znaménkem, může uchovávat hodnoty v rozsahu od -9 223 372 036 854 775 808 do 9 223 372 036 854 775 807. Přednostně se používá k reprezentaci `i64` z ethereum. | +| `BigInt` | Velká celá čísla. Používá se pro typy `uint32`, `int64`, `uint64`, ..., `uint256` společnosti Ethereum. Poznámka: Vše pod `uint32`, jako například `int32`, `uint24` nebo `int8`, je reprezentováno jako `i32`. | +| `BigDecimal` | `BigDecimal` Desetinná čísla s vysokou přesností reprezentovaná jako signifikand a exponent. Rozsah exponentu je od -6143 do +6144. Zaokrouhleno na 34 významných číslic. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Poznámka:** Nový zdroj dat bude zpracovávat pouze volání a události pro blok, ve kterém byl vytvořen, a všechny následující bloky, ale nebude zpracovávat historická data, tj. data obsažená v předchozích blocích. -> +> > Pokud předchozí bloky obsahují data relevantní pro nový zdroj dat, je nejlepší tato data indexovat načtením aktuálního stavu smlouvy a vytvořením entit reprezentujících tento stav v době vytvoření nového zdroje dat. ### Kontext zdroje dat @@ -716,7 +716,7 @@ dataSources: ``` > **Poznámka:** Blok pro vytvoření smlouvy lze rychle vyhledat v Etherscan: -> +> > 1. Vyhledejte smlouvu zadáním její adresy do vyhledávacího řádku. > 2. Klikněte na hash transakce vytvoření v sekci `Tvůrce smlouvy`. > 3. Načtěte stránku s podrobnostmi o transakci, kde najdete počáteční blok pro danou smlouvu. From 7779685068d35903196b8e7abf7e6982d07689a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:24 -0400 Subject: [PATCH 705/924] New translations creating-a-subgraph.mdx (German) --- .../de/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/de/developing/creating-a-subgraph.mdx b/website/pages/de/developing/creating-a-subgraph.mdx index 721920020b13..8945579b5b92 100644 --- a/website/pages/de/developing/creating-a-subgraph.mdx +++ b/website/pages/de/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From b4f1dc791ba92b4d46139d795479ffcfe40141b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:24 -0400 Subject: [PATCH 706/924] New translations creating-a-subgraph.mdx (Italian) --- .../it/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/it/developing/creating-a-subgraph.mdx b/website/pages/it/developing/creating-a-subgraph.mdx index f9e351698857..fb645f168931 100644 --- a/website/pages/it/developing/creating-a-subgraph.mdx +++ b/website/pages/it/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Per alcuni tipi di entità, l'`id` è costruito a partire dagli id di altre due Nella nostra API GraphQL supportiamo i seguenti scalari: -| Tipo | Descrizione | -| --- | --- | -| `Bytes` | Byte array, rappresentato come una stringa esadecimale. Comunemente utilizzato per gli hash e gli indirizzi di Ethereum. | -| `String` | Scalare per valori `string`. I caratteri nulli non sono supportati e vengono rimossi automaticamente. | -| `Boolean` | Scalare per valori `boolean`. | -| `Int` | Le specifiche di GraphQL definiscono che `Int` ha una dimensione di 32 byte. | -| `Int8` | Un intero firmato a 8 byte, noto anche come intero firmato a 64 bit, può memorizzare valori nell'intervallo da -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. È preferibile utilizzare questo per rappresentare `i64` da ethereum. | -| `BigInt` | Numeri interi grandi. Utilizzati per i tipi `uint32`, `int64`, `uint64`, ..., `uint256` di Ethereum. Nota: Tutto ciò che è inferiore a `uint32` come `int32`, `uint24` oppure `int8` è rappresentato come `i32`. | -| `BigDecimal` | `BigDecimal` Decimali ad alta precisione rappresentati come un significante e un esponente. L'intervallo degli esponenti va da -6143 a +6144. Arrotondato a 34 cifre significative. | +| Tipo | Descrizione | +| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, rappresentato come una stringa esadecimale. Comunemente utilizzato per gli hash e gli indirizzi di Ethereum. | +| `String` | Scalare per valori `string`. I caratteri nulli non sono supportati e vengono rimossi automaticamente. | +| `Boolean` | Scalare per valori `boolean`. | +| `Int` | Le specifiche di GraphQL definiscono che `Int` ha una dimensione di 32 byte. | +| `Int8` | Un intero firmato a 8 byte, noto anche come intero firmato a 64 bit, può memorizzare valori nell'intervallo da -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. È preferibile utilizzare questo per rappresentare `i64` da ethereum. | +| `BigInt` | Numeri interi grandi. Utilizzati per i tipi `uint32`, `int64`, `uint64`, ..., `uint256` di Ethereum. Nota: Tutto ciò che è inferiore a `uint32` come `int32`, `uint24` oppure `int8` è rappresentato come `i32`. | +| `BigDecimal` | `BigDecimal` Decimali ad alta precisione rappresentati come un significante e un esponente. L'intervallo degli esponenti va da -6143 a +6144. Arrotondato a 34 cifre significative. | #### Enum @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Una nuova data source elaborerà solo le chiamate e gli eventi del blocco in cui è stata creata e di tutti i blocchi successivi, ma non elaborerà i dati storici, cioè quelli contenuti nei blocchi precedenti. -> +> > Se i blocchi precedenti contengono dati rilevanti per la nuova data source, è meglio indicizzare tali dati leggendo lo stato attuale del contratto e creando entità che rappresentino tale stato al momento della creazione della nuova data source. ### Contesto del Data Source @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** Il blocco di creazione del contratto può essere rapidamente consultato su Etherscan: -> +> > 1. Cercare il contratto inserendo l'indirizzo nella barra di ricerca. > 2. Fare clic sull'hash della transazione di creazione nella sezione `Contract Creator`. > 3. Caricare la pagina dei dettagli della transazione, dove si trova il blocco iniziale per quel contratto. From 345301aa84bd8ee857eff003ccb0ece035de29f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:25 -0400 Subject: [PATCH 707/924] New translations creating-a-subgraph.mdx (Japanese) --- .../ja/developing/creating-a-subgraph.mdx | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/website/pages/ja/developing/creating-a-subgraph.mdx b/website/pages/ja/developing/creating-a-subgraph.mdx index e21a11c9829c..60c6a37bde89 100644 --- a/website/pages/ja/developing/creating-a-subgraph.mdx +++ b/website/pages/ja/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Null 以外のフィールド 'name' の null 値が解決されました GraphQL API では、以下の Scalar をサポートしています: -| タイプ | 説明書き | -| --- | --- | -| `Bytes` | Byte 配列で、16 進数の文字列で表されます。Ethereum のハッシュやアドレスによく使われます。 | -| `String` | `string`値の Scalar であり、Null 文字はサポートされておらず、自動的に削除されます。 | -| `Boolean` | `boolean`値を表す Scalar。 | -| `Int` | Int GraphQL の仕様では、`Int`のサイズは 32 バイトと定義されています。 | -| `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` | 大きな整数。Ethereum の`uint32`, `int64`, `uint64`, ..., `uint256` タイプに使用されます。注: `int32`, `uint24` `int8`など`uint32`以下のものは`i32`として表現されます。 | -| `BigDecimal` | `BigDecimal`は、高精度の 10 進数を記号と指数で表します。指数の範囲は -6143 ~ +6144 です。有効数字 34 桁にまとめられます。 | +| タイプ | 説明書き | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte 配列で、16 進数の文字列で表されます。Ethereum のハッシュやアドレスによく使われます。 | +| `String` | `string`値の Scalar であり、Null 文字はサポートされておらず、自動的に削除されます。 | +| `Boolean` | `boolean`値を表す Scalar。 | +| `Int` | Int GraphQL の仕様では、`Int`のサイズは 32 バイトと定義されています。 | +| `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` | 大きな整数。Ethereum の`uint32`, `int64`, `uint64`, ..., `uint256` タイプに使用されます。注: `int32`, `uint24` `int8`など`uint32`以下のものは`i32`として表現されます。 | +| `BigDecimal` | `BigDecimal`は、高精度の 10 進数を記号と指数で表します。指数の範囲は -6143 ~ +6144 です。有効数字 34 桁にまとめられます。 | #### Enums @@ -458,33 +458,33 @@ query { サポートされている言語の辞書: -| コード | 辞書 | -| ------ | ------------ | -| simple | General | -| da | Danish | -| nl | Dutch | -| en | English | -| fi | Finnish | -| fr | French | -| de | German | -| hu | Hungarian | -| it | Italian | -| no | Norwegian | -| pt | ポルトガル語 | -| ro | Romanian | -| ru | Russian | -| es | Spanish | -| sv | Swedish | -| tr | Turkish | +| コード | 辞書 | +| ------ | --------- | +| simple | General | +| da | Danish | +| nl | Dutch | +| en | English | +| fi | Finnish | +| fr | French | +| de | German | +| hu | Hungarian | +| it | Italian | +| no | Norwegian | +| pt | ポルトガル語 | +| ro | Romanian | +| ru | Russian | +| es | Spanish | +| sv | Swedish | +| tr | Turkish | ### ランキングアルゴリズム サポートされている結果の順序付けのアルゴリズム: -| アルゴリズム | 説明書き | -| ------------- | ------------------------------------------------------------------- | -| rank | フルテキストクエリのマッチ品質 (0-1) を使用して結果を並べ替えます。 | -| proximityRank | ProximityRank rank に似ていますが、マッチの近接性も含みます。 | +| アルゴリズム | 説明書き | +| ------------- | ---------------------------------------- | +| rank | フルテキストクエリのマッチ品質 (0-1) を使用して結果を並べ替えます。 | +| proximityRank | ProximityRank rank に似ていますが、マッチの近接性も含みます。 | ## マッピングの記述 @@ -580,7 +580,7 @@ import { Gravatar } from '../generated/schema' EVM 互換のスマート コントラクトの一般的なパターンは、レジストリ コントラクトまたはファクトリ コントラクトの使用です。1 つのコントラクトが、それぞれ独自の状態とイベントを持つ任意の数の他のコントラクトを作成、管理、または参照します。 -これらのサブコントラクトのアドレスは、事前にわかっている場合とわかっていない場合があり、これらのコントラクトの多くは、時間の経過とともに作成および/または追加される可能性があります。このような場合、単一のデータ ソースまたは固定数のデータ ソースを定義することは不可能であり、より動的なアプローチ、つまり *データ ソース テンプレート*が必要とされるのはこのためです。 +これらのサブコントラクトのアドレスは、事前にわかっている場合とわかっていない場合があり、これらのコントラクトの多くは、時間の経過とともに作成および/または追加される可能性があります。このような場合、単一のデータ ソースまたは固定数のデータ ソースを定義することは不可能であり、より動的なアプローチ、つまり _データ ソース テンプレート_が必要とされるのはこのためです。 ### メインコントラクトのデータソース @@ -660,7 +660,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **注:** 新しいデータ ソースは、それが作成されたブロックとそれに続くすべてのブロックの呼び出しとイベントのみを処理しますが、履歴データ (データなど) は処理しません。それは前のブロックに含まれています。 -> +> > 以前のブロックに新しいデータソースに関連するデータが含まれている場合は、コントラクトの現在の状態を読み取り、新しいデータソースが作成された時点でその状態を表すエンティティを作成することで、そのデータにインデックスを付けることが最善です。 ### データソースコンテクスト @@ -717,7 +717,7 @@ dataSources: ``` > **注:** コントラクト作成ブロックは、Etherscan ですばやく検索できます。 -> +> > 1. 検索バーにアドレスを入力してコントラクトを検索します。 > 2. `Contract Creator` セクションの作成トランザクションハッシュをクリックします。 > 3. トランザクションの詳細ページを読み込んで、そのコントラクトの開始ブロックを見つけます。 @@ -907,9 +907,9 @@ eventHandlers: `specVersion` `0.0.4`以降、サブグラフ機能はマニフェストファイルのトップレベルにある`features`セクションで、以下の表のように`camelCase` の名前を使って明示的に宣言する必要があります: -| 特徴 | 名前 | +| 特徴 | 名前 | | --------------------------------------------------------- | --------------------------------------------------- | -| [致命的でないエラー](#non-fatal-errors) | `nonFatalErrors` | +| [致命的でないエラー](#non-fatal-errors) | `nonFatalErrors` | | [Full-text Search](#defining-fulltext-search-fields) | `fullTextSearch` | | [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | | [IPFS on Ethereum Contracts](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | From c80adda4184b730cf6882213f25f8bf9427958c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:26 -0400 Subject: [PATCH 708/924] New translations creating-a-subgraph.mdx (Korean) --- .../ko/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/ko/developing/creating-a-subgraph.mdx b/website/pages/ko/developing/creating-a-subgraph.mdx index 39f58ac2083b..db9e8a024571 100644 --- a/website/pages/ko/developing/creating-a-subgraph.mdx +++ b/website/pages/ko/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From 6eafa519f92a2c11e112d1f5fd9c5996e14f3e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:27 -0400 Subject: [PATCH 709/924] New translations creating-a-subgraph.mdx (Dutch) --- .../nl/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/nl/developing/creating-a-subgraph.mdx b/website/pages/nl/developing/creating-a-subgraph.mdx index 39f58ac2083b..db9e8a024571 100644 --- a/website/pages/nl/developing/creating-a-subgraph.mdx +++ b/website/pages/nl/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From 31ae0a641a29e486540e5b1c503f3336e93fd816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:27 -0400 Subject: [PATCH 710/924] New translations creating-a-subgraph.mdx (Polish) --- .../pl/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/pl/developing/creating-a-subgraph.mdx b/website/pages/pl/developing/creating-a-subgraph.mdx index 39f58ac2083b..db9e8a024571 100644 --- a/website/pages/pl/developing/creating-a-subgraph.mdx +++ b/website/pages/pl/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From 32915ff512bb81964cc9bda91423f3a8d40aef74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:28 -0400 Subject: [PATCH 711/924] New translations creating-a-subgraph.mdx (Portuguese) --- .../pt/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/pt/developing/creating-a-subgraph.mdx b/website/pages/pt/developing/creating-a-subgraph.mdx index ba8846de21a1..8b8b9b90cb3b 100644 --- a/website/pages/pt/developing/creating-a-subgraph.mdx +++ b/website/pages/pt/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Para alguns tipos de entidade, o `id` é construído das id's de duas outras ent Nós apoiamos os seguintes escalares na nossa API do GraphQL: -| Tipo | Descrição | -| --- | --- | -| `Bytes` | Arranjo de bytes, representado como string hexadecimal. Usado frequentemente por hashes e endereços no Ethereum. | -| `String` | Escalar para valores `string`. Caracteres nulos são removidos automaticamente. | -| `Boolean` | Escalar para valores `boolean`. | -| `Int` | A especificação do GraphQL define que o `Int` tem um tamanho de 32 bytes. | -| `Int8` | Um número inteiro assinado em 8 bits, também conhecido como um número inteiro assinado em 64 bits, pode armazenar valores de -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. Prefira usar isto para representar o `i64` do ethereum. | -| `BigInt` | Números inteiros grandes. Usados para os tipos `uint32`, `int64`, `uint64`, ..., `uint256` do Ethereum. Nota: Tudo abaixo de `uint32`, como `int32`, `uint24` ou `int8` é representado como `i32`. | -| `BigDecimal` | `BigDecimal` Decimais de alta precisão representados como um significando e um exponente. O alcance de exponentes é de -6143 até +6144. Arredondado para 34 dígitos significantes. | +| Tipo | Descrição | +| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Arranjo de bytes, representado como string hexadecimal. Usado frequentemente por hashes e endereços no Ethereum. | +| `String` | Escalar para valores `string`. Caracteres nulos são removidos automaticamente. | +| `Boolean` | Escalar para valores `boolean`. | +| `Int` | A especificação do GraphQL define que o `Int` tem um tamanho de 32 bytes. | +| `Int8` | Um número inteiro assinado em 8 bits, também conhecido como um número inteiro assinado em 64 bits, pode armazenar valores de -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. Prefira usar isto para representar o `i64` do ethereum. | +| `BigInt` | Números inteiros grandes. Usados para os tipos `uint32`, `int64`, `uint64`, ..., `uint256` do Ethereum. Nota: Tudo abaixo de `uint32`, como `int32`, `uint24` ou `int8` é representado como `i32`. | +| `BigDecimal` | `BigDecimal` Decimais de alta precisão representados como um significando e um exponente. O alcance de exponentes é de -6143 até +6144. Arredondado para 34 dígitos significantes. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Uma nova fonte de dados só processará as chamadas e eventos para o bloco onde ele foi criado e todos os blocos a seguir. Porém, não serão processados dados históricos, por ex, contidos em blocos anteriores. -> +> > Se blocos anteriores conterem dados relevantes à nova fonte, é melhor indexá-los ao ler o estado atual do contrato e criar entidades que representem aquele estado na hora que a nova fonte de dados for criada. ### Contextos de Fontes de Dados @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** O bloco da criação do contrato pode ser buscado rapidamente no Etherscan: -> +> > 1. Procure pelo contrato ao inserir o seu endereço na barra de busca. > 2. Clique no hash da transação da criação na seção `Contract Creator`. > 3. Carregue a página dos detalhes da transação, onde encontrará o bloco inicial para aquele contrato. From be81e6cad78d23ef872e64a98183fadb1b1869b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:29 -0400 Subject: [PATCH 712/924] New translations creating-a-subgraph.mdx (Russian) --- .../ru/developing/creating-a-subgraph.mdx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/ru/developing/creating-a-subgraph.mdx b/website/pages/ru/developing/creating-a-subgraph.mdx index 6b0b51c8aa7e..5829d571fedb 100644 --- a/website/pages/ru/developing/creating-a-subgraph.mdx +++ b/website/pages/ru/developing/creating-a-subgraph.mdx @@ -82,7 +82,7 @@ graph add
    [] Параметр `--merge-entities` определяет, как разработчик хотел бы обрабатывать конфликты имен `entity` и `event`: -- Если `true`: новый `dataSource` должен использовать существующие ` eventHandlers` & `entities`. +- Если `true`: новый ` dataSource ` должен использовать существующие ` eventHandlers` & `entities`. - Если `false`: следует создать новую сущность и обработчик событий с помощью `${dataSourceName}{EventName}`. Контракт `address` будет записан в `networks.json` для соответствующей сети. @@ -146,7 +146,7 @@ dataSources: - `description`: понятное описание того, что представляет собой субграф. Это описание отображается в Graph Explorer при развертывании субграфа в хостинговом сервисе. -- `repository`: URL-адрес репозитория, в котором можно найти манифест субграфа. Это также отображается в The Graph Explorer. +- ` repository `: URL-адрес репозитория, в котором можно найти манифест субграфа. Это также отображается в The Graph Explorer. - `features`: список всех используемых имен [функций](#experimental-features). @@ -248,15 +248,15 @@ Null value resolved for non-null field 'name' Мы поддерживаем следующие скаляры в нашем GraphQL API: -| Тип | Описание | -| --- | --- | -| `Bytes` | Массив байтов, представленный в виде шестнадцатеричной строки. Обычно используется для хэшей и адресов Ethereum. | -| `String` | Скаляр для значений `string`. Нулевые символы не поддерживаются и автоматически удаляются. | -| `Boolean` | Скаляр для значений `boolean`. | -| `Int` | Спецификация GraphQL определяет `Int` как имеющий размер 32 байта. | -| `Int8` | 8-байтовое целое число со знаком, также называемое 64-битным целым числом со знаком, может хранить значения в диапазоне от -9 223 372 036 854 775 808 до 9 223 372 036 854 775 807. Предпочтительно использовать это для представления `i64` из Ethereum. | -| `BigInt` | Большие целые числа. Используются для типов Ethereum `uint32`, `int64`, `uint64`, ..., `uint256`. Примечание: Все, что находится ниже `uint32`, например, `int32`, `uint24` или `int8`, представлено как `i32`. | -| `BigDecimal` | `BigDecimal` Десятичные дроби высокой точности, представленные в виде значащего числа и экспоненты. Диапазон значений экспоненты от -6143 до +6144. Округляется до 34 значащих цифр. | +| Тип | Описание | +| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Массив байтов, представленный в виде шестнадцатеричной строки. Обычно используется для хэшей и адресов Ethereum. | +| `String` | Скаляр для значений `string`. Нулевые символы не поддерживаются и автоматически удаляются. | +| `Boolean` | Скаляр для значений `boolean`. | +| `Int` | Спецификация GraphQL определяет `Int` как имеющий размер 32 байта. | +| `Int8` | 8-байтовое целое число со знаком, также называемое 64-битным целым числом со знаком, может хранить значения в диапазоне от -9 223 372 036 854 775 808 до 9 223 372 036 854 775 807. Предпочтительно использовать это для представления `i64` из Ethereum. | +| `BigInt` | Большие целые числа. Используются для типов Ethereum `uint32`, `int64`, `uint64`, ..., `uint256`. Примечание: Все, что находится ниже `uint32`, например, `int32`, `uint24` или `int8`, представлено как `i32`. | +| `BigDecimal` | `BigDecimal` Десятичные дроби высокой точности, представленные в виде значащего числа и экспоненты. Диапазон значений экспоненты от -6143 до +6144. Округляется до 34 значащих цифр. | #### Перечисления @@ -450,7 +450,7 @@ query { } ``` -> **[Управление функциями](#experimental-features):** Начиная с `specVersion` `0.0.4` и далее, `fullTextSearch` должно быть объявлено в разделе `features` в манифесте субграфа. +> **[Управление функциями](#experimental-features):** Начиная с `specVersion` `0.0.4` и далее, ` fullTextSearch ` должно быть объявлено в разделе `features` в манифесте субграфа. ### Поддерживаемые языки @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Примечание:** Новый источник данных будет обрабатывать только вызовы и события для блока, в котором он был создан, и всех последующих блоков, но не будет обрабатывать исторические данные, т.е. данные, которые содержатся в предыдущих блоках. -> +> > Если предыдущие блоки содержат данные, относящиеся к новому источнику данных, лучше всего проиндексировать эти данные, считывая текущее состояние контракта и создавая сущности, представляющие это состояние на момент создания нового источника данных. ### Контекст источника данных @@ -716,7 +716,7 @@ dataSources: ``` > **Примечание:** Блок создания контракта можно быстро найти в Etherscan: -> +> > 1. Найдите контракт, введя его адрес в строке поиска. > 2. Нажмите на хэш транзакции создания в разделе `Contract Creator`. > 3. Загрузите страницу сведений о транзакции, где вы найдете начальный блок для этого контракта. @@ -756,7 +756,7 @@ dataSources: handler: handleCreateGravatar ``` -`function` - это нормализованная сигнатура функции, по которой можно фильтровать вызовы. Свойство `handler` - это имя функции в вашем мэппинге, которую вы хотели бы выполнить при вызове целевой функции в контракте источника данных. +` function ` - это нормализованная сигнатура функции, по которой можно фильтровать вызовы. Свойство `handler` - это имя функции в вашем мэппинге, которую вы хотели бы выполнить при вызове целевой функции в контракте источника данных. ### Функция мэппинга @@ -792,7 +792,7 @@ filter: _Определенный обработчик будет вызван один раз для каждого блока, содержащего обращение к контракту (источнику данных), в соответствии с которым определен обработчик._ -> **Примечание:** Фильтр `call` в настоящее время зависит от Parity tracing API. Некоторые сети, такие как BNB chain и Arbitrium, не поддерживают этот API. Если субграф, индексирующий одну из этих сетей, содержит один или несколько обработчиков блоков с фильтром `call`, синхронизация не начнется. +> **Примечание:** Фильтр ` call ` в настоящее время зависит от Parity tracing API. Некоторые сети, такие как BNB chain и Arbitrium, не поддерживают этот API. Если субграф, индексирующий одну из этих сетей, содержит один или несколько обработчиков блоков с фильтром `call`, синхронизация не начнется. Отсутствие фильтра для обработчика блоков гарантирует, что обработчик вызывается для каждого блока. Источник данных может содержать только один обработчик блоков для каждого типа фильтра. From d78021a6162634e230c53178b5ac05e5c37460f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:29 -0400 Subject: [PATCH 713/924] New translations creating-a-subgraph.mdx (Swedish) --- .../sv/developing/creating-a-subgraph.mdx | 137 +++++++++--------- 1 file changed, 71 insertions(+), 66 deletions(-) diff --git a/website/pages/sv/developing/creating-a-subgraph.mdx b/website/pages/sv/developing/creating-a-subgraph.mdx index c635a7b21aaa..d6bb42a330e7 100644 --- a/website/pages/sv/developing/creating-a-subgraph.mdx +++ b/website/pages/sv/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ För vissa entitetstyper konstrueras `id` från id:erna hos två andra entiteter Vi stödjer följande skalartyper i vår GraphQL API: -| Typ | Beskrivning | -| --- | --- | -| `Bytes` | Bytematris, representerad som en hexadecimal sträng. Vanligt används för Ethereum-hashar och adresser. | -| `String` | Skalär för `string`-värden. Nolltecken stöds inte och tas automatiskt bort. | -| `Boolean` | Skalär för `boolean`-värden. | -| `Int` | Enligt GraphQL specifikationen har `Int` en storlek på 32 byte. | -| `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` | Stora heltal. Används för Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` typer. Observera: Allt under `uint32`, som `int32`, `uint24` eller `int8` representeras som `i32`. | -| `BigDecimal` | `BigDecimal` Högprecisionsdecimaler representerade som en signifikant och en exponent. Exponentområdet är från −6143 till +6144. Avrundat till 34 signifikanta siffror. | +| Typ | Beskrivning | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Bytematris, representerad som en hexadecimal sträng. Vanligt används för Ethereum-hashar och adresser. | +| `String` | Skalär för `string`-värden. Nolltecken stöds inte och tas automatiskt bort. | +| `Boolean` | Skalär för `boolean`-värden. | +| `Int` | Enligt GraphQL specifikationen har `Int` en storlek på 32 byte. | +| `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` | Stora heltal. Används för Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` typer. Observera: Allt under `uint32`, som `int32`, `uint24` eller `int8` representeras som `i32`. | +| `BigDecimal` | `BigDecimal` Högprecisionsdecimaler representerade som en signifikant och en exponent. Exponentområdet är från −6143 till +6144. Avrundat till 34 signifikanta siffror. | #### Enums @@ -422,7 +422,12 @@ type _Schema_ name: "bandSearch" language: en algorithm: rank - include: [{ entity: "Band", fields: [{ name: "name" }, { name: "description" }, { name: "bio" }] }] + include: [ + { + entity: "Band" + fields: [{ name: "name" }, { name: "description" }, { name: "bio" }] + } + ] ) type Band @entity { @@ -562,13 +567,13 @@ import { // The events classes: NewGravatar, UpdatedGravatar, -} from '../generated/Gravity/Gravity' +} from "../generated/Gravity/Gravity"; ``` Utöver detta genereras en klass för varje entitetstyp i subgrafens GraphQL-schema. Dessa klasser tillhandahåller typsäker entitetsladdning, läs- och skrivåtkomst till entitetsfält samt en `save()`-metod för att skriva entiteter till lagret. Alla entitetsklasser skrivs till `/schema.ts`, vilket gör att mappningar kan importera dem med ```javascript -import { Gravatar } from '../generated/schema' +import { Gravatar } from "../generated/schema" ``` > **Observera:** Kodgenerering måste utföras igen efter varje ändring av GraphQL-schemat eller ABIn som ingår i manifestet. Det måste också utföras minst en gång innan du bygger eller distribuerar subgrafet. @@ -591,7 +596,7 @@ dataSources: name: Factory network: mainnet source: - address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' + address: "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95" abi: Factory mapping: kind: ethereum/events @@ -649,17 +654,17 @@ templates: I det sista steget uppdaterar du mappningen av huvudkontraktet för att skapa en dynamisk datakällinstans från en av mallarna. I det här exemplet ändrar du mappningen av huvudkontraktet för att importera mallen `Exchange` och anropar metoden `Exchange.create(address)` för att börja indexera det nya växlingskontraktet. ```typescript -import { Exchange } from '../generated/templates' +import { Exchange } from "../generated/templates"; export function handleNewExchange(event: NewExchange): void { // Start indexing the exchange; `event.params.exchange` is the // address of the new exchange contract - Exchange.create(event.params.exchange) + Exchange.create(event.params.exchange); } ``` > ** Notera:** En ny datakälla bearbetar endast anrop och händelser för det block där den skapades och alla efterföljande block, men bearbetar inte historiska data, dvs. data som finns i tidigare block. -> +> > Om tidigare block innehåller data som är relevanta för den nya datakällan, är det bäst att indexera dessa data genom att läsa kontraktets aktuella status och skapa enheter som representerar denna status vid den tidpunkt då den nya datakällan skapas. ### Kontext för datakälla @@ -667,22 +672,22 @@ export function handleNewExchange(event: NewExchange): void { Datakällans kontext gör det möjligt att skicka extra konfiguration när en mall instansieras. I vårt exempel kan vi säga att börser är associerade med ett visst handelspar, vilket ingår i händelsen `NewExchange`. Den informationen kan skickas till den instansierade datakällan, så här: ```typescript -import { Exchange } from '../generated/templates' +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) + let context = new DataSourceContext(); + context.setString("tradingPair", event.params.tradingPair); + Exchange.createWithContext(event.params.exchange, context); } ``` Inuti en mappning av mallen `Exchange` kan kontexten sedan nås: ```typescript -import { dataSource } from '@graphprotocol/graph-ts' +import { dataSource } from "@graphprotocol/graph-ts"; -let context = dataSource.context() -let tradingPair = context.getString('tradingPair') +let context = dataSource.context(); +let tradingPair = context.getString("tradingPair") ``` Det finns sättare och hämtare som `setString` och `getString` för alla värdestyper. @@ -697,7 +702,7 @@ dataSources: name: ExampleSource network: mainnet source: - address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' + address: "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95" abi: ExampleContract startBlock: 6627917 mapping: @@ -716,7 +721,7 @@ dataSources: ``` > **Observera:** Blocket där kontraktet skapades kan snabbt sökas upp på Etherscan: -> +> > 1. Sök efter kontraktet genom att ange dess adress i sökfältet. > 2. Klicka på transaktionshashen för skapandet i avsnittet `Kontraktsskapare`. > 3. Ladda sidan med transaktionsdetaljer där du hittar startblocket för det kontraktet. @@ -739,7 +744,7 @@ dataSources: name: Gravity network: mainnet source: - address: '0x731a10897d267e19b34503ad902d0a29173ba4b1' + address: "0x731a10897d267e19b34503ad902d0a29173ba4b1" abi: Gravity mapping: kind: ethereum/events @@ -763,15 +768,15 @@ dataSources: Varje anropsbehandlare tar en enda parameter med en typ som motsvarar namnet på den kallade funktionen. I det ovanstående exempelsubgrafet innehåller kartläggningen en hanterare för när funktionen `createGravatar` anropas och tar emot en `CreateGravatarCall`-parameter som ett argument: ```typescript -import { CreateGravatarCall } from '../generated/Gravity/Gravity' -import { Transaction } from '../generated/schema' +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() + let id = call.transaction.hash; + let transaction = new Transaction(id); + transaction.displayName = call.inputs._displayName; + transaction.imageUrl = call.inputs._imageUrl; + transaction.save(); } ``` @@ -802,7 +807,7 @@ dataSources: name: Gravity network: dev source: - address: '0x731a10897d267e19b34503ad902d0a29173ba4b1' + address: "0x731a10897d267e19b34503ad902d0a29173ba4b1" abi: Gravity mapping: kind: ethereum/events @@ -854,9 +859,9 @@ Den definierade hanteraren med filtret once kommer att anropas endast en gång i ```ts export function handleOnce(block: ethereum.Block): void { - let data = new InitialData(Bytes.fromUTF8('initial')) - data.data = 'Setup data here' - data.save() + let data = new InitialData(Bytes.fromUTF8("initial")); + data.data = "Setup data here"; + data.save(); } ``` @@ -865,12 +870,12 @@ export function handleOnce(block: ethereum.Block): void { Mappningsfunktionen tar emot ett `ethereum.Block` som sitt enda argument. Liksom mappningsfunktioner för händelser kan denna funktion komma åt befintliga subgrafiska enheter i lagret, anropa smarta kontrakt och skapa eller uppdatera enheter. ```typescript -import { ethereum } from '@graphprotocol/graph-ts' +import { ethereum } from "@graphprotocol/graph-ts"; export function handleBlock(block: ethereum.Block): void { - let id = block.hash - let entity = new Block(id) - entity.save() + let id = block.hash; + let entity = new Block(id); + entity.save(); } ``` @@ -1123,26 +1128,26 @@ const cid = dataSource.stringParam() Exempel på hanterare: ```typescript -import { json, Bytes, dataSource } from '@graphprotocol/graph-ts' -import { TokenMetadata } from '../generated/schema' +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() + 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') + 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.name = name.toString(); + tokenMetadata.image = image.toString(); + tokenMetadata.externalURL = externalURL.toString(); + tokenMetadata.description = description.toString(); } - tokenMetadata.save() + tokenMetadata.save(); } } ``` @@ -1161,29 +1166,29 @@ För Arweave, från och med version 0.33.0 kan Graph Node hämta filer som är l Exempel: ```typescript -import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates' +import { TokenMetadata as TokenMetadataTemplate } from "../generated/templates"; -const ipfshash = 'QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm' +const ipfshash = "QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm"; //Denna exempelkod är för en undergraf för kryptosamverkan. Ovanstående ipfs-hash är en katalog med tokenmetadata för alla kryptosamverkande NFT:er. export function handleTransfer(event: TransferEvent): void { - let token = Token.load(event.params.tokenId.toString()) + let token = Token.load(event.params.tokenId.toString()); if (!token) { - token = new Token(event.params.tokenId.toString()) - token.tokenID = event.params.tokenId + token = new Token(event.params.tokenId.toString()); + token.tokenID = event.params.tokenId; - token.tokenURI = '/' + event.params.tokenId.toString() + '.json' - const tokenIpfsHash = ipfshash + token.tokenURI + token.tokenURI = "/" + event.params.tokenId.toString() + ".json"; + const tokenIpfsHash = ipfshash + token.tokenURI; //Detta skapar en sökväg till metadata för en enskild Crypto coven NFT. Den konkaterar katalogen med "/" + filnamn + ".json" - token.ipfsURI = tokenIpfsHash + token.ipfsURI = tokenIpfsHash; - TokenMetadataTemplate.create(tokenIpfsHash) + TokenMetadataTemplate.create(tokenIpfsHash); } - token.updatedAtTimestamp = event.block.timestamp - token.owner = event.params.to.toHexString() - token.save() + token.updatedAtTimestamp = event.block.timestamp; + token.owner = event.params.to.toHexString(); + token.save(); } ``` From 6f414cecaae317b0936e682e5665de582e8896ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:30 -0400 Subject: [PATCH 714/924] New translations creating-a-subgraph.mdx (Turkish) --- .../tr/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/tr/developing/creating-a-subgraph.mdx b/website/pages/tr/developing/creating-a-subgraph.mdx index dfdd32dac09d..4cc6f0946d55 100644 --- a/website/pages/tr/developing/creating-a-subgraph.mdx +++ b/website/pages/tr/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Bazı varlık türleri için `id`, iki diğer varlığın id'lerinden oluşturul GraphQL API'mizde aşağıdaki skalerleri destekliyoruz: -| Tür | Tanım | -| --- | --- | -| `Baytlar` | Byte dizisi, onaltılık bir dizgi olarak temsil edilir. Ethereum hash değerleri ve adresleri için yaygın olarak kullanılır. | -| `Dizgi(String)` | `string` değerleri için skaler. Null karakterleri desteklenmez ve otomatik olarak kaldırılır. | -| `Boolean` | `boolean` değerleri için skaler. | -| `Int` | GraphQL özellikleri, `Int`'in 32 bayt boyutunda olduğunu tanımlar. | -| `Int8` | 64 bitlik işaretli tam sayı olarak da bilinen 8 baytlık işaretli tam sayı, -9,223,372,036,854,775,808 ila 9,223,372,036,854,775,807 aralığındaki değerleri depolayabilir. Ethereum'dan `i64`'ü temsil etmek için bunu kullanmayı tercih edin. | -| `BigInt` | Büyük tamsayılar. Ethereum'un `uint32`, `int64`, `uint64`, ..., `uint256` türleri için kullanılır. Not: `int32`, `uint24` veya `int8` gibi `uint32`'nin altındaki her şey `i32`olarak temsil edilir. | -| `BigDecimal` | `BigDecimal` Yüksek hassasiyetli ondalık sayılar, bir anlamlı ve bir üsle temsil edilir. Üs aralığı -6143 ila +6144 arasındadır. 34 anlamlı rakama yuvarlanır. | +| Tür | Tanım | +| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Baytlar` | Byte dizisi, onaltılık bir dizgi olarak temsil edilir. Ethereum hash değerleri ve adresleri için yaygın olarak kullanılır. | +| `Dizgi(String)` | `string` değerleri için skaler. Null karakterleri desteklenmez ve otomatik olarak kaldırılır. | +| `Boolean` | `boolean` değerleri için skaler. | +| `Int` | GraphQL özellikleri, `Int`'in 32 bayt boyutunda olduğunu tanımlar. | +| `Int8` | 64 bitlik işaretli tam sayı olarak da bilinen 8 baytlık işaretli tam sayı, -9,223,372,036,854,775,808 ila 9,223,372,036,854,775,807 aralığındaki değerleri depolayabilir. Ethereum'dan `i64`'ü temsil etmek için bunu kullanmayı tercih edin. | +| `BigInt` | Büyük tamsayılar. Ethereum'un `uint32`, `int64`, `uint64`, ..., `uint256` türleri için kullanılır. Not: `int32`, `uint24` veya `int8` gibi `uint32`'nin altındaki her şey `i32`olarak temsil edilir. | +| `BigDecimal` | `BigDecimal` Yüksek hassasiyetli ondalık sayılar, bir anlamlı ve bir üsle temsil edilir. Üs aralığı -6143 ila +6144 arasındadır. 34 anlamlı rakama yuvarlanır. | #### Numaralandırmalar @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Not:** Yeni bir veri kaynağı, oluşturulduğu blok ve tüm takip eden bloklar için yalnızca çağrıları ve olayları işleyecektir, ancak önceki bloklarda bulunan geçmiş verileri işlemeyecektir. -> +> > Eğer önceki bloklar, yeni veri kaynağı için ilgili veri içeriyorsa, o veriyi indekslemek için sözleşmenin mevcut durumunu okuyarak ve yeni veri kaynağı oluşturulurken o zaman dilimindeki durumu temsil eden varlıklar oluşturarak yapmak en iyisidir. ### Veri Kaynağı Bağlamı @@ -716,7 +716,7 @@ dataSources: ``` > **Not:** Sözleşme oluşturma bloğu hızlı bir şekilde Etherscan'da aranabilir: -> +> > 1. Arama çubuğuna adresini girerek sözleşmeyi arayın. > 2. `Contract Creator` bölümünde oluşturma işlemi hash'ına tıklayın. > 3. İşlem detayları sayfasını yükleyin ve bu sözleşme için başlangıç bloğunu bulacaksınız. From 6e754d6dfb552dbd6193121ed83502aa14c3f437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:31 -0400 Subject: [PATCH 715/924] New translations creating-a-subgraph.mdx (Ukrainian) --- .../uk/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/uk/developing/creating-a-subgraph.mdx b/website/pages/uk/developing/creating-a-subgraph.mdx index aae315292349..e557d92701e6 100644 --- a/website/pages/uk/developing/creating-a-subgraph.mdx +++ b/website/pages/uk/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From 36905a0263aaec43e9cf6e7febfb7f18f3251440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:32 -0400 Subject: [PATCH 716/924] New translations creating-a-subgraph.mdx (Chinese Simplified) --- .../zh/developing/creating-a-subgraph.mdx | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/website/pages/zh/developing/creating-a-subgraph.mdx b/website/pages/zh/developing/creating-a-subgraph.mdx index 261219b482d3..4b422cf814e9 100644 --- a/website/pages/zh/developing/creating-a-subgraph.mdx +++ b/website/pages/zh/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Null value resolved for non-null field 'name' 我们在 GraphQL API 中支持以下标量: -| 类型 | 描述 | -| --- | --- | -| `字节` | 字节数组,表示为十六进制字符串。 通常用于以太坊hash和地址。 | -| `字符串` | `string` 值的标量。 不支持空字符,并会自动进行删除。 | -| `Boolean` | `boolean` 值的标量。 | -| `Int` | GraphQL 规范将 `Int` 定义为 32 字节的大小。 | -| `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` | 大整数。 用于以太坊的 `uint32`、`int64`、`uint64`、...、`uint256` 类型。 注意:`uint32`以下的所有类型,例如`int32`、`uint24`或`int8`都表示为`i32`。 | -| `BigDecimal` | `BigDecimal` 表示为有效数字和指数的高精度小数。 指数范围是 -6143 到 +6144。 四舍五入到 34 位有效数字。 | +| 类型 | 描述 | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `字节` | 字节数组,表示为十六进制字符串。 通常用于以太坊hash和地址。 | +| `字符串` | `string` 值的标量。 不支持空字符,并会自动进行删除。 | +| `Boolean` | `boolean` 值的标量。 | +| `Int` | GraphQL 规范将 `Int` 定义为 32 字节的大小。 | +| `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` | 大整数。 用于以太坊的 `uint32`、`int64`、`uint64`、...、`uint256` 类型。 注意:`uint32`以下的所有类型,例如`int32`、`uint24`或`int8`都表示为`i32`。 | +| `BigDecimal` | `BigDecimal` 表示为有效数字和指数的高精度小数。 指数范围是 -6143 到 +6144。 四舍五入到 34 位有效数字。 | #### 枚举类型 @@ -458,33 +458,33 @@ query { 支持的语言词典: -| 代码 | 词典 | -| ------ | ---------- | -| simple | 通用 | -| da | 丹麦语 | -| nl | 荷兰语 | -| en | 英语 | -| fi | 芬兰语 | -| fr | 法语 | -| de | 德语 | -| hu | 匈牙利语 | -| it | 意大利语 | -| no | 挪威语 | -| pt | 葡萄牙语 | +| 代码 | 词典 | +| ------ | ----- | +| simple | 通用 | +| da | 丹麦语 | +| nl | 荷兰语 | +| en | 英语 | +| fi | 芬兰语 | +| fr | 法语 | +| de | 德语 | +| hu | 匈牙利语 | +| it | 意大利语 | +| no | 挪威语 | +| pt | 葡萄牙语 | | ro | 罗马尼亚语 | -| ru | 俄语 | -| es | 西班牙语 | -| sv | 瑞典语 | -| tr | 土耳其语 | +| ru | 俄语 | +| es | 西班牙语 | +| sv | 瑞典语 | +| tr | 土耳其语 | ### 排序算法 支持的排序结果算法: -| 算法 | 描述 | -| ------------- | --------------------------------------------- | +| 算法 | 描述 | +| ------------- | -------------------------- | | rank | 使用全文查询的匹配质量 (0-1) 对结果进行排序。 | -| proximityRank | 与 rank 类似,但也包括匹配的接近程度。 | +| proximityRank | 与 rank 类似,但也包括匹配的接近程度。 | ## 编写映射 @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **注意:** 新的数据源只会处理创建它的区块和所有后续区块的调用和事件,而不会处理历史数据,也就是包含在先前区块中的数据。 -> +> > 如果先前的区块包含与新数据源相关的数据,最好通过读取合约的当前状态,并在创建新数据源时创建表示该状态的实体来索引该数据。 ### 数据源背景 @@ -716,7 +716,7 @@ dataSources: ``` > **注意:** 合约创建区块可以在 Etherscan 上快速查找: -> +> > 1. 通过在搜索栏中输入合约地址来搜索合约。 > 2. 单击 `Contract Creator` 部分中的创建交易hash。 > 3. 加载交易详情页面,您将在其中找到该合约的起始区块。 @@ -906,11 +906,11 @@ eventHandlers: 从 `specVersion` `0.0.4` 开始,子图特征必须使用它们的 `camelCase` 名称,在清单文件顶层的 `features` 部分中显式声明,如下表所列: -| 特征 | 名称 | -| ----------------------------------------- | --------------------------------------------------- | -| [非致命错误](#非致命错误) | `nonFatalErrors` | -| [全文搜索](#定义全文搜索字段) | `fullTextSearch` | -| [嫁接](#嫁接到现有子图) | `grafting` | +| 特征 | 名称 | +| --------------------------- | --------------------------------------------------- | +| [非致命错误](#非致命错误) | `nonFatalErrors` | +| [全文搜索](#定义全文搜索字段) | `fullTextSearch` | +| [嫁接](#嫁接到现有子图) | `grafting` | | [以太坊合约上的IPFS](#以太坊合约上的IPFS) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | 例如,如果子图使用 **Full-Text Search** 和 **Non-fatal Errors** 功能,则清单中的 `features` 字段应为: @@ -990,7 +990,7 @@ _meta { > **注意:** 在初次升级到The Graph Network时,不建议使用grafting。可以在[这里](/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network)了解更多信息。 -首次部署子图时,它会在相应链的启动区块(或每个数据源定义的 `startBlock` 处)开始索引事件。在某些情况下,可以使用现有子图已经索引的数据并在更晚的区块上开始索引。 这种索引模式称为*Grafting*。 例如,嫁接在开发过程中非常有用,可以快速克服映射中的简单错误,或者在现有子图失败后暂时恢复工作。 +首次部署子图时,它会在相应链的启动区块(或每个数据源定义的 `startBlock` 处)开始索引事件。在某些情况下,可以使用现有子图已经索引的数据并在更晚的区块上开始索引。 这种索引模式称为_Grafting_。 例如,嫁接在开发过程中非常有用,可以快速克服映射中的简单错误,或者在现有子图失败后暂时恢复工作。 当 `subgraph.yaml` 中的子图清单在顶层包含 `graft` 区块时,子图被嫁接到基础子图: @@ -1163,7 +1163,7 @@ For Arweave, as of version 0.33.0 Graph Node can fetch files stored on Arweave b ```typescript import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates' -const ipfshash = 'QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm' +const ipfshash = "QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm" //This example code is for a Crypto coven subgraph. The above ipfs hash is a directory with token metadata for all crypto coven NFTs. export function handleTransfer(event: TransferEvent): void { From c5c5733d809a9e52d8427f0b736517d1976745c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:32 -0400 Subject: [PATCH 717/924] New translations creating-a-subgraph.mdx (Urdu (Pakistan)) --- .../ur/developing/creating-a-subgraph.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/ur/developing/creating-a-subgraph.mdx b/website/pages/ur/developing/creating-a-subgraph.mdx index a3659fab075b..ca124aa9a714 100644 --- a/website/pages/ur/developing/creating-a-subgraph.mdx +++ b/website/pages/ur/developing/creating-a-subgraph.mdx @@ -156,7 +156,7 @@ dataSources: - `dataSources.source.endBlock`: بلاک کا اختیاری نمبر جس پر ڈیٹا سورس انڈیکس کرنا روکتا ہے، اس بلاک سمیت۔ کم از کم مخصوص ورژن درکار ہے: `0.0.9`۔ -- `dataSources.context`: کلیدی ویلیو کے جوڑے جو سب گراف میپنگ میں استعمال کیے جاسکتے ہیں۔ مختلف قسم کے ڈیٹا کو سپورٹ کرتا ہے جیسے `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`، `List`، اور `BigInt`۔ ہر متغیر کو اپنی `type` اور `data` کی وضاحت کرنے کی ضرورت ہے۔ یہ سیاق و سباق کے متغیرات پھر میپنگ فائلوں میں قابل رسائی ہوتے ہیں، جو سب گراف کی ترقی کے لیے مزید قابل ترتیب اختیارات پیش کرتے ہیں۔ +- `dataSources.context`: کلیدی ویلیو کے جوڑے جو سب گراف میپنگ میں استعمال کیے جاسکتے ہیں۔ مختلف قسم کے ڈیٹا کو سپورٹ کرتا ہے جیسے `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, ` Bytes `، ` List `، اور `BigInt`۔ ہر متغیر کو اپنی ` type ` اور ` data ` کی وضاحت کرنے کی ضرورت ہے۔ یہ سیاق و سباق کے متغیرات پھر میپنگ فائلوں میں قابل رسائی ہوتے ہیں، جو سب گراف کی ترقی کے لیے مزید قابل ترتیب اختیارات پیش کرتے ہیں۔ - `dataSources.mapping.entities`: وہ اینٹیٹیز جنہیں ڈیٹا سورس اسٹور کو لکھتا ہے۔ schema.graphql فائل میں ہر اینٹیٹی کے لیے اسکیما کی وضاحت کی گئی ہے. @@ -248,15 +248,15 @@ type GravatarDeclined @entity { ہم اپنے GraphQL API میں درج ذیل اسکیلرز کی حمایت کرتے ہیں: -| قسم | تفصیل | -| --- | --- | -| `Bytes` | Byte array، ایک ہیکساڈیسیمل سٹرنگ کے طور پر پیش کیا جاتا ہے. عام طور پر Ethereum hashes اور ایڈریسیس کے لیے استعمال ہوتا ہے. | -| `String` | `string` ویلیوز کے لیے اسکیلر. خالی حروف تعاون یافتہ نہیں ہیں اور خود بخود ہٹا دیے جاتے ہیں. | -| `Boolean` | `Boolean` ویلیوز کے لیے اسکیلر. | -| `Int` | GraphQL spec `Int` کی وضاحت کرتا ہے جس کا سائز 32 bytes ہے. | -| `Int8` | ایک 8-بائٹ دستخط شدہ عدد، جسے 64-بٹ دستخط شدہ عدد بھی کہا جاتا ہے، -9,223,372,036,854,775,808 سے لے کر 9,223,372,036,854,775,807 تک کی ویلیوز کو ذخیرہ کرسکتا ہے۔ ایتھیریم سے `i64` کی نمائندگی کرنے کے لیے اسے استعمال کرنے کو ترجیح دیں۔ | -| `BigInt` | بڑے integers۔ Ethereum کی `uint32`، `int64`، `uint64`، ..., `uint256` اقسام کے لیے استعمال کیا جاتا ہے. نوٹ: `uint32` کے نیچے ہر چیز، جیسے `int32`، `uint24` یا `int8` کو `i32` کے طور پر دکھایا گیا ہے. | -| `BigDecimal` | `BigDecimal` اعلی درستگی والے اعشاریہ ایک significand اور ایک exponent کے طور پر پیش کیا جاتے ہہیں. Exponent رینج −6143 سے +6144 تک ہے۔ 34 سگنیفیکینڈ ہندسوں پر rounded کیا گیا۔. | +| قسم | تفصیل | +| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Bytes` | Byte array، ایک ہیکساڈیسیمل سٹرنگ کے طور پر پیش کیا جاتا ہے. عام طور پر Ethereum hashes اور ایڈریسیس کے لیے استعمال ہوتا ہے. | +| `String` | `string` ویلیوز کے لیے اسکیلر. خالی حروف تعاون یافتہ نہیں ہیں اور خود بخود ہٹا دیے جاتے ہیں. | +| `Boolean` | `Boolean` ویلیوز کے لیے اسکیلر. | +| `Int` | GraphQL spec `Int` کی وضاحت کرتا ہے جس کا سائز 32 bytes ہے. | +| `Int8` | ایک 8-بائٹ دستخط شدہ عدد، جسے 64-بٹ دستخط شدہ عدد بھی کہا جاتا ہے، -9,223,372,036,854,775,808 سے لے کر 9,223,372,036,854,775,807 تک کی ویلیوز کو ذخیرہ کرسکتا ہے۔ ایتھیریم سے `i64` کی نمائندگی کرنے کے لیے اسے استعمال کرنے کو ترجیح دیں۔ | +| `BigInt` | بڑے integers۔ Ethereum کی `uint32`، `int64`، `uint64`، ..., `uint256` اقسام کے لیے استعمال کیا جاتا ہے. نوٹ: `uint32` کے نیچے ہر چیز، جیسے `int32`، `uint24` یا `int8` کو `i32` کے طور پر دکھایا گیا ہے. | +| `BigDecimal` | `BigDecimal` اعلی درستگی والے اعشاریہ ایک significand اور ایک exponent کے طور پر پیش کیا جاتے ہہیں. Exponent رینج −6143 سے +6144 تک ہے۔ 34 سگنیفیکینڈ ہندسوں پر rounded کیا گیا۔. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **نوٹ:** ایک نیا ڈیٹا سورس صرف اس بلاک کے لیے کالز اور ایونٹس پر کارروائی کرے گا جس میں اسے بنایا گیا تھا اور تمام مندرجہ ذیل بلاکس، لیکن تاریخی ڈیٹا، یعنی ڈیٹا پر کارروائی نہیں کرے گا جو پہلے سے بلاکس میں موجود ہے. -> +> > اگر پہلے والے بلاکس میں نئے ڈیٹا سورس سے متعلقہ ڈیٹا ہوتا ہے، تو یہ بہترین ہے کہ کنٹریکٹ کی موجودہ حالت کو پڑھ کر اور ڈیٹا کا نیا سورس بننے کے وقت اس سٹیٹ کی نمائندگی کرنے والی اینٹیٹیز بنا کر اس ڈیٹا کو انڈیکس کریں. ### ڈیٹا سورس سیاق و سباق @@ -716,7 +716,7 @@ dataSources: ``` > **نوٹ:** کنٹریکٹ تخلیق والے بلاک کو ایتھر سکین پر تیزی سے دیکھا جا سکتا ہے: -> +> > 1. سرچ بار میں اس کا ایڈریس درج کرکے کنٹریکٹ کو تلاش کریں. > 2. `Contract Creator` سیکشن میں تخلیق ٹرانزیکشن ہیش پر کلک کریں. > 3. ٹرانزیکشن کی تفصیلات کا صفحہ لوڈ کریں جہاں آپ کو اس کنٹریکٹ کے لیے اسٹارٹ بلاک ملے گا. From 5006f83aef6cc607ffcfa7e219e121e0e907d210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:33 -0400 Subject: [PATCH 718/924] New translations creating-a-subgraph.mdx (Vietnamese) --- .../vi/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/vi/developing/creating-a-subgraph.mdx b/website/pages/vi/developing/creating-a-subgraph.mdx index dbab1be03c36..9e9c276d60e4 100644 --- a/website/pages/vi/developing/creating-a-subgraph.mdx +++ b/website/pages/vi/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Loại | Miêu tả | -| --- | --- | -| `Bytes` | Mảng byte, được biểu diễn dưới dạng chuỗi thập lục phân. Thường được sử dụng cho các mã băm và địa chỉ Ethereum. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Loại | Miêu tả | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Mảng byte, được biểu diễn dưới dạng chuỗi thập lục phân. Thường được sử dụng cho các mã băm và địa chỉ Ethereum. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Lưu ý:** Nguồn dữ liệu mới sẽ chỉ xử lý các lệnh gọi và sự kiện cho khối mà nó được tạo và tất cả các khối tiếp theo, nhưng sẽ không xử lý dữ liệu lịch sử, tức là dữ liệu được chứa trong các khối trước đó. -> +> > Nếu các khối trước đó chứa dữ liệu có liên quan đến nguồn dữ liệu mới, tốt nhất là lập chỉ mục dữ liệu đó bằng cách đọc trạng thái hiện tại của hợp đồng và tạo các thực thể đại diện cho trạng thái đó tại thời điểm nguồn dữ liệu mới được tạo. ### Bối cảnh Nguồn Dữ liệu @@ -716,7 +716,7 @@ dataSources: ``` > **Lưu ý:** Khối tạo hợp đồng có thể được nhanh chóng tra cứu trên Etherscan: -> +> > 1. Tìm kiếm hợp đồng bằng cách nhập địa chỉ của nó vào thanh tìm kiếm. > 2. Nhấp vào băm giao dịch tạo trong phần `Contract Creator`. > 3. Tải trang chi tiết giao dịch nơi bạn sẽ tìm thấy khối bắt đầu cho hợp đồng đó. From f3059494e374cc3d43193d3c8decd00283b65e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:34 -0400 Subject: [PATCH 719/924] New translations creating-a-subgraph.mdx (Marathi) --- .../mr/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/mr/developing/creating-a-subgraph.mdx b/website/pages/mr/developing/creating-a-subgraph.mdx index 060f832cf1b3..5b2aa532c95d 100644 --- a/website/pages/mr/developing/creating-a-subgraph.mdx +++ b/website/pages/mr/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ type GravatarDeclined @entity { We support the following scalars in our GraphQL API: -| प्रकार | वर्णन | -| --- | --- | -| `बाइट्स` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `स्ट्रिंग` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `बुलियन` | `बूलियन` मूल्यांसाठी स्केलर. | -| `इंट` | GraphQL spec `Int` ला ३२ बाइट्सचा आकार ठरवतो. | -| `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` | मोठे पूर्णांक. इथरियमच्या `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारांसाठी वापरले जाते. टीप: `uint32` खाली सर्व काही, जसे की `int32`, `uint24` किंवा `int8` `i32` म्हणून प्रस्तुत केले जाते 0>. | -| `बिग डेसिमल` | `BigDecimal` उच्च सुस्पष्टता दशांश एक महत्त्वपूर्ण आणि घातांक म्हणून प्रस्तुत केले जाते. घातांक श्रेणी −6143 ते +6144 पर्यंत आहे. 34 लक्षणीय अंकांपर्यंत पूर्णांक. | +| प्रकार | वर्णन | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `बाइट्स` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `स्ट्रिंग` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `बुलियन` | `बूलियन` मूल्यांसाठी स्केलर. | +| `इंट` | GraphQL spec `Int` ला ३२ बाइट्सचा आकार ठरवतो. | +| `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` | मोठे पूर्णांक. इथरियमच्या `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारांसाठी वापरले जाते. टीप: `uint32` खाली सर्व काही, जसे की `int32`, `uint24` किंवा `int8` `i32` म्हणून प्रस्तुत केले जाते 0>. | +| `बिग डेसिमल` | `BigDecimal` उच्च सुस्पष्टता दशांश एक महत्त्वपूर्ण आणि घातांक म्हणून प्रस्तुत केले जाते. घातांक श्रेणी −6143 ते +6144 पर्यंत आहे. 34 लक्षणीय अंकांपर्यंत पूर्णांक. | #### एनम्स @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **टीप:** नवीन डेटा स्रोत केवळ तो ज्या ब्लॉकमध्ये तयार केला गेला होता आणि पुढील सर्व ब्लॉकसाठी कॉल्स आणि इव्हेंटवर प्रक्रिया करेल, परंतु ऐतिहासिक डेटावर प्रक्रिया करणार नाही, म्हणजे, डेटावर प्रक्रिया करणार नाही. जे आधीच्या ब्लॉक्समध्ये समाविष्ट आहे. -> +> > पूर्वीच्या ब्लॉक्समध्ये नवीन डेटा स्रोताशी संबंधित डेटा असल्यास, कराराची वर्तमान स्थिती वाचून आणि नवीन डेटा स्रोत तयार करताना त्या स्थितीचे प्रतिनिधित्व करणारी संस्था तयार करून तो डेटा अनुक्रमित करणे सर्वोत्तम आहे. ### डेटा स्रोत संदर्भ @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From d502bc57077588c44d5a556d08fdf5167fe2bf1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:34 -0400 Subject: [PATCH 720/924] New translations creating-a-subgraph.mdx (Hindi) --- .../hi/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/hi/developing/creating-a-subgraph.mdx b/website/pages/hi/developing/creating-a-subgraph.mdx index b146210f6aec..50f6bf0e7492 100644 --- a/website/pages/hi/developing/creating-a-subgraph.mdx +++ b/website/pages/hi/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ type GravatarDeclined @entity { हम अपने ग्राफक्यूएल एपीआई में निम्नलिखित स्केलर्स का समर्थन करते हैं: -| प्रकार | विवरण | -| --- | --- | -| `Bytes` | बाइट सरणी, एक हेक्साडेसिमल स्ट्रिंग के रूप में दर्शाया गया है। आमतौर पर एथेरियम हैश और पतों के लिए उपयोग किया जाता है। | -| `String` | `स्ट्रिंग` मानों के लिए स्केलर। अशक्त वर्ण समर्थित नहीं हैं और स्वचालित रूप से हटा दिए जाते हैं। | -| `Boolean` | `boolean` मानों के लिए स्केलर। | -| `Int` | ग्राफक्लाइन स्पेक `Int` को 32 बाइट्स के आकार के रूप में परिभाषित करता है। | -| `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` | बड़े पूर्णांक। एथेरियम के `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारों के लिए उपयोग किया जाता है। नोट: `uint32` के नीचे सब कुछ, जैसे `int32`, `uint24` या `int8` को `i32` के रूप में दर्शाया गया है। | -| `BigDecimal` | `BigDecimal` उच्च परिशुद्धता दशमलव एक महत्व और एक प्रतिपादक के रूप में दर्शाया गया है। एक्सपोनेंट रेंज -6143 से +6144 तक है। 34 महत्वपूर्ण अंकों तक गोल। | +| प्रकार | विवरण | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | बाइट सरणी, एक हेक्साडेसिमल स्ट्रिंग के रूप में दर्शाया गया है। आमतौर पर एथेरियम हैश और पतों के लिए उपयोग किया जाता है। | +| `String` | `स्ट्रिंग` मानों के लिए स्केलर। अशक्त वर्ण समर्थित नहीं हैं और स्वचालित रूप से हटा दिए जाते हैं। | +| `Boolean` | `boolean` मानों के लिए स्केलर। | +| `Int` | ग्राफक्लाइन स्पेक `Int` को 32 बाइट्स के आकार के रूप में परिभाषित करता है। | +| `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` | बड़े पूर्णांक। एथेरियम के `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारों के लिए उपयोग किया जाता है। नोट: `uint32` के नीचे सब कुछ, जैसे `int32`, `uint24` या `int8` को `i32` के रूप में दर्शाया गया है। | +| `BigDecimal` | `BigDecimal` उच्च परिशुद्धता दशमलव एक महत्व और एक प्रतिपादक के रूप में दर्शाया गया है। एक्सपोनेंट रेंज -6143 से +6144 तक है। 34 महत्वपूर्ण अंकों तक गोल। | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **ध्यान दें:** एक नया डेटा स्रोत केवल उस ब्लॉक के लिए कॉल और ईवेंट को प्रोसेस करेगा जिसमें इसे बनाया गया था और सभी बाद के ब्लॉक, लेकिन ऐतिहासिक डेटा, यानी डेटा को प्रोसेस नहीं करेगा जो पिछले ब्लॉकों में निहित है। -> +> > यदि पिछले ब्लॉक में नए डेटा स्रोत के लिए प्रासंगिक डेटा है, तो उस डेटा को अनुबंध की वर्तमान स्थिति को पढ़कर और नए डेटा स्रोत के निर्माण के समय उस स्थिति का प्रतिनिधित्व करने वाली संस्थाओं का निर्माण करना सबसे अच्छा है। ### डेटा स्रोत प्रसंग @@ -716,7 +716,7 @@ dataSources: ``` > **ध्यान दें:** इथरस्कैन पर अनुबंध निर्माण ब्लॉक को जल्दी से देखा जा सकता है: -> +> > 1. खोज बार में उसका पता दर्ज करके अनुबंध की खोज करें। > 2. `अनुबंध निर्माता` अनुभाग में निर्माण लेनदेन हैश पर क्लिक करें। > 3. लेन-देन विवरण पृष्ठ लोड करें जहां आपको उस अनुबंध के लिए प्रारंभ ब्लॉक मिलेगा। From 951e0d35de080ab2f7e2dee3ffd73ce677742b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:35 -0400 Subject: [PATCH 721/924] New translations creating-a-subgraph.mdx (Yoruba) --- .../yo/developing/creating-a-subgraph.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/pages/yo/developing/creating-a-subgraph.mdx b/website/pages/yo/developing/creating-a-subgraph.mdx index 39f58ac2083b..db9e8a024571 100644 --- a/website/pages/yo/developing/creating-a-subgraph.mdx +++ b/website/pages/yo/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| --- | --- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. From a103172949d66dc4265c54ff21cbb27b3cd160a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:41 -0400 Subject: [PATCH 722/924] New translations developer-faqs.mdx (Swedish) --- website/pages/sv/developing/developer-faqs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/sv/developing/developer-faqs.mdx b/website/pages/sv/developing/developer-faqs.mdx index 85dc3131826b..11d0890e4d60 100644 --- a/website/pages/sv/developing/developer-faqs.mdx +++ b/website/pages/sv/developing/developer-faqs.mdx @@ -71,7 +71,7 @@ Inom en subgraf behandlas händelser alltid i den ordning de visas i blocken, oa Ja, du kan göra detta genom att importera `graph-ts` enligt exemplet nedan: ```javascript -import { dataSource } from '@graphprotocol/graph-ts' +import { dataSource } from "@graphprotocol/graph-ts" dataSource.network() dataSource.address() From dec743eebfb2931aaace110d59caa99caa19d6bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:44 -0400 Subject: [PATCH 723/924] New translations unit-testing-framework.mdx (Romanian) --- website/pages/ro/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ro/developing/unit-testing-framework.mdx b/website/pages/ro/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/ro/developing/unit-testing-framework.mdx +++ b/website/pages/ro/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 3cfb5b6676d224d3dfc60251cc5c8d2d6efa7797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:45 -0400 Subject: [PATCH 724/924] New translations unit-testing-framework.mdx (French) --- .../pages/fr/developing/unit-testing-framework.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/fr/developing/unit-testing-framework.mdx b/website/pages/fr/developing/unit-testing-framework.mdx index bb0bd1d30bef..51a8a15d219e 100644 --- a/website/pages/fr/developing/unit-testing-framework.mdx +++ b/website/pages/fr/developing/unit-testing-framework.mdx @@ -901,7 +901,7 @@ Les utilisateurs peuvent également simuler une panne critique, comme ceci : ```typescript test('Tout faire exploser', () => { - log.critical('Boom!') + log.critical('Boom!') }) ``` @@ -1082,15 +1082,15 @@ La sortie du journal inclut la durée de l’exécution du test. Voici un exempl Cela signifie que vous avez utilisé `console.log` dans votre code, ce qui n'est pas pris en charge par AssemblyScript. Veuillez envisager d'utiliser l'[API Logging](/developing/assemblyscript-api/#logging-api) > ERREUR TS2554 : attendu ? arguments, mais j'ai eu ?. -> +> > renvoyer le nouveau ethereum.Block (defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt) ; -> +> > dans ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > renvoyer un nouveau ethereum.Transaction (defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt) ; -> +> > dans ~lib/matchstick-as/assembly/defaults.ts(24,12) L'inadéquation des arguments est causée par une inadéquation entre `graph-ts` et `matchstick-as`. La meilleure façon de résoudre des problèmes comme celui-ci est de tout mettre à jour vers la dernière version publiée. From 02306d5b9a8438a7a32976bdd6cbb7fd54f03357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:46 -0400 Subject: [PATCH 725/924] New translations unit-testing-framework.mdx (Spanish) --- website/pages/es/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/es/developing/unit-testing-framework.mdx b/website/pages/es/developing/unit-testing-framework.mdx index 514f692ac6e9..84f9bd46d732 100644 --- a/website/pages/es/developing/unit-testing-framework.mdx +++ b/website/pages/es/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ La salida del log incluye la duración de la ejecución de la prueba. Aquí hay Esto significa que has utilizado `console.log` en tu código, que no es compatible con AssemblyScript. Considera usar la [API de registro](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) La falta de coincidencia en los argumentos se debe a la falta de coincidencia en `graph-ts` y `matchstick-as`. La mejor manera de solucionar problemas como este es actualizar todo a la última versión publicada. From b7d126f47c74326252035b95506dce583c24a5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:46 -0400 Subject: [PATCH 726/924] New translations unit-testing-framework.mdx (Arabic) --- website/pages/ar/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ar/developing/unit-testing-framework.mdx b/website/pages/ar/developing/unit-testing-framework.mdx index 54b83b009125..395932bc4b99 100644 --- a/website/pages/ar/developing/unit-testing-framework.mdx +++ b/website/pages/ar/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 61a7a66f31f57ce77a5c93431636c2b6d14614d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:47 -0400 Subject: [PATCH 727/924] New translations unit-testing-framework.mdx (Czech) --- website/pages/cs/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/cs/developing/unit-testing-framework.mdx b/website/pages/cs/developing/unit-testing-framework.mdx index 69093e150a10..81ae89accd3f 100644 --- a/website/pages/cs/developing/unit-testing-framework.mdx +++ b/website/pages/cs/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 18b7fffac87ed29b76f9351944e0e06d4336dc9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:48 -0400 Subject: [PATCH 728/924] New translations unit-testing-framework.mdx (German) --- website/pages/de/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/de/developing/unit-testing-framework.mdx b/website/pages/de/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/de/developing/unit-testing-framework.mdx +++ b/website/pages/de/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From bcdd6571c39b8a798e733d9894a8d0c220a52633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:49 -0400 Subject: [PATCH 729/924] New translations unit-testing-framework.mdx (Italian) --- website/pages/it/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/it/developing/unit-testing-framework.mdx b/website/pages/it/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/it/developing/unit-testing-framework.mdx +++ b/website/pages/it/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 996789820f33d7659ca8ecfb4ca62df515b75305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:49 -0400 Subject: [PATCH 730/924] New translations unit-testing-framework.mdx (Japanese) --- website/pages/ja/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ja/developing/unit-testing-framework.mdx b/website/pages/ja/developing/unit-testing-framework.mdx index 49601a107de7..9d74495ab2bd 100644 --- a/website/pages/ja/developing/unit-testing-framework.mdx +++ b/website/pages/ja/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). これは、コード内で`console.log`を使用していることを意味し、AssemblyScriptではサポートされていません。[Logging API](/developing/assemblyscript-api/#logging-api) の利用をご検討ください。 > ERROR TS2554: 期待された引数は? -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: 期待された引数は? -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) 引数の不一致は、`graph-ts`と`matchstick-as`の不一致によって起こります。このような問題を解決する最善の方法は、すべてを最新のリリース版にアップデートすることです。 From 560ceec5ce18131a5bc0daeb14c579243ea2f20e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:50 -0400 Subject: [PATCH 731/924] New translations unit-testing-framework.mdx (Korean) --- website/pages/ko/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ko/developing/unit-testing-framework.mdx b/website/pages/ko/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/ko/developing/unit-testing-framework.mdx +++ b/website/pages/ko/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 5d5b428cb41a49bd5de7f8e901246004a5a9d621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:51 -0400 Subject: [PATCH 732/924] New translations unit-testing-framework.mdx (Dutch) --- website/pages/nl/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/nl/developing/unit-testing-framework.mdx b/website/pages/nl/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/nl/developing/unit-testing-framework.mdx +++ b/website/pages/nl/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From c8b8fe36a1d2d6b0ee5a29bbe6268205dbb40eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:51 -0400 Subject: [PATCH 733/924] New translations unit-testing-framework.mdx (Polish) --- website/pages/pl/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/pl/developing/unit-testing-framework.mdx b/website/pages/pl/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/pl/developing/unit-testing-framework.mdx +++ b/website/pages/pl/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 93ae52cc06c83a9c32f460d2502a73eeab7120f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:52 -0400 Subject: [PATCH 734/924] New translations unit-testing-framework.mdx (Portuguese) --- website/pages/pt/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/pt/developing/unit-testing-framework.mdx b/website/pages/pt/developing/unit-testing-framework.mdx index 9acb78b6abde..d6357b02f6d8 100644 --- a/website/pages/pt/developing/unit-testing-framework.mdx +++ b/website/pages/pt/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ A saída do log inclui a duração do teste. Veja um exemplo: Isto significa que usou o `console.log` no seu código, que não é apoiado pelo AssemblyScript. Considere usar a [API de Logging](/developing/assemblyscript-api/#logging-api) > `ERROR TS2554: Expected ? arguments, but got ?.` -> +> > `return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt);` -> +> > `in ~lib/matchstick-as/assembly/defaults.ts(18,12)` -> +> > `ERROR TS2554: Expected ? arguments, but got ?.` -> +> > `return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt);` -> +> > `in ~lib/matchstick-as/assembly/defaults.ts(24,12)` A diferença nos argumentos é causada pela diferença no `graph-ts` e no `matchstick-as`. Problemas como este são melhor resolvidos ao atualizar tudo para a versão mais recente. From 918e2b28e7728ecdc75f65656c8ceb5129a4e069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:53 -0400 Subject: [PATCH 735/924] New translations unit-testing-framework.mdx (Russian) --- .../pages/ru/developing/unit-testing-framework.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/ru/developing/unit-testing-framework.mdx b/website/pages/ru/developing/unit-testing-framework.mdx index c1b2101a874b..7e7e69bc9b0e 100644 --- a/website/pages/ru/developing/unit-testing-framework.mdx +++ b/website/pages/ru/developing/unit-testing-framework.mdx @@ -371,7 +371,7 @@ describe("handleNewGravatars, () => { ```typescript import { describe, test, beforeEach } from 'matchstick-as/assembly/index' -import { handleUpdatedGravatar, handleNewGravatar } from '../../src/gravity' +import { handleUpdatedGravatar, handleNewGravatar } from "../../src/gravity" describe('handleUpdatedGravatars', () => { beforeEach(() => { @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). Это означает, что Вы использовали в своем коде `console.log`, который не поддерживается AssemblyScript. Пожалуйста, рассмотрите возможность использования [API логирования](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Несовпадение в аргументах вызвано несоответствием в `graph-ts` и `matchstick-as`. Лучший способ устранить проблемы, подобные этой, - обновить всё до последней выпущенной версии. From da6966baf1a9d35843a9109583cc8fe48fe615bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:54 -0400 Subject: [PATCH 736/924] New translations unit-testing-framework.mdx (Swedish) --- .../pages/sv/developing/unit-testing-framework.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/pages/sv/developing/unit-testing-framework.mdx b/website/pages/sv/developing/unit-testing-framework.mdx index 1496196edc7a..769e00134d83 100644 --- a/website/pages/sv/developing/unit-testing-framework.mdx +++ b/website/pages/sv/developing/unit-testing-framework.mdx @@ -52,7 +52,7 @@ eller /node_modules/gluegun/build/index.js:13 throw up; ``` -Se till att du använder en nyare version av Node.js eftersom graph-cli inte längre stöder **v10.19.0**, och det är fortfarande standardversionen för nya Ubuntu-bilder på WSL. Till exempel är Matchstick bekräftat fungerande på WSL med **v18.1.0**. Du kan byta till den antingen via** nvm ** eller genom att uppdatera din globala Node.js. Glöm inte att ta bort `node_modules` och köra `npm install`igen efter att du har uppdaterat Node.js! Sedan, se till att du har **libpq** installerat, du kan göra det genom att köra +Se till att du använder en nyare version av Node.js eftersom graph-cli inte längre stöder **v10.19.0**, och det är fortfarande standardversionen för nya Ubuntu-bilder på WSL. Till exempel är Matchstick bekräftat fungerande på WSL med **v18.1.0**. Du kan byta till den antingen via** nvm ** eller genom att uppdatera din globala Node.js. Glöm inte att ta bort `node_modules` och köra ` npm install `igen efter att du har uppdaterat Node.js! Sedan, se till att du har **libpq** installerat, du kan göra det genom att köra ``` sudo apt-get install libpq-dev @@ -1081,15 +1081,15 @@ Loggutmatningen innehåller testkörningens varaktighet. Här är ett exempel: Det betyder att du har använt `console.log` i din kod, som inte stöds av AssemblyScript. Överväg att använda [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Motsägelsen i argumenten beror på en motsägelse i `graph-ts` och `matchstick-as`. Det bästa sättet att åtgärda problem som detta är att uppdatera allt till den senaste utgivna versionen. From 95f5e019bce6070c7d516f7eaa738b3091d2a73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:54 -0400 Subject: [PATCH 737/924] New translations unit-testing-framework.mdx (Turkish) --- website/pages/tr/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/tr/developing/unit-testing-framework.mdx b/website/pages/tr/developing/unit-testing-framework.mdx index b6229c498b5c..c5e1bf917439 100644 --- a/website/pages/tr/developing/unit-testing-framework.mdx +++ b/website/pages/tr/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Tutulan kayıt çıktısı test çalışma süresini içerir. İşte buna bir ö Bu, AssemblyScript tarafından desteklenmeyen `console.log`'u kullandığınız anlamına gelmektedir. Lütfen [Logging API](/developing/assemblyscript-api/#logging-api) kullanmayı düşünün > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Argümanlardaki uyumsuzluk, `graph-ts` ve `matchstick-as` arasındaki uyumsuzluktan kaynaklanır. Bu gibi sorunları düzeltmenin en iyi yolu her şeyi en son yayınlanan sürüme güncellemektir. From 5bb5ab38302b5d6d1db153ffb22aca141069a24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:55 -0400 Subject: [PATCH 738/924] New translations unit-testing-framework.mdx (Ukrainian) --- website/pages/uk/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/uk/developing/unit-testing-framework.mdx b/website/pages/uk/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/uk/developing/unit-testing-framework.mdx +++ b/website/pages/uk/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 775910aa578a487ff6a236ac5081d2acff369306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:56 -0400 Subject: [PATCH 739/924] New translations unit-testing-framework.mdx (Chinese Simplified) --- .../zh/developing/unit-testing-framework.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/zh/developing/unit-testing-framework.mdx b/website/pages/zh/developing/unit-testing-framework.mdx index 4af36839c168..f62996008c36 100644 --- a/website/pages/zh/developing/unit-testing-framework.mdx +++ b/website/pages/zh/developing/unit-testing-framework.mdx @@ -24,7 +24,7 @@ Postgres 安装命令: brew install postgresql ``` -创建到最新 libpq.5. lib* 的符号链接,可能需要首先创建这个目录*`/usr/local/opt/postgreql/lib/` +创建到最新 libpq.5. lib_ 的符号链接,可能需要首先创建这个目录_`/usr/local/opt/postgreql/lib/` ```sh ln -sf /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib /usr/local/opt/postgresql/lib/libpq.5.dylib @@ -225,7 +225,7 @@ test("handleNewGravatar() should create a new entity", () => { 例子: -`beforeAll`中的代码将在文件中的*all*测试之前执行一次。 +`beforeAll`中的代码将在文件中的_all_测试之前执行一次。 ```typescript import { describe, test, beforeAll } from "matchstick-as/assembly/index" @@ -285,7 +285,7 @@ describe("handleUpdatedGravatar()", () => { 例子: -`afterAll`中的代码将在文件中的*all*测试之后执行一次。 +`afterAll`中的代码将在文件中的_all_测试之后执行一次。 ```typescript import { describe, test, afterAll } from "matchstick-as/assembly/index" @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). 这意味着您在代码中使用了`console.log`,而AssemblyScript不支持此选项。请考虑使用[日志API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > 返回ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > 返回新ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) 参数不匹配是由`graph-ts` and `matchstick-as`不匹配造成的。解决此类问题的最佳方法是将所有内容更新到最新发布的版本。 From aebcf13688eb106a5e5deb9232f736814c624693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:56 -0400 Subject: [PATCH 740/924] New translations unit-testing-framework.mdx (Urdu (Pakistan)) --- website/pages/ur/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ur/developing/unit-testing-framework.mdx b/website/pages/ur/developing/unit-testing-framework.mdx index 2f7372190bac..c0d6ab8ea200 100644 --- a/website/pages/ur/developing/unit-testing-framework.mdx +++ b/website/pages/ur/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). اس کا مطلب ہے کہ آپ نے اپنے کوڈ میں `console.log` استعمال کیا ہے، جو اسمبلی اسکرپٹ سے تعاون یافتہ نہیں ہے۔ براہ کرم [لاگنگ API](/developing/assemblyscript-api/#logging-api) استعمال کرنے پر غور کریں > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) دلائل میں عدم مماثلت `graph-ts` اور `matchstick-as` میں عدم مماثلت کی وجہ سے ہوتی ہے۔ اس طرح کے مسائل کو حل کرنے کا بہترین طریقہ یہ ہے کہ ہر چیز کو تازہ ترین جاری کردہ ورژن میں اپ ڈیٹ کیا جائے. From a1cad0e18c60b71d356e608755634aa75ff3503a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:57 -0400 Subject: [PATCH 741/924] New translations unit-testing-framework.mdx (Vietnamese) --- website/pages/vi/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/vi/developing/unit-testing-framework.mdx b/website/pages/vi/developing/unit-testing-framework.mdx index e0a3390bbb25..b67edbb28b97 100644 --- a/website/pages/vi/developing/unit-testing-framework.mdx +++ b/website/pages/vi/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From b00263f316b0019e7a92c51d4562ea875a04db05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:58 -0400 Subject: [PATCH 742/924] New translations unit-testing-framework.mdx (Marathi) --- website/pages/mr/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/mr/developing/unit-testing-framework.mdx b/website/pages/mr/developing/unit-testing-framework.mdx index 85fdc6571ca1..6910325a0758 100644 --- a/website/pages/mr/developing/unit-testing-framework.mdx +++ b/website/pages/mr/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ ___ ___ _ _ _ _ _ याचा अर्थ तुम्ही तुमच्या कोडमध्ये `console.log` वापरले आहे, जे असेंबलीस्क्रिप्टद्वारे समर्थित नाही. कृपया [लॉगिंग API](/developing/assemblyscript-api/#logging-api) वापरण्याचा विचार करा > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > त्रुटी TS2554: अपेक्षित आहे? युक्तिवाद, पण मिळाले?. -> +> > नवीन ethereum.Transaction परत करा(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) `graph-ts` आणि `matchstick-as` मधील जुळत नसल्यामुळे वितर्कांमधील जुळत नाही. यासारख्या समस्यांचे निराकरण करण्याचा सर्वोत्तम मार्ग म्हणजे नवीनतम रिलीझ केलेल्या आवृत्तीवर सर्वकाही अद्यतनित करणे. From 34c3f5b520327ad9d15b8b229204ee11220ad7fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:58 -0400 Subject: [PATCH 743/924] New translations unit-testing-framework.mdx (Hindi) --- .../pages/hi/developing/unit-testing-framework.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/hi/developing/unit-testing-framework.mdx b/website/pages/hi/developing/unit-testing-framework.mdx index c84914d9ebd0..099384d0267b 100644 --- a/website/pages/hi/developing/unit-testing-framework.mdx +++ b/website/pages/hi/developing/unit-testing-framework.mdx @@ -409,7 +409,7 @@ describe('handleUpdatedGravatars', () => { उदाहरण: -प्रत्येक परीक्षण के बाद `afterEach` के अंदर का कोड निष्पादित होगा। +प्रत्येक परीक्षण के बाद ` afterEach ` के अंदर का कोड निष्पादित होगा। ```typescript import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" @@ -448,7 +448,7 @@ describe("handleUpdatedGravatar", () => { }) ``` -उस वर्णन में प्रत्येक परीक्षण के बाद `afterEach` के अंदर का कोड निष्पादित होगा +उस वर्णन में प्रत्येक परीक्षण के बाद ` afterEach ` के अंदर का कोड निष्पादित होगा ```typescript import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). इसका अर्थ है कि आपने अपने कोड में `console.log` का उपयोग किया है, जो कि असेंबलीस्क्रिप्ट द्वारा समर्थित नहीं है। कृपया [लॉगिंग API](/Developing/assemblyscript-api/#logging-api) का उपयोग करने पर विचार करें > त्रुटि TS2554: अपेक्षित? तर्क, लेकिन मिला ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > त्रुटि TS2554: अपेक्षित? तर्क, लेकिन मिला ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) तर्कों में बेमेल `ग्राफ़-टीएस` और `मैचस्टिक-एज़` में बेमेल होने के कारण होता है। इस तरह की समस्याओं को ठीक करने का सबसे अच्छा तरीका है कि सभी चीज़ों को नवीनतम रिलीज़ किए गए संस्करण में अपडेट कर दिया जाए. From 06201e1275a91ecae718cb15592524ad04f77039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:33:59 -0400 Subject: [PATCH 744/924] New translations unit-testing-framework.mdx (Yoruba) --- website/pages/yo/developing/unit-testing-framework.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/yo/developing/unit-testing-framework.mdx b/website/pages/yo/developing/unit-testing-framework.mdx index 8ffc66465e3a..19a1ab73477e 100644 --- a/website/pages/yo/developing/unit-testing-framework.mdx +++ b/website/pages/yo/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. From 65b316e1721f6eb7829019bc89275ef39be08f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:05 -0400 Subject: [PATCH 745/924] New translations deprecating-a-subgraph.mdx (Chinese Simplified) --- website/pages/zh/managing/deprecating-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/zh/managing/deprecating-a-subgraph.mdx b/website/pages/zh/managing/deprecating-a-subgraph.mdx index ed9e25949fc9..375761f56bcd 100644 --- a/website/pages/zh/managing/deprecating-a-subgraph.mdx +++ b/website/pages/zh/managing/deprecating-a-subgraph.mdx @@ -5,7 +5,7 @@ title: 弃用子图 如果您想在 Graph浏览器上弃用您的子图,您来对地方了! 请按照以下步骤操作: 1. 在[这里](https://etherscan.io/address/0xadca0dd4729c8ba3acf3e99f3a9f471ef37b6825#writeProxyContract)访问合约地址。 -2. 使用`SubgraphID`作为参数调用`deprecateSubgraph`。 +2. 使用`SubgraphID`作为参数调用` deprecateSubgraph `。 3. 瞧! 您的子图将不再显示在Graph浏览器上的搜索中。 请注意以下事项: From ff4ab0fae4d2cb824124fa34fb41500dd193fd78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:23 -0400 Subject: [PATCH 746/924] New translations delegating.mdx (French) --- website/pages/fr/network/delegating.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/fr/network/delegating.mdx b/website/pages/fr/network/delegating.mdx index 1f6648e16226..980ace6dad0d 100644 --- a/website/pages/fr/network/delegating.mdx +++ b/website/pages/fr/network/delegating.mdx @@ -33,8 +33,8 @@ Lorsqu'un délégué souhaite se dé-déléguer, ses jetons sont soumis à une p Il convient également de choisir judicieusement un indexeur. Si vous choisissez un indexeur qui n'est pas digne de confiance ou qui ne fait pas du bon travail, vous voudrez annuler la délégation, ce qui signifie que vous perdrez beaucoup d'occasions de gagner des récompenses, ce qui peut être tout aussi grave que de brûler des TRG.
    - !Délégation débondage](/img/Delegation-Unbonding.png) _Notez la commission de 0,5% dans l'interface utilisateur de la - délégation, ainsi que la période de débondage de 28 jours. de 28 jours + !Délégation débondage](/img/Delegation-Unbonding.png) _Notez la commission de 0,5% dans l'interface utilisateur de la délégation, ainsi que la période de débondage de 28 jours. + de 28 jours
    ### Choisir un indexeur digne de confiance avec une rémunération équitable pour les délégués @@ -45,7 +45,7 @@ Réduction de la récompense d'indexation - La réduction de la récompense d'in
    ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Le meilleur indexeur donne aux délégués 90 % des récompenses. Le - celui du milieu donne 20 % aux délégués. Celui du bas donne aux délégués environ 83 %.* + celui du milieu donne 20 % aux délégués. Celui du bas donne aux délégués environ 83 %.*
    - Réduction des frais de requête – Cela fonctionne exactement comme la réduction des récompenses d’indexation. Cependant, cela concerne spécifiquement les retours sur les frais de requête collectés par l’indexeur. Il convient de noter qu’au démarrage du réseau, les retours sur les frais de requête seront très faibles par rapport à la récompense d’indexation. Il est recommandé de prêter attention au réseau pour déterminer quand les frais de requête sur le réseau commenceront à être plus importants. From 0393543c72bed9b71fdbf199f76916cf1a68af61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:24 -0400 Subject: [PATCH 747/924] New translations delegating.mdx (Arabic) --- website/pages/ar/network/delegating.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/pages/ar/network/delegating.mdx b/website/pages/ar/network/delegating.mdx index e5a9fb6b8955..eea33ceb91da 100644 --- a/website/pages/ar/network/delegating.mdx +++ b/website/pages/ar/network/delegating.mdx @@ -32,7 +32,9 @@ Whenever a Delegator wants to undelegate, their tokens are subject to a 28-day u One thing to consider as well is choosing an Indexer wisely. If you choose an Indexer who was not trustworthy, or not doing a good job, you will want to undelegate, which means you will be losing a lot of opportunities to earn rewards, which can be just as bad as burning GRT. -
    لاحظ 0.5٪ رسوم التفويض ، بالإضافة إلى فترة 28 يوما لإلغاء التفويض.
    +
    + لاحظ 0.5٪ رسوم التفويض ، بالإضافة إلى فترة 28 يوما لإلغاء التفويض. +
    ### اختيار مفهرس جدير بالثقة مع عائد جيد للمفوضين From 597ae66e960e0b4876e2e9c2eb28256dad94dd7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:25 -0400 Subject: [PATCH 748/924] New translations delegating.mdx (Czech) --- website/pages/cs/network/delegating.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/cs/network/delegating.mdx b/website/pages/cs/network/delegating.mdx index 18b3a90c7ce0..df6ce204f133 100644 --- a/website/pages/cs/network/delegating.mdx +++ b/website/pages/cs/network/delegating.mdx @@ -44,8 +44,8 @@ To je důležitá část, kterou je třeba pochopit. Nejprve si probereme tři v Indexační podíl na odměně - Indexační podíl na odměně je část odměny, kterou si indexátor ponechá pro sebe. To znamená, že pokud je nastavena na 100%, jako delegát získáte 0 odměn za indexaci. Pokud se v uživatelském rozhraní zobrazí hodnota 80%, znamená to, že jako delegát obdržíte 20%. Důležitá poznámka - na začátku sítě budou odměny za indexování tvořit většinu odměn.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Nejlepší indexátor dává delegátům 90 % odměn. Na prostřední dává - delegátům 20 % odměn. Spodní dává delegátům ~83 %.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Nejlepší indexátor dává delegátům 90 % odměn. Na + prostřední dává delegátům 20 % odměn. Spodní dává delegátům ~83 %.*
    - Snížení poplatku za dotaz - Funguje stejně jako snížení odměny za indexování. Jedná se však konkrétně o výnosy z poplatků za dotaz, které indexátor vybere. Je třeba poznamenat, že na začátku sítě budou výnosy z poplatků za dotazování ve srovnání s odměnou za indexaci velmi malé. Doporučujeme věnovat pozornost síti, abyste zjistili, kdy začnou být poplatky za dotazování v síti významnější. From ddfcac4fe399e9cd6c6533c410dd1260564b2bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:26 -0400 Subject: [PATCH 749/924] New translations delegating.mdx (Italian) --- website/pages/it/network/delegating.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/it/network/delegating.mdx b/website/pages/it/network/delegating.mdx index 344420fccebd..8f07f0b33986 100644 --- a/website/pages/it/network/delegating.mdx +++ b/website/pages/it/network/delegating.mdx @@ -33,8 +33,8 @@ Ogni volta che un Delegator vuole riottenere i suoi token, questi sono soggetti Una cosa da considerare è anche la scelta oculata di un Indexer. Se scegliete un Indexer che non è affidabile o che non sta facendo un buon lavoro, vorrete annullare la delega, il che significa che perderete molte opportunità di guadagnare ricompense, il che può essere altrettanto negativo che bruciare GRT.
    - ![Sblocco di Delegator](/img/Delegation-Unbonding.png) _Nota la commissione del 0,5% nel UI della delegazione, così - come il periodo di sblocco di 28 giorni. periodo di sblocco._ + ![Sblocco di Delegator](/img/Delegation-Unbonding.png) _Nota la commissione del 0,5% nel UI della delegazione, così come il periodo di sblocco di 28 giorni. + periodo di sblocco._
    ### Scegliere un Indexer affidabile con una giusta ricompensa per i Delegator @@ -44,8 +44,8 @@ Questa è una parte importante da capire. Per prima cosa discutiamo di tre valor Taglio della ricompensa di indicizzazione - Il taglio della ricompensa di indicizzazione è la parte delle ricompense che l'Indexer terrà per sé. Ciò significa che se è impostato al 100%, come delegator riceverete 0 ricompense di indicizzazione. Se nel UI vedete 80%, significa che come Delegator riceverete il 20%. Una nota importante: all'inizio della rete, le ricompense di indicizzazione rappresentano la maggior parte delle ricompense.
    - ![Taglio delle ricompense dell'indicizzazione](/img/Indexing-Reward-Cut.png) *Il top Indexer sta dando ai Delegator il - 90% delle ricompense. Il centrale dà ai Delegator il 20%. Quello in basso dà ai Delegator ~83%.* + ![Taglio delle ricompense dell'indicizzazione](/img/Indexing-Reward-Cut.png) *Il top Indexer sta dando ai Delegator il 90% delle ricompense. Il + centrale dà ai Delegator il 20%. Quello in basso dà ai Delegator ~83%.*
    - Taglio delle tariffe di query - Funziona esattamente come il Taglio della ricompensa di indicizzazione. Tuttavia, riguarda specificamente i rendimenti delle tariffe di query raccolte dal Indexer. Va notato che all'inizio della rete, i rendimenti delle tariffe di query saranno molto ridotti rispetto alla ricompensa di indicizzazione. Si raccomanda di prestare attenzione alla rete per determinare quando le tariffe di query nella rete inizieranno a essere più significative. From 6179170b29aaeab79265e7ae55e12f7c0379242f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:27 -0400 Subject: [PATCH 750/924] New translations delegating.mdx (Dutch) --- website/pages/nl/network/delegating.mdx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/pages/nl/network/delegating.mdx b/website/pages/nl/network/delegating.mdx index 505bc480d83c..9cf383d14f26 100644 --- a/website/pages/nl/network/delegating.mdx +++ b/website/pages/nl/network/delegating.mdx @@ -33,8 +33,7 @@ Wanneer een Delegeerder een delegatie wil sluiten, zijn hun tokens gebonden aan Een andere overweging is ook het wijs kiezen van een Indexeerder. Als je een Indexeerder kiest die niet betrouwbaar was of zijn werk niet goed doet, wil je je delegatie sluiten, wat betekent dat je veel kansen om beloningen te ontvangen zal missen wat net zo slecht kan zijn als GRT verbranden.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Let op de 0,5% belasting in de Delegatie UI, evenals de - 28-daagse ontbindingsperiode_ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Let op de 0,5% belasting in de Delegatie UI, evenals de 28-daagse ontbindingsperiode_
    ### Het kiezen van een betrouwbare Indexeerder met een eerlijke beloningsuitbetaling voor Delegeerders @@ -44,8 +43,7 @@ Dit is een belangrijk aspect om te begrijpen. Laten we eerst drie zeer belangrij Indexing Reward Cut - De indexing reward cut is het deel van de beloningen dat de Indexeerder voor zichzelf zal houden. Dat betekent dat als het is ingesteld op 100%, je als delegeerder 0% van de beloningen voor het indexeren krijgt. Als je 80% ziet op de website, betekent dit dat je als Delegeerder 20% van de beloningen ontvangt. Een belangrijke opmerking - aan het begin van het netwerk zullen Indexing Rewards het grootste deel van de beloningen uitmaken.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *De bovenste Indexeerder geeft Delegeerders 90% van de - beloningen. De middelste geeft Delegeerders 20%. De onderste geeft Delegeerders ~83%.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *De bovenste Indexeerder geeft Delegeerders 90% van de beloningen. De middelste geeft Delegeerders 20%. De onderste geeft Delegeerders ~83%.*
    - Query Fee Cut - Dit werkt precies hetzelfde als de Indexing Reward Cut. Dit is echter specifiek voor opbrengsten uit de querykosten die de Indexer binnen krijgt. Aan het begin van het netwerk zullen de opbrengsten uit querykosten erg klein zijn in vergelijking met de opbrengsten van het indexeren. Het wordt aanbevolen om aandacht te besteden aan het netwerkactiviteit om te bepalen wanneer de querykosten in het netwerk significant zullen worden. From 3f53679f04b836f8bf92b1f41e950189dd9396c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:28 -0400 Subject: [PATCH 751/924] New translations delegating.mdx (Portuguese) --- website/pages/pt/network/delegating.mdx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/pages/pt/network/delegating.mdx b/website/pages/pt/network/delegating.mdx index 38324efaa954..1eff5f9b506c 100644 --- a/website/pages/pt/network/delegating.mdx +++ b/website/pages/pt/network/delegating.mdx @@ -33,8 +33,7 @@ Se um Delegado quiser cancelar a sua delegação, seus tokens estarão sujeitos Considere escolher um Indexador com muito cuidado. Se escolher um Indexador que não é de confiança, ou não fez um bom trabalho, talvez queira cancelar a sua delegação, o que implica em sacrificar muitas oportunidades de recompensa, o que pode ser tão lamentável quanto queimar GRT.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Perceba a taxa de 0.5% na interface da Delegação, além do - período de separação de 28 dias._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Perceba a taxa de 0.5% na interface da Delegação, além do período de separação de 28 dias._
    ### Como escolher um Indexador de confiança, com um pagamento justo para Delegantes @@ -44,8 +43,7 @@ Isto é importante. Primeiro, vamos discutir três valores muito importantes: os Porção da Recompensa de Indexação - Esta é a porção das recompensas que o Indexador guardará para si. Isto significa que, se configurada para 100%, o Delegante receberá 0 recompensas de indexação. Se ver 80% na interface, isto significa que, como Delegado, receberá 20%. Importante saber que no começo da rede, as Recompensas de Indexação contarão como a maioria das recompensas.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *O Indexador acima está a dar 90% das recompensas aos Delegantes, - o do meio dá 20%, e o de baixo dá cerca de 83%.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *O Indexador acima está a dar 90% das recompensas aos Delegantes, o do meio dá 20%, e o de baixo dá cerca de 83%.*
    - Porção da Taxa de Recompensa - Isto funciona exatamente como a Porção da Recompensa de Indexação, sendo especificamente para retornos nas taxas de consulta coletadas pelo Indexador. Perceba que, no começo da rede, os retornos de taxas de query serão muito menores que a recompensa de indexação. Vale prestar atenção na rede para determinar quando as taxas de consulta na rede começarão a ser mais significantes. From fc656806a375b61edf5a907978e911830c8258fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:29 -0400 Subject: [PATCH 752/924] New translations delegating.mdx (Russian) --- website/pages/ru/network/delegating.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ru/network/delegating.mdx b/website/pages/ru/network/delegating.mdx index 5d2bdf1326a5..ed6f3a0c5332 100644 --- a/website/pages/ru/network/delegating.mdx +++ b/website/pages/ru/network/delegating.mdx @@ -33,8 +33,8 @@ title: Делегирование Еще одним аспектом, который стоит учитывать, является разумный выбор Индексатора. Если вы выберете ненадежного или некомпетентного Индексатора, вам, возможно, захочется отозвать делегирование, что в свою очередь означает потерю множества возможностей для получения вознаграждений. Это может быть столь плохо, как и сжигание токенов GRT.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Обратите внимание на комиссию в размере 0,5% в - пользовательском интерфейсе Delegation, а также на 28-дневный срок период разблокировки._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Обратите внимание на комиссию в размере 0,5% в пользовательском интерфейсе Delegation, а также на 28-дневный срок + период разблокировки._
    ### Выбор надежного Индексатора со справедливым распределением вознаграждений для Делегаторов From dd94b9986fa4955c66cb664d3a1ab6cde5059969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:30 -0400 Subject: [PATCH 753/924] New translations delegating.mdx (Swedish) --- website/pages/sv/network/delegating.mdx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/website/pages/sv/network/delegating.mdx b/website/pages/sv/network/delegating.mdx index 27bad461386c..65204d68d29d 100644 --- a/website/pages/sv/network/delegating.mdx +++ b/website/pages/sv/network/delegating.mdx @@ -33,8 +33,8 @@ När som helst en Delegater vill upphäva sin delegering är deras tokens förem En sak att tänka på är också att välja en Indexer klokt. Om du väljer en Indexer som inte var pålitlig eller inte gjorde ett bra jobb, kommer du att vilja upphäva, vilket innebär att du kommer att förlora många möjligheter att tjäna belöningar, vilket kan vara lika dåligt som att bränna GRT.
    - ![Delegation upphävning](/img/Delegation-Upphävning.png) _Observera avgiften på 0,5% i Delegation UI, samt den 28 - dagar långa upphävningsperioden._ + ![Delegation upphävning](/img/Delegation-Upphävning.png) _Observera avgiften +på 0,5% i Delegation UI, samt den 28 dagar långa upphävningsperioden._
    ### Att välja en pålitlig Indexer med en rättvis belöningsutbetalning till Delegater @@ -44,8 +44,9 @@ Detta är en viktig del att förstå. Först låt oss diskutera tre mycket vikti Indexing Reward Cut - Indexing reward cut är den del av belöningarna som Indexer kommer att behålla för sig själva. Det betyder om den är inställd på 100%, som en Delegater kommer du att få 0 indexing rewards. Om du ser 80% i UI, innebär det att du som Delegater kommer att få 20%. En viktig notering - i början av nätverket kommer Indexing Rewards att utgöra majoriteten av belöningarna.
    - ![Indexing Edward Cut](/img/Indexing-Edward-Cut.png) *Den översta Indexet ger Delegater 90% av belöningarna. Den - mellersta ger Delegater 20%. Den nedersta ger Delegater ~83%.* + ![Indexing Edward Cut](/img/Indexing-Edward-Cut.png) *Den översta Indexet ger +Delegater 90% av belöningarna. Den mellersta ger Delegater 20%. Den nedersta +ger Delegater ~83%.*
    - Query Fee Cut - Detta fungerar precis som Indexing Reward Cut. Detta gäller dock för avkastningen på frågebetalningar som Indexer samlar in. Det bör noteras att i början av nätverket kommer avkastningen från frågebetalningar att vara mycket små jämfört med indexeringsbelöningen. Det rekommenderas att uppmärksamma nätverket för att avgöra när frågebetalningarna i nätverket kommer att börja vara mer betydande. From 12bd7b59abfb19878473513232252036deef8d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:30 -0400 Subject: [PATCH 754/924] New translations delegating.mdx (Turkish) --- website/pages/tr/network/delegating.mdx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/pages/tr/network/delegating.mdx b/website/pages/tr/network/delegating.mdx index ba7c066ce8a2..c2f28e949987 100644 --- a/website/pages/tr/network/delegating.mdx +++ b/website/pages/tr/network/delegating.mdx @@ -33,8 +33,7 @@ Bir delegatör, stak ettiği tokenları geri almak istediğinde, tokenları 28 g Dikkate alınması gereken bir şey de akıllıca bir indeksleyici seçmektir. Güvenilir olmayan veya iyi bir iş çıkarmayan bir indeksleyici seçerseniz, stake ettiğiniz token’ları geri almak istersiniz. Bu da GRT'yi yakmak kadar kötü olabilecek olan bir durum gibidir, yani ödül kazanmak için birçok fırsatı kaybedeceğiniz anlamına gelir.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Delegasyon Kullanıcı Arayüzündeki %0,5 ücreti ve 28 günlük - ayrılma süresini bir yere not edin._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Delegasyon Kullanıcı Arayüzündeki %0,5 ücreti ve 28 günlük ayrılma süresini bir yere not edin._
    ### Delegatörler İçin Adil Bir Ödül Ödemesi Olan Güvenilir Bir İndeksleyici Seçme @@ -44,8 +43,7 @@ Bu anlaşılması gereken önemli bir kısımdır. Öncelikle, Delegasyon Parame İndeksleme Ödül Kesintisi - İndeksleme ödül kesintisi, ödüllerin indeksleyicinin kendisi için tutacağı kısmıdır. Bu, %100'e ayarlanırsa, delegatörn olarak 0 indeksleme ödülü alacağınız anlamına gelir. Kullanıcı arayüzünde %80 görürseniz, bu bir delegatör olarak %20 alacağınız anlamına gelir. Önemli bir not - ağın başlangıcında, indeksleme ödülleri, ödüllerin çoğuna sahip olacaktır.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *En iyi indeksleyici, delegatörlere ödüllerin %90'ını veriyor. - Ortadaki, delegatörlere %20 veriyor. Alttaki, delegatörlere ~%83 veriyor.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *En iyi indeksleyici, delegatörlere ödüllerin %90'ını veriyor. Ortadaki, delegatörlere %20 veriyor. Alttaki, delegatörlere ~%83 veriyor.*
    - Sorgu Ücreti Kesintisi - Bu, tam olarak indeksleme ödül kesintisi gibi çalışır. Ancak bu, özellikle indeksleyicinin topladığı sorgu ücretlerinin getirileri içindir. Ağın başlangıcında, sorgu ücretlerinden elde edilen getirilerin, indeksleme ödülüne kıyasla çok küçük olacağı belirtilmelidir. Ağdaki sorgu ücretlerinin ne zaman daha belirgin olmaya başlayacağını belirlemek için ağa dikkat edilmesi önerilir. From a4daaff90c35dc5230ac2f495d348cf056de0842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:31 -0400 Subject: [PATCH 755/924] New translations delegating.mdx (Ukrainian) --- website/pages/uk/network/delegating.mdx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/pages/uk/network/delegating.mdx b/website/pages/uk/network/delegating.mdx index 64584883d14b..a4fe90cf6c5a 100644 --- a/website/pages/uk/network/delegating.mdx +++ b/website/pages/uk/network/delegating.mdx @@ -33,8 +33,7 @@ title: Делегування Важливо також враховувати, що вибір індексатора має бути обґрунтованим. Якщо ви вирішите обрати індексатора, який не заслуговує на довіру або погано виконує свою роботу, ви побажаєте відмовитися від делегування, а це означає, що ви втратите багато можливостей заробити винагороду, що може бути так само погано, як і спалювання GRT.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Зверніть увагу на комісію в розмірі 0,5% в Інтерфейсі для - делегацій, а також на 28-денний період розблокування._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Зверніть увагу на комісію в розмірі 0,5% в Інтерфейсі для делегацій, а також на 28-денний період розблокування._
    ### Вибір надійного індексатора зі справедливою винагородою для делегатів @@ -44,8 +43,7 @@ title: Делегування Частина винагороди за індексацію (Indexing Reward Cut) — це частина винагороди, яку індексатор залишає собі. Це означає, що якщо вона встановлена на рівні 100%, то як делегат ви отримаєте 0% за індексацію. Якщо в інтерфейсі ви бачите 80%, це означає, що як делегат ви отримаєте 20%. Важливе зауваження — на початку роботи мережі винагороди за індексацію будуть складати більшу частину доходів.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Найкращий індексатор віддає делегатам 90% від суми винагороди. - Середній - 20%. Найменший індексатор дає ~83%. * + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Найкращий індексатор віддає делегатам 90% від суми винагороди. Середній - 20%. Найменший індексатор дає ~83%. *
    - Частина від винагороди за запити — працює точно так само, як і за індексацію. Однак, це стосується саме повернення комісії за запити, яку отримує індексатор. Слід зазначити, що на початку роботи мережі прибуток від комісійних за запити буде дуже малий в порівнянні з винагородою за індексацію. Рекомендується стежити за мережею, щоб визначити, коли комісія за запити в мережі почне бути більш значущою. From a3c84922c3b93133088f250976d9899d75516963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:31 -0400 Subject: [PATCH 756/924] New translations delegating.mdx (Chinese Simplified) --- website/pages/zh/network/delegating.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/pages/zh/network/delegating.mdx b/website/pages/zh/network/delegating.mdx index 9a0d6888d54c..09208995ad22 100644 --- a/website/pages/zh/network/delegating.mdx +++ b/website/pages/zh/network/delegating.mdx @@ -32,7 +32,9 @@ title: 委托 还需要考虑的一件事是明智地选择索引人。 如果您选择了一个不值得信赖的 索引人,或者没有做好工作,您将想要取消委托,这意味着您将失去很多获得奖励的机会,这可能与耗费 GRT 一样糟糕。 -
    请注意委托用户界面中的0.5%费用,以及28天的解约期。
    +
    + 请注意委托用户界面中的0.5%费用,以及28天的解约期。 +
    ### 选择一个为委托人提供公平的奖励分配的值得信赖的索引人 @@ -41,8 +43,7 @@ title: 委托 索引奖励分成- 索引奖励分成是指索引人将为自己保留的那部分奖励。 这意味着,如果它被设置为 100%,作为一个委托人,你将获得 0 个索引奖励。 如果你在 UI 中看到 80%,这意味着作为委托人,你将获得 20%。 一个重要的说明 -在网络的初期,索引奖励将占奖励的大部分比重。
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *上 面的索引人分给委托人 90% 的收益。 中间的给委托人 20%。 - 下面的给委托人约 83%。 + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *上 面的索引人分给委托人 90% 的收益。 中间的给委托人 20%。 下面的给委托人约 83%。
    - 查询费分成-这与索引奖励分成的运作方式完全相同。 不过,这是专门针对索引人收取的查询费的回报。 需要注意的是,在网络初期,查询费的回报与索引奖励相比会非常小。 建议关注网络来确定网络中的查询费何时开始变的比较可观。 From 6583517939dfb0414231571b2e557bf40703fb2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:32 -0400 Subject: [PATCH 757/924] New translations delegating.mdx (Urdu (Pakistan)) --- website/pages/ur/network/delegating.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/website/pages/ur/network/delegating.mdx b/website/pages/ur/network/delegating.mdx index 2e274a6d8aab..a9df7189a9ae 100644 --- a/website/pages/ur/network/delegating.mdx +++ b/website/pages/ur/network/delegating.mdx @@ -33,8 +33,8 @@ title: ڈیلیگیٹنگ غور کرنے کی ایک چیز یہ ہے کہ انڈیکسر کا انتخاب دانشمندی سے کریں۔اگر آپ انڈیکسر کا انتخاب کرتے ہیں جو قابل اعتماد نہیں تھا،یا اچھا کام نہیں کر رہا،آپ غیر منتخب کرنا چاہیں گے،جس کا مطلب ہے آپ انعامات حاصل کرنے کے بہت سے مواقع کھو رہے ہوں گے،جو GRT کو جلانے جیسا ہی برا ہو سکتا ہے.
    - [ڈیلیگیشن ان بانڈنگ](/img/Delegation-Unbonding.png) _ڈیلیگیشن UI میں 0.5% فیس نوٹ کریں، ساتھ ہی 28 دن غیر بندھن کی - مدت۔_ + [ڈیلیگیشن ان بانڈنگ](/img/Delegation-Unbonding.png) _ڈیلیگیشن UI میں 0.5% فیس نوٹ کریں، ساتھ ہی 28 دن + غیر بندھن کی مدت۔_
    ### ڈیلیگیٹرز کے لیے منصفانہ انعامی ادائیگی کے ساتھ ایک قابل اعتماد انڈیکسر کا انتخاب کرنا @@ -44,8 +44,7 @@ title: ڈیلیگیٹنگ انڈیکسنگ ریوارڈ کٹ - انڈیکسنگ ریوارڈ کٹ انعامات کا وہ حصہ ہے جو انڈیکسر اپنے لیے رکھے گا۔ اس کا مطلب ہے کہ اگر یہ 100% پر سیٹ ہے، بطور ڈیلیگیٹر آپ کو 0 انڈیکسنگ کےانعامات ملیں گے۔ اگر آپ UI میں 80٪ دیکھتے ہیں،اس کا مطلب ہے کہ بطور ڈیلیگیٹر، آپ کو 20% ملے گا۔ ایک اہم نوٹ - نیٹ ورک کے آغاز میں، انڈیکسنگ انعامات کی اکثریت کا حصہ ہوں گے.
    - ![انڈیکسنگ ریوارڈ کٹ](/img/Indexing-Reward-Cut.png) *سب سے اوپر انڈیکسر ڈیلیگیٹرز کو 90% انعامات دے رہا ہے. درمیان - والا ڈیلیگیٹرز کو 20% دے رہا ہے۔ نیچے والا ڈیلیگیٹرز کو ~83% دے رہا ہے۔* + ![انڈیکسنگ ریوارڈ کٹ](/img/Indexing-Reward-Cut.png) *سب سے اوپر انڈیکسر ڈیلیگیٹرز کو 90% انعامات دے رہا ہے. درمیان والا ڈیلیگیٹرز کو 20% دے رہا ہے۔ نیچے والا ڈیلیگیٹرز کو ~83% دے رہا ہے۔*
    - کیوری فیس کٹوتی - یہ بلکل انڈیکسنگ ریوارڈ کٹ کی طرح کام کرتا ہے. البتہ، یہ خاص طور پر انڈیکسر جمع کردہ کیوری کی فیس پر واپسی کے لیے ہے۔ واضح رہے کہ نیٹ ورک کے آغاز پر، کیوری فیس سے واپسی انڈیکسنگ کے انعامات کے مقابلے میں بہت کم ہوگی۔ اس بات کا تعین کرنے کے لیے نیٹ ورک پر توجہ دینے کی سفارش کی جاتی ہے کہ نیٹ ورک میں کیوری کی فیس کب زیادہ اہم ہونا شروع ہو گی. From 2d12b56722e7b323ea81c6cd6ced8044e6e72e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:33 -0400 Subject: [PATCH 758/924] New translations delegating.mdx (Marathi) --- website/pages/mr/network/delegating.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/mr/network/delegating.mdx b/website/pages/mr/network/delegating.mdx index 74e6bf0d8e10..4370f27cb5c4 100644 --- a/website/pages/mr/network/delegating.mdx +++ b/website/pages/mr/network/delegating.mdx @@ -34,7 +34,7 @@ Listed below are the main risks of being a Delegator in the protocol.
    ![प्रतिनिधी अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलिगेशन UI मध्ये 0.5% शुल्क तसेच २८ दिवसांची नोंद घ्या - अनबॉन्डिंग कालावधी._ + अनबॉन्डिंग कालावधी._
    ### Choosing a trustworthy Indexer with a fair reward payout for Delegators @@ -44,8 +44,8 @@ Listed below are the main risks of being a Delegator in the protocol. इंडेक्सिंग रिवॉर्ड कट - इंडेक्सिंग रिवॉर्ड कट हा रिवॉर्डचा भाग आहे जो इंडेक्सर स्वतःसाठी ठेवतो. याचा अर्थ 100% वर सेट केल्यास, प्रतिनिधी म्हणून तुम्हाला 0 इंडेक्सिंग रिवॉर्ड मिळतील. तुम्हाला UI मध्ये 80% दिसल्यास, याचा अर्थ प्रतिनिधी म्हणून, तुम्हाला 20% मिळेल. एक महत्त्वाची टीप - नेटवर्कच्या सुरूवातीस, बहुसंख्य पुरस्कारांसाठी अनुक्रमणिका रिवॉर्ड्स असतील.
    - ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *टॉप इंडेक्सर प्रतिनिधींना 90% बक्षिसे देत आहे. द मधला - प्रतिनिधी 20% देत आहे. सर्वात खालचा भाग प्रतिनिधींना ~83% देत आहे.* + ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *टॉप इंडेक्सर प्रतिनिधींना 90% बक्षिसे देत आहे. द + मधला प्रतिनिधी 20% देत आहे. सर्वात खालचा भाग प्रतिनिधींना ~83% देत आहे.*
    - क्वेरी फी कट - हे इंडेक्सिंग रिवॉर्ड कट प्रमाणेच कार्य करते. तथापि, हे विशेषत: इंडेक्सर गोळा केलेल्या क्वेरी शुल्कावरील परताव्यासाठी आहे. हे लक्षात घेतले पाहिजे की नेटवर्कच्या सुरूवातीस, अनुक्रमणिकेच्या रिवॉर्डच्या तुलनेत क्वेरी फीमधून मिळणारे रिटर्न खूपच कमी असेल. नेटवर्कमधील क्वेरी शुल्क अधिक लक्षणीय केव्हा सुरू होईल हे निर्धारित करण्यासाठी नेटवर्ककडे लक्ष देण्याची शिफारस केली जाते. From f31011776a14a698ec9a6165de446b5207202562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:34 -0400 Subject: [PATCH 759/924] New translations delegating.mdx (Hindi) --- website/pages/hi/network/delegating.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/pages/hi/network/delegating.mdx b/website/pages/hi/network/delegating.mdx index b66e0e9e4ce2..3ced69566ba6 100644 --- a/website/pages/hi/network/delegating.mdx +++ b/website/pages/hi/network/delegating.mdx @@ -33,8 +33,8 @@ title: Delegating एक बात पर भी विचार करना चाहिए कि एक इंडेक्सर को बुद्धिमानी से चुनना है। यदि आप एक ऐसे इंडेक्सर को चुनते हैं जो भरोसेमंद नहीं था, या अच्छा काम नहीं कर रहा था, तो आप अनाधिकृत करना चाहेंगे, जिसका अर्थ है कि आप पुरस्कार अर्जित करने के बहुत सारे अवसर खो देंगे, जो जीआरटी जलाने जितना ही बुरा हो सकता है।
    - ![डेलिगेशन अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलीगेशन UI में 0.5% शुल्क और साथ ही 28 दिन पर ध्यान दें बंधन - अवधि._ + ![डेलिगेशन अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलीगेशन UI में 0.5% शुल्क और साथ ही 28 दिन पर ध्यान दें + बंधन अवधि._
    ### डेलीगेटर्स के लिए उचित इनाम भुगतान के साथ एक भरोसेमंद इंडेक्सर चुनना @@ -44,8 +44,8 @@ title: Delegating इंडेक्सिंग रिवार्ड कट - इंडेक्सिंग रिवार्ड कट उन रिवॉर्ड्स का हिस्सा है जो इंडेक्सर अपने लिए रखेंगे। इसका मतलब है कि अगर इसे 100% पर सेट किया जाता है, तो डेलिगेटर के तौर पर आपको 0 इंडेक्सिंग रिवॉर्ड्स मिलेंगे। यदि आप यूआई में 80% देखते हैं, तो इसका मतलब है कि एक प्रतिनिधि के रूप में, आपको 20% प्राप्त होगा। एक महत्वपूर्ण नोट - नेटवर्क की शुरुआत में, इंडेक्सिंग रिवार्ड्स अधिकांश पुरस्कारों के लिए जिम्मेदार होंगे।
    - ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *शीर्ष इंडेक्सर डेलीगेटर्स को पुरस्कारों का 90% दे रहा है। बीच - वाला प्रतिनिधि को 20% दे रहा है। नीचे वाला डेलिगेटरों को ~83% दे रहा है।* + ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *शीर्ष इंडेक्सर डेलीगेटर्स को पुरस्कारों का 90% दे रहा है। + बीच वाला प्रतिनिधि को 20% दे रहा है। नीचे वाला डेलिगेटरों को ~83% दे रहा है।*
    - प्रश्न शुल्क कट - यह बिल्कुल इंडेक्सिंग रिवार्ड कट की तरह काम करता है। हालाँकि, यह विशेष रूप से इंडेक्सर द्वारा एकत्र की जाने वाली क्वेरी फीस पर रिटर्न के लिए है। यह ध्यान दिया जाना चाहिए कि नेटवर्क की शुरुआत में, इंडेक्सिंग रिवार्ड की तुलना में क्वेरी फीस से रिटर्न बहुत कम होगा। यह निर्धारित करने के लिए नेटवर्क पर ध्यान देने की सिफारिश की जाती है कि नेटवर्क में क्वेरी शुल्क कब अधिक महत्वपूर्ण होने लगेगा। From b1367dc2e5f8d852104b401645cf4645cac14512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:43 -0400 Subject: [PATCH 760/924] New translations indexing.mdx (Romanian) --- website/pages/ro/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/ro/network/indexing.mdx b/website/pages/ro/network/indexing.mdx index 9bdc2fb2eb7e..842a5c8e0c74 100644 --- a/website/pages/ro/network/indexing.mdx +++ b/website/pages/ro/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From 10964b14d99c503c778345bf4414d9113f192aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:44 -0400 Subject: [PATCH 761/924] New translations indexing.mdx (French) --- website/pages/fr/network/indexing.mdx | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/fr/network/indexing.mdx b/website/pages/fr/network/indexing.mdx index c6045ec4adcd..82d105c1006e 100644 --- a/website/pages/fr/network/indexing.mdx +++ b/website/pages/fr/network/indexing.mdx @@ -113,11 +113,11 @@ Les indexeurs peuvent se différencier en appliquant des techniques avancées po - **Large** : Prêt à indexer tous les subgraphs actuellement utilisés et à répondre aux demandes pour le trafic associé. | Installation | Postgres
    (CPUs) | Postgres
    (mémoire en Gbs) | Postgres
    (disque en TB) | VMs
    (CPUs) | VMs
    (mémoire en Gbs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Petit | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 11 | 12 | 48 | -| Moyen | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | | +| ------------ |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| +| Petit | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 11 | 12 | 48 | +| Moyen | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | | ### Quelles sont les précautions de sécurité de base qu’un indexeur doit prendre ? @@ -149,20 +149,20 @@ Remarque : Pour prendre en charge la mise à l'échelle agile, il est recommand #### Nœud de The Graph -| Port | Objectif | Routes | Paramètre CLI | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Objectif | Routes | Paramètre CLI | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From a195491e1281022176375207cf1fb9e9e6efc74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:44 -0400 Subject: [PATCH 762/924] New translations indexing.mdx (Spanish) --- website/pages/es/network/indexing.mdx | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/es/network/indexing.mdx b/website/pages/es/network/indexing.mdx index b3ed8579fb0b..9b272559f5a6 100644 --- a/website/pages/es/network/indexing.mdx +++ b/website/pages/es/network/indexing.mdx @@ -113,11 +113,11 @@ Los indexadores pueden diferenciarse aplicando técnicas avanzadas para tomar de - **Grande**: Preparado para indexar todos los subgrafos utilizados actualmente y atender solicitudes para el tráfico relacionado. | Configuración | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Pequeño | 4 | 8 | 1 | 4 | 16 | -| Estándar | 8 | 30 | 1 | 12 | 48 | -| Medio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3,5 | 48 | 184 | +| ------------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Pequeño | 4 | 8 | 1 | 4 | 16 | +| Estándar | 8 | 30 | 1 | 12 | 48 | +| Medio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3,5 | 48 | 184 | ### ¿Qué precauciones básicas de seguridad debe tomar un Indexador? @@ -149,20 +149,20 @@ Nota: Para admitir el escalado ágil, se recomienda que las inquietudes de consu #### Graph Node -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| --- | --- | --- | --- | --- | -| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | -| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | -| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| ------ | -------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------- | +| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | +| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | +| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | #### Servicio de Indexador -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| --- | --- | --- | --- | --- | -| 7600 | Servidor HTTP GraphQL
    (para consultas de subgrafo pagadas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| ------ | --------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | Servidor HTTP GraphQL
    (para consultas de subgrafo pagadas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Métricas de Prometheus | /metrics | --metrics-port | - | #### Agente Indexador From a14ab7bd4b087fea4f1c08b12929755f1e4ed906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:45 -0400 Subject: [PATCH 763/924] New translations indexing.mdx (Arabic) --- website/pages/ar/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/ar/network/indexing.mdx b/website/pages/ar/network/indexing.mdx index abe53eae2f89..26ba96bbe16d 100644 --- a/website/pages/ar/network/indexing.mdx +++ b/website/pages/ar/network/indexing.mdx @@ -63,7 +63,7 @@ Allocations are continuously accruing rewards while they're active and allocated - انتقل إلى [ واجهة Etherscan لعقد المكافآت Rewards contract ](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) * لاستدعاء `getRewards()`: - - قم بتوسيع ** 10 .الحصول على المكافآت ** القائمة المنسدلة. + - قم بتوسيع ** 10 .الحصول على المكافآت ** القائمة المنسدلة. - أدخل ** معرّف التخصيص ** في الإدخال. - انقر فوق الزر ** الاستعلام **. @@ -113,11 +113,11 @@ The `queryFeeCut` and `indexingRewardCut` values are delegation parameters that - **كبيرة** - مُعدة لفهرسة جميع ال subgraphs المستخدمة حاليا وأيضا لخدمة طلبات حركة مرور البيانات ذات الصلة. | Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| صغير | 4 | 8 | 1 | 4 | 16 | -| قياسي | 8 | 30 | 1 | 12 | 48 | -| متوسط | 16 | 64 | 2 | 32 | 64 | -| كبير | 72 | 468 | 3.5 | 48 | 184 | +| ----- |:---------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| صغير | 4 | 8 | 1 | 4 | 16 | +| قياسي | 8 | 30 | 1 | 12 | 48 | +| متوسط | 16 | 64 | 2 | 32 | 64 | +| كبير | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ At the center of an Indexer's infrastructure is the Graph Node which monitors th #### Graph Node -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | -| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | -| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| ------ | ------------------------------------------------------- | ------------------------------------------------------------------- | ----------------- | -------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | +| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | +| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | #### خدمة المفهرس -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | port-- | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| ------ | ------------------------------------------------------------ | --------------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | port-- | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | metrics-port-- | - | #### وكيل المفهرس(Indexer Agent) From dfaee1693038d023db2bbff029efd50a60d611d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:46 -0400 Subject: [PATCH 764/924] New translations indexing.mdx (Czech) --- website/pages/cs/network/indexing.mdx | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/cs/network/indexing.mdx b/website/pages/cs/network/indexing.mdx index 61567ffe302a..6eb088873b8c 100644 --- a/website/pages/cs/network/indexing.mdx +++ b/website/pages/cs/network/indexing.mdx @@ -113,11 +113,11 @@ Indexátory se mohou odlišovat použitím pokročilých technik pro rozhodován - **Large** - Připraveno k indexování všech aktuálně nepoužívaných příbuzných podgrafů. | Nastavení | Postgres
    (CPUs) | Postgres
    (paměť v GBs) | Postgres
    (disk v TBs) | VMs
    (CPUs) | VMs
    (paměť v GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Malé | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Střední | 16 | 64 | 2 | 32 | 64 | -| Velký | 72 | 468 | 3.5 | 48 | 184 | +| --------- |:--------------------------:|:---------------------------------:|:--------------------------------:|:---------------------:|:----------------------------:| +| Malé | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Střední | 16 | 64 | 2 | 32 | 64 | +| Velký | 72 | 468 | 3.5 | 48 | 184 | ### Jaká jsou základní bezpečnostní opatření, která by měl indexátor přijmout? @@ -149,20 +149,20 @@ Poznámka: Pro podporu agilního škálování se doporučuje oddělit dotazová #### Uzel Graf -| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | -| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | -| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| ---- | ---------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | +| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | +| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | +| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | #### Služba Indexer -| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (pro placené dotazy na podgrafy) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Metriky Prometheus | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| ---- | --------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (pro placené dotazy na podgrafy) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Metriky Prometheus | /metrics | --metrics-port | - | #### Agent indexátoru From 30a68ee142a3ae5429b1898c7244c61dc390c9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:46 -0400 Subject: [PATCH 765/924] New translations indexing.mdx (German) --- website/pages/de/network/indexing.mdx | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/de/network/indexing.mdx b/website/pages/de/network/indexing.mdx index 8d273d73853d..b0de4567f4fc 100644 --- a/website/pages/de/network/indexing.mdx +++ b/website/pages/de/network/indexing.mdx @@ -113,11 +113,11 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. | Konfiguration | Postgres
    (CPUs) | Postgres
    (Speicher in GB) | Postgres
    (Festplatte in TB) | VMs
    (CPUs) | VMs
    (Speicher in GB) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Klein | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Mittel | 16 | 64 | 2 | 32 | 64 | -| Groß | 72 | 468 | 3.5 | 48 | 184 | +| ------------- |:--------------------------:|:------------------------------------:|:--------------------------------------:|:---------------------:|:-------------------------------:| +| Klein | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Mittel | 16 | 64 | 2 | 32 | 64 | +| Groß | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Der Graph-Knoten -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | -| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | ----------------- | +| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | +| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | #### Indexer Service -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL-HTTP-Server
    (für kostenpflichtige Subgraf-Abfragen) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| ---- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL-HTTP-Server
    (für kostenpflichtige Subgraf-Abfragen) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus-Metriken | /metrics | --metrics-port | - | #### Indexer Agent From 1839ef9d40f4d1c0782a20b2bcbccd3af985f41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:47 -0400 Subject: [PATCH 766/924] New translations indexing.mdx (Italian) --- website/pages/it/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/it/network/indexing.mdx b/website/pages/it/network/indexing.mdx index 33a42fc96831..514e7ea925cb 100644 --- a/website/pages/it/network/indexing.mdx +++ b/website/pages/it/network/indexing.mdx @@ -112,12 +112,12 @@ Gli Indexer possono differenziarsi applicando tecniche avanzate per prendere dec - **Medio** - Indexer di produzione che supporta 100 subgraph e 200-500 richieste al secondo. - **Grande** - È pronto a indicizzare tutti i subgraph attualmente utilizzati e a servire le richieste per il relativo traffico. -| Setup | Postgres
    (CPUs) | Postgres
    (memoria in GBs) | Postgres
    (disco in TBs) | VMs
    (CPUs) | VMs
    (memoria in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Piccolo | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memoria in GBs) | Postgres
    (disco in TBs) | VMs
    (CPUs) | VMs
    (memoria in GBs) | +| -------- |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| +| Piccolo | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3.5 | 48 | 184 | ### Quali sono le precauzioni di base per la sicurezza che un Indexer dovrebbe adottare? @@ -149,20 +149,20 @@ Nota: Per supportare una scalabilità agile, si consiglia di separare le attivit #### Graph Node -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| ----- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | #### Servizio Indexer -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (per le query di subgraph a pagamento) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| ----- | --------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (per le query di subgraph a pagamento) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Metriche di Prometheus | /metrics | --metrics-port | - | #### Indexer Agent From 71cb1ed2adadf922a9b91c8198f8337ae2e91cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:48 -0400 Subject: [PATCH 767/924] New translations indexing.mdx (Japanese) --- website/pages/ja/network/indexing.mdx | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/ja/network/indexing.mdx b/website/pages/ja/network/indexing.mdx index 1f65adb35093..6e7daf5e2b76 100644 --- a/website/pages/ja/network/indexing.mdx +++ b/website/pages/ja/network/indexing.mdx @@ -112,12 +112,12 @@ Use Etherscan to call `getRewards()`: - **Medium** - 100 個のサブグラフと 1 秒あたり 200 ~ 500 のリクエストをサポートするプロダクションインデクサー - **Large** - 現在使用されているすべてのサブグラフのインデックスを作成し、関連するトラフィックのリクエストに対応します -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### インデクサーが取るべきセキュリティ対策は? @@ -149,20 +149,20 @@ Use Etherscan to call `getRewards()`: #### グラフノード -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ------------------------------------------------------- | ------------------------------------------------------ | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ------------------------------------------------------------ | --------------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -730,10 +730,10 @@ default => 0.1 * $SYSTEM_LOAD; 上記のモデルを使用したクエリのコスト計算の例: -| クエリ | 価格 | +| クエリ | 価格 | | ---------------------------------------------------------------------------- | ------- | | { pairs(skip: 5000) { id } } | 0.5 GRT | -| { トークン { シンボル } } | 0.1 GRT | +| { トークン { シンボル } } | 0.1 GRT | | { pairs(skip: 5000) { id { tokens } symbol } } | 0.6 GRT | #### コストモデルの適用 From ce96faba5ba023301bfac73671ac7fae0b0d5a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:49 -0400 Subject: [PATCH 768/924] New translations indexing.mdx (Korean) --- website/pages/ko/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/ko/network/indexing.mdx b/website/pages/ko/network/indexing.mdx index 9bdc2fb2eb7e..842a5c8e0c74 100644 --- a/website/pages/ko/network/indexing.mdx +++ b/website/pages/ko/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From efad5f6e464f9a1037631721774bb48f9680163e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:49 -0400 Subject: [PATCH 769/924] New translations indexing.mdx (Dutch) --- website/pages/nl/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/nl/network/indexing.mdx b/website/pages/nl/network/indexing.mdx index 9bdc2fb2eb7e..842a5c8e0c74 100644 --- a/website/pages/nl/network/indexing.mdx +++ b/website/pages/nl/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From 136992cbe8ce378fb83f9f16c66c8cd5b24190ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:50 -0400 Subject: [PATCH 770/924] New translations indexing.mdx (Polish) --- website/pages/pl/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/pl/network/indexing.mdx b/website/pages/pl/network/indexing.mdx index 9bdc2fb2eb7e..842a5c8e0c74 100644 --- a/website/pages/pl/network/indexing.mdx +++ b/website/pages/pl/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From 618de441b256790306f3ff6111fba19e4dd4da49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:51 -0400 Subject: [PATCH 771/924] New translations indexing.mdx (Portuguese) --- website/pages/pt/network/indexing.mdx | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/website/pages/pt/network/indexing.mdx b/website/pages/pt/network/indexing.mdx index e22041a8bb18..2e04edc3b940 100644 --- a/website/pages/pt/network/indexing.mdx +++ b/website/pages/pt/network/indexing.mdx @@ -63,7 +63,7 @@ Use o Etherscan para chamar o `getRewards()`: - Navegue à [interface do Etherscan para o contrato de Recompensas](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) * Para chamar o `getRewards()`: - - Abra o _dropdown_ **10. getRewards**. + - Abra o *dropdown* **10. getRewards**. - Insira a **allocationID**. - Clique no botão **Query**. @@ -112,12 +112,12 @@ Os Indexadores podem se diferenciar ao aplicar técnicas avançadas para decidir - **Médio** — Indexador de Produção. Apoia 100 subgraphs e 200 – 500 pedidos por segundo. - **Grande** — Preparado para indexar todos os subgraphs usados atualmente e servir pedidos para o tráfego relacionado. -| Setup | Postgres
    (CPUs) | Postgres
    (memória em GBs) | Postgres
    (disco em TBs) | VMs
    (CPUs) | VMs
    (memória em GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Pequeno | 4 | 8 | 1 | 4 | 16 | -| Normal | 8 | 30 | 1 | 12 | 48 | -| Médio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memória em GBs) | Postgres
    (disco em TBs) | VMs
    (CPUs) | VMs
    (memória em GBs) | +| ------- |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| +| Pequeno | 4 | 8 | 1 | 4 | 16 | +| Normal | 8 | 30 | 1 | 12 | 48 | +| Médio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3.5 | 48 | 184 | ### Há alguma precaução básica de segurança que um Indexador deve tomar? @@ -149,20 +149,20 @@ Nota: Para apoiar o escalamento ágil, recomendamos que assuntos de consulta e i #### Graph Node -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| --- | --- | --- | --- | --- | -| 8000 | Servidor HTTP GraphQL
    (para consultas de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | -| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | -| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| ----- | ------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | Servidor HTTP GraphQL
    (para consultas de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | +| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | +| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | #### Serviço Indexador -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| --- | --- | --- | --- | --- | -| 7600 | Servidor HTTP GraphQL
    (para consultas de subgraph pagas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| ----- | ------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | Servidor HTTP GraphQL
    (para consultas de subgraph pagas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Agente Indexador From b09f47959258b703ec4a9cd3f14f4367d2ed3429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:51 -0400 Subject: [PATCH 772/924] New translations indexing.mdx (Russian) --- website/pages/ru/network/indexing.mdx | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/ru/network/indexing.mdx b/website/pages/ru/network/indexing.mdx index ab88480b0ba3..6269c5fd4f9d 100644 --- a/website/pages/ru/network/indexing.mdx +++ b/website/pages/ru/network/indexing.mdx @@ -113,11 +113,11 @@ Once an allocation has been closed the rebates are available to be claimed by th - **Large** – готовность индексировать все используемые в настоящее время подграфы и обслуживать запросы на соответствующий трафик. | Настройка | Postgres
    (ЦП) | Postgres
    (память в ГБ) | Postgres
    (диск в ТБ) | VMs
    (ЦП) | VMs
    (память в ГБ) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| --------- |:------------------------:|:---------------------------------:|:-------------------------------:|:-------------------:|:----------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### Какие основные меры безопасности следует предпринять индексатору? @@ -149,26 +149,26 @@ Once an allocation has been closed the rebates are available to be claimed by th #### Graph Node -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| --- | --- | --- | --- | --- | -| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | -| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | -| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| ---- | ------------------------------------------------------------ | ---------------------------------------------------- | ----------------- | ---------------- | +| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | +| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | +| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | #### Indexer Service -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| --- | --- | --- | --- | --- | -| 7600 | HTTP-сервер GraphQL
    (для платных запросов к подграфам) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | HTTP-сервер GraphQL
    (для платных запросов к подграфам) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Показатели Prometheus | /metrics | --metrics-port | - | #### Indexer Agent -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| --- | --- | --- | --- | --- | -| 8000 | API для управления индексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| ---- | ------------------------------- | ------------ | ------------------------- | --------------------------------------- | +| 8000 | API для управления индексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### Настройка серверной инфраструктуры с помощью Terraform в Google Cloud From 6971c36b7c7f40afaacbe5dfee7ef826bf54238f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:52 -0400 Subject: [PATCH 773/924] New translations indexing.mdx (Swedish) --- website/pages/sv/network/indexing.mdx | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/website/pages/sv/network/indexing.mdx b/website/pages/sv/network/indexing.mdx index 609035dec6fc..f48375d7043a 100644 --- a/website/pages/sv/network/indexing.mdx +++ b/website/pages/sv/network/indexing.mdx @@ -113,11 +113,11 @@ Indexers kan skilja sig åt genom att tillämpa avancerade tekniker för att fat - **Stor** - Förberedd för att indexera alla för närvarande använda subgrafer och att ta emot förfrågningar för relaterad trafik. | Konfiguration | Postgres
    (CPU:er) | Postgres
    (minne i GB) | Postgres
    (disk i TB) | VM:er
    (CPU:er) | VM:er
    (minne i GB) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Liten | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Stor | 72 | 468 | 3,5 | 48 | 184 | +| ------------- |:----------------------------:|:--------------------------------:|:-------------------------------:|:-------------------------:|:-----------------------------:| +| Liten | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Stor | 72 | 468 | 3,5 | 48 | 184 | ### Vilka grundläggande säkerhetsåtgärder bör en Indexer vidta? @@ -149,20 +149,20 @@ Observera: För att stödja smidig skalning rekommenderas det att fråge- och in #### Graf Node -| Port | Syfte | Vägar | CLI-argument | Miljövariabel | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP-server
    (för subgraf-förfrågningar) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (för subgraf-prenumerationer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | -| 8030 | Subgrafindexeringsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-metrar | /metrics | --metrics-port | - | +| Port | Syfte | Vägar | CLI-argument | Miljövariabel | +| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------- | +| 8000 | GraphQL HTTP-server
    (för subgraf-förfrågningar) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (för subgraf-prenumerationer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | +| 8030 | Subgrafindexeringsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-metrar | /metrics | --metrics-port | - | #### Indexertjänst -| Port | Syfte | Vägar | CLI-argument | Miljövariabel | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP-server
    (för betalda subgraf-förfrågningar) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus-metrar | /metrics | --metrics-port | - | +| Port | Syfte | Vägar | CLI-argument | Miljövariabel | +| ---- | ------------------------------------------------------------------ | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP-server
    (för betalda subgraf-förfrågningar) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus-metrar | /metrics | --metrics-port | - | #### Indexeragent From 399493afe987e6b48a4b05d1e43c915d6a272f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:53 -0400 Subject: [PATCH 774/924] New translations indexing.mdx (Turkish) --- website/pages/tr/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/tr/network/indexing.mdx b/website/pages/tr/network/indexing.mdx index 27c87c872378..fb6a2cf1d2bf 100644 --- a/website/pages/tr/network/indexing.mdx +++ b/website/pages/tr/network/indexing.mdx @@ -112,12 +112,12 @@ Bir tahsisat kapatıldıktan sonra iadeler İndeksleyici tarafından talep edile - **Orta** - 100 subgraph ve saniyede 200-500 isteği destekleyen Üretim İndeksleyici. - **Yüksek** - Şu anda kullanılan tüm subgraphları indekslemek ve ilgili trafik için istekleri sunmak için hazırlanmıştır. -| Kurulum | Postgres
    (CPU'lar) | Postgres
    (GB cinsinden bellek) | Postgres
    (TB cinsinden disk) | VM'ler
    (CPU'lar) | VM'ler
    (GB cinsinden bellek) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Düşük | 4 | 8 | 1 | 4 | 16 | -| Standart | 8 | 30 | 1 | 12 | 48 | -| Orta | 16 | 64 | 2 | 32 | 64 | -| Yüksek | 72 | 468 | 3.5 | 48 | 184 | +| Kurulum | Postgres
    (CPU'lar) | Postgres
    (GB cinsinden bellek) | Postgres
    (TB cinsinden disk) | VM'ler
    (CPU'lar) | VM'ler
    (GB cinsinden bellek) | +| -------- |:-----------------------------:|:-----------------------------------------:|:---------------------------------------:|:---------------------------:|:---------------------------------------:| +| Düşük | 4 | 8 | 1 | 4 | 16 | +| Standart | 8 | 30 | 1 | 12 | 48 | +| Orta | 16 | 64 | 2 | 32 | 64 | +| Yüksek | 72 | 468 | 3.5 | 48 | 184 | ### Bir İndeksleyicinin alması gereken bazı temel güvenlik önlemleri nelerdir? @@ -149,20 +149,20 @@ Not: Çevik ölçeklendirmeyi desteklemek için, sorgulama ve indeksleme endişe #### Graph Node -| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP sunucusu
    ( subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    ( subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | -| 8030 | Subgraph indeksleme durum API'si | /graphql | --index-node-port | - | -| 8040 | Prometheus metrikleri | /metrics | --metrics-port | - | +| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | +| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | +| 8000 | GraphQL HTTP sunucusu
    ( subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    ( subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | +| 8030 | Subgraph indeksleme durum API'si | /graphql | --index-node-port | - | +| 8040 | Prometheus metrikleri | /metrics | --metrics-port | - | #### İndeksleyici Hizmeti -| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP sunucusu
    (ücretli subgraph sorguları için) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrikleri | /metrics | --metrics-port | - | +| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | +| ---- | ------------------------------------------------------------------ | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP sunucusu
    (ücretli subgraph sorguları için) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrikleri | /metrics | --metrics-port | - | #### İndeksleyici Aracı From e4f3c48bd6e8d16f8f8c42cb681484604b908dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:54 -0400 Subject: [PATCH 775/924] New translations indexing.mdx (Ukrainian) --- website/pages/uk/network/indexing.mdx | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/uk/network/indexing.mdx b/website/pages/uk/network/indexing.mdx index 933e55faa68e..64e07ca91ea6 100644 --- a/website/pages/uk/network/indexing.mdx +++ b/website/pages/uk/network/indexing.mdx @@ -113,11 +113,11 @@ Query fees are collected by the gateway and distributed to indexers according to - **Large** - підготовлений для індексації всіх підграфів, що використовуються наразі, і обслуговування запитів на відповідний трафік. | Налаштування | Postgres
    (CPU) | Postgres
    (пам'ять в GB) | Postgres
    (диск у ТБ) | VMs
    (Центральні CPU) | VMs
    (пам'ять у ГБ) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| ------------ |:-------------------------:|:----------------------------------:|:-------------------------------:|:-------------------------------:|:-----------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### Яких основних заходів безпеки повинен дотримуватися індексатор? @@ -149,26 +149,26 @@ Query fees are collected by the gateway and distributed to indexers according to #### Graph Node -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| --- | --- | --- | --- | --- | -| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | -| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | -| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | -| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | +| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | +| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | +| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | +| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | #### Служба індексації -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| --- | --- | --- | --- | --- | -| 7600 | HTTP-сервер GraphQL
    (для платних запитів до підграфів) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | HTTP-сервер GraphQL
    (для платних запитів до підграфів) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Метрики Prometheus | /metrics | --metrics-port | - | #### Агент індексації -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| --- | --- | --- | --- | --- | -| 8000 | API для керування індексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| ---- | ------------------------------ | ------------ | ------------------------- | --------------------------------------- | +| 8000 | API для керування індексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### Налаштування серверної інфраструктури з використанням Terraform на Google Cloud From 473ce103f5a3c4402d41a007133a2d9ed636a57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:54 -0400 Subject: [PATCH 776/924] New translations indexing.mdx (Chinese Simplified) --- website/pages/zh/network/indexing.mdx | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/website/pages/zh/network/indexing.mdx b/website/pages/zh/network/indexing.mdx index 1e3ae15b544a..1218280c992d 100644 --- a/website/pages/zh/network/indexing.mdx +++ b/website/pages/zh/network/indexing.mdx @@ -113,11 +113,11 @@ Query fees are collected by the gateway and distributed to indexers according to - **大型** -准备对当前使用的所有子图进行索引,并为相关流量的请求提供服务。 | 设置 | (CPU 数量) | (内存 GB) | (硬盘 TB) | (CPU 数量) | (内存 GB) | -| ---- | :--------: | :-------: | :-------: | :--------: | :-------: | -| 小型 | 4 | 8 | 1 | 4 | 16 | -| 标准 | 8 | 30 | 1 | 12 | 48 | -| 中型 | 16 | 64 | 2 | 32 | 64 | -| 大型 | 72 | 468 | 3.5 | 48 | 184 | +| -- |:--------:|:-------:|:-------:|:--------:|:-------:| +| 小型 | 4 | 8 | 1 | 4 | 16 | +| 标准 | 8 | 30 | 1 | 12 | 48 | +| 中型 | 16 | 64 | 2 | 32 | 64 | +| 大型 | 72 | 468 | 3.5 | 48 | 184 | ### 索引人应该采取哪些基本的安全防范措施? @@ -149,26 +149,26 @@ Query fees are collected by the gateway and distributed to indexers according to #### Graph 节点 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | -| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | -| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| ---- | ------------------------------------ | ------------------------------------------------------------------- | ----------------- | ----- | +| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | +| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | +| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | #### 索引人服务 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP 服务器
    (用于付费子图查询) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| ---- | --------------------------------------- | --------------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP 服务器
    (用于付费子图查询) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus 指标 | /metrics | --metrics-port | - | #### 索引人代理 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| ---- | -------------- | ---- | ------------------------- | --------------------------------------- | -| 8000 | 索引人管理 API | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| ---- | --------- | -- | ------------------------- | --------------------------------------- | +| 8000 | 索引人管理 API | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### 在谷歌云上使用 Terraform 建立服务器基础设施 @@ -730,7 +730,7 @@ default => 0.1 * $SYSTEM_LOAD; 使用上述模型的查询成本计算示例: -| 询问 | 价格 | +| 询问 | 价格 | | ---------------------------------------------------------------------------- | ------- | | { pairs(skip: 5000) { id } } | 0.5 GRT | | { tokens { symbol } } | 0.1 GRT | From 2620be7c31a55c8a2f4e2456f09363402a4b57d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:55 -0400 Subject: [PATCH 777/924] New translations indexing.mdx (Urdu (Pakistan)) --- website/pages/ur/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/ur/network/indexing.mdx b/website/pages/ur/network/indexing.mdx index 6b396ceccca7..52062b9b6584 100644 --- a/website/pages/ur/network/indexing.mdx +++ b/website/pages/ur/network/indexing.mdx @@ -112,12 +112,12 @@ query indexerAllocations { - **درمیانہ** - پروڈکشن انڈیکسر 100 سب گراف اور 200-500 درخواستیں فی سیکنڈ کو اٹھا سکتا ہے. - **بڑا** - تمام فی الحال زیر استعمال سب گرافس کو انڈیکس کرنے اور متعلقہ ٹریفک کے لیے درخواستیں پیش کرنے کے لیے تیار ہے. -| سیٹ اپ | Postgres
    (CPUs) | Postgres
    (GBs میں میموری) | Postgres
    (TBs میں ڈسک) | VMs
    (CPUs) | VMs
    (GBs میں میموری) | -| --- | :-: | :-: | :-: | :-: | :-: | -| چھوٹا | 4 | 8 | 1 | 4 | 16 | -| معیاری | 8 | 30 | 1 | 12 | 48 | -| درمیانہ | 16 | 64 | 2 | 32 | 64 | -| بڑا | 72 | 468 | 3.5 | 48 | 184 | +| سیٹ اپ | Postgres
    (CPUs) | Postgres
    (GBs میں میموری) | Postgres
    (TBs میں ڈسک) | VMs
    (CPUs) | VMs
    (GBs میں میموری) | +| ------- |:--------------------------:|:------------------------------------:|:---------------------------------:|:---------------------:|:-------------------------------:| +| چھوٹا | 4 | 8 | 1 | 4 | 16 | +| معیاری | 8 | 30 | 1 | 12 | 48 | +| درمیانہ | 16 | 64 | 2 | 32 | 64 | +| بڑا | 72 | 468 | 3.5 | 48 | 184 | ### وہ کون سی چند بنیادی حفاظتی تدابیر ہیں جو ایک انڈیکسر کو اختیار کرنی چاہیے؟ @@ -149,20 +149,20 @@ query indexerAllocations { #### گراف نوڈ -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | -| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | -| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | +| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | +| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | #### انڈیکسر سروس -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (ادا شدہ سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (ادا شدہ سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus میٹرکس | /metrics | --metrics-port | - | #### انڈیکسر ایجنٹ From f7f1fbc1e22ad5cf71b02ca62cffee2e823cea47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:56 -0400 Subject: [PATCH 778/924] New translations indexing.mdx (Vietnamese) --- website/pages/vi/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/vi/network/indexing.mdx b/website/pages/vi/network/indexing.mdx index 8365be2856b1..cbff1daedbc3 100644 --- a/website/pages/vi/network/indexing.mdx +++ b/website/pages/vi/network/indexing.mdx @@ -112,12 +112,12 @@ Indexer có thể tự phân biệt bản thân bằng cách áp dụng các k - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Lớn** - Được chuẩn bị để index tất cả các subgraph hiện đang được sử dụng và phục vụ các yêu cầu cho lưu lượng truy cập liên quan. -| Cài đặt | Postgres
    (CPUs) | Postgres
    (bộ nhớ tính bằng GB) | Postgres
    (đĩa tính bằng TB) | VMs
    (CPUs) | VMs
    (bộ nhớ tính bằng GB) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Nhỏ | 4 | 8 | 1 | 4 | 16 | -| Tiêu chuẩn | 8 | 30 | 1 | 12 | 48 | -| Trung bình | 16 | 64 | 2 | 32 | 64 | -| Lớn | 72 | 468 | 3.5 | 48 | 184 | +| Cài đặt | Postgres
    (CPUs) | Postgres
    (bộ nhớ tính bằng GB) | Postgres
    (đĩa tính bằng TB) | VMs
    (CPUs) | VMs
    (bộ nhớ tính bằng GB) | +| ----------- |:--------------------------:|:-----------------------------------------:|:--------------------------------------:|:---------------------:|:------------------------------------:| +| Nhỏ | 4 | 8 | 1 | 4 | 16 | +| Tiêu chuẩn | 8 | 30 | 1 | 12 | 48 | +| Trung bình | 16 | 64 | 2 | 32 | 64 | +| Lớn | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Lưu ý: Để hỗ trợ mở rộng quy mô nhanh, bạn nên tách các mối #### Graph Node -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| --- | --- | --- | --- | --- | -| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | -| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | -| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | +| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | +| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | +| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | #### Dịch vụ Indexer -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| --- | --- | --- | --- | --- | -| 7600 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph có trả phí) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| ---- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph có trả phí) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Số liệu Prometheus | /metrics | --metrics-port | - | #### Đại lý Indexer From b7d538c0d5579556f8d4136518176d8ca12ad32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:56 -0400 Subject: [PATCH 779/924] New translations indexing.mdx (Marathi) --- website/pages/mr/network/indexing.mdx | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/website/pages/mr/network/indexing.mdx b/website/pages/mr/network/indexing.mdx index 4ead6f7ae74b..9cdbc569d607 100644 --- a/website/pages/mr/network/indexing.mdx +++ b/website/pages/mr/network/indexing.mdx @@ -112,12 +112,12 @@ Once an allocation has been closed the rebates are available to be claimed by th - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| मानक | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| ------ |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| मानक | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Once an allocation has been closed the rebates are available to be claimed by th #### आलेख नोड -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -623,7 +623,7 @@ graph indexer rules delete QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK - Indexer can use the `indexer-cli` to view all queued actions - इंडेक्सर (किंवा इतर सॉफ्टवेअर) `indexer-cli` वापरून रांगेतील क्रिया मंजूर किंवा रद्द करू शकतात. मंजूर आणि रद्द आदेश इनपुट म्हणून अॅक्शन आयडीचा अॅरे घेतात. - अंमलबजावणी कर्मचारी नियमितपणे मंजूर कृतींसाठी रांगेत मतदान करतात. ते रांगेतील `मंजूर` क्रिया पकडेल, त्या कार्यान्वित करण्याचा प्रयत्न करेल आणि अंमलबजावणीच्या स्थितीनुसार `यशस्वी` किंवा `अयशस्वी< वर db मधील मूल्ये अपडेट करेल. /code>. -
  • एखादी कृती यशस्वी झाल्यास कार्यकर्ता खात्री करेल की एक अनुक्रमणिका नियम उपस्थित आहे जो एजंटला वाटप कसे व्यवस्थापित करावे हे सांगते, एजंट ऑटो` किंवा ` मध्ये असताना मॅन्युअल क्रिया करताना उपयुक्त oversight` मोड. +
  • एखादी कृती यशस्वी झाल्यास कार्यकर्ता खात्री करेल की एक अनुक्रमणिका नियम उपस्थित आहे जो एजंटला वाटप कसे व्यवस्थापित करावे हे सांगते, एजंट ऑटो` किंवा ` मध्ये असताना मॅन्युअल क्रिया करताना उपयुक्त oversight` मोड. - इंडेक्सर कारवाईच्या अंमलबजावणीचा इतिहास पाहण्यासाठी कृती रांगेचे निरीक्षण करू शकतो आणि आवश्यक असल्यास क्रिया आयटमची अंमलबजावणी अयशस्वी झाल्यास पुन्हा मंजूर आणि अद्यतनित करू शकतो. कृती रांग रांगेत लावलेल्या आणि केलेल्या सर्व क्रियांचा इतिहास प्रदान करते. Data model: From 4b3a75dc8fd6273faafb60645e4e6efb5fda4594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:57 -0400 Subject: [PATCH 780/924] New translations indexing.mdx (Hindi) --- website/pages/hi/network/indexing.mdx | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/website/pages/hi/network/indexing.mdx b/website/pages/hi/network/indexing.mdx index 4af09b4d7fd8..399bca439431 100644 --- a/website/pages/hi/network/indexing.mdx +++ b/website/pages/hi/network/indexing.mdx @@ -112,12 +112,12 @@ Once an allocation has been closed the rebates are available to be claimed by th - **माध्यम** - प्रोडक्शन इंडेक्सर प्रति सेकंड 100 सबग्राफ और 200-500 अनुरोधों का समर्थन करता है। - **बड़ा** - वर्तमान में उपयोग किए जाने वाले सभी सबग्राफ को अनुक्रमित करने और संबंधित ट्रैफ़िक के अनुरोधों को पूरा करने के लिए तैयार है। -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### एक इंडेक्सर को कौन सी बुनियादी सुरक्षा सावधानियां बरतनी चाहिए? @@ -149,20 +149,20 @@ Once an allocation has been closed the rebates are available to be claimed by th #### ग्राफ नोड -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | -------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | -------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -559,7 +559,7 @@ graph indexer status - `ग्राफ़ अनुक्रमणिका क्रियाएँ स्वीकृत निष्पादित करती हैं` - कार्यकर्ता को स्वीकृत क्रियाओं को तुरंत निष्पादित करने के लिए बाध्य करें -सभी आदेश जो आउटपुट में नियम प्रदर्शित करते हैं, समर्थित आउटपुट स्वरूपों (`तालिका`, `yaml`, और `json`) के बीच `का उपयोग करके चुन सकते हैं - आउटपुट` तर्क। +सभी आदेश जो आउटपुट में नियम प्रदर्शित करते हैं, समर्थित आउटपुट स्वरूपों (`तालिका`, `yaml`, और `json`) के बीच ` का उपयोग करके चुन सकते हैं - आउटपुट ` तर्क। #### Indexing rules @@ -623,7 +623,7 @@ graph indexer rules delete QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK - सभी कतारबद्ध क्रियाओं को देखने के लिए इंडेक्सर `indexer-cli` का उपयोग कर सकता है - इंडेक्सर (या अन्य सॉफ़्टवेयर) `इंडेक्सर-क्ली` का उपयोग करके कतार में क्रियाओं को स्वीकृत या रद्द कर सकता है। स्वीकृति और रद्द करने के आदेश इनपुट के रूप में क्रिया आईडी की एक सरणी लेते हैं। - निष्पादन कार्यकर्ता नियमित रूप से स्वीकृत कार्यों के लिए कतार का चुनाव करता है। यह कतार से `अनुमोदित` कार्यों को पकड़ लेगा, उन्हें निष्पादित करने का प्रयास करेगा, और निष्पादन की स्थिति के आधार पर डीबी में मूल्यों को `सफलता` या `विफल< पर अपडेट करेगा। /0>.
  • -
  • If an action is successful the worker will ensure that there is an indexing rule present that tells the agent how to manage the allocation moving forward, useful when taking manual actions while the agent is in auto` or `oversight` mode. +
  • If an action is successful the worker will ensure that there is an indexing rule present that tells the agent how to manage the allocation moving forward, useful when taking manual actions while the agent is in auto` or `oversight` mode. - अनुक्रमणक क्रिया निष्पादन के इतिहास को देखने के लिए क्रिया कतार की निगरानी कर सकता है और यदि आवश्यक हो तो निष्पादन विफल होने पर क्रिया आइटम को पुन: अनुमोदित और अद्यतन कर सकता है। क्रिया कतार पंक्तिबद्ध और की गई सभी कार्रवाइयों का इतिहास प्रदान करती है। डेटा मॉडल: From e684747ca48961ac23ca10ae87b83aa231d57d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:34:58 -0400 Subject: [PATCH 781/924] New translations indexing.mdx (Yoruba) --- website/pages/yo/network/indexing.mdx | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/pages/yo/network/indexing.mdx b/website/pages/yo/network/indexing.mdx index 9bdc2fb2eb7e..842a5c8e0c74 100644 --- a/website/pages/yo/network/indexing.mdx +++ b/website/pages/yo/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| --- | :-: | :-: | :-: | :-: | :-: | -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent From e9d2ca9e9973bd0c627a1eb6cb5d4b7c25c3756c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:11 -0400 Subject: [PATCH 782/924] New translations publishing-a-subgraph.mdx (Turkish) --- website/pages/tr/publishing/publishing-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/tr/publishing/publishing-a-subgraph.mdx b/website/pages/tr/publishing/publishing-a-subgraph.mdx index b217d55b13bd..5ea9a59a3679 100644 --- a/website/pages/tr/publishing/publishing-a-subgraph.mdx +++ b/website/pages/tr/publishing/publishing-a-subgraph.mdx @@ -4,7 +4,7 @@ title: Merkeziyetsiz Ağa Bir Subgraph Yayınlamak Subgraph'iniz [Subgraph Studio'ya deploy edildikten](/deploying/deploying-a-subgraph-to-studio) sonra, onu test edip üretime sokmaya hazırsınız, ardından merkeziyetsiz ağda yayınlayabilirsiniz. -Merkeziyetsiz ağda bir subgraph yayınlamak, [küratörlerin](/network/curating) ona sinyal göndermeye ve [indeksleyicilerin](/network/indexing) onu indekslemeye başlamasını sağlar. +Merkeziyetsiz ağda bir subgraph yayınlamak, [küratörlerin](/network/curating) ona sinyal göndermeye ve [indeksleyicilerin](/network/indexing) onu indekslemeye başlamasını sağlar. From 797030a42259d2303cfd11403368bff3519e8aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:19 -0400 Subject: [PATCH 783/924] New translations distributed-systems.mdx (Swedish) --- .../pages/sv/querying/distributed-systems.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/website/pages/sv/querying/distributed-systems.mdx b/website/pages/sv/querying/distributed-systems.mdx index 365340f65a1b..3143d4859eb8 100644 --- a/website/pages/sv/querying/distributed-systems.mdx +++ b/website/pages/sv/querying/distributed-systems.mdx @@ -84,8 +84,8 @@ Här kommer vi att använda argumentet `block: { hash: $blockHash }` för att bi /// Gets a list of domain names from a single block using pagination async function getDomainNames() { // Set a cap on the maximum number of items to pull. - let pages = 5 - const perPage = 1000 + let pages = 5; + const perPage = 1000; // The first query will get the first page of results and also get the block // hash so that the remainder of the queries are consistent with the first. @@ -100,34 +100,34 @@ async function getDomainNames() { hash } } - }` + }`; - let data = await graphql(listDomainsQuery, { perPage }) - let result = data.domains.map((d) => d.name) - let blockHash = data._meta.block.hash + let data = await graphql(listDomainsQuery, { perPage }); + let result = data.domains.map((d) => d.name); + let blockHash = data._meta.block.hash; - let query + let query; // Continue fetching additional pages until either we run into the limit of // 5 pages total (specified above) or we know we have reached the last page // because the page has fewer entities than a full page. while (data.domains.length == perPage && --pages) { - let lastID = data.domains[data.domains.length - 1].id + let lastID = data.domains[data.domains.length - 1].id; query = ` query ListDomains($perPage: Int!, $lastID: ID!, $blockHash: Bytes!) { domains(first: $perPage, where: { id_gt: $lastID }, block: { hash: $blockHash }) { name id } - }` + }`; - data = await graphql(query, { perPage, lastID, blockHash }) + data = await graphql(query, { perPage, lastID, blockHash }); // Accumulate domain names into the result for (domain of data.domains) { - result.push(domain.name) + result.push(domain.name); } } - return result + return result; } ``` From 8b264dfd5ce07a5cc15d7653cca5e7d3650f56ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:22 -0400 Subject: [PATCH 784/924] New translations graphql-api.mdx (Romanian) --- website/pages/ro/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ro/querying/graphql-api.mdx b/website/pages/ro/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/ro/querying/graphql-api.mdx +++ b/website/pages/ro/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 2a305e2b7f54bfb3d223181f5e7f86db3065cf7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:23 -0400 Subject: [PATCH 785/924] New translations graphql-api.mdx (French) --- website/pages/fr/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/fr/querying/graphql-api.mdx b/website/pages/fr/querying/graphql-api.mdx index 2fe9bc582f62..842b3bb27033 100644 --- a/website/pages/fr/querying/graphql-api.mdx +++ b/website/pages/fr/querying/graphql-api.mdx @@ -210,7 +210,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -324,12 +324,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Utilisez le terme de recherche de préfixe pour trouver les mots dont le préfixe correspond (2 caractères requis.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Utilisez le terme de recherche de préfixe pour trouver les mots dont le préfixe correspond (2 caractères requis.) | #### Exemples From 573f3232e42c8e49f745da666f059223bd45c57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:24 -0400 Subject: [PATCH 786/924] New translations graphql-api.mdx (Spanish) --- website/pages/es/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/es/querying/graphql-api.mdx b/website/pages/es/querying/graphql-api.mdx index 2eac7116dad8..321ec705c482 100644 --- a/website/pages/es/querying/graphql-api.mdx +++ b/website/pages/es/querying/graphql-api.mdx @@ -208,7 +208,7 @@ En el siguiente ejemplo, estamos filtrando desafíos con `coutcome` `succeeded` ``` > **Azúcar sintáctico**: Puedes simplificar la consulta anterior eliminando el operador `and` pasando una subexpresión separada por comas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Las consultas de búsqueda de texto completo tienen un campo obligatorio, `text` Operadores de búsqueda de texto completo: -| Símbolo | Operador | Descripción | -| --- | --- | --- | -| `&` | `And` | Para combinar varios términos de búsqueda en un filtro para entidades que incluyen todos los términos proporcionados | -| | | `O` | Las consultas con varios términos de búsqueda separados por o el operador devolverá todas las entidades que coincidan con cualquiera de los términos proporcionados | -| `<->` | `Follow by` | Especifica la distancia entre dos palabras. | -| `:*` | `Prefijo` | Utilice el término de búsqueda del prefijo para encontrar palabras cuyo prefijo coincida (se requieren 2 caracteres.) | +| Símbolo | Operador | Descripción | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Para combinar varios términos de búsqueda en un filtro para entidades que incluyen todos los términos proporcionados | +| | | `O` | Las consultas con varios términos de búsqueda separados por o el operador devolverá todas las entidades que coincidan con cualquiera de los términos proporcionados | +| `<->` | `Follow by` | Especifica la distancia entre dos palabras. | +| `:*` | `Prefijo` | Utilice el término de búsqueda del prefijo para encontrar palabras cuyo prefijo coincida (se requieren 2 caracteres.) | #### Ejemplos From d45b37dd854480af69af4720a410d8819cfe26d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:24 -0400 Subject: [PATCH 787/924] New translations graphql-api.mdx (Arabic) --- website/pages/ar/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ar/querying/graphql-api.mdx b/website/pages/ar/querying/graphql-api.mdx index 5807eba74fab..6c81b7756f3a 100644 --- a/website/pages/ar/querying/graphql-api.mdx +++ b/website/pages/ar/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| رمز | عامل التشغيل | الوصف | -| --- | --- | --- | -| `&` | `And` | لدمج عبارات بحث متعددة في فلتر للكيانات التي تتضمن جميع العبارات المتوفرة | -| | | `أو` | الاستعلامات التي تحتوي على عبارات بحث متعددة مفصولة بواسطة عامل التشغيل or ستعيد جميع الكيانات المتطابقة من أي عبارة متوفرة | -| `<->` | `Follow by` | يحدد المسافة بين كلمتين. | -| `:*` | `Prefix` | يستخدم عبارة البحث prefix للعثور على الكلمات التي تتطابق بادئتها (مطلوب حرفان.) | +| رمز | عامل التشغيل | الوصف | +| ----------- | ------------ | --------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | لدمج عبارات بحث متعددة في فلتر للكيانات التي تتضمن جميع العبارات المتوفرة | +| | | `أو` | الاستعلامات التي تحتوي على عبارات بحث متعددة مفصولة بواسطة عامل التشغيل or ستعيد جميع الكيانات المتطابقة من أي عبارة متوفرة | +| `<->` | `Follow by` | يحدد المسافة بين كلمتين. | +| `:*` | `Prefix` | يستخدم عبارة البحث prefix للعثور على الكلمات التي تتطابق بادئتها (مطلوب حرفان.) | #### Examples From 46eb1b24dddb4d8c38167f5ab7276deb6608c362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:25 -0400 Subject: [PATCH 788/924] New translations graphql-api.mdx (Czech) --- website/pages/cs/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/cs/querying/graphql-api.mdx b/website/pages/cs/querying/graphql-api.mdx index 315ee3fe4445..68099a5e08a9 100644 --- a/website/pages/cs/querying/graphql-api.mdx +++ b/website/pages/cs/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Popis | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Popis | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 7e5467a3a75bdd2b67e4143900349bbacff56f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:26 -0400 Subject: [PATCH 789/924] New translations graphql-api.mdx (German) --- website/pages/de/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/de/querying/graphql-api.mdx b/website/pages/de/querying/graphql-api.mdx index fc1b29586442..1bc64a267db7 100644 --- a/website/pages/de/querying/graphql-api.mdx +++ b/website/pages/de/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Beschreibung | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Beschreibung | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Beispiele From 667a171c73dda6a2aa45bffcde8a1c2b1bb0f3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:26 -0400 Subject: [PATCH 790/924] New translations graphql-api.mdx (Italian) --- website/pages/it/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/it/querying/graphql-api.mdx b/website/pages/it/querying/graphql-api.mdx index d3dd3c57a549..2a1b9a54eef7 100644 --- a/website/pages/it/querying/graphql-api.mdx +++ b/website/pages/it/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Nell'esempio seguente, si filtrano le sfide con `outcome` `succeeded` e `number` ``` > **Syntactic sugar:** Si può semplificare la query precedente eliminando l'operatore `and` passando una sottoespressione separata da virgole. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Le query di ricerca fulltext hanno un campo obbligatorio, `text`, per fornire i Operatori di ricerca fulltext: -| Simbolo | Operatore | Descrizione | -| --- | --- | --- | -| `&` | `And` | Per combinare più termini di ricerca in un filtro per le entità che includono tutti i termini forniti | -| | | `Or` | Le query con più termini di ricerca separati dall'operatore Or restituiranno tutte le entità con una corrispondenza tra i termini forniti | -| `<->` | `Follow by` | Specifica la distanza tra due parole. | -| `:*` | `Prefisso` | Utilizzare il termine di ricerca del prefisso per trovare le parole il cui prefisso corrisponde (sono richiesti 2 caratteri.) | +| Simbolo | Operatore | Descrizione | +| ----------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Per combinare più termini di ricerca in un filtro per le entità che includono tutti i termini forniti | +| | | `Or` | Le query con più termini di ricerca separati dall'operatore Or restituiranno tutte le entità con una corrispondenza tra i termini forniti | +| `<->` | `Follow by` | Specifica la distanza tra due parole. | +| `:*` | `Prefisso` | Utilizzare il termine di ricerca del prefisso per trovare le parole il cui prefisso corrisponde (sono richiesti 2 caratteri.) | #### Esempi From f7bc47413153f633ff72a5ae8f7ca07aca1b35a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:27 -0400 Subject: [PATCH 791/924] New translations graphql-api.mdx (Japanese) --- website/pages/ja/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ja/querying/graphql-api.mdx b/website/pages/ja/querying/graphql-api.mdx index bb65c50d2929..3d503ece126e 100644 --- a/website/pages/ja/querying/graphql-api.mdx +++ b/website/pages/ja/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Graph Node [`v0.30.0`](https://github.com/graphprotocol/graph-node/releases/tag/ ``` > **シンタックス シュガー:** コンマで区切られた部分式を渡すことで `and` 演算子を削除することで、上記のクエリを簡素化できます。 -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) 全文検索演算子: -| シンボル | オペレーター | 説明書き | -| --- | --- | --- | -| `&` | `と` | 複数の検索語を組み合わせて、指定したすべての検索語を含むエンティティをフィルタリングします。 | -| | | `Or` | 複数の検索語をオペレーターで区切って検索すると、指定した語のいずれかにマッチするすべてのエンティティが返されます。 | -| `<->` | `Follow by` | 2 つの単語の間の距離を指定します。 | -| `:*` | `プレフィックス` | プレフィックス検索語を使って、プレフィックスが一致する単語を検索します(2 文字必要) | +| シンボル | オペレーター | 説明書き | +| ----------- | ----------- | --------------------------------------------------------- | +| `&` | `と` | 複数の検索語を組み合わせて、指定したすべての検索語を含むエンティティをフィルタリングします。 | +| | | `Or` | 複数の検索語をオペレーターで区切って検索すると、指定した語のいずれかにマッチするすべてのエンティティが返されます。 | +| `<->` | `Follow by` | 2 つの単語の間の距離を指定します。 | +| `:*` | `プレフィックス` | プレフィックス検索語を使って、プレフィックスが一致する単語を検索します(2 文字必要) | #### 例 From f462b31ca2c1b80c067208e8787f0c094c159d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:28 -0400 Subject: [PATCH 792/924] New translations graphql-api.mdx (Korean) --- website/pages/ko/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ko/querying/graphql-api.mdx b/website/pages/ko/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/ko/querying/graphql-api.mdx +++ b/website/pages/ko/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 63bbf6584ef8903d8b1152fc02714a417beeb8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:28 -0400 Subject: [PATCH 793/924] New translations graphql-api.mdx (Dutch) --- website/pages/nl/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/nl/querying/graphql-api.mdx b/website/pages/nl/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/nl/querying/graphql-api.mdx +++ b/website/pages/nl/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From b39ba26587e46ea60382dd512b9f89e9aa2b1cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:29 -0400 Subject: [PATCH 794/924] New translations graphql-api.mdx (Polish) --- website/pages/pl/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/pl/querying/graphql-api.mdx b/website/pages/pl/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/pl/querying/graphql-api.mdx +++ b/website/pages/pl/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 93c5bde240fa4e1227f4c76f09ba07e7c1d46cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:30 -0400 Subject: [PATCH 795/924] New translations graphql-api.mdx (Portuguese) --- website/pages/pt/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/pt/querying/graphql-api.mdx b/website/pages/pt/querying/graphql-api.mdx index 733da228a890..207c226d9d8e 100644 --- a/website/pages/pt/querying/graphql-api.mdx +++ b/website/pages/pt/querying/graphql-api.mdx @@ -208,7 +208,7 @@ No seguinte exemplo, filtramos por desafios com `outcome`, `succeeded` e `number ``` > **Açúcar sintático**: pode simplificar a consulta acima ao retirar o operador `and`, com o passe de uma subexpressão separada por vírgulas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Buscas fulltext têm um campo obrigatório, `text`, para ofertar termos de busca Operadores de busca fulltext: -| Símbolo | Operador | Descrição | -| --- | --- | --- | -| `&` | `And` | Para combinar múltiplos termos de busca num filtro para entidades que incluem todos os termos fornecidos | -| | | `Or` | Consultas com vários termos de busca separados pelo operador `or` retornarão todas as entidades com uma correspondência de qualquer termo providenciado | -| `<->` | `Follow by` | Especifica a distância entre duas palavras. | -| `:*` | `Prefix` | Use o prefixo para encontrar palavras que correspondem a tal prefixo (2 caracteres necessários.) | +| Símbolo | Operador | Descrição | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Para combinar múltiplos termos de busca num filtro para entidades que incluem todos os termos fornecidos | +| | | `Or` | Consultas com vários termos de busca separados pelo operador `or` retornarão todas as entidades com uma correspondência de qualquer termo providenciado | +| `<->` | `Follow by` | Especifica a distância entre duas palavras. | +| `:*` | `Prefix` | Use o prefixo para encontrar palavras que correspondem a tal prefixo (2 caracteres necessários.) | #### Exemplos From a8ff1464898e16fe3dfdc2025c1f5178cf24c125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:30 -0400 Subject: [PATCH 796/924] New translations graphql-api.mdx (Russian) --- website/pages/ru/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ru/querying/graphql-api.mdx b/website/pages/ru/querying/graphql-api.mdx index 2637a70c52e8..9bcb91258a9d 100644 --- a/website/pages/ru/querying/graphql-api.mdx +++ b/website/pages/ru/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { ``` > **Syntactic sugar:**. Вы можете упростить приведенный выше запрос, удалив оператор `and`, передав подвыражение, разделенное запятыми. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) Полнотекстовые поисковые операторы: -| Символ | Оператор | Описание | -| --- | --- | --- | -| `&` | `And` | Для объединения нескольких условий поиска в фильтр для объектов, которые включают все указанные условия | -| | | `Or` | Запросы с несколькими условиями поиска, разделенные оператором or, вернут все объекты, которые соответствуют любому из предоставленных условий | -| `<->` | `Follow by` | Укажите расстояние между двумя словами. | -| `:*` | `Prefix` | Используйте поисковый запрос по префиксу, чтобы найти слова с соответствующим префиксом (необходимо 2 символа) | +| Символ | Оператор | Описание | +| ----------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Для объединения нескольких условий поиска в фильтр для объектов, которые включают все указанные условия | +| | | `Or` | Запросы с несколькими условиями поиска, разделенные оператором or, вернут все объекты, которые соответствуют любому из предоставленных условий | +| `<->` | `Follow by` | Укажите расстояние между двумя словами. | +| `:*` | `Prefix` | Используйте поисковый запрос по префиксу, чтобы найти слова с соответствующим префиксом (необходимо 2 символа) | #### Примеры From a74cf976adc792dca50eeb9fb904bb361d647df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:31 -0400 Subject: [PATCH 797/924] New translations graphql-api.mdx (Swedish) --- website/pages/sv/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/sv/querying/graphql-api.mdx b/website/pages/sv/querying/graphql-api.mdx index 3823820de6eb..303ee3c400df 100644 --- a/website/pages/sv/querying/graphql-api.mdx +++ b/website/pages/sv/querying/graphql-api.mdx @@ -208,7 +208,7 @@ I följande exempel filtrerar vi efter utmaningar med `utfall` `lyckades` och `n ``` > **Syntactic sugar:** Du kan förenkla ovanstående fråga genom att ta bort `and`-operatorn och istället skicka ett underuttryck separerat med kommatecken. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltextsökförfrågningar har ett obligatoriskt fält, `text`, för att tillha Fulltextsökoperatorer: -| Symbol | Operatör | Beskrivning | -| --- | --- | --- | -| `&` | `Och` | För att kombinera flera söktermer till ett filter för entiteter som inkluderar alla de angivna termerna | -| | | `Eller` | Förfrågningar med flera söktermer separerade av ellipsen kommer att returnera alla entiteter med en matchning från någon av de angivna termerna | -| `<->` | `Följs av` | Ange avståndet mellan två ord. | -| `:*` | `Prefix` | Använd prefixsöktermen för att hitta ord vars prefix matchar (2 tecken krävs.) | +| Symbol | Operatör | Beskrivning | +| ----------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `Och` | För att kombinera flera söktermer till ett filter för entiteter som inkluderar alla de angivna termerna | +| | | `Eller` | Förfrågningar med flera söktermer separerade av ellipsen kommer att returnera alla entiteter med en matchning från någon av de angivna termerna | +| `<->` | `Följs av` | Ange avståndet mellan två ord. | +| `:*` | `Prefix` | Använd prefixsöktermen för att hitta ord vars prefix matchar (2 tecken krävs.) | #### Exempel From 15709e2b51848986a27474b206a2f7f9da3b5cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:32 -0400 Subject: [PATCH 798/924] New translations graphql-api.mdx (Turkish) --- website/pages/tr/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/tr/querying/graphql-api.mdx b/website/pages/tr/querying/graphql-api.mdx index 4e817f0e579d..84ba2a601058 100644 --- a/website/pages/tr/querying/graphql-api.mdx +++ b/website/pages/tr/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Aşağıdaki örnekte, `outcome` değeri `succeeded` olan ve `number` değeri `1 ``` > **Syntactic sugar:** Yukarıdaki sorguyu, virgülle ayrılmış bir alt ifade geçirerek, `and` operatörünü kaldırarak basitleştirebilirsiniz. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Tam metin arama sorgularının kullanması gereken bir zorunlu alanı vardır, b Tam metin arama operatörleri: -| Sembol | Operatör | Tanımlama | -| --- | --- | --- | -| `&` | `And` | Birden fazla arama terimini, sağlanan tüm terimleri içeren varlıklar için bir filtrede birleştirmek için kullanılır | -| | | `Or` | Or, işleciyle ayrılmış birden çok arama terimi içeren sorgular, sağlanan terimlerden herhangi biriyle eşleşen tüm varlıkları döndürür | -| `<->` | `Follow by` | İki kelime arasındaki mesafeyi belirtir. | -| `:*` | `Prefix` | Ön eki eşleşen kelimeleri bulmak için önek arama terimini kullanın (2 karakter gereklidir.) | +| Sembol | Operatör | Tanımlama | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Birden fazla arama terimini, sağlanan tüm terimleri içeren varlıklar için bir filtrede birleştirmek için kullanılır | +| | | `Or` | Or, işleciyle ayrılmış birden çok arama terimi içeren sorgular, sağlanan terimlerden herhangi biriyle eşleşen tüm varlıkları döndürür | +| `<->` | `Follow by` | İki kelime arasındaki mesafeyi belirtir. | +| `:*` | `Prefix` | Ön eki eşleşen kelimeleri bulmak için önek arama terimini kullanın (2 karakter gereklidir.) | #### Örnekler From 4d719fc808b4d152ea3ca6960faf49416359ce75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:32 -0400 Subject: [PATCH 799/924] New translations graphql-api.mdx (Ukrainian) --- website/pages/uk/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/uk/querying/graphql-api.mdx b/website/pages/uk/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/uk/querying/graphql-api.mdx +++ b/website/pages/uk/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From a95c6f44937cecfd85d95e2b081b12831923b2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:33 -0400 Subject: [PATCH 800/924] New translations graphql-api.mdx (Chinese Simplified) --- website/pages/zh/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/zh/querying/graphql-api.mdx b/website/pages/zh/querying/graphql-api.mdx index 9ab99b1eb0c2..c798bdfd4ec6 100644 --- a/website/pages/zh/querying/graphql-api.mdx +++ b/website/pages/zh/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { tokens(first: 1000, where: { id_gt: $last ``` > **语法糖:**您可以通过传递一个用逗号分隔的子表达式来删除`and`运算符,从而简化上述查询。 -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) 全文搜索运算符: -| 符号 | 运算符 | 描述 | -| ------ | ----------- | ---------------------------------------------------------------------- | -| `&` | `And` | 用于将多个搜索词组合到包含所有提供词条的实体的过滤器中 | -| | | `Or` | 由 or 运算符分隔的多个搜索词的查询,将返回与任何提供的词匹配的所有实体 | -| `<->` | `Follow by` | 指定两个单词之间的距离。 | -| `:*` | `Prefix` | 使用前缀搜索词查找前缀匹配的单词(需要 2 个字符) | +| 符号 | 运算符 | 描述 | +| ----------- | ----------- | ------------------------------------- | +| `&` | `And` | 用于将多个搜索词组合到包含所有提供词条的实体的过滤器中 | +| | | `Or` | 由 or 运算符分隔的多个搜索词的查询,将返回与任何提供的词匹配的所有实体 | +| `<->` | `Follow by` | 指定两个单词之间的距离。 | +| `:*` | `Prefix` | 使用前缀搜索词查找前缀匹配的单词(需要 2 个字符) | #### 例子 From d65090453766f29e306ab52fa254066eb6f08f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:34 -0400 Subject: [PATCH 801/924] New translations graphql-api.mdx (Urdu (Pakistan)) --- website/pages/ur/querying/graphql-api.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/ur/querying/graphql-api.mdx b/website/pages/ur/querying/graphql-api.mdx index 47147daa2b13..0be6aaa6db53 100644 --- a/website/pages/ur/querying/graphql-api.mdx +++ b/website/pages/ur/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { ``` > **Syntactic شوگر:** آپ `and` آپریٹر کو ہٹا کر کوما سے الگ کردہ سب اظہار کو پاس کر کے مذکورہ کیوری کو آسان بنا سکتے ہیں. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) فل ٹیکسٹ سرچ آپریٹرز: -| علامت | آپریٹر | تفصیل | -| --- | --- | --- | -| `&` | `And` | ایک سے زیادہ تلاش کی اصطلاحات کو ایک فلٹر میں یکجا کرنے کے لیے ان ہستیوں کے لیے جس میں فراہم کردہ تمام اصطلاحات شامل ہوں | -| | | `Or` | Or آپریٹر کے ذریعہ الگ کردہ متعدد تلاش کی اصطلاحات کے ساتھ کیوریز فراہم کردہ شرائط میں سے کسی سے بھی مماثلت کے ساتھ تمام ہستیوں کو واپس کریں گے | -| `<>` | `Follow by` | دو الفاظ کے درمیان فاصلہ بتائیں. | -| `:*` | `Prefix` | ایسے الفاظ تلاش کرنے کے لیے پریفکس ​​تلاش کی اصطلاح استعمال کریں جن کا سابقہ ​​مماثل ہو (۲ حروف درکار ہیں.) | +| علامت | آپریٹر | تفصیل | +| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | ایک سے زیادہ تلاش کی اصطلاحات کو ایک فلٹر میں یکجا کرنے کے لیے ان ہستیوں کے لیے جس میں فراہم کردہ تمام اصطلاحات شامل ہوں | +| | | `Or` | Or آپریٹر کے ذریعہ الگ کردہ متعدد تلاش کی اصطلاحات کے ساتھ کیوریز فراہم کردہ شرائط میں سے کسی سے بھی مماثلت کے ساتھ تمام ہستیوں کو واپس کریں گے | +| `<>` | `Follow by` | دو الفاظ کے درمیان فاصلہ بتائیں. | +| `:*` | `Prefix` | ایسے الفاظ تلاش کرنے کے لیے پریفکس ​​تلاش کی اصطلاح استعمال کریں جن کا سابقہ ​​مماثل ہو (۲ حروف درکار ہیں.) | #### مثالیں @@ -408,7 +408,7 @@ GraphQL اسکیمے عام طور پر `queries`، `subscriptions` اور `muta اگر کوئی بلاک فراہم کیا جاتا ہے تو، میٹا ڈیٹا اس بلاک کا ہوتا ہے، اگر تازہ ترین انڈیکسڈ بلاک استعمال نہیں کیا جاتا ہے۔ اگر فراہم کیا گیا ہو، تو بلاک سب گراف کے اسٹارٹ بلاک کے بعد ہونا چاہیے، اور حال ہی میں انڈیکس کیے گئے بلاک سے کم یا اس کے برابر ہونا چاہیے. -`deployment` ایک منفرد ID ہے، جو `subgraph.yaml` فائل کے IPFS CID سے مطابقت رکھتی ہے. +` deployment ` ایک منفرد ID ہے، جو `subgraph.yaml` فائل کے IPFS CID سے مطابقت رکھتی ہے. `block` تازہ ترین بلاک کے بارے میں معلومات فراہم کرتا ہے (`_meta` کو بھیجی گئی کسی بھی بلاک کی رکاوٹوں کو مدنظر رکھتے ہوئے): From b14eee18cc4d15a1e962748fd17b4eb918682c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:34 -0400 Subject: [PATCH 802/924] New translations graphql-api.mdx (Vietnamese) --- website/pages/vi/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/vi/querying/graphql-api.mdx b/website/pages/vi/querying/graphql-api.mdx index d15b7659d204..4acdfc3e2c56 100644 --- a/website/pages/vi/querying/graphql-api.mdx +++ b/website/pages/vi/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Biểu tượng | Toán tử | Miêu tả | -| --- | --- | --- | -| `&` | `And` | Để kết hợp nhiều cụm từ tìm kiếm thành một bộ lọc cho các thực thể bao gồm tất cả các cụm từ được cung cấp | -| | | `Or` | Các truy vấn có nhiều cụm từ tìm kiếm được phân tách bằng toán tử hoặc sẽ trả về tất cả các thực thể có kết quả khớp với bất kỳ cụm từ nào được cung cấp | -| `<->` | `Follow by` | Chỉ định khoảng cách giữa hai từ. | -| `:*` | `Prefix` | Sử dụng cụm từ tìm kiếm tiền tố để tìm các từ có tiền tố khớp với nhau (yêu cầu 2 ký tự.) | +| Biểu tượng | Toán tử | Miêu tả | +| ----------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `&` | `And` | Để kết hợp nhiều cụm từ tìm kiếm thành một bộ lọc cho các thực thể bao gồm tất cả các cụm từ được cung cấp | +| | | `Or` | Các truy vấn có nhiều cụm từ tìm kiếm được phân tách bằng toán tử hoặc sẽ trả về tất cả các thực thể có kết quả khớp với bất kỳ cụm từ nào được cung cấp | +| `<->` | `Follow by` | Chỉ định khoảng cách giữa hai từ. | +| `:*` | `Prefix` | Sử dụng cụm từ tìm kiếm tiền tố để tìm các từ có tiền tố khớp với nhau (yêu cầu 2 ký tự.) | #### Examples From 87ac34853fb23642f131f85ddfd61885591c3d32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:35 -0400 Subject: [PATCH 803/924] New translations graphql-api.mdx (Marathi) --- website/pages/mr/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/mr/querying/graphql-api.mdx b/website/pages/mr/querying/graphql-api.mdx index b66f2673be24..de35e41f2124 100644 --- a/website/pages/mr/querying/graphql-api.mdx +++ b/website/pages/mr/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | वर्णन | -| --- | --- | --- | -| `&` | `आणि` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `किंवा` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `द्वारे अनुसरण करा` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | वर्णन | +| ----------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `आणि` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `किंवा` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `द्वारे अनुसरण करा` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From 9da0eb61010e7224787d592cc82be84d2563a18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:36 -0400 Subject: [PATCH 804/924] New translations graphql-api.mdx (Hindi) --- website/pages/hi/querying/graphql-api.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/hi/querying/graphql-api.mdx b/website/pages/hi/querying/graphql-api.mdx index 353a62ef15a7..81d663ed1277 100644 --- a/website/pages/hi/querying/graphql-api.mdx +++ b/website/pages/hi/querying/graphql-api.mdx @@ -93,7 +93,7 @@ When querying a collection, the `first` parameter can be used to paginate from t #### उदाहरण का उपयोग करना `पहले` और `छोड़ें` -क्वेरी 10 `टोकन` इकाइयां, संग्रह की शुरुआत से 10 स्थानों से ऑफसेट: +क्वेरी 10 ` टोकन ` इकाइयां, संग्रह की शुरुआत से 10 स्थानों से ऑफसेट: ```graphql { @@ -208,7 +208,7 @@ This can be useful if you are looking to fetch only entities which have changed, ``` > **सिंटैक्टिक शुगर:** आप `और` ऑपरेटर को कॉमा द्वारा अलग किए गए सब-एक्सप्रेशन को पास करके उपरोक्त क्वेरी को सरल बना सकते हैं। -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search query fields provide an expressive text search API that can be a पूर्ण पाठ खोज ऑपरेटर: -| प्रतीक | ऑपरेटर | विवरण | -| --- | --- | --- | -| `&` | `And` | सभी प्रदान किए गए शब्दों को शामिल करने वाली संस्थाओं के लिए एक से अधिक खोज शब्दों को फ़िल्टर में संयोजित करने के लिए | -| | | `Or` | या ऑपरेटर द्वारा अलग किए गए एकाधिक खोज शब्दों वाली क्वेरी सभी संस्थाओं को प्रदान की गई शर्तों में से किसी से मेल के साथ वापस कर देगी | -| `<->` | `Follow by` | दो शब्दों के बीच की दूरी निर्दिष्ट करें। | -| `:*` | `Prefix` | उन शब्दों को खोजने के लिए उपसर्ग खोज शब्द का उपयोग करें जिनके उपसर्ग मेल खाते हैं (2 वर्ण आवश्यक हैं।) | +| प्रतीक | ऑपरेटर | विवरण | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | सभी प्रदान किए गए शब्दों को शामिल करने वाली संस्थाओं के लिए एक से अधिक खोज शब्दों को फ़िल्टर में संयोजित करने के लिए | +| | | `Or` | या ऑपरेटर द्वारा अलग किए गए एकाधिक खोज शब्दों वाली क्वेरी सभी संस्थाओं को प्रदान की गई शर्तों में से किसी से मेल के साथ वापस कर देगी | +| `<->` | `Follow by` | दो शब्दों के बीच की दूरी निर्दिष्ट करें। | +| `:*` | `Prefix` | उन शब्दों को खोजने के लिए उपसर्ग खोज शब्द का उपयोग करें जिनके उपसर्ग मेल खाते हैं (2 वर्ण आवश्यक हैं।) | #### उदाहरण From d6bd43ded91061fdaf862ebb3339fbc6a69dda95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:36 -0400 Subject: [PATCH 805/924] New translations graphql-api.mdx (Yoruba) --- website/pages/yo/querying/graphql-api.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/yo/querying/graphql-api.mdx b/website/pages/yo/querying/graphql-api.mdx index 89cda460d58f..33bdce152375 100644 --- a/website/pages/yo/querying/graphql-api.mdx +++ b/website/pages/yo/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| --- | --- | --- | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples From b9d2b1d20906a865e3f6462d55db0b426ab47348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:38 -0400 Subject: [PATCH 806/924] New translations querying-best-practices.mdx (Arabic) --- .../ar/querying/querying-best-practices.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/ar/querying/querying-best-practices.mdx b/website/pages/ar/querying/querying-best-practices.mdx index 24f0e802e02a..b5501c497ce3 100644 --- a/website/pages/ar/querying/querying-best-practices.mdx +++ b/website/pages/ar/querying/querying-best-practices.mdx @@ -16,7 +16,7 @@ title: أفضل الممارسات للاستعلام على عكس REST API ، فإن GraphQL API مبنية على مخطط يحدد الاستعلامات التي يمكن تنفيذها. -على سبيل المثال ، طلب الاستعلام للحصول على توكن باستخدام استعلام `token` سيبدو كما يلي: +على سبيل المثال ، طلب الاستعلام للحصول على توكن باستخدام استعلام ` token ` سيبدو كما يلي: ```graphql query GetToken($id: ID!) { @@ -40,7 +40,7 @@ query GetToken($id: ID!) { تستخدم استعلامات GraphQL لغة GraphQL ، التي تم تحديدها في [المواصفات](https://spec.graphql.org/). -يتكون استعلام `GetToken` أعلاه من أجزاء متعددة للغة (تم استبدالها أدناه بـ placeholders `[...]`): +يتكون استعلام ` GetToken ` أعلاه من أجزاء متعددة للغة (تم استبدالها أدناه بـ placeholders ` [...] `): ```graphql query [operationName]([variableName]: [variableType]) { @@ -54,9 +54,9 @@ query [operationName]([variableName]: [variableType]) { على الرغم من أن قائمة القواعد التي يجب اتباعها طويلة، إلا أن هناك قواعد أساسية يجب أخذها في الاعتبار عند كتابة استعلامات GraphQL: -- يجب استخدام كل `queryName` مرة واحدة فقط لكل عملية. -- يجب استخدام كل `field` مرة واحدة فقط في التحديد (لا يمكننا الاستعلام عن `id` مرتين ضمن `token`) -- بعض `field` أو الاستعلامات (مثل `tokens`) ترجع أنواعًا معقدة تتطلب تحديدًا للحقول الفرعية. عدم تقديم تحديد عندما يكون متوقعًا (أو تقديم تحديد عندما لا يكون متوقعًا - على سبيل المثال ، الـ `id`) سيؤدي إلى ظهور خطأ. لمعرفة نوع الحقل ، يرجى الرجوع إلى [ The Graph Explorer ](/network/explorer). +- يجب استخدام كل ` queryName ` مرة واحدة فقط لكل عملية. +- يجب استخدام كل ` field ` مرة واحدة فقط في التحديد (لا يمكننا الاستعلام عن ` id ` مرتين ضمن ` token `) +- بعض ` field ` أو الاستعلامات (مثل `tokens`) ترجع أنواعًا معقدة تتطلب تحديدًا للحقول الفرعية. عدم تقديم تحديد عندما يكون متوقعًا (أو تقديم تحديد عندما لا يكون متوقعًا - على سبيل المثال ، الـ ` id `) سيؤدي إلى ظهور خطأ. لمعرفة نوع الحقل ، يرجى الرجوع إلى [ The Graph Explorer ](/network/explorer). - يجب أن يكون أي متغير تم تعيينه لوسيط متطابقًا مع نوعه. - في قائمة المتغيرات المعطاة ، يجب أن يكون كل واحد منها فريدًا. - يجب استخدام جميع المتغيرات المحددة. @@ -308,7 +308,7 @@ query { Such repeated fields (`id`, `active`, `status`) bring many issues: - harder to read for more extensive queries -- عند استخدام الأدوات التي تنشئ أنواع TypeScript بناءً على الاستعلامات (_المزيد عن ذلك في القسم الأخير_)، و `newDelate` و `oldDelegate` سينتج عنهما واجهتين مضمنتان متمايزتين. +- عند استخدام الأدوات التي تنشئ أنواع TypeScript بناءً على الاستعلامات (_المزيد عن ذلك في القسم الأخير_)، و ` newDelate ` و ` oldDelegate ` سينتج عنهما واجهتين مضمنتان متمايزتين. A refactored version of the query would be the following: @@ -431,8 +431,8 @@ In order to keep up with the mentioned above best practices and syntactic rules, [Setup the "operations-recommended"](https://github.com/dotansimha/graphql-eslint#available-configs) config will enforce essential rules such as: -- `@ graphql-eslint / field-on-right-type`: هل يتم استخدام الحقل على النوع المناسب؟ -- `@ graphql-eslint / no-unused variables`: هل يجب أن يبقى المتغير المعطى غير مستخدم؟ +- ` @ graphql-eslint / field-on-right-type `: هل يتم استخدام الحقل على النوع المناسب؟ +- ` @ graphql-eslint / no-unused variables `: هل يجب أن يبقى المتغير المعطى غير مستخدم؟ - و اكثر! This will allow you to **catch errors without even testing queries** on the playground or running them in production! From c361dcf8dbfffa20f7ba9c210174a04886b0b54e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:42 -0400 Subject: [PATCH 807/924] New translations querying-best-practices.mdx (Swedish) --- .../sv/querying/querying-best-practices.mdx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/pages/sv/querying/querying-best-practices.mdx b/website/pages/sv/querying/querying-best-practices.mdx index 5d5201189515..99d76809e653 100644 --- a/website/pages/sv/querying/querying-best-practices.mdx +++ b/website/pages/sv/querying/querying-best-practices.mdx @@ -81,7 +81,7 @@ Men, som det anges i ["Frågehantering från en applikation"](/querying/querying Så här ställer du en fråga till The Graph med `graph-client`: ```tsx -import { execute } from '../.graphclient' +import { execute } from "../.graphclient"; const query = ` query GetToken($id: ID!) { @@ -90,13 +90,13 @@ query GetToken($id: ID!) { owner } } -` +`; const variables = { id: '1' } async function main() { - const result = await execute(query, variables) + const result = await execute(query, variables); // `result` är fullständigt typad! - console.log(result) + console.log(result); } main() @@ -115,15 +115,15 @@ Nu när vi har gått igenom de grundläggande reglerna för syntax för GraphQL- En vanlig (dålig) praxis är att dynamiskt bygga upp frågesträngar enligt följande: ```tsx -const id = params.id -const fields = ['id', 'owner'] +const id = params.id; +const fields = ["id", "owner"]; const query = ` query GetToken { token(id: ${id}) { - ${fields.join('\n')} + ${fields.join("\n")} } } -` +`; // Execute query... ``` @@ -138,9 +138,9 @@ Medan det tidigare avsnittet genererar en giltig GraphQL-fråga har den **många Av dessa skäl rekommenderas det alltid att skriva frågor som statiska strängar: ```tsx -import { execute } from 'your-favorite-graphql-client' +import { execute } from "your-favorite-graphql-client"; -const id = params.id +const id = params.id; const query = ` query GetToken($id: ID!) { token(id: $id) { @@ -148,7 +148,7 @@ query GetToken($id: ID!) { owner } } -` +`; const result = await execute(query, { variables: { @@ -171,9 +171,9 @@ Ibland vill vi inkludera fältet `owner` endast under vissa villkor. För detta kan vi utnyttja direktivet `@include(if:...)` på följande sätt: ```tsx -import { execute } from 'your-favorite-graphql-client' +import { execute } from "your-favorite-graphql-client"; -const id = params.id +const id = params.id; const query = ` query GetToken($id: ID!, $includeOwner: Boolean) { token(id: $id) { From 56088f7c050327cd14c83639d3cb74197607e1df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:44 -0400 Subject: [PATCH 808/924] New translations querying-best-practices.mdx (Urdu (Pakistan)) --- website/pages/ur/querying/querying-best-practices.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/ur/querying/querying-best-practices.mdx b/website/pages/ur/querying/querying-best-practices.mdx index 144a23d1f309..ec6adef80199 100644 --- a/website/pages/ur/querying/querying-best-practices.mdx +++ b/website/pages/ur/querying/querying-best-practices.mdx @@ -55,8 +55,8 @@ query [operationName]([variableName]: [variableType]) { اگرچہ نحوی کرنے اور نہ کرنے کی فہرست طویل ہے، لیکن GraphQL کی کیوریز لکھنے کی بات کرتے وقت ذہن میں رکھنے کے لیے ضروری اصول یہ ہیں: - ہر ایک `queryName` کو فی آپریشن صرف ایک بار استعمال کیا جانا چاہیے. -- ہر ایک `field` کو انتخاب میں صرف ایک بار استعمال کیا جانا چاہیے (ہم `token` کے تحت دو بار `id` سے کیوری نہیں کرسکتے ہیں) -- کچھ `field` یا کیوریز (جیسے `tokens`) پیچیدہ قسمیں واپس کرتے ہیں جن کے لیے سب فیلڈ کے انتخاب کی ضرورت ہوتی ہے۔ توقع کے وقت انتخاب فراہم نہ کرنا (یا توقع نہ ہونے پر انتخاب فراہم کرنا - مثال کے طور پر، `id` پر) ایک خرابی پیدا کرے گا۔ فیلڈ کی قسم جاننے کے لیے، براہ کرم [گراف ایکسپلورر](/network/explorer) سے رجوع کریں. +- ہر ایک ` field ` کو انتخاب میں صرف ایک بار استعمال کیا جانا چاہیے (ہم `token` کے تحت دو بار `id` سے کیوری نہیں کرسکتے ہیں) +- کچھ ` field ` یا کیوریز (جیسے `tokens`) پیچیدہ قسمیں واپس کرتے ہیں جن کے لیے سب فیلڈ کے انتخاب کی ضرورت ہوتی ہے۔ توقع کے وقت انتخاب فراہم نہ کرنا (یا توقع نہ ہونے پر انتخاب فراہم کرنا - مثال کے طور پر، `id` پر) ایک خرابی پیدا کرے گا۔ فیلڈ کی قسم جاننے کے لیے، براہ کرم [گراف ایکسپلورر](/network/explorer) سے رجوع کریں. - کسی دلیل کو تفویض کردہ کوئی بھی متغیر اس کی قسم سے مماثل ہونا چاہیے. - متغیرات کی دی گئی فہرست میں، ان میں سے ہر ایک منفرد ہونا چاہیے. - تمام متعین متغیرات کو استعمال کیا جانا چاہیے. @@ -166,7 +166,7 @@ const result = await execute(query, { **نوٹ: جامد کیوریز میں فیلڈز کو مشروط طور پر کیسے شامل کیا جائے** -ہم صرف ایک خاص شرط پر `owner` فیلڈ کو شامل کرنا چاہتے ہیں. +ہم صرف ایک خاص شرط پر ` owner ` فیلڈ کو شامل کرنا چاہتے ہیں. اس کے لیے، ہم ذیل میں `@include(if:...)` ہدایت کا فائدہ اٹھا سکتے ہیں: From e182a949a8e9d116007bbd3ec06bd4182a424335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:49 -0400 Subject: [PATCH 809/924] New translations querying-from-an-application.mdx (Portuguese) --- website/pages/pt/querying/querying-from-an-application.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pt/querying/querying-from-an-application.mdx b/website/pages/pt/querying/querying-from-an-application.mdx index de13777f23d5..6cea3da1b2c0 100644 --- a/website/pages/pt/querying/querying-from-an-application.mdx +++ b/website/pages/pt/querying/querying-from-an-application.mdx @@ -102,7 +102,7 @@ Finalmente, atualize o seu arquivo `.ts` para usar os documentos digitados em Gr import React, { useEffect } from 'react' // ... // nós importamos tipos e documentos em graphql do código gerado -;`..graphclient/` +(`..graphclient/`) import { ExampleQueryDocument, ExampleQueryQuery, execute } from '../.graphclient' function App() { From f1af910a6ce0a77372e89abddb3116bc285462bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:35:50 -0400 Subject: [PATCH 810/924] New translations querying-from-an-application.mdx (Swedish) --- .../querying/querying-from-an-application.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/pages/sv/querying/querying-from-an-application.mdx b/website/pages/sv/querying/querying-from-an-application.mdx index b25e2b3868c0..4ddf84530e0a 100644 --- a/website/pages/sv/querying/querying-from-an-application.mdx +++ b/website/pages/sv/querying/querying-from-an-application.mdx @@ -163,9 +163,9 @@ npm install @apollo/client graphql Sedan kan du göra en förfrågan till API:et med följande kod: ```javascript -import { ApolloClient, InMemoryCache, gql } from '@apollo/client' +import { ApolloClient, InMemoryCache, gql } from "@apollo/client"; -const APIURL = 'https://api.studio.thegraph.com/query///' +const APIURL = "https://api.studio.thegraph.com/query///"; const tokensQuery = ` query { @@ -176,20 +176,20 @@ const tokensQuery = ` metadataURI } } -` +`; const client = new ApolloClient({ uri: APIURL, cache: new InMemoryCache(), -}) +}); client .query({ query: gql(tokensQuery), }) - .then((data) => console.log('Subgraph data: ', data)) + .then((data) => console.log("Subgraph data: ", data)) .catch((err) => { - console.log('Error fetching data: ', err) + console.log("Error fetching data: ", err); }) ``` @@ -207,20 +207,20 @@ const tokensQuery = ` metadataURI } } -` +`; client .query({ query: gql(tokensQuery), variables: { first: 10, - orderBy: 'createdAtTimestamp', - orderDirection: 'desc', + orderBy: "createdAtTimestamp", + orderDirection: "desc", }, }) - .then((data) => console.log('Subgraph data: ', data)) + .then((data) => console.log("Subgraph data: ", data)) .catch((err) => { - console.log('Error fetching data: ', err) + console.log("Error fetching data: ", err); }) ``` @@ -244,9 +244,9 @@ npm install urql graphql Sedan kan du göra en förfrågan till API:et med följande kod: ```javascript -import { createClient } from 'urql' +import { createClient } from "urql"; -const APIURL = 'https://api.thegraph.com/subgraphs/name/username/subgraphname' +const APIURL = "https://api.thegraph.com/subgraphs/name/username/subgraphname"; const tokensQuery = ` query { @@ -257,11 +257,11 @@ const tokensQuery = ` metadataURI } } -` +`; const client = createClient({ url: APIURL, -}) +}); const data = await client.query(tokensQuery).toPromise() ``` From 00342879b300edb7362d2cfa52976212ec0fbc2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:01 -0400 Subject: [PATCH 811/924] New translations assemblyscript-migration-guide.mdx (Romanian) --- .../ro/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From aea4c97db6b9d3ea3a15968bdc0d70d5bbf81580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:02 -0400 Subject: [PATCH 812/924] New translations assemblyscript-migration-guide.mdx (French) --- .../assemblyscript-migration-guide.mdx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx index f5f9aa6d440c..e782a13b7e2b 100644 --- a/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Vous devrez renommer vos variables en double si vous conservez une observation de variables. - ### Comparaisons nulles - En effectuant la mise à niveau sur votre subgraph, vous pouvez parfois obtenir des erreurs comme celles-ci : ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - Pour résoudre, vous pouvez simplement remplacer l'instruction `if` par quelque chose comme ceci : ```typescript @@ -213,7 +209,7 @@ Dans ces cas-là, vous pouvez utiliser la fonction `changetype` : class Bytes extends Uint8Array {} let uint8Array = new Uint8Array(2) -changetype(uint8Array) // fonctionne :) +changetype(uint8Array ) // fonctionne :) ``` ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Pour résoudre ce problème, vous pouvez créer une variable pour l'accès à cette propriété afin que le compilateur puisse effectuer la vérification magique de la nullité : ```typescript @@ -406,7 +401,7 @@ type Total @entity { let total = Total.load('latest') if (total === null) { - total = new Total('latest') // initialise déjà les propriétés non-nullables + total = new Total('latest') // initialise déjà les propriétés non-nullables } total.amount = total.amount + BigInt.fromI32(1) @@ -488,12 +483,12 @@ Vous ne pouvez désormais plus définir de champs dans vos types qui sont des li ```graphql type Something @entity { - id: Bytes! + id: Bytes! } type MyEntity @entity { - id: Bytes! - invalidField: [Something]! # n'est plus valide + id: Bytes! + invalidField: [Something]! # n'est plus valide } ``` From 0a0a28a9f427199bc40dcaa228e9fadc88f9ac4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:03 -0400 Subject: [PATCH 813/924] New translations assemblyscript-migration-guide.mdx (Spanish) --- .../es/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/es/release-notes/assemblyscript-migration-guide.mdx b/website/pages/es/release-notes/assemblyscript-migration-guide.mdx index bfc973f982dd..c3770a5c9ef7 100644 --- a/website/pages/es/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/es/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Tendrás que cambiar el nombre de las variables duplicadas si tienes una variable shadowing. - ### Comparaciones Nulas - Al hacer la actualización en un subgrafo, a veces pueden aparecer errores como estos: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - Para solucionarlo puedes simplemente cambiar la declaración `if` por algo así: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Para solucionar este problema, puedes crear una variable para ese acceso a la propiedad de manera que el compilador pueda hacer la magia de la comprobación de nulidad: ```typescript From b3657102374faa8ee788fb0240bcdd7f733868ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:04 -0400 Subject: [PATCH 814/924] New translations assemblyscript-migration-guide.mdx (Arabic) --- .../ar/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx index 84e00f13b4e1..9674f1777573 100644 --- a/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ let a = a + b ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - ستحتاج إلى إعادة تسمية المتغيرات المكررة إذا كان لديك variable shadowing. - ### مقارانات Null - من خلال إجراء الترقية على ال Subgraph الخاص بك ، قد تحصل أحيانًا على أخطاء مثل هذه: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - لحل المشكلة يمكنك ببساطة تغيير عبارة `if` إلى شيء مثل هذا: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - لإصلاح هذه المشكلة ، يمكنك إنشاء متغير للوصول إلى الخاصية حتى يتمكن المترجم من القيام بعملية التحقق من الـ nullability: ```typescript From 4bd0e90b25ed63522a6d01b2929dcf1787d9ef0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:04 -0400 Subject: [PATCH 815/924] New translations assemblyscript-migration-guide.mdx (Czech) --- .../cs/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx b/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx index 8997891e0538..aaa199b28aab 100644 --- a/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Pokud jste použili stínování proměnných, musíte duplicitní proměnné přejmenovat. - ### Nulová srovnání - Při aktualizaci podgrafu může někdy dojít k těmto chybám: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - Pro vyřešení můžete jednoduše změnit příkaz `if` na něco takového: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Chcete-li tento problém vyřešit, můžete vytvořit proměnnou pro přístup k této vlastnosti, aby překladač mohl provést kouzlo kontroly nulovatelnosti: ```typescript From 5f19913563e6d8c98f559defbca7750d5f919f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:05 -0400 Subject: [PATCH 816/924] New translations assemblyscript-migration-guide.mdx (German) --- .../de/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/de/release-notes/assemblyscript-migration-guide.mdx b/website/pages/de/release-notes/assemblyscript-migration-guide.mdx index fb1ad8beb382..058c48b32e6f 100644 --- a/website/pages/de/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/de/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 84f1f607668c280c142979c85b762a1d8194bacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:05 -0400 Subject: [PATCH 817/924] New translations assemblyscript-migration-guide.mdx (Italian) --- .../it/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/it/release-notes/assemblyscript-migration-guide.mdx b/website/pages/it/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/it/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/it/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 992be1f813882fa7536252bce3fa2e458e5a48e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:06 -0400 Subject: [PATCH 818/924] New translations assemblyscript-migration-guide.mdx (Japanese) --- .../ja/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx index 766fbb6c80a3..82a7d23de3f8 100644 --- a/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - 変数シャドウイングを行っていた場合は、重複する変数の名前を変更する必要があります。 - ### Null 比較 - サブグラフのアップグレードを行うと、時々以下のようなエラーが発生することがあります。 ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - 解決するには、 `if` 文を以下のように変更するだけです。 ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - この問題を解決するには、そのプロパティアクセスのための変数を作成して、コンパイラが nullability check のマジックを行うようにします。 ```typescript From 3c84852ed829430f55a769ebbd37cad1e8f7b8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:07 -0400 Subject: [PATCH 819/924] New translations assemblyscript-migration-guide.mdx (Korean) --- .../ko/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 1e1037868f9eaaed8081cb3002ed0e73fa28c3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:08 -0400 Subject: [PATCH 820/924] New translations assemblyscript-migration-guide.mdx (Dutch) --- .../nl/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx b/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 7c4c9aade4eec8150c5da654a66066201e5fc45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:08 -0400 Subject: [PATCH 821/924] New translations assemblyscript-migration-guide.mdx (Polish) --- .../pl/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx b/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 2189e2148036577638f592122f5e1d82eb99e8a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:09 -0400 Subject: [PATCH 822/924] New translations assemblyscript-migration-guide.mdx (Portuguese) --- .../pt/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx b/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx index ce410b9ed255..df425838fea1 100644 --- a/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Renomeie as suas variáveis duplicadas, se tinha o sombreamento variável. - ### Comparações de Nulos - Ao fazer a atualização no seu subgraph, às vezes aparecem erros como este: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - Para resolver isto, basta mudar a declaração `if` para algo assim: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Para consertar este problema, vale criar uma variável para aquele acesso à propriedade, para que o compilador faça a magia da checagem de anulabilidade: ```typescript From 37bb7f6ac86427ff0b3e1dc62f8fc6c7e98842a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:10 -0400 Subject: [PATCH 823/924] New translations assemblyscript-migration-guide.mdx (Russian) --- .../assemblyscript-migration-guide.mdx | 159 +++++++++++++++++- 1 file changed, 154 insertions(+), 5 deletions(-) diff --git a/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx index fc783e57bfc5..4839cf7e4b60 100644 --- a/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx @@ -19,16 +19,21 @@ title: Руководство по миграции AssemblyScript - Добавлена поддержка x instanceof GenericClass ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) - Добавлен `StaticArray`, более эффективный вариант массива ([v0.9.3](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.3)) - Добавлен `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -- Реализован аргумент `radix` для `Number#toString` ([v0.10.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.1)) -- Добавлена поддержка разделителей в литералах с плавающей точкой ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) +- Реализован аргумент `radix` для `Number#toString` ( +v0.10.1)
  • + + - Добавлена поддержка разделителей в литералах с плавающей точкой ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) - Добавлена поддержка функций первого класса ([v0.14.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.0)) - Добавление встроенных модулей: `i32/i64/f32/f64.add/sub/mul` ([v0.14.13](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.13)) - Внедрение `Array/TypedArray/String#at` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) - Добавлена поддержка литеральных строк шаблона ([v0.18.17](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.17)) - Добавление `encodeURI(Component)` и `decodeURI(Component)` ([v0.18.27](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.27)) -- Добавление `toString`, `toDateString` и `toTimeString` к `Date` ([v0.18.29](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.29)) -- Добавление `toUTCString` для `Date` ([v0.18.30](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.30)) -- Добавление встроенного типа `nonnull/NonNullable` ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) +- Добавление `toString`, `toDateString` и `toTimeString` к `Date` ([v0.18.29](https://github.com/ AssemblyScript/assemblyscript/releases/tag/v0.18.29)) +- Добавление `toUTCString` для `Date` (v0.18.30) + + - Добавление встроенного типа `nonnull/NonNullable` ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) + + ### Оптимизации @@ -37,15 +42,21 @@ title: Руководство по миграции AssemblyScript - Кэширование большего количества обращений к полям в std Map и Set ([v0.17.8](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.8)) - Оптимизация по двум степеням в `ipow32/64` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) + + ### Прочее - Тип литерала массива теперь можно определить по его содержимому ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) - Стандартная библиотека обновлена до версии Unicode 13.0.0 ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) + + ## Как выполнить обновление? 1. Измените мэппинги `apiVersion` в `subgraph.yaml` на `0.0.6`: + + ```yaml ... dataSources: @@ -56,8 +67,11 @@ dataSources: ... ``` + 2. Обновите используемый Вами `graph-cli` до `latest` версии, выполнив: + + ```bash # если он у Вас установлен глобально npm install --global @graphprotocol/graph-cli@latest @@ -66,21 +80,31 @@ npm install --global @graphprotocol/graph-cli@latest npm install --save-dev @graphprotocol/graph-cli@latest ``` + 3. Сделайте то же самое для `graph-ts`, но вместо глобальной установки сохраните его в своих основных зависимостях: + + ```bash npm install --save @graphprotocol/graph-ts@latest ``` + 4. Следуйте остальной части руководства, чтобы исправить языковые изменения. 5. Снова запустите `codegen` и `deploy`. + + ## Критические изменения + + ### Обнуляемость В более старой версии AssemblyScript можно было создать такой код: + + ```typescript function load(): Value | null { ... } @@ -88,8 +112,11 @@ let maybeValue = load(); maybeValue.aMethod(); ``` + Однако в новой версии, поскольку значение обнуляемо, требуется проверка, например, такая: + + ```typescript let maybeValue = load() @@ -98,28 +125,39 @@ if (maybeValue) { } ``` + Или принудительно вот такая: + + ```typescript let maybeValue = load()! // прерывается во время выполнения, если значение равно null maybeValue.aMethod() ``` + Если Вы не уверены, что выбрать, мы рекомендуем всегда использовать безопасную версию. Если значение не существует, Вы можете просто выполнить раннее выражение if с возвратом в обработчике субграфа. + + ### Затенение переменных Раньше можно было сделать [затенение переменных](https://en.wikipedia.org/wiki/Variable_shadowing) и код, подобный этому, работал: + + ```typescript let a = 10 let b = 20 let a = a + b ``` + Однако теперь это больше невозможно, и компилятор возвращает эту ошибку: + + ```typescript ERROR TS2451: Cannot redeclare block-scoped variable 'a' @@ -128,12 +166,16 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' in assembly/index.ts(4,3) ``` + Вам нужно будет переименовать дублированные переменные, если Вы используете затенение переменных. + ### Нулевые сравнения Выполняя обновление своего субграфа, иногда Вы можете получить такие ошибки: + + ```typescript ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt'. if (decimals == null) { @@ -141,8 +183,11 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i in src/mappings/file.ts(41,21) ``` + Чтобы решить эту проблему, Вы можете просто изменить оператор `if` на что-то вроде этого: + + ```typescript if (!decimals) { @@ -151,17 +196,23 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i if (decimals === null) { ``` + Подобное относится к случаям, когда вместо == используется !=. + + ### Кастинг Раньше для кастинга обычно использовалось ключевое слово `as`, например: + + ```typescript let byteArray = new ByteArray(10) let uint8Array = byteArray as Uint8Array // equivalent to: byteArray ``` + Однако это работает только в двух случаях: - Примитивный кастинг (между такими типами, как `u8`, `i32`, `bool`; например: `let b: isize = 10; b as usize`); @@ -169,6 +220,8 @@ let uint8Array = byteArray as Uint8Array // equivalent to: byteArray Примеры: + + ```typescript // примитивный кастинг let a: usize = 10 @@ -176,6 +229,9 @@ let b: isize = 5 let c: usize = a + (b as usize) ``` + + + ```typescript // укрупнение по наследованию классов class Bytes extends Uint8Array {} @@ -184,11 +240,14 @@ let bytes = new Bytes(2) // bytes // то же, что: bytes as Uint8Array ``` + Есть два сценария, в которых Вы можете захотеть выполнить преобразование, но использовать `as`/`var` **небезопасно**: - Понижение уровня наследования классов (superclass → subclass) - Между двумя типами, имеющими общий супер класс + + ```typescript // понижение уровня наследования классов class Bytes extends Uint8Array {} @@ -197,6 +256,9 @@ let uint8Array = new Uint8Array(2) // uint8Array // перерывы в работе :( ``` + + + ```typescript // между двумя типами, имеющими общий суперкласс class Bytes extends Uint8Array {} @@ -206,8 +268,11 @@ let bytes = new Bytes(2) // bytes // перерывы в работе :( ``` + В таких случаях можно использовать функцию `changetype`: + + ```typescript // понижение уровня наследования классов class Bytes extends Uint8Array {} @@ -216,6 +281,9 @@ let uint8Array = new Uint8Array(2) changetype(uint8Array) // работает :) ``` + + + ```typescript // между двумя типами, имеющими общий суперкласс class Bytes extends Uint8Array {} @@ -225,8 +293,11 @@ let bytes = new Bytes(2) changetype(bytes) // работает :) ``` + Если Вы просто хотите удалить значение NULL, Вы можете продолжать использовать оператор `as` (или `variable`), но помните, что значение не может быть нулевым, иначе оно сломается. + + ```typescript // удалить значение NULL let previousBalance = AccountBalance.load(balanceId) // AccountBalance | null @@ -238,6 +309,7 @@ if (previousBalance != null) { let newBalance = new AccountBalance(balanceId) ``` + В случае обнуления мы рекомендуем Вам обратить внимание на [функцию проверки обнуления](https://www.assemblyscript.org/basics.html#nullability-checks), это сделает ваш код чище 🙂 Также мы добавили еще несколько статических методов в некоторые типы, чтобы облегчить кастинг: @@ -247,10 +319,14 @@ let newBalance = new AccountBalance(balanceId) - BigInt.fromByteArray - ByteArray.fromBigInt + + ### Проверка нулевого значения с доступом к свойству Чтобы применить [функцию проверки на нулевое значение](https://www.assemblyscript.org/basics.html#nullability-checks), Вы можете использовать операторы `if` или тернарный оператор (`?` и `:`) следующим образом: + + ```typescript let something: string | null = 'data' @@ -267,8 +343,11 @@ if (something) { } ``` + Однако это работает только тогда, когда Вы выполняете `if` / тернарную операцию для переменной, а не для доступа к свойству, например: + + ```typescript class Container { data: string | null @@ -280,8 +359,11 @@ container.data = 'data' let somethingOrElse: string = container.data ? container.data : 'else' // не компилируется ``` + В результате чего выдается ошибка: + + ```typescript ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/string/String'. @@ -289,8 +371,11 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Чтобы решить эту проблему, Вы можете создать переменную для доступа к этому свойству, чтобы компилятор мог выполнять проверку допустимости значений NULL: + + ```typescript class Container { data: string | null @@ -304,10 +389,15 @@ let data = container.data let somethingOrElse: string = data ? data : 'else' // компилируется просто отлично :) ``` + + + ### Перегрузка оператора при доступе к свойствам Если Вы попытаетесь суммировать (например) тип, допускающий значение Null (из доступа к свойству), с типом, не допускающим значение Null, компилятор AssemblyScript вместо того, чтобы выдать предупреждение об ошибке компиляции, предупреждающую, что одно из значений допускает значение Null, просто компилируется молча, давая возможность сломать код во время выполнения. + + ```typescript class BigInt extends Uint8Array { @operator('+') @@ -330,8 +420,11 @@ let wrapper = new Wrapper(y) wrapper.n = wrapper.n + x // не выдает ошибок времени компиляции, как это должно быть ``` + Мы открыли вопрос по этому поводу для компилятора AssemblyScript, но пока, если Вы выполняете подобные операции в своих мэппингах субграфов, Вам следует изменить их так, чтобы перед этим выполнялась проверка на нулевое значение. + + ```typescript let wrapper = new Wrapper(y) @@ -342,26 +435,37 @@ if (!wrapper.n) { wrapper.n = wrapper.n + x // теперь `n` гарантированно будет BigInt ``` + + + ### Инициализация значения Если у Вас есть такой код: + + ```typescript var value: Type // null value.x = 10 value.y = 'content' ``` + Он будет скомпилирован, но сломается во время выполнения. Это происходит из-за того, что значение не было инициализировано, поэтому убедитесь, что Ваш субграф инициализировал свои значения, например так: + + ```typescript var value = new Type() // initialized value.x = 10 value.y = 'content' ``` + Также, если у Вас есть свойства, допускающие значение NULL, в объекте GraphQL, например: + + ```graphql type Total @entity { id: Bytes! @@ -369,8 +473,11 @@ type Total @entity { } ``` + И у Вас есть код, аналогичный этому: + + ```typescript let total = Total.load('latest') @@ -381,8 +488,11 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` + Вам необходимо убедиться, что значение `total.amount` инициализировано, потому что, если Вы попытаетесь получить доступ к сумме, как в последней строке, произойдет сбой. Таким образом, Вы либо инициализируете его первым: + + ```typescript let total = Total.load('latest') @@ -394,8 +504,11 @@ if (total === null) { total.tokens = total.tokens + BigInt.fromI32(1) ``` + Или Вы можете просто изменить свою схему GraphQL, чтобы не использовать тип, допускающий значение NULL для этого свойства. Тогда мы инициализируем его нулем на этапе `codegen` 😉 + + ```graphql type Total @entity { id: Bytes! @@ -403,6 +516,9 @@ type Total @entity { } ``` + + + ```typescript let total = Total.load('latest') @@ -413,10 +529,15 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` + + + ### Инициализация свойств класса Если Вы экспортируете какие-либо классы со свойствами, которые являются другими классами (декларированными Вами или стандартной библиотекой), то это выглядит следующим образом: + + ```typescript class Thing {} @@ -425,8 +546,11 @@ export class Something { } ``` + Компилятор выдаст ошибку, потому что Вам нужно либо добавить инициализатор для свойств, являющихся классами, либо добавить оператор `!`: + + ```typescript export class Something { constructor(public value: Thing) {} @@ -449,44 +573,63 @@ export class Something { } ``` + + + ### Инициализация массива Класс `Array` по-прежнему принимает число для инициализации длины списка, однако Вам следует соблюдать осторожность, поскольку такие операции, как `.push`, фактически увеличивают размер, а не добавляют его в начало, например: + + ```typescript let arr = new Array(5) // ["", "", "", "", ""] arr.push('something') // ["", "", "", "", "", "something"] // size 6 :( ``` + В зависимости от используемых типов, например, допускающих значение NULL, и способа доступа к ним, можно столкнуться с ошибкой времени выполнения, подобной этой: + + ``` ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/array.ts, line 110, column 40, with message: Element type must be nullable if array is holey wasm backtrace: 0: 0x19c4 - !~lib/@graphprotocol/graph-ts/index/format 1: 0x1e75 - !~lib/@graphprotocol/graph-ts/common/collections/Entity#constructor 2: 0x30b9 - !node_modules/@graphprotocol/graph-ts/global/global/id_of_type ``` + Для того чтобы фактически начать, Вы должны либо инициализировать `Array` нулевым размером, следующим образом: + + ```typescript let arr = new Array(0) // [] arr.push('something') // ["something"] ``` + Или Вы должны изменить его через индекс: + + ```typescript let arr = new Array(5) // ["", "", "", "", ""] arr[0] = 'something' // ["something", "", "", "", ""] ``` + + + ### Схема GraphQL Это не прямое изменение AssemblyScript, но Вам, возможно, придется обновить файл `schema.graphql`. Теперь Вы больше не можете определять поля в своих типах, которые являются списками, не допускающими значение NULL. Если у Вас такая схема: + + ```graphql type Something @entity { id: Bytes! @@ -498,8 +641,11 @@ type MyEntity @entity { } ``` + Вам нужно добавить `!` к элементу типа List, например, так: + + ```graphql type Something @entity { id: Bytes! @@ -511,8 +657,11 @@ type MyEntity @entity { } ``` + Изменение произошло из-за различий в допустимости значений NULL между версиями AssemblyScript и связано с файлом `src/generated/schema.ts` (путь по умолчанию, возможно, Вы его изменили). + + ### Прочее - `Map#set` и `Set#add` согласованы со спецификацией, произведён возврат к `this` ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) From 5b4987a7e2f449966a1e8de205a1602107dc2c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:11 -0400 Subject: [PATCH 824/924] New translations assemblyscript-migration-guide.mdx (Swedish) --- .../assemblyscript-migration-guide.mdx | 127 +++++++++--------- 1 file changed, 61 insertions(+), 66 deletions(-) diff --git a/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx b/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx index 97c6bb95635a..afa4a7df4747 100644 --- a/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx @@ -91,17 +91,17 @@ maybeValue.aMethod(); Men i den nyare versionen, eftersom värdet är nullable, måste du kontrollera, så här: ```typescript -let maybeValue = load() +let maybeValue = load(); if (maybeValue) { - maybeValue.aMethod() // `maybeValue` is not null anymore + maybeValue.aMethod(); // `maybeValue` is not null anymore } ``` Eller gör så här: ```typescript -let maybeValue = load()! // bryts i runtime om värdet är null +let maybeValue = load()!; // bryts i runtime om värdet är null maybeValue.aMethod() ``` @@ -113,8 +113,8 @@ Om du är osäker på vilken du ska välja, rekommenderar vi alltid att använda Tidigare kunde du använda [variabelskuggning](https://en.wikipedia.org/wiki/Variable_shadowing) och kod som detta skulle fungera: ```typescript -let a = 10 -let b = 20 +let a = 10; +let b = 20; let a = a + b ``` @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Du måste döpa om dina duplicerade variabler om du hade variabelskuggning. - ### Jämförelser med nollvärden - När du gör uppgraderingen av din subgraf kan du ibland få fel som dessa: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - För att lösa problemet kan du helt enkelt ändra `if`-satsen till något i den här stilen: ```typescript @@ -158,8 +154,8 @@ Samma gäller om du använder != istället för ==. Det vanliga sättet att göra kasting tidigare var att bara använda nyckelordet `as`, som så här: ```typescript -let byteArray = new ByteArray(10) -let uint8Array = byteArray as Uint8Array // motsvarande: byteArray +let byteArray = new ByteArray(10); +let uint8Array = byteArray as Uint8Array; // motsvarande: byteArray ``` Detta fungerar dock endast i två scenarier: @@ -171,8 +167,8 @@ Exempel: ```typescript // primitive casting -let a: usize = 10 -let b: isize = 5 +let a: usize = 10; +let b: isize = 5; let c: usize = a + (b as usize) ``` @@ -180,7 +176,7 @@ let c: usize = a + (b as usize) // upcasting on class inheritance class Bytes extends Uint8Array {} -let bytes = new Bytes(2) +let bytes = new Bytes(2); // bytes // same as: bytes as Uint8Array ``` @@ -193,7 +189,7 @@ Det finns två scenarier där du kan vilja casta, men att använda `as`/`var` // downcasting om klassarv class Bytes extends Uint8Array {} -let uint8Array = new Uint8Array(2) +let uint8Array = new Uint8Array(2); // uint8Array // breaks in runtime :( ``` @@ -202,7 +198,7 @@ let uint8Array = new Uint8Array(2) class Bytes extends Uint8Array {} class ByteArray extends Uint8Array {} -let bytes = new Bytes(2) +let bytes = new Bytes(2); // bytes // breaks in runtime :( ``` @@ -212,8 +208,8 @@ I dessa fall kan du använda funktionen `changetype`: // downcasting om klassarv class Bytes extends Uint8Array {} -let uint8Array = new Uint8Array(2) -changetype(uint8Array) // works :) +let uint8Array = new Uint8Array(2); +changetype(uint8Array); // works :) ``` ```typescript @@ -221,18 +217,18 @@ changetype(uint8Array) // works :) class Bytes extends Uint8Array {} class ByteArray extends Uint8Array {} -let bytes = new Bytes(2) -changetype(bytes) // works :) +let bytes = new Bytes(2); +changetype(bytes); // works :) ``` Om du bara vill ta bort nullability kan du fortsätta använda `as`-operatorn (eller `variable`), men se till att du vet att värdet inte kan vara null, annars kommer det att bryta. ```typescript // ta bort ogiltighet -let previousBalance = AccountBalance.load(balanceId) // AccountBalance | null +let previousBalance = AccountBalance.load(balanceId); // AccountBalance | null if (previousBalance != null) { - return previousBalance as AccountBalance // safe remove null + return previousBalance as AccountBalance; // safe remove null } let newBalance = new AccountBalance(balanceId) @@ -252,18 +248,18 @@ Vi har också lagt till några fler statiska metoder i vissa typer för att unde För att använda [nullability check feature](https://www.assemblyscript.org/basics.html#nullability-checks) kan du använda antingen `if`-satser eller den ternära operatorn (`?` och `:`) så här: ```typescript -let something: string | null = 'data' +let something: string | null = "data"; -let somethingOrElse = something ? something : 'else' +let somethingOrElse = something ? something : "else"; // or -let somethingOrElse +let somethingOrElse; if (something) { - somethingOrElse = something + somethingOrElse = something; } else { - somethingOrElse = 'else' + somethingOrElse = "else"; } ``` @@ -274,10 +270,10 @@ class Container { data: string | null } -let container = new Container() -container.data = 'data' +let container = new Container(); +container.data = "data"; -let somethingOrElse: string = container.data ? container.data : 'else' // Kompilerar inte +let somethingOrElse: string = container.data ? container.data : "else"; // Kompilerar inte ``` Vilket ger detta fel: @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - För att åtgärda problemet kan du skapa en variabel för den egenskapen så att kompilatorn kan utföra den magiska nollbarhetskontrollen: ```typescript @@ -296,12 +291,12 @@ class Container { data: string | null } -let container = new Container() -container.data = 'data' +let container = new Container(); +container.data = "data"; -let data = container.data +let data = container.data; -let somethingOrElse: string = data ? data : 'else' // kompilerar helt okej :) +let somethingOrElse: string = data ? data : "else"; // kompilerar helt okej :) ``` ### Operatörsöverladdning med egenskapsaccess @@ -310,7 +305,7 @@ Om du försöker summera (till exempel) en nullable typ (från en property acces ```typescript class BigInt extends Uint8Array { - @operator('+') + @operator("+") plus(other: BigInt): BigInt { // ... } @@ -320,26 +315,26 @@ class Wrapper { public constructor(public n: BigInt | null) {} } -let x = BigInt.fromI32(2) -let y: BigInt | null = null +let x = BigInt.fromI32(2); +let y: BigInt | null = null; -x + y // ge kompileringsfel om ogiltighet +x + y; // ge kompileringsfel om ogiltighet -let wrapper = new Wrapper(y) +let wrapper = new Wrapper(y); -wrapper.n = wrapper.n + x // ger inte kompileringsfel som det borde +wrapper.n = wrapper.n + x; // ger inte kompileringsfel som det borde ``` Vi har öppnat en fråga om AssemblyScript-kompilatorn för detta, men om du gör den här typen av operationer i dina subgraf-mappningar bör du ändra dem så att de gör en null-kontroll innan den. ```typescript -let wrapper = new Wrapper(y) +let wrapper = new Wrapper(y); if (!wrapper.n) { - wrapper.n = BigInt.fromI32(0) + wrapper.n = BigInt.fromI32(0); } -wrapper.n = wrapper.n + x // nu är `n` garanterat ett BigInt +wrapper.n = wrapper.n + x; // nu är `n` garanterat ett BigInt ``` ### Initialisering av värde @@ -347,17 +342,17 @@ wrapper.n = wrapper.n + x // nu är `n` garanterat ett BigInt Om du har någon kod som denna: ```typescript -var value: Type // null -value.x = 10 -value.y = 'content' +var value: Type; // null +value.x = 10; +value.y = "content" ``` Det kommer att kompilera men brytas vid körning, det händer eftersom värdet inte har initialiserats, så se till att din subgraf har initialiserat sina värden, så här: ```typescript -var value = new Type() // initialized -value.x = 10 -value.y = 'content' +var value = new Type(); // initialized +value.x = 10; +value.y = "content" ``` Även om du har nullable properties i en GraphQL-entitet, som denna: @@ -372,10 +367,10 @@ type Total @entity { Och du har en kod som liknar den här: ```typescript -let total = Total.load('latest') +let total = Total.load("latest"); if (total === null) { - total = new Total('latest') + total = new Total("latest") } total.amount = total.amount + BigInt.fromI32(1) @@ -384,11 +379,11 @@ total.amount = total.amount + BigInt.fromI32(1) Du måste se till att initialisera värdet `total.amount`, för om du försöker komma åt som i den sista raden för summan, kommer det att krascha. Så antingen initialiserar du det först: ```typescript -let total = Total.load('latest') +let total = Total.load("latest") if (total === null) { - total = new Total('latest') - total.amount = BigInt.fromI32(0) + total = new Total("latest") + total.amount = BigInt.fromI32(0); } total.tokens = total.tokens + BigInt.fromI32(1) @@ -404,10 +399,10 @@ type Total @entity { ``` ```typescript -let total = Total.load('latest') +let total = Total.load("latest"); if (total === null) { - total = new Total('latest') // initierar redan icke-nullställbara egenskaper + total = new Total("latest"); // initierar redan icke-nullställbara egenskaper } total.amount = total.amount + BigInt.fromI32(1) @@ -435,17 +430,17 @@ export class Something { // or export class Something { - value: Thing + value: Thing; constructor(value: Thing) { - this.value = value + this.value = value; } } // or export class Something { - value!: Thing + value!: Thing; } ``` @@ -454,9 +449,9 @@ export class Something { Klassen `Array` accepterar fortfarande ett tal för att initiera längden på listan, men du bör vara försiktig eftersom operationer som `.push` faktiskt ökar storleken istället för att lägga till i början, till exempel: ```typescript -let arr = new Array(5) // ["", "", "", "", ""] +let arr = new Array(5); // ["", "", "", "", ""] -arr.push('something') // ["", "", "", "", "", "something"] // size 6 :( +arr.push("something"); // ["", "", "", "", "", "something"] // size 6 :( ``` Beroende på vilka typer du använder, t.ex. nullable-typer, och hur du kommer åt dem, kan du stöta på ett runtime-fel som det här: @@ -468,17 +463,17 @@ ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/ar För att faktiskt trycka i början bör du antingen initiera `Array` med storlek noll, så här: ```typescript -let arr = new Array(0) // [] +let arr = new Array(0); // [] -arr.push('something') // ["something"] +arr.push("something"); // ["something"] ``` Eller så bör du mutera den via index: ```typescript -let arr = new Array(5) // ["", "", "", "", ""] +let arr = new Array(5); // ["", "", "", "", ""] -arr[0] = 'something' // ["something", "", "", "", ""] +arr[0] = "something"; // ["something", "", "", "", ""] ``` ### GraphQL-schema From f226689f491ff5058c20aae7b70a6b4b3a6f6a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:11 -0400 Subject: [PATCH 825/924] New translations assemblyscript-migration-guide.mdx (Turkish) --- .../tr/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx index 338c85951884..a54f163e8541 100644 --- a/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Değişken gölgelemeniz varsa, yinelenen değişkenlerinizi yeniden adlandırmanız gerekir. - ### Null Karşılaştırmaları - Subgraph'inizde yükseltme yaparak, bazen aşağıdaki gibi hatalar alabilirsiniz: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - Çözmek için `if` ifadesini aşağıdaki gibi değiştirebilirsiniz: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Bu sorunu çözmek için, bu özellik erişimi için bir değişken oluşturabilirsiniz, böylece derleyici geçersizlik denetimi sihrini yapabilir: ```typescript From 5081266bbd7e6cefb8a22055153a1cf881240bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:12 -0400 Subject: [PATCH 826/924] New translations assemblyscript-migration-guide.mdx (Ukrainian) --- .../uk/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx b/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 8fc6da7b7e70a2868a476fb54acec8c7824c64a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:13 -0400 Subject: [PATCH 827/924] New translations assemblyscript-migration-guide.mdx (Chinese Simplified) --- .../zh/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx b/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx index 622bdeef307e..3ff2d318c88f 100644 --- a/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - 如果您有变量遮蔽的情况,则需要重命名重名变量。 - ### 空值比较 - 对子图进行升级后,有时您可能会遇到如下错误: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - 要解决此问题,您只需将 `if` 语句更改为如下所示代码: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - 要解决此问题,您可以为该属性访问创建一个变量,以便编译器可以执行可空性检查: ```typescript From d56a0fde9448be43c2f3530fb446dc7a642cf944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:13 -0400 Subject: [PATCH 828/924] New translations assemblyscript-migration-guide.mdx (Urdu (Pakistan)) --- .../ur/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx index 31439d43c505..9c8d0512a4eb 100644 --- a/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - اگر آپ کے پاس متغیر شیڈونگ ہے تو آپ کو اپنے ڈپلیکیٹ متغیرات کا نام تبدیل کرنے کی ضرورت ہوگی. - ### کالعدم موازنہ - اپنے سب گراف پر اپ گریڈ کرنے سے، بعض اوقات آپ کو اس طرح کی غلطیاں مل سکتی ہیں: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - حل کرنے کے لیے آپ صرف `if` اسٹیٹمنٹ کو اس طرح تبدیل کر سکتے ہیں: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - اس مسئلے کو حل کرنے کے لیے، آپ اس پراپرٹی تک رسائی کے لیے ایک متغیر بنا سکتے ہیں تاکہ مرتب کرنے والا منسوخی چیک میجک کر سکے: ```typescript From de19c42139e6fdd896cfb2804c58c1c252e2b3ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:14 -0400 Subject: [PATCH 829/924] New translations assemblyscript-migration-guide.mdx (Vietnamese) --- .../vi/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx b/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx index 69c36218d8af..8536b657e78a 100644 --- a/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - Bạn sẽ cần đổi tên các biến trùng lặp của mình nếu bạn có che biến. - ### So sánh Null - Bằng cách thực hiện nâng cấp trên subgraph của bạn, đôi khi bạn có thể gặp các lỗi như sau: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - Để giải quyết, bạn có thể chỉ cần thay đổi câu lệnh `if` thành một cái gì đó như sau: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Để khắc phục sự cố này, bạn có thể tạo một biến cho quyền truy cập thuộc tính đó để trình biên dịch có thể thực hiện phép thuật kiểm tra tính nullability: ```typescript From e725ff3e120fb9edb069dd235c1ddcbce32620fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:14 -0400 Subject: [PATCH 830/924] New translations assemblyscript-migration-guide.mdx (Marathi) --- .../mr/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx index a170ebec8cda..2d735415bebb 100644 --- a/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ However now this isn't possible anymore, and the compiler returns this error: ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 8f7932574ecb37851ccdd9f6145b424cd23f4894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:15 -0400 Subject: [PATCH 831/924] New translations assemblyscript-migration-guide.mdx (Hindi) --- .../hi/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx b/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx index 2182133b8d48..a6d16d2d7def 100644 --- a/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - यदि आपके पास वेरिएबल शैडोइंग है, तो आपको अपने डुप्लिकेट वेरिएबल्स का नाम बदलने की आवश्यकता होगी। - ### Null Comparisons - अपने सबग्राफ पर अपग्रेड करने से, कभी-कभी आपको इस तरह की त्रुटियाँ मिल सकती हैं: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - हल करने के लिए आप केवल `if` कथन को कुछ इस तरह से बदल सकते हैं: ```typescript @@ -287,7 +283,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ``` - इस समस्या को ठीक करने के लिए, आप उस प्रॉपर्टी एक्सेस के लिए एक वेरिएबल बना सकते हैं ताकि कंपाइलर अशक्तता जांच जादू कर सके: ```typescript From 7b11406a6705afd7cffc36f9a5a33a2c31cafc3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:16 -0400 Subject: [PATCH 832/924] New translations assemblyscript-migration-guide.mdx (Yoruba) --- .../yo/release-notes/assemblyscript-migration-guide.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx b/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx index 85f6903a6c69..17224699570d 100644 --- a/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx @@ -127,11 +127,8 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` - You'll need to rename your duplicate variables if you had variable shadowing. - ### Null Comparisons - By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -140,7 +137,6 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` - To solve you can simply change the `if` statement to something like this: ```typescript @@ -288,7 +284,6 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript From 27cde76f543fc5ff3f375edb4606c28f3ef9fdd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:16 -0400 Subject: [PATCH 833/924] New translations benefits.mdx (Romanian) --- website/pages/ro/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/ro/network/benefits.mdx b/website/pages/ro/network/benefits.mdx index 864672b16515..09c0548bfc4f 100644 --- a/website/pages/ro/network/benefits.mdx +++ b/website/pages/ro/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From 0bc7754373764f0ad7a0aa1f4c05690d4f4802b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:17 -0400 Subject: [PATCH 834/924] New translations benefits.mdx (French) --- website/pages/fr/network/benefits.mdx | 73 +++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/website/pages/fr/network/benefits.mdx b/website/pages/fr/network/benefits.mdx index a6e3fd0c75b9..93e03fdda0df 100644 --- a/website/pages/fr/network/benefits.mdx +++ b/website/pages/fr/network/benefits.mdx @@ -27,54 +27,53 @@ Les coûts des requêtes peuvent varier ; le coût indiqué est la moyenne au m ## Utilisateur à faible volume (moins de 30 000 requêtes par mois) -| Cost Comparison | Auto-hébergé | Réseau de The Graph | -| :-: | :-: | :-: | -| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | -| Frais de requête | + 0 $ | ~15 $ au mois | -| Temps d'ingénierie | 400 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | 30 000 (automatique mise à l'échelle) | -| Tarif par requête | 0 $ | 0,0005 $ | -| Les infrastructures | Centralisée | Décentralisée | -| La redondance géographique | 750$+ par nœud complémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | + 750 $ | ~15 $ | +| Cost Comparison | Auto-hébergé | Réseau de The Graph | +|:------------------------------:|:-----------------------------------------:|:---------------------------------------------------------------------------:| +| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | +| Frais de requête | + 0 $ | ~15 $ au mois | +| Temps d'ingénierie | 400 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | 30 000 (automatique mise à l'échelle) | +| Tarif par requête | 0 $ | 0,0005 $ | +| Les infrastructures | Centralisée | Décentralisée | +| La redondance géographique | 750$+ par nœud complémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | + 750 $ | ~15 $ | ## Utilisateur moyen (3 000 000+ demandes par mois) -| Comparaison de coût | Auto-hébergé | Réseau de The Graph | -| :-: | :-: | :-: | -| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | -| Frais de requête | 500 $ au mois | 750 $ au mois | -| Temps d'ingénierie | 800 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | + 3 000 000 | -| Tarif par requête | 0 $ | 0,00025 $ | -| L'infrastructure | Centralisée | Décentralisée | -| Frais d'ingénierie | 200 $ au mois | Compris | -| La redondance géographique | 1 200 $ coût total par nœud supplémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | $1,650+ | $750 | +| Comparaison de coût | Auto-hébergé | Réseau de The Graph | +|:------------------------------:|:------------------------------------------:|:---------------------------------------------------------------------------:| +| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | +| Frais de requête | 500 $ au mois | 750 $ au mois | +| Temps d'ingénierie | 800 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | + 3 000 000 | +| Tarif par requête | 0 $ | 0,00025 $ | +| L'infrastructure | Centralisée | Décentralisée | +| Frais d'ingénierie | 200 $ au mois | Compris | +| La redondance géographique | 1 200 $ coût total par nœud supplémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | $1,650+ | $750 | ## L'utilisateur de volume conséquent (30 000 000+ requêtes au mois) -| Cost Comparison | Auto-hébergé | Réseau de The Graph | -| :-: | :-: | :-: | -| Coût mensuel du serveur\* | $1100 per month, per node | 0 $ | -| Frais de requête | $4000 | $4,500 per month | -| Nombre de nœuds obligatoires | 10 | Sans objet | -| Temps d'ingénierie | $6,000 or more per month | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | + 30 000 000 | -| Tarif par requête | 0 $ | 0,00015 $ | -| L'infrastructure | Centralisée | Décentralisée | -| La redondance géographique | 1 200 $ de coûts totaux par nœud supplémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | + 11 000 $ | $4,500 | +| Cost Comparison | Auto-hébergé | Réseau de The Graph | +|:------------------------------:|:-----------------------------------------------:|:---------------------------------------------------------------------------:| +| Coût mensuel du serveur\* | $1100 per month, per node | 0 $ | +| Frais de requête | $4000 | $4,500 per month | +| Nombre de nœuds obligatoires | 10 | Sans objet | +| Temps d'ingénierie | $6,000 or more per month | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | + 30 000 000 | +| Tarif par requête | 0 $ | 0,00015 $ | +| L'infrastructure | Centralisée | Décentralisée | +| La redondance géographique | 1 200 $ de coûts totaux par nœud supplémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | + 11 000 $ | $4,500 | \*y compris les coûts de sauvegarde : $50-$ à 100 dollars au mois Temps d'ingénierie basé sur une hypothèse de 200 $ de l'heure - en utilisant la fonction "max query budget" dans l'onglet "budget billing", tout en maintenant une qualité de -service élevée + en utilisant la fonction "max query budget" dans l'onglet "budget billing", tout en maintenant une qualité de service élevée Les coûts estimés ne concernent que les subgraphs du Mainnet Ethereum - les coûts sont encore plus élevés en cas d'auto-hébergement d'un `graph-node` sur d'autres réseaux. From 9134510560d476429d4eeaa299142a3421fcd261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:18 -0400 Subject: [PATCH 835/924] New translations benefits.mdx (Spanish) --- website/pages/es/network/benefits.mdx | 73 +++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/website/pages/es/network/benefits.mdx b/website/pages/es/network/benefits.mdx index c0e6d9fedf40..ebbd4529f7b7 100644 --- a/website/pages/es/network/benefits.mdx +++ b/website/pages/es/network/benefits.mdx @@ -27,54 +27,53 @@ Los costos de consulta pueden variar; el costo cotizado es el promedio al moment ## Usuario de bajo volumen (menos de 30,000 consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Costo mensual del servidor\* | $350 por mes | $0 | -| Costos de consulta | $0+ | ~$15 por mes | -| Tiempo de ingeniería | $400 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 30,000 (autoescalando) | -| Costo por consulta | $0 | $0.0005 | -| Infraestructura | Centralizado | Descentralizado | -| Redundancia geográfica | $750+ por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $750+ | ~$15 | +| Comparación de costos | Self Hosted | Graph Network | +|:--------------------------------:|:-----------------------------------------:|:---------------------------------------------------------------------:| +| Costo mensual del servidor\* | $350 por mes | $0 | +| Costos de consulta | $0+ | ~$15 por mes | +| Tiempo de ingeniería | $400 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 30,000 (autoescalando) | +| Costo por consulta | $0 | $0.0005 | +| Infraestructura | Centralizado | Descentralizado | +| Redundancia geográfica | $750+ por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $750+ | ~$15 | ## Usuario de Volumen Medio (3,000,000+ consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Costo mensual del servidor\* | $350 por mes | $0 | -| Costos de consulta | $500 por mes | $750 por mes | -| Tiempo de ingeniería | $800 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 3,000,000+ | -| Costo por consulta | $0 | $0.00025 | -| Infraestructura | Centralizado | Descentralizado | -| Gastos de ingeniería | $200 por hora | Incluido | -| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $1,650+ | $750 | +| Comparación de costos | Self Hosted | Graph Network | +|:--------------------------------:|:-------------------------------------------:|:---------------------------------------------------------------------:| +| Costo mensual del servidor\* | $350 por mes | $0 | +| Costos de consulta | $500 por mes | $750 por mes | +| Tiempo de ingeniería | $800 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 3,000,000+ | +| Costo por consulta | $0 | $0.00025 | +| Infraestructura | Centralizado | Descentralizado | +| Gastos de ingeniería | $200 por hora | Incluido | +| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $1,650+ | $750 | ## Usuario de alto volumen (30,000,000+ consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Costo mensual del servidor\* | $1100 por mes, por nodo | $0 | -| Costos de consulta | $4000 | $4,500 por mes | -| Número de nodos necesarios | 10 | No aplica | -| Tiempo de ingeniería | $6,000 o más por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 30,000,000+ | -| Costo por consulta | $0 | $0.00015 | -| Infraestructura | Centralizado | Descentralizado | -| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $11,000+ | $4,500 | +| Comparación de costos | Self Hosted | Graph Network | +|:--------------------------------:|:-------------------------------------------:|:---------------------------------------------------------------------:| +| Costo mensual del servidor\* | $1100 por mes, por nodo | $0 | +| Costos de consulta | $4000 | $4,500 por mes | +| Número de nodos necesarios | 10 | No aplica | +| Tiempo de ingeniería | $6,000 o más por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 30,000,000+ | +| Costo por consulta | $0 | $0.00015 | +| Infraestructura | Centralizado | Descentralizado | +| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $11,000+ | $4,500 | \*incluidos los costos de copia de seguridad: $50-$100 por mes Tiempo de ingeniería basado en un supuesto de $200 por hora -utilizando la función de presupuesto máximo de consulta en la pestaña de facturación presupuestaria, -manteniendo una alta calidad de servicio +utilizando la función de presupuesto máximo de consulta en la pestaña de facturación presupuestaria, manteniendo una alta calidad de servicio Costos estimados son solo para los subgrafos de Ethereum Mainnet — los costos son aún más altos cuando se aloja un `graph-node` en otras redes. From a8fffc7fedbc05eb5f363256688f398e68232b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:18 -0400 Subject: [PATCH 836/924] New translations benefits.mdx (Arabic) --- website/pages/ar/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/ar/network/benefits.mdx b/website/pages/ar/network/benefits.mdx index a54a14a768c9..346ae4cfcab2 100644 --- a/website/pages/ar/network/benefits.mdx +++ b/website/pages/ar/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| البنية الأساسية | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| البنية الأساسية | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| البنية الأساسية | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| البنية الأساسية | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| البنية الأساسية | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| البنية الأساسية | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From 5c0152c2e7b2465d2932b62b61cef0e0f5520900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:19 -0400 Subject: [PATCH 837/924] New translations benefits.mdx (Czech) --- website/pages/cs/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/cs/network/benefits.mdx b/website/pages/cs/network/benefits.mdx index 02655bef5cdb..ec33c75b4ae5 100644 --- a/website/pages/cs/network/benefits.mdx +++ b/website/pages/cs/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastruktura | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastruktura | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastruktura | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastruktura | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastruktura | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastruktura | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From e00333288fadda620a89e297420ce97c86483d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:19 -0400 Subject: [PATCH 838/924] New translations benefits.mdx (German) --- website/pages/de/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/de/network/benefits.mdx b/website/pages/de/network/benefits.mdx index cf9a39833987..10158195162f 100644 --- a/website/pages/de/network/benefits.mdx +++ b/website/pages/de/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastruktur | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastruktur | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastruktur | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastruktur | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastruktur | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastruktur | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From cc7bbcd8a47ec778561d884f4f2a654e26948430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:20 -0400 Subject: [PATCH 839/924] New translations benefits.mdx (Italian) --- website/pages/it/network/benefits.mdx | 73 +++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/website/pages/it/network/benefits.mdx b/website/pages/it/network/benefits.mdx index 482b5fbbcd0d..74d915452816 100644 --- a/website/pages/it/network/benefits.mdx +++ b/website/pages/it/network/benefits.mdx @@ -27,54 +27,53 @@ I costi di query possono variare; il costo indicato è quello medio al momento d ## Utente di basso volume (meno di 30.000 query al mese) -| Confronto costi | Self Hosted | The Graph Network | -| :-: | :-: | :-: | -| Costo mensile del server\* | $350 al mese | $0 | -| Costi di query | $0+ | ~$15 al mese | -| Tempo di progettazione | $400 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità di infra | 30,000 (autoscaling) | -| Costo per query | $0 | $0.0005 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Ridondanza geografica | $750+ per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $750+ | ~$15 | +| Confronto costi | Self Hosted | The Graph Network | +|:----------------------------------:|:---------------------------------------:|:-----------------------------------------------------------------------------:| +| Costo mensile del server\* | $350 al mese | $0 | +| Costi di query | $0+ | ~$15 al mese | +| Tempo di progettazione | $400 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità di infra | 30,000 (autoscaling) | +| Costo per query | $0 | $0.0005 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Ridondanza geografica | $750+ per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $750+ | ~$15 | ## Utente di medio volume (3,000,000+ di query al mese) -| Confronto dei costi | Self Hosted | The Graph Network | -| :-: | :-: | :-: | -| Costo mensile del server\* | $350 al mese | $0 | -| Costi di query | $500 al mese | $750 al mese | -| Tempo di progettazione | $800 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità dell'infrastruttura | 3,000,000+ | -| Costo per query | $0 | $0.00025 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Costi di ingegneria | $200 all'ora | Incluso | -| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $1,650+ | $750 | +| Confronto dei costi | Self Hosted | The Graph Network | +|:----------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------------------:| +| Costo mensile del server\* | $350 al mese | $0 | +| Costi di query | $500 al mese | $750 al mese | +| Tempo di progettazione | $800 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità dell'infrastruttura | 3,000,000+ | +| Costo per query | $0 | $0.00025 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Costi di ingegneria | $200 all'ora | Incluso | +| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $1,650+ | $750 | ## Utente di alto volume (3,000,000+ di query al mese) -| Confronto costi | Self Hosted | The Graph Network | -| :-: | :-: | :-: | -| Costo mensile del server\* | $1100 al mese, per nodo | $0 | -| Costi di query | $4000 | $4,500 al mese | -| Numero di nodi necessari | 10 | Non applicabile | -| Tempo di progettazione | $6.000 o più al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità di infra | 30,000,000+ | -| Costo per query | $0 | $0.00015 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $11,000+ | $4,500 | +| Confronto costi | Self Hosted | The Graph Network | +|:----------------------------------:|:-------------------------------------------:|:-----------------------------------------------------------------------------:| +| Costo mensile del server\* | $1100 al mese, per nodo | $0 | +| Costi di query | $4000 | $4,500 al mese | +| Numero di nodi necessari | 10 | Non applicabile | +| Tempo di progettazione | $6.000 o più al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità di infra | 30,000,000+ | +| Costo per query | $0 | $0.00015 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $11,000+ | $4,500 | \*inclusi i costi per il backup: $50-$100 al mese Tempo di progettazione basato su un'ipotesi di $200 all'ora - utilizzando la funzione di budget massimo della query nella scheda di fatturazione del budget, mantenendo un'alta -qualità del servizio + utilizzando la funzione di budget massimo della query nella scheda di fatturazione del budget, mantenendo un'alta qualità del servizio I costi previsti sono solo per i subgraph di Ethereum Mainnet - i costi sono ancora più alti quando si ospita un `graph-node` su altre reti. From 8d8611f41f990a0f8166a26baa8c2d138e7ef175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:21 -0400 Subject: [PATCH 840/924] New translations benefits.mdx (Japanese) --- website/pages/ja/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/ja/network/benefits.mdx b/website/pages/ja/network/benefits.mdx index be92fd79639e..93018679bfd6 100644 --- a/website/pages/ja/network/benefits.mdx +++ b/website/pages/ja/network/benefits.mdx @@ -27,47 +27,47 @@ Graph の分散型ネットワークは、堅牢なインデックス作成と ## ローボリュームユーザー(月間30,000クエリ以下) -| コスト比較 | セルフホスト | グラフネットワーク | -| :-: | :-: | :-: | -| 月額サーバー代 | $350/月 | $0 | -| クエリコスト | $0+ | ~$15/月 | -| エンジニアリングタイム | $400/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 30,000(オートスケーリング) | -| クエリごとのコスト | $0 | $0.0005 | -| インフラストラクチャ | 集中管理型 | 分散型 | -| 地理的な冗長性 | 追加1ノードにつき$750+ | 含まれる | -| アップタイム | バリエーション | 99.9%+ | -| 月額費用合計 | $750+ | ~$15 | +| コスト比較 | セルフホスト | グラフネットワーク | +|:-----------------------:|:---------------------------------------:|:-----------------------------------:| +| 月額サーバー代 | $350/月 | $0 | +| クエリコスト | $0+ | ~$15/月 | +| エンジニアリングタイム | $400/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 30,000(オートスケーリング) | +| クエリごとのコスト | $0 | $0.0005 | +| インフラストラクチャ | 集中管理型 | 分散型 | +| 地理的な冗長性 | 追加1ノードにつき$750+ | 含まれる | +| アップタイム | バリエーション | 99.9%+ | +| 月額費用合計 | $750+ | ~$15 | ## ミディアムボリュームユーザー(月間3,000,000クエリ以上) -| コスト比較 | セルフホスト | グラフネットワーク | -| :-: | :-: | :-: | -| 月額サーバー代 | $350/月 | $0 | -| クエリコスト | $500/月 | $750/月 | -| エンジニアリングタイム | $800/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 3,000,000+ | -| クエリごとのコスト | $0 | $0.00025 | -| インフラストラクチャ | 中央管理型 | 分散型 | -| エンジニアリングコスト | $200/時 | 含まれる | -| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | -| アップタイム | 変動 | 99.9%+ | -| 月額費用合計 | $1,650+ | $750 | +| コスト比較 | セルフホスト | グラフネットワーク | +|:-----------------------:|:------------------------------------------:|:-----------------------------------:| +| 月額サーバー代 | $350/月 | $0 | +| クエリコスト | $500/月 | $750/月 | +| エンジニアリングタイム | $800/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 3,000,000+ | +| クエリごとのコスト | $0 | $0.00025 | +| インフラストラクチャ | 中央管理型 | 分散型 | +| エンジニアリングコスト | $200/時 | 含まれる | +| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | +| アップタイム | 変動 | 99.9%+ | +| 月額費用合計 | $1,650+ | $750 | ## ハイボリュームユーザー(月間30,000,000クエリ以上) -| コスト比較 | セルフホスト | グラフネットワーク | -| :-: | :-: | :-: | -| 月額サーバー代 | $1100/月(ノードごと) | $0 | -| クエリコスト | $4000 | $4,500/月 | -| 必要ノード数 | 10 | 該当なし | -| エンジニアリングタイム | $6,000/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 30,000,000+ | -| クエリごとのコスト | $0 | $0.00015 | -| インフラストラクチャ | 集中管理型 | 分散型 | -| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | -| アップタイム | 変動 | 99.9%+ | -| 月額費用合計 | $11,000+ | $4,500 | +| コスト比較 | セルフホスト | グラフネットワーク | +|:-----------------------:|:-------------------------------------------:|:-----------------------------------:| +| 月額サーバー代 | $1100/月(ノードごと) | $0 | +| クエリコスト | $4000 | $4,500/月 | +| 必要ノード数 | 10 | 該当なし | +| エンジニアリングタイム | $6,000/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 30,000,000+ | +| クエリごとのコスト | $0 | $0.00015 | +| インフラストラクチャ | 集中管理型 | 分散型 | +| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | +| アップタイム | 変動 | 99.9%+ | +| 月額費用合計 | $11,000+ | $4,500 | \*バックアップ費用含む:月額$50〜$100 From 9f026d04d0361f7ef808ab9430c4b1bffbd74eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:21 -0400 Subject: [PATCH 841/924] New translations benefits.mdx (Korean) --- website/pages/ko/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/ko/network/benefits.mdx b/website/pages/ko/network/benefits.mdx index 864672b16515..09c0548bfc4f 100644 --- a/website/pages/ko/network/benefits.mdx +++ b/website/pages/ko/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From b3dab50e148bed60673365377f8c2639b31f5ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:22 -0400 Subject: [PATCH 842/924] New translations benefits.mdx (Dutch) --- website/pages/nl/network/benefits.mdx | 75 +++++++++++++-------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/website/pages/nl/network/benefits.mdx b/website/pages/nl/network/benefits.mdx index 86608928d730..ccb2babe1b4c 100644 --- a/website/pages/nl/network/benefits.mdx +++ b/website/pages/nl/network/benefits.mdx @@ -5,7 +5,7 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg Het gedecentraliseerde netwerk van The Graph is ontworpen en verfijnd om een robuuste ervaring te creëren bij het indexeren en opvragen van data. Het netwerk wordt iedere dag sterker door de duizenden bijdragers wereldwijd. -De voordelen van dit gedecentraliseerde protocol is dat het niet gerepliceerd kan worden door een `graph-node` lokaal te laten werken. Het Graph Netwerk is betrouwbaarder, efficiënter en goedkoper. +De voordelen van dit gedecentraliseerde protocol is dat het niet gerepliceerd kan worden door een `graph-node` lokaal te laten werken. Het Graph Netwerk is betrouwbaarder, efficiënter en goedkoper. Hier is een analyse: @@ -27,54 +27,53 @@ Kosten per query kunnen variëren; de genoemde kosten zijn het gemiddelde op het ## Gebruiker met een laag volume (minder dan 30.000 queries per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -| :-: | :-: | :-: | -| Maandelijkse serverkosten | $350 per maand | $0 | -| Querykosten | $0+ | ~$15 per maand | -| Onderhoud tijd | $400 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000 (schaalt automatisch) | -| Kosten per query | $0 | $0,0005 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Geografische redundantie | $750+ per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $750+ | ~$15 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +|:--------------------------:|:---------------------------------------:|:------------------------------------------------------------------------------------------------:| +| Maandelijkse serverkosten | $350 per maand | $0 | +| Querykosten | $0+ | ~$15 per maand | +| Onderhoud tijd | $400 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000 (schaalt automatisch) | +| Kosten per query | $0 | $0,0005 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Geografische redundantie | $750+ per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $750+ | ~$15 | ## Gebruiker met een gemiddeld volume (3.000.000+ queries per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -| :-: | :-: | :-: | -| Maandelijkse serverkosten | $350 per maand | $0 | -| Querykosten | $500 per maand | $750 per maand | -| Onderhoud | $800 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 3000000+ | -| Kosten per query | $0 | $0,00025 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Technische personeelskosten | $200 per uur | Inbegrepen | -| Geografische redundantie | $1200 totale kosten per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $1650+ | $750 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +|:---------------------------:|:-----------------------------------------:|:------------------------------------------------------------------------------------------------:| +| Maandelijkse serverkosten | $350 per maand | $0 | +| Querykosten | $500 per maand | $750 per maand | +| Onderhoud | $800 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 3000000+ | +| Kosten per query | $0 | $0,00025 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Technische personeelskosten | $200 per uur | Inbegrepen | +| Geografische redundantie | $1200 totale kosten per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $1650+ | $750 | ## Gebruiker met een hoog volume (30.000.000+ query's per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -| :-: | :-: | :-: | -| Maandelijkse serverkosten | $1100 per maand, per node | $0 | -| Querykosten | $4000 | $4500 per maand | -| Aantal benodigde nodes | 10 | Niet van toepassing | -| Onderhoud | $6000 of meer per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000000+ | -| Kosten per query | $0 | $0.00015 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Geografische redundantie | $1200 in totale kosten per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $11000+ | $4500 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +|:--------------------------:|:------------------------------------------:|:------------------------------------------------------------------------------------------------:| +| Maandelijkse serverkosten | $1100 per maand, per node | $0 | +| Querykosten | $4000 | $4500 per maand | +| Aantal benodigde nodes | 10 | Niet van toepassing | +| Onderhoud | $6000 of meer per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000000+ | +| Kosten per query | $0 | $0.00015 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Geografische redundantie | $1200 in totale kosten per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $11000+ | $4500 | \*inclusief kosten voor een back-up: $50-$100 per maand Onderhoud tijd gebaseerd op $200 per uur -gebruikmakend van de maximale querybudgetfunctie in het budgetfacturatietabblad, met behoud van hoge -kwaliteit van de service +gebruikmakend van de maximale querybudgetfunctie in het budgetfacturatietabblad, met behoud van hoge kwaliteit van de service Geschatte kosten gelden alleen voor Ethereum Mainnet-subgraphs - de kosten zijn nog hoger bij zelfhosting van een `graph-node` op andere netwerken. From 29ad9c7a0cf2eaba0858739223a58a9ba967cd61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:23 -0400 Subject: [PATCH 843/924] New translations benefits.mdx (Polish) --- website/pages/pl/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/pl/network/benefits.mdx b/website/pages/pl/network/benefits.mdx index 864672b16515..09c0548bfc4f 100644 --- a/website/pages/pl/network/benefits.mdx +++ b/website/pages/pl/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From 74ea2458c91c39a89081d60542d11aa0c9fb4cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:23 -0400 Subject: [PATCH 844/924] New translations benefits.mdx (Portuguese) --- website/pages/pt/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/pt/network/benefits.mdx b/website/pages/pt/network/benefits.mdx index ce56b07f42a5..7465acbb3b36 100644 --- a/website/pages/pt/network/benefits.mdx +++ b/website/pages/pt/network/benefits.mdx @@ -27,47 +27,47 @@ Os custos de consulta podem variar; o custo citado é o normal até o fechamento ## Utilizador de Baixo Volume (menos de 30 mil queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -| :-: | :-: | :-: | -| Custo mensal de servidor\* | $350 por mês | $0 | -| Custos de query | $0+ | ~$15 por mês | -| Tempo de engenharia | $400 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 30.000 (autoescala) | -| Custo por query | $0 | $0.0005 | -| Infraestrutura | Centralizada | Descentralizada | -| Redundância geográfica | $750+ por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $750+ | ~$15 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +|:-------------------------------:|:---------------------------------------:|:-----------------------------------------------------------------:| +| Custo mensal de servidor\* | $350 por mês | $0 | +| Custos de query | $0+ | ~$15 por mês | +| Tempo de engenharia | $400 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 30.000 (autoescala) | +| Custo por query | $0 | $0.0005 | +| Infraestrutura | Centralizada | Descentralizada | +| Redundância geográfica | $750+ por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $750+ | ~$15 | ## Utilizador de Volume Médio (3.000.000+ queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -| :-: | :-: | :-: | -| Custo mensal de servidor\* | $350 por mês | $0 | -| Custos de query | $500 por mês | $750 por mês | -| Tempo de engenharia | $800 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 3.000.000+ | -| Custo por query | $0 | $0.00025 | -| Infraestrutura | Centralizada | Descentralizada | -| Custo de engenharia | $200 por hora | Incluído | -| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $1.650+ | $750 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +|:-------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------:| +| Custo mensal de servidor\* | $350 por mês | $0 | +| Custos de query | $500 por mês | $750 por mês | +| Tempo de engenharia | $800 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 3.000.000+ | +| Custo por query | $0 | $0.00025 | +| Infraestrutura | Centralizada | Descentralizada | +| Custo de engenharia | $200 por hora | Incluído | +| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $1.650+ | $750 | ## Utilizador de Volume Alto (30.000.000+ queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -| :-: | :-: | :-: | -| Custo mensal de servidor\* | $1.100 por mês, por node | $0 | -| Custos de query | $4.000 | $4.500 por mês | -| Número de nodes necessário | 10 | Não se aplica | -| Tempo de engenharia | $6.000 ou mais por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 30.000.000+ | -| Custo por query | $0 | $0.00015 | -| Infraestrutura | Centralizada | Descentralizada | -| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $11.000+ | $4.500 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +|:-------------------------------:|:-------------------------------------------:|:-----------------------------------------------------------------:| +| Custo mensal de servidor\* | $1.100 por mês, por node | $0 | +| Custos de query | $4.000 | $4.500 por mês | +| Número de nodes necessário | 10 | Não se aplica | +| Tempo de engenharia | $6.000 ou mais por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 30.000.000+ | +| Custo por query | $0 | $0.00015 | +| Infraestrutura | Centralizada | Descentralizada | +| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $11.000+ | $4.500 | \*com custos de backup incluídos: $50-$100 por mês From 4bc2aa63e3bbc87282520be527df8c3ab5fc9708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:24 -0400 Subject: [PATCH 845/924] New translations benefits.mdx (Russian) --- website/pages/ru/network/benefits.mdx | 73 +++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/website/pages/ru/network/benefits.mdx b/website/pages/ru/network/benefits.mdx index 05dfe6b13c35..2d482b34f48c 100644 --- a/website/pages/ru/network/benefits.mdx +++ b/website/pages/ru/network/benefits.mdx @@ -27,54 +27,53 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## Пользователь с небольшим количеством запросов (менее 30 000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -| :-: | :-: | :-: | -| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | -| Стоимость запроса | $0+ | ~$15 в месяц | -| Время разработки | $400 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000 (автоматическое масштабирование) | -| Стоимость одного запроса | $0 | $0.0005 | -| Инфраструктура | Централизованная | Децентрализованная | -| Географическая избыточность | $750+ за каждую дополнительную ноду | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $750+ | ~$15 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +|:---------------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | +| Стоимость запроса | $0+ | ~$15 в месяц | +| Время разработки | $400 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000 (автоматическое масштабирование) | +| Стоимость одного запроса | $0 | $0.0005 | +| Инфраструктура | Централизованная | Децентрализованная | +| Географическая избыточность | $750+ за каждую дополнительную ноду | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $750+ | ~$15 | ## Пользователь со средним количеством запросов (более 3,000,000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -| :-: | :-: | :-: | -| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | -| Стоимость запроса | $500 в месяц | $750 в месяц | -| Время разработки | $800 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 3,000,000+ | -| Стоимость одного запроса | $0 | $0.00025 | -| Инфраструктура | Централизованная | Децентрализованная | -| Инженерные расходы | $200 в час | Включено | -| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $1,650+ | $750 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +|:---------------------------------:|:-------------------------------------------------------------:|:---------------------------------------------------------------:| +| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | +| Стоимость запроса | $500 в месяц | $750 в месяц | +| Время разработки | $800 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 3,000,000+ | +| Стоимость одного запроса | $0 | $0.00025 | +| Инфраструктура | Централизованная | Децентрализованная | +| Инженерные расходы | $200 в час | Включено | +| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $1,650+ | $750 | ## Пользователь с высоким количеством запросов (более 30,000,000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -| :-: | :-: | :-: | -| Ежемесячная стоимость сервера\* | $1100 в месяц за ноду | $0 | -| Стоимость запроса | $4000 | $4,500 в месяц | -| Необходимое количество нод | 10 | Не подходит | -| Время разработки | $6,000 или больше в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000,000+ | -| Стоимость одного запроса | $0 | $0.00015 | -| Инфраструктура | Централизованная | Децентрализованная | -| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $11,000+ | $4,500 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +|:---------------------------------:|:-------------------------------------------------------------:|:---------------------------------------------------------------:| +| Ежемесячная стоимость сервера\* | $1100 в месяц за ноду | $0 | +| Стоимость запроса | $4000 | $4,500 в месяц | +| Необходимое количество нод | 10 | Не подходит | +| Время разработки | $6,000 или больше в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000,000+ | +| Стоимость одного запроса | $0 | $0.00015 | +| Инфраструктура | Централизованная | Децентрализованная | +| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $11,000+ | $4,500 | \* включая расходы на резервное копирование: $50-$100 в месяц Время разработки основано на предположении о $200 в час -используя функцию максимального бюджета запроса на вкладке бюджетное выставление счетов, сохраняя при этом -высокое качество обслуживания +используя функцию максимального бюджета запроса на вкладке бюджетное выставление счетов, сохраняя при этом высокое качество обслуживания Предполагаемые затраты указаны только для субграфов в основной сети Ethereum — затраты еще выше при самостоятельном размещении `graph-node` в других сетях. From 468369ab381b09dd4b0c0a766373f422297ff0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:25 -0400 Subject: [PATCH 846/924] New translations benefits.mdx (Swedish) --- website/pages/sv/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/sv/network/benefits.mdx b/website/pages/sv/network/benefits.mdx index c94c62e684dc..e8713d003ce3 100644 --- a/website/pages/sv/network/benefits.mdx +++ b/website/pages/sv/network/benefits.mdx @@ -27,47 +27,47 @@ Frågekostnaderna kan variera; den citerade kostnaden är genomsnittet vid publi ## Användare Med Låg Volym (färre än 30,000 frågor per månad) -| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | -| :-: | :-: | :-: | -| Månatlig kostnad för server\* | $350 per månad | $0 | -| Kostnad för frågor | $0+ | ~$15 per månad | -| Konstruktionstid | $400 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 30 000 (automatisk skalning) | -| Kostnad per fråga | $0 | $0.0005 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Geografisk redundans | $750+ per extra nod | Inkluderat | -| Drifttid | Varierande | 99.9%+ | -| Total Månadskostnad | $750+ | ~$15 | +| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | +|:-------------------------------:|:---------------------------------------:|:-------------------------------------------------------------:| +| Månatlig kostnad för server\* | $350 per månad | $0 | +| Kostnad för frågor | $0+ | ~$15 per månad | +| Konstruktionstid | $400 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 30 000 (automatisk skalning) | +| Kostnad per fråga | $0 | $0.0005 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Geografisk redundans | $750+ per extra nod | Inkluderat | +| Drifttid | Varierande | 99.9%+ | +| Total Månadskostnad | $750+ | ~$15 | ## Medium volym användare (3,000,000+ förfrågningar per månad) -| Kostnadsjämförelse | Egen Värd | Graph Nätverk | -| :-: | :-: | :-: | -| Månadskostnad för server\* | $350 per månad | $0 | -| Kostnad för frågor | $500 per månad | $750 per månad | -| Ingenjörstid | $800 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 3,000,000+ | -| Kostnad per fråga | $0 | $0.00025 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Kostnader för ingenjörsarbete | $200 per timme | Inkluderat | -| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | -| Drifttid | Varierar | 99.9%+ | -| Total Månadskostnad | $1,650+ | $750 | +| Kostnadsjämförelse | Egen Värd | Graph Nätverk | +|:-----------------------------:|:------------------------------------------:|:-------------------------------------------------------------:| +| Månadskostnad för server\* | $350 per månad | $0 | +| Kostnad för frågor | $500 per månad | $750 per månad | +| Ingenjörstid | $800 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 3,000,000+ | +| Kostnad per fråga | $0 | $0.00025 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Kostnader för ingenjörsarbete | $200 per timme | Inkluderat | +| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | +| Drifttid | Varierar | 99.9%+ | +| Total Månadskostnad | $1,650+ | $750 | ## Användare Med Hög Volym (30,000,000+ frågor per månad) -| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | -| :-: | :-: | :-: | -| Månadskostnad för server\* | $1100 per månad, per nod | $0 | -| Kostnad för frågor | $4000 | $4,500 per månad | -| Antal noder som behövs | 10 | Ej tillämpligt | -| Ingenjörstid | $6,000 eller mer per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 30,000,000+ | -| Kostnad per fråga | $0 | $0.00015 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | -| Drifttid | Varierar | 99.9%+ | -| Total Månadskostnad | $11,000+ | $4,500 | +| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | +|:----------------------------:|:-------------------------------------------:|:-------------------------------------------------------------:| +| Månadskostnad för server\* | $1100 per månad, per nod | $0 | +| Kostnad för frågor | $4000 | $4,500 per månad | +| Antal noder som behövs | 10 | Ej tillämpligt | +| Ingenjörstid | $6,000 eller mer per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 30,000,000+ | +| Kostnad per fråga | $0 | $0.00015 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | +| Drifttid | Varierar | 99.9%+ | +| Total Månadskostnad | $11,000+ | $4,500 | \*inklusive kostnader för backup: $50-$100 per månad From 8555fe1fd26dab27a6bee5f45c8a202edf970a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:25 -0400 Subject: [PATCH 847/924] New translations benefits.mdx (Turkish) --- website/pages/tr/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/tr/network/benefits.mdx b/website/pages/tr/network/benefits.mdx index 633b6a7740c8..6b888d327926 100644 --- a/website/pages/tr/network/benefits.mdx +++ b/website/pages/tr/network/benefits.mdx @@ -27,47 +27,47 @@ Sorgu maliyetleri değişebilir; alıntılanan maliyet, yayın tarihindeki (Aral ## Düşük Hacimli Kullanıcı (ayda 30.000'den az sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -| :-: | :-: | :-: | -| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | -| Sorgu maliyetleri | 0$ + | Aylık yaklaşık 15$ | -| Mühendislik süresi | Aylık 400$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 30.000 (otomatik ölçeklendirme) | -| Sorgu başına maliyet | 0$ | 0.0005$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Coğrafi fazlalıklar | Ek node başına 750$+ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | $750+ | ~$15 | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +|:------------------------------:|:---------------------------------------:|:-------------------------------------------------------------------------:| +| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | +| Sorgu maliyetleri | 0$ + | Aylık yaklaşık 15$ | +| Mühendislik süresi | Aylık 400$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 30.000 (otomatik ölçeklendirme) | +| Sorgu başına maliyet | 0$ | 0.0005$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Coğrafi fazlalıklar | Ek node başına 750$+ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | $750+ | ~$15 | ## Orta Hacimli Kullanıcı (ayda 3.000.000'den fazla sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -| :-: | :-: | :-: | -| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | -| Sorgu maliyetleri | Aylık 500$ | Aylık 750$ | -| Mühendislik süresi | Aylık 800$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 3,000,000+ | -| Sorgu başına maliyet | 0$ | 0.00025$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Mühendislik gideri | Saatlik 200$ | Dahil | -| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | 1,650$+ | 750$ | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +|:------------------------------:|:------------------------------------------:|:-------------------------------------------------------------------------:| +| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | +| Sorgu maliyetleri | Aylık 500$ | Aylık 750$ | +| Mühendislik süresi | Aylık 800$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 3,000,000+ | +| Sorgu başına maliyet | 0$ | 0.00025$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Mühendislik gideri | Saatlik 200$ | Dahil | +| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | 1,650$+ | 750$ | ## Yüksek Hacimli Kullanıcı (ayda 30.000.000'den fazla sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -| :-: | :-: | :-: | -| Aylık sunucu maliyeti\* | Node başına aylık 1100$ | 0$ | -| Sorgu maliyetleri | 4000$ | Aylık 4500$ | -| Gerekli node sayısı | 10 | Şart yok | -| Mühendislik süresi | Ayda 6.000 $ veya daha fazlası | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 30,000,000+ | -| Sorgu başına maliyet | 0$ | 0.00015$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | 11,000$+ | 4500$ | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +|:------------------------------:|:-------------------------------------------:|:-------------------------------------------------------------------------:| +| Aylık sunucu maliyeti\* | Node başına aylık 1100$ | 0$ | +| Sorgu maliyetleri | 4000$ | Aylık 4500$ | +| Gerekli node sayısı | 10 | Şart yok | +| Mühendislik süresi | Ayda 6.000 $ veya daha fazlası | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 30,000,000+ | +| Sorgu başına maliyet | 0$ | 0.00015$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | 11,000$+ | 4500$ | \*yedekleme maliyetleri dahil: aylık $50-$100 From 5ffbf1da11ca0fc5475a3fa9ddf69f82f625388e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:26 -0400 Subject: [PATCH 848/924] New translations benefits.mdx (Ukrainian) --- website/pages/uk/network/benefits.mdx | 73 +++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/website/pages/uk/network/benefits.mdx b/website/pages/uk/network/benefits.mdx index b12002a1b0ec..08bfd02f8129 100644 --- a/website/pages/uk/network/benefits.mdx +++ b/website/pages/uk/network/benefits.mdx @@ -27,54 +27,53 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Малоактивний користувач (менше ніж 30 000 запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -| :-: | :-: | :-: | -| Щомісячна плата за сервер\* | $350 на місяць | $0 | -| Вартість запитів | $0+ | ~$15 на місяць | -| Час технічного обслуговування | $400 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30 000 (автомасштабування) | -| Вартість одного запиту | $0 | $0.0005 | -| Інфраструктура | Централізована | Децентралізована | -| Географічне резервування | $750+ за кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $750+ | ~$15 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +|:-----------------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------:| +| Щомісячна плата за сервер\* | $350 на місяць | $0 | +| Вартість запитів | $0+ | ~$15 на місяць | +| Час технічного обслуговування | $400 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30 000 (автомасштабування) | +| Вартість одного запиту | $0 | $0.0005 | +| Інфраструктура | Централізована | Децентралізована | +| Географічне резервування | $750+ за кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $750+ | ~$15 | ## Середній користувач (3 000 000+ запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -| :-: | :-: | :-: | -| Щомісячна плата за сервер\* | $350 на місяць | $0 | -| Вартість запитів | $500 на місяць | $750 на місяць | -| Час технічного обслуговування | $800 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 3,000,000+ | -| Вартість одного запиту | $0 | $0.00025 | -| Інфраструктура | Централізована | Децентралізована | -| Інженерно-технічні витрати | $200 на годину | Включено | -| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $1,650+ | $750 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +|:-----------------------------------------:|:-----------------------------------------------:|:-----------------------------------------------------------------:| +| Щомісячна плата за сервер\* | $350 на місяць | $0 | +| Вартість запитів | $500 на місяць | $750 на місяць | +| Час технічного обслуговування | $800 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 3,000,000+ | +| Вартість одного запиту | $0 | $0.00025 | +| Інфраструктура | Централізована | Децентралізована | +| Інженерно-технічні витрати | $200 на годину | Включено | +| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $1,650+ | $750 | ## Високоактивний користувач (30 000 000+ запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -| :-: | :-: | :-: | -| Щомісячна плата за сервер\* | $1100 на місяць, за одну ноду | $0 | -| Вартість запитів | $4000 | $4,500 на місяць | -| Кількість необхідних нод | 10 | Не стосується | -| Час технічного обслуговування | $6,000 і більше на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30,000,000+ | -| Вартість одного запиту | $0 | $0.00015 | -| Інфраструктура | Централізована | Децентралізована | -| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $11,000+ | $4,500 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +|:-----------------------------------------:|:-----------------------------------------------:|:-----------------------------------------------------------------:| +| Щомісячна плата за сервер\* | $1100 на місяць, за одну ноду | $0 | +| Вартість запитів | $4000 | $4,500 на місяць | +| Кількість необхідних нод | 10 | Не стосується | +| Час технічного обслуговування | $6,000 і більше на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30,000,000+ | +| Вартість одного запиту | $0 | $0.00015 | +| Інфраструктура | Централізована | Децентралізована | +| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $11,000+ | $4,500 | \*включаючи витрати на резервне копіювання: $50-$100 на місяць Час технічного обслуговування, розрахований на основі припущення $200 за годину -використання функції максимального бюджету запиту у вкладці бюджетного тарифоутворення зі збереженням -високої якості обслуговування +використання функції максимального бюджету запиту у вкладці бюджетного тарифоутворення зі збереженням високої якості обслуговування Estimated costs are only for Ethereum Mainnet subgraphs — costs are even higher when self hosting a `graph-node` on other networks. From 63464a3b7043aaf956b152e33cec2531cb75d8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:26 -0400 Subject: [PATCH 849/924] New translations benefits.mdx (Chinese Simplified) --- website/pages/zh/network/benefits.mdx | 72 +++++++++++++-------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/website/pages/zh/network/benefits.mdx b/website/pages/zh/network/benefits.mdx index 1d1b32f131db..a6e203c5894b 100644 --- a/website/pages/zh/network/benefits.mdx +++ b/website/pages/zh/network/benefits.mdx @@ -27,49 +27,49 @@ Graph的去中心化网络经过精心设计和完善,创造了强大的索引 ## 低容量用户(每月少于30,000次查询) -| 成本比较 | 自托管 | Graph网络 | -| :------------------: | :-------------------------------------: | :----------------------------------------: | -| 每月服务器费用 \* | 每月350美元 | 0美元 | -| 查询成本 | $0+ | ~15美元每月 | -| 工程时间 | 400美元每月 | 没有,内置在具有全球去中心化索引者的网络中 | -| 每月查询 | 受限于基础设施能力 | 30,000(自动扩缩) | -| 每个查询的成本 | 0美元 | $0.0005 | -| 基础设施 | 中心化 | 去中心化 | -| 异地备援 | 每个额外节点 $750 + | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | $750+ | ~$15 | +| 成本比较 | 自托管 | Graph网络 | +|:----------------:|:---------------------------------------:|:---------------------:| +| 每月服务器费用 \* | 每月350美元 | 0美元 | +| 查询成本 | $0+ | ~15美元每月 | +| 工程时间 | 400美元每月 | 没有,内置在具有全球去中心化索引者的网络中 | +| 每月查询 | 受限于基础设施能力 | 30,000(自动扩缩) | +| 每个查询的成本 | 0美元 | $0.0005 | +| 基础设施 | 中心化 | 去中心化 | +| 异地备援 | 每个额外节点 $750 + | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | $750+ | ~$15 | ## 中等容量用户(每月超过3,000,000次查询) -| 成本比较 | 自托管 | Graph网络 | -| :------------------: | :---------------------------------------------: | :----------------------------------------: | -| 每月服务器费用 \* | 每月350美元 | 0美元 | -| 查询成本 | 每月500美元 | 每月750美元 | +| 成本比较 | 自托管 | Graph网络 | +|:----------------:|:-------------------------------------------:|:---------------------:| +| 每月服务器费用 \* | 每月350美元 | 0美元 | +| 查询成本 | 每月500美元 | 每月750美元 | | 工程时间 | 每月800美元 | 没有,内置在具有全球去中心化索引者的网络中 | -| 每月查询 | 受限于基础设施能力 | 3,000,000+ | -| 每个查询的成本 | 0美元 | 0.00025美元 | -| 基础设施 | 中心化 | 去中心化 | -| 工程费用 | 每小时200美元 | 包括在内 | -| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | 1650美元以上 | 750美元 | +| 每月查询 | 受限于基础设施能力 | 3,000,000+ | +| 每个查询的成本 | 0美元 | 0.00025美元 | +| 基础设施 | 中心化 | 去中心化 | +| 工程费用 | 每小时200美元 | 包括在内 | +| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | 1650美元以上 | 750美元 | ## 高容量用户(每月超过30,000,000次查询) -| 成本比较 | 自托管 | Graph网络 | -| :------------------: | :-------------------------------------------: | :----------------------------------------: | -| 每月服务器费用 \* | 1100美元每月每节点 | 0美元 | -| 查询成本 | 4000美元 | 4500美元每月 | -| 需要的节点数量 | 10 | 不适用 | -| 工程时间 | 每月6000美元或以上 | 没有,内置在具有全球去中心化索引人的网络中 | -| 每月查询 | 受限于基础设施能力 | 30,000,000+ | -| 每个查询的成本 | 0美元 | 0.00015美元 | -| 基础设施 | 中心化 | 去中心化 | -| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | 11000+美元 | 4500美元 | - -- 包括后备费用: 每月$50-$100美元 +| 成本比较 | 自托管 | Graph网络 | +|:----------------:|:-------------------------------------------:|:---------------------:| +| 每月服务器费用 \* | 1100美元每月每节点 | 0美元 | +| 查询成本 | 4000美元 | 4500美元每月 | +| 需要的节点数量 | 10 | 不适用 | +| 工程时间 | 每月6000美元或以上 | 没有,内置在具有全球去中心化索引人的网络中 | +| 每月查询 | 受限于基础设施能力 | 30,000,000+ | +| 每个查询的成本 | 0美元 | 0.00015美元 | +| 基础设施 | 中心化 | 去中心化 | +| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | 11000+美元 | 4500美元 | + +* 包括后备费用: 每月$50-$100美元 按每小时200美元的假设计算的工程时间 From f696082ba2d43b87549736625083202e9f6d503d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:27 -0400 Subject: [PATCH 850/924] New translations benefits.mdx (Urdu (Pakistan)) --- website/pages/ur/network/benefits.mdx | 77 +++++++++++++-------------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/website/pages/ur/network/benefits.mdx b/website/pages/ur/network/benefits.mdx index dd0d9d2b3f80..f11155bd5c5a 100644 --- a/website/pages/ur/network/benefits.mdx +++ b/website/pages/ur/network/benefits.mdx @@ -27,54 +27,53 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## کم والیوم صارف (فی مہینہ 30,000 سے کم سوالات) -| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | -| :-: | :-: | :-: | -| ماہانہ سرور کی قیمت/\* | $350 فی مہینہ | $0 | -| استفسار کے اخراجات | $0+ | ~$15 فی مہینہ | -| انجینئرنگ کا وقت | $400 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000 (آٹو اسکیلنگ) | -| قیمت فی سوال | $0 | $0.0005 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| جغرافیائی فالتو پن | $750+ فی اضافی نوڈ | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $750+ | ~$15 | +| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | +|:----------------------------:|:---------------------------------------:|:-------------------------------------------------------------------------------:| +| ماہانہ سرور کی قیمت/* | $350 فی مہینہ | $0 | +| استفسار کے اخراجات | $0+ | ~$15 فی مہینہ | +| انجینئرنگ کا وقت | $400 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000 (آٹو اسکیلنگ) | +| قیمت فی سوال | $0 | $0.0005 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| جغرافیائی فالتو پن | $750+ فی اضافی نوڈ | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $750+ | ~$15 | ## درمیانے حجم کا صارف (3,000,000+ سوالات فی مہینہ) -| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | -| :-: | :-: | :-: | -| ماہانہ سرور کی قیمت/\* | $350 فی مہینہ | $0 | -| استفسار کے اخراجات | $500 فی مہینہ | $750 فی مہینہ | -| انجینئرنگ کا وقت | $800 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 3,000,000+ | -| قیمت فی سوال | $0 | $0.00025 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| انجینئرنگ کے اخراجات | $200 فی گھنٹہ | شامل | -| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $1,650+ | $750 | +| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | +|:----------------------------:|:------------------------------------------:|:-------------------------------------------------------------------------------:| +| ماہانہ سرور کی قیمت/* | $350 فی مہینہ | $0 | +| استفسار کے اخراجات | $500 فی مہینہ | $750 فی مہینہ | +| انجینئرنگ کا وقت | $800 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 3,000,000+ | +| قیمت فی سوال | $0 | $0.00025 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| انجینئرنگ کے اخراجات | $200 فی گھنٹہ | شامل | +| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $1,650+ | $750 | ## زیادہ حجم والا صارف (30,000,000+ سوالات فی مہینہ) -| اخراجات کا موازنہ | سیلف ہوسٹڈ | گراف نیٹ ورک | -| :-: | :-: | :-: | -| ماہانہ سرور کی قیمت/\* | $1100 فی مہینہ، فی نوڈ | $0 | -| استفسار کے اخراجات | $4000 | $4,500 فی مہینہ | -| نوڈس کی تعداد درکار ہے | 10 | قابل اطلاق نہیں | -| انجینئرنگ کا وقت | $6,000 یا اس سے زیادہ فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000,000+ | -| قیمت فی سوال | $0 | $0.00015 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $11,000+ | $4,500 | - -/\*بیک اپ کے اخراجات سمیت: $50-$100 فی مہینہ +| اخراجات کا موازنہ | سیلف ہوسٹڈ | گراف نیٹ ورک | +|:----------------------------:|:-------------------------------------------:|:-------------------------------------------------------------------------------:| +| ماہانہ سرور کی قیمت/* | $1100 فی مہینہ، فی نوڈ | $0 | +| استفسار کے اخراجات | $4000 | $4,500 فی مہینہ | +| نوڈس کی تعداد درکار ہے | 10 | قابل اطلاق نہیں | +| انجینئرنگ کا وقت | $6,000 یا اس سے زیادہ فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000,000+ | +| قیمت فی سوال | $0 | $0.00015 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $11,000+ | $4,500 | + +/*بیک اپ کے اخراجات سمیت: $50-$100 فی مہینہ $200 فی گھنٹہ کے مفروضے کی بنیاد پر انجینئرنگ کا وقت -بجٹ بلنگ ٹیب میں زیادہ سے زیادہ کیوری بجٹ فنکشن کا استعمال کرتے ہوئے، سروس کے اعلی معیار کو برقرار رکھتے -ہوئے +بجٹ بلنگ ٹیب میں زیادہ سے زیادہ کیوری بجٹ فنکشن کا استعمال کرتے ہوئے، سروس کے اعلی معیار کو برقرار رکھتے ہوئے تخمینی لاگتیں صرف ایتھیریم مینیٹ سب گراف کے لیے ہیں — دوسرے نیٹ ورکس پر `graph-node` کی خود ہوسٹڈ کرنے پر اخراجات اس سے بھی زیادہ ہوتے ہیں. From be260afddaebdfd7712502b8dad0bfcf153b544b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:28 -0400 Subject: [PATCH 851/924] New translations benefits.mdx (Vietnamese) --- website/pages/vi/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/vi/network/benefits.mdx b/website/pages/vi/network/benefits.mdx index b2fa328ed82f..c27a5f37f9f6 100644 --- a/website/pages/vi/network/benefits.mdx +++ b/website/pages/vi/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From 56032941277a51caeb25277fb013063e091d5831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:29 -0400 Subject: [PATCH 852/924] New translations benefits.mdx (Marathi) --- website/pages/mr/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/mr/network/benefits.mdx b/website/pages/mr/network/benefits.mdx index c3322af4ad95..bacc3941bb26 100644 --- a/website/pages/mr/network/benefits.mdx +++ b/website/pages/mr/network/benefits.mdx @@ -27,47 +27,47 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## कमी आवाज वापरकर्ता (दरमहा 30,000 पेक्षा कमी क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | -| क्वेरी खर्च | $0+ | दरमहा ~$15 | -| अभियांत्रिकी वेळ | दरमहा $400 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000 (ऑटोस्केलिंग) | -| प्रति क्वेरी खर्च | $0 | $0.0005 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड $750+ | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $750+ | ~$15 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +|:----------------------------:|:---------------------------------------:|:------------------------------------------------------------------------:| +| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | +| क्वेरी खर्च | $0+ | दरमहा ~$15 | +| अभियांत्रिकी वेळ | दरमहा $400 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000 (ऑटोस्केलिंग) | +| प्रति क्वेरी खर्च | $0 | $0.0005 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड $750+ | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $750+ | ~$15 | ## मध्यम व्हॉल्यूम वापरकर्ता (दरमहा 3,000,000+ क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | -| क्वेरी खर्च | दरमहा $500 | दरमहा $750 | -| अभियांत्रिकी वेळ | दरमहा $800 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 3,000,000+ | -| प्रति क्वेरी खर्च | $0 | $0.00025 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| अभियांत्रिकी खर्च | $200 प्रति तास | समाविष्ट | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $1,650+ | $750 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +|:----------------------------:|:------------------------------------------:|:------------------------------------------------------------------------:| +| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | +| क्वेरी खर्च | दरमहा $500 | दरमहा $750 | +| अभियांत्रिकी वेळ | दरमहा $800 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 3,000,000+ | +| प्रति क्वेरी खर्च | $0 | $0.00025 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| अभियांत्रिकी खर्च | $200 प्रति तास | समाविष्ट | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $1,650+ | $750 | ## उच्च व्हॉल्यूम वापरकर्ता (दरमहा 30,000,000+ क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्व्हर खर्च\* | प्रति नोड, प्रति महिना $1100 | $0 | -| क्वेरी खर्च | $4000 | दरमहा $4,500 | -| आवश्यक नोड्सची संख्या | 10 | लागू नाही | -| अभियांत्रिकी वेळ | दरमहा $6,000 किंवा अधिक | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000,000+ | -| प्रति क्वेरी खर्च | $0 | $0.00015 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $11,000+ | $4,500 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +|:----------------------------:|:-------------------------------------------:|:------------------------------------------------------------------------:| +| मासिक सर्व्हर खर्च\* | प्रति नोड, प्रति महिना $1100 | $0 | +| क्वेरी खर्च | $4000 | दरमहा $4,500 | +| आवश्यक नोड्सची संख्या | 10 | लागू नाही | +| अभियांत्रिकी वेळ | दरमहा $6,000 किंवा अधिक | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000,000+ | +| प्रति क्वेरी खर्च | $0 | $0.00015 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $11,000+ | $4,500 | \*बॅकअपच्या खर्चासह: $50-$100 प्रति महिना From 060b7fc787020821b096a5996df39a4a5fd47a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:29 -0400 Subject: [PATCH 853/924] New translations benefits.mdx (Hindi) --- website/pages/hi/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/hi/network/benefits.mdx b/website/pages/hi/network/benefits.mdx index b145895e7853..fe2a99679c50 100644 --- a/website/pages/hi/network/benefits.mdx +++ b/website/pages/hi/network/benefits.mdx @@ -27,47 +27,47 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## कम मात्रा वाले उपयोगकर्ता (प्रति माह 30,000 से कम प्रश्न) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | -| पूछताछ लागत | $0+ | ~ $ 15 प्रति माह | -| इंजीनियरिंग का समय | $ 400 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000 (ऑटो स्केलिंग) | -| लागत प्रति क्वेरी | $0 | $0.0005 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| भौगोलिक अतिरेक | $750+ प्रति अतिरिक्त नोड | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $750+ | ~$15 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +|:------------------------------:|:---------------------------------------:|:----------------------------------------------------------------------:| +| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | +| पूछताछ लागत | $0+ | ~ $ 15 प्रति माह | +| इंजीनियरिंग का समय | $ 400 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000 (ऑटो स्केलिंग) | +| लागत प्रति क्वेरी | $0 | $0.0005 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| भौगोलिक अतिरेक | $750+ प्रति अतिरिक्त नोड | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $750+ | ~$15 | ## मध्यम मात्रा उपयोगकर्ता (3,000,000+ प्रश्न प्रति माह) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | -| पूछताछ लागत | $ 500 प्रति माह | $750 प्रति माह | -| इंजीनियरिंग का समय | $800 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 3,000,000+ | -| लागत प्रति क्वेरी | $0 | $0.00025 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| इंजीनियरिंग खर्च | $ 200 प्रति घंटा | शामिल | -| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $1,650+ | $750 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +|:------------------------------:|:------------------------------------------:|:----------------------------------------------------------------------:| +| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | +| पूछताछ लागत | $ 500 प्रति माह | $750 प्रति माह | +| इंजीनियरिंग का समय | $800 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 3,000,000+ | +| लागत प्रति क्वेरी | $0 | $0.00025 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| इंजीनियरिंग खर्च | $ 200 प्रति घंटा | शामिल | +| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $1,650+ | $750 | ## उच्च मात्रा उपयोगकर्ता (30,000,000+ प्रश्न प्रति माह) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -| :-: | :-: | :-: | -| मासिक सर्वर लागत\* | $1100 प्रति माह, प्रति नोड | $0 | -| पूछताछ लागत | $4000 | $4,500 per month | -| आवश्यक नोड्स की संख्या | 10 | Not applicable | -| इंजीनियरिंग का समय | $6,000 or more per month | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000,000+ | -| लागत प्रति क्वेरी | $0 | $0.00015 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $11,000+ | $4,500 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +|:------------------------------:|:-------------------------------------------:|:----------------------------------------------------------------------:| +| मासिक सर्वर लागत\* | $1100 प्रति माह, प्रति नोड | $0 | +| पूछताछ लागत | $4000 | $4,500 per month | +| आवश्यक नोड्स की संख्या | 10 | Not applicable | +| इंजीनियरिंग का समय | $6,000 or more per month | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000,000+ | +| लागत प्रति क्वेरी | $0 | $0.00015 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $11,000+ | $4,500 | \*बैकअप की लागत सहित: $50-$100 प्रति माह From 26f683624444e17156ff3e3e661690dbde099090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:30 -0400 Subject: [PATCH 854/924] New translations benefits.mdx (Yoruba) --- website/pages/yo/network/benefits.mdx | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/website/pages/yo/network/benefits.mdx b/website/pages/yo/network/benefits.mdx index 864672b16515..09c0548bfc4f 100644 --- a/website/pages/yo/network/benefits.mdx +++ b/website/pages/yo/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -| :-: | :-: | :-: | -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month From 69bf79a8c24743cce552818f31cc96787833ecb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:36:31 -0400 Subject: [PATCH 855/924] New translations billing.mdx (Arabic) --- website/pages/ar/billing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ar/billing.mdx b/website/pages/ar/billing.mdx index 763ebdbdaf2a..7321e41ffccf 100644 --- a/website/pages/ar/billing.mdx +++ b/website/pages/ar/billing.mdx @@ -152,7 +152,7 @@ This is how you can purchase GRT on Uniswap. 1. انتقل إلى [ Uniswap ](https://app.uniswap.org/#/swap) وقم بتوصيل محفظتك. 2. حدد التوكن الذي ترغب في استبداله. حدد ETH. 3. حدد التوكن الذي ترغب في تبديله. حدد GRT. - - تأكد من تبديل التوكن الصحيح. عنوان العقد الذكي GRT هو: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` + - تأكد من تبديل التوكن الصحيح. عنوان العقد الذكي GRT هو: ` 0xc944E90C64B2c07662A292be6244BDf05Cda44a7 ` 4. الرجاء إدخال كمية ETH التي ترغب في تحويلها. 5. انقر على زر "مبادلة". 6. قم بتأكيد المعاملة في محفظتك وانتظر حتى تتم المعالجة. From 3110508ddbaa316f1e5840031cb1e019957fd182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:18 -0400 Subject: [PATCH 856/924] New translations operating-graph-node.mdx (Romanian) --- website/pages/ro/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ro/operating-graph-node.mdx b/website/pages/ro/operating-graph-node.mdx index 4f0f856db111..a7dd15e7a84c 100644 --- a/website/pages/ro/operating-graph-node.mdx +++ b/website/pages/ro/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From 6e08adbc225ab5b8c72f683609d43405ca07f3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:19 -0400 Subject: [PATCH 857/924] New translations operating-graph-node.mdx (French) --- website/pages/fr/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/fr/operating-graph-node.mdx b/website/pages/fr/operating-graph-node.mdx index 3f8f8b844054..60e9383e74c0 100644 --- a/website/pages/fr/operating-graph-node.mdx +++ b/website/pages/fr/operating-graph-node.mdx @@ -77,13 +77,13 @@ Un exemple complet de configuration de Kubernetes est disponible dans le [dépô Lorsqu'il est en cours d'exécution, Graph Node expose les ports suivants : -| Port | Objectif | Routes | Paramètre CLI | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important** : Soyez prudent lorsque vous exposez les ports publiquement : les **ports d'administration** doivent rester verrouillés. Cela inclut le point de terminaison Graph Node JSON-RPC. From c42b3e4f89fc36611dd8fa9dba5c465b2e10c60b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:20 -0400 Subject: [PATCH 858/924] New translations operating-graph-node.mdx (Spanish) --- website/pages/es/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/es/operating-graph-node.mdx b/website/pages/es/operating-graph-node.mdx index 759184d08cd7..4f31998c3146 100644 --- a/website/pages/es/operating-graph-node.mdx +++ b/website/pages/es/operating-graph-node.mdx @@ -77,13 +77,13 @@ Puedes encontrar un ejemplo completo de configuración de Kubernetes en el [Inde Cuando está funcionando, Graph Node muestra los siguientes puertos: -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| --- | --- | --- | --- | --- | -| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | -| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | -| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| ------ | -------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------- | +| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | +| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | +| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | > **Importante**: Ten cuidado con exponer puertos públicamente - los **puertos de administración** deben mantenerse bloqueados. Esto incluye el punto final JSON-RPC de Graph Node. From a91d0702157df2b720f789d74c566b2e140e9b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:21 -0400 Subject: [PATCH 859/924] New translations operating-graph-node.mdx (Arabic) --- website/pages/ar/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ar/operating-graph-node.mdx b/website/pages/ar/operating-graph-node.mdx index 646ec2d5dffd..b467b1fc0395 100644 --- a/website/pages/ar/operating-graph-node.mdx +++ b/website/pages/ar/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | -| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | -| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| ------ | ------------------------------------------------------- | ------------------------------------------------------------------- | ----------------- | -------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | +| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | +| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From aeeaa2219ad04317c3a958b704a11db472f07fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:21 -0400 Subject: [PATCH 860/924] New translations operating-graph-node.mdx (Czech) --- website/pages/cs/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/cs/operating-graph-node.mdx b/website/pages/cs/operating-graph-node.mdx index 6b1190311ea1..504a6b22ad8c 100644 --- a/website/pages/cs/operating-graph-node.mdx +++ b/website/pages/cs/operating-graph-node.mdx @@ -77,13 +77,13 @@ Kompletní příklad konfigurace Kubernetes naleznete v úložišti [indexer](ht Když je Graf Uzel spuštěn, zpřístupňuje následující ports: -| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | -| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | -| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| ---- | ---------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | +| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | +| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | +| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | > **Důležité**: Dávejte pozor na veřejné vystavování portů - **administrační porty** by měly být uzamčeny. To se týká i koncového bodu JSON-RPC uzlu Graf. From a69bf46465d88693ead73a722e08f7305899ab7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:22 -0400 Subject: [PATCH 861/924] New translations operating-graph-node.mdx (German) --- website/pages/de/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/de/operating-graph-node.mdx b/website/pages/de/operating-graph-node.mdx index 0e24f48252df..25767bd3fa65 100644 --- a/website/pages/de/operating-graph-node.mdx +++ b/website/pages/de/operating-graph-node.mdx @@ -77,13 +77,13 @@ Eine vollständige Kubernetes-Beispielkonfiguration finden Sie im [Indexer-Repos Wenn es ausgeführt wird, stellt Graph Node die folgenden Ports zur Verfügung: -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | -| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | ----------------- | +| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | +| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | > **Wichtig**: Seien Sie vorsichtig, wenn Sie Ports öffentlich zugänglich machen - **Administrationsports** sollten gesperrt bleiben. Dies schließt den JSON-RPC-Endpunkt des Graph-Knotens ein. From e3a5209691ca8b8bd023d24f2905b11ff6d854de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:23 -0400 Subject: [PATCH 862/924] New translations operating-graph-node.mdx (Italian) --- website/pages/it/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/it/operating-graph-node.mdx b/website/pages/it/operating-graph-node.mdx index e81d14915e40..de919de98b04 100644 --- a/website/pages/it/operating-graph-node.mdx +++ b/website/pages/it/operating-graph-node.mdx @@ -77,13 +77,13 @@ Un esempio completo di configurazione Kubernetes si trova nel [repository indexe Quando è in funzione, Graph Node espone le seguenti porte: -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| ----- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | > **Importante**: fare attenzione a esporre le porte pubblicamente - le porte di **amministrazione** devono essere tenute sotto chiave. Questo include l'endpoint JSON-RPC del Graph Node. From 0580c5a95185e75a3e3edb2c95852e0b6e3408f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:23 -0400 Subject: [PATCH 863/924] New translations operating-graph-node.mdx (Japanese) --- website/pages/ja/operating-graph-node.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/pages/ja/operating-graph-node.mdx b/website/pages/ja/operating-graph-node.mdx index 7b6aef1d16ba..cec1b7f2f4fa 100644 --- a/website/pages/ja/operating-graph-node.mdx +++ b/website/pages/ja/operating-graph-node.mdx @@ -26,7 +26,7 @@ title: オペレーティンググラフノード ### IPFSノード -IPFS ノード(バージョン 未満) - サブグラフのデプロイメタデータは IPFS ネットワーク上に保存されます。 グラフノードは、サブグラフのデプロイ時に主に IPFS ノードにアクセスし、サブグラフマニフェストと全てのリンクファイルを取得します。 ネットワーク・インデクサーは独自の IPFS ノードをホストする必要はありません。 ネットワーク用の IPFS ノードは、https://ipfs.network.thegraph.com でホストされています。 +IPFS ノード(バージョン 未満) - サブグラフのデプロイメタデータは IPFS ネットワーク上に保存されます。 グラフノードは、サブグラフのデプロイ時に主に IPFS ノードにアクセスし、サブグラフマニフェストと全てのリンクファイルを取得します。 ネットワーク・インデクサーは独自の IPFS ノードをホストする必要はありません。 ネットワーク用の IPFS ノードは、https://ipfs.network.thegraph.com でホストされています。 ### Prometheus メトリクスサーバー @@ -77,13 +77,13 @@ Kubernetesの完全な設定例は、[indexerリポジトリ](https://github.com グラフノードは起動時に以下のポートを公開します。 -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ------------------------------------------------------- | ------------------------------------------------------ | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **重要**: ポートを公に公開する場合は注意してください。**管理ポート**はロックしておく必要があります。ノードの JSON-RPC エンドポイント From 054dc2b1fe997f8b3284478b6325e88b7c6c7def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:24 -0400 Subject: [PATCH 864/924] New translations operating-graph-node.mdx (Korean) --- website/pages/ko/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ko/operating-graph-node.mdx b/website/pages/ko/operating-graph-node.mdx index 4f0f856db111..a7dd15e7a84c 100644 --- a/website/pages/ko/operating-graph-node.mdx +++ b/website/pages/ko/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From c2400c1974457e87fdae348d3e44512bd62a3c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:25 -0400 Subject: [PATCH 865/924] New translations operating-graph-node.mdx (Dutch) --- website/pages/nl/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/nl/operating-graph-node.mdx b/website/pages/nl/operating-graph-node.mdx index 4f0f856db111..a7dd15e7a84c 100644 --- a/website/pages/nl/operating-graph-node.mdx +++ b/website/pages/nl/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From 260c414e7d28bdb4ff6323e9cb8d34e2f4d2e902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:25 -0400 Subject: [PATCH 866/924] New translations operating-graph-node.mdx (Polish) --- website/pages/pl/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/pl/operating-graph-node.mdx b/website/pages/pl/operating-graph-node.mdx index 4f0f856db111..a7dd15e7a84c 100644 --- a/website/pages/pl/operating-graph-node.mdx +++ b/website/pages/pl/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From 1cffdb6490872c42e6120289161c296ee9e28c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:26 -0400 Subject: [PATCH 867/924] New translations operating-graph-node.mdx (Portuguese) --- website/pages/pt/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/pt/operating-graph-node.mdx b/website/pages/pt/operating-graph-node.mdx index c9684ffc559f..c0267166d1be 100644 --- a/website/pages/pt/operating-graph-node.mdx +++ b/website/pages/pt/operating-graph-node.mdx @@ -77,13 +77,13 @@ Veja uma configuração de exemplo completa do Kubernetes no [repositório de in Durante a execução, o Graph Node expõe as seguintes portas: -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| --- | --- | --- | --- | --- | -| 8000 | Servidor HTTP GraphQL
    (para queries de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | -| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | -| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| ----- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | Servidor HTTP GraphQL
    (para queries de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | +| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | +| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | > **Importante:** Cuidado ao expor portas publicamente; as **portas de administração** devem ser trancadas a sete chaves. Isto inclui o endpoint JSON-RPC do Graph Node. From c12f9a8b39b249b926951300a71f0b745bc747dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:27 -0400 Subject: [PATCH 868/924] New translations operating-graph-node.mdx (Russian) --- website/pages/ru/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ru/operating-graph-node.mdx b/website/pages/ru/operating-graph-node.mdx index dd51cc588968..22601fc637b7 100644 --- a/website/pages/ru/operating-graph-node.mdx +++ b/website/pages/ru/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ Во время работы Graph Node предоставляет следующие порты: -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| --- | --- | --- | --- | --- | -| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | -| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | -| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| ---- | ------------------------------------------------------------ | ---------------------------------------------------- | ----------------- | ---------------- | +| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | +| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | +| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | > **Важно**. Будьте осторожны, открывая порты для общего доступа — **порты администрирования** должны быть заблокированы. Это касается конечных точек Graph Node JSON-RPC. From 6e9f7957160d1890f552dd3d02d8bd1b4b9e4629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:27 -0400 Subject: [PATCH 869/924] New translations operating-graph-node.mdx (Swedish) --- website/pages/sv/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/sv/operating-graph-node.mdx b/website/pages/sv/operating-graph-node.mdx index 20fe3667765e..203e83bab78a 100644 --- a/website/pages/sv/operating-graph-node.mdx +++ b/website/pages/sv/operating-graph-node.mdx @@ -77,13 +77,13 @@ En komplett exempelkonfiguration för Kubernetes finns i [indexer repository](ht När Graph Node är igång exponerar den följande portar: -| Port | Syfte | Rutter | Argument för CLI | Miljö Variabel | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP-server
    (för frågor om undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (för prenumerationer på undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | -| 8030 | Status för indexering av undergrafer API | /graphql | --index-node-port | - | -| 8040 | Prometheus mätvärden | /metrics | --metrics-port | - | +| Port | Syfte | Rutter | Argument för CLI | Miljö Variabel | +| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------- | +| 8000 | GraphQL HTTP-server
    (för frågor om undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (för prenumerationer på undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | +| 8030 | Status för indexering av undergrafer API | /graphql | --index-node-port | - | +| 8040 | Prometheus mätvärden | /metrics | --metrics-port | - | > **Viktigt**: Var försiktig med att exponera portar offentligt - **administrationsportar** bör hållas säkra. Detta inkluderar JSON-RPC-slutpunkten för Graph Node. From 3e8d20d672331b22965f4ee8e86595213759d07b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:28 -0400 Subject: [PATCH 870/924] New translations operating-graph-node.mdx (Turkish) --- website/pages/tr/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/tr/operating-graph-node.mdx b/website/pages/tr/operating-graph-node.mdx index 41f96f2faec4..c985dfba3a76 100644 --- a/website/pages/tr/operating-graph-node.mdx +++ b/website/pages/tr/operating-graph-node.mdx @@ -77,13 +77,13 @@ Tam Kubernetes örnek yapılandırması [indeksleyici Github deposunda](https:// Graph Düğümü çalışırken aşağıdaki portları açar: -| Port | Amaç | Routes | CLI Argümanı | Ortam Değişkeni | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP sunucusu
    (subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | -| 8030 | Subgraph indeksleme durumu API'ı | /graphql | --index-node-port | - | -| 8040 | Prometheus ölçümleri | /metrics | --metrics-port | - | +| Port | Amaç | Routes | CLI Argümanı | Ortam Değişkeni | +| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | +| 8000 | GraphQL HTTP sunucusu
    (subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | +| 8030 | Subgraph indeksleme durumu API'ı | /graphql | --index-node-port | - | +| 8040 | Prometheus ölçümleri | /metrics | --metrics-port | - | > **Önemli**: Bağlantı noktalarını herkese açık olarak açarken dikkatli olun - **yönetim portları** kilitli tutulmalıdır. Bu, Graph Düğümü JSON-RPC uç noktasını içerir. From 843fc7e21b84c8f8255f6eda75a09cc7b43a6790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:29 -0400 Subject: [PATCH 871/924] New translations operating-graph-node.mdx (Ukrainian) --- website/pages/uk/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/uk/operating-graph-node.mdx b/website/pages/uk/operating-graph-node.mdx index 7bcb6ac9dab6..b198c70ca3ed 100644 --- a/website/pages/uk/operating-graph-node.mdx +++ b/website/pages/uk/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| --- | --- | --- | --- | --- | -| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | -| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | -| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | -| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | +| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | +| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | +| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | +| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From 07f5ad8fb9f51a2295321a240d0fa4bcf4e4021c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:30 -0400 Subject: [PATCH 872/924] New translations operating-graph-node.mdx (Chinese Simplified) --- website/pages/zh/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/zh/operating-graph-node.mdx b/website/pages/zh/operating-graph-node.mdx index 78fa738fcf22..9ed79ffbde45 100644 --- a/website/pages/zh/operating-graph-node.mdx +++ b/website/pages/zh/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ 当运行Graph Node时,会暴露以下端口: -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...

    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | -| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | -| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| ---- | ------------------------------------ | ------------------------------------------------------------------- | ----------------- | ----- | +| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...

    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | +| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | +| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | > **重要**: 公开暴露端口时要小心 - **管理端口** 应保持锁定。 这包括下面详述的 Graph 节点 JSON-RPC 和索引人管理端点。 From df951fd0c6998e5d8bb2498e96aa5be695fe2fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:30 -0400 Subject: [PATCH 873/924] New translations operating-graph-node.mdx (Urdu (Pakistan)) --- website/pages/ur/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/ur/operating-graph-node.mdx b/website/pages/ur/operating-graph-node.mdx index ef22e83ab99b..a5434224e20b 100644 --- a/website/pages/ur/operating-graph-node.mdx +++ b/website/pages/ur/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ جب یہ چل رہا ہوتا ہے گراف نوڈ مندرجہ ذیل پورٹس کو بے نقاب کرتا ہے: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | -| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | -| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | +| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | +| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | > **اہم**: پورٹس کو عوامی طور پر ظاہر کرنے میں محتاط رہیں - **انتظامی پورٹس** کو بند رکھا جانا چاہیے. اس میں گراف نوڈ کا JSON-RPC اینڈ پوائنٹ شامل ہے. From 6b170f6ff3daba408e824abc3dd53b6c31c92a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:31 -0400 Subject: [PATCH 874/924] New translations operating-graph-node.mdx (Vietnamese) --- website/pages/vi/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/vi/operating-graph-node.mdx b/website/pages/vi/operating-graph-node.mdx index 7112da586680..a600e22c0a05 100644 --- a/website/pages/vi/operating-graph-node.mdx +++ b/website/pages/vi/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| --- | --- | --- | --- | --- | -| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | -| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | -| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | +| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | +| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | +| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From ad2f09ca28f6d62402d8782074fb13c8aa4bd77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:32 -0400 Subject: [PATCH 875/924] New translations operating-graph-node.mdx (Marathi) --- website/pages/mr/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/mr/operating-graph-node.mdx b/website/pages/mr/operating-graph-node.mdx index fe9e6c5fb9f3..598d94037dae 100644 --- a/website/pages/mr/operating-graph-node.mdx +++ b/website/pages/mr/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **महत्त्वाचे**: पोर्ट सार्वजनिकपणे उघड करण्याबाबत सावधगिरी बाळगा - **प्रशासन पोर्ट** लॉक डाउन ठेवले पाहिजेत. यामध्ये ग्राफ नोड JSON-RPC एंडपॉइंटचा समावेश आहे. From 8ee148adb026f1c7279305f4ab079124e4b330bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:32 -0400 Subject: [PATCH 876/924] New translations operating-graph-node.mdx (Hindi) --- website/pages/hi/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/hi/operating-graph-node.mdx b/website/pages/hi/operating-graph-node.mdx index 5d53c0fe05a7..6dbe487e2a81 100644 --- a/website/pages/hi/operating-graph-node.mdx +++ b/website/pages/hi/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ जब यह चल रहा होता है तो ग्राफ़ नोड निम्नलिखित पोर्ट को उजागर करता है: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | -------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **महत्वपूर्ण**: बंदरगाहों को सार्वजनिक रूप से उजागर करने के बारे में सावधान रहें - **प्रशासन बंदरगाहों** को बंद रखा जाना चाहिए। इसमें ग्राफ़ नोड JSON-RPC समापन बिंदु शामिल है। From 94d55de2ae0e5ed95735df2c17a53848cbfdd113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:33 -0400 Subject: [PATCH 877/924] New translations operating-graph-node.mdx (Yoruba) --- website/pages/yo/operating-graph-node.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/yo/operating-graph-node.mdx b/website/pages/yo/operating-graph-node.mdx index 4f0f856db111..a7dd15e7a84c 100644 --- a/website/pages/yo/operating-graph-node.mdx +++ b/website/pages/yo/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| --- | --- | --- | --- | --- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. From 3525fecbc74d5a6fba63e02194cac6da45df51fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:37:37 -0400 Subject: [PATCH 878/924] New translations glossary.mdx (Japanese) --- website/pages/ja/glossary.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/ja/glossary.mdx b/website/pages/ja/glossary.mdx index 167d4ed1fdcf..abee880b8eb3 100644 --- a/website/pages/ja/glossary.mdx +++ b/website/pages/ja/glossary.mdx @@ -78,8 +78,8 @@ title: 用語集 - **L2転送ツール**:ネットワーク参加者がイーサリアムメインネットからArbitrum Oneにネットワーク関連資産を転送できるようにするスマートコントラクトとUIです。ネットワーク参加者は、委任されたGRT、サブグラフ、キュレーションシェア、およびインデクサーのセルフステークを転送できます。 -- サブグラフを Graph Network に***アップグレード*する**: サブグラフをホストされたサービスから Graph Network に移動するプロセス。 +- サブグラフを Graph Network に**_アップグレード_する**: サブグラフをホストされたサービスから Graph Network に移動するプロセス。 -- サブグラフ**の*更新***: サブグラフのマニフェスト、スキーマ、または更新を含む新しいサブグラフ バージョンをリリースするプロセス。マッピング。 +- サブグラフ**の_更新_**: サブグラフのマニフェスト、スキーマ、または更新を含む新しいサブグラフ バージョンをリリースするプロセス。マッピング。 - **移行**:サブグラフの古いバージョンから新しいバージョンに移行するキュレーション共有のプロセスです(例えば、v0.0.1がv0.0.2に更新される場合)。 From f7a1888f7aee2745f51bd4f9f04d54854f190673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:38:13 -0400 Subject: [PATCH 879/924] New translations graphql-validations-migration-guide.mdx (French) --- .../release-notes/graphql-validations-migration-guide.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx b/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx index f0c63bc8feed..c3ce4f6a32f5 100644 --- a/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx @@ -103,7 +103,7 @@ query myData { } query myData2 { - # renommer la deuxième requête + # renommer la deuxième requête name } ``` @@ -158,7 +158,7 @@ _Solution:_ ```graphql query myData($id: String) { - # conserver la variable pertinente (ici : `$id: String`) + # conserver la variable pertinente (ici : `$id: String`) id ...MyFields } @@ -259,7 +259,7 @@ query { ```graphql # Différents arguments peuvent conduire à des données différentes, -# donc nous ne pouvons pas supposer que les champs seront les mêmes. +# donc nous ne pouvons pas supposer que les champs seront les mêmes. query { dogs { doesKnowCommand(dogCommand: SIT) From 00f0ca99d006ab03aed6972e5842ce7b73149db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:38:14 -0400 Subject: [PATCH 880/924] New translations graphql-validations-migration-guide.mdx (Spanish) --- .../es/release-notes/graphql-validations-migration-guide.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/website/pages/es/release-notes/graphql-validations-migration-guide.mdx b/website/pages/es/release-notes/graphql-validations-migration-guide.mdx index fefc282fe99e..5bdf39587e84 100644 --- a/website/pages/es/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/es/release-notes/graphql-validations-migration-guide.mdx @@ -408,6 +408,7 @@ query { user { id image # 'image' requiere un conjunto de selección para subcampos! + } } ``` From 22828db6d2f994043babcdec2f33dd882fa65123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:38:18 -0400 Subject: [PATCH 881/924] New translations graphql-validations-migration-guide.mdx (Portuguese) --- .../graphql-validations-migration-guide.mdx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx b/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx index 3103ee0c6de5..0bb187eb6fc0 100644 --- a/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx @@ -256,7 +256,8 @@ query { } ``` -**Conflicting fields with arguments (#OverlappingFieldsCanBeMergedRule)** (Campos em conflito com argumentos) +**Conflicting fields with arguments (#OverlappingFieldsCanBeMergedRule)** +(Campos em conflito com argumentos) ```graphql # Argumentos diferentes podem levar a dados diferentes, @@ -467,10 +468,10 @@ Estas referências desconhecidas devem ser consertadas: - caso contrário, remova ### Fragment: invalid spread or definition - (Fragment: espalhamento ou definição inválidos) -**Invalid Fragment spread (#PossibleFragmentSpreadsRule)** (Espalhamento de fragment inválido) +**Invalid Fragment spread (#PossibleFragmentSpreadsRule)** +(Espalhamento de fragment inválido) Um Fragment não pode ser espalhado em um tipo não aplicável. @@ -510,7 +511,8 @@ fragment inlineFragOnScalar on Dog { ### Uso de Diretivas -**Directive cannot be used at this location (#KnownDirectivesRule)** (A diretiva não pode ser usada neste local) +**Directive cannot be used at this location (#KnownDirectivesRule)** +(A diretiva não pode ser usada neste local) Apenas diretivas GraphQL (`@...`) apoiadas pela API do The Graph podem ser usadas. @@ -527,7 +529,8 @@ query { _Nota: `@stream`, `@live`, e `@defer` não têm apoio._ -**Directive can only be used once at this location (#UniqueDirectivesPerLocationRule)** (A diretiva só pode ser usada neste local uma vez) +**Directive can only be used once at this location (#UniqueDirectivesPerLocationRule)** +(A diretiva só pode ser usada neste local uma vez) As diretivas apoiadas pelo The Graph só podem ser usadas uma vez por local. From b883223602e5d66b9599d7e5d8829e5537c332f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:38:18 -0400 Subject: [PATCH 882/924] New translations graphql-validations-migration-guide.mdx (Russian) --- .../graphql-validations-migration-guide.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx b/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx index 8da2d2e032b9..3a7f9b2fe642 100644 --- a/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx @@ -284,8 +284,8 @@ query { ```graphql query { - # В конце концов, у нас есть два определения "x", указывающие - # на разные поля! + # В конце концов, у нас есть два определения "x", указывающие + # на разные поля! ...A ...B } @@ -439,7 +439,7 @@ query { ```graphql query purposes { # Если в схеме "name" определено как "String", - # этот запрос не пройдёт валидацию. + # этот запрос не пройдёт валидацию. purpose(name: 1) { id } @@ -449,8 +449,8 @@ query purposes { query purposes($name: Int!) { # Если "name" определено в схеме как `String`, - # этот запрос не пройдёт валидацию, потому что - # используемая переменная имеет тип `Int` + # этот запрос не пройдёт валидацию, потому что + # используемая переменная имеет тип `Int` purpose(name: $name) { id } From 4c4c2f4f77ed6a8ab14deace8691e567f9550ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:38:20 -0400 Subject: [PATCH 883/924] New translations graphql-validations-migration-guide.mdx (Urdu (Pakistan)) --- .../ur/release-notes/graphql-validations-migration-guide.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx b/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx index 15d7aa4cf114..fb46d352b6b9 100644 --- a/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx @@ -4,7 +4,8 @@ title: GraphQL کی توثیق کی منتقلی گائیڈ جلد ہی `گراف نوڈ` [GraphQL توثیق کی تفصیلات](https://spec.graphql.org/June2018/#sec-Validation) کی 100% کوریج کو سپورٹ کرے گا. -`گراف نوڈ` کے پچھلے ورژن تمام توثیقوں کی حمایت نہیں کرتے تھے اور زیادہ خوبصورت جوابات فراہم کرتے تھے - لہذا، ابہام کی صورت میں، `گراف نوڈ` غلط گراف کیو ایل آپریشن کے اجزاء کو نظر انداز کر رہا تھا. +`گراف نوڈ` کے پچھلے ورژن تمام توثیقوں کی حمایت نہیں کرتے تھے اور زیادہ خوبصورت جوابات فراہم کرتے تھے - لہذا، ابہام کی صورت میں، `گراف نوڈ` غلط گراف کیو ایل + آپریشن کے اجزاء کو نظر انداز کر رہا تھا. GraphQL ویلیڈیشن سپورٹ آنے والی نئی خصوصیات اور گراف نیٹ ورک کے پیمانے پر کارکردگی کا ایک ستون ہے. From 3772a471aca3df2617bca2a54cb7e9d6f45273e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:38:26 -0400 Subject: [PATCH 884/924] New translations arbitrum-faq.mdx (Dutch) --- website/pages/nl/arbitrum/arbitrum-faq.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/pages/nl/arbitrum/arbitrum-faq.mdx b/website/pages/nl/arbitrum/arbitrum-faq.mdx index a48dc60d2789..457f2a55409b 100644 --- a/website/pages/nl/arbitrum/arbitrum-faq.mdx +++ b/website/pages/nl/arbitrum/arbitrum-faq.mdx @@ -45,7 +45,8 @@ Please help [test the network](https://testnet.thegraph.com/explorer) on L2 and ## Zijn er risico's verbonden met het schalen van het netwerk naar L2? -Alle smart contracts zijn grondig [ge-audit] (https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Alle smart contracts zijn grondig [ge-audit] +(https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). Alles is grondig getest, en een eventualiteiten plan is gemaakt en klaargezet voor een veilige en naadloze transitie. Details kunnen [hier](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20) gevonden worden. From 0249eae935ef1b3ce78830d47b51d032c8996cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:38:30 -0400 Subject: [PATCH 885/924] New translations arbitrum-faq.mdx (Yoruba) --- website/pages/yo/arbitrum/arbitrum-faq.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/pages/yo/arbitrum/arbitrum-faq.mdx b/website/pages/yo/arbitrum/arbitrum-faq.mdx index 61eaabee08aa..7c0e94324e40 100644 --- a/website/pages/yo/arbitrum/arbitrum-faq.mdx +++ b/website/pages/yo/arbitrum/arbitrum-faq.mdx @@ -45,7 +45,8 @@ Jọwọ ṣe iranlọwọ [ṣe idanwo netiwọki](https://testnet.thegraph.com ## Ṣe awọn ewu eyikeyi wa ni nkan ṣe pẹlu iwọn nẹtiwọọki si L2? -Gbogbo awọn adehun ọlọgbọn ti jẹ daradara [ayewo pipe](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Gbogbo awọn adehun ọlọgbọn ti jẹ daradara +[ayewo pipe](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). Ohùn gbogbo tí ní ìdánwò dáradára, àti pé èrò airotẹlẹ kàn wá ní ayé láti ríi dájú wípé ìyípadà ailewu àti ailẹgbẹ. Àwọn àlàyé lè ṣé rí [níbi yìí](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20). From 9c42c9af74d8c79f2e6401a1ecbe48101f4739f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:38:31 -0400 Subject: [PATCH 886/924] New translations l2-transfer-tools-faq.mdx (French) --- website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx index 45ec79e9d4f9..d43463682da5 100644 --- a/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx @@ -336,11 +336,13 @@ Si vous n’avez transféré aucun solde de contrat de vesting à L2 et que votr ### J’utilise mon contrat de vesting pour investir dans mainnet. Puis-je transférer ma participation à Arbitrum? -Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat d’acquisition L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat d’acquisition dans Explorer. Si votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. +Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat d’acquisition L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat d’acquisition dans Explorer. Si +votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. ### J’utilise mon contrat de vesting pour déléguer sur mainnet. Puis-je transférer mes délégations à Arbitrum? -Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat de vesting L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat de vesting dans Explorer. Si votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. +Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat de vesting L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat de vesting dans Explorer. Si +votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. ### Puis-je spécifier un bénéficiaire différent pour mon contrat de vesting sur L2? From fe42e4d4ca567228909e0b1bf08012702e2b9fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:38:33 -0400 Subject: [PATCH 887/924] New translations l2-transfer-tools-faq.mdx (German) --- website/pages/de/arbitrum/l2-transfer-tools-faq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx index eb4fda3fc003..cdb3cd27b4e1 100644 --- a/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx @@ -64,7 +64,7 @@ Die Übertragungszeit beträgt etwa 20 Minuten. Die Arbitrum-Brücke arbeitet im ### Wird mein Subgraph noch auffindbar sein, nachdem ich ihn auf L2 übertragen habe? -Ihr Subgraph ist nur in dem Netzwerk auffindbar, in dem er veröffentlicht ist. Wenn Ihr Subgraph zum Beispiel auf Arbitrum One ist, können Sie ihn nur im Explorer auf Arbitrum One finden und nicht auf Ethereum. Bitte vergewissern Sie sich, dass Sie Arbitrum One in der Netzwerkumschaltung oben auf der Seite ausgewählt haben, um sicherzustellen, dass Sie sich im richtigen Netzwerk befinden. Nach der Übertragung wird der L1-Subgraph als veraltet angezeigt. +Ihr Subgraph ist nur in dem Netzwerk auffindbar, in dem er veröffentlicht ist. Wenn Ihr Subgraph zum Beispiel auf Arbitrum One ist, können Sie ihn nur im Explorer auf Arbitrum One finden und nicht auf Ethereum. Bitte vergewissern Sie sich, dass Sie Arbitrum One in der Netzwerkumschaltung oben auf der Seite ausgewählt haben, um sicherzustellen, dass Sie sich im richtigen Netzwerk befinden. Nach der Übertragung wird der L1-Subgraph als veraltet angezeigt. ### Muss mein Subgraph ( Teilgraph ) veröffentlicht werden, um ihn zu übertragen? From be9ee9dc7837582f98d77c7590e82d4052f2c191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:38:35 -0400 Subject: [PATCH 888/924] New translations l2-transfer-tools-faq.mdx (Korean) --- website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx index de12152a1f00..602b2a2c3aa2 100644 --- a/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx @@ -22,7 +22,8 @@ The exception is with smart contract wallets like multisigs: these are smart con ### 만약 7일 안에 이체를 완료하지 못하면 어떻게 되나요? -L2 전송 도구는 Arbitrum의 기본 메커니즘을 사용하여 L1에서 L2로 메시지를 보냅니다. 이 메커니즘은 "재시도 가능한 티켓"이라고 하며 Arbitrum GRT 브리지를 포함한 모든 네이티브 토큰 브리지를 사용하여 사용됩니다. 재시도 가능한 티켓에 대해 자세히 읽을 수 있습니다 [Arbitrum 문서] (https://docs.arbitrum.io/arbos/l1-to-l2-messaging). +L2 전송 도구는 Arbitrum의 기본 메커니즘을 사용하여 L1에서 L2로 메시지를 보냅니다. 이 메커니즘은 "재시도 가능한 티켓"이라고 하며 Arbitrum GRT 브리지를 포함한 모든 네이티브 토큰 브리지를 사용하여 사용됩니다. 재시도 가능한 티켓에 대해 자세히 읽을 수 있습니다 [Arbitrum 문서] +(https://docs.arbitrum.io/arbos/l1-to-l2-messaging). 자산(하위 그래프, 스테이크, 위임 또는 큐레이션) 을 L2로 이전하면 L2에서 재시도 가능한 티켓을 생성하는 Arbitrum GRT 브리지를 통해 메시지가 전송됩니다. 전송 도구에는 거래에 일부 ETH 값이 포함되어 있으며, 이는 1) 티켓 생성 비용을 지불하고 2) L2에서 티켓을 실행하기 위해 가스 비용을 지불하는 데 사용됩니다. 그러나 티켓이 L2에서 실행될 준비가 될 때까지 가스 가격이 시간에 따라 달라질 수 있으므로 이 자동 실행 시도가 실패할 수 있습니다. 그런 일이 발생하면 Arbitrum 브릿지는 재시도 가능한 티켓을 최대 7일 동안 유지하며 누구나 티켓 "사용"을 재시도할 수 있습니다(Arbitrum에 브릿지된 일부 ETH가 있는 지갑이 필요함). @@ -40,6 +41,8 @@ If you have the L1 transaction hash (which you can find by looking at the recent + + 1. 이더리움 메인넷에서 전송 시작 2. 확인을 위해 20분 정도 기다리세요 From 79fae34e60996594bf65e0ca97b1b47514784a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:02 -0400 Subject: [PATCH 889/924] New translations substreams-powered-subgraphs-faq.mdx (Urdu (Pakistan)) --- .../pages/ur/developing/substreams-powered-subgraphs-faq.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx b/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx index 8cd83ceef138..979d460d6b6a 100644 --- a/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx +++ b/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx @@ -44,7 +44,8 @@ Developed by [StreamingFast](https://www.streamingfast.io/), Substreams is an ex [StreamingFast](https://www.streamingfast.io/) کے ذریعے تیار کردہ، Firehose ایک بلاکچین ڈیٹا نکالنے کی پرت ہے جسے شروع سے بلاکچینز کی مکمل تاریخ کو اس رفتار سے پروسیس کرنے کے لیے ڈیزائن کیا گیا ہے جو پہلے نظر نہیں آتی تھیں۔ فائلوں پر مبنی اور سٹریمنگ فرسٹ اپروچ فراہم کرنا، یہ سٹریمنگ فاسٹ کے اوپن سورس ٹیکنالوجیز کے سوٹ کا بنیادی جزو اور سب اسٹریمز کی بنیاد ہے. -Firehose کے بارے میں مزید جاننے کے لیے[documentation] (https://firehose.streamingfast.io/) پر جائیں. +Firehose کے بارے میں مزید جاننے کے لیے[documentation] +(https://firehose.streamingfast.io/) پر جائیں. ## Firehose کے کیا فوائد ہیں؟ From 9acfc8f19dfd1f76a677a287ac8cd992ed5c67c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:04 -0400 Subject: [PATCH 890/924] New translations upgrading-a-subgraph.mdx (French) --- website/pages/fr/cookbook/upgrading-a-subgraph.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/fr/cookbook/upgrading-a-subgraph.mdx b/website/pages/fr/cookbook/upgrading-a-subgraph.mdx index fa1225a9d7df..aa8894a26644 100644 --- a/website/pages/fr/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/fr/cookbook/upgrading-a-subgraph.mdx @@ -134,7 +134,7 @@ Toutes nos félicitations! Vous êtes désormais un pionnier de la décentralisa ```graphql { - stakers(block: { number_gte: 14486109 }) { + stakers(block : { number_gte : 14486109 }) { id } } From e51fac831fcc32904d296ba76f5d8356d19f8bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:13 -0400 Subject: [PATCH 891/924] New translations new-chain-integration.mdx (Spanish) --- website/pages/es/new-chain-integration.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/pages/es/new-chain-integration.mdx b/website/pages/es/new-chain-integration.mdx index 737ab77226a4..d9217c7a4a9e 100644 --- a/website/pages/es/new-chain-integration.mdx +++ b/website/pages/es/new-chain-integration.mdx @@ -4,7 +4,8 @@ title: Integración de nuevas redes El Graph Node actualmente puede indexar datos de los siguientes tipos de cadena: -- Ethereum, a través de EVM JSON-RPC y [Ethereum Firehose] (https://github.com/streamingfast/firehose-ethereum) +- Ethereum, a través de EVM JSON-RPC y [Ethereum Firehose] + (https://github.com/streamingfast/firehose-ethereum) - NEAR, a través de [NEAR Firehose] (https://github.com/streamingfast/near-firehose-indexer) - Cosmos, a través de [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) - Arweave, a través de [Arweave Firehose](https://github.com/graphprotocol/firehose-arweave) From d2bcd76729a7861d294cd513d05554904010667b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:14 -0400 Subject: [PATCH 892/924] New translations new-chain-integration.mdx (Arabic) --- website/pages/ar/new-chain-integration.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ar/new-chain-integration.mdx b/website/pages/ar/new-chain-integration.mdx index 7f7a29c0d860..278e07ed2054 100644 --- a/website/pages/ar/new-chain-integration.mdx +++ b/website/pages/ar/new-chain-integration.mdx @@ -15,7 +15,7 @@ title: تكامل الشبكات الجديدة **1. استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية** -إذا كانت سلسلة الكتل متوافقة مع آلة الإيثريوم الافتراضية وإذا كان العميل/العقدة يوفر واجهة برمجة التطبيقات القياسية لاستدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية، ، فإنه يمكن لعقدة الغراف فهرسة هذه السلسلة الجديدة. لمزيد من المعلومات، يرجى الاطلاع على [اختبار استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية] (تكامل*سلسة*جديدة #اختبار*استدعاء*إجراء*عن*بُعد*باستخدام*تمثيل*كائنات*جافا*سكريبت*لآلة*التشغيل*الافتراضية_لإثريوم). +إذا كانت سلسلة الكتل متوافقة مع آلة الإيثريوم الافتراضية وإذا كان العميل/العقدة يوفر واجهة برمجة التطبيقات القياسية لاستدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية، ، فإنه يمكن لعقدة الغراف فهرسة هذه السلسلة الجديدة. لمزيد من المعلومات، يرجى الاطلاع على [اختبار استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية] (تكامل_سلسة_جديدة #اختبار_استدعاء_إجراء_عن_بُعد_باستخدام_تمثيل_كائنات_جافا_سكريبت_لآلة_التشغيل_الافتراضية\_لإثريوم). **2. فايرهوز** From 795a8ce4177a9c2e491134fa22cce89483a9401a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:19 -0400 Subject: [PATCH 893/924] New translations new-chain-integration.mdx (Czech) --- website/pages/cs/new-chain-integration.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/pages/cs/new-chain-integration.mdx b/website/pages/cs/new-chain-integration.mdx index 8e94e9a7b4e2..d630858a40ad 100644 --- a/website/pages/cs/new-chain-integration.mdx +++ b/website/pages/cs/new-chain-integration.mdx @@ -59,8 +59,8 @@ Aby mohl uzel Grafu přijímat data z řetězce EVM, musí uzel RPC zpřístupni 1. Předpřipravený chytrá smlouva [Gravitar](https://github.com/graphprotocol/example-subgraph/tree/f89bdd4628efa4badae7367d4919b3f648083323) a podgraf je dobrým výchozím bodem 2. Zavedení lokálního podgrafu z jakéhokoli existujícího chytrého kontraktu nebo vývojového prostředí Solidity [pomocí Hardhat s plugin Graph](https://github.com/graphprotocol/hardhat-graph) 3. Upravte výsledný soubor `subgraph.yaml` změnou názvu [`dataSources.network`](http://dataSources.network) na stejný název, který byl dříve předán z Uzel Graf. -4. Create your subgraph in Graph Node: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` -5. Publish your subgraph to Graph Node: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` +4. Vytvořte podgraf v uzlu Graf: `graph create $SUBGRAPH_NAME --node $GRAPH_NODE_ENDPOINT` +5. Zveřejněte svůj podgraf v uzlu Graf: `graph deploy $SUBGRAPH_NAME --ipfs $IPFS_ENDPOINT --node $GRAPH_NODE_ENDPOINT` Graph Node should be syncing the deployed subgraph if there are no errors. Give it time to sync, then send some GraphQL queries to the API endpoint printed in the logs. From b3cc3d49e8988bf963ca57a3465341d46eade2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:24 -0400 Subject: [PATCH 894/924] New translations new-chain-integration.mdx (Urdu (Pakistan)) --- website/pages/ur/new-chain-integration.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/ur/new-chain-integration.mdx b/website/pages/ur/new-chain-integration.mdx index b1a142fb672a..1f431f9239f6 100644 --- a/website/pages/ur/new-chain-integration.mdx +++ b/website/pages/ur/new-chain-integration.mdx @@ -27,7 +27,7 @@ title: نئے نیٹ ورکس کو انٹیگریٹ کرنا نئے EVM چین انٹیگریٹرز سب سٹریمز کے فوائد اور اس کے بڑے پیمانے پر متوازی انڈیکسنگ کی صلاحیتوں کو دیکھتے ہوئے، Firehose پر مبنی نقطہ نظر پر بھی غور کر سکتے ہیں۔ دونوں کو سپورٹ کرنے سے ڈویلپرز کو نئی چین کے لیے سب سٹریمز کی تعمیر یا سب گراف کے درمیان انتخاب کرنے کی اجازت ملتی ہے۔ -> **نوٹ**: EVM چینز کے لیے فائر ہوز پر مبنی انٹیگریشن کے لیے اب بھی انڈیکسرز کو چین کے آرکائیو RPC نوڈ کو صحیح طریقے سے سب گرافس کو انڈیکس کرنے کے لیے چلانے کی ضرورت ہوگی۔ یہ فائر ہوز کی سمارٹ کنٹریکٹ سٹیٹ فراہم کرنے میں ناکامی کی وجہ سے ہے جو عام طور پر `eth_call` RPC طریقہ سے قابل رسائی ہے۔ (یہ یاد دلانے کے قابل ہے کہ ایتھ_کالز [ڈویلپرز کے لیے اچھا عمل نہیں ہے](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) +> **نوٹ**: EVM چینز کے لیے فائر ہوز پر مبنی انٹیگریشن کے لیے اب بھی انڈیکسرز کو چین کے آرکائیو RPC نوڈ کو صحیح طریقے سے سب گرافس کو انڈیکس کرنے کے لیے چلانے کی ضرورت ہوگی۔ یہ فائر ہوز کی سمارٹ کنٹریکٹ سٹیٹ فراہم کرنے میں ناکامی کی وجہ سے ہے جو عام طور پر `eth_call` RPC طریقہ سے قابل رسائی ہے۔ (یہ یاد دلانے کے قابل ہے کہ ایتھ\_کالز [ڈویلپرز کے لیے اچھا عمل نہیں ہے](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) --- From 8927d9072dae6bcd2990f9e25bc3a0935eaa37a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:32 -0400 Subject: [PATCH 895/924] New translations chain-integration-overview.mdx (Urdu (Pakistan)) --- website/pages/ur/chain-integration-overview.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/pages/ur/chain-integration-overview.mdx b/website/pages/ur/chain-integration-overview.mdx index f09de51959b9..6855823bae83 100644 --- a/website/pages/ur/chain-integration-overview.mdx +++ b/website/pages/ur/chain-integration-overview.mdx @@ -7,7 +7,8 @@ title: چین انٹیگریشن کے عمل کا جائزہ ## مرحلہ 1. تکنیکی انٹیگریشن - ٹیمیں غیر ای وی ایم پر مبنی چینز کے لیے گراف نوڈ انٹیگریشن اور فائر ہوز پر کام کرتی ہیں۔ [یہ طریقہ ہے](/new-chain-integration/). -- ٹیمیں فورم تھریڈ بنا کر پروٹوکول انٹیگریشن کا عمل شروع کرتی ہیں [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71)(گورننس اور GIPs کے تحت نئے ڈیٹا ذرائع ذیلی زمرہ) ۔ پہلے سے طے شدہ فورم ٹیمپلیٹ کا استعمال لازمی ہے. +- ٹیمیں فورم تھریڈ بنا کر پروٹوکول انٹیگریشن کا عمل شروع کرتی ہیں [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71)(گورننس اور GIPs کے تحت نئے ڈیٹا ذرائع ذیلی زمرہ) + ۔ پہلے سے طے شدہ فورم ٹیمپلیٹ کا استعمال لازمی ہے. ## مرحلہ 2۔ انٹیگریشن کی توثیق From 4e918a294251450c6ef29bde4ccd0a68489fa6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:35 -0400 Subject: [PATCH 896/924] New translations quick-start.mdx (Czech) --- website/pages/cs/quick-start.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/cs/quick-start.mdx b/website/pages/cs/quick-start.mdx index 13af4b54b95d..f30837fd77ee 100644 --- a/website/pages/cs/quick-start.mdx +++ b/website/pages/cs/quick-start.mdx @@ -48,7 +48,7 @@ Při inicializaci podgrafu vás nástroj CLI požádá o následující informac - Ethereum síť (nepovinné): možná budete muset zadat, ze které sítě kompatibilní s EVM bude váš subgraf indexovat data. - Adresa zakázky: Vyhledejte adresu chytré smlouvy, ze které se chcete dotazovat na data. - ABI: Pokud se ABI nevyplňuje automaticky, je třeba jej zadat ručně jako soubor JSON. -- Počáteční blok: Doporučuje se zadat počáteční blok, abyste ušetřili čas, zatímco váš subgraf indexuje data blockchainu. Počáteční blok můžete vyhledat tak, že najdete blok, ve kterém byl váš kontrakt nasazen. +- Počáteční blok: Doporučuje se zadat počáteční blok, abyste ušetřili čas, zatímco váš subgraf indexuje data blockchainu. Počáteční blok můžete vyhledat tak, že najdete blok, ve kterém byl váš kontrakt nasazen. - Název smlouvy: zadejte název své smlouvy. - Indexovat události smlouvy jako entity: doporučujeme nastavit tuto hodnotu na true, protože se automaticky přidá mapování do vašeho subgrafu pro každou emitovanou událost - Přidat další smlouvu(nepovinné): můžete přidat další smlouvu From 997ef363a43f5dffc3936ba60973f516482e12ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:38 -0400 Subject: [PATCH 897/924] New translations quick-start.mdx (Polish) --- website/pages/pl/quick-start.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/pl/quick-start.mdx b/website/pages/pl/quick-start.mdx index da9324f4ad3d..96627e4a43e1 100644 --- a/website/pages/pl/quick-start.mdx +++ b/website/pages/pl/quick-start.mdx @@ -1,5 +1,5 @@ --- -title: ' Na start' +title: " Na start" --- This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. From 96c94454089963e343d741d02c8d66d461910da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:45 -0400 Subject: [PATCH 898/924] New translations sunrise.mdx (Japanese) --- website/pages/ja/sunrise.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/pages/ja/sunrise.mdx b/website/pages/ja/sunrise.mdx index 6eb05e59e427..da5776901775 100644 --- a/website/pages/ja/sunrise.mdx +++ b/website/pages/ja/sunrise.mdx @@ -12,7 +12,9 @@ Sunriseは、The Graphに取り組むEdge & Nodeが主導するイニシアチ ### Sunriseの各フェーズとは? -**Sunray**:ホスティングサービスチェーンのサポート、シームレスなアップグレードフローの提供、The Graph Networkでの無料プランの提供。 **Sunbeam**:サブグラフ開発者がサブグラフをThe Graph Networkにアップグレードするためのアップグレードウィンドウ。詳細は近日中に発表されます。 **Sunrise**:トラフィックがThe Graph Networkに移動すると、ホストされているサービスのエンドポイントが失効します。 +**Sunray**:ホスティングサービスチェーンのサポート、シームレスなアップグレードフローの提供、The Graph Networkでの無料プランの提供。 +**Sunbeam**:サブグラフ開発者がサブグラフをThe Graph Networkにアップグレードするためのアップグレードウィンドウ。詳細は近日中に発表されます。 +**Sunrise**:トラフィックがThe Graph Networkに移動すると、ホストされているサービスのエンドポイントが失効します。 ### インフラは自分で用意する必要がありますか? From d9dd95198d0932558ed983d814cfa6fe59cea416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:48 -0400 Subject: [PATCH 899/924] New translations sunrise.mdx (Turkish) --- website/pages/tr/sunrise.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/pages/tr/sunrise.mdx b/website/pages/tr/sunrise.mdx index b1df7292ebed..5c749abd441d 100644 --- a/website/pages/tr/sunrise.mdx +++ b/website/pages/tr/sunrise.mdx @@ -12,7 +12,9 @@ Bu plan, yeni yayınlanan subgraphlar üzerinde sorgular sunmak için bir yükse ### Merkeziyetsiz verinin doğuşunun aşamaları nelerdir? -**Sunray**: Barındırılan hizmet zincirleri için desteği etkinleştirin, sorunsuz bir yükseltme akışı sunun, Graph Network'te ücretsiz bir plan sunun. **Sunbeam**: Subgraph geliştiricilerinin subgraph'lerini Graph Network'e yükseltmeleri gereken yükseltme penceresi. Bunun başlangıcı ve süresi yakında açıklanacak. **Sunrise**: Barındırılan hizmet uç noktalarının süresi, trafik Graph Network'e taşındıkça sona erecektir. +**Sunray**: Barındırılan hizmet zincirleri için desteği etkinleştirin, sorunsuz bir yükseltme akışı sunun, Graph Network'te ücretsiz bir plan sunun. +**Sunbeam**: Subgraph geliştiricilerinin subgraph'lerini Graph Network'e yükseltmeleri gereken yükseltme penceresi. Bunun başlangıcı ve süresi yakında açıklanacak. +**Sunrise**: Barındırılan hizmet uç noktalarının süresi, trafik Graph Network'e taşındıkça sona erecektir. ### Kendi altyapımı çalıştırmam gerekiyor mu? From 0ecc13629dfffacbb1211b0961ae7ddf0fb48d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:39:49 -0400 Subject: [PATCH 900/924] New translations sunrise.mdx (Urdu (Pakistan)) --- website/pages/ur/sunrise.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/pages/ur/sunrise.mdx b/website/pages/ur/sunrise.mdx index 85be6e9eefd4..2e91006ecc52 100644 --- a/website/pages/ur/sunrise.mdx +++ b/website/pages/ur/sunrise.mdx @@ -12,7 +12,9 @@ title: ڈیسینٹرالائزڈ ڈیٹا کے سن رائز کے اکثر پو ### ڈیسینٹرالائزڈ ڈیٹا کے سن رائز ہونے کے مراحل کیا ہیں؟ -**سن رے**: ہوسٹڈ سروس چینز کے لیے سپورٹ کو فعال کریں، بغیر کسی رکاوٹ کے اپ گریڈ فلو کی پیشکش کریں، گراف نیٹ ورک پر مفت پلان پیش کریں۔ **سن بیم**: اپ گریڈ ونڈو جس میں سب گراف ڈویلپرز کو اپنے سب گرافس کو گراف نیٹ ورک میں اپ گریڈ کرنا ہوگا۔ اس کے آغاز اور طوالت کا جلد اعلان کیا جائے گا۔ **سن رائز**: ہوسٹڈ سروس اینڈ پوائنٹس کی میعاد ختم ہو جائے گی کیونکہ ٹریفک گراف نیٹ ورک پر منتقل ہو جائے گی. +**سن رے**: ہوسٹڈ سروس چینز کے لیے سپورٹ کو فعال کریں، بغیر کسی رکاوٹ کے اپ گریڈ فلو کی پیشکش کریں، گراف نیٹ ورک پر مفت پلان پیش کریں۔ +**سن بیم**: اپ گریڈ ونڈو جس میں سب گراف ڈویلپرز کو اپنے سب گرافس کو گراف نیٹ ورک میں اپ گریڈ کرنا ہوگا۔ اس کے آغاز اور طوالت کا جلد اعلان کیا جائے گا۔ +**سن رائز**: ہوسٹڈ سروس اینڈ پوائنٹس کی میعاد ختم ہو جائے گی کیونکہ ٹریفک گراف نیٹ ورک پر منتقل ہو جائے گی. ### کیا مجھے اپنا انفراسٹرکچر چلانے کی ضرورت ہے؟ From db7ff610c2559378cd6640244eb88a7b07c0eb21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:07 -0400 Subject: [PATCH 901/924] New translations api.mdx (Romanian) --- website/pages/ro/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/ro/developing/graph-ts/api.mdx b/website/pages/ro/developing/graph-ts/api.mdx index 9fc543d4ab6b..ab5e2b27b49e 100644 --- a/website/pages/ro/developing/graph-ts/api.mdx +++ b/website/pages/ro/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From 9976a38f6b3d150dbff8956c7e200973b38d1643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:08 -0400 Subject: [PATCH 902/924] New translations api.mdx (French) --- website/pages/fr/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/fr/developing/graph-ts/api.mdx b/website/pages/fr/developing/graph-ts/api.mdx index f7bf1a3715f1..b13a30605e61 100644 --- a/website/pages/fr/developing/graph-ts/api.mdx +++ b/website/pages/fr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Notes de version | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Notes de version | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Types intégrés @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Référence des conversions de types -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Métadonnées de la source de données From 389b3484e00090671185b05e4835e03855c4f107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:09 -0400 Subject: [PATCH 903/924] New translations api.mdx (Spanish) --- website/pages/es/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/es/developing/graph-ts/api.mdx b/website/pages/es/developing/graph-ts/api.mdx index 89e46d83e4d2..6ff9e20f8926 100644 --- a/website/pages/es/developing/graph-ts/api.mdx +++ b/website/pages/es/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Notas del lanzamiento | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Notas del lanzamiento | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Tipos Incorporados @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Referencias de Tipo de Conversiones -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadatos de la Fuente de Datos From 389e5211696282748ca29eeb02c0152c9db3b57d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:09 -0400 Subject: [PATCH 904/924] New translations api.mdx (Arabic) --- website/pages/ar/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/ar/developing/graph-ts/api.mdx b/website/pages/ar/developing/graph-ts/api.mdx index 06ad54feb70b..add87572e5df 100644 --- a/website/pages/ar/developing/graph-ts/api.mdx +++ b/website/pages/ar/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| الاصدار | ملاحظات الإصدار | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| الاصدار | ملاحظات الإصدار | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### الأنواع المضمنة (Built-in) @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### مرجع تحويلات الأنواع -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### البيانات الوصفية لمصدر البيانات From 0e53cf44974c4bdef7d0d7099f321ce8d93256bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:10 -0400 Subject: [PATCH 905/924] New translations api.mdx (Czech) --- website/pages/cs/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/cs/developing/graph-ts/api.mdx b/website/pages/cs/developing/graph-ts/api.mdx index 3f934597bd11..0d3e6b33310e 100644 --- a/website/pages/cs/developing/graph-ts/api.mdx +++ b/website/pages/cs/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ Knihovna `@graphprotocol/graph-ts` poskytuje následující API: `apiVersion` v manifestu podgrafu určuje verzi mapovacího API, kterou pro daný podgraf používá uzel Graf. -| Verze | Poznámky vydání | -| :-: | --- | -| 0.0.7 | Přidání tříd `TransactionReceipt` a `Log` do typů Ethereum\<0/Přidání pole `receipt` do objektu Ethereum událost | -| 0.0.6 | Přidáno pole `nonce` do objektu Ethereum Transaction
    Přidáno `baseFeePerGas` do objektu Ethereum bloku | +| Verze | Poznámky vydání | +| :---: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Přidání tříd `TransactionReceipt` a `Log` do typů Ethereum\<0/Přidání pole `receipt` do objektu Ethereum událost | +| 0.0.6 | Přidáno pole `nonce` do objektu Ethereum Transaction
    Přidáno `baseFeePerGas` do objektu Ethereum bloku | | 0.0.5 | AssemblyScript povýšen na verzi 0.19.10 (obsahuje rozbíjející změny, viz [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` přejmenováno na `ethereum.transaction.gasLimit` | -| 0.0.4 | Přidání pole `functionSignature` do objektu Ethereum SmartContractCall | -| 0.0.3 | Do objektu Ethereum Call přidáno pole `from`
    `etherem.call.address` přejmenováno na `ethereum.call.to` | -| 0.0.2 | Přidání pole `input` do objektu Ethereum Transackce | +| 0.0.4 | Přidání pole `functionSignature` do objektu Ethereum SmartContractCall | +| 0.0.3 | Do objektu Ethereum Call přidáno pole `from`
    `etherem.call.address` přejmenováno na `ethereum.call.to` | +| 0.0.2 | Přidání pole `input` do objektu Ethereum Transackce | ### Vestavěné typy @@ -143,7 +143,7 @@ _Math_ - `x.notEqual(y: BigInt): bool` –lze zapsat jako `x != y`. - `x.lt(y: BigInt): bool` – lze zapsat jako `x < y`. - `x.le(y: BigInt): bool` – lze zapsat jako `x <= y`. -- `x.gt(y: BigInt): bool` – lze zapsat jako `x > y`. +- `x.gt(y: BigInt): bool` – lze zapsat jako `x > y`. - `x.ge(y: BigInt): bool` – lze zapsat jako `x >= y`. - `x.neg(): BigInt` – lze zapsat jako `-x`. - `x.divDecimal(y: BigDecimal): BigDecimal` – dělí desetinným číslem, čímž získá desetinný výsledek. @@ -734,44 +734,44 @@ Pokud je typ hodnoty jistý, lze ji převést na [vestavěný typ](#built-in-typ ### Převody typů Reference -| Zdroj(e) | Destinace | Funkce převodu | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Zdroj(e) | Destinace | Funkce převodu | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From 1c0752135fd1bdd01b87eb796cc22f6db307eef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:11 -0400 Subject: [PATCH 906/924] New translations api.mdx (German) --- website/pages/de/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/de/developing/graph-ts/api.mdx b/website/pages/de/developing/graph-ts/api.mdx index bfc56dce2aa6..d1c8233ee2d2 100644 --- a/website/pages/de/developing/graph-ts/api.mdx +++ b/website/pages/de/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From 7d821d9fa302c7e76c06d966a5652cd4afeda85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:12 -0400 Subject: [PATCH 907/924] New translations api.mdx (Italian) --- website/pages/it/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/it/developing/graph-ts/api.mdx b/website/pages/it/developing/graph-ts/api.mdx index c685cbab4370..a8fc15bea20c 100644 --- a/website/pages/it/developing/graph-ts/api.mdx +++ b/website/pages/it/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ La libreria `@graphprotocol/graph-ts` fornisce le seguenti API: La `apiVersion` nel manifest del subgraph specifica la versione dell'API di mappatura che viene eseguita da the Graph Node per un dato subgraph. -| Versione | Note di rilascio | -| :-: | --- | -| 0.0.7 | Aggiunte le classi `TransactionReceipt` e `Log` ai tipi di Ethereum
    Aggiunto il campo `receipt` all'oggetto Ethereum Event | -| 0.0.6 | Aggiunto il campo `nonce` all'oggetto Ethereum Transaction
    Aggiunto `baseFeePerGas` all'oggetto Ethereum Block | -| 0.0.5 | AssemblyScript aggiornato alla versione 0.19.10 (questo include modifiche di rottura, consultare la [`Guida alla migrazione`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` rinominato in `ethereum.transaction.gasLimit` | -| 0.0.4 | Aggiunto il campo `functionSignature` all'oggetto Ethereum SmartContractCall | -| 0.0.3 | Aggiunto il campo `from` all'oggetto Ethereum Call
    `etherem.call.address` rinominato in `ethereum.call.to` | -| 0.0.2 | Aggiunto il campo `input` all'oggetto Ethereum Transaction | +| Versione | Note di rilascio | +| :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Aggiunte le classi `TransactionReceipt` e `Log` ai tipi di Ethereum
    Aggiunto il campo `receipt` all'oggetto Ethereum Event | +| 0.0.6 | Aggiunto il campo `nonce` all'oggetto Ethereum Transaction
    Aggiunto `baseFeePerGas` all'oggetto Ethereum Block | +| 0.0.5 | AssemblyScript aggiornato alla versione 0.19.10 (questo include modifiche di rottura, consultare la [`Guida alla migrazione`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` rinominato in `ethereum.transaction.gasLimit` | +| 0.0.4 | Aggiunto il campo `functionSignature` all'oggetto Ethereum SmartContractCall | +| 0.0.3 | Aggiunto il campo `from` all'oggetto Ethereum Call
    `etherem.call.address` rinominato in `ethereum.call.to` | +| 0.0.2 | Aggiunto il campo `input` all'oggetto Ethereum Transaction | ### Tipi integrati @@ -734,44 +734,44 @@ Quando il tipo di un valore è certo, può essere convertito in un [tipo incorpo ### Riferimento alle conversioni di tipo -| Fonte(i) | Destinazione | Funzione di conversione | -| -------------------- | -------------------- | --------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() o s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() o s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Fonte(i) | Destinazione | Funzione di conversione | +| --------------------------------------- | --------------------------------------- | ----------------------------------------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() o s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() o s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadati della Data Source From c75a180c00040fcd38e8bb8cd8996d1185deec81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:12 -0400 Subject: [PATCH 908/924] New translations api.mdx (Japanese) --- website/pages/ja/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/ja/developing/graph-ts/api.mdx b/website/pages/ja/developing/graph-ts/api.mdx index 4a702fedf0d4..e904e9bc7013 100644 --- a/website/pages/ja/developing/graph-ts/api.mdx +++ b/website/pages/ja/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ title: AssemblyScript API サブグラフマニフェストapiVersionは、特定のサブグラフのマッピングAPIバージョンを指定します。このバージョンは、Graph Nodeによって実行されます。 -| バージョン | リリースノート | -| :-: | --- | -| 0.0.7 | Ethereum タイプに `TransactionReceipt` と `Log` クラスを追加
    Ethereum Event オブジェクトに `receipt` フィールドを追加。 | -| 0.0.6 | Ethereum Transactionオブジェクトに`nonce`フィールドを追加
    Ethereum Blockオブジェクトに`baseFeePerGas`を追加。 | +| バージョン | リリースノート | +| :---: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Ethereum タイプに `TransactionReceipt` と `Log` クラスを追加
    Ethereum Event オブジェクトに `receipt` フィールドを追加。 | +| 0.0.6 | Ethereum Transactionオブジェクトに`nonce`フィールドを追加
    Ethereum Blockオブジェクトに`baseFeePerGas`を追加。 | | 0.0.5 | AssemblyScriptはバージョン0.19.10にアップグレードされました(このバージョンアップには変更点が含まれていますので Migration Guide) をご覧ください)。
    ethereum.transaction.gasUsedの名前がethereum.transaction.gasLimitに変更 | -| 0.0.4 | Ethereum SmartContractCall オブジェクトにfunctionSignatureフィールドを追加 | -| 0.0.3 | イーサリアムコールオブジェクトに`from`フィールドを追加
    `etherem.call.address`を`ethereum.call.to`に変更。 | -| 0.0.2 | Ethereum Transaction オブジェクトに inputフィールドを追加 | +| 0.0.4 | Ethereum SmartContractCall オブジェクトにfunctionSignatureフィールドを追加 | +| 0.0.3 | イーサリアムコールオブジェクトに`from`フィールドを追加
    `etherem.call.address`を`ethereum.call.to`に変更。 | +| 0.0.2 | Ethereum Transaction オブジェクトに inputフィールドを追加 | ### 組み込み型 @@ -277,7 +277,7 @@ graph-node v0.31.0、@graphprotocol/graph-ts v0.30.0、および @graphprotocol/ ストア API を使用すると、現在のブロックで作成または更新されたエンティティの取得が容易になります。この一般的な状況は、あるハンドラーがオンチェーン イベントからトランザクションを作成し、後のハンドラーがこのトランザクションが存在する場合にアクセスしようとすることです。トランザクションが存在しない場合、サブグラフはエンティティが存在しないことを確認するためだけにデータベースにアクセスする必要があります。エンティティが同じブロック内に作成されている必要があることをサブグラフの作成者がすでに知っている場合は、loadInBlock を使用すると、このデータベースのラウンドトリップが回避されます。一部のサブグラフでは、これらのルックアップの欠落がインデックス作成時間に大きく影響する可能性があります。 ```typescript -let id = event.transaction.hash // または ID が構築される方法 +let id =event.transaction.hash // または ID が構築される方法 let transfer = Transfer.loadInBlock(id) if (transfer == null) { transfer = 新しい転送(id) @@ -734,44 +734,44 @@ if (value.kind == JSONValueKind.BOOL) { ### タイプ 変換参照 -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | Bigint.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromString(s) | -| String | BigInt | BigDecimal.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | Bigint.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromString(s) | +| String | BigInt | BigDecimal.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### データソースのメタデータ From 2e6e68064818a99cbacd364e5c724bfc0cc502ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:13 -0400 Subject: [PATCH 909/924] New translations api.mdx (Korean) --- website/pages/ko/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/ko/developing/graph-ts/api.mdx b/website/pages/ko/developing/graph-ts/api.mdx index 9fc543d4ab6b..ab5e2b27b49e 100644 --- a/website/pages/ko/developing/graph-ts/api.mdx +++ b/website/pages/ko/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From 0209436322ba4048f440f5e4c7b5ea04c3199b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:14 -0400 Subject: [PATCH 910/924] New translations api.mdx (Dutch) --- website/pages/nl/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/nl/developing/graph-ts/api.mdx b/website/pages/nl/developing/graph-ts/api.mdx index 9fc543d4ab6b..ab5e2b27b49e 100644 --- a/website/pages/nl/developing/graph-ts/api.mdx +++ b/website/pages/nl/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From e9efd9a94d96f024cc850f9a70178903e186cafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:14 -0400 Subject: [PATCH 911/924] New translations api.mdx (Polish) --- website/pages/pl/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/pl/developing/graph-ts/api.mdx b/website/pages/pl/developing/graph-ts/api.mdx index 9fc543d4ab6b..ab5e2b27b49e 100644 --- a/website/pages/pl/developing/graph-ts/api.mdx +++ b/website/pages/pl/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From cf946212d3b642bf1f9f9e5795692692998d4069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:15 -0400 Subject: [PATCH 912/924] New translations api.mdx (Portuguese) --- website/pages/pt/developing/graph-ts/api.mdx | 95 ++++++++++---------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/website/pages/pt/developing/graph-ts/api.mdx b/website/pages/pt/developing/graph-ts/api.mdx index f38455660f1a..1803d56140f9 100644 --- a/website/pages/pt/developing/graph-ts/api.mdx +++ b/website/pages/pt/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ A biblioteca `@graphprotocol/graph-ts` fornece as seguintes APIs: No manifest do subgraph, `apiVersion` especifica a versão da API de mapeamento, executada pelo Graph Node para um subgraph. -| Versão | Notas de atualização | -| :-: | --- | -| 0.0.7 | Classes `TransactionReceipt` e `Log` adicionadas aos tipos do EthereumCampo
    Campo `receipt` adicionado ao objeto Ethereum Event | -| 0.0.6 | Campo `nonce` adicionado ao objeto Ethereum TransactionCampo
    `baseFeePerGas` adicionado ao objeto Ethereum Block | -| 0.0.5 | AssemblyScript atualizado à versão 0.19.10 (inclui mudanças recentes, favor ler o [`Guia de Migração`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renomeado para `ethereum.transaction.gasLimit` | -| 0.0.4 | Campo `functionSignature` adicionado ao objeto Ethereum SmartContractCall | -| 0.0.3 | Campo `from` adicionado ao objeto Ethereum
    `Calletherem.call.address` renomeado para `ethereum.call.to` | -| 0.0.2 | Campo `input` adicionado ao objeto Ethereum Transaction | +| Versão | Notas de atualização | +| :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 0.0.7 | Classes `TransactionReceipt` e `Log` adicionadas aos tipos do EthereumCampo
    Campo `receipt` adicionado ao objeto Ethereum Event | +| 0.0.6 | Campo `nonce` adicionado ao objeto Ethereum TransactionCampo
    `baseFeePerGas` adicionado ao objeto Ethereum Block | +| 0.0.5 | AssemblyScript atualizado à versão 0.19.10 (inclui mudanças recentes, favor ler o [`Guia de Migração`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renomeado para `ethereum.transaction.gasLimit` | +| 0.0.4 | Campo `functionSignature` adicionado ao objeto Ethereum SmartContractCall | +| 0.0.3 | Campo `from` adicionado ao objeto Ethereum
    `Calletherem.call.address` renomeado para `ethereum.call.to` | +| 0.0.2 | Campo `input` adicionado ao objeto Ethereum Transaction | ### Tipos Embutidos @@ -162,7 +162,8 @@ _Matemática_ import { TypedMap } from '@graphprotocol/graph-ts' ``` -O `TypedMap` pode servir para armazenar pares de chave e valor (key e value ). Confira [este exemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). +O `TypedMap` pode servir para armazenar pares de chave e valor (key e value +). Confira [este exemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). A classe `TypedMap` tem a seguinte API: @@ -734,44 +735,44 @@ Quando o tipo de um valor é confirmado, ele pode ser convertido num [tipo embut ### Referência de Conversões de Tipos -| Fonte(s) | Destino | Função de conversão | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | nenhum | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | nenhum | -| Bytes (assinado) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (não assinado) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | nenhum | -| int32 | i32 | nenhum | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | nenhum | -| int64 - int256 | BigInt | nenhum | -| uint32 - uint256 | BigInt | nenhum | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Fonte(s) | Destino | Função de conversão | +| ------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | nenhum | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | nenhum | +| Bytes (assinado) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (não assinado) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | nenhum | +| int32 | i32 | nenhum | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | nenhum | +| int64 - int256 | BigInt | nenhum | +| uint32 - uint256 | BigInt | nenhum | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadados de Fontes de Dados From 72e639bef2e53ca07919e7868e0ba7c27e8941e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:16 -0400 Subject: [PATCH 913/924] New translations api.mdx (Russian) --- website/pages/ru/developing/graph-ts/api.mdx | 102 ++++++++++--------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/website/pages/ru/developing/graph-ts/api.mdx b/website/pages/ru/developing/graph-ts/api.mdx index bcd8b829a24b..ee862b0468c2 100644 --- a/website/pages/ru/developing/graph-ts/api.mdx +++ b/website/pages/ru/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Версия | Примечания к релизу | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Версия | Примечания к релизу | +| :----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Встроенные типы @@ -229,7 +229,7 @@ Entities written to the store map one-to-one to the `@entity` types defined in t // Импорт класса событий Transfer, сгенерированного из ERC20 ABI import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' -// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL +// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL import { Transfer } from '../generated/schema' событие // Обработчик события передачи @@ -263,6 +263,7 @@ if (transfer == null) { transfer = new Transfer(id) } + // Используйте объект Transfer, как и раньше ``` @@ -283,6 +284,7 @@ if (transfer == null) { transfer = new Transfer(id) } + // Используйте объект Transfer, как и раньше ``` @@ -659,8 +661,8 @@ It is also possible to process larger files in a streaming fashion with `ipfs.ma import { JSONValue, Value } from '@graphprotocol/graph-ts' export function processItem(value: JSONValue, userData: Value): void { - // Смотрите документацию по JsonValue для получения подробной информации о работе - // со значениями JSON +// Смотрите документацию по JsonValue для получения подробной информации о работе +// со значениями JSON let obj = value.toObject() let id = obj.get('id') let title = obj.get('title') @@ -669,7 +671,7 @@ export function processItem(value: JSONValue, userData: Value): void { return } - // Обратные вызовы также могут создавать объекты +// Обратные вызовы также могут создавать объекты let newItem = new Item(id) newItem.title = title.toString() newitem.parent = userData.toString() // Установите для родителя значение "parentId" @@ -734,44 +736,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Справка по преобразованию типов -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ----------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() или s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() или s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() или s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() или s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Метаданные источника данных From e556b7b6ffeea8d78522449e0c5dd05861321250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:16 -0400 Subject: [PATCH 914/924] New translations api.mdx (Swedish) --- website/pages/sv/developing/graph-ts/api.mdx | 236 ++++++++++--------- 1 file changed, 123 insertions(+), 113 deletions(-) diff --git a/website/pages/sv/developing/graph-ts/api.mdx b/website/pages/sv/developing/graph-ts/api.mdx index 800841c7bc18..82b1600993e1 100644 --- a/website/pages/sv/developing/graph-ts/api.mdx +++ b/website/pages/sv/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Versionsanteckningar | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Versionsanteckningar | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Inbyggda typer @@ -159,7 +159,7 @@ _Math_ #### TypedMap ```typescript -import { TypedMap } from '@graphprotocol/graph-ts' +import { TypedMap } from "@graphprotocol/graph-ts"; ``` `TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). @@ -175,7 +175,7 @@ The `TypedMap` class has the following API: #### Bytes ```typescript -import { Bytes } from '@graphprotocol/graph-ts' +import { Bytes } from "@graphprotocol/graph-ts"; ``` `Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. @@ -201,7 +201,7 @@ _Operators_ #### Address ```typescript -import { Address } from '@graphprotocol/graph-ts' +import { Address } from "@graphprotocol/graph-ts"; ``` `Address` extends `Bytes` to represent Ethereum `address` values. @@ -214,7 +214,7 @@ It adds the following method on top of the `Bytes` API: ### Store API ```typescript -import { store } from '@graphprotocol/graph-ts' +import { store } from "@graphprotocol/graph-ts"; ``` The `store` API allows to load, save and remove entities from and to the Graph Node store. @@ -227,24 +227,24 @@ Följande är ett vanligt mönster för att skapa entiteter från Ethereum-händ ```typescript // Importera händelseklassen Transfer som genererats från ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' +import { Transfer as TransferEvent } from "../generated/ERC20/ERC20"; // Importera entitetstypen Transfer som genererats från GraphQL-schemat -import { Transfer } from '../generated/schema' +import { Transfer } from "../generated/schema"; // Händelsehanterare för överföring export function handleTransfer(event: TransferEvent): void { // Skapa en Transfer-entitet, med transaktionshash som enhets-ID - let id = event.transaction.hash - let transfer = new Transfer(id) + let id = event.transaction.hash; + let transfer = new Transfer(id); // Ange egenskaper för entiteten med hjälp av händelseparametrarna - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount + transfer.from = event.params.from; + transfer.to = event.params.to; + transfer.amount = event.params.amount; // Spara entiteten till lagret - transfer.save() + transfer.save(); } ``` @@ -257,10 +257,10 @@ Varje entitet måste ha en unik ID för att undvika kollisioner med andra entite Om en entitet redan finns kan den laddas från lagret med följande: ```typescript -let id = event.transaction.hash // eller hur ID konstrueras -let transfer = Transfer.load(id) +let id = event.transaction.hash; // eller hur ID konstrueras +let transfer = Transfer.load(id); if (transfer == null) { - transfer = new Transfer(id) + transfer = new Transfer(id); } // Använd överföringsenheten som tidigare @@ -277,10 +277,10 @@ As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotoco API:et för lagret underlättar hämtningen av entiteter som skapades eller uppdaterades i det aktuella blocket. En vanlig situation för detta är att en hanterare skapar en transaktion från någon händelse på kedjan, och en senare hanterare vill komma åt denna transaktion om den finns. I det fall då transaktionen inte finns, måste subgraphen gå till databasen bara för att ta reda på att entiteten inte finns; om subgraphförfattaren redan vet att entiteten måste ha skapats i samma block, undviker man detta databasbesök genom att använda loadInBlock. För vissa subgrapher kan dessa missade sökningar bidra avsevärt till indexeringstiden. ```typescript -let id = event.transaction.hash // eller hur ID konstrueras -let transfer = Transfer.loadInBlock(id) +let id = event.transaction.hash; // eller hur ID konstrueras +let transfer = Transfer.loadInBlock(id); if (transfer == null) { - transfer = new Transfer(id) + transfer = new Transfer(id); } // Använd överföringsenheten som tidigare @@ -334,7 +334,7 @@ transfer.amount = ... Det är också möjligt att avaktivera egenskaper med en av följande två instruktioner: ```typescript -transfer.from.unset() +transfer.from.unset(); transfer.from = null ``` @@ -344,14 +344,14 @@ Updating array properties is a little more involved, as the getting an array fro ```typescript // Detta kommer inte att fungera -entity.numbers.push(BigInt.fromI32(1)) -entity.save() +entity.numbers.push(BigInt.fromI32(1)); +entity.save(); // Detta kommer att fungera -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() +let numbers = entity.numbers; +numbers.push(BigInt.fromI32(1)); +entity.numbers = numbers; +entity.save(); ``` #### Ta bort entiteter från lagret @@ -389,12 +389,12 @@ type Transfer @entity { and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: ```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() +let id = event.transaction.hash; +let transfer = new Transfer(id); +transfer.from = event.params.from; +transfer.to = event.params.to; +transfer.amount = event.params.amount; +transfer.save(); ``` #### Händelser och Block/Transaktionsdata @@ -480,16 +480,19 @@ En vanlig mönster är att komma åt kontraktet från vilket en händelse härst ```typescript // Importera den genererade kontraktsklassen och den genererade klassen för överföringshändelser -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' +import { + ERC20Contract, + Transfer as TransferEvent, +} from "../generated/ERC20Contract/ERC20Contract"; // Importera den genererade entitetsklassen -import { Transfer } from '../generated/schema' +import { Transfer } from "../generated/schema"; export function handleTransfer(event: TransferEvent) { // Bind kontraktet till den adress som skickade händelsen - let contract = ERC20Contract.bind(event.address) + let contract = ERC20Contract.bind(event.address); // Åtkomst till tillståndsvariabler och funktioner genom att anropa dem - let erc20Symbol = contract.symbol() + let erc20Symbol = contract.symbol(); } ``` @@ -504,12 +507,12 @@ Andra kontrakt som är en del av subgraphen kan importeras från den genererade If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: ```typescript -let gravitera = gravitera.bind(event.address) -let callResult = gravitera_gravatarToOwner(gravatar) +let gravitera = gravitera.bind(event.address); +let callResult = gravitera_gravatarToOwner(gravatar); if (callResult.reverted) { - log.info('getGravatar reverted', []) + log.info("getGravatar reverted", []); } else { - let owner = callResult.value + let owner = callResult.value; } ``` @@ -543,7 +546,7 @@ För ytterligare information: ### API för loggning ```typescript -import { log } from '@graphprotocol/graph-ts' +import { log } from "@graphprotocol/graph-ts"; ``` The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. @@ -559,7 +562,11 @@ The `log` API includes the following functions: The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. ```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) +log.info("Message to be displayed: {}, {}, {}", [ + value.toString(), + anotherValue.toString(), + "already a string", +]); ``` #### Loggning av ett eller flera värden @@ -582,11 +589,11 @@ export function handleSomeEvent(event: SomeEvent): void { I exemplet nedan loggas endast det första värdet i argument arrayen, trots att arrayen innehåller tre värden. ```typescript -let myArray = ['A', 'B', 'C'] +let myArray = ["A", "B", "C"]; export function handleSomeEvent(event: SomeEvent): void { // Visar : "Mitt värde är: A" (Även om tre värden skickas till `log.info`) - log.info('Mitt värde är: {}', myArray) + log.info("Mitt värde är: {}", myArray); } ``` @@ -595,11 +602,14 @@ export function handleSomeEvent(event: SomeEvent): void { Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. ```typescript -let myArray = ['A', 'B', 'C'] +let myArray = ["A", "B", "C"]; export function handleSomeEvent(event: SomeEvent): void { // Visar: "Mitt första värde är: A, andra värdet är: B, tredje värdet är: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) + log.info( + "My first value is: {}, second value is: {}, third value is: {}", + myArray + ); } ``` @@ -610,7 +620,7 @@ För att visa ett specifikt värde i arrayen måste det indexeras och tillhandah ```typescript export function handleSomeEvent(event: SomeEvent): void { // Visar : "Mitt tredje värde är C" - log.info('My third value is: {}', [myArray[2]]) + log.info("My third value is: {}", [myArray[2]]); } ``` @@ -619,21 +629,21 @@ export function handleSomeEvent(event: SomeEvent): void { I exemplet nedan loggas blocknummer, blockhash och transaktionshash från en händelse: ```typescript -import { log } from '@graphprotocol/graph-ts' +import { log } from "@graphprotocol/graph-ts"; export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ + log.debug("Block number: {}, block hash: {}, transaction hash: {}", [ event.block.number.toString(), // "47596000" event.block.hash.toHexString(), // "0x..." event.transaction.hash.toHexString(), // "0x..." - ]) + ]); } ``` ### IPFS API ```typescript -import { ipfs } from '@graphprotocol/graph-ts' +import { ipfs } from "@graphprotocol/graph-ts" ``` Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. @@ -642,13 +652,13 @@ För att läsa en fil från IPFS med en given IPFS-hash eller sökväg görs fö ```typescript // Placera detta i en händelsehanterare i mappningen -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) +let hash = "QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D"; +let data = ipfs.cat(hash); // Sökvägar som `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` // som inkluderar filer i kataloger stöds också -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) +let path = "QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile"; +let data = ipfs.cat(path); ``` **Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. @@ -656,31 +666,31 @@ let data = ipfs.cat(path) It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: ```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' +import { JSONValue, Value } from "@graphprotocol/graph-ts"; export function processItem(value: JSONValue, userData: Value): void { // Se JSONValue-dokumentationen för mer information om hur man hanterar // med JSON-värden - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') + let obj = value.toObject(); + let id = obj.get("id"); + let title = obj.get("title"); if (!id || !title) { - return + return; } // Callbacks kan också skapa enheter - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Ange parent till "parentId" - newitem.save() + let newItem = new Item(id); + newItem.title = title.toString(); + newitem.parent = userData.toString(); // Ange parent till "parentId" + newitem.save(); } // Placera detta i en händelsehanterare i mappningen -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) +ipfs.map("Qm...", "processItem", Value.fromString("parentId"), ["json"]); // Alternativt kan du använda `ipfs.mapJSON`. -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) +ipfs.mapJSON("Qm...", "processItem", Value.fromString("parentId")); ``` The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. @@ -690,7 +700,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes ### Crypto API ```typescript -import { crypto } from '@graphprotocol/graph-ts' +import { crypto } from "@graphprotocol/graph-ts"; ``` The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: @@ -700,7 +710,7 @@ The `crypto` API makes a cryptographic functions available for use in mappings. ### JSON API ```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' +import { json, JSONValueKind } from "@graphprotocol/graph-ts" ``` JSON data can be parsed using the `json` API: @@ -734,44 +744,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Typkonverteringsreferens -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ------------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| Sträng (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | --------------------------------------------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| Sträng (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadata för datakälla From 667a013f3655f3ec44cc94dc034a2665ba7436af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:17 -0400 Subject: [PATCH 915/924] New translations api.mdx (Turkish) --- website/pages/tr/developing/graph-ts/api.mdx | 96 ++++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/website/pages/tr/developing/graph-ts/api.mdx b/website/pages/tr/developing/graph-ts/api.mdx index a96922aadada..57910776ed3d 100644 --- a/website/pages/tr/developing/graph-ts/api.mdx +++ b/website/pages/tr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ Bu sayfa subgraph eşleştirmelerini yazarken bullanılabilen yerleşik API'leri Subgraph bildirimindeki `apiVersion`, belirli bir subgraph için Graph Node'u tarafından çalıştırılan eşleme API sürümünü belirtir. -| Sürüm | Sürüm Notları | -| :-: | --- | -| 0.0.7 | Ethereum Event nesnesindeki Ethereum types
    Added `receipt` alanına `TransactionReceipt` ve `Log` sınıfları eklendi | -| 0.0.6 | Ethereum İşlemine `nonce` alanı eklendi. object
    Added `baseFeePerGas` Ethereum Block nesnesine eklendi | +| Sürüm | Sürüm Notları | +| :---: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Ethereum Event nesnesindeki Ethereum types
    Added `receipt` alanına `TransactionReceipt` ve `Log` sınıfları eklendi | +| 0.0.6 | Ethereum İşlemine `nonce` alanı eklendi. object
    Added `baseFeePerGas` Ethereum Block nesnesine eklendi | | 0.0.5 | AssemblyScript 0.19.10 sürümüne yükseltildi (buna son değişiklikler dahildir, lütfen [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed`'in `ethereum.transaction.gasLimit` olarak yeniden adlandırılmasına bakın | -| 0.0.4 | Ethereum SmartContractCall nesnesine `functionSignature` alanı eklendi | -| 0.0.3 | `ethereum.call.to` olarak yeniden adlandırılan object
    `etherem.call.address` Ethereum Çağrısına `from` alanı eklendi | -| 0.0.2 | Ethereum İşlem nesnesine `input` alanı eklendi | +| 0.0.4 | Ethereum SmartContractCall nesnesine `functionSignature` alanı eklendi | +| 0.0.3 | `ethereum.call.to` olarak yeniden adlandırılan object
    `etherem.call.address` Ethereum Çağrısına `from` alanı eklendi | +| 0.0.2 | Ethereum İşlem nesnesine `input` alanı eklendi | ### Dahili Türler @@ -237,15 +237,15 @@ export function handleTransfer(event: TransferEvent): void { // İşlem hash'ını olay kimliği olarak kullanarak bir Transfer varlığı oluşturun let id = event.transaction.hash let transfer = new Transfer(id) - + // Olay parametrelerini kullanarak varlığın özelliklerini ayarlayın transfer.from = event.params.from transfer.to = event.params.to transfer.amount = event.params.amount - + // Varlığı depoya kaydedin transfer.save() -} + } ``` Zincir işlenirken bir `Transfer` olayıyla karşılaşıldığında, oluşturulan `Transfer` türü (varlık türüyle adlandırma çakışmasını önlemek için burada `TransferEvent` olarak adlandırılmıştır) kullanılarak `handleTransfer` olay işleyicisine aktarılır. Bu tür, olayın ana işlemi ve parametreleri gibi verilere erişilmesini sağlar. @@ -735,44 +735,44 @@ Bir değerin türü belli olduğunda, aşağıdaki yöntemlerden biri kullanıla ### Tip Dönüşümleri Referansı -| Kaynak(lar) | Hedef | Dönüştürme işlevi | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Kaynak(lar) | Hedef | Dönüştürme işlevi | +| ----------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Veri Kaynağı Meta Verileri From d997c86965cae269b42c309bc0615aab203190f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:18 -0400 Subject: [PATCH 916/924] New translations api.mdx (Ukrainian) --- website/pages/uk/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/uk/developing/graph-ts/api.mdx b/website/pages/uk/developing/graph-ts/api.mdx index 9fc543d4ab6b..ab5e2b27b49e 100644 --- a/website/pages/uk/developing/graph-ts/api.mdx +++ b/website/pages/uk/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From 85c25913c6e67a8114fa99700fe13b2415d36039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:18 -0400 Subject: [PATCH 917/924] New translations api.mdx (Chinese Simplified) --- website/pages/zh/developing/graph-ts/api.mdx | 90 ++++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/website/pages/zh/developing/graph-ts/api.mdx b/website/pages/zh/developing/graph-ts/api.mdx index c492fc65d087..8acdaea60b1d 100644 --- a/website/pages/zh/developing/graph-ts/api.mdx +++ b/website/pages/zh/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ title: AssemblyScript API 子图清单中的 `apiVersion` 指定了由 Graph Node 运行的特定子图的映射 API 版本。 -| 版本 | Release 说明 | -| :-: | --- | -| 0.0.7 | 添加了 `TransactionReceipt` 和 `Log` 类到以太坊类型。
    已将 `receipt` 字段添加到Ethereum Event对象。 | -| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加
    baseFeePerGas字段 | +| 版本 | Release 说明 | +| :---: | ------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | 添加了 `TransactionReceipt` 和 `Log` 类到以太坊类型。
    已将 `receipt` 字段添加到Ethereum Event对象。 | +| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加
    baseFeePerGas字段 | | 0.0.5 | AssemblyScript 升级到版本 0.19.10(这包括重大更改,参阅
    迁移指南)ethereum.transaction.gasUsed 重命名为 ethereum.transaction.gasLimit | -| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 | -| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。
    `etherem.call.address` 被重命名为 `ethereum.call.to`。 | -| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 | +| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 | +| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。
    `etherem.call.address` 被重命名为 `ethereum.call.to`。 | +| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 | ### 内置类型 @@ -733,44 +733,44 @@ if (value.kind == JSONValueKind.BOOL) { ### 类型转换参考 -| 源类型 | 目标类型 | 转换函数 | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() 或 s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toU64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| 源类型 | 目标类型 | 转换函数 | +| --------------------------------------- | --------------------------------------- | ----------------------------------------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() 或 s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toU64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### 数据源元数据 From 929857b15617405870fa1370de2e96ccb2cac5b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:19 -0400 Subject: [PATCH 918/924] New translations api.mdx (Urdu (Pakistan)) --- website/pages/ur/developing/graph-ts/api.mdx | 90 ++++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/website/pages/ur/developing/graph-ts/api.mdx b/website/pages/ur/developing/graph-ts/api.mdx index 9a1ddc26b5dd..b03a3dea1dda 100644 --- a/website/pages/ur/developing/graph-ts/api.mdx +++ b/website/pages/ur/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| ورزن | جاری کردہ نوٹس | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| ورزن | جاری کردہ نوٹس | +| :---: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | | 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### بلٹ ان اقسام @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### تبادلوں کا حوالہ ٹائپ کریں -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### ڈیٹا ماخذ میٹا ڈیٹا From 3b41f15589d252907b2524ac18c8c41402e4986c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:20 -0400 Subject: [PATCH 919/924] New translations api.mdx (Vietnamese) --- website/pages/vi/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/vi/developing/graph-ts/api.mdx b/website/pages/vi/developing/graph-ts/api.mdx index 1469f236a9a2..85610543f920 100644 --- a/website/pages/vi/developing/graph-ts/api.mdx +++ b/website/pages/vi/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Phiên bản | Ghi chú phát hành | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Phiên bản | Ghi chú phát hành | +| :-------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Các loại cài sẵn @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Tham chiếu Chuyển đổi Loại -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Siêu Dữ liệu Nguồn Dữ liệu From c7b26c24e49145f54a9dc886ff8dbe8106c4e9ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:20 -0400 Subject: [PATCH 920/924] New translations api.mdx (Marathi) --- website/pages/mr/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/mr/developing/graph-ts/api.mdx b/website/pages/mr/developing/graph-ts/api.mdx index 16f403727d60..c3aacbae1b40 100644 --- a/website/pages/mr/developing/graph-ts/api.mdx +++ b/website/pages/mr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| आवृत्ती | रिलीझ नोट्स | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| आवृत्ती | रिलीझ नोट्स | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### अंगभूत प्रकार @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### प्रकार रूपांतरण संदर्भ -| Source(s) | Destination | Conversion function | -| ----------------------- | ----------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| स्ट्रिंग (हेक्साडेसिमल) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| स्ट्रिंग (हेक्साडेसिमल) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### डेटा स्रोत मेटाडेटा From fa8eacf7530a3ebfce50b553502e41d81dbecc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:21 -0400 Subject: [PATCH 921/924] New translations api.mdx (Hindi) --- website/pages/hi/developing/graph-ts/api.mdx | 98 ++++++++++---------- 1 file changed, 47 insertions(+), 51 deletions(-) diff --git a/website/pages/hi/developing/graph-ts/api.mdx b/website/pages/hi/developing/graph-ts/api.mdx index 89ee43d6d0bb..3bf086fc0ce9 100644 --- a/website/pages/hi/developing/graph-ts/api.mdx +++ b/website/pages/hi/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| संस्करण | रिलीज नोट्स | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| संस्करण | रिलीज नोट्स | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### अंतर्निहित प्रकार @@ -559,11 +559,7 @@ The `log` API includes the following functions: The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. ```typescript -log.info('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [ - value.toString(), - OtherValue.toString(), - 'पहले से ही एक स्ट्रिंग', -]) +log.info ('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [value.toString (), OtherValue.toString (), 'पहले से ही एक स्ट्रिंग']) ``` #### एक या अधिक मान लॉग करना @@ -738,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### प्रकार रूपांतरण संदर्भ -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() या s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() या s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() या s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() या s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### डेटा स्रोत मेटाडेटा From c334da6effed2bf6441522b359d031b818857add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Fri, 12 Apr 2024 17:40:22 -0400 Subject: [PATCH 922/924] New translations api.mdx (Yoruba) --- website/pages/yo/developing/graph-ts/api.mdx | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/website/pages/yo/developing/graph-ts/api.mdx b/website/pages/yo/developing/graph-ts/api.mdx index 9fc543d4ab6b..ab5e2b27b49e 100644 --- a/website/pages/yo/developing/graph-ts/api.mdx +++ b/website/pages/yo/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata From f05bd0e5d58ee3c410a1b8dd3439fe21b66d880d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Rouleau?= Date: Fri, 12 Apr 2024 18:02:49 -0400 Subject: [PATCH 923/924] Run pnpm check:fix + some manual fixes (again) --- website/pages/ar/billing.mdx | 2 +- website/pages/ar/cookbook/near.mdx | 8 +- .../ar/cookbook/subgraph-debug-forking.mdx | 8 +- .../ar/developing/creating-a-subgraph.mdx | 22 +- website/pages/ar/developing/graph-ts/api.mdx | 92 +++---- .../ar/developing/unit-testing-framework.mdx | 10 +- website/pages/ar/network/benefits.mdx | 70 +++--- website/pages/ar/network/delegating.mdx | 4 +- website/pages/ar/network/indexing.mdx | 34 +-- website/pages/ar/new-chain-integration.mdx | 2 +- website/pages/ar/operating-graph-node.mdx | 14 +- website/pages/ar/querying/graphql-api.mdx | 14 +- .../ar/querying/querying-best-practices.mdx | 16 +- .../assemblyscript-migration-guide.mdx | 5 + .../cs/cookbook/subgraph-debug-forking.mdx | 2 +- .../cs/developing/creating-a-subgraph.mdx | 22 +- website/pages/cs/developing/graph-ts/api.mdx | 92 +++---- .../cs/developing/unit-testing-framework.mdx | 10 +- website/pages/cs/network/benefits.mdx | 70 +++--- website/pages/cs/network/delegating.mdx | 4 +- website/pages/cs/network/indexing.mdx | 32 +-- website/pages/cs/operating-graph-node.mdx | 14 +- website/pages/cs/querying/graphql-api.mdx | 14 +- website/pages/cs/quick-start.mdx | 2 +- .../assemblyscript-migration-guide.mdx | 5 + .../de/arbitrum/l2-transfer-tools-faq.mdx | 2 +- .../de/developing/creating-a-subgraph.mdx | 22 +- website/pages/de/developing/graph-ts/api.mdx | 92 +++---- .../de/developing/unit-testing-framework.mdx | 10 +- website/pages/de/network/benefits.mdx | 70 +++--- website/pages/de/network/indexing.mdx | 32 +-- website/pages/de/operating-graph-node.mdx | 14 +- website/pages/de/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/es/cookbook/cosmos.mdx | 2 +- .../es/cookbook/subgraph-debug-forking.mdx | 2 +- .../deploying-a-subgraph-to-hosted.mdx | 2 +- .../es/developing/creating-a-subgraph.mdx | 30 +-- website/pages/es/developing/graph-ts/api.mdx | 92 +++---- .../es/developing/unit-testing-framework.mdx | 10 +- website/pages/es/network/benefits.mdx | 73 +++--- website/pages/es/network/indexing.mdx | 32 +-- website/pages/es/new-chain-integration.mdx | 3 +- website/pages/es/operating-graph-node.mdx | 14 +- website/pages/es/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../graphql-validations-migration-guide.mdx | 1 - .../fr/arbitrum/l2-transfer-tools-faq.mdx | 6 +- website/pages/fr/cookbook/cosmos.mdx | 44 ++-- website/pages/fr/cookbook/near.mdx | 50 ++-- .../fr/cookbook/upgrading-a-subgraph.mdx | 2 +- .../deploying-a-subgraph-to-hosted.mdx | 4 +- .../fr/developing/creating-a-subgraph.mdx | 46 ++-- website/pages/fr/developing/graph-ts/api.mdx | 92 +++---- .../fr/developing/unit-testing-framework.mdx | 12 +- website/pages/fr/network/benefits.mdx | 73 +++--- website/pages/fr/network/delegating.mdx | 6 +- website/pages/fr/network/indexing.mdx | 32 +-- website/pages/fr/operating-graph-node.mdx | 14 +- website/pages/fr/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 15 +- .../graphql-validations-migration-guide.mdx | 6 +- .../hi/cookbook/subgraph-debug-forking.mdx | 4 +- .../deploying-a-subgraph-to-hosted.mdx | 6 +- .../hi/developing/creating-a-subgraph.mdx | 22 +- website/pages/hi/developing/graph-ts/api.mdx | 98 ++++---- .../hi/developing/unit-testing-framework.mdx | 14 +- website/pages/hi/network/benefits.mdx | 70 +++--- website/pages/hi/network/delegating.mdx | 8 +- website/pages/hi/network/indexing.mdx | 38 +-- website/pages/hi/operating-graph-node.mdx | 14 +- website/pages/hi/querying/graphql-api.mdx | 16 +- .../assemblyscript-migration-guide.mdx | 5 + .../deploying-a-subgraph-to-hosted.mdx | 4 +- .../it/developing/creating-a-subgraph.mdx | 22 +- website/pages/it/developing/graph-ts/api.mdx | 92 +++---- .../it/developing/unit-testing-framework.mdx | 10 +- website/pages/it/network/benefits.mdx | 73 +++--- website/pages/it/network/delegating.mdx | 8 +- website/pages/it/network/indexing.mdx | 34 +-- website/pages/it/operating-graph-node.mdx | 14 +- website/pages/it/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../ja/cookbook/subgraph-debug-forking.mdx | 12 +- .../ja/developing/creating-a-subgraph.mdx | 72 +++--- website/pages/ja/developing/graph-ts/api.mdx | 92 +++---- .../ja/developing/unit-testing-framework.mdx | 10 +- website/pages/ja/glossary.mdx | 4 +- website/pages/ja/network/benefits.mdx | 70 +++--- website/pages/ja/network/indexing.mdx | 38 +-- website/pages/ja/operating-graph-node.mdx | 16 +- website/pages/ja/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/ja/sunrise.mdx | 4 +- .../ko/arbitrum/l2-transfer-tools-faq.mdx | 5 +- .../ko/developing/creating-a-subgraph.mdx | 22 +- website/pages/ko/developing/graph-ts/api.mdx | 92 +++---- .../ko/developing/unit-testing-framework.mdx | 10 +- website/pages/ko/network/benefits.mdx | 70 +++--- website/pages/ko/network/indexing.mdx | 34 +-- website/pages/ko/operating-graph-node.mdx | 14 +- website/pages/ko/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../mr/cookbook/subgraph-debug-forking.mdx | 4 +- .../deploying-a-subgraph-to-hosted.mdx | 2 +- .../mr/developing/creating-a-subgraph.mdx | 22 +- website/pages/mr/developing/graph-ts/api.mdx | 92 +++---- .../mr/developing/unit-testing-framework.mdx | 10 +- website/pages/mr/network/benefits.mdx | 70 +++--- website/pages/mr/network/delegating.mdx | 6 +- website/pages/mr/network/indexing.mdx | 36 +-- website/pages/mr/operating-graph-node.mdx | 14 +- website/pages/mr/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/nl/arbitrum/arbitrum-faq.mdx | 3 +- .../nl/developing/creating-a-subgraph.mdx | 22 +- website/pages/nl/developing/graph-ts/api.mdx | 92 +++---- .../nl/developing/unit-testing-framework.mdx | 10 +- website/pages/nl/network/benefits.mdx | 75 +++--- website/pages/nl/network/delegating.mdx | 6 +- website/pages/nl/network/indexing.mdx | 34 +-- website/pages/nl/operating-graph-node.mdx | 14 +- website/pages/nl/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../pl/developing/creating-a-subgraph.mdx | 22 +- website/pages/pl/developing/graph-ts/api.mdx | 92 +++---- .../pl/developing/unit-testing-framework.mdx | 10 +- website/pages/pl/network/benefits.mdx | 70 +++--- website/pages/pl/network/indexing.mdx | 34 +-- website/pages/pl/operating-graph-node.mdx | 14 +- website/pages/pl/querying/graphql-api.mdx | 14 +- website/pages/pl/quick-start.mdx | 2 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/pt/cookbook/arweave.mdx | 10 +- .../pt/developing/creating-a-subgraph.mdx | 22 +- website/pages/pt/developing/graph-ts/api.mdx | 95 ++++--- .../pt/developing/unit-testing-framework.mdx | 10 +- website/pages/pt/network/benefits.mdx | 70 +++--- website/pages/pt/network/delegating.mdx | 6 +- website/pages/pt/network/indexing.mdx | 36 +-- website/pages/pt/operating-graph-node.mdx | 14 +- website/pages/pt/querying/graphql-api.mdx | 14 +- .../querying/querying-from-an-application.mdx | 2 +- .../assemblyscript-migration-guide.mdx | 5 + .../graphql-validations-migration-guide.mdx | 13 +- .../ro/developing/creating-a-subgraph.mdx | 22 +- website/pages/ro/developing/graph-ts/api.mdx | 92 +++---- .../ro/developing/unit-testing-framework.mdx | 10 +- website/pages/ro/network/benefits.mdx | 70 +++--- website/pages/ro/network/indexing.mdx | 34 +-- website/pages/ro/operating-graph-node.mdx | 14 +- website/pages/ro/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../ru/developing/creating-a-subgraph.mdx | 32 +-- website/pages/ru/developing/graph-ts/api.mdx | 102 ++++---- .../ru/developing/unit-testing-framework.mdx | 12 +- website/pages/ru/network/benefits.mdx | 73 +++--- website/pages/ru/network/delegating.mdx | 4 +- website/pages/ru/network/indexing.mdx | 38 +-- website/pages/ru/operating-graph-node.mdx | 14 +- website/pages/ru/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 159 +----------- .../graphql-validations-migration-guide.mdx | 10 +- .../sv/cookbook/subgraph-debug-forking.mdx | 2 +- .../deploying-a-subgraph-to-hosted.mdx | 4 +- .../sv/developing/creating-a-subgraph.mdx | 137 +++++----- .../pages/sv/developing/developer-faqs.mdx | 2 +- website/pages/sv/developing/graph-ts/api.mdx | 236 +++++++++--------- .../sv/developing/unit-testing-framework.mdx | 12 +- website/pages/sv/network/benefits.mdx | 70 +++--- website/pages/sv/network/delegating.mdx | 9 +- website/pages/sv/network/indexing.mdx | 32 +-- website/pages/sv/operating-graph-node.mdx | 14 +- .../pages/sv/querying/distributed-systems.mdx | 24 +- website/pages/sv/querying/graphql-api.mdx | 14 +- .../sv/querying/querying-best-practices.mdx | 26 +- .../querying/querying-from-an-application.mdx | 30 +-- .../assemblyscript-migration-guide.mdx | 127 +++++----- .../tr/developing/creating-a-subgraph.mdx | 22 +- website/pages/tr/developing/graph-ts/api.mdx | 96 +++---- .../tr/developing/unit-testing-framework.mdx | 10 +- website/pages/tr/network/benefits.mdx | 70 +++--- website/pages/tr/network/delegating.mdx | 6 +- website/pages/tr/network/indexing.mdx | 34 +-- website/pages/tr/operating-graph-node.mdx | 14 +- .../tr/publishing/publishing-a-subgraph.mdx | 2 +- website/pages/tr/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/tr/sunrise.mdx | 4 +- .../uk/developing/creating-a-subgraph.mdx | 22 +- website/pages/uk/developing/graph-ts/api.mdx | 92 +++---- .../uk/developing/unit-testing-framework.mdx | 10 +- website/pages/uk/network/benefits.mdx | 73 +++--- website/pages/uk/network/delegating.mdx | 6 +- website/pages/uk/network/indexing.mdx | 38 +-- website/pages/uk/operating-graph-node.mdx | 14 +- website/pages/uk/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../pages/ur/chain-integration-overview.mdx | 3 +- website/pages/ur/cookbook/cosmos.mdx | 2 +- website/pages/ur/cookbook/near.mdx | 4 +- .../ur/cookbook/subgraph-debug-forking.mdx | 2 +- .../deploying-a-subgraph-to-hosted.mdx | 10 +- .../ur/developing/creating-a-subgraph.mdx | 24 +- website/pages/ur/developing/graph-ts/api.mdx | 90 +++---- .../substreams-powered-subgraphs-faq.mdx | 3 +- .../ur/developing/unit-testing-framework.mdx | 10 +- website/pages/ur/network/benefits.mdx | 77 +++--- website/pages/ur/network/delegating.mdx | 7 +- website/pages/ur/network/indexing.mdx | 34 +-- website/pages/ur/new-chain-integration.mdx | 2 +- website/pages/ur/operating-graph-node.mdx | 14 +- website/pages/ur/querying/graphql-api.mdx | 16 +- .../ur/querying/querying-best-practices.mdx | 6 +- .../assemblyscript-migration-guide.mdx | 5 + .../graphql-validations-migration-guide.mdx | 3 +- website/pages/ur/sunrise.mdx | 4 +- .../vi/developing/creating-a-subgraph.mdx | 22 +- website/pages/vi/developing/graph-ts/api.mdx | 92 +++---- .../vi/developing/unit-testing-framework.mdx | 10 +- website/pages/vi/network/benefits.mdx | 70 +++--- website/pages/vi/network/indexing.mdx | 34 +-- website/pages/vi/operating-graph-node.mdx | 14 +- website/pages/vi/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/pages/yo/arbitrum/arbitrum-faq.mdx | 3 +- .../yo/developing/creating-a-subgraph.mdx | 22 +- website/pages/yo/developing/graph-ts/api.mdx | 92 +++---- .../yo/developing/unit-testing-framework.mdx | 10 +- website/pages/yo/network/benefits.mdx | 70 +++--- website/pages/yo/network/indexing.mdx | 34 +-- website/pages/yo/operating-graph-node.mdx | 14 +- website/pages/yo/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + .../zh/cookbook/subgraph-debug-forking.mdx | 6 +- .../deploying-a-subgraph-to-hosted.mdx | 4 +- .../zh/developing/creating-a-subgraph.mdx | 76 +++--- website/pages/zh/developing/graph-ts/api.mdx | 90 +++---- .../zh/developing/unit-testing-framework.mdx | 16 +- .../zh/managing/deprecating-a-subgraph.mdx | 2 +- website/pages/zh/network/benefits.mdx | 72 +++--- website/pages/zh/network/delegating.mdx | 7 +- website/pages/zh/network/indexing.mdx | 40 +-- website/pages/zh/operating-graph-node.mdx | 14 +- website/pages/zh/querying/graphql-api.mdx | 14 +- .../assemblyscript-migration-guide.mdx | 5 + website/route-lockfile.txt | 23 -- 247 files changed, 3469 insertions(+), 3559 deletions(-) diff --git a/website/pages/ar/billing.mdx b/website/pages/ar/billing.mdx index 7321e41ffccf..763ebdbdaf2a 100644 --- a/website/pages/ar/billing.mdx +++ b/website/pages/ar/billing.mdx @@ -152,7 +152,7 @@ This is how you can purchase GRT on Uniswap. 1. انتقل إلى [ Uniswap ](https://app.uniswap.org/#/swap) وقم بتوصيل محفظتك. 2. حدد التوكن الذي ترغب في استبداله. حدد ETH. 3. حدد التوكن الذي ترغب في تبديله. حدد GRT. - - تأكد من تبديل التوكن الصحيح. عنوان العقد الذكي GRT هو: ` 0xc944E90C64B2c07662A292be6244BDf05Cda44a7 ` + - تأكد من تبديل التوكن الصحيح. عنوان العقد الذكي GRT هو: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` 4. الرجاء إدخال كمية ETH التي ترغب في تحويلها. 5. انقر على زر "مبادلة". 6. قم بتأكيد المعاملة في محفظتك وانتظر حتى تتم المعالجة. diff --git a/website/pages/ar/cookbook/near.mdx b/website/pages/ar/cookbook/near.mdx index 3a453ab24c79..40e13f93cbd1 100644 --- a/website/pages/ar/cookbook/near.mdx +++ b/website/pages/ar/cookbook/near.mdx @@ -29,13 +29,13 @@ title: بناء Subgraphs على NEAR `graphprotocol/graph-ts@` هي مكتبة لأنواع خاصة بـ subgraph. -تطوير NEAR subgraph يتطلب `graph-cli` بإصدار أعلى من ` 0.23.0 ` و `graph-ts` بإصدار أعلى من ` 0.23.0 `. +تطوير NEAR subgraph يتطلب `graph-cli` بإصدار أعلى من `0.23.0` و `graph-ts` بإصدار أعلى من `0.23.0`. > Building a NEAR subgraph is very similar to building a subgraph that indexes Ethereum. هناك ثلاثة جوانب لتعريف الـ subgraph: -**subgraph.yaml:** الـ subgraph manifest ، وتحديد مصادر البيانات ذات الأهمية ، وكيف يجب أن تتم معالجتها.علما أن NEAR هو ` نوع ` جديد لمصدر البيانات. +**subgraph.yaml:** الـ subgraph manifest ، وتحديد مصادر البيانات ذات الأهمية ، وكيف يجب أن تتم معالجتها.علما أن NEAR هو `نوع` جديد لمصدر البيانات. **schema.graphql:** a schema file that defines what data is stored for your subgraph, and how to query it via GraphQL. The requirements for NEAR subgraphs are covered by [the existing documentation](/developing/creating-a-subgraph#the-graphql-schema). @@ -73,7 +73,7 @@ dataSources: ``` - NEAR subgraphs يقدم `نوعا ` جديدا من مصدر بيانات (`near`) -- يجب أن يتوافق الـ `network` مع شبكة على Graph Node المضيفة. في الخدمة المستضافة ، الشبكة الرئيسية لـ NEAR هي ` near-mainnet ` ، وشبكة NEAR's testnet هي ` near-testnet ` +- يجب أن يتوافق الـ `network` مع شبكة على Graph Node المضيفة. في الخدمة المستضافة ، الشبكة الرئيسية لـ NEAR هي `near-mainnet` ، وشبكة NEAR's testnet هي `near-testnet` - NEAR data sources introduce an optional `source.account` field, which is a human-readable ID corresponding to a [NEAR account](https://docs.near.org/docs/concepts/account). This can be an account or a sub-account. - NEAR data sources introduce an alternative optional `source.accounts` field, which contains optional suffixes and prefixes. At least prefix or suffix must be specified, they will match the any account starting or ending with the list of values respectively. The example below would match: `[app|good].*[morning.near|morning.testnet]`. If only a list of prefixes or suffixes is necessary the other field can be omitted. @@ -165,7 +165,7 @@ class ReceiptWithOutcome { These types are passed to block & receipt handlers: - معالجات الكتلة ستتلقى`Block` -- معالجات الاستلام ستتلقى` ReceiptWithOutcome ` +- معالجات الاستلام ستتلقى`ReceiptWithOutcome` Otherwise, the rest of the [AssemblyScript API](/developing/assemblyscript-api) is available to NEAR subgraph developers during mapping execution. diff --git a/website/pages/ar/cookbook/subgraph-debug-forking.mdx b/website/pages/ar/cookbook/subgraph-debug-forking.mdx index 202b13a497c6..0d331deab109 100644 --- a/website/pages/ar/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ar/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ title: Quick and Easy Subgraph Debugging Using Forks عندما تنشر subgraph إلى Graph node بعيدة للقيام بالفهرسة ويفشل عند الكتلة _ X _ ، فإن الخبر الجيد هو أن Graph node ستظل تقدم استعلامات GraphQL باستخدام مخزنها(store)، والذي تمت مزامنته للكتلة(block) _ X _. هذا عظيم! هذا يعني أنه يمكننا الاستفادة من هذا المخزن "المحدث" لإصلاح الأخطاء التي تظهر عند فهرسة الكتلة _ X _. -باختصار ، سنقوم _ بتفريع (fork) الـ subgraph الفاشل _ من Graph node بعيدة والتي تضمن فهرسة الـ subgraph للكتلة * X * وذلك من أجل توفير الـ subgraph المنشور محليًا والذي يتم تصحيحه عندالكتلة_X_ مع عرض محدث لحالة الفهرسة. +باختصار ، سنقوم _ بتفريع (fork) الـ subgraph الفاشل _ من Graph node بعيدة والتي تضمن فهرسة الـ subgraph للكتلة _ X _ وذلك من أجل توفير الـ subgraph المنشور محليًا والذي يتم تصحيحه عندالكتلة*X* مع عرض محدث لحالة الفهرسة. ## من فضلك ، أرني بعض الأكواد! @@ -69,14 +69,14 @@ Oops, how unfortunate, when I deploy my perfect looking subgraph to the [Hosted وأنا أجيب: -1. ` fork-base ` هو عنوان URL "الأساسي" ،فمثلا عند إلحاق _subgraph id_ ، يكون عنوان URL الناتج (`/`) هو GraphQL endpoint صالح لمخزن الـ subgraph. +1. `fork-base` هو عنوان URL "الأساسي" ،فمثلا عند إلحاق _subgraph id_ ، يكون عنوان URL الناتج (`/`) هو GraphQL endpoint صالح لمخزن الـ subgraph. 2. الـتفريع سهل ، فلا داعي للقلق: ```bash $ graph deploy --debug-fork --ipfs http://localhost:5001 --node http://localhost:8020 ``` -أيضًا ، لا تنس تعيين حقل ` dataSources.source.startBlock ` في subgraph manifest لرقم الكتلة(block) التي بها المشكلة، حتى تتمكن من تخطي فهرسة الكتل الغير ضرورية والاستفادة من التفريع! +أيضًا ، لا تنس تعيين حقل `dataSources.source.startBlock` في subgraph manifest لرقم الكتلة(block) التي بها المشكلة، حتى تتمكن من تخطي فهرسة الكتل الغير ضرورية والاستفادة من التفريع! لذلك ، هذا ما أفعله: @@ -90,7 +90,7 @@ $ cargo run -p graph-node --release -- \ --fork-base https://api.thegraph.com/subgraphs/id/ ``` -1. بعد فحص دقيق ، لاحظت أن هناك عدم تطابق في تمثيلات الـ ` id ` المستخدمة عند فهرسة ` Gravatar ` في المعالجين الخاصين بي. بينما ` handleNewGravatar ` يحول (`event.params.id.toHex()`) إلى سداسي ، `handleUpdatedGravatar` يستخدم int32 (`event.params.id.toI32()`) مما يجعل ` handleUpdatedGravatar ` قلقا من "Gravatar not found!". أنا أجعلهم كلاهما يحولان ` id ` إلى سداسي. +1. بعد فحص دقيق ، لاحظت أن هناك عدم تطابق في تمثيلات الـ `id` المستخدمة عند فهرسة `Gravatar` في المعالجين الخاصين بي. بينما `handleNewGravatar` يحول (`event.params.id.toHex()`) إلى سداسي ، `handleUpdatedGravatar` يستخدم int32 (`event.params.id.toI32()`) مما يجعل `handleUpdatedGravatar` قلقا من "Gravatar not found!". أنا أجعلهم كلاهما يحولان `id` إلى سداسي. 2. بعد إجراء التغييرات ، قمت بنشر الـ subgraph الخاص بي على Graph node المحلية **_وتفريع الـsubgraph الفاشل_** وضبط `dataSources.source.startBlock` إلى `6190343` في `subgraph.yaml`: ```bash diff --git a/website/pages/ar/developing/creating-a-subgraph.mdx b/website/pages/ar/developing/creating-a-subgraph.mdx index b74a65ae3e64..96986ffd3407 100644 --- a/website/pages/ar/developing/creating-a-subgraph.mdx +++ b/website/pages/ar/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| النوع | الوصف | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | مصفوفة Byte ، ممثلة كسلسلة سداسية عشرية. يشيع استخدامها في Ethereum hashes وعناوينه. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| النوع | الوصف | +| --- | --- | +| `Bytes` | مصفوفة Byte ، ممثلة كسلسلة سداسية عشرية. يشيع استخدامها في Ethereum hashes وعناوينه. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **ملاحظة:** مصدر البيانات الجديد سيعالج فقط الاستدعاءات والأحداث للكتلة التي تم إنشاؤها فيه وجميع الكتل التالية ، ولكنه لن يعالج البيانات التاريخية ، أي البيانات الموجودة في الكتل السابقة. -> +> > إذا كانت الكتل السابقة تحتوي على بيانات ذات صلة بمصدر البيانات الجديد ، فمن الأفضل فهرسة تلك البيانات من خلال قراءة الحالة الحالية للعقد وإنشاء كيانات تمثل تلك الحالة في وقت إنشاء مصدر البيانات الجديد. ### سياق مصدر البيانات @@ -716,7 +716,7 @@ dataSources: ``` > **ملاحظة:** يمكن البحث عن كتلة إنشاء العقد بسرعة على Etherscan: -> +> > 1. ابحث عن العقد بإدخال عنوانه في شريط البحث. > 2. انقر فوق hash إجراء الإنشاء في قسم `Contract Creator`. > 3. قم بتحميل صفحة تفاصيل الإجراء(transaction) حيث ستجد كتلة البدء لذلك العقد. diff --git a/website/pages/ar/developing/graph-ts/api.mdx b/website/pages/ar/developing/graph-ts/api.mdx index add87572e5df..06ad54feb70b 100644 --- a/website/pages/ar/developing/graph-ts/api.mdx +++ b/website/pages/ar/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| الاصدار | ملاحظات الإصدار | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| الاصدار | ملاحظات الإصدار | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### الأنواع المضمنة (Built-in) @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### مرجع تحويلات الأنواع -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### البيانات الوصفية لمصدر البيانات diff --git a/website/pages/ar/developing/unit-testing-framework.mdx b/website/pages/ar/developing/unit-testing-framework.mdx index 395932bc4b99..54b83b009125 100644 --- a/website/pages/ar/developing/unit-testing-framework.mdx +++ b/website/pages/ar/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/ar/network/benefits.mdx b/website/pages/ar/network/benefits.mdx index 346ae4cfcab2..a54a14a768c9 100644 --- a/website/pages/ar/network/benefits.mdx +++ b/website/pages/ar/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| البنية الأساسية | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| البنية الأساسية | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| البنية الأساسية | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| البنية الأساسية | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| البنية الأساسية | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| البنية الأساسية | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/ar/network/delegating.mdx b/website/pages/ar/network/delegating.mdx index eea33ceb91da..e5a9fb6b8955 100644 --- a/website/pages/ar/network/delegating.mdx +++ b/website/pages/ar/network/delegating.mdx @@ -32,9 +32,7 @@ Whenever a Delegator wants to undelegate, their tokens are subject to a 28-day u One thing to consider as well is choosing an Indexer wisely. If you choose an Indexer who was not trustworthy, or not doing a good job, you will want to undelegate, which means you will be losing a lot of opportunities to earn rewards, which can be just as bad as burning GRT. -
    - لاحظ 0.5٪ رسوم التفويض ، بالإضافة إلى فترة 28 يوما لإلغاء التفويض. -
    +
    لاحظ 0.5٪ رسوم التفويض ، بالإضافة إلى فترة 28 يوما لإلغاء التفويض.
    ### اختيار مفهرس جدير بالثقة مع عائد جيد للمفوضين diff --git a/website/pages/ar/network/indexing.mdx b/website/pages/ar/network/indexing.mdx index 26ba96bbe16d..abe53eae2f89 100644 --- a/website/pages/ar/network/indexing.mdx +++ b/website/pages/ar/network/indexing.mdx @@ -63,7 +63,7 @@ Allocations are continuously accruing rewards while they're active and allocated - انتقل إلى [ واجهة Etherscan لعقد المكافآت Rewards contract ](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) * لاستدعاء `getRewards()`: - - قم بتوسيع ** 10 .الحصول على المكافآت ** القائمة المنسدلة. + - قم بتوسيع ** 10 .الحصول على المكافآت ** القائمة المنسدلة. - أدخل ** معرّف التخصيص ** في الإدخال. - انقر فوق الزر ** الاستعلام **. @@ -113,11 +113,11 @@ The `queryFeeCut` and `indexingRewardCut` values are delegation parameters that - **كبيرة** - مُعدة لفهرسة جميع ال subgraphs المستخدمة حاليا وأيضا لخدمة طلبات حركة مرور البيانات ذات الصلة. | Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| ----- |:---------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| صغير | 4 | 8 | 1 | 4 | 16 | -| قياسي | 8 | 30 | 1 | 12 | 48 | -| متوسط | 16 | 64 | 2 | 32 | 64 | -| كبير | 72 | 468 | 3.5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| صغير | 4 | 8 | 1 | 4 | 16 | +| قياسي | 8 | 30 | 1 | 12 | 48 | +| متوسط | 16 | 64 | 2 | 32 | 64 | +| كبير | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ At the center of an Indexer's infrastructure is the Graph Node which monitors th #### Graph Node -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| ------ | ------------------------------------------------------- | ------------------------------------------------------------------- | ----------------- | -------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | -| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | -| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | +| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | +| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | #### خدمة المفهرس -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| ------ | ------------------------------------------------------------ | --------------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | port-- | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | port-- | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | metrics-port-- | - | #### وكيل المفهرس(Indexer Agent) diff --git a/website/pages/ar/new-chain-integration.mdx b/website/pages/ar/new-chain-integration.mdx index 278e07ed2054..7f7a29c0d860 100644 --- a/website/pages/ar/new-chain-integration.mdx +++ b/website/pages/ar/new-chain-integration.mdx @@ -15,7 +15,7 @@ title: تكامل الشبكات الجديدة **1. استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية** -إذا كانت سلسلة الكتل متوافقة مع آلة الإيثريوم الافتراضية وإذا كان العميل/العقدة يوفر واجهة برمجة التطبيقات القياسية لاستدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية، ، فإنه يمكن لعقدة الغراف فهرسة هذه السلسلة الجديدة. لمزيد من المعلومات، يرجى الاطلاع على [اختبار استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية] (تكامل_سلسة_جديدة #اختبار_استدعاء_إجراء_عن_بُعد_باستخدام_تمثيل_كائنات_جافا_سكريبت_لآلة_التشغيل_الافتراضية\_لإثريوم). +إذا كانت سلسلة الكتل متوافقة مع آلة الإيثريوم الافتراضية وإذا كان العميل/العقدة يوفر واجهة برمجة التطبيقات القياسية لاستدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية، ، فإنه يمكن لعقدة الغراف فهرسة هذه السلسلة الجديدة. لمزيد من المعلومات، يرجى الاطلاع على [اختبار استدعاء إجراء عن بُعد باستخدام تمثيل كائنات جافا سكريبت لآلة الإيثريوم الافتراضية] (تكامل*سلسة*جديدة #اختبار*استدعاء*إجراء*عن*بُعد*باستخدام*تمثيل*كائنات*جافا*سكريبت*لآلة*التشغيل*الافتراضية_لإثريوم). **2. فايرهوز** diff --git a/website/pages/ar/operating-graph-node.mdx b/website/pages/ar/operating-graph-node.mdx index b467b1fc0395..646ec2d5dffd 100644 --- a/website/pages/ar/operating-graph-node.mdx +++ b/website/pages/ar/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | -| ------ | ------------------------------------------------------- | ------------------------------------------------------------------- | ----------------- | -------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | -| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | -| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | +| المنفذ | الغرض | المسار | CLI Argument | متغيرات البيئة | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...

    /subgraphs/name/.../... | http-port-- | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...

    /subgraphs/name/.../... | ws-port-- | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | admin-port-- | - | +| 8030 | Subgraph indexing status API | /graphql | index-node-port-- | - | +| 8040 | Prometheus metrics | /metrics | metrics-port-- | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/ar/querying/graphql-api.mdx b/website/pages/ar/querying/graphql-api.mdx index 6c81b7756f3a..5807eba74fab 100644 --- a/website/pages/ar/querying/graphql-api.mdx +++ b/website/pages/ar/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| رمز | عامل التشغيل | الوصف | -| ----------- | ------------ | --------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | لدمج عبارات بحث متعددة في فلتر للكيانات التي تتضمن جميع العبارات المتوفرة | -| | | `أو` | الاستعلامات التي تحتوي على عبارات بحث متعددة مفصولة بواسطة عامل التشغيل or ستعيد جميع الكيانات المتطابقة من أي عبارة متوفرة | -| `<->` | `Follow by` | يحدد المسافة بين كلمتين. | -| `:*` | `Prefix` | يستخدم عبارة البحث prefix للعثور على الكلمات التي تتطابق بادئتها (مطلوب حرفان.) | +| رمز | عامل التشغيل | الوصف | +| --- | --- | --- | +| `&` | `And` | لدمج عبارات بحث متعددة في فلتر للكيانات التي تتضمن جميع العبارات المتوفرة | +| | | `أو` | الاستعلامات التي تحتوي على عبارات بحث متعددة مفصولة بواسطة عامل التشغيل or ستعيد جميع الكيانات المتطابقة من أي عبارة متوفرة | +| `<->` | `Follow by` | يحدد المسافة بين كلمتين. | +| `:*` | `Prefix` | يستخدم عبارة البحث prefix للعثور على الكلمات التي تتطابق بادئتها (مطلوب حرفان.) | #### Examples diff --git a/website/pages/ar/querying/querying-best-practices.mdx b/website/pages/ar/querying/querying-best-practices.mdx index b5501c497ce3..24f0e802e02a 100644 --- a/website/pages/ar/querying/querying-best-practices.mdx +++ b/website/pages/ar/querying/querying-best-practices.mdx @@ -16,7 +16,7 @@ title: أفضل الممارسات للاستعلام على عكس REST API ، فإن GraphQL API مبنية على مخطط يحدد الاستعلامات التي يمكن تنفيذها. -على سبيل المثال ، طلب الاستعلام للحصول على توكن باستخدام استعلام ` token ` سيبدو كما يلي: +على سبيل المثال ، طلب الاستعلام للحصول على توكن باستخدام استعلام `token` سيبدو كما يلي: ```graphql query GetToken($id: ID!) { @@ -40,7 +40,7 @@ query GetToken($id: ID!) { تستخدم استعلامات GraphQL لغة GraphQL ، التي تم تحديدها في [المواصفات](https://spec.graphql.org/). -يتكون استعلام ` GetToken ` أعلاه من أجزاء متعددة للغة (تم استبدالها أدناه بـ placeholders ` [...] `): +يتكون استعلام `GetToken` أعلاه من أجزاء متعددة للغة (تم استبدالها أدناه بـ placeholders `[...]`): ```graphql query [operationName]([variableName]: [variableType]) { @@ -54,9 +54,9 @@ query [operationName]([variableName]: [variableType]) { على الرغم من أن قائمة القواعد التي يجب اتباعها طويلة، إلا أن هناك قواعد أساسية يجب أخذها في الاعتبار عند كتابة استعلامات GraphQL: -- يجب استخدام كل ` queryName ` مرة واحدة فقط لكل عملية. -- يجب استخدام كل ` field ` مرة واحدة فقط في التحديد (لا يمكننا الاستعلام عن ` id ` مرتين ضمن ` token `) -- بعض ` field ` أو الاستعلامات (مثل `tokens`) ترجع أنواعًا معقدة تتطلب تحديدًا للحقول الفرعية. عدم تقديم تحديد عندما يكون متوقعًا (أو تقديم تحديد عندما لا يكون متوقعًا - على سبيل المثال ، الـ ` id `) سيؤدي إلى ظهور خطأ. لمعرفة نوع الحقل ، يرجى الرجوع إلى [ The Graph Explorer ](/network/explorer). +- يجب استخدام كل `queryName` مرة واحدة فقط لكل عملية. +- يجب استخدام كل `field` مرة واحدة فقط في التحديد (لا يمكننا الاستعلام عن `id` مرتين ضمن `token`) +- بعض `field` أو الاستعلامات (مثل `tokens`) ترجع أنواعًا معقدة تتطلب تحديدًا للحقول الفرعية. عدم تقديم تحديد عندما يكون متوقعًا (أو تقديم تحديد عندما لا يكون متوقعًا - على سبيل المثال ، الـ `id`) سيؤدي إلى ظهور خطأ. لمعرفة نوع الحقل ، يرجى الرجوع إلى [ The Graph Explorer ](/network/explorer). - يجب أن يكون أي متغير تم تعيينه لوسيط متطابقًا مع نوعه. - في قائمة المتغيرات المعطاة ، يجب أن يكون كل واحد منها فريدًا. - يجب استخدام جميع المتغيرات المحددة. @@ -308,7 +308,7 @@ query { Such repeated fields (`id`, `active`, `status`) bring many issues: - harder to read for more extensive queries -- عند استخدام الأدوات التي تنشئ أنواع TypeScript بناءً على الاستعلامات (_المزيد عن ذلك في القسم الأخير_)، و ` newDelate ` و ` oldDelegate ` سينتج عنهما واجهتين مضمنتان متمايزتين. +- عند استخدام الأدوات التي تنشئ أنواع TypeScript بناءً على الاستعلامات (_المزيد عن ذلك في القسم الأخير_)، و `newDelate` و `oldDelegate` سينتج عنهما واجهتين مضمنتان متمايزتين. A refactored version of the query would be the following: @@ -431,8 +431,8 @@ In order to keep up with the mentioned above best practices and syntactic rules, [Setup the "operations-recommended"](https://github.com/dotansimha/graphql-eslint#available-configs) config will enforce essential rules such as: -- ` @ graphql-eslint / field-on-right-type `: هل يتم استخدام الحقل على النوع المناسب؟ -- ` @ graphql-eslint / no-unused variables `: هل يجب أن يبقى المتغير المعطى غير مستخدم؟ +- `@ graphql-eslint / field-on-right-type`: هل يتم استخدام الحقل على النوع المناسب؟ +- `@ graphql-eslint / no-unused variables`: هل يجب أن يبقى المتغير المعطى غير مستخدم؟ - و اكثر! This will allow you to **catch errors without even testing queries** on the playground or running them in production! diff --git a/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx index 9674f1777573..84e00f13b4e1 100644 --- a/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ar/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ let a = a + b ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + ستحتاج إلى إعادة تسمية المتغيرات المكررة إذا كان لديك variable shadowing. + ### مقارانات Null + من خلال إجراء الترقية على ال Subgraph الخاص بك ، قد تحصل أحيانًا على أخطاء مثل هذه: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + لحل المشكلة يمكنك ببساطة تغيير عبارة `if` إلى شيء مثل هذا: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + لإصلاح هذه المشكلة ، يمكنك إنشاء متغير للوصول إلى الخاصية حتى يتمكن المترجم من القيام بعملية التحقق من الـ nullability: ```typescript diff --git a/website/pages/cs/cookbook/subgraph-debug-forking.mdx b/website/pages/cs/cookbook/subgraph-debug-forking.mdx index 24fbcc650686..a5bc7e36fb76 100644 --- a/website/pages/cs/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/cs/cookbook/subgraph-debug-forking.mdx @@ -12,7 +12,7 @@ V kontextu ladění vám ** vidličkování podgrafů** umožňuje ladit neúsp ## Co?! Jak? -Pokud nasadíte podgraf do vzdáleného uzlu Graph pro indexování a dojde k selhání bloku_X_, dobrou zprávou je, že uzel Graph bude stále obsluhovat dotazy GraphQL pomocí svého úložiště, které je synchronizováno s blokem_X_. skvělé! To znamená, že můžeme využít tohoto "aktuálního" úložiště k odstranění chyb vznikajících při indexování bloku _X_. +Pokud nasadíte podgraf do vzdáleného uzlu Graph pro indexování a dojde k selhání bloku*X*, dobrou zprávou je, že uzel Graph bude stále obsluhovat dotazy GraphQL pomocí svého úložiště, které je synchronizováno s blokem*X*. skvělé! To znamená, že můžeme využít tohoto "aktuálního" úložiště k odstranění chyb vznikajících při indexování bloku _X_. V kostce budeme _vidličkovat chybový podgraf_ z vzdáleného uzlu grafu, který je zaručeně indexován až do bloku _X_, aby poskytl lokálně nasazenému podgrafu, který je laděn v bloku _X_, aktuální pohled na stav indexace. diff --git a/website/pages/cs/developing/creating-a-subgraph.mdx b/website/pages/cs/developing/creating-a-subgraph.mdx index dd60bb2cc10d..b5759149e88b 100644 --- a/website/pages/cs/developing/creating-a-subgraph.mdx +++ b/website/pages/cs/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ U některých typů entit je `id` vytvořeno z id dvou jiných entit; to je mož V našem GraphQL API podporujeme následující skaláry: -| Typ | Popis | -| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bajtů` | Pole bajtů reprezentované jako hexadecimální řetězec. Běžně se používá pro hashe a adresy Ethereum. | -| `Řetězec` | Skalár pro hodnoty `řetězce`. Nulové znaky nejsou podporovány a jsou automaticky odstraněny. | -| `Boolean` | Skalár pro hodnoty `boolean`. | -| `Int` | Specifikace GraphQL definuje `Int` na velikost 32 bajtů. | -| `Int8` | Celé číslo se znaménkem o velikosti 8 bajtů, známé také jako 64bitové celé číslo se znaménkem, může uchovávat hodnoty v rozsahu od -9 223 372 036 854 775 808 do 9 223 372 036 854 775 807. Přednostně se používá k reprezentaci `i64` z ethereum. | -| `BigInt` | Velká celá čísla. Používá se pro typy `uint32`, `int64`, `uint64`, ..., `uint256` společnosti Ethereum. Poznámka: Vše pod `uint32`, jako například `int32`, `uint24` nebo `int8`, je reprezentováno jako `i32`. | -| `BigDecimal` | `BigDecimal` Desetinná čísla s vysokou přesností reprezentovaná jako signifikand a exponent. Rozsah exponentu je od -6143 do +6144. Zaokrouhleno na 34 významných číslic. | +| Typ | Popis | +| --- | --- | +| `Bajtů` | Pole bajtů reprezentované jako hexadecimální řetězec. Běžně se používá pro hashe a adresy Ethereum. | +| `Řetězec` | Skalár pro hodnoty `řetězce`. Nulové znaky nejsou podporovány a jsou automaticky odstraněny. | +| `Boolean` | Skalár pro hodnoty `boolean`. | +| `Int` | Specifikace GraphQL definuje `Int` na velikost 32 bajtů. | +| `Int8` | Celé číslo se znaménkem o velikosti 8 bajtů, známé také jako 64bitové celé číslo se znaménkem, může uchovávat hodnoty v rozsahu od -9 223 372 036 854 775 808 do 9 223 372 036 854 775 807. Přednostně se používá k reprezentaci `i64` z ethereum. | +| `BigInt` | Velká celá čísla. Používá se pro typy `uint32`, `int64`, `uint64`, ..., `uint256` společnosti Ethereum. Poznámka: Vše pod `uint32`, jako například `int32`, `uint24` nebo `int8`, je reprezentováno jako `i32`. | +| `BigDecimal` | `BigDecimal` Desetinná čísla s vysokou přesností reprezentovaná jako signifikand a exponent. Rozsah exponentu je od -6143 do +6144. Zaokrouhleno na 34 významných číslic. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Poznámka:** Nový zdroj dat bude zpracovávat pouze volání a události pro blok, ve kterém byl vytvořen, a všechny následující bloky, ale nebude zpracovávat historická data, tj. data obsažená v předchozích blocích. -> +> > Pokud předchozí bloky obsahují data relevantní pro nový zdroj dat, je nejlepší tato data indexovat načtením aktuálního stavu smlouvy a vytvořením entit reprezentujících tento stav v době vytvoření nového zdroje dat. ### Kontext zdroje dat @@ -716,7 +716,7 @@ dataSources: ``` > **Poznámka:** Blok pro vytvoření smlouvy lze rychle vyhledat v Etherscan: -> +> > 1. Vyhledejte smlouvu zadáním její adresy do vyhledávacího řádku. > 2. Klikněte na hash transakce vytvoření v sekci `Tvůrce smlouvy`. > 3. Načtěte stránku s podrobnostmi o transakci, kde najdete počáteční blok pro danou smlouvu. diff --git a/website/pages/cs/developing/graph-ts/api.mdx b/website/pages/cs/developing/graph-ts/api.mdx index 0d3e6b33310e..3f934597bd11 100644 --- a/website/pages/cs/developing/graph-ts/api.mdx +++ b/website/pages/cs/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ Knihovna `@graphprotocol/graph-ts` poskytuje následující API: `apiVersion` v manifestu podgrafu určuje verzi mapovacího API, kterou pro daný podgraf používá uzel Graf. -| Verze | Poznámky vydání | -| :---: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Přidání tříd `TransactionReceipt` a `Log` do typů Ethereum\<0/Přidání pole `receipt` do objektu Ethereum událost | -| 0.0.6 | Přidáno pole `nonce` do objektu Ethereum Transaction
    Přidáno `baseFeePerGas` do objektu Ethereum bloku | +| Verze | Poznámky vydání | +| :-: | --- | +| 0.0.7 | Přidání tříd `TransactionReceipt` a `Log` do typů Ethereum\<0/Přidání pole `receipt` do objektu Ethereum událost | +| 0.0.6 | Přidáno pole `nonce` do objektu Ethereum Transaction
    Přidáno `baseFeePerGas` do objektu Ethereum bloku | | 0.0.5 | AssemblyScript povýšen na verzi 0.19.10 (obsahuje rozbíjející změny, viz [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` přejmenováno na `ethereum.transaction.gasLimit` | -| 0.0.4 | Přidání pole `functionSignature` do objektu Ethereum SmartContractCall | -| 0.0.3 | Do objektu Ethereum Call přidáno pole `from`
    `etherem.call.address` přejmenováno na `ethereum.call.to` | -| 0.0.2 | Přidání pole `input` do objektu Ethereum Transackce | +| 0.0.4 | Přidání pole `functionSignature` do objektu Ethereum SmartContractCall | +| 0.0.3 | Do objektu Ethereum Call přidáno pole `from`
    `etherem.call.address` přejmenováno na `ethereum.call.to` | +| 0.0.2 | Přidání pole `input` do objektu Ethereum Transackce | ### Vestavěné typy @@ -143,7 +143,7 @@ _Math_ - `x.notEqual(y: BigInt): bool` –lze zapsat jako `x != y`. - `x.lt(y: BigInt): bool` – lze zapsat jako `x < y`. - `x.le(y: BigInt): bool` – lze zapsat jako `x <= y`. -- `x.gt(y: BigInt): bool` – lze zapsat jako `x > y`. +- `x.gt(y: BigInt): bool` – lze zapsat jako `x > y`. - `x.ge(y: BigInt): bool` – lze zapsat jako `x >= y`. - `x.neg(): BigInt` – lze zapsat jako `-x`. - `x.divDecimal(y: BigDecimal): BigDecimal` – dělí desetinným číslem, čímž získá desetinný výsledek. @@ -734,44 +734,44 @@ Pokud je typ hodnoty jistý, lze ji převést na [vestavěný typ](#built-in-typ ### Převody typů Reference -| Zdroj(e) | Destinace | Funkce převodu | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Zdroj(e) | Destinace | Funkce převodu | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/cs/developing/unit-testing-framework.mdx b/website/pages/cs/developing/unit-testing-framework.mdx index 81ae89accd3f..69093e150a10 100644 --- a/website/pages/cs/developing/unit-testing-framework.mdx +++ b/website/pages/cs/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/cs/network/benefits.mdx b/website/pages/cs/network/benefits.mdx index ec33c75b4ae5..02655bef5cdb 100644 --- a/website/pages/cs/network/benefits.mdx +++ b/website/pages/cs/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastruktura | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastruktura | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastruktura | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastruktura | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastruktura | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastruktura | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/cs/network/delegating.mdx b/website/pages/cs/network/delegating.mdx index df6ce204f133..18b3a90c7ce0 100644 --- a/website/pages/cs/network/delegating.mdx +++ b/website/pages/cs/network/delegating.mdx @@ -44,8 +44,8 @@ To je důležitá část, kterou je třeba pochopit. Nejprve si probereme tři v Indexační podíl na odměně - Indexační podíl na odměně je část odměny, kterou si indexátor ponechá pro sebe. To znamená, že pokud je nastavena na 100%, jako delegát získáte 0 odměn za indexaci. Pokud se v uživatelském rozhraní zobrazí hodnota 80%, znamená to, že jako delegát obdržíte 20%. Důležitá poznámka - na začátku sítě budou odměny za indexování tvořit většinu odměn.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Nejlepší indexátor dává delegátům 90 % odměn. Na - prostřední dává delegátům 20 % odměn. Spodní dává delegátům ~83 %.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Nejlepší indexátor dává delegátům 90 % odměn. Na prostřední dává + delegátům 20 % odměn. Spodní dává delegátům ~83 %.*
    - Snížení poplatku za dotaz - Funguje stejně jako snížení odměny za indexování. Jedná se však konkrétně o výnosy z poplatků za dotaz, které indexátor vybere. Je třeba poznamenat, že na začátku sítě budou výnosy z poplatků za dotazování ve srovnání s odměnou za indexaci velmi malé. Doporučujeme věnovat pozornost síti, abyste zjistili, kdy začnou být poplatky za dotazování v síti významnější. diff --git a/website/pages/cs/network/indexing.mdx b/website/pages/cs/network/indexing.mdx index 6eb088873b8c..61567ffe302a 100644 --- a/website/pages/cs/network/indexing.mdx +++ b/website/pages/cs/network/indexing.mdx @@ -113,11 +113,11 @@ Indexátory se mohou odlišovat použitím pokročilých technik pro rozhodován - **Large** - Připraveno k indexování všech aktuálně nepoužívaných příbuzných podgrafů. | Nastavení | Postgres
    (CPUs) | Postgres
    (paměť v GBs) | Postgres
    (disk v TBs) | VMs
    (CPUs) | VMs
    (paměť v GBs) | -| --------- |:--------------------------:|:---------------------------------:|:--------------------------------:|:---------------------:|:----------------------------:| -| Malé | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Střední | 16 | 64 | 2 | 32 | 64 | -| Velký | 72 | 468 | 3.5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Malé | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Střední | 16 | 64 | 2 | 32 | 64 | +| Velký | 72 | 468 | 3.5 | 48 | 184 | ### Jaká jsou základní bezpečnostní opatření, která by měl indexátor přijmout? @@ -149,20 +149,20 @@ Poznámka: Pro podporu agilního škálování se doporučuje oddělit dotazová #### Uzel Graf -| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | -| ---- | ---------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | -| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | -| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | -| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | +| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | +| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | #### Služba Indexer -| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | -| ---- | --------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (pro placené dotazy na podgrafy) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Metriky Prometheus | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (pro placené dotazy na podgrafy) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Metriky Prometheus | /metrics | --metrics-port | - | #### Agent indexátoru diff --git a/website/pages/cs/operating-graph-node.mdx b/website/pages/cs/operating-graph-node.mdx index 504a6b22ad8c..6b1190311ea1 100644 --- a/website/pages/cs/operating-graph-node.mdx +++ b/website/pages/cs/operating-graph-node.mdx @@ -77,13 +77,13 @@ Kompletní příklad konfigurace Kubernetes naleznete v úložišti [indexer](ht Když je Graf Uzel spuštěn, zpřístupňuje následující ports: -| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | -| ---- | ---------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | -| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | -| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | -| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | +| Port | Účel | Trasy | CLI Argument | Proměnná prostředí | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (pro dotazy podgrafy) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (pro odběry podgrafů) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (pro správu nasazení) | / | --admin-port | - | +| 8030 | Stav indexování podgrafů API | /graphql | --index-node-port | - | +| 8040 | Metriky Prometheus | /metrics | --metrics-port | - | > **Důležité**: Dávejte pozor na veřejné vystavování portů - **administrační porty** by měly být uzamčeny. To se týká i koncového bodu JSON-RPC uzlu Graf. diff --git a/website/pages/cs/querying/graphql-api.mdx b/website/pages/cs/querying/graphql-api.mdx index 68099a5e08a9..315ee3fe4445 100644 --- a/website/pages/cs/querying/graphql-api.mdx +++ b/website/pages/cs/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Popis | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Popis | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/cs/quick-start.mdx b/website/pages/cs/quick-start.mdx index f30837fd77ee..13af4b54b95d 100644 --- a/website/pages/cs/quick-start.mdx +++ b/website/pages/cs/quick-start.mdx @@ -48,7 +48,7 @@ Při inicializaci podgrafu vás nástroj CLI požádá o následující informac - Ethereum síť (nepovinné): možná budete muset zadat, ze které sítě kompatibilní s EVM bude váš subgraf indexovat data. - Adresa zakázky: Vyhledejte adresu chytré smlouvy, ze které se chcete dotazovat na data. - ABI: Pokud se ABI nevyplňuje automaticky, je třeba jej zadat ručně jako soubor JSON. -- Počáteční blok: Doporučuje se zadat počáteční blok, abyste ušetřili čas, zatímco váš subgraf indexuje data blockchainu. Počáteční blok můžete vyhledat tak, že najdete blok, ve kterém byl váš kontrakt nasazen. +- Počáteční blok: Doporučuje se zadat počáteční blok, abyste ušetřili čas, zatímco váš subgraf indexuje data blockchainu. Počáteční blok můžete vyhledat tak, že najdete blok, ve kterém byl váš kontrakt nasazen. - Název smlouvy: zadejte název své smlouvy. - Indexovat události smlouvy jako entity: doporučujeme nastavit tuto hodnotu na true, protože se automaticky přidá mapování do vašeho subgrafu pro každou emitovanou událost - Přidat další smlouvu(nepovinné): můžete přidat další smlouvu diff --git a/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx b/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx index aaa199b28aab..8997891e0538 100644 --- a/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/cs/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Pokud jste použili stínování proměnných, musíte duplicitní proměnné přejmenovat. + ### Nulová srovnání + Při aktualizaci podgrafu může někdy dojít k těmto chybám: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Pro vyřešení můžete jednoduše změnit příkaz `if` na něco takového: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Chcete-li tento problém vyřešit, můžete vytvořit proměnnou pro přístup k této vlastnosti, aby překladač mohl provést kouzlo kontroly nulovatelnosti: ```typescript diff --git a/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx index cdb3cd27b4e1..eb4fda3fc003 100644 --- a/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/de/arbitrum/l2-transfer-tools-faq.mdx @@ -64,7 +64,7 @@ Die Übertragungszeit beträgt etwa 20 Minuten. Die Arbitrum-Brücke arbeitet im ### Wird mein Subgraph noch auffindbar sein, nachdem ich ihn auf L2 übertragen habe? -Ihr Subgraph ist nur in dem Netzwerk auffindbar, in dem er veröffentlicht ist. Wenn Ihr Subgraph zum Beispiel auf Arbitrum One ist, können Sie ihn nur im Explorer auf Arbitrum One finden und nicht auf Ethereum. Bitte vergewissern Sie sich, dass Sie Arbitrum One in der Netzwerkumschaltung oben auf der Seite ausgewählt haben, um sicherzustellen, dass Sie sich im richtigen Netzwerk befinden. Nach der Übertragung wird der L1-Subgraph als veraltet angezeigt. +Ihr Subgraph ist nur in dem Netzwerk auffindbar, in dem er veröffentlicht ist. Wenn Ihr Subgraph zum Beispiel auf Arbitrum One ist, können Sie ihn nur im Explorer auf Arbitrum One finden und nicht auf Ethereum. Bitte vergewissern Sie sich, dass Sie Arbitrum One in der Netzwerkumschaltung oben auf der Seite ausgewählt haben, um sicherzustellen, dass Sie sich im richtigen Netzwerk befinden. Nach der Übertragung wird der L1-Subgraph als veraltet angezeigt. ### Muss mein Subgraph ( Teilgraph ) veröffentlicht werden, um ihn zu übertragen? diff --git a/website/pages/de/developing/creating-a-subgraph.mdx b/website/pages/de/developing/creating-a-subgraph.mdx index 8945579b5b92..721920020b13 100644 --- a/website/pages/de/developing/creating-a-subgraph.mdx +++ b/website/pages/de/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/de/developing/graph-ts/api.mdx b/website/pages/de/developing/graph-ts/api.mdx index d1c8233ee2d2..bfc56dce2aa6 100644 --- a/website/pages/de/developing/graph-ts/api.mdx +++ b/website/pages/de/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/de/developing/unit-testing-framework.mdx b/website/pages/de/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/de/developing/unit-testing-framework.mdx +++ b/website/pages/de/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/de/network/benefits.mdx b/website/pages/de/network/benefits.mdx index 10158195162f..cf9a39833987 100644 --- a/website/pages/de/network/benefits.mdx +++ b/website/pages/de/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastruktur | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastruktur | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastruktur | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastruktur | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastruktur | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastruktur | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/de/network/indexing.mdx b/website/pages/de/network/indexing.mdx index b0de4567f4fc..8d273d73853d 100644 --- a/website/pages/de/network/indexing.mdx +++ b/website/pages/de/network/indexing.mdx @@ -113,11 +113,11 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. | Konfiguration | Postgres
    (CPUs) | Postgres
    (Speicher in GB) | Postgres
    (Festplatte in TB) | VMs
    (CPUs) | VMs
    (Speicher in GB) | -| ------------- |:--------------------------:|:------------------------------------:|:--------------------------------------:|:---------------------:|:-------------------------------:| -| Klein | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Mittel | 16 | 64 | 2 | 32 | 64 | -| Groß | 72 | 468 | 3.5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Klein | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Mittel | 16 | 64 | 2 | 32 | 64 | +| Groß | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Der Graph-Knoten -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | ----------------- | -| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | -| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | +| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | #### Indexer Service -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| ---- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL-HTTP-Server
    (für kostenpflichtige Subgraf-Abfragen) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL-HTTP-Server
    (für kostenpflichtige Subgraf-Abfragen) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus-Metriken | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/de/operating-graph-node.mdx b/website/pages/de/operating-graph-node.mdx index 25767bd3fa65..0e24f48252df 100644 --- a/website/pages/de/operating-graph-node.mdx +++ b/website/pages/de/operating-graph-node.mdx @@ -77,13 +77,13 @@ Eine vollständige Kubernetes-Beispielkonfiguration finden Sie im [Indexer-Repos Wenn es ausgeführt wird, stellt Graph Node die folgenden Ports zur Verfügung: -| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | ----------------- | -| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | -| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | +| Port | Zweck | Routen | CLI-Argument | Umgebungsvariable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP-Server
    (für Subgraf-Abfragen) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (für Subgraf-Abonnements) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (zum Verwalten von Deployments) | / | --admin-port | - | +| 8030 | Subgraf-Indizierungsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-Metriken | /metrics | --metrics-port | - | > **Wichtig**: Seien Sie vorsichtig, wenn Sie Ports öffentlich zugänglich machen - **Administrationsports** sollten gesperrt bleiben. Dies schließt den JSON-RPC-Endpunkt des Graph-Knotens ein. diff --git a/website/pages/de/querying/graphql-api.mdx b/website/pages/de/querying/graphql-api.mdx index 1bc64a267db7..fc1b29586442 100644 --- a/website/pages/de/querying/graphql-api.mdx +++ b/website/pages/de/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Beschreibung | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Beschreibung | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Beispiele diff --git a/website/pages/de/release-notes/assemblyscript-migration-guide.mdx b/website/pages/de/release-notes/assemblyscript-migration-guide.mdx index 058c48b32e6f..fb1ad8beb382 100644 --- a/website/pages/de/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/de/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/es/cookbook/cosmos.mdx b/website/pages/es/cookbook/cosmos.mdx index a9721e2f2680..11c2684860a1 100644 --- a/website/pages/es/cookbook/cosmos.mdx +++ b/website/pages/es/cookbook/cosmos.mdx @@ -170,7 +170,7 @@ Cada tipo de handler viene con su propia estructura de datos que se pasa como ar - Los handlers de transacciones reciben el tipo `TransactionData`. - Los handlers de mensajes reciben el tipo `MessageData`. -Como parte de `MessageData`, el message handler recibe un contexto de transacción, que contiene la información más importante sobre una transacción que abarca un mensaje. El contexto de transacción también está disponible en el tipo ` EventData `, pero solo cuando el evento correspondiente está asociado con una transacción. Además, todos los controladores reciben una referencia a un bloque (` HeaderOnlyBlock `). +Como parte de `MessageData`, el message handler recibe un contexto de transacción, que contiene la información más importante sobre una transacción que abarca un mensaje. El contexto de transacción también está disponible en el tipo `EventData`, pero solo cuando el evento correspondiente está asociado con una transacción. Además, todos los controladores reciben una referencia a un bloque (`HeaderOnlyBlock`). Puedes encontrar una lista completa de los tipos para la integración Cosmos aquí [here](https://github.com/graphprotocol/graph-ts/blob/4c064a8118dff43b110de22c7756e5d47fcbc8df/chain/cosmos.ts). diff --git a/website/pages/es/cookbook/subgraph-debug-forking.mdx b/website/pages/es/cookbook/subgraph-debug-forking.mdx index 60d186925d16..1e2d42925fad 100644 --- a/website/pages/es/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/es/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ En el contexto de la depuración, **subgraph forking** te permite depurar tu sub Cuando implementas un subgrafo en un nodo Graph remoto para la indexación y falla en el bloque _X_, la buena noticia es que el nodo Graph seguirá atendiendo consultas de GraphQL usando su tienda, que está sincronizado para bloquear _X_. ¡Genial! Esto significa que podemos aprovechar esta tienda "actualizada" para corregir los errores que surgen al indexar el bloque _X_. -En pocas palabras, vamos a _bifurcar el subgrafo fallido_ desde un nodo de Graph remoto que garantiza que el subgrafo se indexe para bloquear *X* para proporcionar al subgrafo implementado localmente que se está depurando en el bloque _X_ una vista actualizada del estado de indexación. +En pocas palabras, vamos a _bifurcar el subgrafo fallido_ desde un nodo de Graph remoto que garantiza que el subgrafo se indexe para bloquear _X_ para proporcionar al subgrafo implementado localmente que se está depurando en el bloque _X_ una vista actualizada del estado de indexación. ## ¡Por favor, muéstrame algo de código! diff --git a/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx index 4c769e143bdb..70c75d3049ef 100644 --- a/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/es/deploying/deploying-a-subgraph-to-hosted.mdx @@ -157,7 +157,7 @@ dataSources: kind: ethereum/events ``` -Ahora está listo para ` yarn deploy `. +Ahora está listo para `yarn deploy`. **Nota:** como se mencionó anteriormente, desde `graph-cli 0.32.0` puedes ejecutar directamente `yarn deploy` con la opción`--network`: diff --git a/website/pages/es/developing/creating-a-subgraph.mdx b/website/pages/es/developing/creating-a-subgraph.mdx index 6cf6502bd6e0..5271e6ac9f14 100644 --- a/website/pages/es/developing/creating-a-subgraph.mdx +++ b/website/pages/es/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Para algunos tipos de entidad, el `id` se construye a partir de los id de otras Admitimos los siguientes escalares en nuestra API GraphQL: -| Tipo | Descripción | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, representado como un string hexadecimal. Comúnmente utilizado para los hashes y direcciones de Ethereum. | -| `String` | Escalar para valores `string`. Los caracteres nulos no son compatibles y se eliminan automáticamente. | -| `Boolean` | Escalar para valores `boolean`. | -| `Int` | La especificación GraphQL define `Int` con un tamaño de 32 bytes. | -| `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` | Números enteros grandes. Se utiliza para los tipos `uint32`, `int64`, `uint64`, ..., `uint256` de Ethereum. Nota: Todo por debajo de `uint32`, como `int32`, `uint24` o `int8` se representa como `i32`. | -| `BigDecimal` | `BigDecimal` Decimales de alta precisión representados como un signo y un exponente. El rango de exponentes va de -6143 a +6144. Redondeado a 34 dígitos significativos. | +| Tipo | Descripción | +| --- | --- | +| `Bytes` | Byte array, representado como un string hexadecimal. Comúnmente utilizado para los hashes y direcciones de Ethereum. | +| `String` | Escalar para valores `string`. Los caracteres nulos no son compatibles y se eliminan automáticamente. | +| `Boolean` | Escalar para valores `boolean`. | +| `Int` | La especificación GraphQL define `Int` con un tamaño de 32 bytes. | +| `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` | Números enteros grandes. Se utiliza para los tipos `uint32`, `int64`, `uint64`, ..., `uint256` de Ethereum. Nota: Todo por debajo de `uint32`, como `int32`, `uint24` o `int8` se representa como `i32`. | +| `BigDecimal` | `BigDecimal` Decimales de alta precisión representados como un signo y un exponente. El rango de exponentes va de -6143 a +6144. Redondeado a 34 dígitos significativos. | #### Enums @@ -481,10 +481,10 @@ Diccionarios de idiomas admitidos: Algoritmos admitidos para ordenar los resultados: -| Algoritmos | Descripción | -| ------------------- | -------------------------------------------------------------------------------------------------- | -| rango | Usa la calidad de coincidencia (0-1) de la consulta de texto completo para ordenar los resultados. | -| rango de proximidad | Similar al rango, pero también incluye la proximidad de los matches. | +| Algoritmos | Descripción | +| --- | --- | +| rango | Usa la calidad de coincidencia (0-1) de la consulta de texto completo para ordenar los resultados. | +| rango de proximidad | Similar al rango, pero también incluye la proximidad de los matches. | ## Escribir Mappings @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Un nuevo origen de datos sólo procesará las llamadas y los eventos del bloque en el que fue creado y todos los bloques siguientes, pero no procesará los datos históricos, es decir, los datos que están contenidos en bloques anteriores. -> +> > Si los bloques anteriores contienen datos relevantes para la nueva fuente de datos, lo mejor es indexar esos datos leyendo el estado actual del contrato y creando entidades que representen ese estado en el momento de crear la nueva fuente de datos. ### Contexto de la fuente de datos @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** El bloque de creación del contrato se puede buscar rápidamente en Etherscan: -> +> > 1. Busca el contrato introduciendo su dirección en la barra de búsqueda. > 2. Haz clic en el hash de la transacción de creación en la sección `Contract Creator`. > 3. Carga la página de detalles de la transacción, donde encontrarás el bloque inicial de ese contrato. diff --git a/website/pages/es/developing/graph-ts/api.mdx b/website/pages/es/developing/graph-ts/api.mdx index 6ff9e20f8926..89e46d83e4d2 100644 --- a/website/pages/es/developing/graph-ts/api.mdx +++ b/website/pages/es/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Notas del lanzamiento | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Notas del lanzamiento | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Tipos Incorporados @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Referencias de Tipo de Conversiones -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadatos de la Fuente de Datos diff --git a/website/pages/es/developing/unit-testing-framework.mdx b/website/pages/es/developing/unit-testing-framework.mdx index 84f9bd46d732..514f692ac6e9 100644 --- a/website/pages/es/developing/unit-testing-framework.mdx +++ b/website/pages/es/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ La salida del log incluye la duración de la ejecución de la prueba. Aquí hay Esto significa que has utilizado `console.log` en tu código, que no es compatible con AssemblyScript. Considera usar la [API de registro](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) La falta de coincidencia en los argumentos se debe a la falta de coincidencia en `graph-ts` y `matchstick-as`. La mejor manera de solucionar problemas como este es actualizar todo a la última versión publicada. diff --git a/website/pages/es/network/benefits.mdx b/website/pages/es/network/benefits.mdx index ebbd4529f7b7..c0e6d9fedf40 100644 --- a/website/pages/es/network/benefits.mdx +++ b/website/pages/es/network/benefits.mdx @@ -27,53 +27,54 @@ Los costos de consulta pueden variar; el costo cotizado es el promedio al moment ## Usuario de bajo volumen (menos de 30,000 consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -|:--------------------------------:|:-----------------------------------------:|:---------------------------------------------------------------------:| -| Costo mensual del servidor\* | $350 por mes | $0 | -| Costos de consulta | $0+ | ~$15 por mes | -| Tiempo de ingeniería | $400 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 30,000 (autoescalando) | -| Costo por consulta | $0 | $0.0005 | -| Infraestructura | Centralizado | Descentralizado | -| Redundancia geográfica | $750+ por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $750+ | ~$15 | +| Comparación de costos | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Costo mensual del servidor\* | $350 por mes | $0 | +| Costos de consulta | $0+ | ~$15 por mes | +| Tiempo de ingeniería | $400 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 30,000 (autoescalando) | +| Costo por consulta | $0 | $0.0005 | +| Infraestructura | Centralizado | Descentralizado | +| Redundancia geográfica | $750+ por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $750+ | ~$15 | ## Usuario de Volumen Medio (3,000,000+ consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -|:--------------------------------:|:-------------------------------------------:|:---------------------------------------------------------------------:| -| Costo mensual del servidor\* | $350 por mes | $0 | -| Costos de consulta | $500 por mes | $750 por mes | -| Tiempo de ingeniería | $800 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 3,000,000+ | -| Costo por consulta | $0 | $0.00025 | -| Infraestructura | Centralizado | Descentralizado | -| Gastos de ingeniería | $200 por hora | Incluido | -| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $1,650+ | $750 | +| Comparación de costos | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Costo mensual del servidor\* | $350 por mes | $0 | +| Costos de consulta | $500 por mes | $750 por mes | +| Tiempo de ingeniería | $800 por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 3,000,000+ | +| Costo por consulta | $0 | $0.00025 | +| Infraestructura | Centralizado | Descentralizado | +| Gastos de ingeniería | $200 por hora | Incluido | +| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $1,650+ | $750 | ## Usuario de alto volumen (30,000,000+ consultas por mes) -| Comparación de costos | Self Hosted | Graph Network | -|:--------------------------------:|:-------------------------------------------:|:---------------------------------------------------------------------:| -| Costo mensual del servidor\* | $1100 por mes, por nodo | $0 | -| Costos de consulta | $4000 | $4,500 por mes | -| Número de nodos necesarios | 10 | No aplica | -| Tiempo de ingeniería | $6,000 o más por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | -| Consultas por mes | Limitado a capacidades de infraestructura | 30,000,000+ | -| Costo por consulta | $0 | $0.00015 | -| Infraestructura | Centralizado | Descentralizado | -| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | -| Tiempo de actividad | Varía | 99.9%+ | -| Costos mensuales totales | $11,000+ | $4,500 | +| Comparación de costos | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Costo mensual del servidor\* | $1100 por mes, por nodo | $0 | +| Costos de consulta | $4000 | $4,500 por mes | +| Número de nodos necesarios | 10 | No aplica | +| Tiempo de ingeniería | $6,000 o más por mes | Ninguno, integrado en la red con Indexadores distribuidos globalmente | +| Consultas por mes | Limitado a capacidades de infraestructura | 30,000,000+ | +| Costo por consulta | $0 | $0.00015 | +| Infraestructura | Centralizado | Descentralizado | +| Redundancia geográfica | $1,200 en costos totales por nodo adicional | Incluido | +| Tiempo de actividad | Varía | 99.9%+ | +| Costos mensuales totales | $11,000+ | $4,500 | \*incluidos los costos de copia de seguridad: $50-$100 por mes Tiempo de ingeniería basado en un supuesto de $200 por hora -utilizando la función de presupuesto máximo de consulta en la pestaña de facturación presupuestaria, manteniendo una alta calidad de servicio +utilizando la función de presupuesto máximo de consulta en la pestaña de facturación presupuestaria, +manteniendo una alta calidad de servicio Costos estimados son solo para los subgrafos de Ethereum Mainnet — los costos son aún más altos cuando se aloja un `graph-node` en otras redes. diff --git a/website/pages/es/network/indexing.mdx b/website/pages/es/network/indexing.mdx index 9b272559f5a6..b3ed8579fb0b 100644 --- a/website/pages/es/network/indexing.mdx +++ b/website/pages/es/network/indexing.mdx @@ -113,11 +113,11 @@ Los indexadores pueden diferenciarse aplicando técnicas avanzadas para tomar de - **Grande**: Preparado para indexar todos los subgrafos utilizados actualmente y atender solicitudes para el tráfico relacionado. | Configuración | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| ------------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Pequeño | 4 | 8 | 1 | 4 | 16 | -| Estándar | 8 | 30 | 1 | 12 | 48 | -| Medio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3,5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Pequeño | 4 | 8 | 1 | 4 | 16 | +| Estándar | 8 | 30 | 1 | 12 | 48 | +| Medio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3,5 | 48 | 184 | ### ¿Qué precauciones básicas de seguridad debe tomar un Indexador? @@ -149,20 +149,20 @@ Nota: Para admitir el escalado ágil, se recomienda que las inquietudes de consu #### Graph Node -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| ------ | -------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------- | -| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | -| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | -| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| --- | --- | --- | --- | --- | +| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | +| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | +| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | #### Servicio de Indexador -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| ------ | --------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | Servidor HTTP GraphQL
    (para consultas de subgrafo pagadas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| --- | --- | --- | --- | --- | +| 7600 | Servidor HTTP GraphQL
    (para consultas de subgrafo pagadas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Métricas de Prometheus | /metrics | --metrics-port | - | #### Agente Indexador diff --git a/website/pages/es/new-chain-integration.mdx b/website/pages/es/new-chain-integration.mdx index d9217c7a4a9e..737ab77226a4 100644 --- a/website/pages/es/new-chain-integration.mdx +++ b/website/pages/es/new-chain-integration.mdx @@ -4,8 +4,7 @@ title: Integración de nuevas redes El Graph Node actualmente puede indexar datos de los siguientes tipos de cadena: -- Ethereum, a través de EVM JSON-RPC y [Ethereum Firehose] - (https://github.com/streamingfast/firehose-ethereum) +- Ethereum, a través de EVM JSON-RPC y [Ethereum Firehose] (https://github.com/streamingfast/firehose-ethereum) - NEAR, a través de [NEAR Firehose] (https://github.com/streamingfast/near-firehose-indexer) - Cosmos, a través de [Cosmos Firehose](https://github.com/graphprotocol/firehose-cosmos) - Arweave, a través de [Arweave Firehose](https://github.com/graphprotocol/firehose-arweave) diff --git a/website/pages/es/operating-graph-node.mdx b/website/pages/es/operating-graph-node.mdx index 4f31998c3146..759184d08cd7 100644 --- a/website/pages/es/operating-graph-node.mdx +++ b/website/pages/es/operating-graph-node.mdx @@ -77,13 +77,13 @@ Puedes encontrar un ejemplo completo de configuración de Kubernetes en el [Inde Cuando está funcionando, Graph Node muestra los siguientes puertos: -| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | -| ------ | -------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------- | -| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | -| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | -| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | +| Puerto | Objeto | Rutas | Argumento CLI | Variable de Entorno | +| --- | --- | --- | --- | --- | +| 8000 | Servidor HTTP GraphQL
    (para consultas de subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (para suscripciones a subgrafos) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para administrar implementaciones) | / | --admin-port | - | +| 8030 | API de estado de indexación de subgrafos | /graphql | --index-node-port | - | +| 8040 | Métricas de Prometheus | /metrics | --metrics-port | - | > **Importante**: Ten cuidado con exponer puertos públicamente - los **puertos de administración** deben mantenerse bloqueados. Esto incluye el punto final JSON-RPC de Graph Node. diff --git a/website/pages/es/querying/graphql-api.mdx b/website/pages/es/querying/graphql-api.mdx index 321ec705c482..2eac7116dad8 100644 --- a/website/pages/es/querying/graphql-api.mdx +++ b/website/pages/es/querying/graphql-api.mdx @@ -208,7 +208,7 @@ En el siguiente ejemplo, estamos filtrando desafíos con `coutcome` `succeeded` ``` > **Azúcar sintáctico**: Puedes simplificar la consulta anterior eliminando el operador `and` pasando una subexpresión separada por comas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Las consultas de búsqueda de texto completo tienen un campo obligatorio, `text` Operadores de búsqueda de texto completo: -| Símbolo | Operador | Descripción | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Para combinar varios términos de búsqueda en un filtro para entidades que incluyen todos los términos proporcionados | -| | | `O` | Las consultas con varios términos de búsqueda separados por o el operador devolverá todas las entidades que coincidan con cualquiera de los términos proporcionados | -| `<->` | `Follow by` | Especifica la distancia entre dos palabras. | -| `:*` | `Prefijo` | Utilice el término de búsqueda del prefijo para encontrar palabras cuyo prefijo coincida (se requieren 2 caracteres.) | +| Símbolo | Operador | Descripción | +| --- | --- | --- | +| `&` | `And` | Para combinar varios términos de búsqueda en un filtro para entidades que incluyen todos los términos proporcionados | +| | | `O` | Las consultas con varios términos de búsqueda separados por o el operador devolverá todas las entidades que coincidan con cualquiera de los términos proporcionados | +| `<->` | `Follow by` | Especifica la distancia entre dos palabras. | +| `:*` | `Prefijo` | Utilice el término de búsqueda del prefijo para encontrar palabras cuyo prefijo coincida (se requieren 2 caracteres.) | #### Ejemplos diff --git a/website/pages/es/release-notes/assemblyscript-migration-guide.mdx b/website/pages/es/release-notes/assemblyscript-migration-guide.mdx index c3770a5c9ef7..bfc973f982dd 100644 --- a/website/pages/es/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/es/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Tendrás que cambiar el nombre de las variables duplicadas si tienes una variable shadowing. + ### Comparaciones Nulas + Al hacer la actualización en un subgrafo, a veces pueden aparecer errores como estos: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Para solucionarlo puedes simplemente cambiar la declaración `if` por algo así: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Para solucionar este problema, puedes crear una variable para ese acceso a la propiedad de manera que el compilador pueda hacer la magia de la comprobación de nulidad: ```typescript diff --git a/website/pages/es/release-notes/graphql-validations-migration-guide.mdx b/website/pages/es/release-notes/graphql-validations-migration-guide.mdx index 5bdf39587e84..fefc282fe99e 100644 --- a/website/pages/es/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/es/release-notes/graphql-validations-migration-guide.mdx @@ -408,7 +408,6 @@ query { user { id image # 'image' requiere un conjunto de selección para subcampos! - } } ``` diff --git a/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx index d43463682da5..45ec79e9d4f9 100644 --- a/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/fr/arbitrum/l2-transfer-tools-faq.mdx @@ -336,13 +336,11 @@ Si vous n’avez transféré aucun solde de contrat de vesting à L2 et que votr ### J’utilise mon contrat de vesting pour investir dans mainnet. Puis-je transférer ma participation à Arbitrum? -Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat d’acquisition L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat d’acquisition dans Explorer. Si -votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. +Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat d’acquisition L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat d’acquisition dans Explorer. Si votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. ### J’utilise mon contrat de vesting pour déléguer sur mainnet. Puis-je transférer mes délégations à Arbitrum? -Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat de vesting L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat de vesting dans Explorer. Si -votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. +Oui, mais si votre contrat est toujours acquis, vous ne pouvez transférer la participation que pour qu’elle soit détenue par votre contrat de vesting L2. Vous devez d’abord initialiser ce contrat L2 en transférant un solde de GRT à l’aide de l’outil de transfert de contrat de vesting dans Explorer. Si votre contrat est entièrement acquis, vous pouvez transférer votre participation à n’importe quelle adresse en L2, mais vous devez le définir au préalable et déposer des GRT pour l’outil de transfert L2 pour payer le gaz L2. ### Puis-je spécifier un bénéficiaire différent pour mon contrat de vesting sur L2? diff --git a/website/pages/fr/cookbook/cosmos.mdx b/website/pages/fr/cookbook/cosmos.mdx index 4cb8ecd18801..ad5486175d46 100644 --- a/website/pages/fr/cookbook/cosmos.mdx +++ b/website/pages/fr/cookbook/cosmos.mdx @@ -48,30 +48,30 @@ La définition d'un subgraph comporte trois éléments clés : Le manifeste du subgraph (`subgraph.yaml`) identifie les sources de données du subgraph, les déclencheurs d'intérêt et les fonctions (`handlers`) qui doivent être exécutées en réponse à ces déclencheurs. Vous trouverez ci-dessous un exemple de manifeste de subgraph pour un subgraph Cosmos : ```yaml -version spec : 0.0.5 -description : Exemple de subgraph Cosmos +version spec: 0.0.5 +description: Exemple de subgraph Cosmos schéma: - fichier : ./schema.graphql # lien vers le fichier de schéma + fichier: ./schema.graphql # lien vers le fichier de schéma les sources de données: - - genre : cosmos - nom : CosmosHub - réseau : cosmoshub-4 # Cela changera pour chaque blockchain basée sur le cosmos. Dans ce cas, l’exemple utilise le mainnet Cosmos Hub. - source: - startBlock : 0 # Requis pour Cosmos, définissez-le sur 0 pour démarrer l'indexation à partir de la genèse de la chaîne - cartographie : - Version api : 0.0.7 - langage : wasm/assemblyscript - gestionnaires de blocs : - - handler: handleNewBlock # le nom de la fonction dans le fichier de mappage - Gestionnaires d'événements : - - event : récompenses # le type d'événement qui sera géré - handler: handleReward # le nom de la fonction dans le fichier de mappage - Gestionnaires de transactions : - - handler: handleTransaction # le nom de la fonction dans le fichier de mappage - Gestionnaires de messages : - - message : /cosmos.staking.v1beta1.MsgDelegate # le type d'un message - handler : handleMsgDelegate # le nom de la fonction dans le fichier de mappage - fichier : ./src/mapping.ts # lien vers le fichier avec les mappages Assemblyscript + - genre: cosmos + nom: CosmosHub + réseau: cosmoshub-4 # Cela changera pour chaque blockchain basée sur le cosmos. Dans ce cas, l’exemple utilise le mainnet Cosmos Hub. + source: + startBlock: 0 # Requis pour Cosmos, définissez-le sur 0 pour démarrer l'indexation à partir de la genèse de la chaîne + cartographie: + Version api: 0.0.7 + langage: wasm/assemblyscript + gestionnaires de blocs: + - handler: handleNewBlock # le nom de la fonction dans le fichier de mappage + Gestionnaires d'événements: + - event: récompenses # le type d'événement qui sera géré + handler: handleReward # le nom de la fonction dans le fichier de mappage + Gestionnaires de transactions: + - handler: handleTransaction # le nom de la fonction dans le fichier de mappage + Gestionnaires de messages: + - message: /cosmos.staking.v1beta1.MsgDelegate # le type d'un message + handler: handleMsgDelegate # le nom de la fonction dans le fichier de mappage + fichier: ./src/mapping.ts # lien vers le fichier avec les mappages Assemblyscript ``` - Les subgraphs cosmos introduisent un nouveau `type` de source de données (`cosmos`). diff --git a/website/pages/fr/cookbook/near.mdx b/website/pages/fr/cookbook/near.mdx index 938ad8a0922f..b1e19c5a58e9 100644 --- a/website/pages/fr/cookbook/near.mdx +++ b/website/pages/fr/cookbook/near.mdx @@ -53,23 +53,23 @@ $ graph build # génère le Web Assembly à partir des fichiers AssemblyScript, Le manifeste de subgraph (`subgraph.yaml`) identifie les sources de données pour le subgraph, les déclencheurs d'intérêt et les fonctions qui doivent être exécutées en réponse à ces déclencheurs. Voici un exemple de manifeste de subgraph pour un subgraph NEAR: ```yaml -specVersion : 0.0.2 -schema : - file : ./src/schema.graphql # lien vers le fichier de schéma -dataSources : - - kind : near - network : near-mainnet - source : - account : app.good-morning.near # Cette source de données surveillera ce compte - startBlock : 10662188 # Requis pour NEAR - mapping : - apiVersion : 0.0.5 - language : wasm/assemblyscript - blockHandlers : - - handler : handleNewBlock # le nom de la fonction dans le fichier de mapping - receiptHandlers : - - handler : handleReceipt # le nom de la fonction dans le fichier de mappage - file : ./src/mapping.ts # lien vers le fichier contenant les mappings Assemblyscript +specVersion: 0.0.2 +schema: + file: ./src/schema.graphql # lien vers le fichier de schéma +dataSources: + - kind: near + network: near-mainnet + source: + account: app.good-morning.near # Cette source de données surveillera ce compte + startBlock: 10662188 # Requis pour NEAR + mapping: + apiVersion: 0.0.5 + language: wasm/assemblyscript + blockHandlers: + - handler: handleNewBlock # le nom de la fonction dans le fichier de mapping + receiptHandlers: + - handler: handleReceipt # le nom de la fonction dans le fichier de mappage + file: ./src/mapping.ts # lien vers le fichier contenant les mappings Assemblyscript ``` - Les subgraphs NEAR introduisent un nouveau `type` de source de données (`near`) @@ -79,12 +79,12 @@ dataSources : ```yaml comptes: - préfixes : - - application - - bien - suffixes : - - matin.près - - matin.testnet + préfixes: + - application + - bien + suffixes: + - matin.près + - matin.testnet ``` Les fichiers de données NEAR prennent en charge deux types de gestionnaires : @@ -259,8 +259,8 @@ Si un `compte` est spécifié, il correspondra uniquement au nom exact du compte ```yaml comptes: - suffixes : - - mintbase1.near + suffixes: + - mintbase1.near ``` ### Les subgraphs NEAR peuvent-ils faire des appels de view aux comptes NEAR pendant les mappings? diff --git a/website/pages/fr/cookbook/upgrading-a-subgraph.mdx b/website/pages/fr/cookbook/upgrading-a-subgraph.mdx index aa8894a26644..fa1225a9d7df 100644 --- a/website/pages/fr/cookbook/upgrading-a-subgraph.mdx +++ b/website/pages/fr/cookbook/upgrading-a-subgraph.mdx @@ -134,7 +134,7 @@ Toutes nos félicitations! Vous êtes désormais un pionnier de la décentralisa ```graphql { - stakers(block : { number_gte : 14486109 }) { + stakers(block: { number_gte: 14486109 }) { id } } diff --git a/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx index e4e1379c8942..2a9f63ada4c2 100644 --- a/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/fr/deploying/deploying-a-subgraph-to-hosted.mdx @@ -186,8 +186,8 @@ et ```json { - "réseau": "goerli", - "adresse": "0xabc..." + "réseau": "goerli", + "adresse": "0xabc..." } ``` diff --git a/website/pages/fr/developing/creating-a-subgraph.mdx b/website/pages/fr/developing/creating-a-subgraph.mdx index 73db1fe19107..f5a3f5c9891e 100644 --- a/website/pages/fr/developing/creating-a-subgraph.mdx +++ b/website/pages/fr/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Pour certains types d'entités, l'`id` est construit à partir des identifiants 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` | La spécification GraphQL définit `Int` pour avoir une taille de 32 octets. | -| `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 **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 @@ -716,7 +716,7 @@ dataSources: ``` > **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. @@ -906,12 +906,12 @@ Dans la fonction de gestionnaire, le reçu est accessible dans le champ `Event.r À 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) | `nonFatalErrors` | -| [Recherche en texte intégral](#defining-fulltext-search-fields) | `fullTextSearch` | -| [La greffe](#grafting-onto-existing-subgraphs) | `grafting` | -| [IPFS sur les contrats Ethereum](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` ou `nonDeterministicIpfs` | +| Fonctionnalité | Nom | +| --- | --- | +| [Erreurs non fatales](#non-fatal-errors) | `nonFatalErrors` | +| [Recherche en texte intégral](#defining-fulltext-search-fields) | `fullTextSearch` | +| [La greffe](#grafting-onto-existing-subgraphs) | `grafting` | +| [IPFS sur les contrats Ethereum](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` ou `nonDeterministicIpfs` | 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 : @@ -1166,7 +1166,7 @@ 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 { +export function handleTransfer(event: TransferEvent): void { let token = Token.load(event.params.tokenId.toString()) if (!token) { token = new Token(event.params.tokenId.toString()) diff --git a/website/pages/fr/developing/graph-ts/api.mdx b/website/pages/fr/developing/graph-ts/api.mdx index b13a30605e61..f7bf1a3715f1 100644 --- a/website/pages/fr/developing/graph-ts/api.mdx +++ b/website/pages/fr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Notes de version | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Notes de version | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Types intégrés @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Référence des conversions de types -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Métadonnées de la source de données diff --git a/website/pages/fr/developing/unit-testing-framework.mdx b/website/pages/fr/developing/unit-testing-framework.mdx index 51a8a15d219e..bb0bd1d30bef 100644 --- a/website/pages/fr/developing/unit-testing-framework.mdx +++ b/website/pages/fr/developing/unit-testing-framework.mdx @@ -901,7 +901,7 @@ Les utilisateurs peuvent également simuler une panne critique, comme ceci : ```typescript test('Tout faire exploser', () => { - log.critical('Boom!') + log.critical('Boom!') }) ``` @@ -1082,15 +1082,15 @@ La sortie du journal inclut la durée de l’exécution du test. Voici un exempl Cela signifie que vous avez utilisé `console.log` dans votre code, ce qui n'est pas pris en charge par AssemblyScript. Veuillez envisager d'utiliser l'[API Logging](/developing/assemblyscript-api/#logging-api) > ERREUR TS2554 : attendu ? arguments, mais j'ai eu ?. -> +> > renvoyer le nouveau ethereum.Block (defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt) ; -> +> > dans ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > renvoyer un nouveau ethereum.Transaction (defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt) ; -> +> > dans ~lib/matchstick-as/assembly/defaults.ts(24,12) L'inadéquation des arguments est causée par une inadéquation entre `graph-ts` et `matchstick-as`. La meilleure façon de résoudre des problèmes comme celui-ci est de tout mettre à jour vers la dernière version publiée. diff --git a/website/pages/fr/network/benefits.mdx b/website/pages/fr/network/benefits.mdx index 93e03fdda0df..a6e3fd0c75b9 100644 --- a/website/pages/fr/network/benefits.mdx +++ b/website/pages/fr/network/benefits.mdx @@ -27,53 +27,54 @@ Les coûts des requêtes peuvent varier ; le coût indiqué est la moyenne au m ## Utilisateur à faible volume (moins de 30 000 requêtes par mois) -| Cost Comparison | Auto-hébergé | Réseau de The Graph | -|:------------------------------:|:-----------------------------------------:|:---------------------------------------------------------------------------:| -| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | -| Frais de requête | + 0 $ | ~15 $ au mois | -| Temps d'ingénierie | 400 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | 30 000 (automatique mise à l'échelle) | -| Tarif par requête | 0 $ | 0,0005 $ | -| Les infrastructures | Centralisée | Décentralisée | -| La redondance géographique | 750$+ par nœud complémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | + 750 $ | ~15 $ | +| Cost Comparison | Auto-hébergé | Réseau de The Graph | +| :-: | :-: | :-: | +| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | +| Frais de requête | + 0 $ | ~15 $ au mois | +| Temps d'ingénierie | 400 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | 30 000 (automatique mise à l'échelle) | +| Tarif par requête | 0 $ | 0,0005 $ | +| Les infrastructures | Centralisée | Décentralisée | +| La redondance géographique | 750$+ par nœud complémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | + 750 $ | ~15 $ | ## Utilisateur moyen (3 000 000+ demandes par mois) -| Comparaison de coût | Auto-hébergé | Réseau de The Graph | -|:------------------------------:|:------------------------------------------:|:---------------------------------------------------------------------------:| -| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | -| Frais de requête | 500 $ au mois | 750 $ au mois | -| Temps d'ingénierie | 800 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | + 3 000 000 | -| Tarif par requête | 0 $ | 0,00025 $ | -| L'infrastructure | Centralisée | Décentralisée | -| Frais d'ingénierie | 200 $ au mois | Compris | -| La redondance géographique | 1 200 $ coût total par nœud supplémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | $1,650+ | $750 | +| Comparaison de coût | Auto-hébergé | Réseau de The Graph | +| :-: | :-: | :-: | +| Coût mensuel du serveur\* | 350 $ au mois | 0 $ | +| Frais de requête | 500 $ au mois | 750 $ au mois | +| Temps d'ingénierie | 800 $ au mois | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | + 3 000 000 | +| Tarif par requête | 0 $ | 0,00025 $ | +| L'infrastructure | Centralisée | Décentralisée | +| Frais d'ingénierie | 200 $ au mois | Compris | +| La redondance géographique | 1 200 $ coût total par nœud supplémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | $1,650+ | $750 | ## L'utilisateur de volume conséquent (30 000 000+ requêtes au mois) -| Cost Comparison | Auto-hébergé | Réseau de The Graph | -|:------------------------------:|:-----------------------------------------------:|:---------------------------------------------------------------------------:| -| Coût mensuel du serveur\* | $1100 per month, per node | 0 $ | -| Frais de requête | $4000 | $4,500 per month | -| Nombre de nœuds obligatoires | 10 | Sans objet | -| Temps d'ingénierie | $6,000 or more per month | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | -| Requêtes au mois | Limité aux capacités infra | + 30 000 000 | -| Tarif par requête | 0 $ | 0,00015 $ | -| L'infrastructure | Centralisée | Décentralisée | -| La redondance géographique | 1 200 $ de coûts totaux par nœud supplémentaire | Compris | -| Temps de disponibilité | Variable | + 99.9% | -| Total des coûts mensuels | + 11 000 $ | $4,500 | +| Cost Comparison | Auto-hébergé | Réseau de The Graph | +| :-: | :-: | :-: | +| Coût mensuel du serveur\* | $1100 per month, per node | 0 $ | +| Frais de requête | $4000 | $4,500 per month | +| Nombre de nœuds obligatoires | 10 | Sans objet | +| Temps d'ingénierie | $6,000 or more per month | Aucun, intégré au réseau avec des indexeurs distribués à l'échelle mondiale | +| Requêtes au mois | Limité aux capacités infra | + 30 000 000 | +| Tarif par requête | 0 $ | 0,00015 $ | +| L'infrastructure | Centralisée | Décentralisée | +| La redondance géographique | 1 200 $ de coûts totaux par nœud supplémentaire | Compris | +| Temps de disponibilité | Variable | + 99.9% | +| Total des coûts mensuels | + 11 000 $ | $4,500 | \*y compris les coûts de sauvegarde : $50-$ à 100 dollars au mois Temps d'ingénierie basé sur une hypothèse de 200 $ de l'heure - en utilisant la fonction "max query budget" dans l'onglet "budget billing", tout en maintenant une qualité de service élevée + en utilisant la fonction "max query budget" dans l'onglet "budget billing", tout en maintenant une qualité de +service élevée Les coûts estimés ne concernent que les subgraphs du Mainnet Ethereum - les coûts sont encore plus élevés en cas d'auto-hébergement d'un `graph-node` sur d'autres réseaux. diff --git a/website/pages/fr/network/delegating.mdx b/website/pages/fr/network/delegating.mdx index 980ace6dad0d..1f6648e16226 100644 --- a/website/pages/fr/network/delegating.mdx +++ b/website/pages/fr/network/delegating.mdx @@ -33,8 +33,8 @@ Lorsqu'un délégué souhaite se dé-déléguer, ses jetons sont soumis à une p Il convient également de choisir judicieusement un indexeur. Si vous choisissez un indexeur qui n'est pas digne de confiance ou qui ne fait pas du bon travail, vous voudrez annuler la délégation, ce qui signifie que vous perdrez beaucoup d'occasions de gagner des récompenses, ce qui peut être tout aussi grave que de brûler des TRG.
    - !Délégation débondage](/img/Delegation-Unbonding.png) _Notez la commission de 0,5% dans l'interface utilisateur de la délégation, ainsi que la période de débondage de 28 jours. - de 28 jours + !Délégation débondage](/img/Delegation-Unbonding.png) _Notez la commission de 0,5% dans l'interface utilisateur de la + délégation, ainsi que la période de débondage de 28 jours. de 28 jours
    ### Choisir un indexeur digne de confiance avec une rémunération équitable pour les délégués @@ -45,7 +45,7 @@ Réduction de la récompense d'indexation - La réduction de la récompense d'in
    ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Le meilleur indexeur donne aux délégués 90 % des récompenses. Le - celui du milieu donne 20 % aux délégués. Celui du bas donne aux délégués environ 83 %.* + celui du milieu donne 20 % aux délégués. Celui du bas donne aux délégués environ 83 %.*
    - Réduction des frais de requête – Cela fonctionne exactement comme la réduction des récompenses d’indexation. Cependant, cela concerne spécifiquement les retours sur les frais de requête collectés par l’indexeur. Il convient de noter qu’au démarrage du réseau, les retours sur les frais de requête seront très faibles par rapport à la récompense d’indexation. Il est recommandé de prêter attention au réseau pour déterminer quand les frais de requête sur le réseau commenceront à être plus importants. diff --git a/website/pages/fr/network/indexing.mdx b/website/pages/fr/network/indexing.mdx index 82d105c1006e..c6045ec4adcd 100644 --- a/website/pages/fr/network/indexing.mdx +++ b/website/pages/fr/network/indexing.mdx @@ -113,11 +113,11 @@ Les indexeurs peuvent se différencier en appliquant des techniques avancées po - **Large** : Prêt à indexer tous les subgraphs actuellement utilisés et à répondre aux demandes pour le trafic associé. | Installation | Postgres
    (CPUs) | Postgres
    (mémoire en Gbs) | Postgres
    (disque en TB) | VMs
    (CPUs) | VMs
    (mémoire en Gbs) | -| ------------ |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| -| Petit | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 11 | 12 | 48 | -| Moyen | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | | +| --- | :-: | :-: | :-: | :-: | :-: | +| Petit | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 11 | 12 | 48 | +| Moyen | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | | ### Quelles sont les précautions de sécurité de base qu’un indexeur doit prendre ? @@ -149,20 +149,20 @@ Remarque : Pour prendre en charge la mise à l'échelle agile, il est recommand #### Nœud de The Graph -| Port | Objectif | Routes | Paramètre CLI | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Objectif | Routes | Paramètre CLI | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/fr/operating-graph-node.mdx b/website/pages/fr/operating-graph-node.mdx index 60e9383e74c0..3f8f8b844054 100644 --- a/website/pages/fr/operating-graph-node.mdx +++ b/website/pages/fr/operating-graph-node.mdx @@ -77,13 +77,13 @@ Un exemple complet de configuration de Kubernetes est disponible dans le [dépô Lorsqu'il est en cours d'exécution, Graph Node expose les ports suivants : -| Port | Objectif | Routes | Paramètre CLI | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Objectif | Routes | Paramètre CLI | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphq | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important** : Soyez prudent lorsque vous exposez les ports publiquement : les **ports d'administration** doivent rester verrouillés. Cela inclut le point de terminaison Graph Node JSON-RPC. diff --git a/website/pages/fr/querying/graphql-api.mdx b/website/pages/fr/querying/graphql-api.mdx index 842b3bb27033..2fe9bc582f62 100644 --- a/website/pages/fr/querying/graphql-api.mdx +++ b/website/pages/fr/querying/graphql-api.mdx @@ -210,7 +210,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -324,12 +324,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Utilisez le terme de recherche de préfixe pour trouver les mots dont le préfixe correspond (2 caractères requis.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Utilisez le terme de recherche de préfixe pour trouver les mots dont le préfixe correspond (2 caractères requis.) | #### Exemples diff --git a/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx index e782a13b7e2b..f5f9aa6d440c 100644 --- a/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/fr/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Vous devrez renommer vos variables en double si vous conservez une observation de variables. + ### Comparaisons nulles + En effectuant la mise à niveau sur votre subgraph, vous pouvez parfois obtenir des erreurs comme celles-ci : ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Pour résoudre, vous pouvez simplement remplacer l'instruction `if` par quelque chose comme ceci : ```typescript @@ -209,7 +213,7 @@ Dans ces cas-là, vous pouvez utiliser la fonction `changetype` : class Bytes extends Uint8Array {} let uint8Array = new Uint8Array(2) -changetype(uint8Array ) // fonctionne :) +changetype(uint8Array) // fonctionne :) ``` ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Pour résoudre ce problème, vous pouvez créer une variable pour l'accès à cette propriété afin que le compilateur puisse effectuer la vérification magique de la nullité : ```typescript @@ -401,7 +406,7 @@ type Total @entity { let total = Total.load('latest') if (total === null) { - total = new Total('latest') // initialise déjà les propriétés non-nullables + total = new Total('latest') // initialise déjà les propriétés non-nullables } total.amount = total.amount + BigInt.fromI32(1) @@ -483,12 +488,12 @@ Vous ne pouvez désormais plus définir de champs dans vos types qui sont des li ```graphql type Something @entity { - id: Bytes! + id: Bytes! } type MyEntity @entity { - id: Bytes! - invalidField: [Something]! # n'est plus valide + id: Bytes! + invalidField: [Something]! # n'est plus valide } ``` diff --git a/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx b/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx index c3ce4f6a32f5..f0c63bc8feed 100644 --- a/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/fr/release-notes/graphql-validations-migration-guide.mdx @@ -103,7 +103,7 @@ query myData { } query myData2 { - # renommer la deuxième requête + # renommer la deuxième requête name } ``` @@ -158,7 +158,7 @@ _Solution:_ ```graphql query myData($id: String) { - # conserver la variable pertinente (ici : `$id: String`) + # conserver la variable pertinente (ici : `$id: String`) id ...MyFields } @@ -259,7 +259,7 @@ query { ```graphql # Différents arguments peuvent conduire à des données différentes, -# donc nous ne pouvons pas supposer que les champs seront les mêmes. +# donc nous ne pouvons pas supposer que les champs seront les mêmes. query { dogs { doesKnowCommand(dogCommand: SIT) diff --git a/website/pages/hi/cookbook/subgraph-debug-forking.mdx b/website/pages/hi/cookbook/subgraph-debug-forking.mdx index 32e1df5a58dd..60d88d3f07c9 100644 --- a/website/pages/hi/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/hi/cookbook/subgraph-debug-forking.mdx @@ -8,11 +8,11 @@ title: फोर्क्स का उपयोग करके त्वरि **सबग्राफ फोर्किंग** आलसी ढंग से _दूसरे_ सबग्राफ के स्टोर (आमतौर पर एक परोक्ष सबग्राफ) से इकाइयां को लाने की प्रक्रिया है। -डिबगिंग के संदर्भ में, **सबग्राफ फोर्किंग** आपको ब्लॉक_X_ को सिंक-अप करने के लिए बिना प्रतीक्षा किए ब्लॉक _X_ पर अपने विफल सबग्राफ को डीबग करने की अनुमति देता है । +डिबगिंग के संदर्भ में, **सबग्राफ फोर्किंग** आपको ब्लॉक*X* को सिंक-अप करने के लिए बिना प्रतीक्षा किए ब्लॉक _X_ पर अपने विफल सबग्राफ को डीबग करने की अनुमति देता है । ## क्या?! कैसे? -जब आप अनुक्रमण के लिए एक दूरस्थ ग्राफ़ नोड पर एक सबग्राफ तैनात करते हैं और यह ब्लॉक _X_ करने में विफल रहता है, तो अच्छी खबर यह है कि ग्राफ़ नोड अभी भी अपने स्टोर का उपयोग करके ग्राफ़क्यूएल क्वेरी को सर्व करेगा, जो ब्लॉक_X_ में सिंक-अप है। एक दम बढ़िया! इसका मतलब यह है कि ब्लॉक _X_ को अनुक्रमित करते समय उत्पन्न होने वाली बग को ठीक करने के लिए हम इस "अप-टू-डेट" स्टोर का लाभ उठा सकते हैं। +जब आप अनुक्रमण के लिए एक दूरस्थ ग्राफ़ नोड पर एक सबग्राफ तैनात करते हैं और यह ब्लॉक _X_ करने में विफल रहता है, तो अच्छी खबर यह है कि ग्राफ़ नोड अभी भी अपने स्टोर का उपयोग करके ग्राफ़क्यूएल क्वेरी को सर्व करेगा, जो ब्लॉक*X* में सिंक-अप है। एक दम बढ़िया! इसका मतलब यह है कि ब्लॉक _X_ को अनुक्रमित करते समय उत्पन्न होने वाली बग को ठीक करने के लिए हम इस "अप-टू-डेट" स्टोर का लाभ उठा सकते हैं। संक्षेप में, हम एक दूरस्थ ग्राफ नोड से _असफल सबग्राफ को फोर्क करने जा रहे हैं_ जो सबग्राफ को ब्लॉक _X_ तक अनुक्रमित होने की गारंटी देता है ताकि ब्लॉक _X_ पर डिबग किए जा रहे स्थानीय रूप से तैनात सबग्राफ को इंडेक्सिंग स्थिति का एक अप-टू-डेट दृश्य प्रदान हो सकें। diff --git a/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx index c0066e9fdc84..6d3eca9af3bf 100644 --- a/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/hi/deploying/deploying-a-subgraph-to-hosted.mdx @@ -98,9 +98,9 @@ Options: } ``` -**ध्यान दें:** कॉन्फ़िग फ़ाइल में आपको कोई `टेम्प्लेट` (यदि आपके पास है) निर्दिष्ट करने की आवश्यकता नहीं है, केवल ` डेटा सोर्स `। यदि `subgraph.yaml` फ़ाइल में कोई `टेम्प्लेट` घोषित है, तो उनका नेटवर्क स्वचालित रूप से `--network` विकल्प के साथ निर्दिष्ट एक में अपडेट हो जाएगा. +**ध्यान दें:** कॉन्फ़िग फ़ाइल में आपको कोई `टेम्प्लेट` (यदि आपके पास है) निर्दिष्ट करने की आवश्यकता नहीं है, केवल `डेटा सोर्स`। यदि `subgraph.yaml` फ़ाइल में कोई `टेम्प्लेट` घोषित है, तो उनका नेटवर्क स्वचालित रूप से `--network` विकल्प के साथ निर्दिष्ट एक में अपडेट हो जाएगा. -अब, मान लें कि आप अपने सबग्राफ को ` mainnet ` और `goerli` नेटवर्क पर तैनात करना चाहते हैं, और यह आपका `subgraph.yaml` है: +अब, मान लें कि आप अपने सबग्राफ को `mainnet` और `goerli` नेटवर्क पर तैनात करना चाहते हैं, और यह आपका `subgraph.yaml` है: ```yaml # ... @@ -159,7 +159,7 @@ dataSources: अब आप `yarn deploy` करने के लिए तैयार हैं| -**ध्यान दें:** जैसा कि पहले उल्लेख किया गया है, `graph-cli 0.32.0` के बाद से आप सीधे `yarn deploy` चला सकते हैं ` --नेटवर्क ` विकल्प के साथ: +**ध्यान दें:** जैसा कि पहले उल्लेख किया गया है, `graph-cli 0.32.0` के बाद से आप सीधे `yarn deploy` चला सकते हैं `--नेटवर्क` विकल्प के साथ: ```sh # Using default networks.json file diff --git a/website/pages/hi/developing/creating-a-subgraph.mdx b/website/pages/hi/developing/creating-a-subgraph.mdx index 50f6bf0e7492..b146210f6aec 100644 --- a/website/pages/hi/developing/creating-a-subgraph.mdx +++ b/website/pages/hi/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ type GravatarDeclined @entity { हम अपने ग्राफक्यूएल एपीआई में निम्नलिखित स्केलर्स का समर्थन करते हैं: -| प्रकार | विवरण | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | बाइट सरणी, एक हेक्साडेसिमल स्ट्रिंग के रूप में दर्शाया गया है। आमतौर पर एथेरियम हैश और पतों के लिए उपयोग किया जाता है। | -| `String` | `स्ट्रिंग` मानों के लिए स्केलर। अशक्त वर्ण समर्थित नहीं हैं और स्वचालित रूप से हटा दिए जाते हैं। | -| `Boolean` | `boolean` मानों के लिए स्केलर। | -| `Int` | ग्राफक्लाइन स्पेक `Int` को 32 बाइट्स के आकार के रूप में परिभाषित करता है। | -| `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` | बड़े पूर्णांक। एथेरियम के `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारों के लिए उपयोग किया जाता है। नोट: `uint32` के नीचे सब कुछ, जैसे `int32`, `uint24` या `int8` को `i32` के रूप में दर्शाया गया है। | -| `BigDecimal` | `BigDecimal` उच्च परिशुद्धता दशमलव एक महत्व और एक प्रतिपादक के रूप में दर्शाया गया है। एक्सपोनेंट रेंज -6143 से +6144 तक है। 34 महत्वपूर्ण अंकों तक गोल। | +| प्रकार | विवरण | +| --- | --- | +| `Bytes` | बाइट सरणी, एक हेक्साडेसिमल स्ट्रिंग के रूप में दर्शाया गया है। आमतौर पर एथेरियम हैश और पतों के लिए उपयोग किया जाता है। | +| `String` | `स्ट्रिंग` मानों के लिए स्केलर। अशक्त वर्ण समर्थित नहीं हैं और स्वचालित रूप से हटा दिए जाते हैं। | +| `Boolean` | `boolean` मानों के लिए स्केलर। | +| `Int` | ग्राफक्लाइन स्पेक `Int` को 32 बाइट्स के आकार के रूप में परिभाषित करता है। | +| `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` | बड़े पूर्णांक। एथेरियम के `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारों के लिए उपयोग किया जाता है। नोट: `uint32` के नीचे सब कुछ, जैसे `int32`, `uint24` या `int8` को `i32` के रूप में दर्शाया गया है। | +| `BigDecimal` | `BigDecimal` उच्च परिशुद्धता दशमलव एक महत्व और एक प्रतिपादक के रूप में दर्शाया गया है। एक्सपोनेंट रेंज -6143 से +6144 तक है। 34 महत्वपूर्ण अंकों तक गोल। | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **ध्यान दें:** एक नया डेटा स्रोत केवल उस ब्लॉक के लिए कॉल और ईवेंट को प्रोसेस करेगा जिसमें इसे बनाया गया था और सभी बाद के ब्लॉक, लेकिन ऐतिहासिक डेटा, यानी डेटा को प्रोसेस नहीं करेगा जो पिछले ब्लॉकों में निहित है। -> +> > यदि पिछले ब्लॉक में नए डेटा स्रोत के लिए प्रासंगिक डेटा है, तो उस डेटा को अनुबंध की वर्तमान स्थिति को पढ़कर और नए डेटा स्रोत के निर्माण के समय उस स्थिति का प्रतिनिधित्व करने वाली संस्थाओं का निर्माण करना सबसे अच्छा है। ### डेटा स्रोत प्रसंग @@ -716,7 +716,7 @@ dataSources: ``` > **ध्यान दें:** इथरस्कैन पर अनुबंध निर्माण ब्लॉक को जल्दी से देखा जा सकता है: -> +> > 1. खोज बार में उसका पता दर्ज करके अनुबंध की खोज करें। > 2. `अनुबंध निर्माता` अनुभाग में निर्माण लेनदेन हैश पर क्लिक करें। > 3. लेन-देन विवरण पृष्ठ लोड करें जहां आपको उस अनुबंध के लिए प्रारंभ ब्लॉक मिलेगा। diff --git a/website/pages/hi/developing/graph-ts/api.mdx b/website/pages/hi/developing/graph-ts/api.mdx index 3bf086fc0ce9..89ee43d6d0bb 100644 --- a/website/pages/hi/developing/graph-ts/api.mdx +++ b/website/pages/hi/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| संस्करण | रिलीज नोट्स | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| संस्करण | रिलीज नोट्स | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### अंतर्निहित प्रकार @@ -559,7 +559,11 @@ The `log` API includes the following functions: The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. ```typescript -log.info ('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [value.toString (), OtherValue.toString (), 'पहले से ही एक स्ट्रिंग']) +log.info('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [ + value.toString(), + OtherValue.toString(), + 'पहले से ही एक स्ट्रिंग', +]) ``` #### एक या अधिक मान लॉग करना @@ -734,44 +738,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### प्रकार रूपांतरण संदर्भ -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() या s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() या s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() या s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() या s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### डेटा स्रोत मेटाडेटा diff --git a/website/pages/hi/developing/unit-testing-framework.mdx b/website/pages/hi/developing/unit-testing-framework.mdx index 099384d0267b..c84914d9ebd0 100644 --- a/website/pages/hi/developing/unit-testing-framework.mdx +++ b/website/pages/hi/developing/unit-testing-framework.mdx @@ -409,7 +409,7 @@ describe('handleUpdatedGravatars', () => { उदाहरण: -प्रत्येक परीक्षण के बाद ` afterEach ` के अंदर का कोड निष्पादित होगा। +प्रत्येक परीक्षण के बाद `afterEach` के अंदर का कोड निष्पादित होगा। ```typescript import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" @@ -448,7 +448,7 @@ describe("handleUpdatedGravatar", () => { }) ``` -उस वर्णन में प्रत्येक परीक्षण के बाद ` afterEach ` के अंदर का कोड निष्पादित होगा +उस वर्णन में प्रत्येक परीक्षण के बाद `afterEach` के अंदर का कोड निष्पादित होगा ```typescript import { describe, test, beforeEach, afterEach } from "matchstick-as/assembly/index" @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). इसका अर्थ है कि आपने अपने कोड में `console.log` का उपयोग किया है, जो कि असेंबलीस्क्रिप्ट द्वारा समर्थित नहीं है। कृपया [लॉगिंग API](/Developing/assemblyscript-api/#logging-api) का उपयोग करने पर विचार करें > त्रुटि TS2554: अपेक्षित? तर्क, लेकिन मिला ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > त्रुटि TS2554: अपेक्षित? तर्क, लेकिन मिला ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) तर्कों में बेमेल `ग्राफ़-टीएस` और `मैचस्टिक-एज़` में बेमेल होने के कारण होता है। इस तरह की समस्याओं को ठीक करने का सबसे अच्छा तरीका है कि सभी चीज़ों को नवीनतम रिलीज़ किए गए संस्करण में अपडेट कर दिया जाए. diff --git a/website/pages/hi/network/benefits.mdx b/website/pages/hi/network/benefits.mdx index fe2a99679c50..b145895e7853 100644 --- a/website/pages/hi/network/benefits.mdx +++ b/website/pages/hi/network/benefits.mdx @@ -27,47 +27,47 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## कम मात्रा वाले उपयोगकर्ता (प्रति माह 30,000 से कम प्रश्न) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -|:------------------------------:|:---------------------------------------:|:----------------------------------------------------------------------:| -| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | -| पूछताछ लागत | $0+ | ~ $ 15 प्रति माह | -| इंजीनियरिंग का समय | $ 400 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000 (ऑटो स्केलिंग) | -| लागत प्रति क्वेरी | $0 | $0.0005 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| भौगोलिक अतिरेक | $750+ प्रति अतिरिक्त नोड | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $750+ | ~$15 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | +| पूछताछ लागत | $0+ | ~ $ 15 प्रति माह | +| इंजीनियरिंग का समय | $ 400 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000 (ऑटो स्केलिंग) | +| लागत प्रति क्वेरी | $0 | $0.0005 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| भौगोलिक अतिरेक | $750+ प्रति अतिरिक्त नोड | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $750+ | ~$15 | ## मध्यम मात्रा उपयोगकर्ता (3,000,000+ प्रश्न प्रति माह) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -|:------------------------------:|:------------------------------------------:|:----------------------------------------------------------------------:| -| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | -| पूछताछ लागत | $ 500 प्रति माह | $750 प्रति माह | -| इंजीनियरिंग का समय | $800 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 3,000,000+ | -| लागत प्रति क्वेरी | $0 | $0.00025 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| इंजीनियरिंग खर्च | $ 200 प्रति घंटा | शामिल | -| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $1,650+ | $750 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्वर लागत\* | $350 प्रति माह | $0 | +| पूछताछ लागत | $ 500 प्रति माह | $750 प्रति माह | +| इंजीनियरिंग का समय | $800 प्रति माह | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 3,000,000+ | +| लागत प्रति क्वेरी | $0 | $0.00025 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| इंजीनियरिंग खर्च | $ 200 प्रति घंटा | शामिल | +| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $1,650+ | $750 | ## उच्च मात्रा उपयोगकर्ता (30,000,000+ प्रश्न प्रति माह) -| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | -|:------------------------------:|:-------------------------------------------:|:----------------------------------------------------------------------:| -| मासिक सर्वर लागत\* | $1100 प्रति माह, प्रति नोड | $0 | -| पूछताछ लागत | $4000 | $4,500 per month | -| आवश्यक नोड्स की संख्या | 10 | Not applicable | -| इंजीनियरिंग का समय | $6,000 or more per month | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | -| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000,000+ | -| लागत प्रति क्वेरी | $0 | $0.00015 | -| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | -| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | -| अपटाइम | भिन्न | 99.9%+ | -| कुल मासिक लागत | $11,000+ | $4,500 | +| लागत तुलना | स्वयं होस्ट किया गया | ग्राफ नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्वर लागत\* | $1100 प्रति माह, प्रति नोड | $0 | +| पूछताछ लागत | $4000 | $4,500 per month | +| आवश्यक नोड्स की संख्या | 10 | Not applicable | +| इंजीनियरिंग का समय | $6,000 or more per month | कोई नहीं, विश्व स्तर पर वितरित इंडेक्सर्स के साथ नेटवर्क में बनाया गया | +| प्रति माह प्रश्न | इन्फ्रा क्षमताओं तक सीमित | 30,000,000+ | +| लागत प्रति क्वेरी | $0 | $0.00015 | +| आधारभूत संरचना | केंद्रीकृत | विकेन्द्रीकृत | +| भौगोलिक अतिरेक | प्रति अतिरिक्त नोड कुल लागत में $1,200 | शामिल | +| अपटाइम | भिन्न | 99.9%+ | +| कुल मासिक लागत | $11,000+ | $4,500 | \*बैकअप की लागत सहित: $50-$100 प्रति माह diff --git a/website/pages/hi/network/delegating.mdx b/website/pages/hi/network/delegating.mdx index 3ced69566ba6..b66e0e9e4ce2 100644 --- a/website/pages/hi/network/delegating.mdx +++ b/website/pages/hi/network/delegating.mdx @@ -33,8 +33,8 @@ title: Delegating एक बात पर भी विचार करना चाहिए कि एक इंडेक्सर को बुद्धिमानी से चुनना है। यदि आप एक ऐसे इंडेक्सर को चुनते हैं जो भरोसेमंद नहीं था, या अच्छा काम नहीं कर रहा था, तो आप अनाधिकृत करना चाहेंगे, जिसका अर्थ है कि आप पुरस्कार अर्जित करने के बहुत सारे अवसर खो देंगे, जो जीआरटी जलाने जितना ही बुरा हो सकता है।
    - ![डेलिगेशन अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलीगेशन UI में 0.5% शुल्क और साथ ही 28 दिन पर ध्यान दें - बंधन अवधि._ + ![डेलिगेशन अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलीगेशन UI में 0.5% शुल्क और साथ ही 28 दिन पर ध्यान दें बंधन + अवधि._
    ### डेलीगेटर्स के लिए उचित इनाम भुगतान के साथ एक भरोसेमंद इंडेक्सर चुनना @@ -44,8 +44,8 @@ title: Delegating इंडेक्सिंग रिवार्ड कट - इंडेक्सिंग रिवार्ड कट उन रिवॉर्ड्स का हिस्सा है जो इंडेक्सर अपने लिए रखेंगे। इसका मतलब है कि अगर इसे 100% पर सेट किया जाता है, तो डेलिगेटर के तौर पर आपको 0 इंडेक्सिंग रिवॉर्ड्स मिलेंगे। यदि आप यूआई में 80% देखते हैं, तो इसका मतलब है कि एक प्रतिनिधि के रूप में, आपको 20% प्राप्त होगा। एक महत्वपूर्ण नोट - नेटवर्क की शुरुआत में, इंडेक्सिंग रिवार्ड्स अधिकांश पुरस्कारों के लिए जिम्मेदार होंगे।
    - ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *शीर्ष इंडेक्सर डेलीगेटर्स को पुरस्कारों का 90% दे रहा है। - बीच वाला प्रतिनिधि को 20% दे रहा है। नीचे वाला डेलिगेटरों को ~83% दे रहा है।* + ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *शीर्ष इंडेक्सर डेलीगेटर्स को पुरस्कारों का 90% दे रहा है। बीच + वाला प्रतिनिधि को 20% दे रहा है। नीचे वाला डेलिगेटरों को ~83% दे रहा है।*
    - प्रश्न शुल्क कट - यह बिल्कुल इंडेक्सिंग रिवार्ड कट की तरह काम करता है। हालाँकि, यह विशेष रूप से इंडेक्सर द्वारा एकत्र की जाने वाली क्वेरी फीस पर रिटर्न के लिए है। यह ध्यान दिया जाना चाहिए कि नेटवर्क की शुरुआत में, इंडेक्सिंग रिवार्ड की तुलना में क्वेरी फीस से रिटर्न बहुत कम होगा। यह निर्धारित करने के लिए नेटवर्क पर ध्यान देने की सिफारिश की जाती है कि नेटवर्क में क्वेरी शुल्क कब अधिक महत्वपूर्ण होने लगेगा। diff --git a/website/pages/hi/network/indexing.mdx b/website/pages/hi/network/indexing.mdx index 399bca439431..4af09b4d7fd8 100644 --- a/website/pages/hi/network/indexing.mdx +++ b/website/pages/hi/network/indexing.mdx @@ -112,12 +112,12 @@ Once an allocation has been closed the rebates are available to be claimed by th - **माध्यम** - प्रोडक्शन इंडेक्सर प्रति सेकंड 100 सबग्राफ और 200-500 अनुरोधों का समर्थन करता है। - **बड़ा** - वर्तमान में उपयोग किए जाने वाले सभी सबग्राफ को अनुक्रमित करने और संबंधित ट्रैफ़िक के अनुरोधों को पूरा करने के लिए तैयार है। -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### एक इंडेक्सर को कौन सी बुनियादी सुरक्षा सावधानियां बरतनी चाहिए? @@ -149,20 +149,20 @@ Once an allocation has been closed the rebates are available to be claimed by th #### ग्राफ नोड -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | -------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | -------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -559,7 +559,7 @@ graph indexer status - `ग्राफ़ अनुक्रमणिका क्रियाएँ स्वीकृत निष्पादित करती हैं` - कार्यकर्ता को स्वीकृत क्रियाओं को तुरंत निष्पादित करने के लिए बाध्य करें -सभी आदेश जो आउटपुट में नियम प्रदर्शित करते हैं, समर्थित आउटपुट स्वरूपों (`तालिका`, `yaml`, और `json`) के बीच ` का उपयोग करके चुन सकते हैं - आउटपुट ` तर्क। +सभी आदेश जो आउटपुट में नियम प्रदर्शित करते हैं, समर्थित आउटपुट स्वरूपों (`तालिका`, `yaml`, और `json`) के बीच `का उपयोग करके चुन सकते हैं - आउटपुट` तर्क। #### Indexing rules @@ -623,7 +623,7 @@ graph indexer rules delete QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK - सभी कतारबद्ध क्रियाओं को देखने के लिए इंडेक्सर `indexer-cli` का उपयोग कर सकता है - इंडेक्सर (या अन्य सॉफ़्टवेयर) `इंडेक्सर-क्ली` का उपयोग करके कतार में क्रियाओं को स्वीकृत या रद्द कर सकता है। स्वीकृति और रद्द करने के आदेश इनपुट के रूप में क्रिया आईडी की एक सरणी लेते हैं। - निष्पादन कार्यकर्ता नियमित रूप से स्वीकृत कार्यों के लिए कतार का चुनाव करता है। यह कतार से `अनुमोदित` कार्यों को पकड़ लेगा, उन्हें निष्पादित करने का प्रयास करेगा, और निष्पादन की स्थिति के आधार पर डीबी में मूल्यों को `सफलता` या `विफल< पर अपडेट करेगा। /0>. -
  • If an action is successful the worker will ensure that there is an indexing rule present that tells the agent how to manage the allocation moving forward, useful when taking manual actions while the agent is in auto` or `oversight` mode. +
  • If an action is successful the worker will ensure that there is an indexing rule present that tells the agent how to manage the allocation moving forward, useful when taking manual actions while the agent is in auto` or `oversight` mode. - अनुक्रमणक क्रिया निष्पादन के इतिहास को देखने के लिए क्रिया कतार की निगरानी कर सकता है और यदि आवश्यक हो तो निष्पादन विफल होने पर क्रिया आइटम को पुन: अनुमोदित और अद्यतन कर सकता है। क्रिया कतार पंक्तिबद्ध और की गई सभी कार्रवाइयों का इतिहास प्रदान करती है। डेटा मॉडल: diff --git a/website/pages/hi/operating-graph-node.mdx b/website/pages/hi/operating-graph-node.mdx index 6dbe487e2a81..5d53c0fe05a7 100644 --- a/website/pages/hi/operating-graph-node.mdx +++ b/website/pages/hi/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ जब यह चल रहा होता है तो ग्राफ़ नोड निम्नलिखित पोर्ट को उजागर करता है: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | -------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (सबग्राफ प्रश्नों के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (सबग्राफ सब्सक्रिप्शन के लिए) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (तैनाती के प्रबंधन के लिए) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **महत्वपूर्ण**: बंदरगाहों को सार्वजनिक रूप से उजागर करने के बारे में सावधान रहें - **प्रशासन बंदरगाहों** को बंद रखा जाना चाहिए। इसमें ग्राफ़ नोड JSON-RPC समापन बिंदु शामिल है। diff --git a/website/pages/hi/querying/graphql-api.mdx b/website/pages/hi/querying/graphql-api.mdx index 81d663ed1277..353a62ef15a7 100644 --- a/website/pages/hi/querying/graphql-api.mdx +++ b/website/pages/hi/querying/graphql-api.mdx @@ -93,7 +93,7 @@ When querying a collection, the `first` parameter can be used to paginate from t #### उदाहरण का उपयोग करना `पहले` और `छोड़ें` -क्वेरी 10 ` टोकन ` इकाइयां, संग्रह की शुरुआत से 10 स्थानों से ऑफसेट: +क्वेरी 10 `टोकन` इकाइयां, संग्रह की शुरुआत से 10 स्थानों से ऑफसेट: ```graphql { @@ -208,7 +208,7 @@ This can be useful if you are looking to fetch only entities which have changed, ``` > **सिंटैक्टिक शुगर:** आप `और` ऑपरेटर को कॉमा द्वारा अलग किए गए सब-एक्सप्रेशन को पास करके उपरोक्त क्वेरी को सरल बना सकते हैं। -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search query fields provide an expressive text search API that can be a पूर्ण पाठ खोज ऑपरेटर: -| प्रतीक | ऑपरेटर | विवरण | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | सभी प्रदान किए गए शब्दों को शामिल करने वाली संस्थाओं के लिए एक से अधिक खोज शब्दों को फ़िल्टर में संयोजित करने के लिए | -| | | `Or` | या ऑपरेटर द्वारा अलग किए गए एकाधिक खोज शब्दों वाली क्वेरी सभी संस्थाओं को प्रदान की गई शर्तों में से किसी से मेल के साथ वापस कर देगी | -| `<->` | `Follow by` | दो शब्दों के बीच की दूरी निर्दिष्ट करें। | -| `:*` | `Prefix` | उन शब्दों को खोजने के लिए उपसर्ग खोज शब्द का उपयोग करें जिनके उपसर्ग मेल खाते हैं (2 वर्ण आवश्यक हैं।) | +| प्रतीक | ऑपरेटर | विवरण | +| --- | --- | --- | +| `&` | `And` | सभी प्रदान किए गए शब्दों को शामिल करने वाली संस्थाओं के लिए एक से अधिक खोज शब्दों को फ़िल्टर में संयोजित करने के लिए | +| | | `Or` | या ऑपरेटर द्वारा अलग किए गए एकाधिक खोज शब्दों वाली क्वेरी सभी संस्थाओं को प्रदान की गई शर्तों में से किसी से मेल के साथ वापस कर देगी | +| `<->` | `Follow by` | दो शब्दों के बीच की दूरी निर्दिष्ट करें। | +| `:*` | `Prefix` | उन शब्दों को खोजने के लिए उपसर्ग खोज शब्द का उपयोग करें जिनके उपसर्ग मेल खाते हैं (2 वर्ण आवश्यक हैं।) | #### उदाहरण diff --git a/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx b/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx index a6d16d2d7def..2182133b8d48 100644 --- a/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/hi/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + यदि आपके पास वेरिएबल शैडोइंग है, तो आपको अपने डुप्लिकेट वेरिएबल्स का नाम बदलने की आवश्यकता होगी। + ### Null Comparisons + अपने सबग्राफ पर अपग्रेड करने से, कभी-कभी आपको इस तरह की त्रुटियाँ मिल सकती हैं: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + हल करने के लिए आप केवल `if` कथन को कुछ इस तरह से बदल सकते हैं: ```typescript @@ -283,6 +287,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ``` + इस समस्या को ठीक करने के लिए, आप उस प्रॉपर्टी एक्सेस के लिए एक वेरिएबल बना सकते हैं ताकि कंपाइलर अशक्तता जांच जादू कर सके: ```typescript diff --git a/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx index af34304a72ee..91d5b46913fe 100644 --- a/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/it/deploying/deploying-a-subgraph-to-hosted.mdx @@ -135,7 +135,7 @@ Questo è l'aspetto del file di configurazione delle reti: Ora possiamo eseguire uno dei seguenti comandi: ```sh -# Utilizzo di un file predefinito networks.json +# Utilizzo di un file predefinito networks.json yarn build --network goerli # Utilizzo di un file con nome personalizzato @@ -162,7 +162,7 @@ Ora si è pronti per `yarn deploy`. **Nota:** Come già menzionato, da `graph-cli 0.32.0` è possibile eseguire direttamente `yarn deploy` con l'opzione `--network`: ```sh -# Utilizzo di un file predefinito networks.json +# Utilizzo di un file predefinito networks.json yarn deploy --network goerli # Utilizzo di un file con nome personalizzato diff --git a/website/pages/it/developing/creating-a-subgraph.mdx b/website/pages/it/developing/creating-a-subgraph.mdx index fb645f168931..f9e351698857 100644 --- a/website/pages/it/developing/creating-a-subgraph.mdx +++ b/website/pages/it/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Per alcuni tipi di entità, l'`id` è costruito a partire dagli id di altre due Nella nostra API GraphQL supportiamo i seguenti scalari: -| Tipo | Descrizione | -| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, rappresentato come una stringa esadecimale. Comunemente utilizzato per gli hash e gli indirizzi di Ethereum. | -| `String` | Scalare per valori `string`. I caratteri nulli non sono supportati e vengono rimossi automaticamente. | -| `Boolean` | Scalare per valori `boolean`. | -| `Int` | Le specifiche di GraphQL definiscono che `Int` ha una dimensione di 32 byte. | -| `Int8` | Un intero firmato a 8 byte, noto anche come intero firmato a 64 bit, può memorizzare valori nell'intervallo da -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. È preferibile utilizzare questo per rappresentare `i64` da ethereum. | -| `BigInt` | Numeri interi grandi. Utilizzati per i tipi `uint32`, `int64`, `uint64`, ..., `uint256` di Ethereum. Nota: Tutto ciò che è inferiore a `uint32` come `int32`, `uint24` oppure `int8` è rappresentato come `i32`. | -| `BigDecimal` | `BigDecimal` Decimali ad alta precisione rappresentati come un significante e un esponente. L'intervallo degli esponenti va da -6143 a +6144. Arrotondato a 34 cifre significative. | +| Tipo | Descrizione | +| --- | --- | +| `Bytes` | Byte array, rappresentato come una stringa esadecimale. Comunemente utilizzato per gli hash e gli indirizzi di Ethereum. | +| `String` | Scalare per valori `string`. I caratteri nulli non sono supportati e vengono rimossi automaticamente. | +| `Boolean` | Scalare per valori `boolean`. | +| `Int` | Le specifiche di GraphQL definiscono che `Int` ha una dimensione di 32 byte. | +| `Int8` | Un intero firmato a 8 byte, noto anche come intero firmato a 64 bit, può memorizzare valori nell'intervallo da -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. È preferibile utilizzare questo per rappresentare `i64` da ethereum. | +| `BigInt` | Numeri interi grandi. Utilizzati per i tipi `uint32`, `int64`, `uint64`, ..., `uint256` di Ethereum. Nota: Tutto ciò che è inferiore a `uint32` come `int32`, `uint24` oppure `int8` è rappresentato come `i32`. | +| `BigDecimal` | `BigDecimal` Decimali ad alta precisione rappresentati come un significante e un esponente. L'intervallo degli esponenti va da -6143 a +6144. Arrotondato a 34 cifre significative. | #### Enum @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Una nuova data source elaborerà solo le chiamate e gli eventi del blocco in cui è stata creata e di tutti i blocchi successivi, ma non elaborerà i dati storici, cioè quelli contenuti nei blocchi precedenti. -> +> > Se i blocchi precedenti contengono dati rilevanti per la nuova data source, è meglio indicizzare tali dati leggendo lo stato attuale del contratto e creando entità che rappresentino tale stato al momento della creazione della nuova data source. ### Contesto del Data Source @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** Il blocco di creazione del contratto può essere rapidamente consultato su Etherscan: -> +> > 1. Cercare il contratto inserendo l'indirizzo nella barra di ricerca. > 2. Fare clic sull'hash della transazione di creazione nella sezione `Contract Creator`. > 3. Caricare la pagina dei dettagli della transazione, dove si trova il blocco iniziale per quel contratto. diff --git a/website/pages/it/developing/graph-ts/api.mdx b/website/pages/it/developing/graph-ts/api.mdx index a8fc15bea20c..c685cbab4370 100644 --- a/website/pages/it/developing/graph-ts/api.mdx +++ b/website/pages/it/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ La libreria `@graphprotocol/graph-ts` fornisce le seguenti API: La `apiVersion` nel manifest del subgraph specifica la versione dell'API di mappatura che viene eseguita da the Graph Node per un dato subgraph. -| Versione | Note di rilascio | -| :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Aggiunte le classi `TransactionReceipt` e `Log` ai tipi di Ethereum
    Aggiunto il campo `receipt` all'oggetto Ethereum Event | -| 0.0.6 | Aggiunto il campo `nonce` all'oggetto Ethereum Transaction
    Aggiunto `baseFeePerGas` all'oggetto Ethereum Block | -| 0.0.5 | AssemblyScript aggiornato alla versione 0.19.10 (questo include modifiche di rottura, consultare la [`Guida alla migrazione`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` rinominato in `ethereum.transaction.gasLimit` | -| 0.0.4 | Aggiunto il campo `functionSignature` all'oggetto Ethereum SmartContractCall | -| 0.0.3 | Aggiunto il campo `from` all'oggetto Ethereum Call
    `etherem.call.address` rinominato in `ethereum.call.to` | -| 0.0.2 | Aggiunto il campo `input` all'oggetto Ethereum Transaction | +| Versione | Note di rilascio | +| :-: | --- | +| 0.0.7 | Aggiunte le classi `TransactionReceipt` e `Log` ai tipi di Ethereum
    Aggiunto il campo `receipt` all'oggetto Ethereum Event | +| 0.0.6 | Aggiunto il campo `nonce` all'oggetto Ethereum Transaction
    Aggiunto `baseFeePerGas` all'oggetto Ethereum Block | +| 0.0.5 | AssemblyScript aggiornato alla versione 0.19.10 (questo include modifiche di rottura, consultare la [`Guida alla migrazione`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` rinominato in `ethereum.transaction.gasLimit` | +| 0.0.4 | Aggiunto il campo `functionSignature` all'oggetto Ethereum SmartContractCall | +| 0.0.3 | Aggiunto il campo `from` all'oggetto Ethereum Call
    `etherem.call.address` rinominato in `ethereum.call.to` | +| 0.0.2 | Aggiunto il campo `input` all'oggetto Ethereum Transaction | ### Tipi integrati @@ -734,44 +734,44 @@ Quando il tipo di un valore è certo, può essere convertito in un [tipo incorpo ### Riferimento alle conversioni di tipo -| Fonte(i) | Destinazione | Funzione di conversione | -| --------------------------------------- | --------------------------------------- | ----------------------------------------------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() o s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() o s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Fonte(i) | Destinazione | Funzione di conversione | +| -------------------- | -------------------- | --------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() o s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() o s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadati della Data Source diff --git a/website/pages/it/developing/unit-testing-framework.mdx b/website/pages/it/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/it/developing/unit-testing-framework.mdx +++ b/website/pages/it/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/it/network/benefits.mdx b/website/pages/it/network/benefits.mdx index 74d915452816..482b5fbbcd0d 100644 --- a/website/pages/it/network/benefits.mdx +++ b/website/pages/it/network/benefits.mdx @@ -27,53 +27,54 @@ I costi di query possono variare; il costo indicato è quello medio al momento d ## Utente di basso volume (meno di 30.000 query al mese) -| Confronto costi | Self Hosted | The Graph Network | -|:----------------------------------:|:---------------------------------------:|:-----------------------------------------------------------------------------:| -| Costo mensile del server\* | $350 al mese | $0 | -| Costi di query | $0+ | ~$15 al mese | -| Tempo di progettazione | $400 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità di infra | 30,000 (autoscaling) | -| Costo per query | $0 | $0.0005 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Ridondanza geografica | $750+ per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $750+ | ~$15 | +| Confronto costi | Self Hosted | The Graph Network | +| :-: | :-: | :-: | +| Costo mensile del server\* | $350 al mese | $0 | +| Costi di query | $0+ | ~$15 al mese | +| Tempo di progettazione | $400 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità di infra | 30,000 (autoscaling) | +| Costo per query | $0 | $0.0005 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Ridondanza geografica | $750+ per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $750+ | ~$15 | ## Utente di medio volume (3,000,000+ di query al mese) -| Confronto dei costi | Self Hosted | The Graph Network | -|:----------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------------------:| -| Costo mensile del server\* | $350 al mese | $0 | -| Costi di query | $500 al mese | $750 al mese | -| Tempo di progettazione | $800 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità dell'infrastruttura | 3,000,000+ | -| Costo per query | $0 | $0.00025 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Costi di ingegneria | $200 all'ora | Incluso | -| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $1,650+ | $750 | +| Confronto dei costi | Self Hosted | The Graph Network | +| :-: | :-: | :-: | +| Costo mensile del server\* | $350 al mese | $0 | +| Costi di query | $500 al mese | $750 al mese | +| Tempo di progettazione | $800 al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità dell'infrastruttura | 3,000,000+ | +| Costo per query | $0 | $0.00025 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Costi di ingegneria | $200 all'ora | Incluso | +| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $1,650+ | $750 | ## Utente di alto volume (3,000,000+ di query al mese) -| Confronto costi | Self Hosted | The Graph Network | -|:----------------------------------:|:-------------------------------------------:|:-----------------------------------------------------------------------------:| -| Costo mensile del server\* | $1100 al mese, per nodo | $0 | -| Costi di query | $4000 | $4,500 al mese | -| Numero di nodi necessari | 10 | Non applicabile | -| Tempo di progettazione | $6.000 o più al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | -| Query al mese | Limitato alle capacità di infra | 30,000,000+ | -| Costo per query | $0 | $0.00015 | -| Infrastruttura | Centralizzato | Decentralizzato | -| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | -| Tempo di attività | Variabile | 99.9%+ | -| Costo totale mensile | $11,000+ | $4,500 | +| Confronto costi | Self Hosted | The Graph Network | +| :-: | :-: | :-: | +| Costo mensile del server\* | $1100 al mese, per nodo | $0 | +| Costi di query | $4000 | $4,500 al mese | +| Numero di nodi necessari | 10 | Non applicabile | +| Tempo di progettazione | $6.000 o più al mese | Nessuno, integrato nella rete con indicizzatori distribuiti a livello globale | +| Query al mese | Limitato alle capacità di infra | 30,000,000+ | +| Costo per query | $0 | $0.00015 | +| Infrastruttura | Centralizzato | Decentralizzato | +| Ridondanza geografica | $1.200 di costi totali per nodo aggiuntivo | Incluso | +| Tempo di attività | Variabile | 99.9%+ | +| Costo totale mensile | $11,000+ | $4,500 | \*inclusi i costi per il backup: $50-$100 al mese Tempo di progettazione basato su un'ipotesi di $200 all'ora - utilizzando la funzione di budget massimo della query nella scheda di fatturazione del budget, mantenendo un'alta qualità del servizio + utilizzando la funzione di budget massimo della query nella scheda di fatturazione del budget, mantenendo un'alta +qualità del servizio I costi previsti sono solo per i subgraph di Ethereum Mainnet - i costi sono ancora più alti quando si ospita un `graph-node` su altre reti. diff --git a/website/pages/it/network/delegating.mdx b/website/pages/it/network/delegating.mdx index 8f07f0b33986..344420fccebd 100644 --- a/website/pages/it/network/delegating.mdx +++ b/website/pages/it/network/delegating.mdx @@ -33,8 +33,8 @@ Ogni volta che un Delegator vuole riottenere i suoi token, questi sono soggetti Una cosa da considerare è anche la scelta oculata di un Indexer. Se scegliete un Indexer che non è affidabile o che non sta facendo un buon lavoro, vorrete annullare la delega, il che significa che perderete molte opportunità di guadagnare ricompense, il che può essere altrettanto negativo che bruciare GRT.
    - ![Sblocco di Delegator](/img/Delegation-Unbonding.png) _Nota la commissione del 0,5% nel UI della delegazione, così come il periodo di sblocco di 28 giorni. - periodo di sblocco._ + ![Sblocco di Delegator](/img/Delegation-Unbonding.png) _Nota la commissione del 0,5% nel UI della delegazione, così + come il periodo di sblocco di 28 giorni. periodo di sblocco._
    ### Scegliere un Indexer affidabile con una giusta ricompensa per i Delegator @@ -44,8 +44,8 @@ Questa è una parte importante da capire. Per prima cosa discutiamo di tre valor Taglio della ricompensa di indicizzazione - Il taglio della ricompensa di indicizzazione è la parte delle ricompense che l'Indexer terrà per sé. Ciò significa che se è impostato al 100%, come delegator riceverete 0 ricompense di indicizzazione. Se nel UI vedete 80%, significa che come Delegator riceverete il 20%. Una nota importante: all'inizio della rete, le ricompense di indicizzazione rappresentano la maggior parte delle ricompense.
    - ![Taglio delle ricompense dell'indicizzazione](/img/Indexing-Reward-Cut.png) *Il top Indexer sta dando ai Delegator il 90% delle ricompense. Il - centrale dà ai Delegator il 20%. Quello in basso dà ai Delegator ~83%.* + ![Taglio delle ricompense dell'indicizzazione](/img/Indexing-Reward-Cut.png) *Il top Indexer sta dando ai Delegator il + 90% delle ricompense. Il centrale dà ai Delegator il 20%. Quello in basso dà ai Delegator ~83%.*
    - Taglio delle tariffe di query - Funziona esattamente come il Taglio della ricompensa di indicizzazione. Tuttavia, riguarda specificamente i rendimenti delle tariffe di query raccolte dal Indexer. Va notato che all'inizio della rete, i rendimenti delle tariffe di query saranno molto ridotti rispetto alla ricompensa di indicizzazione. Si raccomanda di prestare attenzione alla rete per determinare quando le tariffe di query nella rete inizieranno a essere più significative. diff --git a/website/pages/it/network/indexing.mdx b/website/pages/it/network/indexing.mdx index 514e7ea925cb..33a42fc96831 100644 --- a/website/pages/it/network/indexing.mdx +++ b/website/pages/it/network/indexing.mdx @@ -112,12 +112,12 @@ Gli Indexer possono differenziarsi applicando tecniche avanzate per prendere dec - **Medio** - Indexer di produzione che supporta 100 subgraph e 200-500 richieste al secondo. - **Grande** - È pronto a indicizzare tutti i subgraph attualmente utilizzati e a servire le richieste per il relativo traffico. -| Setup | Postgres
    (CPUs) | Postgres
    (memoria in GBs) | Postgres
    (disco in TBs) | VMs
    (CPUs) | VMs
    (memoria in GBs) | -| -------- |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| -| Piccolo | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memoria in GBs) | Postgres
    (disco in TBs) | VMs
    (CPUs) | VMs
    (memoria in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Piccolo | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3.5 | 48 | 184 | ### Quali sono le precauzioni di base per la sicurezza che un Indexer dovrebbe adottare? @@ -149,20 +149,20 @@ Nota: Per supportare una scalabilità agile, si consiglia di separare le attivit #### Graph Node -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| ----- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | #### Servizio Indexer -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| ----- | --------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (per le query di subgraph a pagamento) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (per le query di subgraph a pagamento) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Metriche di Prometheus | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/it/operating-graph-node.mdx b/website/pages/it/operating-graph-node.mdx index de919de98b04..e81d14915e40 100644 --- a/website/pages/it/operating-graph-node.mdx +++ b/website/pages/it/operating-graph-node.mdx @@ -77,13 +77,13 @@ Un esempio completo di configurazione Kubernetes si trova nel [repository indexe Quando è in funzione, Graph Node espone le seguenti porte: -| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | -| ----- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | +| Porta | Obiettivo | Routes | Argomento CLI | Variabile d'ambiente | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (per le query di subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (per le sottoscrizioni ai subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (per la gestione dei deployment) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Metriche di Prometheus | /metrics | --metrics-port | - | > **Importante**: fare attenzione a esporre le porte pubblicamente - le porte di **amministrazione** devono essere tenute sotto chiave. Questo include l'endpoint JSON-RPC del Graph Node. diff --git a/website/pages/it/querying/graphql-api.mdx b/website/pages/it/querying/graphql-api.mdx index 2a1b9a54eef7..d3dd3c57a549 100644 --- a/website/pages/it/querying/graphql-api.mdx +++ b/website/pages/it/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Nell'esempio seguente, si filtrano le sfide con `outcome` `succeeded` e `number` ``` > **Syntactic sugar:** Si può semplificare la query precedente eliminando l'operatore `and` passando una sottoespressione separata da virgole. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Le query di ricerca fulltext hanno un campo obbligatorio, `text`, per fornire i Operatori di ricerca fulltext: -| Simbolo | Operatore | Descrizione | -| ----------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Per combinare più termini di ricerca in un filtro per le entità che includono tutti i termini forniti | -| | | `Or` | Le query con più termini di ricerca separati dall'operatore Or restituiranno tutte le entità con una corrispondenza tra i termini forniti | -| `<->` | `Follow by` | Specifica la distanza tra due parole. | -| `:*` | `Prefisso` | Utilizzare il termine di ricerca del prefisso per trovare le parole il cui prefisso corrisponde (sono richiesti 2 caratteri.) | +| Simbolo | Operatore | Descrizione | +| --- | --- | --- | +| `&` | `And` | Per combinare più termini di ricerca in un filtro per le entità che includono tutti i termini forniti | +| | | `Or` | Le query con più termini di ricerca separati dall'operatore Or restituiranno tutte le entità con una corrispondenza tra i termini forniti | +| `<->` | `Follow by` | Specifica la distanza tra due parole. | +| `:*` | `Prefisso` | Utilizzare il termine di ricerca del prefisso per trovare le parole il cui prefisso corrisponde (sono richiesti 2 caratteri.) | #### Esempi diff --git a/website/pages/it/release-notes/assemblyscript-migration-guide.mdx b/website/pages/it/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/it/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/it/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/ja/cookbook/subgraph-debug-forking.mdx b/website/pages/ja/cookbook/subgraph-debug-forking.mdx index c186dbdf805c..134e7b12cc1a 100644 --- a/website/pages/ja/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ja/cookbook/subgraph-debug-forking.mdx @@ -6,15 +6,15 @@ title: フォークを用いた迅速かつ容易なサブグラフのデバッ ## さて、それは何でしょうか? -**サブグラフのフォーク**とは、_他_のサブグラフのストア(通常はリモート) からエンティティをフェッチするプロセスです。 +**サブグラフのフォーク**とは、*他*のサブグラフのストア(通常はリモート) からエンティティをフェッチするプロセスです。 -デバッグの文脈では、**サブグラフのフォーク**により、ブロック_X_への同期を待つことなく、ブロック_X_で失敗したサブグラフのデバッグを行うことができます。 +デバッグの文脈では、**サブグラフのフォーク**により、ブロック*X*への同期を待つことなく、ブロック*X*で失敗したサブグラフのデバッグを行うことができます。 ## その方法は? -インデックス作成のためにリモートのGraphノードにサブグラフをデプロイし、ブロック_X_で失敗した場合でも、ブロック_X_と同期しているストアを使用して GraphQL クエリを提供することができます。つまり、ブロック _X_ のインデックス作成時に発生するバグを修正するために、この最新のストアを利用できるのです。 +インデックス作成のためにリモートのGraphノードにサブグラフをデプロイし、ブロック*X*で失敗した場合でも、ブロック*X*と同期しているストアを使用して GraphQL クエリを提供することができます。つまり、ブロック _X_ のインデックス作成時に発生するバグを修正するために、この最新のストアを利用できるのです。 -簡単に言うと、ブロック_X_でデバッグされているローカルにデプロイされたサブグラフにインデックス状態の最新のビューを提供するために、ブロック_X_までインデックスされたサブグラフを持つことが保証されているリモートGraphノードから _失敗したサブグラフをフォーク_しようとしているのです。 +簡単に言うと、ブロック*X*でデバッグされているローカルにデプロイされたサブグラフにインデックス状態の最新のビューを提供するために、ブロック*X*までインデックスされたサブグラフを持つことが保証されているリモートGraphノードから *失敗したサブグラフをフォーク*しようとしているのです。 ## コードを見てみましょう @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -この場合、残念なことに、この完璧に見えるサブグラフを[HostedService](https://thegraph.com/hosted-service/) にデプロイすると、_"Gravatar not found!"_というエラーで失敗してしまいます。 +この場合、残念なことに、この完璧に見えるサブグラフを[HostedService](https://thegraph.com/hosted-service/) にデプロイすると、*"Gravatar not found!"*というエラーで失敗してしまいます。 通常の試すであろう修正方法: @@ -69,7 +69,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { 回答: -1. `fork-base`は「ベース」URLで、_subgraph id_が追加されたときのURL (`/`) はサブグラフのストアに対する有効な GraphQL endpoint であることを示します。 +1. `fork-base`は「ベース」URLで、*subgraph id*が追加されたときのURL (`/`) はサブグラフのストアに対する有効な GraphQL endpoint であることを示します。 2. フォーキングは簡単であり煩雑な手間はありません ```bash diff --git a/website/pages/ja/developing/creating-a-subgraph.mdx b/website/pages/ja/developing/creating-a-subgraph.mdx index 60c6a37bde89..e21a11c9829c 100644 --- a/website/pages/ja/developing/creating-a-subgraph.mdx +++ b/website/pages/ja/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Null 以外のフィールド 'name' の null 値が解決されました GraphQL API では、以下の Scalar をサポートしています: -| タイプ | 説明書き | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte 配列で、16 進数の文字列で表されます。Ethereum のハッシュやアドレスによく使われます。 | -| `String` | `string`値の Scalar であり、Null 文字はサポートされておらず、自動的に削除されます。 | -| `Boolean` | `boolean`値を表す Scalar。 | -| `Int` | Int GraphQL の仕様では、`Int`のサイズは 32 バイトと定義されています。 | -| `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` | 大きな整数。Ethereum の`uint32`, `int64`, `uint64`, ..., `uint256` タイプに使用されます。注: `int32`, `uint24` `int8`など`uint32`以下のものは`i32`として表現されます。 | -| `BigDecimal` | `BigDecimal`は、高精度の 10 進数を記号と指数で表します。指数の範囲は -6143 ~ +6144 です。有効数字 34 桁にまとめられます。 | +| タイプ | 説明書き | +| --- | --- | +| `Bytes` | Byte 配列で、16 進数の文字列で表されます。Ethereum のハッシュやアドレスによく使われます。 | +| `String` | `string`値の Scalar であり、Null 文字はサポートされておらず、自動的に削除されます。 | +| `Boolean` | `boolean`値を表す Scalar。 | +| `Int` | Int GraphQL の仕様では、`Int`のサイズは 32 バイトと定義されています。 | +| `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` | 大きな整数。Ethereum の`uint32`, `int64`, `uint64`, ..., `uint256` タイプに使用されます。注: `int32`, `uint24` `int8`など`uint32`以下のものは`i32`として表現されます。 | +| `BigDecimal` | `BigDecimal`は、高精度の 10 進数を記号と指数で表します。指数の範囲は -6143 ~ +6144 です。有効数字 34 桁にまとめられます。 | #### Enums @@ -458,33 +458,33 @@ query { サポートされている言語の辞書: -| コード | 辞書 | -| ------ | --------- | -| simple | General | -| da | Danish | -| nl | Dutch | -| en | English | -| fi | Finnish | -| fr | French | -| de | German | -| hu | Hungarian | -| it | Italian | -| no | Norwegian | -| pt | ポルトガル語 | -| ro | Romanian | -| ru | Russian | -| es | Spanish | -| sv | Swedish | -| tr | Turkish | +| コード | 辞書 | +| ------ | ------------ | +| simple | General | +| da | Danish | +| nl | Dutch | +| en | English | +| fi | Finnish | +| fr | French | +| de | German | +| hu | Hungarian | +| it | Italian | +| no | Norwegian | +| pt | ポルトガル語 | +| ro | Romanian | +| ru | Russian | +| es | Spanish | +| sv | Swedish | +| tr | Turkish | ### ランキングアルゴリズム サポートされている結果の順序付けのアルゴリズム: -| アルゴリズム | 説明書き | -| ------------- | ---------------------------------------- | -| rank | フルテキストクエリのマッチ品質 (0-1) を使用して結果を並べ替えます。 | -| proximityRank | ProximityRank rank に似ていますが、マッチの近接性も含みます。 | +| アルゴリズム | 説明書き | +| ------------- | ------------------------------------------------------------------- | +| rank | フルテキストクエリのマッチ品質 (0-1) を使用して結果を並べ替えます。 | +| proximityRank | ProximityRank rank に似ていますが、マッチの近接性も含みます。 | ## マッピングの記述 @@ -580,7 +580,7 @@ import { Gravatar } from '../generated/schema' EVM 互換のスマート コントラクトの一般的なパターンは、レジストリ コントラクトまたはファクトリ コントラクトの使用です。1 つのコントラクトが、それぞれ独自の状態とイベントを持つ任意の数の他のコントラクトを作成、管理、または参照します。 -これらのサブコントラクトのアドレスは、事前にわかっている場合とわかっていない場合があり、これらのコントラクトの多くは、時間の経過とともに作成および/または追加される可能性があります。このような場合、単一のデータ ソースまたは固定数のデータ ソースを定義することは不可能であり、より動的なアプローチ、つまり _データ ソース テンプレート_が必要とされるのはこのためです。 +これらのサブコントラクトのアドレスは、事前にわかっている場合とわかっていない場合があり、これらのコントラクトの多くは、時間の経過とともに作成および/または追加される可能性があります。このような場合、単一のデータ ソースまたは固定数のデータ ソースを定義することは不可能であり、より動的なアプローチ、つまり *データ ソース テンプレート*が必要とされるのはこのためです。 ### メインコントラクトのデータソース @@ -660,7 +660,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **注:** 新しいデータ ソースは、それが作成されたブロックとそれに続くすべてのブロックの呼び出しとイベントのみを処理しますが、履歴データ (データなど) は処理しません。それは前のブロックに含まれています。 -> +> > 以前のブロックに新しいデータソースに関連するデータが含まれている場合は、コントラクトの現在の状態を読み取り、新しいデータソースが作成された時点でその状態を表すエンティティを作成することで、そのデータにインデックスを付けることが最善です。 ### データソースコンテクスト @@ -717,7 +717,7 @@ dataSources: ``` > **注:** コントラクト作成ブロックは、Etherscan ですばやく検索できます。 -> +> > 1. 検索バーにアドレスを入力してコントラクトを検索します。 > 2. `Contract Creator` セクションの作成トランザクションハッシュをクリックします。 > 3. トランザクションの詳細ページを読み込んで、そのコントラクトの開始ブロックを見つけます。 @@ -907,9 +907,9 @@ eventHandlers: `specVersion` `0.0.4`以降、サブグラフ機能はマニフェストファイルのトップレベルにある`features`セクションで、以下の表のように`camelCase` の名前を使って明示的に宣言する必要があります: -| 特徴 | 名前 | +| 特徴 | 名前 | | --------------------------------------------------------- | --------------------------------------------------- | -| [致命的でないエラー](#non-fatal-errors) | `nonFatalErrors` | +| [致命的でないエラー](#non-fatal-errors) | `nonFatalErrors` | | [Full-text Search](#defining-fulltext-search-fields) | `fullTextSearch` | | [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | | [IPFS on Ethereum Contracts](#ipfs-on-ethereum-contracts) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | diff --git a/website/pages/ja/developing/graph-ts/api.mdx b/website/pages/ja/developing/graph-ts/api.mdx index e904e9bc7013..4a702fedf0d4 100644 --- a/website/pages/ja/developing/graph-ts/api.mdx +++ b/website/pages/ja/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ title: AssemblyScript API サブグラフマニフェストapiVersionは、特定のサブグラフのマッピングAPIバージョンを指定します。このバージョンは、Graph Nodeによって実行されます。 -| バージョン | リリースノート | -| :---: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Ethereum タイプに `TransactionReceipt` と `Log` クラスを追加
    Ethereum Event オブジェクトに `receipt` フィールドを追加。 | -| 0.0.6 | Ethereum Transactionオブジェクトに`nonce`フィールドを追加
    Ethereum Blockオブジェクトに`baseFeePerGas`を追加。 | +| バージョン | リリースノート | +| :-: | --- | +| 0.0.7 | Ethereum タイプに `TransactionReceipt` と `Log` クラスを追加
    Ethereum Event オブジェクトに `receipt` フィールドを追加。 | +| 0.0.6 | Ethereum Transactionオブジェクトに`nonce`フィールドを追加
    Ethereum Blockオブジェクトに`baseFeePerGas`を追加。 | | 0.0.5 | AssemblyScriptはバージョン0.19.10にアップグレードされました(このバージョンアップには変更点が含まれていますので Migration Guide) をご覧ください)。
    ethereum.transaction.gasUsedの名前がethereum.transaction.gasLimitに変更 | -| 0.0.4 | Ethereum SmartContractCall オブジェクトにfunctionSignatureフィールドを追加 | -| 0.0.3 | イーサリアムコールオブジェクトに`from`フィールドを追加
    `etherem.call.address`を`ethereum.call.to`に変更。 | -| 0.0.2 | Ethereum Transaction オブジェクトに inputフィールドを追加 | +| 0.0.4 | Ethereum SmartContractCall オブジェクトにfunctionSignatureフィールドを追加 | +| 0.0.3 | イーサリアムコールオブジェクトに`from`フィールドを追加
    `etherem.call.address`を`ethereum.call.to`に変更。 | +| 0.0.2 | Ethereum Transaction オブジェクトに inputフィールドを追加 | ### 組み込み型 @@ -277,7 +277,7 @@ graph-node v0.31.0、@graphprotocol/graph-ts v0.30.0、および @graphprotocol/ ストア API を使用すると、現在のブロックで作成または更新されたエンティティの取得が容易になります。この一般的な状況は、あるハンドラーがオンチェーン イベントからトランザクションを作成し、後のハンドラーがこのトランザクションが存在する場合にアクセスしようとすることです。トランザクションが存在しない場合、サブグラフはエンティティが存在しないことを確認するためだけにデータベースにアクセスする必要があります。エンティティが同じブロック内に作成されている必要があることをサブグラフの作成者がすでに知っている場合は、loadInBlock を使用すると、このデータベースのラウンドトリップが回避されます。一部のサブグラフでは、これらのルックアップの欠落がインデックス作成時間に大きく影響する可能性があります。 ```typescript -let id =event.transaction.hash // または ID が構築される方法 +let id = event.transaction.hash // または ID が構築される方法 let transfer = Transfer.loadInBlock(id) if (transfer == null) { transfer = 新しい転送(id) @@ -734,44 +734,44 @@ if (value.kind == JSONValueKind.BOOL) { ### タイプ 変換参照 -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | Bigint.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromString(s) | -| String | BigInt | BigDecimal.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | Bigint.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromString(s) | +| String | BigInt | BigDecimal.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### データソースのメタデータ diff --git a/website/pages/ja/developing/unit-testing-framework.mdx b/website/pages/ja/developing/unit-testing-framework.mdx index 9d74495ab2bd..49601a107de7 100644 --- a/website/pages/ja/developing/unit-testing-framework.mdx +++ b/website/pages/ja/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). これは、コード内で`console.log`を使用していることを意味し、AssemblyScriptではサポートされていません。[Logging API](/developing/assemblyscript-api/#logging-api) の利用をご検討ください。 > ERROR TS2554: 期待された引数は? -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: 期待された引数は? -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) 引数の不一致は、`graph-ts`と`matchstick-as`の不一致によって起こります。このような問題を解決する最善の方法は、すべてを最新のリリース版にアップデートすることです。 diff --git a/website/pages/ja/glossary.mdx b/website/pages/ja/glossary.mdx index abee880b8eb3..167d4ed1fdcf 100644 --- a/website/pages/ja/glossary.mdx +++ b/website/pages/ja/glossary.mdx @@ -78,8 +78,8 @@ title: 用語集 - **L2転送ツール**:ネットワーク参加者がイーサリアムメインネットからArbitrum Oneにネットワーク関連資産を転送できるようにするスマートコントラクトとUIです。ネットワーク参加者は、委任されたGRT、サブグラフ、キュレーションシェア、およびインデクサーのセルフステークを転送できます。 -- サブグラフを Graph Network に**_アップグレード_する**: サブグラフをホストされたサービスから Graph Network に移動するプロセス。 +- サブグラフを Graph Network に***アップグレード*する**: サブグラフをホストされたサービスから Graph Network に移動するプロセス。 -- サブグラフ**の_更新_**: サブグラフのマニフェスト、スキーマ、または更新を含む新しいサブグラフ バージョンをリリースするプロセス。マッピング。 +- サブグラフ**の*更新***: サブグラフのマニフェスト、スキーマ、または更新を含む新しいサブグラフ バージョンをリリースするプロセス。マッピング。 - **移行**:サブグラフの古いバージョンから新しいバージョンに移行するキュレーション共有のプロセスです(例えば、v0.0.1がv0.0.2に更新される場合)。 diff --git a/website/pages/ja/network/benefits.mdx b/website/pages/ja/network/benefits.mdx index 93018679bfd6..be92fd79639e 100644 --- a/website/pages/ja/network/benefits.mdx +++ b/website/pages/ja/network/benefits.mdx @@ -27,47 +27,47 @@ Graph の分散型ネットワークは、堅牢なインデックス作成と ## ローボリュームユーザー(月間30,000クエリ以下) -| コスト比較 | セルフホスト | グラフネットワーク | -|:-----------------------:|:---------------------------------------:|:-----------------------------------:| -| 月額サーバー代 | $350/月 | $0 | -| クエリコスト | $0+ | ~$15/月 | -| エンジニアリングタイム | $400/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 30,000(オートスケーリング) | -| クエリごとのコスト | $0 | $0.0005 | -| インフラストラクチャ | 集中管理型 | 分散型 | -| 地理的な冗長性 | 追加1ノードにつき$750+ | 含まれる | -| アップタイム | バリエーション | 99.9%+ | -| 月額費用合計 | $750+ | ~$15 | +| コスト比較 | セルフホスト | グラフネットワーク | +| :-: | :-: | :-: | +| 月額サーバー代 | $350/月 | $0 | +| クエリコスト | $0+ | ~$15/月 | +| エンジニアリングタイム | $400/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 30,000(オートスケーリング) | +| クエリごとのコスト | $0 | $0.0005 | +| インフラストラクチャ | 集中管理型 | 分散型 | +| 地理的な冗長性 | 追加1ノードにつき$750+ | 含まれる | +| アップタイム | バリエーション | 99.9%+ | +| 月額費用合計 | $750+ | ~$15 | ## ミディアムボリュームユーザー(月間3,000,000クエリ以上) -| コスト比較 | セルフホスト | グラフネットワーク | -|:-----------------------:|:------------------------------------------:|:-----------------------------------:| -| 月額サーバー代 | $350/月 | $0 | -| クエリコスト | $500/月 | $750/月 | -| エンジニアリングタイム | $800/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 3,000,000+ | -| クエリごとのコスト | $0 | $0.00025 | -| インフラストラクチャ | 中央管理型 | 分散型 | -| エンジニアリングコスト | $200/時 | 含まれる | -| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | -| アップタイム | 変動 | 99.9%+ | -| 月額費用合計 | $1,650+ | $750 | +| コスト比較 | セルフホスト | グラフネットワーク | +| :-: | :-: | :-: | +| 月額サーバー代 | $350/月 | $0 | +| クエリコスト | $500/月 | $750/月 | +| エンジニアリングタイム | $800/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 3,000,000+ | +| クエリごとのコスト | $0 | $0.00025 | +| インフラストラクチャ | 中央管理型 | 分散型 | +| エンジニアリングコスト | $200/時 | 含まれる | +| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | +| アップタイム | 変動 | 99.9%+ | +| 月額費用合計 | $1,650+ | $750 | ## ハイボリュームユーザー(月間30,000,000クエリ以上) -| コスト比較 | セルフホスト | グラフネットワーク | -|:-----------------------:|:-------------------------------------------:|:-----------------------------------:| -| 月額サーバー代 | $1100/月(ノードごと) | $0 | -| クエリコスト | $4000 | $4,500/月 | -| 必要ノード数 | 10 | 該当なし | -| エンジニアリングタイム | $6,000/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | -| 月ごとのクエリ | インフラ機能に限定 | 30,000,000+ | -| クエリごとのコスト | $0 | $0.00015 | -| インフラストラクチャ | 集中管理型 | 分散型 | -| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | -| アップタイム | 変動 | 99.9%+ | -| 月額費用合計 | $11,000+ | $4,500 | +| コスト比較 | セルフホスト | グラフネットワーク | +| :-: | :-: | :-: | +| 月額サーバー代 | $1100/月(ノードごと) | $0 | +| クエリコスト | $4000 | $4,500/月 | +| 必要ノード数 | 10 | 該当なし | +| エンジニアリングタイム | $6,000/月 | なし/ グローバルに分散されたインデクサーでネットワークに組み込まれる | +| 月ごとのクエリ | インフラ機能に限定 | 30,000,000+ | +| クエリごとのコスト | $0 | $0.00015 | +| インフラストラクチャ | 集中管理型 | 分散型 | +| 地理的な冗長性 | ノード追加1台につき合計1,200ドル | 含まれる | +| アップタイム | 変動 | 99.9%+ | +| 月額費用合計 | $11,000+ | $4,500 | \*バックアップ費用含む:月額$50〜$100 diff --git a/website/pages/ja/network/indexing.mdx b/website/pages/ja/network/indexing.mdx index 6e7daf5e2b76..1f65adb35093 100644 --- a/website/pages/ja/network/indexing.mdx +++ b/website/pages/ja/network/indexing.mdx @@ -112,12 +112,12 @@ Use Etherscan to call `getRewards()`: - **Medium** - 100 個のサブグラフと 1 秒あたり 200 ~ 500 のリクエストをサポートするプロダクションインデクサー - **Large** - 現在使用されているすべてのサブグラフのインデックスを作成し、関連するトラフィックのリクエストに対応します -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### インデクサーが取るべきセキュリティ対策は? @@ -149,20 +149,20 @@ Use Etherscan to call `getRewards()`: #### グラフノード -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ------------------------------------------------------- | ------------------------------------------------------ | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ------------------------------------------------------------ | --------------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -730,10 +730,10 @@ default => 0.1 * $SYSTEM_LOAD; 上記のモデルを使用したクエリのコスト計算の例: -| クエリ | 価格 | +| クエリ | 価格 | | ---------------------------------------------------------------------------- | ------- | | { pairs(skip: 5000) { id } } | 0.5 GRT | -| { トークン { シンボル } } | 0.1 GRT | +| { トークン { シンボル } } | 0.1 GRT | | { pairs(skip: 5000) { id { tokens } symbol } } | 0.6 GRT | #### コストモデルの適用 diff --git a/website/pages/ja/operating-graph-node.mdx b/website/pages/ja/operating-graph-node.mdx index cec1b7f2f4fa..7b6aef1d16ba 100644 --- a/website/pages/ja/operating-graph-node.mdx +++ b/website/pages/ja/operating-graph-node.mdx @@ -26,7 +26,7 @@ title: オペレーティンググラフノード ### IPFSノード -IPFS ノード(バージョン 未満) - サブグラフのデプロイメタデータは IPFS ネットワーク上に保存されます。 グラフノードは、サブグラフのデプロイ時に主に IPFS ノードにアクセスし、サブグラフマニフェストと全てのリンクファイルを取得します。 ネットワーク・インデクサーは独自の IPFS ノードをホストする必要はありません。 ネットワーク用の IPFS ノードは、https://ipfs.network.thegraph.com でホストされています。 +IPFS ノード(バージョン 未満) - サブグラフのデプロイメタデータは IPFS ネットワーク上に保存されます。 グラフノードは、サブグラフのデプロイ時に主に IPFS ノードにアクセスし、サブグラフマニフェストと全てのリンクファイルを取得します。 ネットワーク・インデクサーは独自の IPFS ノードをホストする必要はありません。 ネットワーク用の IPFS ノードは、https://ipfs.network.thegraph.com でホストされています。 ### Prometheus メトリクスサーバー @@ -77,13 +77,13 @@ Kubernetesの完全な設定例は、[indexerリポジトリ](https://github.com グラフノードは起動時に以下のポートを公開します。 -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ------------------------------------------------------- | ------------------------------------------------------ | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **重要**: ポートを公に公開する場合は注意してください。**管理ポート**はロックしておく必要があります。ノードの JSON-RPC エンドポイント diff --git a/website/pages/ja/querying/graphql-api.mdx b/website/pages/ja/querying/graphql-api.mdx index 3d503ece126e..bb65c50d2929 100644 --- a/website/pages/ja/querying/graphql-api.mdx +++ b/website/pages/ja/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Graph Node [`v0.30.0`](https://github.com/graphprotocol/graph-node/releases/tag/ ``` > **シンタックス シュガー:** コンマで区切られた部分式を渡すことで `and` 演算子を削除することで、上記のクエリを簡素化できます。 -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) 全文検索演算子: -| シンボル | オペレーター | 説明書き | -| ----------- | ----------- | --------------------------------------------------------- | -| `&` | `と` | 複数の検索語を組み合わせて、指定したすべての検索語を含むエンティティをフィルタリングします。 | -| | | `Or` | 複数の検索語をオペレーターで区切って検索すると、指定した語のいずれかにマッチするすべてのエンティティが返されます。 | -| `<->` | `Follow by` | 2 つの単語の間の距離を指定します。 | -| `:*` | `プレフィックス` | プレフィックス検索語を使って、プレフィックスが一致する単語を検索します(2 文字必要) | +| シンボル | オペレーター | 説明書き | +| --- | --- | --- | +| `&` | `と` | 複数の検索語を組み合わせて、指定したすべての検索語を含むエンティティをフィルタリングします。 | +| | | `Or` | 複数の検索語をオペレーターで区切って検索すると、指定した語のいずれかにマッチするすべてのエンティティが返されます。 | +| `<->` | `Follow by` | 2 つの単語の間の距離を指定します。 | +| `:*` | `プレフィックス` | プレフィックス検索語を使って、プレフィックスが一致する単語を検索します(2 文字必要) | #### 例 diff --git a/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx index 82a7d23de3f8..766fbb6c80a3 100644 --- a/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ja/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + 変数シャドウイングを行っていた場合は、重複する変数の名前を変更する必要があります。 + ### Null 比較 + サブグラフのアップグレードを行うと、時々以下のようなエラーが発生することがあります。 ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + 解決するには、 `if` 文を以下のように変更するだけです。 ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + この問題を解決するには、そのプロパティアクセスのための変数を作成して、コンパイラが nullability check のマジックを行うようにします。 ```typescript diff --git a/website/pages/ja/sunrise.mdx b/website/pages/ja/sunrise.mdx index da5776901775..6eb05e59e427 100644 --- a/website/pages/ja/sunrise.mdx +++ b/website/pages/ja/sunrise.mdx @@ -12,9 +12,7 @@ Sunriseは、The Graphに取り組むEdge & Nodeが主導するイニシアチ ### Sunriseの各フェーズとは? -**Sunray**:ホスティングサービスチェーンのサポート、シームレスなアップグレードフローの提供、The Graph Networkでの無料プランの提供。 -**Sunbeam**:サブグラフ開発者がサブグラフをThe Graph Networkにアップグレードするためのアップグレードウィンドウ。詳細は近日中に発表されます。 -**Sunrise**:トラフィックがThe Graph Networkに移動すると、ホストされているサービスのエンドポイントが失効します。 +**Sunray**:ホスティングサービスチェーンのサポート、シームレスなアップグレードフローの提供、The Graph Networkでの無料プランの提供。 **Sunbeam**:サブグラフ開発者がサブグラフをThe Graph Networkにアップグレードするためのアップグレードウィンドウ。詳細は近日中に発表されます。 **Sunrise**:トラフィックがThe Graph Networkに移動すると、ホストされているサービスのエンドポイントが失効します。 ### インフラは自分で用意する必要がありますか? diff --git a/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx b/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx index 602b2a2c3aa2..de12152a1f00 100644 --- a/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx +++ b/website/pages/ko/arbitrum/l2-transfer-tools-faq.mdx @@ -22,8 +22,7 @@ The exception is with smart contract wallets like multisigs: these are smart con ### 만약 7일 안에 이체를 완료하지 못하면 어떻게 되나요? -L2 전송 도구는 Arbitrum의 기본 메커니즘을 사용하여 L1에서 L2로 메시지를 보냅니다. 이 메커니즘은 "재시도 가능한 티켓"이라고 하며 Arbitrum GRT 브리지를 포함한 모든 네이티브 토큰 브리지를 사용하여 사용됩니다. 재시도 가능한 티켓에 대해 자세히 읽을 수 있습니다 [Arbitrum 문서] -(https://docs.arbitrum.io/arbos/l1-to-l2-messaging). +L2 전송 도구는 Arbitrum의 기본 메커니즘을 사용하여 L1에서 L2로 메시지를 보냅니다. 이 메커니즘은 "재시도 가능한 티켓"이라고 하며 Arbitrum GRT 브리지를 포함한 모든 네이티브 토큰 브리지를 사용하여 사용됩니다. 재시도 가능한 티켓에 대해 자세히 읽을 수 있습니다 [Arbitrum 문서] (https://docs.arbitrum.io/arbos/l1-to-l2-messaging). 자산(하위 그래프, 스테이크, 위임 또는 큐레이션) 을 L2로 이전하면 L2에서 재시도 가능한 티켓을 생성하는 Arbitrum GRT 브리지를 통해 메시지가 전송됩니다. 전송 도구에는 거래에 일부 ETH 값이 포함되어 있으며, 이는 1) 티켓 생성 비용을 지불하고 2) L2에서 티켓을 실행하기 위해 가스 비용을 지불하는 데 사용됩니다. 그러나 티켓이 L2에서 실행될 준비가 될 때까지 가스 가격이 시간에 따라 달라질 수 있으므로 이 자동 실행 시도가 실패할 수 있습니다. 그런 일이 발생하면 Arbitrum 브릿지는 재시도 가능한 티켓을 최대 7일 동안 유지하며 누구나 티켓 "사용"을 재시도할 수 있습니다(Arbitrum에 브릿지된 일부 ETH가 있는 지갑이 필요함). @@ -41,8 +40,6 @@ If you have the L1 transaction hash (which you can find by looking at the recent - - 1. 이더리움 메인넷에서 전송 시작 2. 확인을 위해 20분 정도 기다리세요 diff --git a/website/pages/ko/developing/creating-a-subgraph.mdx b/website/pages/ko/developing/creating-a-subgraph.mdx index db9e8a024571..39f58ac2083b 100644 --- a/website/pages/ko/developing/creating-a-subgraph.mdx +++ b/website/pages/ko/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/ko/developing/graph-ts/api.mdx b/website/pages/ko/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/ko/developing/graph-ts/api.mdx +++ b/website/pages/ko/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/ko/developing/unit-testing-framework.mdx b/website/pages/ko/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/ko/developing/unit-testing-framework.mdx +++ b/website/pages/ko/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/ko/network/benefits.mdx b/website/pages/ko/network/benefits.mdx index 09c0548bfc4f..864672b16515 100644 --- a/website/pages/ko/network/benefits.mdx +++ b/website/pages/ko/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/ko/network/indexing.mdx b/website/pages/ko/network/indexing.mdx index 842a5c8e0c74..9bdc2fb2eb7e 100644 --- a/website/pages/ko/network/indexing.mdx +++ b/website/pages/ko/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/ko/operating-graph-node.mdx b/website/pages/ko/operating-graph-node.mdx index a7dd15e7a84c..4f0f856db111 100644 --- a/website/pages/ko/operating-graph-node.mdx +++ b/website/pages/ko/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/ko/querying/graphql-api.mdx b/website/pages/ko/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/ko/querying/graphql-api.mdx +++ b/website/pages/ko/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ko/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/mr/cookbook/subgraph-debug-forking.mdx b/website/pages/mr/cookbook/subgraph-debug-forking.mdx index 06ceb8df1ce1..ae08df06ed38 100644 --- a/website/pages/mr/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/mr/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ title: फॉर्क्स वापरून जलद आणि सुलभ जेव्हा तुम्ही इंडेक्सिंगसाठी रिमोट ग्राफ नोडवर सबग्राफ उपयोजित करता आणि तो ब्लॉक _X_ वर अयशस्वी होतो, तेव्हा चांगली बातमी अशी आहे की आलेख नोड अजूनही त्याचे स्टोअर वापरून GraphQL क्वेरी सर्व्ह करेल, जे _X_ अवरोधित करण्यासाठी समक्रमित केले आहे. खूप छान आहे! याचा अर्थ ब्लॉक _X_ अनुक्रमित करताना उद्भवणाऱ्या बगचे निराकरण करण्यासाठी आम्ही या "अप-टू-डेट" स्टोअरचा लाभ घेऊ शकतो. -थोडक्यात, आम्ही एका रिमोट ग्राफ नोडवरून _अयशस्वी सबग्राफ फोर्क करणार आहोत_ ज्याला *X* ब्लॉक _X_ वर डीबग केलेला स्थानिकरित्या उपयोजित सबग्राफ प्रदान करण्यासाठी अनुक्रमणिका स्थितीचे अद्ययावत दृश्य. +थोडक्यात, आम्ही एका रिमोट ग्राफ नोडवरून _अयशस्वी सबग्राफ फोर्क करणार आहोत_ ज्याला _X_ ब्लॉक _X_ वर डीबग केलेला स्थानिकरित्या उपयोजित सबग्राफ प्रदान करण्यासाठी अनुक्रमणिका स्थितीचे अद्ययावत दृश्य. ## कृपया, मला काही कोड दाखवा! @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -अरेरे, किती दुर्दैवी आहे, जेव्हा मी माझा परिपूर्ण दिसणारा सबग्राफ [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर तैनात करतो तेव्हा तो *"Gravatar आढळले नाही!"* त्रुटी. +अरेरे, किती दुर्दैवी आहे, जेव्हा मी माझा परिपूर्ण दिसणारा सबग्राफ [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर तैनात करतो तेव्हा तो _"Gravatar आढळले नाही!"_ त्रुटी. निराकरण करण्याचा प्रयत्न करण्याचा नेहमीचा मार्ग आहे: diff --git a/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx index 3f0b45cc25a7..ef5d4a07489c 100644 --- a/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/mr/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: होस्ट केलेल्या सेवेसाठी सब ## होस्ट केलेले सेवा खाते तयार करा -होस्ट केलेली सेवा वापरण्यापूर्वी, आमच्या होस्ट केलेल्या सेवेमध्ये खाते तयार करा. त्यासाठी तुम्हाला [Github](https://github.com/) खात्याची आवश्यकता असेल; जर तुमच्याकडे नसेल, तर तुम्हाला ते प्रथम तयार करावे लागेल. त्यानंतर, [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर नेव्हिगेट करा, _'Github सह साइन अप करा' वर क्लिक करा _बटण, आणि Github चा अधिकृतता प्रवाह पूर्ण करा. +होस्ट केलेली सेवा वापरण्यापूर्वी, आमच्या होस्ट केलेल्या सेवेमध्ये खाते तयार करा. त्यासाठी तुम्हाला [Github](https://github.com/) खात्याची आवश्यकता असेल; जर तुमच्याकडे नसेल, तर तुम्हाला ते प्रथम तयार करावे लागेल. त्यानंतर, [होस्टेड सर्व्हिस](https://thegraph.com/hosted-service/) वर नेव्हिगेट करा, *'Github सह साइन अप करा' वर क्लिक करा *बटण, आणि Github चा अधिकृतता प्रवाह पूर्ण करा. ## प्रवेश टोकन साठवा diff --git a/website/pages/mr/developing/creating-a-subgraph.mdx b/website/pages/mr/developing/creating-a-subgraph.mdx index 5b2aa532c95d..060f832cf1b3 100644 --- a/website/pages/mr/developing/creating-a-subgraph.mdx +++ b/website/pages/mr/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ type GravatarDeclined @entity { We support the following scalars in our GraphQL API: -| प्रकार | वर्णन | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `बाइट्स` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `स्ट्रिंग` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `बुलियन` | `बूलियन` मूल्यांसाठी स्केलर. | -| `इंट` | GraphQL spec `Int` ला ३२ बाइट्सचा आकार ठरवतो. | -| `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` | मोठे पूर्णांक. इथरियमच्या `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारांसाठी वापरले जाते. टीप: `uint32` खाली सर्व काही, जसे की `int32`, `uint24` किंवा `int8` `i32` म्हणून प्रस्तुत केले जाते 0>. | -| `बिग डेसिमल` | `BigDecimal` उच्च सुस्पष्टता दशांश एक महत्त्वपूर्ण आणि घातांक म्हणून प्रस्तुत केले जाते. घातांक श्रेणी −6143 ते +6144 पर्यंत आहे. 34 लक्षणीय अंकांपर्यंत पूर्णांक. | +| प्रकार | वर्णन | +| --- | --- | +| `बाइट्स` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `स्ट्रिंग` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `बुलियन` | `बूलियन` मूल्यांसाठी स्केलर. | +| `इंट` | GraphQL spec `Int` ला ३२ बाइट्सचा आकार ठरवतो. | +| `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` | मोठे पूर्णांक. इथरियमच्या `uint32`, `int64`, `uint64`, ..., `uint256` प्रकारांसाठी वापरले जाते. टीप: `uint32` खाली सर्व काही, जसे की `int32`, `uint24` किंवा `int8` `i32` म्हणून प्रस्तुत केले जाते 0>. | +| `बिग डेसिमल` | `BigDecimal` उच्च सुस्पष्टता दशांश एक महत्त्वपूर्ण आणि घातांक म्हणून प्रस्तुत केले जाते. घातांक श्रेणी −6143 ते +6144 पर्यंत आहे. 34 लक्षणीय अंकांपर्यंत पूर्णांक. | #### एनम्स @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **टीप:** नवीन डेटा स्रोत केवळ तो ज्या ब्लॉकमध्ये तयार केला गेला होता आणि पुढील सर्व ब्लॉकसाठी कॉल्स आणि इव्हेंटवर प्रक्रिया करेल, परंतु ऐतिहासिक डेटावर प्रक्रिया करणार नाही, म्हणजे, डेटावर प्रक्रिया करणार नाही. जे आधीच्या ब्लॉक्समध्ये समाविष्ट आहे. -> +> > पूर्वीच्या ब्लॉक्समध्ये नवीन डेटा स्रोताशी संबंधित डेटा असल्यास, कराराची वर्तमान स्थिती वाचून आणि नवीन डेटा स्रोत तयार करताना त्या स्थितीचे प्रतिनिधित्व करणारी संस्था तयार करून तो डेटा अनुक्रमित करणे सर्वोत्तम आहे. ### डेटा स्रोत संदर्भ @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/mr/developing/graph-ts/api.mdx b/website/pages/mr/developing/graph-ts/api.mdx index c3aacbae1b40..16f403727d60 100644 --- a/website/pages/mr/developing/graph-ts/api.mdx +++ b/website/pages/mr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| आवृत्ती | रिलीझ नोट्स | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| आवृत्ती | रिलीझ नोट्स | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### अंगभूत प्रकार @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### प्रकार रूपांतरण संदर्भ -| Source(s) | Destination | Conversion function | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| स्ट्रिंग (हेक्साडेसिमल) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| ----------------------- | ----------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| स्ट्रिंग (हेक्साडेसिमल) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### डेटा स्रोत मेटाडेटा diff --git a/website/pages/mr/developing/unit-testing-framework.mdx b/website/pages/mr/developing/unit-testing-framework.mdx index 6910325a0758..85fdc6571ca1 100644 --- a/website/pages/mr/developing/unit-testing-framework.mdx +++ b/website/pages/mr/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ ___ ___ _ _ _ _ _ याचा अर्थ तुम्ही तुमच्या कोडमध्ये `console.log` वापरले आहे, जे असेंबलीस्क्रिप्टद्वारे समर्थित नाही. कृपया [लॉगिंग API](/developing/assemblyscript-api/#logging-api) वापरण्याचा विचार करा > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > त्रुटी TS2554: अपेक्षित आहे? युक्तिवाद, पण मिळाले?. -> +> > नवीन ethereum.Transaction परत करा(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) `graph-ts` आणि `matchstick-as` मधील जुळत नसल्यामुळे वितर्कांमधील जुळत नाही. यासारख्या समस्यांचे निराकरण करण्याचा सर्वोत्तम मार्ग म्हणजे नवीनतम रिलीझ केलेल्या आवृत्तीवर सर्वकाही अद्यतनित करणे. diff --git a/website/pages/mr/network/benefits.mdx b/website/pages/mr/network/benefits.mdx index bacc3941bb26..c3322af4ad95 100644 --- a/website/pages/mr/network/benefits.mdx +++ b/website/pages/mr/network/benefits.mdx @@ -27,47 +27,47 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## कमी आवाज वापरकर्ता (दरमहा 30,000 पेक्षा कमी क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -|:----------------------------:|:---------------------------------------:|:------------------------------------------------------------------------:| -| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | -| क्वेरी खर्च | $0+ | दरमहा ~$15 | -| अभियांत्रिकी वेळ | दरमहा $400 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000 (ऑटोस्केलिंग) | -| प्रति क्वेरी खर्च | $0 | $0.0005 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड $750+ | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $750+ | ~$15 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | +| क्वेरी खर्च | $0+ | दरमहा ~$15 | +| अभियांत्रिकी वेळ | दरमहा $400 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000 (ऑटोस्केलिंग) | +| प्रति क्वेरी खर्च | $0 | $0.0005 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड $750+ | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $750+ | ~$15 | ## मध्यम व्हॉल्यूम वापरकर्ता (दरमहा 3,000,000+ क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -|:----------------------------:|:------------------------------------------:|:------------------------------------------------------------------------:| -| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | -| क्वेरी खर्च | दरमहा $500 | दरमहा $750 | -| अभियांत्रिकी वेळ | दरमहा $800 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 3,000,000+ | -| प्रति क्वेरी खर्च | $0 | $0.00025 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| अभियांत्रिकी खर्च | $200 प्रति तास | समाविष्ट | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $1,650+ | $750 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्व्हर खर्च\* | दरमहा $350 | $0 | +| क्वेरी खर्च | दरमहा $500 | दरमहा $750 | +| अभियांत्रिकी वेळ | दरमहा $800 | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 3,000,000+ | +| प्रति क्वेरी खर्च | $0 | $0.00025 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| अभियांत्रिकी खर्च | $200 प्रति तास | समाविष्ट | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $1,650+ | $750 | ## उच्च व्हॉल्यूम वापरकर्ता (दरमहा 30,000,000+ क्वेरी) -| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | -|:----------------------------:|:-------------------------------------------:|:------------------------------------------------------------------------:| -| मासिक सर्व्हर खर्च\* | प्रति नोड, प्रति महिना $1100 | $0 | -| क्वेरी खर्च | $4000 | दरमहा $4,500 | -| आवश्यक नोड्सची संख्या | 10 | लागू नाही | -| अभियांत्रिकी वेळ | दरमहा $6,000 किंवा अधिक | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | -| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000,000+ | -| प्रति क्वेरी खर्च | $0 | $0.00015 | -| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | -| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | -| अपटाइम | बदलते | 99.9%+ | -| एकूण मासिक खर्च | $11,000+ | $4,500 | +| खर्चाची तुलना | स्वत: होस्ट केलेले | आलेख नेटवर्क | +| :-: | :-: | :-: | +| मासिक सर्व्हर खर्च\* | प्रति नोड, प्रति महिना $1100 | $0 | +| क्वेरी खर्च | $4000 | दरमहा $4,500 | +| आवश्यक नोड्सची संख्या | 10 | लागू नाही | +| अभियांत्रिकी वेळ | दरमहा $6,000 किंवा अधिक | काहीही नाही, जागतिक स्तरावर वितरित इंडेक्सर्ससह नेटवर्कमध्ये तयार केलेले | +| प्रति महिना प्रश्न | इन्फ्रा क्षमतांपुरती मर्यादित | 30,000,000+ | +| प्रति क्वेरी खर्च | $0 | $0.00015 | +| पायाभूत सुविधा | केंद्रीकृत | विकेंद्रित | +| भौगोलिक रिडंडंसी | प्रति अतिरिक्त नोड एकूण खर्चात $1,200 | समाविष्ट | +| अपटाइम | बदलते | 99.9%+ | +| एकूण मासिक खर्च | $11,000+ | $4,500 | \*बॅकअपच्या खर्चासह: $50-$100 प्रति महिना diff --git a/website/pages/mr/network/delegating.mdx b/website/pages/mr/network/delegating.mdx index 4370f27cb5c4..74e6bf0d8e10 100644 --- a/website/pages/mr/network/delegating.mdx +++ b/website/pages/mr/network/delegating.mdx @@ -34,7 +34,7 @@ Listed below are the main risks of being a Delegator in the protocol.
    ![प्रतिनिधी अनबॉन्डिंग](/img/Delegation-Unbonding.png) _डेलिगेशन UI मध्ये 0.5% शुल्क तसेच २८ दिवसांची नोंद घ्या - अनबॉन्डिंग कालावधी._ + अनबॉन्डिंग कालावधी._
    ### Choosing a trustworthy Indexer with a fair reward payout for Delegators @@ -44,8 +44,8 @@ Listed below are the main risks of being a Delegator in the protocol. इंडेक्सिंग रिवॉर्ड कट - इंडेक्सिंग रिवॉर्ड कट हा रिवॉर्डचा भाग आहे जो इंडेक्सर स्वतःसाठी ठेवतो. याचा अर्थ 100% वर सेट केल्यास, प्रतिनिधी म्हणून तुम्हाला 0 इंडेक्सिंग रिवॉर्ड मिळतील. तुम्हाला UI मध्ये 80% दिसल्यास, याचा अर्थ प्रतिनिधी म्हणून, तुम्हाला 20% मिळेल. एक महत्त्वाची टीप - नेटवर्कच्या सुरूवातीस, बहुसंख्य पुरस्कारांसाठी अनुक्रमणिका रिवॉर्ड्स असतील.
    - ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *टॉप इंडेक्सर प्रतिनिधींना 90% बक्षिसे देत आहे. द - मधला प्रतिनिधी 20% देत आहे. सर्वात खालचा भाग प्रतिनिधींना ~83% देत आहे.* + ![इंडेक्सिंग रिवॉर्ड कट](/img/Indexing-Reward-Cut.png) *टॉप इंडेक्सर प्रतिनिधींना 90% बक्षिसे देत आहे. द मधला + प्रतिनिधी 20% देत आहे. सर्वात खालचा भाग प्रतिनिधींना ~83% देत आहे.*
    - क्वेरी फी कट - हे इंडेक्सिंग रिवॉर्ड कट प्रमाणेच कार्य करते. तथापि, हे विशेषत: इंडेक्सर गोळा केलेल्या क्वेरी शुल्कावरील परताव्यासाठी आहे. हे लक्षात घेतले पाहिजे की नेटवर्कच्या सुरूवातीस, अनुक्रमणिकेच्या रिवॉर्डच्या तुलनेत क्वेरी फीमधून मिळणारे रिटर्न खूपच कमी असेल. नेटवर्कमधील क्वेरी शुल्क अधिक लक्षणीय केव्हा सुरू होईल हे निर्धारित करण्यासाठी नेटवर्ककडे लक्ष देण्याची शिफारस केली जाते. diff --git a/website/pages/mr/network/indexing.mdx b/website/pages/mr/network/indexing.mdx index 9cdbc569d607..4ead6f7ae74b 100644 --- a/website/pages/mr/network/indexing.mdx +++ b/website/pages/mr/network/indexing.mdx @@ -112,12 +112,12 @@ Once an allocation has been closed the rebates are available to be claimed by th - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| ------ |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| मानक | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| मानक | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Once an allocation has been closed the rebates are available to be claimed by th #### आलेख नोड -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent @@ -623,7 +623,7 @@ graph indexer rules delete QmZfeJYR86UARzp9HiXbURWunYgC9ywvPvoePNbuaATrEK - Indexer can use the `indexer-cli` to view all queued actions - इंडेक्सर (किंवा इतर सॉफ्टवेअर) `indexer-cli` वापरून रांगेतील क्रिया मंजूर किंवा रद्द करू शकतात. मंजूर आणि रद्द आदेश इनपुट म्हणून अॅक्शन आयडीचा अॅरे घेतात. - अंमलबजावणी कर्मचारी नियमितपणे मंजूर कृतींसाठी रांगेत मतदान करतात. ते रांगेतील `मंजूर` क्रिया पकडेल, त्या कार्यान्वित करण्याचा प्रयत्न करेल आणि अंमलबजावणीच्या स्थितीनुसार `यशस्वी` किंवा `अयशस्वी< वर db मधील मूल्ये अपडेट करेल. /code>.
  • -
  • एखादी कृती यशस्वी झाल्यास कार्यकर्ता खात्री करेल की एक अनुक्रमणिका नियम उपस्थित आहे जो एजंटला वाटप कसे व्यवस्थापित करावे हे सांगते, एजंट ऑटो` किंवा ` मध्ये असताना मॅन्युअल क्रिया करताना उपयुक्त oversight` मोड. +
  • एखादी कृती यशस्वी झाल्यास कार्यकर्ता खात्री करेल की एक अनुक्रमणिका नियम उपस्थित आहे जो एजंटला वाटप कसे व्यवस्थापित करावे हे सांगते, एजंट ऑटो` किंवा ` मध्ये असताना मॅन्युअल क्रिया करताना उपयुक्त oversight` मोड. - इंडेक्सर कारवाईच्या अंमलबजावणीचा इतिहास पाहण्यासाठी कृती रांगेचे निरीक्षण करू शकतो आणि आवश्यक असल्यास क्रिया आयटमची अंमलबजावणी अयशस्वी झाल्यास पुन्हा मंजूर आणि अद्यतनित करू शकतो. कृती रांग रांगेत लावलेल्या आणि केलेल्या सर्व क्रियांचा इतिहास प्रदान करते. Data model: diff --git a/website/pages/mr/operating-graph-node.mdx b/website/pages/mr/operating-graph-node.mdx index 598d94037dae..fe9e6c5fb9f3 100644 --- a/website/pages/mr/operating-graph-node.mdx +++ b/website/pages/mr/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| बंदर | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| बंदर | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **महत्त्वाचे**: पोर्ट सार्वजनिकपणे उघड करण्याबाबत सावधगिरी बाळगा - **प्रशासन पोर्ट** लॉक डाउन ठेवले पाहिजेत. यामध्ये ग्राफ नोड JSON-RPC एंडपॉइंटचा समावेश आहे. diff --git a/website/pages/mr/querying/graphql-api.mdx b/website/pages/mr/querying/graphql-api.mdx index de35e41f2124..b66f2673be24 100644 --- a/website/pages/mr/querying/graphql-api.mdx +++ b/website/pages/mr/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | वर्णन | -| ----------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `आणि` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `किंवा` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `द्वारे अनुसरण करा` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | वर्णन | +| --- | --- | --- | +| `&` | `आणि` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `किंवा` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `द्वारे अनुसरण करा` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx index 2d735415bebb..a170ebec8cda 100644 --- a/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/mr/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ However now this isn't possible anymore, and the compiler returns this error: ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/nl/arbitrum/arbitrum-faq.mdx b/website/pages/nl/arbitrum/arbitrum-faq.mdx index 457f2a55409b..a48dc60d2789 100644 --- a/website/pages/nl/arbitrum/arbitrum-faq.mdx +++ b/website/pages/nl/arbitrum/arbitrum-faq.mdx @@ -45,8 +45,7 @@ Please help [test the network](https://testnet.thegraph.com/explorer) on L2 and ## Zijn er risico's verbonden met het schalen van het netwerk naar L2? -Alle smart contracts zijn grondig [ge-audit] -(https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Alle smart contracts zijn grondig [ge-audit] (https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). Alles is grondig getest, en een eventualiteiten plan is gemaakt en klaargezet voor een veilige en naadloze transitie. Details kunnen [hier](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20) gevonden worden. diff --git a/website/pages/nl/developing/creating-a-subgraph.mdx b/website/pages/nl/developing/creating-a-subgraph.mdx index db9e8a024571..39f58ac2083b 100644 --- a/website/pages/nl/developing/creating-a-subgraph.mdx +++ b/website/pages/nl/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/nl/developing/graph-ts/api.mdx b/website/pages/nl/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/nl/developing/graph-ts/api.mdx +++ b/website/pages/nl/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/nl/developing/unit-testing-framework.mdx b/website/pages/nl/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/nl/developing/unit-testing-framework.mdx +++ b/website/pages/nl/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/nl/network/benefits.mdx b/website/pages/nl/network/benefits.mdx index ccb2babe1b4c..86608928d730 100644 --- a/website/pages/nl/network/benefits.mdx +++ b/website/pages/nl/network/benefits.mdx @@ -5,7 +5,7 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg Het gedecentraliseerde netwerk van The Graph is ontworpen en verfijnd om een robuuste ervaring te creëren bij het indexeren en opvragen van data. Het netwerk wordt iedere dag sterker door de duizenden bijdragers wereldwijd. -De voordelen van dit gedecentraliseerde protocol is dat het niet gerepliceerd kan worden door een `graph-node` lokaal te laten werken. Het Graph Netwerk is betrouwbaarder, efficiënter en goedkoper. +De voordelen van dit gedecentraliseerde protocol is dat het niet gerepliceerd kan worden door een `graph-node` lokaal te laten werken. Het Graph Netwerk is betrouwbaarder, efficiënter en goedkoper. Hier is een analyse: @@ -27,53 +27,54 @@ Kosten per query kunnen variëren; de genoemde kosten zijn het gemiddelde op het ## Gebruiker met een laag volume (minder dan 30.000 queries per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -|:--------------------------:|:---------------------------------------:|:------------------------------------------------------------------------------------------------:| -| Maandelijkse serverkosten | $350 per maand | $0 | -| Querykosten | $0+ | ~$15 per maand | -| Onderhoud tijd | $400 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000 (schaalt automatisch) | -| Kosten per query | $0 | $0,0005 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Geografische redundantie | $750+ per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $750+ | ~$15 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +| :-: | :-: | :-: | +| Maandelijkse serverkosten | $350 per maand | $0 | +| Querykosten | $0+ | ~$15 per maand | +| Onderhoud tijd | $400 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000 (schaalt automatisch) | +| Kosten per query | $0 | $0,0005 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Geografische redundantie | $750+ per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $750+ | ~$15 | ## Gebruiker met een gemiddeld volume (3.000.000+ queries per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -|:---------------------------:|:-----------------------------------------:|:------------------------------------------------------------------------------------------------:| -| Maandelijkse serverkosten | $350 per maand | $0 | -| Querykosten | $500 per maand | $750 per maand | -| Onderhoud | $800 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 3000000+ | -| Kosten per query | $0 | $0,00025 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Technische personeelskosten | $200 per uur | Inbegrepen | -| Geografische redundantie | $1200 totale kosten per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $1650+ | $750 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +| :-: | :-: | :-: | +| Maandelijkse serverkosten | $350 per maand | $0 | +| Querykosten | $500 per maand | $750 per maand | +| Onderhoud | $800 per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 3000000+ | +| Kosten per query | $0 | $0,00025 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Technische personeelskosten | $200 per uur | Inbegrepen | +| Geografische redundantie | $1200 totale kosten per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $1650+ | $750 | ## Gebruiker met een hoog volume (30.000.000+ query's per maand) -| Kostenvergelijking | Zelf hosten | Graph Netwerk | -|:--------------------------:|:------------------------------------------:|:------------------------------------------------------------------------------------------------:| -| Maandelijkse serverkosten | $1100 per maand, per node | $0 | -| Querykosten | $4000 | $4500 per maand | -| Aantal benodigde nodes | 10 | Niet van toepassing | -| Onderhoud | $6000 of meer per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | -| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000000+ | -| Kosten per query | $0 | $0.00015 | -| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | -| Geografische redundantie | $1200 in totale kosten per extra node | Inbegrepen | -| Uptime | Wisselend | 99,9%+ | -| Totale maandelijkse kosten | $11000+ | $4500 | +| Kostenvergelijking | Zelf hosten | Graph Netwerk | +| :-: | :-: | :-: | +| Maandelijkse serverkosten | $1100 per maand, per node | $0 | +| Querykosten | $4000 | $4500 per maand | +| Aantal benodigde nodes | 10 | Niet van toepassing | +| Onderhoud | $6000 of meer per maand | Geen, deze kosten worden opgevangen door het wereldwijd gedistribueerde netwerk van indexeerders | +| Aantal queries per maand | Beperkt tot infrastructuurcapaciteiten | 30000000+ | +| Kosten per query | $0 | $0.00015 | +| Infrastructuur | Gecentraliseerd | Gedecentraliseerd | +| Geografische redundantie | $1200 in totale kosten per extra node | Inbegrepen | +| Uptime | Wisselend | 99,9%+ | +| Totale maandelijkse kosten | $11000+ | $4500 | \*inclusief kosten voor een back-up: $50-$100 per maand Onderhoud tijd gebaseerd op $200 per uur -gebruikmakend van de maximale querybudgetfunctie in het budgetfacturatietabblad, met behoud van hoge kwaliteit van de service +gebruikmakend van de maximale querybudgetfunctie in het budgetfacturatietabblad, met behoud van hoge +kwaliteit van de service Geschatte kosten gelden alleen voor Ethereum Mainnet-subgraphs - de kosten zijn nog hoger bij zelfhosting van een `graph-node` op andere netwerken. diff --git a/website/pages/nl/network/delegating.mdx b/website/pages/nl/network/delegating.mdx index 9cf383d14f26..505bc480d83c 100644 --- a/website/pages/nl/network/delegating.mdx +++ b/website/pages/nl/network/delegating.mdx @@ -33,7 +33,8 @@ Wanneer een Delegeerder een delegatie wil sluiten, zijn hun tokens gebonden aan Een andere overweging is ook het wijs kiezen van een Indexeerder. Als je een Indexeerder kiest die niet betrouwbaar was of zijn werk niet goed doet, wil je je delegatie sluiten, wat betekent dat je veel kansen om beloningen te ontvangen zal missen wat net zo slecht kan zijn als GRT verbranden.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Let op de 0,5% belasting in de Delegatie UI, evenals de 28-daagse ontbindingsperiode_ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Let op de 0,5% belasting in de Delegatie UI, evenals de + 28-daagse ontbindingsperiode_
    ### Het kiezen van een betrouwbare Indexeerder met een eerlijke beloningsuitbetaling voor Delegeerders @@ -43,7 +44,8 @@ Dit is een belangrijk aspect om te begrijpen. Laten we eerst drie zeer belangrij Indexing Reward Cut - De indexing reward cut is het deel van de beloningen dat de Indexeerder voor zichzelf zal houden. Dat betekent dat als het is ingesteld op 100%, je als delegeerder 0% van de beloningen voor het indexeren krijgt. Als je 80% ziet op de website, betekent dit dat je als Delegeerder 20% van de beloningen ontvangt. Een belangrijke opmerking - aan het begin van het netwerk zullen Indexing Rewards het grootste deel van de beloningen uitmaken.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *De bovenste Indexeerder geeft Delegeerders 90% van de beloningen. De middelste geeft Delegeerders 20%. De onderste geeft Delegeerders ~83%.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *De bovenste Indexeerder geeft Delegeerders 90% van de + beloningen. De middelste geeft Delegeerders 20%. De onderste geeft Delegeerders ~83%.*
    - Query Fee Cut - Dit werkt precies hetzelfde als de Indexing Reward Cut. Dit is echter specifiek voor opbrengsten uit de querykosten die de Indexer binnen krijgt. Aan het begin van het netwerk zullen de opbrengsten uit querykosten erg klein zijn in vergelijking met de opbrengsten van het indexeren. Het wordt aanbevolen om aandacht te besteden aan het netwerkactiviteit om te bepalen wanneer de querykosten in het netwerk significant zullen worden. diff --git a/website/pages/nl/network/indexing.mdx b/website/pages/nl/network/indexing.mdx index 842a5c8e0c74..9bdc2fb2eb7e 100644 --- a/website/pages/nl/network/indexing.mdx +++ b/website/pages/nl/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/nl/operating-graph-node.mdx b/website/pages/nl/operating-graph-node.mdx index a7dd15e7a84c..4f0f856db111 100644 --- a/website/pages/nl/operating-graph-node.mdx +++ b/website/pages/nl/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/nl/querying/graphql-api.mdx b/website/pages/nl/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/nl/querying/graphql-api.mdx +++ b/website/pages/nl/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx b/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/nl/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/pl/developing/creating-a-subgraph.mdx b/website/pages/pl/developing/creating-a-subgraph.mdx index db9e8a024571..39f58ac2083b 100644 --- a/website/pages/pl/developing/creating-a-subgraph.mdx +++ b/website/pages/pl/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/pl/developing/graph-ts/api.mdx b/website/pages/pl/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/pl/developing/graph-ts/api.mdx +++ b/website/pages/pl/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/pl/developing/unit-testing-framework.mdx b/website/pages/pl/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/pl/developing/unit-testing-framework.mdx +++ b/website/pages/pl/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/pl/network/benefits.mdx b/website/pages/pl/network/benefits.mdx index 09c0548bfc4f..864672b16515 100644 --- a/website/pages/pl/network/benefits.mdx +++ b/website/pages/pl/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/pl/network/indexing.mdx b/website/pages/pl/network/indexing.mdx index 842a5c8e0c74..9bdc2fb2eb7e 100644 --- a/website/pages/pl/network/indexing.mdx +++ b/website/pages/pl/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/pl/operating-graph-node.mdx b/website/pages/pl/operating-graph-node.mdx index a7dd15e7a84c..4f0f856db111 100644 --- a/website/pages/pl/operating-graph-node.mdx +++ b/website/pages/pl/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/pl/querying/graphql-api.mdx b/website/pages/pl/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/pl/querying/graphql-api.mdx +++ b/website/pages/pl/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/pl/quick-start.mdx b/website/pages/pl/quick-start.mdx index 96627e4a43e1..da9324f4ad3d 100644 --- a/website/pages/pl/quick-start.mdx +++ b/website/pages/pl/quick-start.mdx @@ -1,5 +1,5 @@ --- -title: " Na start" +title: ' Na start' --- This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the hosted service. diff --git a/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx b/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/pl/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/pt/cookbook/arweave.mdx b/website/pages/pt/cookbook/arweave.mdx index 1799ed4b4819..1b730d68ff80 100644 --- a/website/pages/pt/cookbook/arweave.mdx +++ b/website/pages/pt/cookbook/arweave.mdx @@ -86,7 +86,7 @@ dataSources: - A rede deve corresponder a uma rede no Graph Node que a hospeda. No serviço hospedado, a mainnet do Arweave é `arweave-mainnet` - Fontes de dados no Arweave introduzem um campo `source.owner` opcional, a chave pública de uma carteira no Arweave -Fontes de dados no Arweave apoiam duas categorias de *handlers*: +Fontes de dados no Arweave apoiam duas categorias de _handlers_: - `blockHandlers` - Executar em cada bloco novo no Arweave. Nenhum `source.owner` é exigido. - `transactionHandlers` — Executar em todas as transações onde o `source.owner` da fonte de dados é o dono. Atualmente, um dono é exigido para o `transactionHandlers`; caso utilizadores queiram processar todas as transações, eles devem providenciar "" como o `source.owner` @@ -97,15 +97,15 @@ Fontes de dados no Arweave apoiam duas categorias de *handlers*: > Nota: Transações no [Bundlr](https://bundlr.network/) não são apoiadas presentemente. -## Definição de *Schema* +## Definição de _Schema_ A definição de Schema descreve a estrutura do banco de dados resultado do subgraph, e os relacionamentos entre entidades. Isto é agnóstico da fonte de dados original. Há mais detalhes na definição de schema de subgraph [aqui](/developing/creating-a-subgraph/#the-graphql-schema). ## Mapeamentos de AssemblyScript -Os *handlers* para eventos de processamento são escritos em [AssemblyScript](https://www.assemblyscript.org/). +Os _handlers_ para eventos de processamento são escritos em [AssemblyScript](https://www.assemblyscript.org/). -O *indexing* do Arweave introduz categorias de dados específicas ao Arweave ao [API do AssemblyScript](/developing/assemblyscript-api/). +O _indexing_ do Arweave introduz categorias de dados específicas ao Arweave ao [API do AssemblyScript](/developing/assemblyscript-api/). ```tsx class Block { @@ -146,7 +146,7 @@ class Transaction { } ``` -*Handlers* de bloco recebem um `Block`, enquanto transações recebem uma `Transaction`. +_Handlers_ de bloco recebem um `Block`, enquanto transações recebem uma `Transaction`. Escrever os mapeamentos de um Subgraph no Arweave é muito similar à escrita dos mapeamentos de um Subgraph no Ethereum. Para mais informações, clique [aqui](/developing/creating-a-subgraph/#writing-mappings). diff --git a/website/pages/pt/developing/creating-a-subgraph.mdx b/website/pages/pt/developing/creating-a-subgraph.mdx index 8b8b9b90cb3b..ba8846de21a1 100644 --- a/website/pages/pt/developing/creating-a-subgraph.mdx +++ b/website/pages/pt/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Para alguns tipos de entidade, o `id` é construído das id's de duas outras ent Nós apoiamos os seguintes escalares na nossa API do GraphQL: -| Tipo | Descrição | -| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Arranjo de bytes, representado como string hexadecimal. Usado frequentemente por hashes e endereços no Ethereum. | -| `String` | Escalar para valores `string`. Caracteres nulos são removidos automaticamente. | -| `Boolean` | Escalar para valores `boolean`. | -| `Int` | A especificação do GraphQL define que o `Int` tem um tamanho de 32 bytes. | -| `Int8` | Um número inteiro assinado em 8 bits, também conhecido como um número inteiro assinado em 64 bits, pode armazenar valores de -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. Prefira usar isto para representar o `i64` do ethereum. | -| `BigInt` | Números inteiros grandes. Usados para os tipos `uint32`, `int64`, `uint64`, ..., `uint256` do Ethereum. Nota: Tudo abaixo de `uint32`, como `int32`, `uint24` ou `int8` é representado como `i32`. | -| `BigDecimal` | `BigDecimal` Decimais de alta precisão representados como um significando e um exponente. O alcance de exponentes é de -6143 até +6144. Arredondado para 34 dígitos significantes. | +| Tipo | Descrição | +| --- | --- | +| `Bytes` | Arranjo de bytes, representado como string hexadecimal. Usado frequentemente por hashes e endereços no Ethereum. | +| `String` | Escalar para valores `string`. Caracteres nulos são removidos automaticamente. | +| `Boolean` | Escalar para valores `boolean`. | +| `Int` | A especificação do GraphQL define que o `Int` tem um tamanho de 32 bytes. | +| `Int8` | Um número inteiro assinado em 8 bits, também conhecido como um número inteiro assinado em 64 bits, pode armazenar valores de -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807. Prefira usar isto para representar o `i64` do ethereum. | +| `BigInt` | Números inteiros grandes. Usados para os tipos `uint32`, `int64`, `uint64`, ..., `uint256` do Ethereum. Nota: Tudo abaixo de `uint32`, como `int32`, `uint24` ou `int8` é representado como `i32`. | +| `BigDecimal` | `BigDecimal` Decimais de alta precisão representados como um significando e um exponente. O alcance de exponentes é de -6143 até +6144. Arredondado para 34 dígitos significantes. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Nota:** Uma nova fonte de dados só processará as chamadas e eventos para o bloco onde ele foi criado e todos os blocos a seguir. Porém, não serão processados dados históricos, por ex, contidos em blocos anteriores. -> +> > Se blocos anteriores conterem dados relevantes à nova fonte, é melhor indexá-los ao ler o estado atual do contrato e criar entidades que representem aquele estado na hora que a nova fonte de dados for criada. ### Contextos de Fontes de Dados @@ -716,7 +716,7 @@ dataSources: ``` > **Nota:** O bloco da criação do contrato pode ser buscado rapidamente no Etherscan: -> +> > 1. Procure pelo contrato ao inserir o seu endereço na barra de busca. > 2. Clique no hash da transação da criação na seção `Contract Creator`. > 3. Carregue a página dos detalhes da transação, onde encontrará o bloco inicial para aquele contrato. diff --git a/website/pages/pt/developing/graph-ts/api.mdx b/website/pages/pt/developing/graph-ts/api.mdx index 1803d56140f9..f38455660f1a 100644 --- a/website/pages/pt/developing/graph-ts/api.mdx +++ b/website/pages/pt/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ A biblioteca `@graphprotocol/graph-ts` fornece as seguintes APIs: No manifest do subgraph, `apiVersion` especifica a versão da API de mapeamento, executada pelo Graph Node para um subgraph. -| Versão | Notas de atualização | -| :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| 0.0.7 | Classes `TransactionReceipt` e `Log` adicionadas aos tipos do EthereumCampo
    Campo `receipt` adicionado ao objeto Ethereum Event | -| 0.0.6 | Campo `nonce` adicionado ao objeto Ethereum TransactionCampo
    `baseFeePerGas` adicionado ao objeto Ethereum Block | -| 0.0.5 | AssemblyScript atualizado à versão 0.19.10 (inclui mudanças recentes, favor ler o [`Guia de Migração`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renomeado para `ethereum.transaction.gasLimit` | -| 0.0.4 | Campo `functionSignature` adicionado ao objeto Ethereum SmartContractCall | -| 0.0.3 | Campo `from` adicionado ao objeto Ethereum
    `Calletherem.call.address` renomeado para `ethereum.call.to` | -| 0.0.2 | Campo `input` adicionado ao objeto Ethereum Transaction | +| Versão | Notas de atualização | +| :-: | --- | +| 0.0.7 | Classes `TransactionReceipt` e `Log` adicionadas aos tipos do EthereumCampo
    Campo `receipt` adicionado ao objeto Ethereum Event | +| 0.0.6 | Campo `nonce` adicionado ao objeto Ethereum TransactionCampo
    `baseFeePerGas` adicionado ao objeto Ethereum Block | +| 0.0.5 | AssemblyScript atualizado à versão 0.19.10 (inclui mudanças recentes, favor ler o [`Guia de Migração`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renomeado para `ethereum.transaction.gasLimit` | +| 0.0.4 | Campo `functionSignature` adicionado ao objeto Ethereum SmartContractCall | +| 0.0.3 | Campo `from` adicionado ao objeto Ethereum
    `Calletherem.call.address` renomeado para `ethereum.call.to` | +| 0.0.2 | Campo `input` adicionado ao objeto Ethereum Transaction | ### Tipos Embutidos @@ -162,8 +162,7 @@ _Matemática_ import { TypedMap } from '@graphprotocol/graph-ts' ``` -O `TypedMap` pode servir para armazenar pares de chave e valor (key e value -). Confira [este exemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). +O `TypedMap` pode servir para armazenar pares de chave e valor (key e value ). Confira [este exemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). A classe `TypedMap` tem a seguinte API: @@ -735,44 +734,44 @@ Quando o tipo de um valor é confirmado, ele pode ser convertido num [tipo embut ### Referência de Conversões de Tipos -| Fonte(s) | Destino | Função de conversão | -| ------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | nenhum | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | nenhum | -| Bytes (assinado) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (não assinado) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | nenhum | -| int32 | i32 | nenhum | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | nenhum | -| int64 - int256 | BigInt | nenhum | -| uint32 - uint256 | BigInt | nenhum | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Fonte(s) | Destino | Função de conversão | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | nenhum | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | nenhum | +| Bytes (assinado) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (não assinado) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | nenhum | +| int32 | i32 | nenhum | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | nenhum | +| int64 - int256 | BigInt | nenhum | +| uint32 - uint256 | BigInt | nenhum | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadados de Fontes de Dados diff --git a/website/pages/pt/developing/unit-testing-framework.mdx b/website/pages/pt/developing/unit-testing-framework.mdx index d6357b02f6d8..9acb78b6abde 100644 --- a/website/pages/pt/developing/unit-testing-framework.mdx +++ b/website/pages/pt/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ A saída do log inclui a duração do teste. Veja um exemplo: Isto significa que usou o `console.log` no seu código, que não é apoiado pelo AssemblyScript. Considere usar a [API de Logging](/developing/assemblyscript-api/#logging-api) > `ERROR TS2554: Expected ? arguments, but got ?.` -> +> > `return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt);` -> +> > `in ~lib/matchstick-as/assembly/defaults.ts(18,12)` -> +> > `ERROR TS2554: Expected ? arguments, but got ?.` -> +> > `return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt);` -> +> > `in ~lib/matchstick-as/assembly/defaults.ts(24,12)` A diferença nos argumentos é causada pela diferença no `graph-ts` e no `matchstick-as`. Problemas como este são melhor resolvidos ao atualizar tudo para a versão mais recente. diff --git a/website/pages/pt/network/benefits.mdx b/website/pages/pt/network/benefits.mdx index 7465acbb3b36..ce56b07f42a5 100644 --- a/website/pages/pt/network/benefits.mdx +++ b/website/pages/pt/network/benefits.mdx @@ -27,47 +27,47 @@ Os custos de consulta podem variar; o custo citado é o normal até o fechamento ## Utilizador de Baixo Volume (menos de 30 mil queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -|:-------------------------------:|:---------------------------------------:|:-----------------------------------------------------------------:| -| Custo mensal de servidor\* | $350 por mês | $0 | -| Custos de query | $0+ | ~$15 por mês | -| Tempo de engenharia | $400 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 30.000 (autoescala) | -| Custo por query | $0 | $0.0005 | -| Infraestrutura | Centralizada | Descentralizada | -| Redundância geográfica | $750+ por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $750+ | ~$15 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +| :-: | :-: | :-: | +| Custo mensal de servidor\* | $350 por mês | $0 | +| Custos de query | $0+ | ~$15 por mês | +| Tempo de engenharia | $400 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 30.000 (autoescala) | +| Custo por query | $0 | $0.0005 | +| Infraestrutura | Centralizada | Descentralizada | +| Redundância geográfica | $750+ por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $750+ | ~$15 | ## Utilizador de Volume Médio (3.000.000+ queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -|:-------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------:| -| Custo mensal de servidor\* | $350 por mês | $0 | -| Custos de query | $500 por mês | $750 por mês | -| Tempo de engenharia | $800 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 3.000.000+ | -| Custo por query | $0 | $0.00025 | -| Infraestrutura | Centralizada | Descentralizada | -| Custo de engenharia | $200 por hora | Incluído | -| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $1.650+ | $750 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +| :-: | :-: | :-: | +| Custo mensal de servidor\* | $350 por mês | $0 | +| Custos de query | $500 por mês | $750 por mês | +| Tempo de engenharia | $800 por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 3.000.000+ | +| Custo por query | $0 | $0.00025 | +| Infraestrutura | Centralizada | Descentralizada | +| Custo de engenharia | $200 por hora | Incluído | +| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $1.650+ | $750 | ## Utilizador de Volume Alto (30.000.000+ queries por mês) -| Comparação de Custos | Auto-hospedagem | Graph Network | -|:-------------------------------:|:-------------------------------------------:|:-----------------------------------------------------------------:| -| Custo mensal de servidor\* | $1.100 por mês, por node | $0 | -| Custos de query | $4.000 | $4.500 por mês | -| Número de nodes necessário | 10 | Não se aplica | -| Tempo de engenharia | $6.000 ou mais por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | -| Queries por mês | Limitadas pelas capabilidades da infra | 30.000.000+ | -| Custo por query | $0 | $0.00015 | -| Infraestrutura | Centralizada | Descentralizada | -| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | -| Uptime (disponibilidade) | Varia | 99.9%+ | -| Custos mensais totais | $11.000+ | $4.500 | +| Comparação de Custos | Auto-hospedagem | Graph Network | +| :-: | :-: | :-: | +| Custo mensal de servidor\* | $1.100 por mês, por node | $0 | +| Custos de query | $4.000 | $4.500 por mês | +| Número de nodes necessário | 10 | Não se aplica | +| Tempo de engenharia | $6.000 ou mais por mês | Nenhum, embutido na rede com Indexadores distribuídos globalmente | +| Queries por mês | Limitadas pelas capabilidades da infra | 30.000.000+ | +| Custo por query | $0 | $0.00015 | +| Infraestrutura | Centralizada | Descentralizada | +| Redundância geográfica | $1.200 em custos totais por node adicional | Incluída | +| Uptime (disponibilidade) | Varia | 99.9%+ | +| Custos mensais totais | $11.000+ | $4.500 | \*com custos de backup incluídos: $50-$100 por mês diff --git a/website/pages/pt/network/delegating.mdx b/website/pages/pt/network/delegating.mdx index 1eff5f9b506c..38324efaa954 100644 --- a/website/pages/pt/network/delegating.mdx +++ b/website/pages/pt/network/delegating.mdx @@ -33,7 +33,8 @@ Se um Delegado quiser cancelar a sua delegação, seus tokens estarão sujeitos Considere escolher um Indexador com muito cuidado. Se escolher um Indexador que não é de confiança, ou não fez um bom trabalho, talvez queira cancelar a sua delegação, o que implica em sacrificar muitas oportunidades de recompensa, o que pode ser tão lamentável quanto queimar GRT.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Perceba a taxa de 0.5% na interface da Delegação, além do período de separação de 28 dias._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Perceba a taxa de 0.5% na interface da Delegação, além do + período de separação de 28 dias._
    ### Como escolher um Indexador de confiança, com um pagamento justo para Delegantes @@ -43,7 +44,8 @@ Isto é importante. Primeiro, vamos discutir três valores muito importantes: os Porção da Recompensa de Indexação - Esta é a porção das recompensas que o Indexador guardará para si. Isto significa que, se configurada para 100%, o Delegante receberá 0 recompensas de indexação. Se ver 80% na interface, isto significa que, como Delegado, receberá 20%. Importante saber que no começo da rede, as Recompensas de Indexação contarão como a maioria das recompensas.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *O Indexador acima está a dar 90% das recompensas aos Delegantes, o do meio dá 20%, e o de baixo dá cerca de 83%.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *O Indexador acima está a dar 90% das recompensas aos Delegantes, + o do meio dá 20%, e o de baixo dá cerca de 83%.*
    - Porção da Taxa de Recompensa - Isto funciona exatamente como a Porção da Recompensa de Indexação, sendo especificamente para retornos nas taxas de consulta coletadas pelo Indexador. Perceba que, no começo da rede, os retornos de taxas de query serão muito menores que a recompensa de indexação. Vale prestar atenção na rede para determinar quando as taxas de consulta na rede começarão a ser mais significantes. diff --git a/website/pages/pt/network/indexing.mdx b/website/pages/pt/network/indexing.mdx index 2e04edc3b940..e22041a8bb18 100644 --- a/website/pages/pt/network/indexing.mdx +++ b/website/pages/pt/network/indexing.mdx @@ -63,7 +63,7 @@ Use o Etherscan para chamar o `getRewards()`: - Navegue à [interface do Etherscan para o contrato de Recompensas](https://etherscan.io/address/0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66#readProxyContract) * Para chamar o `getRewards()`: - - Abra o *dropdown* **10. getRewards**. + - Abra o _dropdown_ **10. getRewards**. - Insira a **allocationID**. - Clique no botão **Query**. @@ -112,12 +112,12 @@ Os Indexadores podem se diferenciar ao aplicar técnicas avançadas para decidir - **Médio** — Indexador de Produção. Apoia 100 subgraphs e 200 – 500 pedidos por segundo. - **Grande** — Preparado para indexar todos os subgraphs usados atualmente e servir pedidos para o tráfego relacionado. -| Setup | Postgres
    (CPUs) | Postgres
    (memória em GBs) | Postgres
    (disco em TBs) | VMs
    (CPUs) | VMs
    (memória em GBs) | -| ------- |:--------------------------:|:------------------------------------:|:----------------------------------:|:---------------------:|:-------------------------------:| -| Pequeno | 4 | 8 | 1 | 4 | 16 | -| Normal | 8 | 30 | 1 | 12 | 48 | -| Médio | 16 | 64 | 2 | 32 | 64 | -| Grande | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memória em GBs) | Postgres
    (disco em TBs) | VMs
    (CPUs) | VMs
    (memória em GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Pequeno | 4 | 8 | 1 | 4 | 16 | +| Normal | 8 | 30 | 1 | 12 | 48 | +| Médio | 16 | 64 | 2 | 32 | 64 | +| Grande | 72 | 468 | 3.5 | 48 | 184 | ### Há alguma precaução básica de segurança que um Indexador deve tomar? @@ -149,20 +149,20 @@ Nota: Para apoiar o escalamento ágil, recomendamos que assuntos de consulta e i #### Graph Node -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| ----- | ------------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | Servidor HTTP GraphQL
    (para consultas de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | -| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | -| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| --- | --- | --- | --- | --- | +| 8000 | Servidor HTTP GraphQL
    (para consultas de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | +| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | +| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | #### Serviço Indexador -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| ----- | ------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | Servidor HTTP GraphQL
    (para consultas de subgraph pagas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| --- | --- | --- | --- | --- | +| 7600 | Servidor HTTP GraphQL
    (para consultas de subgraph pagas) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Agente Indexador diff --git a/website/pages/pt/operating-graph-node.mdx b/website/pages/pt/operating-graph-node.mdx index c0267166d1be..c9684ffc559f 100644 --- a/website/pages/pt/operating-graph-node.mdx +++ b/website/pages/pt/operating-graph-node.mdx @@ -77,13 +77,13 @@ Veja uma configuração de exemplo completa do Kubernetes no [repositório de in Durante a execução, o Graph Node expõe as seguintes portas: -| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | -| ----- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | Servidor HTTP GraphQL
    (para queries de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | -| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | -| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | +| Porta | Propósito | Rotas | Argumento CLI | Variável de Ambiente | +| --- | --- | --- | --- | --- | +| 8000 | Servidor HTTP GraphQL
    (para queries de subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | WS GraphQL
    (para inscrições a subgraphs) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (para gerir lançamentos) | / | --admin-port | - | +| 8030 | API de status de indexamento do subgraph | /graphql | --index-node-port | - | +| 8040 | Métricas Prometheus | /metrics | --metrics-port | - | > **Importante:** Cuidado ao expor portas publicamente; as **portas de administração** devem ser trancadas a sete chaves. Isto inclui o endpoint JSON-RPC do Graph Node. diff --git a/website/pages/pt/querying/graphql-api.mdx b/website/pages/pt/querying/graphql-api.mdx index 207c226d9d8e..733da228a890 100644 --- a/website/pages/pt/querying/graphql-api.mdx +++ b/website/pages/pt/querying/graphql-api.mdx @@ -208,7 +208,7 @@ No seguinte exemplo, filtramos por desafios com `outcome`, `succeeded` e `number ``` > **Açúcar sintático**: pode simplificar a consulta acima ao retirar o operador `and`, com o passe de uma subexpressão separada por vírgulas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Buscas fulltext têm um campo obrigatório, `text`, para ofertar termos de busca Operadores de busca fulltext: -| Símbolo | Operador | Descrição | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Para combinar múltiplos termos de busca num filtro para entidades que incluem todos os termos fornecidos | -| | | `Or` | Consultas com vários termos de busca separados pelo operador `or` retornarão todas as entidades com uma correspondência de qualquer termo providenciado | -| `<->` | `Follow by` | Especifica a distância entre duas palavras. | -| `:*` | `Prefix` | Use o prefixo para encontrar palavras que correspondem a tal prefixo (2 caracteres necessários.) | +| Símbolo | Operador | Descrição | +| --- | --- | --- | +| `&` | `And` | Para combinar múltiplos termos de busca num filtro para entidades que incluem todos os termos fornecidos | +| | | `Or` | Consultas com vários termos de busca separados pelo operador `or` retornarão todas as entidades com uma correspondência de qualquer termo providenciado | +| `<->` | `Follow by` | Especifica a distância entre duas palavras. | +| `:*` | `Prefix` | Use o prefixo para encontrar palavras que correspondem a tal prefixo (2 caracteres necessários.) | #### Exemplos diff --git a/website/pages/pt/querying/querying-from-an-application.mdx b/website/pages/pt/querying/querying-from-an-application.mdx index 6cea3da1b2c0..de13777f23d5 100644 --- a/website/pages/pt/querying/querying-from-an-application.mdx +++ b/website/pages/pt/querying/querying-from-an-application.mdx @@ -102,7 +102,7 @@ Finalmente, atualize o seu arquivo `.ts` para usar os documentos digitados em Gr import React, { useEffect } from 'react' // ... // nós importamos tipos e documentos em graphql do código gerado -(`..graphclient/`) +;`..graphclient/` import { ExampleQueryDocument, ExampleQueryQuery, execute } from '../.graphclient' function App() { diff --git a/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx b/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx index df425838fea1..ce410b9ed255 100644 --- a/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/pt/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Renomeie as suas variáveis duplicadas, se tinha o sombreamento variável. + ### Comparações de Nulos + Ao fazer a atualização no seu subgraph, às vezes aparecem erros como este: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Para resolver isto, basta mudar a declaração `if` para algo assim: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Para consertar este problema, vale criar uma variável para aquele acesso à propriedade, para que o compilador faça a magia da checagem de anulabilidade: ```typescript diff --git a/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx b/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx index 0bb187eb6fc0..3103ee0c6de5 100644 --- a/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/pt/release-notes/graphql-validations-migration-guide.mdx @@ -256,8 +256,7 @@ query { } ``` -**Conflicting fields with arguments (#OverlappingFieldsCanBeMergedRule)** -(Campos em conflito com argumentos) +**Conflicting fields with arguments (#OverlappingFieldsCanBeMergedRule)** (Campos em conflito com argumentos) ```graphql # Argumentos diferentes podem levar a dados diferentes, @@ -468,10 +467,10 @@ Estas referências desconhecidas devem ser consertadas: - caso contrário, remova ### Fragment: invalid spread or definition + (Fragment: espalhamento ou definição inválidos) -**Invalid Fragment spread (#PossibleFragmentSpreadsRule)** -(Espalhamento de fragment inválido) +**Invalid Fragment spread (#PossibleFragmentSpreadsRule)** (Espalhamento de fragment inválido) Um Fragment não pode ser espalhado em um tipo não aplicável. @@ -511,8 +510,7 @@ fragment inlineFragOnScalar on Dog { ### Uso de Diretivas -**Directive cannot be used at this location (#KnownDirectivesRule)** -(A diretiva não pode ser usada neste local) +**Directive cannot be used at this location (#KnownDirectivesRule)** (A diretiva não pode ser usada neste local) Apenas diretivas GraphQL (`@...`) apoiadas pela API do The Graph podem ser usadas. @@ -529,8 +527,7 @@ query { _Nota: `@stream`, `@live`, e `@defer` não têm apoio._ -**Directive can only be used once at this location (#UniqueDirectivesPerLocationRule)** -(A diretiva só pode ser usada neste local uma vez) +**Directive can only be used once at this location (#UniqueDirectivesPerLocationRule)** (A diretiva só pode ser usada neste local uma vez) As diretivas apoiadas pelo The Graph só podem ser usadas uma vez por local. diff --git a/website/pages/ro/developing/creating-a-subgraph.mdx b/website/pages/ro/developing/creating-a-subgraph.mdx index db9e8a024571..39f58ac2083b 100644 --- a/website/pages/ro/developing/creating-a-subgraph.mdx +++ b/website/pages/ro/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/ro/developing/graph-ts/api.mdx b/website/pages/ro/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/ro/developing/graph-ts/api.mdx +++ b/website/pages/ro/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/ro/developing/unit-testing-framework.mdx b/website/pages/ro/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/ro/developing/unit-testing-framework.mdx +++ b/website/pages/ro/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/ro/network/benefits.mdx b/website/pages/ro/network/benefits.mdx index 09c0548bfc4f..864672b16515 100644 --- a/website/pages/ro/network/benefits.mdx +++ b/website/pages/ro/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/ro/network/indexing.mdx b/website/pages/ro/network/indexing.mdx index 842a5c8e0c74..9bdc2fb2eb7e 100644 --- a/website/pages/ro/network/indexing.mdx +++ b/website/pages/ro/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/ro/operating-graph-node.mdx b/website/pages/ro/operating-graph-node.mdx index a7dd15e7a84c..4f0f856db111 100644 --- a/website/pages/ro/operating-graph-node.mdx +++ b/website/pages/ro/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/ro/querying/graphql-api.mdx b/website/pages/ro/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/ro/querying/graphql-api.mdx +++ b/website/pages/ro/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ro/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/ru/developing/creating-a-subgraph.mdx b/website/pages/ru/developing/creating-a-subgraph.mdx index 5829d571fedb..6b0b51c8aa7e 100644 --- a/website/pages/ru/developing/creating-a-subgraph.mdx +++ b/website/pages/ru/developing/creating-a-subgraph.mdx @@ -82,7 +82,7 @@ graph add
    [] Параметр `--merge-entities` определяет, как разработчик хотел бы обрабатывать конфликты имен `entity` и `event`: -- Если `true`: новый ` dataSource ` должен использовать существующие ` eventHandlers` & `entities`. +- Если `true`: новый `dataSource` должен использовать существующие ` eventHandlers` & `entities`. - Если `false`: следует создать новую сущность и обработчик событий с помощью `${dataSourceName}{EventName}`. Контракт `address` будет записан в `networks.json` для соответствующей сети. @@ -146,7 +146,7 @@ dataSources: - `description`: понятное описание того, что представляет собой субграф. Это описание отображается в Graph Explorer при развертывании субграфа в хостинговом сервисе. -- ` repository `: URL-адрес репозитория, в котором можно найти манифест субграфа. Это также отображается в The Graph Explorer. +- `repository`: URL-адрес репозитория, в котором можно найти манифест субграфа. Это также отображается в The Graph Explorer. - `features`: список всех используемых имен [функций](#experimental-features). @@ -248,15 +248,15 @@ Null value resolved for non-null field 'name' Мы поддерживаем следующие скаляры в нашем GraphQL API: -| Тип | Описание | -| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Массив байтов, представленный в виде шестнадцатеричной строки. Обычно используется для хэшей и адресов Ethereum. | -| `String` | Скаляр для значений `string`. Нулевые символы не поддерживаются и автоматически удаляются. | -| `Boolean` | Скаляр для значений `boolean`. | -| `Int` | Спецификация GraphQL определяет `Int` как имеющий размер 32 байта. | -| `Int8` | 8-байтовое целое число со знаком, также называемое 64-битным целым числом со знаком, может хранить значения в диапазоне от -9 223 372 036 854 775 808 до 9 223 372 036 854 775 807. Предпочтительно использовать это для представления `i64` из Ethereum. | -| `BigInt` | Большие целые числа. Используются для типов Ethereum `uint32`, `int64`, `uint64`, ..., `uint256`. Примечание: Все, что находится ниже `uint32`, например, `int32`, `uint24` или `int8`, представлено как `i32`. | -| `BigDecimal` | `BigDecimal` Десятичные дроби высокой точности, представленные в виде значащего числа и экспоненты. Диапазон значений экспоненты от -6143 до +6144. Округляется до 34 значащих цифр. | +| Тип | Описание | +| --- | --- | +| `Bytes` | Массив байтов, представленный в виде шестнадцатеричной строки. Обычно используется для хэшей и адресов Ethereum. | +| `String` | Скаляр для значений `string`. Нулевые символы не поддерживаются и автоматически удаляются. | +| `Boolean` | Скаляр для значений `boolean`. | +| `Int` | Спецификация GraphQL определяет `Int` как имеющий размер 32 байта. | +| `Int8` | 8-байтовое целое число со знаком, также называемое 64-битным целым числом со знаком, может хранить значения в диапазоне от -9 223 372 036 854 775 808 до 9 223 372 036 854 775 807. Предпочтительно использовать это для представления `i64` из Ethereum. | +| `BigInt` | Большие целые числа. Используются для типов Ethereum `uint32`, `int64`, `uint64`, ..., `uint256`. Примечание: Все, что находится ниже `uint32`, например, `int32`, `uint24` или `int8`, представлено как `i32`. | +| `BigDecimal` | `BigDecimal` Десятичные дроби высокой точности, представленные в виде значащего числа и экспоненты. Диапазон значений экспоненты от -6143 до +6144. Округляется до 34 значащих цифр. | #### Перечисления @@ -450,7 +450,7 @@ query { } ``` -> **[Управление функциями](#experimental-features):** Начиная с `specVersion` `0.0.4` и далее, ` fullTextSearch ` должно быть объявлено в разделе `features` в манифесте субграфа. +> **[Управление функциями](#experimental-features):** Начиная с `specVersion` `0.0.4` и далее, `fullTextSearch` должно быть объявлено в разделе `features` в манифесте субграфа. ### Поддерживаемые языки @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Примечание:** Новый источник данных будет обрабатывать только вызовы и события для блока, в котором он был создан, и всех последующих блоков, но не будет обрабатывать исторические данные, т.е. данные, которые содержатся в предыдущих блоках. -> +> > Если предыдущие блоки содержат данные, относящиеся к новому источнику данных, лучше всего проиндексировать эти данные, считывая текущее состояние контракта и создавая сущности, представляющие это состояние на момент создания нового источника данных. ### Контекст источника данных @@ -716,7 +716,7 @@ dataSources: ``` > **Примечание:** Блок создания контракта можно быстро найти в Etherscan: -> +> > 1. Найдите контракт, введя его адрес в строке поиска. > 2. Нажмите на хэш транзакции создания в разделе `Contract Creator`. > 3. Загрузите страницу сведений о транзакции, где вы найдете начальный блок для этого контракта. @@ -756,7 +756,7 @@ dataSources: handler: handleCreateGravatar ``` -` function ` - это нормализованная сигнатура функции, по которой можно фильтровать вызовы. Свойство `handler` - это имя функции в вашем мэппинге, которую вы хотели бы выполнить при вызове целевой функции в контракте источника данных. +`function` - это нормализованная сигнатура функции, по которой можно фильтровать вызовы. Свойство `handler` - это имя функции в вашем мэппинге, которую вы хотели бы выполнить при вызове целевой функции в контракте источника данных. ### Функция мэппинга @@ -792,7 +792,7 @@ filter: _Определенный обработчик будет вызван один раз для каждого блока, содержащего обращение к контракту (источнику данных), в соответствии с которым определен обработчик._ -> **Примечание:** Фильтр ` call ` в настоящее время зависит от Parity tracing API. Некоторые сети, такие как BNB chain и Arbitrium, не поддерживают этот API. Если субграф, индексирующий одну из этих сетей, содержит один или несколько обработчиков блоков с фильтром `call`, синхронизация не начнется. +> **Примечание:** Фильтр `call` в настоящее время зависит от Parity tracing API. Некоторые сети, такие как BNB chain и Arbitrium, не поддерживают этот API. Если субграф, индексирующий одну из этих сетей, содержит один или несколько обработчиков блоков с фильтром `call`, синхронизация не начнется. Отсутствие фильтра для обработчика блоков гарантирует, что обработчик вызывается для каждого блока. Источник данных может содержать только один обработчик блоков для каждого типа фильтра. diff --git a/website/pages/ru/developing/graph-ts/api.mdx b/website/pages/ru/developing/graph-ts/api.mdx index ee862b0468c2..bcd8b829a24b 100644 --- a/website/pages/ru/developing/graph-ts/api.mdx +++ b/website/pages/ru/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Версия | Примечания к релизу | -| :----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Версия | Примечания к релизу | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Встроенные типы @@ -229,7 +229,7 @@ Entities written to the store map one-to-one to the `@entity` types defined in t // Импорт класса событий Transfer, сгенерированного из ERC20 ABI import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' -// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL +// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL import { Transfer } from '../generated/schema' событие // Обработчик события передачи @@ -263,7 +263,6 @@ if (transfer == null) { transfer = new Transfer(id) } - // Используйте объект Transfer, как и раньше ``` @@ -284,7 +283,6 @@ if (transfer == null) { transfer = new Transfer(id) } - // Используйте объект Transfer, как и раньше ``` @@ -661,8 +659,8 @@ It is also possible to process larger files in a streaming fashion with `ipfs.ma import { JSONValue, Value } from '@graphprotocol/graph-ts' export function processItem(value: JSONValue, userData: Value): void { -// Смотрите документацию по JsonValue для получения подробной информации о работе -// со значениями JSON + // Смотрите документацию по JsonValue для получения подробной информации о работе + // со значениями JSON let obj = value.toObject() let id = obj.get('id') let title = obj.get('title') @@ -671,7 +669,7 @@ export function processItem(value: JSONValue, userData: Value): void { return } -// Обратные вызовы также могут создавать объекты + // Обратные вызовы также могут создавать объекты let newItem = new Item(id) newItem.title = title.toString() newitem.parent = userData.toString() // Установите для родителя значение "parentId" @@ -736,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Справка по преобразованию типов -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() или s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() или s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ----------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() или s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() или s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Метаданные источника данных diff --git a/website/pages/ru/developing/unit-testing-framework.mdx b/website/pages/ru/developing/unit-testing-framework.mdx index 7e7e69bc9b0e..c1b2101a874b 100644 --- a/website/pages/ru/developing/unit-testing-framework.mdx +++ b/website/pages/ru/developing/unit-testing-framework.mdx @@ -371,7 +371,7 @@ describe("handleNewGravatars, () => { ```typescript import { describe, test, beforeEach } from 'matchstick-as/assembly/index' -import { handleUpdatedGravatar, handleNewGravatar } from "../../src/gravity" +import { handleUpdatedGravatar, handleNewGravatar } from '../../src/gravity' describe('handleUpdatedGravatars', () => { beforeEach(() => { @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). Это означает, что Вы использовали в своем коде `console.log`, который не поддерживается AssemblyScript. Пожалуйста, рассмотрите возможность использования [API логирования](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Несовпадение в аргументах вызвано несоответствием в `graph-ts` и `matchstick-as`. Лучший способ устранить проблемы, подобные этой, - обновить всё до последней выпущенной версии. diff --git a/website/pages/ru/network/benefits.mdx b/website/pages/ru/network/benefits.mdx index 2d482b34f48c..05dfe6b13c35 100644 --- a/website/pages/ru/network/benefits.mdx +++ b/website/pages/ru/network/benefits.mdx @@ -27,53 +27,54 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## Пользователь с небольшим количеством запросов (менее 30 000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -|:---------------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | -| Стоимость запроса | $0+ | ~$15 в месяц | -| Время разработки | $400 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000 (автоматическое масштабирование) | -| Стоимость одного запроса | $0 | $0.0005 | -| Инфраструктура | Централизованная | Децентрализованная | -| Географическая избыточность | $750+ за каждую дополнительную ноду | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $750+ | ~$15 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +| :-: | :-: | :-: | +| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | +| Стоимость запроса | $0+ | ~$15 в месяц | +| Время разработки | $400 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000 (автоматическое масштабирование) | +| Стоимость одного запроса | $0 | $0.0005 | +| Инфраструктура | Централизованная | Децентрализованная | +| Географическая избыточность | $750+ за каждую дополнительную ноду | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $750+ | ~$15 | ## Пользователь со средним количеством запросов (более 3,000,000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -|:---------------------------------:|:-------------------------------------------------------------:|:---------------------------------------------------------------:| -| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | -| Стоимость запроса | $500 в месяц | $750 в месяц | -| Время разработки | $800 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 3,000,000+ | -| Стоимость одного запроса | $0 | $0.00025 | -| Инфраструктура | Централизованная | Децентрализованная | -| Инженерные расходы | $200 в час | Включено | -| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $1,650+ | $750 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +| :-: | :-: | :-: | +| Ежемесячная стоимость сервера\* | $350 в месяц | $0 | +| Стоимость запроса | $500 в месяц | $750 в месяц | +| Время разработки | $800 в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 3,000,000+ | +| Стоимость одного запроса | $0 | $0.00025 | +| Инфраструктура | Централизованная | Децентрализованная | +| Инженерные расходы | $200 в час | Включено | +| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $1,650+ | $750 | ## Пользователь с высоким количеством запросов (более 30,000,000 запросов в месяц) -| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | -|:---------------------------------:|:-------------------------------------------------------------:|:---------------------------------------------------------------:| -| Ежемесячная стоимость сервера\* | $1100 в месяц за ноду | $0 | -| Стоимость запроса | $4000 | $4,500 в месяц | -| Необходимое количество нод | 10 | Не подходит | -| Время разработки | $6,000 или больше в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | -| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000,000+ | -| Стоимость одного запроса | $0 | $0.00015 | -| Инфраструктура | Централизованная | Децентрализованная | -| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | -| Время безотказной работы | Варьируется | 99.9%+ | -| Общие ежемесячные расходы | $11,000+ | $4,500 | +| Сравнение затрат | Самостоятельный хостинг | Сеть Graph | +| :-: | :-: | :-: | +| Ежемесячная стоимость сервера\* | $1100 в месяц за ноду | $0 | +| Стоимость запроса | $4000 | $4,500 в месяц | +| Необходимое количество нод | 10 | Не подходит | +| Время разработки | $6,000 или больше в месяц | Никто, встроен в сеть с глобально распределенными индексаторами | +| Запросы в месяц | Ограничен возможностями инфраструктуры | 30,000,000+ | +| Стоимость одного запроса | $0 | $0.00015 | +| Инфраструктура | Централизованная | Децентрализованная | +| Географическая избыточность | общие затраты на каждую дополнительную ноду составляют $1,200 | Включено | +| Время безотказной работы | Варьируется | 99.9%+ | +| Общие ежемесячные расходы | $11,000+ | $4,500 | \* включая расходы на резервное копирование: $50-$100 в месяц Время разработки основано на предположении о $200 в час -используя функцию максимального бюджета запроса на вкладке бюджетное выставление счетов, сохраняя при этом высокое качество обслуживания +используя функцию максимального бюджета запроса на вкладке бюджетное выставление счетов, сохраняя при этом +высокое качество обслуживания Предполагаемые затраты указаны только для субграфов в основной сети Ethereum — затраты еще выше при самостоятельном размещении `graph-node` в других сетях. diff --git a/website/pages/ru/network/delegating.mdx b/website/pages/ru/network/delegating.mdx index ed6f3a0c5332..5d2bdf1326a5 100644 --- a/website/pages/ru/network/delegating.mdx +++ b/website/pages/ru/network/delegating.mdx @@ -33,8 +33,8 @@ title: Делегирование Еще одним аспектом, который стоит учитывать, является разумный выбор Индексатора. Если вы выберете ненадежного или некомпетентного Индексатора, вам, возможно, захочется отозвать делегирование, что в свою очередь означает потерю множества возможностей для получения вознаграждений. Это может быть столь плохо, как и сжигание токенов GRT.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Обратите внимание на комиссию в размере 0,5% в пользовательском интерфейсе Delegation, а также на 28-дневный срок - период разблокировки._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Обратите внимание на комиссию в размере 0,5% в + пользовательском интерфейсе Delegation, а также на 28-дневный срок период разблокировки._
    ### Выбор надежного Индексатора со справедливым распределением вознаграждений для Делегаторов diff --git a/website/pages/ru/network/indexing.mdx b/website/pages/ru/network/indexing.mdx index 6269c5fd4f9d..ab88480b0ba3 100644 --- a/website/pages/ru/network/indexing.mdx +++ b/website/pages/ru/network/indexing.mdx @@ -113,11 +113,11 @@ Once an allocation has been closed the rebates are available to be claimed by th - **Large** – готовность индексировать все используемые в настоящее время подграфы и обслуживать запросы на соответствующий трафик. | Настройка | Postgres
    (ЦП) | Postgres
    (память в ГБ) | Postgres
    (диск в ТБ) | VMs
    (ЦП) | VMs
    (память в ГБ) | -| --------- |:------------------------:|:---------------------------------:|:-------------------------------:|:-------------------:|:----------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### Какие основные меры безопасности следует предпринять индексатору? @@ -149,26 +149,26 @@ Once an allocation has been closed the rebates are available to be claimed by th #### Graph Node -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| ---- | ------------------------------------------------------------ | ---------------------------------------------------- | ----------------- | ---------------- | -| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | -| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | -| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| --- | --- | --- | --- | --- | +| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | +| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | +| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | #### Indexer Service -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | HTTP-сервер GraphQL
    (для платных запросов к подграфам) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| --- | --- | --- | --- | --- | +| 7600 | HTTP-сервер GraphQL
    (для платных запросов к подграфам) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Показатели Prometheus | /metrics | --metrics-port | - | #### Indexer Agent -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| ---- | ------------------------------- | ------------ | ------------------------- | --------------------------------------- | -| 8000 | API для управления индексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| --- | --- | --- | --- | --- | +| 8000 | API для управления индексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### Настройка серверной инфраструктуры с помощью Terraform в Google Cloud diff --git a/website/pages/ru/operating-graph-node.mdx b/website/pages/ru/operating-graph-node.mdx index 22601fc637b7..dd51cc588968 100644 --- a/website/pages/ru/operating-graph-node.mdx +++ b/website/pages/ru/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ Во время работы Graph Node предоставляет следующие порты: -| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | -| ---- | ------------------------------------------------------------ | ---------------------------------------------------- | ----------------- | ---------------- | -| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | -| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | -| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | +| Порт | Назначение | Расположение | CLI-аргумент | Переменная среды | +| --- | --- | --- | --- | --- | +| 8000 | HTTP-сервер GraphQL
    (для запросов подграфов) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (для подписок на подграфы) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для управления процессом развертывания) | / | --admin-port | - | +| 8030 | API для определения статуса индексирования подграфов | /graphql | --index-node-port | - | +| 8040 | Показатели Prometheus | /metrics | --metrics-port | - | > **Важно**. Будьте осторожны, открывая порты для общего доступа — **порты администрирования** должны быть заблокированы. Это касается конечных точек Graph Node JSON-RPC. diff --git a/website/pages/ru/querying/graphql-api.mdx b/website/pages/ru/querying/graphql-api.mdx index 9bcb91258a9d..2637a70c52e8 100644 --- a/website/pages/ru/querying/graphql-api.mdx +++ b/website/pages/ru/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { ``` > **Syntactic sugar:**. Вы можете упростить приведенный выше запрос, удалив оператор `and`, передав подвыражение, разделенное запятыми. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) Полнотекстовые поисковые операторы: -| Символ | Оператор | Описание | -| ----------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Для объединения нескольких условий поиска в фильтр для объектов, которые включают все указанные условия | -| | | `Or` | Запросы с несколькими условиями поиска, разделенные оператором or, вернут все объекты, которые соответствуют любому из предоставленных условий | -| `<->` | `Follow by` | Укажите расстояние между двумя словами. | -| `:*` | `Prefix` | Используйте поисковый запрос по префиксу, чтобы найти слова с соответствующим префиксом (необходимо 2 символа) | +| Символ | Оператор | Описание | +| --- | --- | --- | +| `&` | `And` | Для объединения нескольких условий поиска в фильтр для объектов, которые включают все указанные условия | +| | | `Or` | Запросы с несколькими условиями поиска, разделенные оператором or, вернут все объекты, которые соответствуют любому из предоставленных условий | +| `<->` | `Follow by` | Укажите расстояние между двумя словами. | +| `:*` | `Prefix` | Используйте поисковый запрос по префиксу, чтобы найти слова с соответствующим префиксом (необходимо 2 символа) | #### Примеры diff --git a/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx index 4839cf7e4b60..fc783e57bfc5 100644 --- a/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ru/release-notes/assemblyscript-migration-guide.mdx @@ -19,21 +19,16 @@ title: Руководство по миграции AssemblyScript - Добавлена поддержка x instanceof GenericClass ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) - Добавлен `StaticArray`, более эффективный вариант массива ([v0.9.3](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.3)) - Добавлен `Array#flat` ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) -- Реализован аргумент `radix` для `Number#toString` ( -v0.10.1)
  • - - - Добавлена поддержка разделителей в литералах с плавающей точкой ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) +- Реализован аргумент `radix` для `Number#toString` ([v0.10.1](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.1)) +- Добавлена поддержка разделителей в литералах с плавающей точкой ([v0.13.7](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.13.7)) - Добавлена поддержка функций первого класса ([v0.14.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.0)) - Добавление встроенных модулей: `i32/i64/f32/f64.add/sub/mul` ([v0.14.13](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.14.13)) - Внедрение `Array/TypedArray/String#at` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) - Добавлена поддержка литеральных строк шаблона ([v0.18.17](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.17)) - Добавление `encodeURI(Component)` и `decodeURI(Component)` ([v0.18.27](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.27)) -- Добавление `toString`, `toDateString` и `toTimeString` к `Date` ([v0.18.29](https://github.com/ AssemblyScript/assemblyscript/releases/tag/v0.18.29)) -- Добавление `toUTCString` для `Date` (v0.18.30) - - - Добавление встроенного типа `nonnull/NonNullable` ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) - - +- Добавление `toString`, `toDateString` и `toTimeString` к `Date` ([v0.18.29](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.29)) +- Добавление `toUTCString` для `Date` ([v0.18.30](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.30)) +- Добавление встроенного типа `nonnull/NonNullable` ([v0.19.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.19.2)) ### Оптимизации @@ -42,21 +37,15 @@ v0.10.1) - Кэширование большего количества обращений к полям в std Map и Set ([v0.17.8](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.17.8)) - Оптимизация по двум степеням в `ipow32/64` ([v0.18.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.18.2)) - - ### Прочее - Тип литерала массива теперь можно определить по его содержимому ([v0.9.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.0)) - Стандартная библиотека обновлена до версии Unicode 13.0.0 ([v0.10.0](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.10.0)) - - ## Как выполнить обновление? 1. Измените мэппинги `apiVersion` в `subgraph.yaml` на `0.0.6`: - - ```yaml ... dataSources: @@ -67,11 +56,8 @@ dataSources: ... ``` - 2. Обновите используемый Вами `graph-cli` до `latest` версии, выполнив: - - ```bash # если он у Вас установлен глобально npm install --global @graphprotocol/graph-cli@latest @@ -80,31 +66,21 @@ npm install --global @graphprotocol/graph-cli@latest npm install --save-dev @graphprotocol/graph-cli@latest ``` - 3. Сделайте то же самое для `graph-ts`, но вместо глобальной установки сохраните его в своих основных зависимостях: - - ```bash npm install --save @graphprotocol/graph-ts@latest ``` - 4. Следуйте остальной части руководства, чтобы исправить языковые изменения. 5. Снова запустите `codegen` и `deploy`. - - ## Критические изменения - - ### Обнуляемость В более старой версии AssemblyScript можно было создать такой код: - - ```typescript function load(): Value | null { ... } @@ -112,11 +88,8 @@ let maybeValue = load(); maybeValue.aMethod(); ``` - Однако в новой версии, поскольку значение обнуляемо, требуется проверка, например, такая: - - ```typescript let maybeValue = load() @@ -125,39 +98,28 @@ if (maybeValue) { } ``` - Или принудительно вот такая: - - ```typescript let maybeValue = load()! // прерывается во время выполнения, если значение равно null maybeValue.aMethod() ``` - Если Вы не уверены, что выбрать, мы рекомендуем всегда использовать безопасную версию. Если значение не существует, Вы можете просто выполнить раннее выражение if с возвратом в обработчике субграфа. - - ### Затенение переменных Раньше можно было сделать [затенение переменных](https://en.wikipedia.org/wiki/Variable_shadowing) и код, подобный этому, работал: - - ```typescript let a = 10 let b = 20 let a = a + b ``` - Однако теперь это больше невозможно, и компилятор возвращает эту ошибку: - - ```typescript ERROR TS2451: Cannot redeclare block-scoped variable 'a' @@ -166,16 +128,12 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' in assembly/index.ts(4,3) ``` - Вам нужно будет переименовать дублированные переменные, если Вы используете затенение переменных. - ### Нулевые сравнения Выполняя обновление своего субграфа, иногда Вы можете получить такие ошибки: - - ```typescript ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' is not assignable to type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt'. if (decimals == null) { @@ -183,11 +141,8 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i in src/mappings/file.ts(41,21) ``` - Чтобы решить эту проблему, Вы можете просто изменить оператор `if` на что-то вроде этого: - - ```typescript if (!decimals) { @@ -196,23 +151,17 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i if (decimals === null) { ``` - Подобное относится к случаям, когда вместо == используется !=. - - ### Кастинг Раньше для кастинга обычно использовалось ключевое слово `as`, например: - - ```typescript let byteArray = new ByteArray(10) let uint8Array = byteArray as Uint8Array // equivalent to: byteArray ``` - Однако это работает только в двух случаях: - Примитивный кастинг (между такими типами, как `u8`, `i32`, `bool`; например: `let b: isize = 10; b as usize`); @@ -220,8 +169,6 @@ let uint8Array = byteArray as Uint8Array // equivalent to: byteArray Примеры: - - ```typescript // примитивный кастинг let a: usize = 10 @@ -229,9 +176,6 @@ let b: isize = 5 let c: usize = a + (b as usize) ``` - - - ```typescript // укрупнение по наследованию классов class Bytes extends Uint8Array {} @@ -240,14 +184,11 @@ let bytes = new Bytes(2) // bytes // то же, что: bytes as Uint8Array ``` - Есть два сценария, в которых Вы можете захотеть выполнить преобразование, но использовать `as`/`var` **небезопасно**: - Понижение уровня наследования классов (superclass → subclass) - Между двумя типами, имеющими общий супер класс - - ```typescript // понижение уровня наследования классов class Bytes extends Uint8Array {} @@ -256,9 +197,6 @@ let uint8Array = new Uint8Array(2) // uint8Array // перерывы в работе :( ``` - - - ```typescript // между двумя типами, имеющими общий суперкласс class Bytes extends Uint8Array {} @@ -268,11 +206,8 @@ let bytes = new Bytes(2) // bytes // перерывы в работе :( ``` - В таких случаях можно использовать функцию `changetype`: - - ```typescript // понижение уровня наследования классов class Bytes extends Uint8Array {} @@ -281,9 +216,6 @@ let uint8Array = new Uint8Array(2) changetype(uint8Array) // работает :) ``` - - - ```typescript // между двумя типами, имеющими общий суперкласс class Bytes extends Uint8Array {} @@ -293,11 +225,8 @@ let bytes = new Bytes(2) changetype(bytes) // работает :) ``` - Если Вы просто хотите удалить значение NULL, Вы можете продолжать использовать оператор `as` (или `variable`), но помните, что значение не может быть нулевым, иначе оно сломается. - - ```typescript // удалить значение NULL let previousBalance = AccountBalance.load(balanceId) // AccountBalance | null @@ -309,7 +238,6 @@ if (previousBalance != null) { let newBalance = new AccountBalance(balanceId) ``` - В случае обнуления мы рекомендуем Вам обратить внимание на [функцию проверки обнуления](https://www.assemblyscript.org/basics.html#nullability-checks), это сделает ваш код чище 🙂 Также мы добавили еще несколько статических методов в некоторые типы, чтобы облегчить кастинг: @@ -319,14 +247,10 @@ let newBalance = new AccountBalance(balanceId) - BigInt.fromByteArray - ByteArray.fromBigInt - - ### Проверка нулевого значения с доступом к свойству Чтобы применить [функцию проверки на нулевое значение](https://www.assemblyscript.org/basics.html#nullability-checks), Вы можете использовать операторы `if` или тернарный оператор (`?` и `:`) следующим образом: - - ```typescript let something: string | null = 'data' @@ -343,11 +267,8 @@ if (something) { } ``` - Однако это работает только тогда, когда Вы выполняете `if` / тернарную операцию для переменной, а не для доступа к свойству, например: - - ```typescript class Container { data: string | null @@ -359,11 +280,8 @@ container.data = 'data' let somethingOrElse: string = container.data ? container.data : 'else' // не компилируется ``` - В результате чего выдается ошибка: - - ```typescript ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/string/String'. @@ -371,11 +289,8 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - Чтобы решить эту проблему, Вы можете создать переменную для доступа к этому свойству, чтобы компилятор мог выполнять проверку допустимости значений NULL: - - ```typescript class Container { data: string | null @@ -389,15 +304,10 @@ let data = container.data let somethingOrElse: string = data ? data : 'else' // компилируется просто отлично :) ``` - - - ### Перегрузка оператора при доступе к свойствам Если Вы попытаетесь суммировать (например) тип, допускающий значение Null (из доступа к свойству), с типом, не допускающим значение Null, компилятор AssemblyScript вместо того, чтобы выдать предупреждение об ошибке компиляции, предупреждающую, что одно из значений допускает значение Null, просто компилируется молча, давая возможность сломать код во время выполнения. - - ```typescript class BigInt extends Uint8Array { @operator('+') @@ -420,11 +330,8 @@ let wrapper = new Wrapper(y) wrapper.n = wrapper.n + x // не выдает ошибок времени компиляции, как это должно быть ``` - Мы открыли вопрос по этому поводу для компилятора AssemblyScript, но пока, если Вы выполняете подобные операции в своих мэппингах субграфов, Вам следует изменить их так, чтобы перед этим выполнялась проверка на нулевое значение. - - ```typescript let wrapper = new Wrapper(y) @@ -435,37 +342,26 @@ if (!wrapper.n) { wrapper.n = wrapper.n + x // теперь `n` гарантированно будет BigInt ``` - - - ### Инициализация значения Если у Вас есть такой код: - - ```typescript var value: Type // null value.x = 10 value.y = 'content' ``` - Он будет скомпилирован, но сломается во время выполнения. Это происходит из-за того, что значение не было инициализировано, поэтому убедитесь, что Ваш субграф инициализировал свои значения, например так: - - ```typescript var value = new Type() // initialized value.x = 10 value.y = 'content' ``` - Также, если у Вас есть свойства, допускающие значение NULL, в объекте GraphQL, например: - - ```graphql type Total @entity { id: Bytes! @@ -473,11 +369,8 @@ type Total @entity { } ``` - И у Вас есть код, аналогичный этому: - - ```typescript let total = Total.load('latest') @@ -488,11 +381,8 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` - Вам необходимо убедиться, что значение `total.amount` инициализировано, потому что, если Вы попытаетесь получить доступ к сумме, как в последней строке, произойдет сбой. Таким образом, Вы либо инициализируете его первым: - - ```typescript let total = Total.load('latest') @@ -504,11 +394,8 @@ if (total === null) { total.tokens = total.tokens + BigInt.fromI32(1) ``` - Или Вы можете просто изменить свою схему GraphQL, чтобы не использовать тип, допускающий значение NULL для этого свойства. Тогда мы инициализируем его нулем на этапе `codegen` 😉 - - ```graphql type Total @entity { id: Bytes! @@ -516,9 +403,6 @@ type Total @entity { } ``` - - - ```typescript let total = Total.load('latest') @@ -529,15 +413,10 @@ if (total === null) { total.amount = total.amount + BigInt.fromI32(1) ``` - - - ### Инициализация свойств класса Если Вы экспортируете какие-либо классы со свойствами, которые являются другими классами (декларированными Вами или стандартной библиотекой), то это выглядит следующим образом: - - ```typescript class Thing {} @@ -546,11 +425,8 @@ export class Something { } ``` - Компилятор выдаст ошибку, потому что Вам нужно либо добавить инициализатор для свойств, являющихся классами, либо добавить оператор `!`: - - ```typescript export class Something { constructor(public value: Thing) {} @@ -573,63 +449,44 @@ export class Something { } ``` - - - ### Инициализация массива Класс `Array` по-прежнему принимает число для инициализации длины списка, однако Вам следует соблюдать осторожность, поскольку такие операции, как `.push`, фактически увеличивают размер, а не добавляют его в начало, например: - - ```typescript let arr = new Array(5) // ["", "", "", "", ""] arr.push('something') // ["", "", "", "", "", "something"] // size 6 :( ``` - В зависимости от используемых типов, например, допускающих значение NULL, и способа доступа к ним, можно столкнуться с ошибкой времени выполнения, подобной этой: - - ``` ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/array.ts, line 110, column 40, with message: Element type must be nullable if array is holey wasm backtrace: 0: 0x19c4 - !~lib/@graphprotocol/graph-ts/index/format 1: 0x1e75 - !~lib/@graphprotocol/graph-ts/common/collections/Entity#constructor 2: 0x30b9 - !node_modules/@graphprotocol/graph-ts/global/global/id_of_type ``` - Для того чтобы фактически начать, Вы должны либо инициализировать `Array` нулевым размером, следующим образом: - - ```typescript let arr = new Array(0) // [] arr.push('something') // ["something"] ``` - Или Вы должны изменить его через индекс: - - ```typescript let arr = new Array(5) // ["", "", "", "", ""] arr[0] = 'something' // ["something", "", "", "", ""] ``` - - - ### Схема GraphQL Это не прямое изменение AssemblyScript, но Вам, возможно, придется обновить файл `schema.graphql`. Теперь Вы больше не можете определять поля в своих типах, которые являются списками, не допускающими значение NULL. Если у Вас такая схема: - - ```graphql type Something @entity { id: Bytes! @@ -641,11 +498,8 @@ type MyEntity @entity { } ``` - Вам нужно добавить `!` к элементу типа List, например, так: - - ```graphql type Something @entity { id: Bytes! @@ -657,11 +511,8 @@ type MyEntity @entity { } ``` - Изменение произошло из-за различий в допустимости значений NULL между версиями AssemblyScript и связано с файлом `src/generated/schema.ts` (путь по умолчанию, возможно, Вы его изменили). - - ### Прочее - `Map#set` и `Set#add` согласованы со спецификацией, произведён возврат к `this` ([v0.9.2](https://github.com/AssemblyScript/assemblyscript/releases/tag/v0.9.2)) diff --git a/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx b/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx index 3a7f9b2fe642..8da2d2e032b9 100644 --- a/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/ru/release-notes/graphql-validations-migration-guide.mdx @@ -284,8 +284,8 @@ query { ```graphql query { - # В конце концов, у нас есть два определения "x", указывающие - # на разные поля! + # В конце концов, у нас есть два определения "x", указывающие + # на разные поля! ...A ...B } @@ -439,7 +439,7 @@ query { ```graphql query purposes { # Если в схеме "name" определено как "String", - # этот запрос не пройдёт валидацию. + # этот запрос не пройдёт валидацию. purpose(name: 1) { id } @@ -449,8 +449,8 @@ query purposes { query purposes($name: Int!) { # Если "name" определено в схеме как `String`, - # этот запрос не пройдёт валидацию, потому что - # используемая переменная имеет тип `Int` + # этот запрос не пройдёт валидацию, потому что + # используемая переменная имеет тип `Int` purpose(name: $name) { id } diff --git a/website/pages/sv/cookbook/subgraph-debug-forking.mdx b/website/pages/sv/cookbook/subgraph-debug-forking.mdx index 0478b8509e8d..0fdaaf7411c0 100644 --- a/website/pages/sv/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/sv/cookbook/subgraph-debug-forking.mdx @@ -14,7 +14,7 @@ I samband med felsökning låter **subgraf forking** dig felsöka din misslyckad När du distribuerar en subgraf till en avlägsen Graph-nod för indexering och den misslyckas vid block _X_, är den goda nyheten att Graph-noden fortfarande kommer att betjäna GraphQL-frågor med hjälp av sitt lager, som synkroniseras för att blockera _X_. Toppen! Det betyder att vi kan dra nytta av denna "up-to-date" butik för att fixa de buggar som uppstår vid indexering av block _X_. -I ett nötskal, vi ska _gaffla den misslyckade subgrafen_ från en avlägsen Graph-nod som garanterat har subgrafen indexerad upp till blocket *X* för att ge den lokalt distribuerade subgrafen som felsöks i blocket _X_ en uppdaterad vy av indexeringstillståndet. +I ett nötskal, vi ska _gaffla den misslyckade subgrafen_ från en avlägsen Graph-nod som garanterat har subgrafen indexerad upp till blocket _X_ för att ge den lokalt distribuerade subgrafen som felsöks i blocket _X_ en uppdaterad vy av indexeringstillståndet. ## Snälla, visa mig lite kod! diff --git a/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx index 9e47b0462385..07d5bc4775ec 100644 --- a/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/sv/deploying/deploying-a-subgraph-to-hosted.mdx @@ -42,7 +42,7 @@ Du distribuerar subgrafen genom att köra `yarn deploy` Efter att ha distribuerat subgrafen kommer Graph Explorer att växla till att visa synkroniseringsstatusen för din subgraf. Beroende på mängden data och antalet händelser som måste extraheras från historiska block, från och med genesisblocket, kan synkronisering ta från några minuter till flera timmar. -Undergrafens status växlar till ` Synced ` när Graph Node har extraherat alla data från historiska block. Graph Node fortsätter att inspektera block för din undergraf när dessa block minas. +Undergrafens status växlar till `Synced` när Graph Node har extraherat alla data från historiska block. Graph Node fortsätter att inspektera block för din undergraf när dessa block minas. ## Omdistribuera en subgraf @@ -270,7 +270,7 @@ Graf Nod visar en graphql-slutpunkt som du kan fråga för att kontrollera statu } ``` -Detta kommer att ge dig `chainHeadBlock` som du kan jämföra med `latestBlock` på din subgraf för att kontrollera om den körs efter. ` synced ` informerar om subgrafen någonsin har kommit ikapp kedjan. `health` kan för närvarande ta värdena `healthy` om inga fel inträffade, eller `failed` om det fanns ett fel som stoppade subgrafens framsteg. I det här fallet kan du kontrollera fältet `fatalError` för detaljer om detta fel. +Detta kommer att ge dig `chainHeadBlock` som du kan jämföra med `latestBlock` på din subgraf för att kontrollera om den körs efter. `synced` informerar om subgrafen någonsin har kommit ikapp kedjan. `health` kan för närvarande ta värdena `healthy` om inga fel inträffade, eller `failed` om det fanns ett fel som stoppade subgrafens framsteg. I det här fallet kan du kontrollera fältet `fatalError` för detaljer om detta fel. ## Policy för arkivering av undergrafer för värdtjänster diff --git a/website/pages/sv/developing/creating-a-subgraph.mdx b/website/pages/sv/developing/creating-a-subgraph.mdx index d6bb42a330e7..c635a7b21aaa 100644 --- a/website/pages/sv/developing/creating-a-subgraph.mdx +++ b/website/pages/sv/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ För vissa entitetstyper konstrueras `id` från id:erna hos två andra entiteter Vi stödjer följande skalartyper i vår GraphQL API: -| Typ | Beskrivning | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Bytematris, representerad som en hexadecimal sträng. Vanligt används för Ethereum-hashar och adresser. | -| `String` | Skalär för `string`-värden. Nolltecken stöds inte och tas automatiskt bort. | -| `Boolean` | Skalär för `boolean`-värden. | -| `Int` | Enligt GraphQL specifikationen har `Int` en storlek på 32 byte. | -| `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` | Stora heltal. Används för Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` typer. Observera: Allt under `uint32`, som `int32`, `uint24` eller `int8` representeras som `i32`. | -| `BigDecimal` | `BigDecimal` Högprecisionsdecimaler representerade som en signifikant och en exponent. Exponentområdet är från −6143 till +6144. Avrundat till 34 signifikanta siffror. | +| Typ | Beskrivning | +| --- | --- | +| `Bytes` | Bytematris, representerad som en hexadecimal sträng. Vanligt används för Ethereum-hashar och adresser. | +| `String` | Skalär för `string`-värden. Nolltecken stöds inte och tas automatiskt bort. | +| `Boolean` | Skalär för `boolean`-värden. | +| `Int` | Enligt GraphQL specifikationen har `Int` en storlek på 32 byte. | +| `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` | Stora heltal. Används för Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` typer. Observera: Allt under `uint32`, som `int32`, `uint24` eller `int8` representeras som `i32`. | +| `BigDecimal` | `BigDecimal` Högprecisionsdecimaler representerade som en signifikant och en exponent. Exponentområdet är från −6143 till +6144. Avrundat till 34 signifikanta siffror. | #### Enums @@ -422,12 +422,7 @@ type _Schema_ name: "bandSearch" language: en algorithm: rank - include: [ - { - entity: "Band" - fields: [{ name: "name" }, { name: "description" }, { name: "bio" }] - } - ] + include: [{ entity: "Band", fields: [{ name: "name" }, { name: "description" }, { name: "bio" }] }] ) type Band @entity { @@ -567,13 +562,13 @@ import { // The events classes: NewGravatar, UpdatedGravatar, -} from "../generated/Gravity/Gravity"; +} from '../generated/Gravity/Gravity' ``` Utöver detta genereras en klass för varje entitetstyp i subgrafens GraphQL-schema. Dessa klasser tillhandahåller typsäker entitetsladdning, läs- och skrivåtkomst till entitetsfält samt en `save()`-metod för att skriva entiteter till lagret. Alla entitetsklasser skrivs till `/schema.ts`, vilket gör att mappningar kan importera dem med ```javascript -import { Gravatar } from "../generated/schema" +import { Gravatar } from '../generated/schema' ``` > **Observera:** Kodgenerering måste utföras igen efter varje ändring av GraphQL-schemat eller ABIn som ingår i manifestet. Det måste också utföras minst en gång innan du bygger eller distribuerar subgrafet. @@ -596,7 +591,7 @@ dataSources: name: Factory network: mainnet source: - address: "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95" + address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' abi: Factory mapping: kind: ethereum/events @@ -654,17 +649,17 @@ templates: I det sista steget uppdaterar du mappningen av huvudkontraktet för att skapa en dynamisk datakällinstans från en av mallarna. I det här exemplet ändrar du mappningen av huvudkontraktet för att importera mallen `Exchange` och anropar metoden `Exchange.create(address)` för att börja indexera det nya växlingskontraktet. ```typescript -import { Exchange } from "../generated/templates"; +import { Exchange } from '../generated/templates' export function handleNewExchange(event: NewExchange): void { // Start indexing the exchange; `event.params.exchange` is the // address of the new exchange contract - Exchange.create(event.params.exchange); + Exchange.create(event.params.exchange) } ``` > ** Notera:** En ny datakälla bearbetar endast anrop och händelser för det block där den skapades och alla efterföljande block, men bearbetar inte historiska data, dvs. data som finns i tidigare block. -> +> > Om tidigare block innehåller data som är relevanta för den nya datakällan, är det bäst att indexera dessa data genom att läsa kontraktets aktuella status och skapa enheter som representerar denna status vid den tidpunkt då den nya datakällan skapas. ### Kontext för datakälla @@ -672,22 +667,22 @@ export function handleNewExchange(event: NewExchange): void { Datakällans kontext gör det möjligt att skicka extra konfiguration när en mall instansieras. I vårt exempel kan vi säga att börser är associerade med ett visst handelspar, vilket ingår i händelsen `NewExchange`. Den informationen kan skickas till den instansierade datakällan, så här: ```typescript -import { Exchange } from "../generated/templates"; +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); + let context = new DataSourceContext() + context.setString('tradingPair', event.params.tradingPair) + Exchange.createWithContext(event.params.exchange, context) } ``` Inuti en mappning av mallen `Exchange` kan kontexten sedan nås: ```typescript -import { dataSource } from "@graphprotocol/graph-ts"; +import { dataSource } from '@graphprotocol/graph-ts' -let context = dataSource.context(); -let tradingPair = context.getString("tradingPair") +let context = dataSource.context() +let tradingPair = context.getString('tradingPair') ``` Det finns sättare och hämtare som `setString` och `getString` för alla värdestyper. @@ -702,7 +697,7 @@ dataSources: name: ExampleSource network: mainnet source: - address: "0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95" + address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' abi: ExampleContract startBlock: 6627917 mapping: @@ -721,7 +716,7 @@ dataSources: ``` > **Observera:** Blocket där kontraktet skapades kan snabbt sökas upp på Etherscan: -> +> > 1. Sök efter kontraktet genom att ange dess adress i sökfältet. > 2. Klicka på transaktionshashen för skapandet i avsnittet `Kontraktsskapare`. > 3. Ladda sidan med transaktionsdetaljer där du hittar startblocket för det kontraktet. @@ -744,7 +739,7 @@ dataSources: name: Gravity network: mainnet source: - address: "0x731a10897d267e19b34503ad902d0a29173ba4b1" + address: '0x731a10897d267e19b34503ad902d0a29173ba4b1' abi: Gravity mapping: kind: ethereum/events @@ -768,15 +763,15 @@ dataSources: Varje anropsbehandlare tar en enda parameter med en typ som motsvarar namnet på den kallade funktionen. I det ovanstående exempelsubgrafet innehåller kartläggningen en hanterare för när funktionen `createGravatar` anropas och tar emot en `CreateGravatarCall`-parameter som ett argument: ```typescript -import { CreateGravatarCall } from "../generated/Gravity/Gravity"; -import { Transaction } from "../generated/schema"; +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(); + let id = call.transaction.hash + let transaction = new Transaction(id) + transaction.displayName = call.inputs._displayName + transaction.imageUrl = call.inputs._imageUrl + transaction.save() } ``` @@ -807,7 +802,7 @@ dataSources: name: Gravity network: dev source: - address: "0x731a10897d267e19b34503ad902d0a29173ba4b1" + address: '0x731a10897d267e19b34503ad902d0a29173ba4b1' abi: Gravity mapping: kind: ethereum/events @@ -859,9 +854,9 @@ Den definierade hanteraren med filtret once kommer att anropas endast en gång i ```ts export function handleOnce(block: ethereum.Block): void { - let data = new InitialData(Bytes.fromUTF8("initial")); - data.data = "Setup data here"; - data.save(); + let data = new InitialData(Bytes.fromUTF8('initial')) + data.data = 'Setup data here' + data.save() } ``` @@ -870,12 +865,12 @@ export function handleOnce(block: ethereum.Block): void { Mappningsfunktionen tar emot ett `ethereum.Block` som sitt enda argument. Liksom mappningsfunktioner för händelser kan denna funktion komma åt befintliga subgrafiska enheter i lagret, anropa smarta kontrakt och skapa eller uppdatera enheter. ```typescript -import { ethereum } from "@graphprotocol/graph-ts"; +import { ethereum } from '@graphprotocol/graph-ts' export function handleBlock(block: ethereum.Block): void { - let id = block.hash; - let entity = new Block(id); - entity.save(); + let id = block.hash + let entity = new Block(id) + entity.save() } ``` @@ -1128,26 +1123,26 @@ const cid = dataSource.stringParam() Exempel på hanterare: ```typescript -import { json, Bytes, dataSource } from "@graphprotocol/graph-ts"; -import { TokenMetadata } from "../generated/schema"; +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(); + 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"); + 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.name = name.toString() + tokenMetadata.image = image.toString() + tokenMetadata.externalURL = externalURL.toString() + tokenMetadata.description = description.toString() } - tokenMetadata.save(); + tokenMetadata.save() } } ``` @@ -1166,29 +1161,29 @@ För Arweave, från och med version 0.33.0 kan Graph Node hämta filer som är l Exempel: ```typescript -import { TokenMetadata as TokenMetadataTemplate } from "../generated/templates"; +import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates' -const ipfshash = "QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm"; +const ipfshash = 'QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm' //Denna exempelkod är för en undergraf för kryptosamverkan. Ovanstående ipfs-hash är en katalog med tokenmetadata för alla kryptosamverkande NFT:er. export function handleTransfer(event: TransferEvent): void { - let token = Token.load(event.params.tokenId.toString()); + let token = Token.load(event.params.tokenId.toString()) if (!token) { - token = new Token(event.params.tokenId.toString()); - token.tokenID = event.params.tokenId; + token = new Token(event.params.tokenId.toString()) + token.tokenID = event.params.tokenId - token.tokenURI = "/" + event.params.tokenId.toString() + ".json"; - const tokenIpfsHash = ipfshash + token.tokenURI; + token.tokenURI = '/' + event.params.tokenId.toString() + '.json' + const tokenIpfsHash = ipfshash + token.tokenURI //Detta skapar en sökväg till metadata för en enskild Crypto coven NFT. Den konkaterar katalogen med "/" + filnamn + ".json" - token.ipfsURI = tokenIpfsHash; + token.ipfsURI = tokenIpfsHash - TokenMetadataTemplate.create(tokenIpfsHash); + TokenMetadataTemplate.create(tokenIpfsHash) } - token.updatedAtTimestamp = event.block.timestamp; - token.owner = event.params.to.toHexString(); - token.save(); + token.updatedAtTimestamp = event.block.timestamp + token.owner = event.params.to.toHexString() + token.save() } ``` diff --git a/website/pages/sv/developing/developer-faqs.mdx b/website/pages/sv/developing/developer-faqs.mdx index 11d0890e4d60..85dc3131826b 100644 --- a/website/pages/sv/developing/developer-faqs.mdx +++ b/website/pages/sv/developing/developer-faqs.mdx @@ -71,7 +71,7 @@ Inom en subgraf behandlas händelser alltid i den ordning de visas i blocken, oa Ja, du kan göra detta genom att importera `graph-ts` enligt exemplet nedan: ```javascript -import { dataSource } from "@graphprotocol/graph-ts" +import { dataSource } from '@graphprotocol/graph-ts' dataSource.network() dataSource.address() diff --git a/website/pages/sv/developing/graph-ts/api.mdx b/website/pages/sv/developing/graph-ts/api.mdx index 82b1600993e1..800841c7bc18 100644 --- a/website/pages/sv/developing/graph-ts/api.mdx +++ b/website/pages/sv/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Versionsanteckningar | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Versionsanteckningar | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Inbyggda typer @@ -159,7 +159,7 @@ _Math_ #### TypedMap ```typescript -import { TypedMap } from "@graphprotocol/graph-ts"; +import { TypedMap } from '@graphprotocol/graph-ts' ``` `TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). @@ -175,7 +175,7 @@ The `TypedMap` class has the following API: #### Bytes ```typescript -import { Bytes } from "@graphprotocol/graph-ts"; +import { Bytes } from '@graphprotocol/graph-ts' ``` `Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. @@ -201,7 +201,7 @@ _Operators_ #### Address ```typescript -import { Address } from "@graphprotocol/graph-ts"; +import { Address } from '@graphprotocol/graph-ts' ``` `Address` extends `Bytes` to represent Ethereum `address` values. @@ -214,7 +214,7 @@ It adds the following method on top of the `Bytes` API: ### Store API ```typescript -import { store } from "@graphprotocol/graph-ts"; +import { store } from '@graphprotocol/graph-ts' ``` The `store` API allows to load, save and remove entities from and to the Graph Node store. @@ -227,24 +227,24 @@ Följande är ett vanligt mönster för att skapa entiteter från Ethereum-händ ```typescript // Importera händelseklassen Transfer som genererats från ERC20 ABI -import { Transfer as TransferEvent } from "../generated/ERC20/ERC20"; +import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' // Importera entitetstypen Transfer som genererats från GraphQL-schemat -import { Transfer } from "../generated/schema"; +import { Transfer } from '../generated/schema' // Händelsehanterare för överföring export function handleTransfer(event: TransferEvent): void { // Skapa en Transfer-entitet, med transaktionshash som enhets-ID - let id = event.transaction.hash; - let transfer = new Transfer(id); + let id = event.transaction.hash + let transfer = new Transfer(id) // Ange egenskaper för entiteten med hjälp av händelseparametrarna - transfer.from = event.params.from; - transfer.to = event.params.to; - transfer.amount = event.params.amount; + transfer.from = event.params.from + transfer.to = event.params.to + transfer.amount = event.params.amount // Spara entiteten till lagret - transfer.save(); + transfer.save() } ``` @@ -257,10 +257,10 @@ Varje entitet måste ha en unik ID för att undvika kollisioner med andra entite Om en entitet redan finns kan den laddas från lagret med följande: ```typescript -let id = event.transaction.hash; // eller hur ID konstrueras -let transfer = Transfer.load(id); +let id = event.transaction.hash // eller hur ID konstrueras +let transfer = Transfer.load(id) if (transfer == null) { - transfer = new Transfer(id); + transfer = new Transfer(id) } // Använd överföringsenheten som tidigare @@ -277,10 +277,10 @@ As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotoco API:et för lagret underlättar hämtningen av entiteter som skapades eller uppdaterades i det aktuella blocket. En vanlig situation för detta är att en hanterare skapar en transaktion från någon händelse på kedjan, och en senare hanterare vill komma åt denna transaktion om den finns. I det fall då transaktionen inte finns, måste subgraphen gå till databasen bara för att ta reda på att entiteten inte finns; om subgraphförfattaren redan vet att entiteten måste ha skapats i samma block, undviker man detta databasbesök genom att använda loadInBlock. För vissa subgrapher kan dessa missade sökningar bidra avsevärt till indexeringstiden. ```typescript -let id = event.transaction.hash; // eller hur ID konstrueras -let transfer = Transfer.loadInBlock(id); +let id = event.transaction.hash // eller hur ID konstrueras +let transfer = Transfer.loadInBlock(id) if (transfer == null) { - transfer = new Transfer(id); + transfer = new Transfer(id) } // Använd överföringsenheten som tidigare @@ -334,7 +334,7 @@ transfer.amount = ... Det är också möjligt att avaktivera egenskaper med en av följande två instruktioner: ```typescript -transfer.from.unset(); +transfer.from.unset() transfer.from = null ``` @@ -344,14 +344,14 @@ Updating array properties is a little more involved, as the getting an array fro ```typescript // Detta kommer inte att fungera -entity.numbers.push(BigInt.fromI32(1)); -entity.save(); +entity.numbers.push(BigInt.fromI32(1)) +entity.save() // Detta kommer att fungera -let numbers = entity.numbers; -numbers.push(BigInt.fromI32(1)); -entity.numbers = numbers; -entity.save(); +let numbers = entity.numbers +numbers.push(BigInt.fromI32(1)) +entity.numbers = numbers +entity.save() ``` #### Ta bort entiteter från lagret @@ -389,12 +389,12 @@ type Transfer @entity { and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: ```typescript -let id = event.transaction.hash; -let transfer = new Transfer(id); -transfer.from = event.params.from; -transfer.to = event.params.to; -transfer.amount = event.params.amount; -transfer.save(); +let id = event.transaction.hash +let transfer = new Transfer(id) +transfer.from = event.params.from +transfer.to = event.params.to +transfer.amount = event.params.amount +transfer.save() ``` #### Händelser och Block/Transaktionsdata @@ -480,19 +480,16 @@ En vanlig mönster är att komma åt kontraktet från vilket en händelse härst ```typescript // Importera den genererade kontraktsklassen och den genererade klassen för överföringshändelser -import { - ERC20Contract, - Transfer as TransferEvent, -} from "../generated/ERC20Contract/ERC20Contract"; +import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' // Importera den genererade entitetsklassen -import { Transfer } from "../generated/schema"; +import { Transfer } from '../generated/schema' export function handleTransfer(event: TransferEvent) { // Bind kontraktet till den adress som skickade händelsen - let contract = ERC20Contract.bind(event.address); + let contract = ERC20Contract.bind(event.address) // Åtkomst till tillståndsvariabler och funktioner genom att anropa dem - let erc20Symbol = contract.symbol(); + let erc20Symbol = contract.symbol() } ``` @@ -507,12 +504,12 @@ Andra kontrakt som är en del av subgraphen kan importeras från den genererade If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: ```typescript -let gravitera = gravitera.bind(event.address); -let callResult = gravitera_gravatarToOwner(gravatar); +let gravitera = gravitera.bind(event.address) +let callResult = gravitera_gravatarToOwner(gravatar) if (callResult.reverted) { - log.info("getGravatar reverted", []); + log.info('getGravatar reverted', []) } else { - let owner = callResult.value; + let owner = callResult.value } ``` @@ -546,7 +543,7 @@ För ytterligare information: ### API för loggning ```typescript -import { log } from "@graphprotocol/graph-ts"; +import { log } from '@graphprotocol/graph-ts' ``` The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. @@ -562,11 +559,7 @@ The `log` API includes the following functions: The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. ```typescript -log.info("Message to be displayed: {}, {}, {}", [ - value.toString(), - anotherValue.toString(), - "already a string", -]); +log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) ``` #### Loggning av ett eller flera värden @@ -589,11 +582,11 @@ export function handleSomeEvent(event: SomeEvent): void { I exemplet nedan loggas endast det första värdet i argument arrayen, trots att arrayen innehåller tre värden. ```typescript -let myArray = ["A", "B", "C"]; +let myArray = ['A', 'B', 'C'] export function handleSomeEvent(event: SomeEvent): void { // Visar : "Mitt värde är: A" (Även om tre värden skickas till `log.info`) - log.info("Mitt värde är: {}", myArray); + log.info('Mitt värde är: {}', myArray) } ``` @@ -602,14 +595,11 @@ export function handleSomeEvent(event: SomeEvent): void { Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. ```typescript -let myArray = ["A", "B", "C"]; +let myArray = ['A', 'B', 'C'] export function handleSomeEvent(event: SomeEvent): void { // Visar: "Mitt första värde är: A, andra värdet är: B, tredje värdet är: C" - log.info( - "My first value is: {}, second value is: {}, third value is: {}", - myArray - ); + log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) } ``` @@ -620,7 +610,7 @@ För att visa ett specifikt värde i arrayen måste det indexeras och tillhandah ```typescript export function handleSomeEvent(event: SomeEvent): void { // Visar : "Mitt tredje värde är C" - log.info("My third value is: {}", [myArray[2]]); + log.info('My third value is: {}', [myArray[2]]) } ``` @@ -629,21 +619,21 @@ export function handleSomeEvent(event: SomeEvent): void { I exemplet nedan loggas blocknummer, blockhash och transaktionshash från en händelse: ```typescript -import { log } from "@graphprotocol/graph-ts"; +import { log } from '@graphprotocol/graph-ts' export function handleSomeEvent(event: SomeEvent): void { - log.debug("Block number: {}, block hash: {}, transaction hash: {}", [ + log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ event.block.number.toString(), // "47596000" event.block.hash.toHexString(), // "0x..." event.transaction.hash.toHexString(), // "0x..." - ]); + ]) } ``` ### IPFS API ```typescript -import { ipfs } from "@graphprotocol/graph-ts" +import { ipfs } from '@graphprotocol/graph-ts' ``` Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. @@ -652,13 +642,13 @@ För att läsa en fil från IPFS med en given IPFS-hash eller sökväg görs fö ```typescript // Placera detta i en händelsehanterare i mappningen -let hash = "QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D"; -let data = ipfs.cat(hash); +let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' +let data = ipfs.cat(hash) // Sökvägar som `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` // som inkluderar filer i kataloger stöds också -let path = "QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile"; -let data = ipfs.cat(path); +let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' +let data = ipfs.cat(path) ``` **Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. @@ -666,31 +656,31 @@ let data = ipfs.cat(path); It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: ```typescript -import { JSONValue, Value } from "@graphprotocol/graph-ts"; +import { JSONValue, Value } from '@graphprotocol/graph-ts' export function processItem(value: JSONValue, userData: Value): void { // Se JSONValue-dokumentationen för mer information om hur man hanterar // med JSON-värden - let obj = value.toObject(); - let id = obj.get("id"); - let title = obj.get("title"); + let obj = value.toObject() + let id = obj.get('id') + let title = obj.get('title') if (!id || !title) { - return; + return } // Callbacks kan också skapa enheter - let newItem = new Item(id); - newItem.title = title.toString(); - newitem.parent = userData.toString(); // Ange parent till "parentId" - newitem.save(); + let newItem = new Item(id) + newItem.title = title.toString() + newitem.parent = userData.toString() // Ange parent till "parentId" + newitem.save() } // Placera detta i en händelsehanterare i mappningen -ipfs.map("Qm...", "processItem", Value.fromString("parentId"), ["json"]); +ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) // Alternativt kan du använda `ipfs.mapJSON`. -ipfs.mapJSON("Qm...", "processItem", Value.fromString("parentId")); +ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) ``` The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. @@ -700,7 +690,7 @@ On success, `ipfs.map` returns `void`. If any invocation of the callback causes ### Crypto API ```typescript -import { crypto } from "@graphprotocol/graph-ts"; +import { crypto } from '@graphprotocol/graph-ts' ``` The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: @@ -710,7 +700,7 @@ The `crypto` API makes a cryptographic functions available for use in mappings. ### JSON API ```typescript -import { json, JSONValueKind } from "@graphprotocol/graph-ts" +import { json, JSONValueKind } from '@graphprotocol/graph-ts' ``` JSON data can be parsed using the `json` API: @@ -744,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Typkonverteringsreferens -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | --------------------------------------------------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| Sträng (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ------------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | Sträng (hexadecimal) | s.toHexString() eller s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| Sträng (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Metadata för datakälla diff --git a/website/pages/sv/developing/unit-testing-framework.mdx b/website/pages/sv/developing/unit-testing-framework.mdx index 769e00134d83..1496196edc7a 100644 --- a/website/pages/sv/developing/unit-testing-framework.mdx +++ b/website/pages/sv/developing/unit-testing-framework.mdx @@ -52,7 +52,7 @@ eller /node_modules/gluegun/build/index.js:13 throw up; ``` -Se till att du använder en nyare version av Node.js eftersom graph-cli inte längre stöder **v10.19.0**, och det är fortfarande standardversionen för nya Ubuntu-bilder på WSL. Till exempel är Matchstick bekräftat fungerande på WSL med **v18.1.0**. Du kan byta till den antingen via** nvm ** eller genom att uppdatera din globala Node.js. Glöm inte att ta bort `node_modules` och köra ` npm install `igen efter att du har uppdaterat Node.js! Sedan, se till att du har **libpq** installerat, du kan göra det genom att köra +Se till att du använder en nyare version av Node.js eftersom graph-cli inte längre stöder **v10.19.0**, och det är fortfarande standardversionen för nya Ubuntu-bilder på WSL. Till exempel är Matchstick bekräftat fungerande på WSL med **v18.1.0**. Du kan byta till den antingen via** nvm ** eller genom att uppdatera din globala Node.js. Glöm inte att ta bort `node_modules` och köra `npm install`igen efter att du har uppdaterat Node.js! Sedan, se till att du har **libpq** installerat, du kan göra det genom att köra ``` sudo apt-get install libpq-dev @@ -1081,15 +1081,15 @@ Loggutmatningen innehåller testkörningens varaktighet. Här är ett exempel: Det betyder att du har använt `console.log` i din kod, som inte stöds av AssemblyScript. Överväg att använda [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Motsägelsen i argumenten beror på en motsägelse i `graph-ts` och `matchstick-as`. Det bästa sättet att åtgärda problem som detta är att uppdatera allt till den senaste utgivna versionen. diff --git a/website/pages/sv/network/benefits.mdx b/website/pages/sv/network/benefits.mdx index e8713d003ce3..c94c62e684dc 100644 --- a/website/pages/sv/network/benefits.mdx +++ b/website/pages/sv/network/benefits.mdx @@ -27,47 +27,47 @@ Frågekostnaderna kan variera; den citerade kostnaden är genomsnittet vid publi ## Användare Med Låg Volym (färre än 30,000 frågor per månad) -| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | -|:-------------------------------:|:---------------------------------------:|:-------------------------------------------------------------:| -| Månatlig kostnad för server\* | $350 per månad | $0 | -| Kostnad för frågor | $0+ | ~$15 per månad | -| Konstruktionstid | $400 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 30 000 (automatisk skalning) | -| Kostnad per fråga | $0 | $0.0005 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Geografisk redundans | $750+ per extra nod | Inkluderat | -| Drifttid | Varierande | 99.9%+ | -| Total Månadskostnad | $750+ | ~$15 | +| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | +| :-: | :-: | :-: | +| Månatlig kostnad för server\* | $350 per månad | $0 | +| Kostnad för frågor | $0+ | ~$15 per månad | +| Konstruktionstid | $400 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 30 000 (automatisk skalning) | +| Kostnad per fråga | $0 | $0.0005 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Geografisk redundans | $750+ per extra nod | Inkluderat | +| Drifttid | Varierande | 99.9%+ | +| Total Månadskostnad | $750+ | ~$15 | ## Medium volym användare (3,000,000+ förfrågningar per månad) -| Kostnadsjämförelse | Egen Värd | Graph Nätverk | -|:-----------------------------:|:------------------------------------------:|:-------------------------------------------------------------:| -| Månadskostnad för server\* | $350 per månad | $0 | -| Kostnad för frågor | $500 per månad | $750 per månad | -| Ingenjörstid | $800 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 3,000,000+ | -| Kostnad per fråga | $0 | $0.00025 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Kostnader för ingenjörsarbete | $200 per timme | Inkluderat | -| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | -| Drifttid | Varierar | 99.9%+ | -| Total Månadskostnad | $1,650+ | $750 | +| Kostnadsjämförelse | Egen Värd | Graph Nätverk | +| :-: | :-: | :-: | +| Månadskostnad för server\* | $350 per månad | $0 | +| Kostnad för frågor | $500 per månad | $750 per månad | +| Ingenjörstid | $800 per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 3,000,000+ | +| Kostnad per fråga | $0 | $0.00025 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Kostnader för ingenjörsarbete | $200 per timme | Inkluderat | +| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | +| Drifttid | Varierar | 99.9%+ | +| Total Månadskostnad | $1,650+ | $750 | ## Användare Med Hög Volym (30,000,000+ frågor per månad) -| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | -|:----------------------------:|:-------------------------------------------:|:-------------------------------------------------------------:| -| Månadskostnad för server\* | $1100 per månad, per nod | $0 | -| Kostnad för frågor | $4000 | $4,500 per månad | -| Antal noder som behövs | 10 | Ej tillämpligt | -| Ingenjörstid | $6,000 eller mer per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | -| Frågor per månad | Begränsad till infra kapacitet | 30,000,000+ | -| Kostnad per fråga | $0 | $0.00015 | -| Infrastruktur | Centraliserad | Decentraliserad | -| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | -| Drifttid | Varierar | 99.9%+ | -| Total Månadskostnad | $11,000+ | $4,500 | +| Kostnadsjämförelse | Egen Värd | The Graph Nätverk | +| :-: | :-: | :-: | +| Månadskostnad för server\* | $1100 per månad, per nod | $0 | +| Kostnad för frågor | $4000 | $4,500 per månad | +| Antal noder som behövs | 10 | Ej tillämpligt | +| Ingenjörstid | $6,000 eller mer per månad | Ingen, inbyggd i nätverket med globalt distribuerade Indexers | +| Frågor per månad | Begränsad till infra kapacitet | 30,000,000+ | +| Kostnad per fråga | $0 | $0.00015 | +| Infrastruktur | Centraliserad | Decentraliserad | +| Geografisk redundans | $1,200 i totala kostnader per extra nod | Inkluderat | +| Drifttid | Varierar | 99.9%+ | +| Total Månadskostnad | $11,000+ | $4,500 | \*inklusive kostnader för backup: $50-$100 per månad diff --git a/website/pages/sv/network/delegating.mdx b/website/pages/sv/network/delegating.mdx index 65204d68d29d..27bad461386c 100644 --- a/website/pages/sv/network/delegating.mdx +++ b/website/pages/sv/network/delegating.mdx @@ -33,8 +33,8 @@ När som helst en Delegater vill upphäva sin delegering är deras tokens förem En sak att tänka på är också att välja en Indexer klokt. Om du väljer en Indexer som inte var pålitlig eller inte gjorde ett bra jobb, kommer du att vilja upphäva, vilket innebär att du kommer att förlora många möjligheter att tjäna belöningar, vilket kan vara lika dåligt som att bränna GRT.
    - ![Delegation upphävning](/img/Delegation-Upphävning.png) _Observera avgiften -på 0,5% i Delegation UI, samt den 28 dagar långa upphävningsperioden._ + ![Delegation upphävning](/img/Delegation-Upphävning.png) _Observera avgiften på 0,5% i Delegation UI, samt den 28 + dagar långa upphävningsperioden._
    ### Att välja en pålitlig Indexer med en rättvis belöningsutbetalning till Delegater @@ -44,9 +44,8 @@ Detta är en viktig del att förstå. Först låt oss diskutera tre mycket vikti Indexing Reward Cut - Indexing reward cut är den del av belöningarna som Indexer kommer att behålla för sig själva. Det betyder om den är inställd på 100%, som en Delegater kommer du att få 0 indexing rewards. Om du ser 80% i UI, innebär det att du som Delegater kommer att få 20%. En viktig notering - i början av nätverket kommer Indexing Rewards att utgöra majoriteten av belöningarna.
    - ![Indexing Edward Cut](/img/Indexing-Edward-Cut.png) *Den översta Indexet ger -Delegater 90% av belöningarna. Den mellersta ger Delegater 20%. Den nedersta -ger Delegater ~83%.* + ![Indexing Edward Cut](/img/Indexing-Edward-Cut.png) *Den översta Indexet ger Delegater 90% av belöningarna. Den + mellersta ger Delegater 20%. Den nedersta ger Delegater ~83%.*
    - Query Fee Cut - Detta fungerar precis som Indexing Reward Cut. Detta gäller dock för avkastningen på frågebetalningar som Indexer samlar in. Det bör noteras att i början av nätverket kommer avkastningen från frågebetalningar att vara mycket små jämfört med indexeringsbelöningen. Det rekommenderas att uppmärksamma nätverket för att avgöra när frågebetalningarna i nätverket kommer att börja vara mer betydande. diff --git a/website/pages/sv/network/indexing.mdx b/website/pages/sv/network/indexing.mdx index f48375d7043a..609035dec6fc 100644 --- a/website/pages/sv/network/indexing.mdx +++ b/website/pages/sv/network/indexing.mdx @@ -113,11 +113,11 @@ Indexers kan skilja sig åt genom att tillämpa avancerade tekniker för att fat - **Stor** - Förberedd för att indexera alla för närvarande använda subgrafer och att ta emot förfrågningar för relaterad trafik. | Konfiguration | Postgres
    (CPU:er) | Postgres
    (minne i GB) | Postgres
    (disk i TB) | VM:er
    (CPU:er) | VM:er
    (minne i GB) | -| ------------- |:----------------------------:|:--------------------------------:|:-------------------------------:|:-------------------------:|:-----------------------------:| -| Liten | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Stor | 72 | 468 | 3,5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Liten | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Stor | 72 | 468 | 3,5 | 48 | 184 | ### Vilka grundläggande säkerhetsåtgärder bör en Indexer vidta? @@ -149,20 +149,20 @@ Observera: För att stödja smidig skalning rekommenderas det att fråge- och in #### Graf Node -| Port | Syfte | Vägar | CLI-argument | Miljövariabel | -| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------- | -| 8000 | GraphQL HTTP-server
    (för subgraf-förfrågningar) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (för subgraf-prenumerationer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | -| 8030 | Subgrafindexeringsstatus-API | /graphql | --index-node-port | - | -| 8040 | Prometheus-metrar | /metrics | --metrics-port | - | +| Port | Syfte | Vägar | CLI-argument | Miljövariabel | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP-server
    (för subgraf-förfrågningar) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (för subgraf-prenumerationer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | +| 8030 | Subgrafindexeringsstatus-API | /graphql | --index-node-port | - | +| 8040 | Prometheus-metrar | /metrics | --metrics-port | - | #### Indexertjänst -| Port | Syfte | Vägar | CLI-argument | Miljövariabel | -| ---- | ------------------------------------------------------------------ | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP-server
    (för betalda subgraf-förfrågningar) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus-metrar | /metrics | --metrics-port | - | +| Port | Syfte | Vägar | CLI-argument | Miljövariabel | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP-server
    (för betalda subgraf-förfrågningar) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus-metrar | /metrics | --metrics-port | - | #### Indexeragent diff --git a/website/pages/sv/operating-graph-node.mdx b/website/pages/sv/operating-graph-node.mdx index 203e83bab78a..20fe3667765e 100644 --- a/website/pages/sv/operating-graph-node.mdx +++ b/website/pages/sv/operating-graph-node.mdx @@ -77,13 +77,13 @@ En komplett exempelkonfiguration för Kubernetes finns i [indexer repository](ht När Graph Node är igång exponerar den följande portar: -| Port | Syfte | Rutter | Argument för CLI | Miljö Variabel | -| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------- | -| 8000 | GraphQL HTTP-server
    (för frågor om undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (för prenumerationer på undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | -| 8030 | Status för indexering av undergrafer API | /graphql | --index-node-port | - | -| 8040 | Prometheus mätvärden | /metrics | --metrics-port | - | +| Port | Syfte | Rutter | Argument för CLI | Miljö Variabel | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP-server
    (för frågor om undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (för prenumerationer på undergrafer) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (för hantering av distributioner) | / | --admin-port | - | +| 8030 | Status för indexering av undergrafer API | /graphql | --index-node-port | - | +| 8040 | Prometheus mätvärden | /metrics | --metrics-port | - | > **Viktigt**: Var försiktig med att exponera portar offentligt - **administrationsportar** bör hållas säkra. Detta inkluderar JSON-RPC-slutpunkten för Graph Node. diff --git a/website/pages/sv/querying/distributed-systems.mdx b/website/pages/sv/querying/distributed-systems.mdx index 3143d4859eb8..365340f65a1b 100644 --- a/website/pages/sv/querying/distributed-systems.mdx +++ b/website/pages/sv/querying/distributed-systems.mdx @@ -84,8 +84,8 @@ Här kommer vi att använda argumentet `block: { hash: $blockHash }` för att bi /// Gets a list of domain names from a single block using pagination async function getDomainNames() { // Set a cap on the maximum number of items to pull. - let pages = 5; - const perPage = 1000; + let pages = 5 + const perPage = 1000 // The first query will get the first page of results and also get the block // hash so that the remainder of the queries are consistent with the first. @@ -100,34 +100,34 @@ async function getDomainNames() { hash } } - }`; + }` - let data = await graphql(listDomainsQuery, { perPage }); - let result = data.domains.map((d) => d.name); - let blockHash = data._meta.block.hash; + let data = await graphql(listDomainsQuery, { perPage }) + let result = data.domains.map((d) => d.name) + let blockHash = data._meta.block.hash - let query; + let query // Continue fetching additional pages until either we run into the limit of // 5 pages total (specified above) or we know we have reached the last page // because the page has fewer entities than a full page. while (data.domains.length == perPage && --pages) { - let lastID = data.domains[data.domains.length - 1].id; + let lastID = data.domains[data.domains.length - 1].id query = ` query ListDomains($perPage: Int!, $lastID: ID!, $blockHash: Bytes!) { domains(first: $perPage, where: { id_gt: $lastID }, block: { hash: $blockHash }) { name id } - }`; + }` - data = await graphql(query, { perPage, lastID, blockHash }); + data = await graphql(query, { perPage, lastID, blockHash }) // Accumulate domain names into the result for (domain of data.domains) { - result.push(domain.name); + result.push(domain.name) } } - return result; + return result } ``` diff --git a/website/pages/sv/querying/graphql-api.mdx b/website/pages/sv/querying/graphql-api.mdx index 303ee3c400df..3823820de6eb 100644 --- a/website/pages/sv/querying/graphql-api.mdx +++ b/website/pages/sv/querying/graphql-api.mdx @@ -208,7 +208,7 @@ I följande exempel filtrerar vi efter utmaningar med `utfall` `lyckades` och `n ``` > **Syntactic sugar:** Du kan förenkla ovanstående fråga genom att ta bort `and`-operatorn och istället skicka ett underuttryck separerat med kommatecken. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltextsökförfrågningar har ett obligatoriskt fält, `text`, för att tillha Fulltextsökoperatorer: -| Symbol | Operatör | Beskrivning | -| ----------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `Och` | För att kombinera flera söktermer till ett filter för entiteter som inkluderar alla de angivna termerna | -| | | `Eller` | Förfrågningar med flera söktermer separerade av ellipsen kommer att returnera alla entiteter med en matchning från någon av de angivna termerna | -| `<->` | `Följs av` | Ange avståndet mellan två ord. | -| `:*` | `Prefix` | Använd prefixsöktermen för att hitta ord vars prefix matchar (2 tecken krävs.) | +| Symbol | Operatör | Beskrivning | +| --- | --- | --- | +| `&` | `Och` | För att kombinera flera söktermer till ett filter för entiteter som inkluderar alla de angivna termerna | +| | | `Eller` | Förfrågningar med flera söktermer separerade av ellipsen kommer att returnera alla entiteter med en matchning från någon av de angivna termerna | +| `<->` | `Följs av` | Ange avståndet mellan två ord. | +| `:*` | `Prefix` | Använd prefixsöktermen för att hitta ord vars prefix matchar (2 tecken krävs.) | #### Exempel diff --git a/website/pages/sv/querying/querying-best-practices.mdx b/website/pages/sv/querying/querying-best-practices.mdx index 99d76809e653..5d5201189515 100644 --- a/website/pages/sv/querying/querying-best-practices.mdx +++ b/website/pages/sv/querying/querying-best-practices.mdx @@ -81,7 +81,7 @@ Men, som det anges i ["Frågehantering från en applikation"](/querying/querying Så här ställer du en fråga till The Graph med `graph-client`: ```tsx -import { execute } from "../.graphclient"; +import { execute } from '../.graphclient' const query = ` query GetToken($id: ID!) { @@ -90,13 +90,13 @@ query GetToken($id: ID!) { owner } } -`; +` const variables = { id: '1' } async function main() { - const result = await execute(query, variables); + const result = await execute(query, variables) // `result` är fullständigt typad! - console.log(result); + console.log(result) } main() @@ -115,15 +115,15 @@ Nu när vi har gått igenom de grundläggande reglerna för syntax för GraphQL- En vanlig (dålig) praxis är att dynamiskt bygga upp frågesträngar enligt följande: ```tsx -const id = params.id; -const fields = ["id", "owner"]; +const id = params.id +const fields = ['id', 'owner'] const query = ` query GetToken { token(id: ${id}) { - ${fields.join("\n")} + ${fields.join('\n')} } } -`; +` // Execute query... ``` @@ -138,9 +138,9 @@ Medan det tidigare avsnittet genererar en giltig GraphQL-fråga har den **många Av dessa skäl rekommenderas det alltid att skriva frågor som statiska strängar: ```tsx -import { execute } from "your-favorite-graphql-client"; +import { execute } from 'your-favorite-graphql-client' -const id = params.id; +const id = params.id const query = ` query GetToken($id: ID!) { token(id: $id) { @@ -148,7 +148,7 @@ query GetToken($id: ID!) { owner } } -`; +` const result = await execute(query, { variables: { @@ -171,9 +171,9 @@ Ibland vill vi inkludera fältet `owner` endast under vissa villkor. För detta kan vi utnyttja direktivet `@include(if:...)` på följande sätt: ```tsx -import { execute } from "your-favorite-graphql-client"; +import { execute } from 'your-favorite-graphql-client' -const id = params.id; +const id = params.id const query = ` query GetToken($id: ID!, $includeOwner: Boolean) { token(id: $id) { diff --git a/website/pages/sv/querying/querying-from-an-application.mdx b/website/pages/sv/querying/querying-from-an-application.mdx index 4ddf84530e0a..b25e2b3868c0 100644 --- a/website/pages/sv/querying/querying-from-an-application.mdx +++ b/website/pages/sv/querying/querying-from-an-application.mdx @@ -163,9 +163,9 @@ npm install @apollo/client graphql Sedan kan du göra en förfrågan till API:et med följande kod: ```javascript -import { ApolloClient, InMemoryCache, gql } from "@apollo/client"; +import { ApolloClient, InMemoryCache, gql } from '@apollo/client' -const APIURL = "https://api.studio.thegraph.com/query///"; +const APIURL = 'https://api.studio.thegraph.com/query///' const tokensQuery = ` query { @@ -176,20 +176,20 @@ const tokensQuery = ` metadataURI } } -`; +` const client = new ApolloClient({ uri: APIURL, cache: new InMemoryCache(), -}); +}) client .query({ query: gql(tokensQuery), }) - .then((data) => console.log("Subgraph data: ", data)) + .then((data) => console.log('Subgraph data: ', data)) .catch((err) => { - console.log("Error fetching data: ", err); + console.log('Error fetching data: ', err) }) ``` @@ -207,20 +207,20 @@ const tokensQuery = ` metadataURI } } -`; +` client .query({ query: gql(tokensQuery), variables: { first: 10, - orderBy: "createdAtTimestamp", - orderDirection: "desc", + orderBy: 'createdAtTimestamp', + orderDirection: 'desc', }, }) - .then((data) => console.log("Subgraph data: ", data)) + .then((data) => console.log('Subgraph data: ', data)) .catch((err) => { - console.log("Error fetching data: ", err); + console.log('Error fetching data: ', err) }) ``` @@ -244,9 +244,9 @@ npm install urql graphql Sedan kan du göra en förfrågan till API:et med följande kod: ```javascript -import { createClient } from "urql"; +import { createClient } from 'urql' -const APIURL = "https://api.thegraph.com/subgraphs/name/username/subgraphname"; +const APIURL = 'https://api.thegraph.com/subgraphs/name/username/subgraphname' const tokensQuery = ` query { @@ -257,11 +257,11 @@ const tokensQuery = ` metadataURI } } -`; +` const client = createClient({ url: APIURL, -}); +}) const data = await client.query(tokensQuery).toPromise() ``` diff --git a/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx b/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx index afa4a7df4747..97c6bb95635a 100644 --- a/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/sv/release-notes/assemblyscript-migration-guide.mdx @@ -91,17 +91,17 @@ maybeValue.aMethod(); Men i den nyare versionen, eftersom värdet är nullable, måste du kontrollera, så här: ```typescript -let maybeValue = load(); +let maybeValue = load() if (maybeValue) { - maybeValue.aMethod(); // `maybeValue` is not null anymore + maybeValue.aMethod() // `maybeValue` is not null anymore } ``` Eller gör så här: ```typescript -let maybeValue = load()!; // bryts i runtime om värdet är null +let maybeValue = load()! // bryts i runtime om värdet är null maybeValue.aMethod() ``` @@ -113,8 +113,8 @@ Om du är osäker på vilken du ska välja, rekommenderar vi alltid att använda Tidigare kunde du använda [variabelskuggning](https://en.wikipedia.org/wiki/Variable_shadowing) och kod som detta skulle fungera: ```typescript -let a = 10; -let b = 20; +let a = 10 +let b = 20 let a = a + b ``` @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Du måste döpa om dina duplicerade variabler om du hade variabelskuggning. + ### Jämförelser med nollvärden + När du gör uppgraderingen av din subgraf kan du ibland få fel som dessa: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + För att lösa problemet kan du helt enkelt ändra `if`-satsen till något i den här stilen: ```typescript @@ -154,8 +158,8 @@ Samma gäller om du använder != istället för ==. Det vanliga sättet att göra kasting tidigare var att bara använda nyckelordet `as`, som så här: ```typescript -let byteArray = new ByteArray(10); -let uint8Array = byteArray as Uint8Array; // motsvarande: byteArray +let byteArray = new ByteArray(10) +let uint8Array = byteArray as Uint8Array // motsvarande: byteArray ``` Detta fungerar dock endast i två scenarier: @@ -167,8 +171,8 @@ Exempel: ```typescript // primitive casting -let a: usize = 10; -let b: isize = 5; +let a: usize = 10 +let b: isize = 5 let c: usize = a + (b as usize) ``` @@ -176,7 +180,7 @@ let c: usize = a + (b as usize) // upcasting on class inheritance class Bytes extends Uint8Array {} -let bytes = new Bytes(2); +let bytes = new Bytes(2) // bytes // same as: bytes as Uint8Array ``` @@ -189,7 +193,7 @@ Det finns två scenarier där du kan vilja casta, men att använda `as`/`var` // downcasting om klassarv class Bytes extends Uint8Array {} -let uint8Array = new Uint8Array(2); +let uint8Array = new Uint8Array(2) // uint8Array // breaks in runtime :( ``` @@ -198,7 +202,7 @@ let uint8Array = new Uint8Array(2); class Bytes extends Uint8Array {} class ByteArray extends Uint8Array {} -let bytes = new Bytes(2); +let bytes = new Bytes(2) // bytes // breaks in runtime :( ``` @@ -208,8 +212,8 @@ I dessa fall kan du använda funktionen `changetype`: // downcasting om klassarv class Bytes extends Uint8Array {} -let uint8Array = new Uint8Array(2); -changetype(uint8Array); // works :) +let uint8Array = new Uint8Array(2) +changetype(uint8Array) // works :) ``` ```typescript @@ -217,18 +221,18 @@ changetype(uint8Array); // works :) class Bytes extends Uint8Array {} class ByteArray extends Uint8Array {} -let bytes = new Bytes(2); -changetype(bytes); // works :) +let bytes = new Bytes(2) +changetype(bytes) // works :) ``` Om du bara vill ta bort nullability kan du fortsätta använda `as`-operatorn (eller `variable`), men se till att du vet att värdet inte kan vara null, annars kommer det att bryta. ```typescript // ta bort ogiltighet -let previousBalance = AccountBalance.load(balanceId); // AccountBalance | null +let previousBalance = AccountBalance.load(balanceId) // AccountBalance | null if (previousBalance != null) { - return previousBalance as AccountBalance; // safe remove null + return previousBalance as AccountBalance // safe remove null } let newBalance = new AccountBalance(balanceId) @@ -248,18 +252,18 @@ Vi har också lagt till några fler statiska metoder i vissa typer för att unde För att använda [nullability check feature](https://www.assemblyscript.org/basics.html#nullability-checks) kan du använda antingen `if`-satser eller den ternära operatorn (`?` och `:`) så här: ```typescript -let something: string | null = "data"; +let something: string | null = 'data' -let somethingOrElse = something ? something : "else"; +let somethingOrElse = something ? something : 'else' // or -let somethingOrElse; +let somethingOrElse if (something) { - somethingOrElse = something; + somethingOrElse = something } else { - somethingOrElse = "else"; + somethingOrElse = 'else' } ``` @@ -270,10 +274,10 @@ class Container { data: string | null } -let container = new Container(); -container.data = "data"; +let container = new Container() +container.data = 'data' -let somethingOrElse: string = container.data ? container.data : "else"; // Kompilerar inte +let somethingOrElse: string = container.data ? container.data : 'else' // Kompilerar inte ``` Vilket ger detta fel: @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + För att åtgärda problemet kan du skapa en variabel för den egenskapen så att kompilatorn kan utföra den magiska nollbarhetskontrollen: ```typescript @@ -291,12 +296,12 @@ class Container { data: string | null } -let container = new Container(); -container.data = "data"; +let container = new Container() +container.data = 'data' -let data = container.data; +let data = container.data -let somethingOrElse: string = data ? data : "else"; // kompilerar helt okej :) +let somethingOrElse: string = data ? data : 'else' // kompilerar helt okej :) ``` ### Operatörsöverladdning med egenskapsaccess @@ -305,7 +310,7 @@ Om du försöker summera (till exempel) en nullable typ (från en property acces ```typescript class BigInt extends Uint8Array { - @operator("+") + @operator('+') plus(other: BigInt): BigInt { // ... } @@ -315,26 +320,26 @@ class Wrapper { public constructor(public n: BigInt | null) {} } -let x = BigInt.fromI32(2); -let y: BigInt | null = null; +let x = BigInt.fromI32(2) +let y: BigInt | null = null -x + y; // ge kompileringsfel om ogiltighet +x + y // ge kompileringsfel om ogiltighet -let wrapper = new Wrapper(y); +let wrapper = new Wrapper(y) -wrapper.n = wrapper.n + x; // ger inte kompileringsfel som det borde +wrapper.n = wrapper.n + x // ger inte kompileringsfel som det borde ``` Vi har öppnat en fråga om AssemblyScript-kompilatorn för detta, men om du gör den här typen av operationer i dina subgraf-mappningar bör du ändra dem så att de gör en null-kontroll innan den. ```typescript -let wrapper = new Wrapper(y); +let wrapper = new Wrapper(y) if (!wrapper.n) { - wrapper.n = BigInt.fromI32(0); + wrapper.n = BigInt.fromI32(0) } -wrapper.n = wrapper.n + x; // nu är `n` garanterat ett BigInt +wrapper.n = wrapper.n + x // nu är `n` garanterat ett BigInt ``` ### Initialisering av värde @@ -342,17 +347,17 @@ wrapper.n = wrapper.n + x; // nu är `n` garanterat ett BigInt Om du har någon kod som denna: ```typescript -var value: Type; // null -value.x = 10; -value.y = "content" +var value: Type // null +value.x = 10 +value.y = 'content' ``` Det kommer att kompilera men brytas vid körning, det händer eftersom värdet inte har initialiserats, så se till att din subgraf har initialiserat sina värden, så här: ```typescript -var value = new Type(); // initialized -value.x = 10; -value.y = "content" +var value = new Type() // initialized +value.x = 10 +value.y = 'content' ``` Även om du har nullable properties i en GraphQL-entitet, som denna: @@ -367,10 +372,10 @@ type Total @entity { Och du har en kod som liknar den här: ```typescript -let total = Total.load("latest"); +let total = Total.load('latest') if (total === null) { - total = new Total("latest") + total = new Total('latest') } total.amount = total.amount + BigInt.fromI32(1) @@ -379,11 +384,11 @@ total.amount = total.amount + BigInt.fromI32(1) Du måste se till att initialisera värdet `total.amount`, för om du försöker komma åt som i den sista raden för summan, kommer det att krascha. Så antingen initialiserar du det först: ```typescript -let total = Total.load("latest") +let total = Total.load('latest') if (total === null) { - total = new Total("latest") - total.amount = BigInt.fromI32(0); + total = new Total('latest') + total.amount = BigInt.fromI32(0) } total.tokens = total.tokens + BigInt.fromI32(1) @@ -399,10 +404,10 @@ type Total @entity { ``` ```typescript -let total = Total.load("latest"); +let total = Total.load('latest') if (total === null) { - total = new Total("latest"); // initierar redan icke-nullställbara egenskaper + total = new Total('latest') // initierar redan icke-nullställbara egenskaper } total.amount = total.amount + BigInt.fromI32(1) @@ -430,17 +435,17 @@ export class Something { // or export class Something { - value: Thing; + value: Thing constructor(value: Thing) { - this.value = value; + this.value = value } } // or export class Something { - value!: Thing; + value!: Thing } ``` @@ -449,9 +454,9 @@ export class Something { Klassen `Array` accepterar fortfarande ett tal för att initiera längden på listan, men du bör vara försiktig eftersom operationer som `.push` faktiskt ökar storleken istället för att lägga till i början, till exempel: ```typescript -let arr = new Array(5); // ["", "", "", "", ""] +let arr = new Array(5) // ["", "", "", "", ""] -arr.push("something"); // ["", "", "", "", "", "something"] // size 6 :( +arr.push('something') // ["", "", "", "", "", "something"] // size 6 :( ``` Beroende på vilka typer du använder, t.ex. nullable-typer, och hur du kommer åt dem, kan du stöta på ett runtime-fel som det här: @@ -463,17 +468,17 @@ ERRO Handler skipped due to execution failure, error: Mapping aborted at ~lib/ar För att faktiskt trycka i början bör du antingen initiera `Array` med storlek noll, så här: ```typescript -let arr = new Array(0); // [] +let arr = new Array(0) // [] -arr.push("something"); // ["something"] +arr.push('something') // ["something"] ``` Eller så bör du mutera den via index: ```typescript -let arr = new Array(5); // ["", "", "", "", ""] +let arr = new Array(5) // ["", "", "", "", ""] -arr[0] = "something"; // ["something", "", "", "", ""] +arr[0] = 'something' // ["something", "", "", "", ""] ``` ### GraphQL-schema diff --git a/website/pages/tr/developing/creating-a-subgraph.mdx b/website/pages/tr/developing/creating-a-subgraph.mdx index 4cc6f0946d55..dfdd32dac09d 100644 --- a/website/pages/tr/developing/creating-a-subgraph.mdx +++ b/website/pages/tr/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Bazı varlık türleri için `id`, iki diğer varlığın id'lerinden oluşturul GraphQL API'mizde aşağıdaki skalerleri destekliyoruz: -| Tür | Tanım | -| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Baytlar` | Byte dizisi, onaltılık bir dizgi olarak temsil edilir. Ethereum hash değerleri ve adresleri için yaygın olarak kullanılır. | -| `Dizgi(String)` | `string` değerleri için skaler. Null karakterleri desteklenmez ve otomatik olarak kaldırılır. | -| `Boolean` | `boolean` değerleri için skaler. | -| `Int` | GraphQL özellikleri, `Int`'in 32 bayt boyutunda olduğunu tanımlar. | -| `Int8` | 64 bitlik işaretli tam sayı olarak da bilinen 8 baytlık işaretli tam sayı, -9,223,372,036,854,775,808 ila 9,223,372,036,854,775,807 aralığındaki değerleri depolayabilir. Ethereum'dan `i64`'ü temsil etmek için bunu kullanmayı tercih edin. | -| `BigInt` | Büyük tamsayılar. Ethereum'un `uint32`, `int64`, `uint64`, ..., `uint256` türleri için kullanılır. Not: `int32`, `uint24` veya `int8` gibi `uint32`'nin altındaki her şey `i32`olarak temsil edilir. | -| `BigDecimal` | `BigDecimal` Yüksek hassasiyetli ondalık sayılar, bir anlamlı ve bir üsle temsil edilir. Üs aralığı -6143 ila +6144 arasındadır. 34 anlamlı rakama yuvarlanır. | +| Tür | Tanım | +| --- | --- | +| `Baytlar` | Byte dizisi, onaltılık bir dizgi olarak temsil edilir. Ethereum hash değerleri ve adresleri için yaygın olarak kullanılır. | +| `Dizgi(String)` | `string` değerleri için skaler. Null karakterleri desteklenmez ve otomatik olarak kaldırılır. | +| `Boolean` | `boolean` değerleri için skaler. | +| `Int` | GraphQL özellikleri, `Int`'in 32 bayt boyutunda olduğunu tanımlar. | +| `Int8` | 64 bitlik işaretli tam sayı olarak da bilinen 8 baytlık işaretli tam sayı, -9,223,372,036,854,775,808 ila 9,223,372,036,854,775,807 aralığındaki değerleri depolayabilir. Ethereum'dan `i64`'ü temsil etmek için bunu kullanmayı tercih edin. | +| `BigInt` | Büyük tamsayılar. Ethereum'un `uint32`, `int64`, `uint64`, ..., `uint256` türleri için kullanılır. Not: `int32`, `uint24` veya `int8` gibi `uint32`'nin altındaki her şey `i32`olarak temsil edilir. | +| `BigDecimal` | `BigDecimal` Yüksek hassasiyetli ondalık sayılar, bir anlamlı ve bir üsle temsil edilir. Üs aralığı -6143 ila +6144 arasındadır. 34 anlamlı rakama yuvarlanır. | #### Numaralandırmalar @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Not:** Yeni bir veri kaynağı, oluşturulduğu blok ve tüm takip eden bloklar için yalnızca çağrıları ve olayları işleyecektir, ancak önceki bloklarda bulunan geçmiş verileri işlemeyecektir. -> +> > Eğer önceki bloklar, yeni veri kaynağı için ilgili veri içeriyorsa, o veriyi indekslemek için sözleşmenin mevcut durumunu okuyarak ve yeni veri kaynağı oluşturulurken o zaman dilimindeki durumu temsil eden varlıklar oluşturarak yapmak en iyisidir. ### Veri Kaynağı Bağlamı @@ -716,7 +716,7 @@ dataSources: ``` > **Not:** Sözleşme oluşturma bloğu hızlı bir şekilde Etherscan'da aranabilir: -> +> > 1. Arama çubuğuna adresini girerek sözleşmeyi arayın. > 2. `Contract Creator` bölümünde oluşturma işlemi hash'ına tıklayın. > 3. İşlem detayları sayfasını yükleyin ve bu sözleşme için başlangıç bloğunu bulacaksınız. diff --git a/website/pages/tr/developing/graph-ts/api.mdx b/website/pages/tr/developing/graph-ts/api.mdx index 57910776ed3d..a96922aadada 100644 --- a/website/pages/tr/developing/graph-ts/api.mdx +++ b/website/pages/tr/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ Bu sayfa subgraph eşleştirmelerini yazarken bullanılabilen yerleşik API'leri Subgraph bildirimindeki `apiVersion`, belirli bir subgraph için Graph Node'u tarafından çalıştırılan eşleme API sürümünü belirtir. -| Sürüm | Sürüm Notları | -| :---: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Ethereum Event nesnesindeki Ethereum types
    Added `receipt` alanına `TransactionReceipt` ve `Log` sınıfları eklendi | -| 0.0.6 | Ethereum İşlemine `nonce` alanı eklendi. object
    Added `baseFeePerGas` Ethereum Block nesnesine eklendi | +| Sürüm | Sürüm Notları | +| :-: | --- | +| 0.0.7 | Ethereum Event nesnesindeki Ethereum types
    Added `receipt` alanına `TransactionReceipt` ve `Log` sınıfları eklendi | +| 0.0.6 | Ethereum İşlemine `nonce` alanı eklendi. object
    Added `baseFeePerGas` Ethereum Block nesnesine eklendi | | 0.0.5 | AssemblyScript 0.19.10 sürümüne yükseltildi (buna son değişiklikler dahildir, lütfen [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed`'in `ethereum.transaction.gasLimit` olarak yeniden adlandırılmasına bakın | -| 0.0.4 | Ethereum SmartContractCall nesnesine `functionSignature` alanı eklendi | -| 0.0.3 | `ethereum.call.to` olarak yeniden adlandırılan object
    `etherem.call.address` Ethereum Çağrısına `from` alanı eklendi | -| 0.0.2 | Ethereum İşlem nesnesine `input` alanı eklendi | +| 0.0.4 | Ethereum SmartContractCall nesnesine `functionSignature` alanı eklendi | +| 0.0.3 | `ethereum.call.to` olarak yeniden adlandırılan object
    `etherem.call.address` Ethereum Çağrısına `from` alanı eklendi | +| 0.0.2 | Ethereum İşlem nesnesine `input` alanı eklendi | ### Dahili Türler @@ -237,15 +237,15 @@ export function handleTransfer(event: TransferEvent): void { // İşlem hash'ını olay kimliği olarak kullanarak bir Transfer varlığı oluşturun let id = event.transaction.hash let transfer = new Transfer(id) - + // Olay parametrelerini kullanarak varlığın özelliklerini ayarlayın transfer.from = event.params.from transfer.to = event.params.to transfer.amount = event.params.amount - + // Varlığı depoya kaydedin transfer.save() - } +} ``` Zincir işlenirken bir `Transfer` olayıyla karşılaşıldığında, oluşturulan `Transfer` türü (varlık türüyle adlandırma çakışmasını önlemek için burada `TransferEvent` olarak adlandırılmıştır) kullanılarak `handleTransfer` olay işleyicisine aktarılır. Bu tür, olayın ana işlemi ve parametreleri gibi verilere erişilmesini sağlar. @@ -735,44 +735,44 @@ Bir değerin türü belli olduğunda, aşağıdaki yöntemlerden biri kullanıla ### Tip Dönüşümleri Referansı -| Kaynak(lar) | Hedef | Dönüştürme işlevi | -| ----------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Kaynak(lar) | Hedef | Dönüştürme işlevi | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Veri Kaynağı Meta Verileri diff --git a/website/pages/tr/developing/unit-testing-framework.mdx b/website/pages/tr/developing/unit-testing-framework.mdx index c5e1bf917439..b6229c498b5c 100644 --- a/website/pages/tr/developing/unit-testing-framework.mdx +++ b/website/pages/tr/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Tutulan kayıt çıktısı test çalışma süresini içerir. İşte buna bir ö Bu, AssemblyScript tarafından desteklenmeyen `console.log`'u kullandığınız anlamına gelmektedir. Lütfen [Logging API](/developing/assemblyscript-api/#logging-api) kullanmayı düşünün > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) Argümanlardaki uyumsuzluk, `graph-ts` ve `matchstick-as` arasındaki uyumsuzluktan kaynaklanır. Bu gibi sorunları düzeltmenin en iyi yolu her şeyi en son yayınlanan sürüme güncellemektir. diff --git a/website/pages/tr/network/benefits.mdx b/website/pages/tr/network/benefits.mdx index 6b888d327926..633b6a7740c8 100644 --- a/website/pages/tr/network/benefits.mdx +++ b/website/pages/tr/network/benefits.mdx @@ -27,47 +27,47 @@ Sorgu maliyetleri değişebilir; alıntılanan maliyet, yayın tarihindeki (Aral ## Düşük Hacimli Kullanıcı (ayda 30.000'den az sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -|:------------------------------:|:---------------------------------------:|:-------------------------------------------------------------------------:| -| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | -| Sorgu maliyetleri | 0$ + | Aylık yaklaşık 15$ | -| Mühendislik süresi | Aylık 400$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 30.000 (otomatik ölçeklendirme) | -| Sorgu başına maliyet | 0$ | 0.0005$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Coğrafi fazlalıklar | Ek node başına 750$+ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | $750+ | ~$15 | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +| :-: | :-: | :-: | +| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | +| Sorgu maliyetleri | 0$ + | Aylık yaklaşık 15$ | +| Mühendislik süresi | Aylık 400$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 30.000 (otomatik ölçeklendirme) | +| Sorgu başına maliyet | 0$ | 0.0005$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Coğrafi fazlalıklar | Ek node başına 750$+ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | $750+ | ~$15 | ## Orta Hacimli Kullanıcı (ayda 3.000.000'den fazla sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -|:------------------------------:|:------------------------------------------:|:-------------------------------------------------------------------------:| -| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | -| Sorgu maliyetleri | Aylık 500$ | Aylık 750$ | -| Mühendislik süresi | Aylık 800$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 3,000,000+ | -| Sorgu başına maliyet | 0$ | 0.00025$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Mühendislik gideri | Saatlik 200$ | Dahil | -| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | 1,650$+ | 750$ | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +| :-: | :-: | :-: | +| Aylık sunucu maliyeti\* | Aylık 350$ | 0$ | +| Sorgu maliyetleri | Aylık 500$ | Aylık 750$ | +| Mühendislik süresi | Aylık 800$ | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 3,000,000+ | +| Sorgu başına maliyet | 0$ | 0.00025$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Mühendislik gideri | Saatlik 200$ | Dahil | +| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | 1,650$+ | 750$ | ## Yüksek Hacimli Kullanıcı (ayda 30.000.000'den fazla sorgu) -| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | -|:------------------------------:|:-------------------------------------------:|:-------------------------------------------------------------------------:| -| Aylık sunucu maliyeti\* | Node başına aylık 1100$ | 0$ | -| Sorgu maliyetleri | 4000$ | Aylık 4500$ | -| Gerekli node sayısı | 10 | Şart yok | -| Mühendislik süresi | Ayda 6.000 $ veya daha fazlası | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | -| Aylık sorgular | Alt yeteneklerle sınırlı | 30,000,000+ | -| Sorgu başına maliyet | 0$ | 0.00015$ | -| Altyapı | Merkezi | Merkeziyetsiz | -| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | -| Çalışma süresi | Değişmekte | 99.9%+ | -| Toplam Aylık Maliyet | 11,000$+ | 4500$ | +| Maliyet Karşılaştırması | Kendi Kendine Barındırılan | Graph Ağı | +| :-: | :-: | :-: | +| Aylık sunucu maliyeti\* | Node başına aylık 1100$ | 0$ | +| Sorgu maliyetleri | 4000$ | Aylık 4500$ | +| Gerekli node sayısı | 10 | Şart yok | +| Mühendislik süresi | Ayda 6.000 $ veya daha fazlası | Yok, küresel olarak dağıtılmış indeksleyiciler ile ağa entegre edilmiştir | +| Aylık sorgular | Alt yeteneklerle sınırlı | 30,000,000+ | +| Sorgu başına maliyet | 0$ | 0.00015$ | +| Altyapı | Merkezi | Merkeziyetsiz | +| Coğrafi yedekleme | Ek node başına 1200$ | Dahil | +| Çalışma süresi | Değişmekte | 99.9%+ | +| Toplam Aylık Maliyet | 11,000$+ | 4500$ | \*yedekleme maliyetleri dahil: aylık $50-$100 diff --git a/website/pages/tr/network/delegating.mdx b/website/pages/tr/network/delegating.mdx index c2f28e949987..ba7c066ce8a2 100644 --- a/website/pages/tr/network/delegating.mdx +++ b/website/pages/tr/network/delegating.mdx @@ -33,7 +33,8 @@ Bir delegatör, stak ettiği tokenları geri almak istediğinde, tokenları 28 g Dikkate alınması gereken bir şey de akıllıca bir indeksleyici seçmektir. Güvenilir olmayan veya iyi bir iş çıkarmayan bir indeksleyici seçerseniz, stake ettiğiniz token’ları geri almak istersiniz. Bu da GRT'yi yakmak kadar kötü olabilecek olan bir durum gibidir, yani ödül kazanmak için birçok fırsatı kaybedeceğiniz anlamına gelir.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Delegasyon Kullanıcı Arayüzündeki %0,5 ücreti ve 28 günlük ayrılma süresini bir yere not edin._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Delegasyon Kullanıcı Arayüzündeki %0,5 ücreti ve 28 günlük + ayrılma süresini bir yere not edin._
    ### Delegatörler İçin Adil Bir Ödül Ödemesi Olan Güvenilir Bir İndeksleyici Seçme @@ -43,7 +44,8 @@ Bu anlaşılması gereken önemli bir kısımdır. Öncelikle, Delegasyon Parame İndeksleme Ödül Kesintisi - İndeksleme ödül kesintisi, ödüllerin indeksleyicinin kendisi için tutacağı kısmıdır. Bu, %100'e ayarlanırsa, delegatörn olarak 0 indeksleme ödülü alacağınız anlamına gelir. Kullanıcı arayüzünde %80 görürseniz, bu bir delegatör olarak %20 alacağınız anlamına gelir. Önemli bir not - ağın başlangıcında, indeksleme ödülleri, ödüllerin çoğuna sahip olacaktır.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *En iyi indeksleyici, delegatörlere ödüllerin %90'ını veriyor. Ortadaki, delegatörlere %20 veriyor. Alttaki, delegatörlere ~%83 veriyor.* + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *En iyi indeksleyici, delegatörlere ödüllerin %90'ını veriyor. + Ortadaki, delegatörlere %20 veriyor. Alttaki, delegatörlere ~%83 veriyor.*
    - Sorgu Ücreti Kesintisi - Bu, tam olarak indeksleme ödül kesintisi gibi çalışır. Ancak bu, özellikle indeksleyicinin topladığı sorgu ücretlerinin getirileri içindir. Ağın başlangıcında, sorgu ücretlerinden elde edilen getirilerin, indeksleme ödülüne kıyasla çok küçük olacağı belirtilmelidir. Ağdaki sorgu ücretlerinin ne zaman daha belirgin olmaya başlayacağını belirlemek için ağa dikkat edilmesi önerilir. diff --git a/website/pages/tr/network/indexing.mdx b/website/pages/tr/network/indexing.mdx index fb6a2cf1d2bf..27c87c872378 100644 --- a/website/pages/tr/network/indexing.mdx +++ b/website/pages/tr/network/indexing.mdx @@ -112,12 +112,12 @@ Bir tahsisat kapatıldıktan sonra iadeler İndeksleyici tarafından talep edile - **Orta** - 100 subgraph ve saniyede 200-500 isteği destekleyen Üretim İndeksleyici. - **Yüksek** - Şu anda kullanılan tüm subgraphları indekslemek ve ilgili trafik için istekleri sunmak için hazırlanmıştır. -| Kurulum | Postgres
    (CPU'lar) | Postgres
    (GB cinsinden bellek) | Postgres
    (TB cinsinden disk) | VM'ler
    (CPU'lar) | VM'ler
    (GB cinsinden bellek) | -| -------- |:-----------------------------:|:-----------------------------------------:|:---------------------------------------:|:---------------------------:|:---------------------------------------:| -| Düşük | 4 | 8 | 1 | 4 | 16 | -| Standart | 8 | 30 | 1 | 12 | 48 | -| Orta | 16 | 64 | 2 | 32 | 64 | -| Yüksek | 72 | 468 | 3.5 | 48 | 184 | +| Kurulum | Postgres
    (CPU'lar) | Postgres
    (GB cinsinden bellek) | Postgres
    (TB cinsinden disk) | VM'ler
    (CPU'lar) | VM'ler
    (GB cinsinden bellek) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Düşük | 4 | 8 | 1 | 4 | 16 | +| Standart | 8 | 30 | 1 | 12 | 48 | +| Orta | 16 | 64 | 2 | 32 | 64 | +| Yüksek | 72 | 468 | 3.5 | 48 | 184 | ### Bir İndeksleyicinin alması gereken bazı temel güvenlik önlemleri nelerdir? @@ -149,20 +149,20 @@ Not: Çevik ölçeklendirmeyi desteklemek için, sorgulama ve indeksleme endişe #### Graph Node -| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | -| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | -| 8000 | GraphQL HTTP sunucusu
    ( subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    ( subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | -| 8030 | Subgraph indeksleme durum API'si | /graphql | --index-node-port | - | -| 8040 | Prometheus metrikleri | /metrics | --metrics-port | - | +| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP sunucusu
    ( subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    ( subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | +| 8030 | Subgraph indeksleme durum API'si | /graphql | --index-node-port | - | +| 8040 | Prometheus metrikleri | /metrics | --metrics-port | - | #### İndeksleyici Hizmeti -| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | -| ---- | ------------------------------------------------------------------ | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP sunucusu
    (ücretli subgraph sorguları için) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrikleri | /metrics | --metrics-port | - | +| Port | Amaç | Rotalar | CLI Argümanı | Ortam Değişkeni | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP sunucusu
    (ücretli subgraph sorguları için) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrikleri | /metrics | --metrics-port | - | #### İndeksleyici Aracı diff --git a/website/pages/tr/operating-graph-node.mdx b/website/pages/tr/operating-graph-node.mdx index c985dfba3a76..41f96f2faec4 100644 --- a/website/pages/tr/operating-graph-node.mdx +++ b/website/pages/tr/operating-graph-node.mdx @@ -77,13 +77,13 @@ Tam Kubernetes örnek yapılandırması [indeksleyici Github deposunda](https:// Graph Düğümü çalışırken aşağıdaki portları açar: -| Port | Amaç | Routes | CLI Argümanı | Ortam Değişkeni | -| ---- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | -| 8000 | GraphQL HTTP sunucusu
    (subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | -| 8030 | Subgraph indeksleme durumu API'ı | /graphql | --index-node-port | - | -| 8040 | Prometheus ölçümleri | /metrics | --metrics-port | - | +| Port | Amaç | Routes | CLI Argümanı | Ortam Değişkeni | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP sunucusu
    (subgraph sorguları için) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (subgraph abonelikleri için) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (dağıtımları yönetmek için) | / | --admin-port | - | +| 8030 | Subgraph indeksleme durumu API'ı | /graphql | --index-node-port | - | +| 8040 | Prometheus ölçümleri | /metrics | --metrics-port | - | > **Önemli**: Bağlantı noktalarını herkese açık olarak açarken dikkatli olun - **yönetim portları** kilitli tutulmalıdır. Bu, Graph Düğümü JSON-RPC uç noktasını içerir. diff --git a/website/pages/tr/publishing/publishing-a-subgraph.mdx b/website/pages/tr/publishing/publishing-a-subgraph.mdx index 5ea9a59a3679..b217d55b13bd 100644 --- a/website/pages/tr/publishing/publishing-a-subgraph.mdx +++ b/website/pages/tr/publishing/publishing-a-subgraph.mdx @@ -4,7 +4,7 @@ title: Merkeziyetsiz Ağa Bir Subgraph Yayınlamak Subgraph'iniz [Subgraph Studio'ya deploy edildikten](/deploying/deploying-a-subgraph-to-studio) sonra, onu test edip üretime sokmaya hazırsınız, ardından merkeziyetsiz ağda yayınlayabilirsiniz. -Merkeziyetsiz ağda bir subgraph yayınlamak, [küratörlerin](/network/curating) ona sinyal göndermeye ve [indeksleyicilerin](/network/indexing) onu indekslemeye başlamasını sağlar. +Merkeziyetsiz ağda bir subgraph yayınlamak, [küratörlerin](/network/curating) ona sinyal göndermeye ve [indeksleyicilerin](/network/indexing) onu indekslemeye başlamasını sağlar. diff --git a/website/pages/tr/querying/graphql-api.mdx b/website/pages/tr/querying/graphql-api.mdx index 84ba2a601058..4e817f0e579d 100644 --- a/website/pages/tr/querying/graphql-api.mdx +++ b/website/pages/tr/querying/graphql-api.mdx @@ -208,7 +208,7 @@ Aşağıdaki örnekte, `outcome` değeri `succeeded` olan ve `number` değeri `1 ``` > **Syntactic sugar:** Yukarıdaki sorguyu, virgülle ayrılmış bir alt ifade geçirerek, `and` operatörünü kaldırarak basitleştirebilirsiniz. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Tam metin arama sorgularının kullanması gereken bir zorunlu alanı vardır, b Tam metin arama operatörleri: -| Sembol | Operatör | Tanımlama | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Birden fazla arama terimini, sağlanan tüm terimleri içeren varlıklar için bir filtrede birleştirmek için kullanılır | -| | | `Or` | Or, işleciyle ayrılmış birden çok arama terimi içeren sorgular, sağlanan terimlerden herhangi biriyle eşleşen tüm varlıkları döndürür | -| `<->` | `Follow by` | İki kelime arasındaki mesafeyi belirtir. | -| `:*` | `Prefix` | Ön eki eşleşen kelimeleri bulmak için önek arama terimini kullanın (2 karakter gereklidir.) | +| Sembol | Operatör | Tanımlama | +| --- | --- | --- | +| `&` | `And` | Birden fazla arama terimini, sağlanan tüm terimleri içeren varlıklar için bir filtrede birleştirmek için kullanılır | +| | | `Or` | Or, işleciyle ayrılmış birden çok arama terimi içeren sorgular, sağlanan terimlerden herhangi biriyle eşleşen tüm varlıkları döndürür | +| `<->` | `Follow by` | İki kelime arasındaki mesafeyi belirtir. | +| `:*` | `Prefix` | Ön eki eşleşen kelimeleri bulmak için önek arama terimini kullanın (2 karakter gereklidir.) | #### Örnekler diff --git a/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx b/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx index a54f163e8541..338c85951884 100644 --- a/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/tr/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Değişken gölgelemeniz varsa, yinelenen değişkenlerinizi yeniden adlandırmanız gerekir. + ### Null Karşılaştırmaları + Subgraph'inizde yükseltme yaparak, bazen aşağıdaki gibi hatalar alabilirsiniz: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Çözmek için `if` ifadesini aşağıdaki gibi değiştirebilirsiniz: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Bu sorunu çözmek için, bu özellik erişimi için bir değişken oluşturabilirsiniz, böylece derleyici geçersizlik denetimi sihrini yapabilir: ```typescript diff --git a/website/pages/tr/sunrise.mdx b/website/pages/tr/sunrise.mdx index 5c749abd441d..b1df7292ebed 100644 --- a/website/pages/tr/sunrise.mdx +++ b/website/pages/tr/sunrise.mdx @@ -12,9 +12,7 @@ Bu plan, yeni yayınlanan subgraphlar üzerinde sorgular sunmak için bir yükse ### Merkeziyetsiz verinin doğuşunun aşamaları nelerdir? -**Sunray**: Barındırılan hizmet zincirleri için desteği etkinleştirin, sorunsuz bir yükseltme akışı sunun, Graph Network'te ücretsiz bir plan sunun. -**Sunbeam**: Subgraph geliştiricilerinin subgraph'lerini Graph Network'e yükseltmeleri gereken yükseltme penceresi. Bunun başlangıcı ve süresi yakında açıklanacak. -**Sunrise**: Barındırılan hizmet uç noktalarının süresi, trafik Graph Network'e taşındıkça sona erecektir. +**Sunray**: Barındırılan hizmet zincirleri için desteği etkinleştirin, sorunsuz bir yükseltme akışı sunun, Graph Network'te ücretsiz bir plan sunun. **Sunbeam**: Subgraph geliştiricilerinin subgraph'lerini Graph Network'e yükseltmeleri gereken yükseltme penceresi. Bunun başlangıcı ve süresi yakında açıklanacak. **Sunrise**: Barındırılan hizmet uç noktalarının süresi, trafik Graph Network'e taşındıkça sona erecektir. ### Kendi altyapımı çalıştırmam gerekiyor mu? diff --git a/website/pages/uk/developing/creating-a-subgraph.mdx b/website/pages/uk/developing/creating-a-subgraph.mdx index e557d92701e6..aae315292349 100644 --- a/website/pages/uk/developing/creating-a-subgraph.mdx +++ b/website/pages/uk/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/uk/developing/graph-ts/api.mdx b/website/pages/uk/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/uk/developing/graph-ts/api.mdx +++ b/website/pages/uk/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/uk/developing/unit-testing-framework.mdx b/website/pages/uk/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/uk/developing/unit-testing-framework.mdx +++ b/website/pages/uk/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/uk/network/benefits.mdx b/website/pages/uk/network/benefits.mdx index 08bfd02f8129..b12002a1b0ec 100644 --- a/website/pages/uk/network/benefits.mdx +++ b/website/pages/uk/network/benefits.mdx @@ -27,53 +27,54 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Малоактивний користувач (менше ніж 30 000 запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -|:-----------------------------------------:|:------------------------------------------:|:-----------------------------------------------------------------:| -| Щомісячна плата за сервер\* | $350 на місяць | $0 | -| Вартість запитів | $0+ | ~$15 на місяць | -| Час технічного обслуговування | $400 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30 000 (автомасштабування) | -| Вартість одного запиту | $0 | $0.0005 | -| Інфраструктура | Централізована | Децентралізована | -| Географічне резервування | $750+ за кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $750+ | ~$15 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +| :-: | :-: | :-: | +| Щомісячна плата за сервер\* | $350 на місяць | $0 | +| Вартість запитів | $0+ | ~$15 на місяць | +| Час технічного обслуговування | $400 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30 000 (автомасштабування) | +| Вартість одного запиту | $0 | $0.0005 | +| Інфраструктура | Централізована | Децентралізована | +| Географічне резервування | $750+ за кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $750+ | ~$15 | ## Середній користувач (3 000 000+ запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -|:-----------------------------------------:|:-----------------------------------------------:|:-----------------------------------------------------------------:| -| Щомісячна плата за сервер\* | $350 на місяць | $0 | -| Вартість запитів | $500 на місяць | $750 на місяць | -| Час технічного обслуговування | $800 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 3,000,000+ | -| Вартість одного запиту | $0 | $0.00025 | -| Інфраструктура | Централізована | Децентралізована | -| Інженерно-технічні витрати | $200 на годину | Включено | -| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $1,650+ | $750 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +| :-: | :-: | :-: | +| Щомісячна плата за сервер\* | $350 на місяць | $0 | +| Вартість запитів | $500 на місяць | $750 на місяць | +| Час технічного обслуговування | $800 на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 3,000,000+ | +| Вартість одного запиту | $0 | $0.00025 | +| Інфраструктура | Централізована | Децентралізована | +| Інженерно-технічні витрати | $200 на годину | Включено | +| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $1,650+ | $750 | ## Високоактивний користувач (30 000 000+ запитів на місяць) -| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | -|:-----------------------------------------:|:-----------------------------------------------:|:-----------------------------------------------------------------:| -| Щомісячна плата за сервер\* | $1100 на місяць, за одну ноду | $0 | -| Вартість запитів | $4000 | $4,500 на місяць | -| Кількість необхідних нод | 10 | Не стосується | -| Час технічного обслуговування | $6,000 і більше на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | -| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30,000,000+ | -| Вартість одного запиту | $0 | $0.00015 | -| Інфраструктура | Централізована | Децентралізована | -| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | -| Час безвідмовної роботи | Варіюється | 99.9%+ | -| Загальна сума щомісячних витрат | $11,000+ | $4,500 | +| Порівняння вартості послуг | Самостійний хостинг | Graph мережа | +| :-: | :-: | :-: | +| Щомісячна плата за сервер\* | $1100 на місяць, за одну ноду | $0 | +| Вартість запитів | $4000 | $4,500 на місяць | +| Кількість необхідних нод | 10 | Не стосується | +| Час технічного обслуговування | $6,000 і більше на місяць | Немає, вбудовані в мережу з глобально розподіленими індексаторами | +| Кількість запитів за місяць | Обмежується інфраструктурними можливостями | 30,000,000+ | +| Вартість одного запиту | $0 | $0.00015 | +| Інфраструктура | Централізована | Децентралізована | +| Географічне резервування | $1,200 загальних витрат на кожну додаткову ноду | Включено | +| Час безвідмовної роботи | Варіюється | 99.9%+ | +| Загальна сума щомісячних витрат | $11,000+ | $4,500 | \*включаючи витрати на резервне копіювання: $50-$100 на місяць Час технічного обслуговування, розрахований на основі припущення $200 за годину -використання функції максимального бюджету запиту у вкладці бюджетного тарифоутворення зі збереженням високої якості обслуговування +використання функції максимального бюджету запиту у вкладці бюджетного тарифоутворення зі збереженням +високої якості обслуговування Estimated costs are only for Ethereum Mainnet subgraphs — costs are even higher when self hosting a `graph-node` on other networks. diff --git a/website/pages/uk/network/delegating.mdx b/website/pages/uk/network/delegating.mdx index a4fe90cf6c5a..64584883d14b 100644 --- a/website/pages/uk/network/delegating.mdx +++ b/website/pages/uk/network/delegating.mdx @@ -33,7 +33,8 @@ title: Делегування Важливо також враховувати, що вибір індексатора має бути обґрунтованим. Якщо ви вирішите обрати індексатора, який не заслуговує на довіру або погано виконує свою роботу, ви побажаєте відмовитися від делегування, а це означає, що ви втратите багато можливостей заробити винагороду, що може бути так само погано, як і спалювання GRT.
    - ![Delegation unbonding](/img/Delegation-Unbonding.png) _Зверніть увагу на комісію в розмірі 0,5% в Інтерфейсі для делегацій, а також на 28-денний період розблокування._ + ![Delegation unbonding](/img/Delegation-Unbonding.png) _Зверніть увагу на комісію в розмірі 0,5% в Інтерфейсі для + делегацій, а також на 28-денний період розблокування._
    ### Вибір надійного індексатора зі справедливою винагородою для делегатів @@ -43,7 +44,8 @@ title: Делегування Частина винагороди за індексацію (Indexing Reward Cut) — це частина винагороди, яку індексатор залишає собі. Це означає, що якщо вона встановлена на рівні 100%, то як делегат ви отримаєте 0% за індексацію. Якщо в інтерфейсі ви бачите 80%, це означає, що як делегат ви отримаєте 20%. Важливе зауваження — на початку роботи мережі винагороди за індексацію будуть складати більшу частину доходів.
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Найкращий індексатор віддає делегатам 90% від суми винагороди. Середній - 20%. Найменший індексатор дає ~83%. * + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *Найкращий індексатор віддає делегатам 90% від суми винагороди. + Середній - 20%. Найменший індексатор дає ~83%. *
    - Частина від винагороди за запити — працює точно так само, як і за індексацію. Однак, це стосується саме повернення комісії за запити, яку отримує індексатор. Слід зазначити, що на початку роботи мережі прибуток від комісійних за запити буде дуже малий в порівнянні з винагородою за індексацію. Рекомендується стежити за мережею, щоб визначити, коли комісія за запити в мережі почне бути більш значущою. diff --git a/website/pages/uk/network/indexing.mdx b/website/pages/uk/network/indexing.mdx index 64e07ca91ea6..933e55faa68e 100644 --- a/website/pages/uk/network/indexing.mdx +++ b/website/pages/uk/network/indexing.mdx @@ -113,11 +113,11 @@ Query fees are collected by the gateway and distributed to indexers according to - **Large** - підготовлений для індексації всіх підграфів, що використовуються наразі, і обслуговування запитів на відповідний трафік. | Налаштування | Postgres
    (CPU) | Postgres
    (пам'ять в GB) | Postgres
    (диск у ТБ) | VMs
    (Центральні CPU) | VMs
    (пам'ять у ГБ) | -| ------------ |:-------------------------:|:----------------------------------:|:-------------------------------:|:-------------------------------:|:-----------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### Яких основних заходів безпеки повинен дотримуватися індексатор? @@ -149,26 +149,26 @@ Query fees are collected by the gateway and distributed to indexers according to #### Graph Node -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | -| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | -| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | -| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | -| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| --- | --- | --- | --- | --- | +| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | +| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | +| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | +| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | #### Служба індексації -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | HTTP-сервер GraphQL
    (для платних запитів до підграфів) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| --- | --- | --- | --- | --- | +| 7600 | HTTP-сервер GraphQL
    (для платних запитів до підграфів) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Метрики Prometheus | /metrics | --metrics-port | - | #### Агент індексації -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| ---- | ------------------------------ | ------------ | ------------------------- | --------------------------------------- | -| 8000 | API для керування індексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| --- | --- | --- | --- | --- | +| 8000 | API для керування індексатором | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### Налаштування серверної інфраструктури з використанням Terraform на Google Cloud diff --git a/website/pages/uk/operating-graph-node.mdx b/website/pages/uk/operating-graph-node.mdx index b198c70ca3ed..7bcb6ac9dab6 100644 --- a/website/pages/uk/operating-graph-node.mdx +++ b/website/pages/uk/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | -| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | ------------------ | -| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | -| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | -| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | -| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | +| Порт | Призначення | Розташування | Аргумент CLI | Перемінна оточення | +| --- | --- | --- | --- | --- | +| 8000 | HTTP-сервер GraphQL
    (для запитів до підграфів) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-порт | - | +| 8001 | GraphQL WS
    (для підписок на підграфи) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (для керування розгортаннями) | / | --admin-port | - | +| 8030 | API стану індексації підграфів | /graphql | --index-node-port | - | +| 8040 | Метрики Prometheus | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/uk/querying/graphql-api.mdx b/website/pages/uk/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/uk/querying/graphql-api.mdx +++ b/website/pages/uk/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx b/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/uk/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/ur/chain-integration-overview.mdx b/website/pages/ur/chain-integration-overview.mdx index 6855823bae83..f09de51959b9 100644 --- a/website/pages/ur/chain-integration-overview.mdx +++ b/website/pages/ur/chain-integration-overview.mdx @@ -7,8 +7,7 @@ title: چین انٹیگریشن کے عمل کا جائزہ ## مرحلہ 1. تکنیکی انٹیگریشن - ٹیمیں غیر ای وی ایم پر مبنی چینز کے لیے گراف نوڈ انٹیگریشن اور فائر ہوز پر کام کرتی ہیں۔ [یہ طریقہ ہے](/new-chain-integration/). -- ٹیمیں فورم تھریڈ بنا کر پروٹوکول انٹیگریشن کا عمل شروع کرتی ہیں [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71)(گورننس اور GIPs کے تحت نئے ڈیٹا ذرائع ذیلی زمرہ) - ۔ پہلے سے طے شدہ فورم ٹیمپلیٹ کا استعمال لازمی ہے. +- ٹیمیں فورم تھریڈ بنا کر پروٹوکول انٹیگریشن کا عمل شروع کرتی ہیں [here](https://forum.thegraph.com/c/governance-gips/new-chain-support/71)(گورننس اور GIPs کے تحت نئے ڈیٹا ذرائع ذیلی زمرہ) ۔ پہلے سے طے شدہ فورم ٹیمپلیٹ کا استعمال لازمی ہے. ## مرحلہ 2۔ انٹیگریشن کی توثیق diff --git a/website/pages/ur/cookbook/cosmos.mdx b/website/pages/ur/cookbook/cosmos.mdx index 5880b8348d76..df28c5b1eecf 100644 --- a/website/pages/ur/cookbook/cosmos.mdx +++ b/website/pages/ur/cookbook/cosmos.mdx @@ -165,7 +165,7 @@ class Any { ہر ہینڈلر کی قسم اس کے اپنے ڈیٹا ڈھانچے کے ساتھ آتی ہے جو میپنگ فنکشن کی دلیل کے طور پر پاس کی جاتی ہے. -- بلاک ہینڈلرز کو ` Block ` قسم موصول ہوتی ہے. +- بلاک ہینڈلرز کو `Block` قسم موصول ہوتی ہے. - ایونٹ ہینڈلرز کو `EventData` قسم موصول ہوتی ہے. - ٹرانزیکشن ہینڈلرز کو `TransactionData` قسم موصول ہوتی ہے. - میسج ہینڈلرز کو `MessageData` قسم موصول ہوتی ہے. diff --git a/website/pages/ur/cookbook/near.mdx b/website/pages/ur/cookbook/near.mdx index 875a1ca0f300..5fe26e7fa413 100644 --- a/website/pages/ur/cookbook/near.mdx +++ b/website/pages/ur/cookbook/near.mdx @@ -72,7 +72,7 @@ dataSources: file: ./src/mapping.ts # link to the file with the Assemblyscript mappings ``` -- NEAR سب گراف ڈیٹا ماخذ کا ایک نیا ` kind ` متعارف کراتے ہیں (`near`) +- NEAR سب گراف ڈیٹا ماخذ کا ایک نیا `kind` متعارف کراتے ہیں (`near`) - `network` ہوسٹنگ گراف نوڈ پر موجود نیٹ ورک کے مطابق ہونا چاہیے۔ ہوسٹڈ سروس پر، NEAR کا مین نیٹ `near-mainnet` ہے، اور NEAR کا ٹیسٹ نیٹ ہے `near-testnet` - NEAR ڈیٹا کے ذرائع ایک اختیاری `source.account` فیلڈ متعارف کراتے ہیں، جو کہ ایک [ سے متعلق انسانی پڑھنے کے قابل ID ہے۔ اکاؤنٹ کے قریب](https://docs.near.org/docs/concepts/account)۔ یہ ایک اکاؤنٹ یا سب اکاؤنٹ ہو سکتا ہے. - NEAR ڈیٹا کے ذرائع ایک متبادل اختیاری `source.accounts` فیلڈ متعارف کراتے ہیں، جس میں اختیاری لاحقے اور سابقے ہوتے ہیں۔ کم از کم سابقہ ​​یا لاحقہ متعین ہونا ضروری ہے، وہ بالترتیب اقدار کی فہرست کے ساتھ شروع یا ختم ہونے والے کسی بھی اکاؤنٹ سے مماثل ہوں گے۔ نیچے دی گئی مثال مماثل ہوگی: `[app|good].*[morning.near|morning.testnet]`۔ اگر صرف سابقوں یا لاحقوں کی فہرست ضروری ہو تو دوسری فیلڈ کو چھوڑا جا سکتا ہے. @@ -255,7 +255,7 @@ NEAR سپورٹ بیٹا میں ہے، جس کا مطلب ہے کہ API میں ### کیا رسید ہینڈلرز اکاؤنٹس اور ان کے سب اکاؤنٹس کو متحرک کریں گے؟ -اگر ایک ` account ` متعین کیا گیا ہے، تو وہ صرف صحیح اکاؤنٹ کے نام سے مماثل ہوگا۔ مثال کے طور پر، اکاؤنٹس اور سب اکاؤنٹس سے ملنے کے لیے مخصوص ` prefixes ` اور ` suffixes` کے ساتھ، `accounts` فیلڈ کی وضاحت کرکے سب اکاؤنٹس کو ملانا ممکن ہے۔ درج ذیل تمام `mintbase1.near` سب اکاؤنٹس سے مماثل ہوں گے: +اگر ایک `account` متعین کیا گیا ہے، تو وہ صرف صحیح اکاؤنٹ کے نام سے مماثل ہوگا۔ مثال کے طور پر، اکاؤنٹس اور سب اکاؤنٹس سے ملنے کے لیے مخصوص `prefixes` اور ` suffixes` کے ساتھ، `accounts` فیلڈ کی وضاحت کرکے سب اکاؤنٹس کو ملانا ممکن ہے۔ درج ذیل تمام `mintbase1.near` سب اکاؤنٹس سے مماثل ہوں گے: ```yaml accounts: diff --git a/website/pages/ur/cookbook/subgraph-debug-forking.mdx b/website/pages/ur/cookbook/subgraph-debug-forking.mdx index 0f1fb3a56d32..764a7294c0d6 100644 --- a/website/pages/ur/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/ur/cookbook/subgraph-debug-forking.mdx @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -افوہ، کتنی بدقسمتی کی بات ہے، جب میں اپنے بہترین نظر آنے والے سب گراف کو [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) میں تعینات کرتا ہوں تو یہ *"گراوتار نہیں ملا!"* خرابی. +افوہ، کتنی بدقسمتی کی بات ہے، جب میں اپنے بہترین نظر آنے والے سب گراف کو [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) میں تعینات کرتا ہوں تو یہ _"گراوتار نہیں ملا!"_ خرابی. درست کرنے کی کوشش کرنے کا معمول کا طریقہ یہ ہے: diff --git a/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx index 0e84d4713cbd..e4b3f587760d 100644 --- a/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/ur/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا ## ہوسٹڈ سروس اکاؤنٹ بنائیں -ہوسٹڈ سروس استعمال کرنے سے پہلے، ہماری ہوسٹڈ سروس میں ایک اکاؤنٹ بنائیں۔ اس کے لیے آپ کو ایک [گٹ ہب](https://github.com/) اکاؤنٹ کی ضرورت ہوگی۔ اگر آپ کے پاس نہیں ہے تو آپ کو پہلے اسے بنانے کی ضرورت ہے۔ پھر، [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) پر جائیں، _'گٹ ہب کے ساتھ سائن اپ کریں' پر کلک کریں۔ _بٹن، اور گٹ ہب کی اجازت کے بہاؤ کو مکمل کریں. +ہوسٹڈ سروس استعمال کرنے سے پہلے، ہماری ہوسٹڈ سروس میں ایک اکاؤنٹ بنائیں۔ اس کے لیے آپ کو ایک [گٹ ہب](https://github.com/) اکاؤنٹ کی ضرورت ہوگی۔ اگر آپ کے پاس نہیں ہے تو آپ کو پہلے اسے بنانے کی ضرورت ہے۔ پھر، [ہوسٹڈ سروس](https://thegraph.com/hosted-service/) پر جائیں، *'گٹ ہب کے ساتھ سائن اپ کریں' پر کلک کریں۔ *بٹن، اور گٹ ہب کی اجازت کے بہاؤ کو مکمل کریں. ## ایکسیس ٹوکن سٹور کریں @@ -20,7 +20,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا **تصویر** - سب گراف کے لیے پیش نظارہ تصویر اور تھمب نیل کے طور پر استعمال کرنے کے لیے ایک تصویر منتخب کریں. -**سب گراف کا نام** - اکاؤنٹ کے نام کے ساتھ جس کے تحت سب گراف بنایا گیا ہے، یہ `account-name/subgraph-name`-سٹائل نام کی بھی وضاحت کرے گا جو تعیناتیوں اور گراف کیو ایل اینڈ پوائنٹس کے لیے استعمال ہوتا ہے۔ _اس فیلڈ کو بعد میں تبدیل نہیں کیا جاسکتا۔_ +**سب گراف کا نام** - اکاؤنٹ کے نام کے ساتھ جس کے تحت سب گراف بنایا گیا ہے، یہ `account-name/subgraph-name`-سٹائل نام کی بھی وضاحت کرے گا جو تعیناتیوں اور گراف کیو ایل اینڈ پوائنٹس کے لیے استعمال ہوتا ہے۔ _اس فیلڈ کو بعد میں تبدیل نہیں کیا جاسکتا۔_ **اکاونٹ** - وہ اکاؤنٹ جس کے تحت سب گراف بنایا گیا ہے۔ یہ کسی فرد یا تنظیم کا اکاؤنٹ ہو سکتا ہے۔ _سب گرافس کو بعد میں اکاؤنٹس کے درمیان منتقل نہیں کیا جا سکتا۔_ @@ -48,7 +48,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا اپنے سب گراف کی تعریف میں تبدیلی کرتے وقت، مثال کے طور پر، ہستی میپنگ میں کسی مسئلے کو حل کرنے کے لیے، اپنے سب گراف کے اپ ڈیٹ شدہ ورژن کو تعینات کرنے کے لیے اوپر `yarn deploy` کمانڈ دوبارہ چلائیں۔ سب گراف کی کسی بھی اپڈیٹ کے لیے ضروری ہے کہ گراف نوڈ آپ کے پورے سب گراف کو دوبارہ ترتیب دے، دوبارہ جینیسس بلاک سے شروع ہو. -اگر آپ کا پہلے سے تعینات کردہ سب گراف اب بھی حالت میں ہے ` Syncing `، تو اسے فوری طور پر نئے تعینات کردہ ورژن سے بدل دیا جائے گا۔ اگر پہلے سے تعینات کیا گیا سب گراف پہلے سے ہی مکمل طور پر مطابقت پذیر ہے، تو گراف نوڈ نئے تعینات شدہ ورژن کو ` Pending Version ` کے بطور نشان زد کرے گا، اسے بیک گراؤنڈ میں ہم آہنگ کرے گا، اور ایک بار مطابقت پذیر ہونے کے بعد صرف موجودہ تعینات کردہ ورژن کو نئے سے بدل دے گا۔ نیا ورژن ختم ہو گیا ہے. یہ یقینی بناتا ہے کہ نیا ورژن مطابقت پذیر ہونے کے دوران آپ کے پاس کام کرنے کے لیے ایک سب گراف موجود ہے. +اگر آپ کا پہلے سے تعینات کردہ سب گراف اب بھی حالت میں ہے `Syncing`، تو اسے فوری طور پر نئے تعینات کردہ ورژن سے بدل دیا جائے گا۔ اگر پہلے سے تعینات کیا گیا سب گراف پہلے سے ہی مکمل طور پر مطابقت پذیر ہے، تو گراف نوڈ نئے تعینات شدہ ورژن کو `Pending Version` کے بطور نشان زد کرے گا، اسے بیک گراؤنڈ میں ہم آہنگ کرے گا، اور ایک بار مطابقت پذیر ہونے کے بعد صرف موجودہ تعینات کردہ ورژن کو نئے سے بدل دے گا۔ نیا ورژن ختم ہو گیا ہے. یہ یقینی بناتا ہے کہ نیا ورژن مطابقت پذیر ہونے کے دوران آپ کے پاس کام کرنے کے لیے ایک سب گراف موجود ہے. ## سب گراف کو متعدد نیٹ ورکس پر تعینات کرنا @@ -98,7 +98,7 @@ title: سب گراف کو ہوسٹڈ سروس پر تعینات کرنا } ``` -**نوٹ:** آپ کو تشکیل فائل میں کسی بھی `templates` (اگر آپ کے پاس کوئی ہے) کی وضاحت کرنے کی ضرورت نہیں ہے، صرف ` dataSources `۔ اگر `subgraph.yaml` فائل میں کوئی بھی `templates` کا اعلان کیا گیا ہے، تو ان کا نیٹ ورک خود بخود `--network` اختیار کے ساتھ مخصوص کردہ سے اپ ڈیٹ ہوجائے گا. +**نوٹ:** آپ کو تشکیل فائل میں کسی بھی `templates` (اگر آپ کے پاس کوئی ہے) کی وضاحت کرنے کی ضرورت نہیں ہے، صرف `dataSources`۔ اگر `subgraph.yaml` فائل میں کوئی بھی `templates` کا اعلان کیا گیا ہے، تو ان کا نیٹ ورک خود بخود `--network` اختیار کے ساتھ مخصوص کردہ سے اپ ڈیٹ ہوجائے گا. اب، فرض کریں کہ آپ اپنے سب گراف کو `mainnet` اور `goerli` نیٹ ورکس پر تعینات کرنے کے قابل ہونا چاہتے ہیں، اور یہ آپ کا `subgraph.yaml` ہے: @@ -208,7 +208,7 @@ dataSources: kind: ethereum/events ``` -کسی بھی نیٹ ورک پر مینی فیسٹ بنانے کے لیے، آپ `package.json` میں دو اضافی کمانڈز شامل کر سکتے ہیں اور ساتھ ہی ` mustache ` پر انحصار: +کسی بھی نیٹ ورک پر مینی فیسٹ بنانے کے لیے، آپ `package.json` میں دو اضافی کمانڈز شامل کر سکتے ہیں اور ساتھ ہی `mustache` پر انحصار: ```json { diff --git a/website/pages/ur/developing/creating-a-subgraph.mdx b/website/pages/ur/developing/creating-a-subgraph.mdx index ca124aa9a714..a3659fab075b 100644 --- a/website/pages/ur/developing/creating-a-subgraph.mdx +++ b/website/pages/ur/developing/creating-a-subgraph.mdx @@ -156,7 +156,7 @@ dataSources: - `dataSources.source.endBlock`: بلاک کا اختیاری نمبر جس پر ڈیٹا سورس انڈیکس کرنا روکتا ہے، اس بلاک سمیت۔ کم از کم مخصوص ورژن درکار ہے: `0.0.9`۔ -- `dataSources.context`: کلیدی ویلیو کے جوڑے جو سب گراف میپنگ میں استعمال کیے جاسکتے ہیں۔ مختلف قسم کے ڈیٹا کو سپورٹ کرتا ہے جیسے `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, ` Bytes `، ` List `، اور `BigInt`۔ ہر متغیر کو اپنی ` type ` اور ` data ` کی وضاحت کرنے کی ضرورت ہے۔ یہ سیاق و سباق کے متغیرات پھر میپنگ فائلوں میں قابل رسائی ہوتے ہیں، جو سب گراف کی ترقی کے لیے مزید قابل ترتیب اختیارات پیش کرتے ہیں۔ +- `dataSources.context`: کلیدی ویلیو کے جوڑے جو سب گراف میپنگ میں استعمال کیے جاسکتے ہیں۔ مختلف قسم کے ڈیٹا کو سپورٹ کرتا ہے جیسے `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Bytes`، `List`، اور `BigInt`۔ ہر متغیر کو اپنی `type` اور `data` کی وضاحت کرنے کی ضرورت ہے۔ یہ سیاق و سباق کے متغیرات پھر میپنگ فائلوں میں قابل رسائی ہوتے ہیں، جو سب گراف کی ترقی کے لیے مزید قابل ترتیب اختیارات پیش کرتے ہیں۔ - `dataSources.mapping.entities`: وہ اینٹیٹیز جنہیں ڈیٹا سورس اسٹور کو لکھتا ہے۔ schema.graphql فائل میں ہر اینٹیٹی کے لیے اسکیما کی وضاحت کی گئی ہے. @@ -248,15 +248,15 @@ type GravatarDeclined @entity { ہم اپنے GraphQL API میں درج ذیل اسکیلرز کی حمایت کرتے ہیں: -| قسم | تفصیل | -| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Bytes` | Byte array، ایک ہیکساڈیسیمل سٹرنگ کے طور پر پیش کیا جاتا ہے. عام طور پر Ethereum hashes اور ایڈریسیس کے لیے استعمال ہوتا ہے. | -| `String` | `string` ویلیوز کے لیے اسکیلر. خالی حروف تعاون یافتہ نہیں ہیں اور خود بخود ہٹا دیے جاتے ہیں. | -| `Boolean` | `Boolean` ویلیوز کے لیے اسکیلر. | -| `Int` | GraphQL spec `Int` کی وضاحت کرتا ہے جس کا سائز 32 bytes ہے. | -| `Int8` | ایک 8-بائٹ دستخط شدہ عدد، جسے 64-بٹ دستخط شدہ عدد بھی کہا جاتا ہے، -9,223,372,036,854,775,808 سے لے کر 9,223,372,036,854,775,807 تک کی ویلیوز کو ذخیرہ کرسکتا ہے۔ ایتھیریم سے `i64` کی نمائندگی کرنے کے لیے اسے استعمال کرنے کو ترجیح دیں۔ | -| `BigInt` | بڑے integers۔ Ethereum کی `uint32`، `int64`، `uint64`، ..., `uint256` اقسام کے لیے استعمال کیا جاتا ہے. نوٹ: `uint32` کے نیچے ہر چیز، جیسے `int32`، `uint24` یا `int8` کو `i32` کے طور پر دکھایا گیا ہے. | -| `BigDecimal` | `BigDecimal` اعلی درستگی والے اعشاریہ ایک significand اور ایک exponent کے طور پر پیش کیا جاتے ہہیں. Exponent رینج −6143 سے +6144 تک ہے۔ 34 سگنیفیکینڈ ہندسوں پر rounded کیا گیا۔. | +| قسم | تفصیل | +| --- | --- | +| `Bytes` | Byte array، ایک ہیکساڈیسیمل سٹرنگ کے طور پر پیش کیا جاتا ہے. عام طور پر Ethereum hashes اور ایڈریسیس کے لیے استعمال ہوتا ہے. | +| `String` | `string` ویلیوز کے لیے اسکیلر. خالی حروف تعاون یافتہ نہیں ہیں اور خود بخود ہٹا دیے جاتے ہیں. | +| `Boolean` | `Boolean` ویلیوز کے لیے اسکیلر. | +| `Int` | GraphQL spec `Int` کی وضاحت کرتا ہے جس کا سائز 32 bytes ہے. | +| `Int8` | ایک 8-بائٹ دستخط شدہ عدد، جسے 64-بٹ دستخط شدہ عدد بھی کہا جاتا ہے، -9,223,372,036,854,775,808 سے لے کر 9,223,372,036,854,775,807 تک کی ویلیوز کو ذخیرہ کرسکتا ہے۔ ایتھیریم سے `i64` کی نمائندگی کرنے کے لیے اسے استعمال کرنے کو ترجیح دیں۔ | +| `BigInt` | بڑے integers۔ Ethereum کی `uint32`، `int64`، `uint64`، ..., `uint256` اقسام کے لیے استعمال کیا جاتا ہے. نوٹ: `uint32` کے نیچے ہر چیز، جیسے `int32`، `uint24` یا `int8` کو `i32` کے طور پر دکھایا گیا ہے. | +| `BigDecimal` | `BigDecimal` اعلی درستگی والے اعشاریہ ایک significand اور ایک exponent کے طور پر پیش کیا جاتے ہہیں. Exponent رینج −6143 سے +6144 تک ہے۔ 34 سگنیفیکینڈ ہندسوں پر rounded کیا گیا۔. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **نوٹ:** ایک نیا ڈیٹا سورس صرف اس بلاک کے لیے کالز اور ایونٹس پر کارروائی کرے گا جس میں اسے بنایا گیا تھا اور تمام مندرجہ ذیل بلاکس، لیکن تاریخی ڈیٹا، یعنی ڈیٹا پر کارروائی نہیں کرے گا جو پہلے سے بلاکس میں موجود ہے. -> +> > اگر پہلے والے بلاکس میں نئے ڈیٹا سورس سے متعلقہ ڈیٹا ہوتا ہے، تو یہ بہترین ہے کہ کنٹریکٹ کی موجودہ حالت کو پڑھ کر اور ڈیٹا کا نیا سورس بننے کے وقت اس سٹیٹ کی نمائندگی کرنے والی اینٹیٹیز بنا کر اس ڈیٹا کو انڈیکس کریں. ### ڈیٹا سورس سیاق و سباق @@ -716,7 +716,7 @@ dataSources: ``` > **نوٹ:** کنٹریکٹ تخلیق والے بلاک کو ایتھر سکین پر تیزی سے دیکھا جا سکتا ہے: -> +> > 1. سرچ بار میں اس کا ایڈریس درج کرکے کنٹریکٹ کو تلاش کریں. > 2. `Contract Creator` سیکشن میں تخلیق ٹرانزیکشن ہیش پر کلک کریں. > 3. ٹرانزیکشن کی تفصیلات کا صفحہ لوڈ کریں جہاں آپ کو اس کنٹریکٹ کے لیے اسٹارٹ بلاک ملے گا. diff --git a/website/pages/ur/developing/graph-ts/api.mdx b/website/pages/ur/developing/graph-ts/api.mdx index b03a3dea1dda..9a1ddc26b5dd 100644 --- a/website/pages/ur/developing/graph-ts/api.mdx +++ b/website/pages/ur/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| ورزن | جاری کردہ نوٹس | -| :---: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| ورزن | جاری کردہ نوٹس | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | | 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### بلٹ ان اقسام @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### تبادلوں کا حوالہ ٹائپ کریں -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### ڈیٹا ماخذ میٹا ڈیٹا diff --git a/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx b/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx index 979d460d6b6a..8cd83ceef138 100644 --- a/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx +++ b/website/pages/ur/developing/substreams-powered-subgraphs-faq.mdx @@ -44,8 +44,7 @@ Developed by [StreamingFast](https://www.streamingfast.io/), Substreams is an ex [StreamingFast](https://www.streamingfast.io/) کے ذریعے تیار کردہ، Firehose ایک بلاکچین ڈیٹا نکالنے کی پرت ہے جسے شروع سے بلاکچینز کی مکمل تاریخ کو اس رفتار سے پروسیس کرنے کے لیے ڈیزائن کیا گیا ہے جو پہلے نظر نہیں آتی تھیں۔ فائلوں پر مبنی اور سٹریمنگ فرسٹ اپروچ فراہم کرنا، یہ سٹریمنگ فاسٹ کے اوپن سورس ٹیکنالوجیز کے سوٹ کا بنیادی جزو اور سب اسٹریمز کی بنیاد ہے. -Firehose کے بارے میں مزید جاننے کے لیے[documentation] -(https://firehose.streamingfast.io/) پر جائیں. +Firehose کے بارے میں مزید جاننے کے لیے[documentation] (https://firehose.streamingfast.io/) پر جائیں. ## Firehose کے کیا فوائد ہیں؟ diff --git a/website/pages/ur/developing/unit-testing-framework.mdx b/website/pages/ur/developing/unit-testing-framework.mdx index c0d6ab8ea200..2f7372190bac 100644 --- a/website/pages/ur/developing/unit-testing-framework.mdx +++ b/website/pages/ur/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). اس کا مطلب ہے کہ آپ نے اپنے کوڈ میں `console.log` استعمال کیا ہے، جو اسمبلی اسکرپٹ سے تعاون یافتہ نہیں ہے۔ براہ کرم [لاگنگ API](/developing/assemblyscript-api/#logging-api) استعمال کرنے پر غور کریں > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) دلائل میں عدم مماثلت `graph-ts` اور `matchstick-as` میں عدم مماثلت کی وجہ سے ہوتی ہے۔ اس طرح کے مسائل کو حل کرنے کا بہترین طریقہ یہ ہے کہ ہر چیز کو تازہ ترین جاری کردہ ورژن میں اپ ڈیٹ کیا جائے. diff --git a/website/pages/ur/network/benefits.mdx b/website/pages/ur/network/benefits.mdx index f11155bd5c5a..dd0d9d2b3f80 100644 --- a/website/pages/ur/network/benefits.mdx +++ b/website/pages/ur/network/benefits.mdx @@ -27,53 +27,54 @@ socialImage: https://thegraph.com/docs/img/seo/benefits.jpg ## کم والیوم صارف (فی مہینہ 30,000 سے کم سوالات) -| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | -|:----------------------------:|:---------------------------------------:|:-------------------------------------------------------------------------------:| -| ماہانہ سرور کی قیمت/* | $350 فی مہینہ | $0 | -| استفسار کے اخراجات | $0+ | ~$15 فی مہینہ | -| انجینئرنگ کا وقت | $400 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000 (آٹو اسکیلنگ) | -| قیمت فی سوال | $0 | $0.0005 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| جغرافیائی فالتو پن | $750+ فی اضافی نوڈ | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $750+ | ~$15 | +| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | +| :-: | :-: | :-: | +| ماہانہ سرور کی قیمت/\* | $350 فی مہینہ | $0 | +| استفسار کے اخراجات | $0+ | ~$15 فی مہینہ | +| انجینئرنگ کا وقت | $400 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000 (آٹو اسکیلنگ) | +| قیمت فی سوال | $0 | $0.0005 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| جغرافیائی فالتو پن | $750+ فی اضافی نوڈ | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $750+ | ~$15 | ## درمیانے حجم کا صارف (3,000,000+ سوالات فی مہینہ) -| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | -|:----------------------------:|:------------------------------------------:|:-------------------------------------------------------------------------------:| -| ماہانہ سرور کی قیمت/* | $350 فی مہینہ | $0 | -| استفسار کے اخراجات | $500 فی مہینہ | $750 فی مہینہ | -| انجینئرنگ کا وقت | $800 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 3,000,000+ | -| قیمت فی سوال | $0 | $0.00025 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| انجینئرنگ کے اخراجات | $200 فی گھنٹہ | شامل | -| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $1,650+ | $750 | +| اخراجات کا موازنہ | خود میزبان | گراف نیٹ ورک | +| :-: | :-: | :-: | +| ماہانہ سرور کی قیمت/\* | $350 فی مہینہ | $0 | +| استفسار کے اخراجات | $500 فی مہینہ | $750 فی مہینہ | +| انجینئرنگ کا وقت | $800 فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 3,000,000+ | +| قیمت فی سوال | $0 | $0.00025 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| انجینئرنگ کے اخراجات | $200 فی گھنٹہ | شامل | +| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $1,650+ | $750 | ## زیادہ حجم والا صارف (30,000,000+ سوالات فی مہینہ) -| اخراجات کا موازنہ | سیلف ہوسٹڈ | گراف نیٹ ورک | -|:----------------------------:|:-------------------------------------------:|:-------------------------------------------------------------------------------:| -| ماہانہ سرور کی قیمت/* | $1100 فی مہینہ، فی نوڈ | $0 | -| استفسار کے اخراجات | $4000 | $4,500 فی مہینہ | -| نوڈس کی تعداد درکار ہے | 10 | قابل اطلاق نہیں | -| انجینئرنگ کا وقت | $6,000 یا اس سے زیادہ فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | -| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000,000+ | -| قیمت فی سوال | $0 | $0.00015 | -| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | -| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | -| اپ ٹائم | اتار چڑھاو | 99.9%+ | -| کل ماہانہ اخراجات | $11,000+ | $4,500 | - -/*بیک اپ کے اخراجات سمیت: $50-$100 فی مہینہ +| اخراجات کا موازنہ | سیلف ہوسٹڈ | گراف نیٹ ورک | +| :-: | :-: | :-: | +| ماہانہ سرور کی قیمت/\* | $1100 فی مہینہ، فی نوڈ | $0 | +| استفسار کے اخراجات | $4000 | $4,500 فی مہینہ | +| نوڈس کی تعداد درکار ہے | 10 | قابل اطلاق نہیں | +| انجینئرنگ کا وقت | $6,000 یا اس سے زیادہ فی مہینہ | کوئی بھی نہیں، عالمی سطح پر تقسیم شدہ انڈیکسرز کے ساتھ نیٹ ورک میں بنایا گیا ہے | +| فی مہینہ سوالات | بنیادی صلاحیتوں تک محدود | 30,000,000+ | +| قیمت فی سوال | $0 | $0.00015 | +| بنیادی ڈھانچہ | سینٹرلائزڈ | ڈیسینٹرلائزڈ | +| جغرافیائی فالتو پن | فی اضافی نوڈ کل اخراجات میں $1,200 | شامل | +| اپ ٹائم | اتار چڑھاو | 99.9%+ | +| کل ماہانہ اخراجات | $11,000+ | $4,500 | + +/\*بیک اپ کے اخراجات سمیت: $50-$100 فی مہینہ $200 فی گھنٹہ کے مفروضے کی بنیاد پر انجینئرنگ کا وقت -بجٹ بلنگ ٹیب میں زیادہ سے زیادہ کیوری بجٹ فنکشن کا استعمال کرتے ہوئے، سروس کے اعلی معیار کو برقرار رکھتے ہوئے +بجٹ بلنگ ٹیب میں زیادہ سے زیادہ کیوری بجٹ فنکشن کا استعمال کرتے ہوئے، سروس کے اعلی معیار کو برقرار رکھتے +ہوئے تخمینی لاگتیں صرف ایتھیریم مینیٹ سب گراف کے لیے ہیں — دوسرے نیٹ ورکس پر `graph-node` کی خود ہوسٹڈ کرنے پر اخراجات اس سے بھی زیادہ ہوتے ہیں. diff --git a/website/pages/ur/network/delegating.mdx b/website/pages/ur/network/delegating.mdx index a9df7189a9ae..2e274a6d8aab 100644 --- a/website/pages/ur/network/delegating.mdx +++ b/website/pages/ur/network/delegating.mdx @@ -33,8 +33,8 @@ title: ڈیلیگیٹنگ غور کرنے کی ایک چیز یہ ہے کہ انڈیکسر کا انتخاب دانشمندی سے کریں۔اگر آپ انڈیکسر کا انتخاب کرتے ہیں جو قابل اعتماد نہیں تھا،یا اچھا کام نہیں کر رہا،آپ غیر منتخب کرنا چاہیں گے،جس کا مطلب ہے آپ انعامات حاصل کرنے کے بہت سے مواقع کھو رہے ہوں گے،جو GRT کو جلانے جیسا ہی برا ہو سکتا ہے.
    - [ڈیلیگیشن ان بانڈنگ](/img/Delegation-Unbonding.png) _ڈیلیگیشن UI میں 0.5% فیس نوٹ کریں، ساتھ ہی 28 دن - غیر بندھن کی مدت۔_ + [ڈیلیگیشن ان بانڈنگ](/img/Delegation-Unbonding.png) _ڈیلیگیشن UI میں 0.5% فیس نوٹ کریں، ساتھ ہی 28 دن غیر بندھن کی + مدت۔_
    ### ڈیلیگیٹرز کے لیے منصفانہ انعامی ادائیگی کے ساتھ ایک قابل اعتماد انڈیکسر کا انتخاب کرنا @@ -44,7 +44,8 @@ title: ڈیلیگیٹنگ انڈیکسنگ ریوارڈ کٹ - انڈیکسنگ ریوارڈ کٹ انعامات کا وہ حصہ ہے جو انڈیکسر اپنے لیے رکھے گا۔ اس کا مطلب ہے کہ اگر یہ 100% پر سیٹ ہے، بطور ڈیلیگیٹر آپ کو 0 انڈیکسنگ کےانعامات ملیں گے۔ اگر آپ UI میں 80٪ دیکھتے ہیں،اس کا مطلب ہے کہ بطور ڈیلیگیٹر، آپ کو 20% ملے گا۔ ایک اہم نوٹ - نیٹ ورک کے آغاز میں، انڈیکسنگ انعامات کی اکثریت کا حصہ ہوں گے.
    - ![انڈیکسنگ ریوارڈ کٹ](/img/Indexing-Reward-Cut.png) *سب سے اوپر انڈیکسر ڈیلیگیٹرز کو 90% انعامات دے رہا ہے. درمیان والا ڈیلیگیٹرز کو 20% دے رہا ہے۔ نیچے والا ڈیلیگیٹرز کو ~83% دے رہا ہے۔* + ![انڈیکسنگ ریوارڈ کٹ](/img/Indexing-Reward-Cut.png) *سب سے اوپر انڈیکسر ڈیلیگیٹرز کو 90% انعامات دے رہا ہے. درمیان + والا ڈیلیگیٹرز کو 20% دے رہا ہے۔ نیچے والا ڈیلیگیٹرز کو ~83% دے رہا ہے۔*
    - کیوری فیس کٹوتی - یہ بلکل انڈیکسنگ ریوارڈ کٹ کی طرح کام کرتا ہے. البتہ، یہ خاص طور پر انڈیکسر جمع کردہ کیوری کی فیس پر واپسی کے لیے ہے۔ واضح رہے کہ نیٹ ورک کے آغاز پر، کیوری فیس سے واپسی انڈیکسنگ کے انعامات کے مقابلے میں بہت کم ہوگی۔ اس بات کا تعین کرنے کے لیے نیٹ ورک پر توجہ دینے کی سفارش کی جاتی ہے کہ نیٹ ورک میں کیوری کی فیس کب زیادہ اہم ہونا شروع ہو گی. diff --git a/website/pages/ur/network/indexing.mdx b/website/pages/ur/network/indexing.mdx index 52062b9b6584..6b396ceccca7 100644 --- a/website/pages/ur/network/indexing.mdx +++ b/website/pages/ur/network/indexing.mdx @@ -112,12 +112,12 @@ query indexerAllocations { - **درمیانہ** - پروڈکشن انڈیکسر 100 سب گراف اور 200-500 درخواستیں فی سیکنڈ کو اٹھا سکتا ہے. - **بڑا** - تمام فی الحال زیر استعمال سب گرافس کو انڈیکس کرنے اور متعلقہ ٹریفک کے لیے درخواستیں پیش کرنے کے لیے تیار ہے. -| سیٹ اپ | Postgres
    (CPUs) | Postgres
    (GBs میں میموری) | Postgres
    (TBs میں ڈسک) | VMs
    (CPUs) | VMs
    (GBs میں میموری) | -| ------- |:--------------------------:|:------------------------------------:|:---------------------------------:|:---------------------:|:-------------------------------:| -| چھوٹا | 4 | 8 | 1 | 4 | 16 | -| معیاری | 8 | 30 | 1 | 12 | 48 | -| درمیانہ | 16 | 64 | 2 | 32 | 64 | -| بڑا | 72 | 468 | 3.5 | 48 | 184 | +| سیٹ اپ | Postgres
    (CPUs) | Postgres
    (GBs میں میموری) | Postgres
    (TBs میں ڈسک) | VMs
    (CPUs) | VMs
    (GBs میں میموری) | +| --- | :-: | :-: | :-: | :-: | :-: | +| چھوٹا | 4 | 8 | 1 | 4 | 16 | +| معیاری | 8 | 30 | 1 | 12 | 48 | +| درمیانہ | 16 | 64 | 2 | 32 | 64 | +| بڑا | 72 | 468 | 3.5 | 48 | 184 | ### وہ کون سی چند بنیادی حفاظتی تدابیر ہیں جو ایک انڈیکسر کو اختیار کرنی چاہیے؟ @@ -149,20 +149,20 @@ query indexerAllocations { #### گراف نوڈ -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | -| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | -| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | +| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | +| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | #### انڈیکسر سروس -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (ادا شدہ سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (ادا شدہ سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus میٹرکس | /metrics | --metrics-port | - | #### انڈیکسر ایجنٹ diff --git a/website/pages/ur/new-chain-integration.mdx b/website/pages/ur/new-chain-integration.mdx index 1f431f9239f6..b1a142fb672a 100644 --- a/website/pages/ur/new-chain-integration.mdx +++ b/website/pages/ur/new-chain-integration.mdx @@ -27,7 +27,7 @@ title: نئے نیٹ ورکس کو انٹیگریٹ کرنا نئے EVM چین انٹیگریٹرز سب سٹریمز کے فوائد اور اس کے بڑے پیمانے پر متوازی انڈیکسنگ کی صلاحیتوں کو دیکھتے ہوئے، Firehose پر مبنی نقطہ نظر پر بھی غور کر سکتے ہیں۔ دونوں کو سپورٹ کرنے سے ڈویلپرز کو نئی چین کے لیے سب سٹریمز کی تعمیر یا سب گراف کے درمیان انتخاب کرنے کی اجازت ملتی ہے۔ -> **نوٹ**: EVM چینز کے لیے فائر ہوز پر مبنی انٹیگریشن کے لیے اب بھی انڈیکسرز کو چین کے آرکائیو RPC نوڈ کو صحیح طریقے سے سب گرافس کو انڈیکس کرنے کے لیے چلانے کی ضرورت ہوگی۔ یہ فائر ہوز کی سمارٹ کنٹریکٹ سٹیٹ فراہم کرنے میں ناکامی کی وجہ سے ہے جو عام طور پر `eth_call` RPC طریقہ سے قابل رسائی ہے۔ (یہ یاد دلانے کے قابل ہے کہ ایتھ\_کالز [ڈویلپرز کے لیے اچھا عمل نہیں ہے](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) +> **نوٹ**: EVM چینز کے لیے فائر ہوز پر مبنی انٹیگریشن کے لیے اب بھی انڈیکسرز کو چین کے آرکائیو RPC نوڈ کو صحیح طریقے سے سب گرافس کو انڈیکس کرنے کے لیے چلانے کی ضرورت ہوگی۔ یہ فائر ہوز کی سمارٹ کنٹریکٹ سٹیٹ فراہم کرنے میں ناکامی کی وجہ سے ہے جو عام طور پر `eth_call` RPC طریقہ سے قابل رسائی ہے۔ (یہ یاد دلانے کے قابل ہے کہ ایتھ_کالز [ڈویلپرز کے لیے اچھا عمل نہیں ہے](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)) --- diff --git a/website/pages/ur/operating-graph-node.mdx b/website/pages/ur/operating-graph-node.mdx index a5434224e20b..ef22e83ab99b 100644 --- a/website/pages/ur/operating-graph-node.mdx +++ b/website/pages/ur/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ جب یہ چل رہا ہوتا ہے گراف نوڈ مندرجہ ذیل پورٹس کو بے نقاب کرتا ہے: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | --------------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | -| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | -| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (سب گراف کی کیوریز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (سب گراف سبسکرپشنز کے لیے) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (تعیناتیوں کے انتظام کے لیے) | / | --admin-port | - | +| 8030 | سب گراف انڈیکسنگ اسٹیٹس API | /graphql | --index-node-port | - | +| 8040 | Prometheus میٹرکس | /metrics | --metrics-port | - | > **اہم**: پورٹس کو عوامی طور پر ظاہر کرنے میں محتاط رہیں - **انتظامی پورٹس** کو بند رکھا جانا چاہیے. اس میں گراف نوڈ کا JSON-RPC اینڈ پوائنٹ شامل ہے. diff --git a/website/pages/ur/querying/graphql-api.mdx b/website/pages/ur/querying/graphql-api.mdx index 0be6aaa6db53..47147daa2b13 100644 --- a/website/pages/ur/querying/graphql-api.mdx +++ b/website/pages/ur/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { ``` > **Syntactic شوگر:** آپ `and` آپریٹر کو ہٹا کر کوما سے الگ کردہ سب اظہار کو پاس کر کے مذکورہ کیوری کو آسان بنا سکتے ہیں. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) فل ٹیکسٹ سرچ آپریٹرز: -| علامت | آپریٹر | تفصیل | -| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | ایک سے زیادہ تلاش کی اصطلاحات کو ایک فلٹر میں یکجا کرنے کے لیے ان ہستیوں کے لیے جس میں فراہم کردہ تمام اصطلاحات شامل ہوں | -| | | `Or` | Or آپریٹر کے ذریعہ الگ کردہ متعدد تلاش کی اصطلاحات کے ساتھ کیوریز فراہم کردہ شرائط میں سے کسی سے بھی مماثلت کے ساتھ تمام ہستیوں کو واپس کریں گے | -| `<>` | `Follow by` | دو الفاظ کے درمیان فاصلہ بتائیں. | -| `:*` | `Prefix` | ایسے الفاظ تلاش کرنے کے لیے پریفکس ​​تلاش کی اصطلاح استعمال کریں جن کا سابقہ ​​مماثل ہو (۲ حروف درکار ہیں.) | +| علامت | آپریٹر | تفصیل | +| --- | --- | --- | +| `&` | `And` | ایک سے زیادہ تلاش کی اصطلاحات کو ایک فلٹر میں یکجا کرنے کے لیے ان ہستیوں کے لیے جس میں فراہم کردہ تمام اصطلاحات شامل ہوں | +| | | `Or` | Or آپریٹر کے ذریعہ الگ کردہ متعدد تلاش کی اصطلاحات کے ساتھ کیوریز فراہم کردہ شرائط میں سے کسی سے بھی مماثلت کے ساتھ تمام ہستیوں کو واپس کریں گے | +| `<>` | `Follow by` | دو الفاظ کے درمیان فاصلہ بتائیں. | +| `:*` | `Prefix` | ایسے الفاظ تلاش کرنے کے لیے پریفکس ​​تلاش کی اصطلاح استعمال کریں جن کا سابقہ ​​مماثل ہو (۲ حروف درکار ہیں.) | #### مثالیں @@ -408,7 +408,7 @@ GraphQL اسکیمے عام طور پر `queries`، `subscriptions` اور `muta اگر کوئی بلاک فراہم کیا جاتا ہے تو، میٹا ڈیٹا اس بلاک کا ہوتا ہے، اگر تازہ ترین انڈیکسڈ بلاک استعمال نہیں کیا جاتا ہے۔ اگر فراہم کیا گیا ہو، تو بلاک سب گراف کے اسٹارٹ بلاک کے بعد ہونا چاہیے، اور حال ہی میں انڈیکس کیے گئے بلاک سے کم یا اس کے برابر ہونا چاہیے. -` deployment ` ایک منفرد ID ہے، جو `subgraph.yaml` فائل کے IPFS CID سے مطابقت رکھتی ہے. +`deployment` ایک منفرد ID ہے، جو `subgraph.yaml` فائل کے IPFS CID سے مطابقت رکھتی ہے. `block` تازہ ترین بلاک کے بارے میں معلومات فراہم کرتا ہے (`_meta` کو بھیجی گئی کسی بھی بلاک کی رکاوٹوں کو مدنظر رکھتے ہوئے): diff --git a/website/pages/ur/querying/querying-best-practices.mdx b/website/pages/ur/querying/querying-best-practices.mdx index ec6adef80199..144a23d1f309 100644 --- a/website/pages/ur/querying/querying-best-practices.mdx +++ b/website/pages/ur/querying/querying-best-practices.mdx @@ -55,8 +55,8 @@ query [operationName]([variableName]: [variableType]) { اگرچہ نحوی کرنے اور نہ کرنے کی فہرست طویل ہے، لیکن GraphQL کی کیوریز لکھنے کی بات کرتے وقت ذہن میں رکھنے کے لیے ضروری اصول یہ ہیں: - ہر ایک `queryName` کو فی آپریشن صرف ایک بار استعمال کیا جانا چاہیے. -- ہر ایک ` field ` کو انتخاب میں صرف ایک بار استعمال کیا جانا چاہیے (ہم `token` کے تحت دو بار `id` سے کیوری نہیں کرسکتے ہیں) -- کچھ ` field ` یا کیوریز (جیسے `tokens`) پیچیدہ قسمیں واپس کرتے ہیں جن کے لیے سب فیلڈ کے انتخاب کی ضرورت ہوتی ہے۔ توقع کے وقت انتخاب فراہم نہ کرنا (یا توقع نہ ہونے پر انتخاب فراہم کرنا - مثال کے طور پر، `id` پر) ایک خرابی پیدا کرے گا۔ فیلڈ کی قسم جاننے کے لیے، براہ کرم [گراف ایکسپلورر](/network/explorer) سے رجوع کریں. +- ہر ایک `field` کو انتخاب میں صرف ایک بار استعمال کیا جانا چاہیے (ہم `token` کے تحت دو بار `id` سے کیوری نہیں کرسکتے ہیں) +- کچھ `field` یا کیوریز (جیسے `tokens`) پیچیدہ قسمیں واپس کرتے ہیں جن کے لیے سب فیلڈ کے انتخاب کی ضرورت ہوتی ہے۔ توقع کے وقت انتخاب فراہم نہ کرنا (یا توقع نہ ہونے پر انتخاب فراہم کرنا - مثال کے طور پر، `id` پر) ایک خرابی پیدا کرے گا۔ فیلڈ کی قسم جاننے کے لیے، براہ کرم [گراف ایکسپلورر](/network/explorer) سے رجوع کریں. - کسی دلیل کو تفویض کردہ کوئی بھی متغیر اس کی قسم سے مماثل ہونا چاہیے. - متغیرات کی دی گئی فہرست میں، ان میں سے ہر ایک منفرد ہونا چاہیے. - تمام متعین متغیرات کو استعمال کیا جانا چاہیے. @@ -166,7 +166,7 @@ const result = await execute(query, { **نوٹ: جامد کیوریز میں فیلڈز کو مشروط طور پر کیسے شامل کیا جائے** -ہم صرف ایک خاص شرط پر ` owner ` فیلڈ کو شامل کرنا چاہتے ہیں. +ہم صرف ایک خاص شرط پر `owner` فیلڈ کو شامل کرنا چاہتے ہیں. اس کے لیے، ہم ذیل میں `@include(if:...)` ہدایت کا فائدہ اٹھا سکتے ہیں: diff --git a/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx b/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx index 9c8d0512a4eb..31439d43c505 100644 --- a/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/ur/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + اگر آپ کے پاس متغیر شیڈونگ ہے تو آپ کو اپنے ڈپلیکیٹ متغیرات کا نام تبدیل کرنے کی ضرورت ہوگی. + ### کالعدم موازنہ + اپنے سب گراف پر اپ گریڈ کرنے سے، بعض اوقات آپ کو اس طرح کی غلطیاں مل سکتی ہیں: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + حل کرنے کے لیے آپ صرف `if` اسٹیٹمنٹ کو اس طرح تبدیل کر سکتے ہیں: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + اس مسئلے کو حل کرنے کے لیے، آپ اس پراپرٹی تک رسائی کے لیے ایک متغیر بنا سکتے ہیں تاکہ مرتب کرنے والا منسوخی چیک میجک کر سکے: ```typescript diff --git a/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx b/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx index fb46d352b6b9..15d7aa4cf114 100644 --- a/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx +++ b/website/pages/ur/release-notes/graphql-validations-migration-guide.mdx @@ -4,8 +4,7 @@ title: GraphQL کی توثیق کی منتقلی گائیڈ جلد ہی `گراف نوڈ` [GraphQL توثیق کی تفصیلات](https://spec.graphql.org/June2018/#sec-Validation) کی 100% کوریج کو سپورٹ کرے گا. -`گراف نوڈ` کے پچھلے ورژن تمام توثیقوں کی حمایت نہیں کرتے تھے اور زیادہ خوبصورت جوابات فراہم کرتے تھے - لہذا، ابہام کی صورت میں، `گراف نوڈ` غلط گراف کیو ایل - آپریشن کے اجزاء کو نظر انداز کر رہا تھا. +`گراف نوڈ` کے پچھلے ورژن تمام توثیقوں کی حمایت نہیں کرتے تھے اور زیادہ خوبصورت جوابات فراہم کرتے تھے - لہذا، ابہام کی صورت میں، `گراف نوڈ` غلط گراف کیو ایل آپریشن کے اجزاء کو نظر انداز کر رہا تھا. GraphQL ویلیڈیشن سپورٹ آنے والی نئی خصوصیات اور گراف نیٹ ورک کے پیمانے پر کارکردگی کا ایک ستون ہے. diff --git a/website/pages/ur/sunrise.mdx b/website/pages/ur/sunrise.mdx index 2e91006ecc52..85be6e9eefd4 100644 --- a/website/pages/ur/sunrise.mdx +++ b/website/pages/ur/sunrise.mdx @@ -12,9 +12,7 @@ title: ڈیسینٹرالائزڈ ڈیٹا کے سن رائز کے اکثر پو ### ڈیسینٹرالائزڈ ڈیٹا کے سن رائز ہونے کے مراحل کیا ہیں؟ -**سن رے**: ہوسٹڈ سروس چینز کے لیے سپورٹ کو فعال کریں، بغیر کسی رکاوٹ کے اپ گریڈ فلو کی پیشکش کریں، گراف نیٹ ورک پر مفت پلان پیش کریں۔ -**سن بیم**: اپ گریڈ ونڈو جس میں سب گراف ڈویلپرز کو اپنے سب گرافس کو گراف نیٹ ورک میں اپ گریڈ کرنا ہوگا۔ اس کے آغاز اور طوالت کا جلد اعلان کیا جائے گا۔ -**سن رائز**: ہوسٹڈ سروس اینڈ پوائنٹس کی میعاد ختم ہو جائے گی کیونکہ ٹریفک گراف نیٹ ورک پر منتقل ہو جائے گی. +**سن رے**: ہوسٹڈ سروس چینز کے لیے سپورٹ کو فعال کریں، بغیر کسی رکاوٹ کے اپ گریڈ فلو کی پیشکش کریں، گراف نیٹ ورک پر مفت پلان پیش کریں۔ **سن بیم**: اپ گریڈ ونڈو جس میں سب گراف ڈویلپرز کو اپنے سب گرافس کو گراف نیٹ ورک میں اپ گریڈ کرنا ہوگا۔ اس کے آغاز اور طوالت کا جلد اعلان کیا جائے گا۔ **سن رائز**: ہوسٹڈ سروس اینڈ پوائنٹس کی میعاد ختم ہو جائے گی کیونکہ ٹریفک گراف نیٹ ورک پر منتقل ہو جائے گی. ### کیا مجھے اپنا انفراسٹرکچر چلانے کی ضرورت ہے؟ diff --git a/website/pages/vi/developing/creating-a-subgraph.mdx b/website/pages/vi/developing/creating-a-subgraph.mdx index 9e9c276d60e4..dbab1be03c36 100644 --- a/website/pages/vi/developing/creating-a-subgraph.mdx +++ b/website/pages/vi/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Loại | Miêu tả | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Mảng byte, được biểu diễn dưới dạng chuỗi thập lục phân. Thường được sử dụng cho các mã băm và địa chỉ Ethereum. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Loại | Miêu tả | +| --- | --- | +| `Bytes` | Mảng byte, được biểu diễn dưới dạng chuỗi thập lục phân. Thường được sử dụng cho các mã băm và địa chỉ Ethereum. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Lưu ý:** Nguồn dữ liệu mới sẽ chỉ xử lý các lệnh gọi và sự kiện cho khối mà nó được tạo và tất cả các khối tiếp theo, nhưng sẽ không xử lý dữ liệu lịch sử, tức là dữ liệu được chứa trong các khối trước đó. -> +> > Nếu các khối trước đó chứa dữ liệu có liên quan đến nguồn dữ liệu mới, tốt nhất là lập chỉ mục dữ liệu đó bằng cách đọc trạng thái hiện tại của hợp đồng và tạo các thực thể đại diện cho trạng thái đó tại thời điểm nguồn dữ liệu mới được tạo. ### Bối cảnh Nguồn Dữ liệu @@ -716,7 +716,7 @@ dataSources: ``` > **Lưu ý:** Khối tạo hợp đồng có thể được nhanh chóng tra cứu trên Etherscan: -> +> > 1. Tìm kiếm hợp đồng bằng cách nhập địa chỉ của nó vào thanh tìm kiếm. > 2. Nhấp vào băm giao dịch tạo trong phần `Contract Creator`. > 3. Tải trang chi tiết giao dịch nơi bạn sẽ tìm thấy khối bắt đầu cho hợp đồng đó. diff --git a/website/pages/vi/developing/graph-ts/api.mdx b/website/pages/vi/developing/graph-ts/api.mdx index 85610543f920..1469f236a9a2 100644 --- a/website/pages/vi/developing/graph-ts/api.mdx +++ b/website/pages/vi/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Phiên bản | Ghi chú phát hành | -| :-------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Phiên bản | Ghi chú phát hành | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Các loại cài sẵn @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Tham chiếu Chuyển đổi Loại -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Siêu Dữ liệu Nguồn Dữ liệu diff --git a/website/pages/vi/developing/unit-testing-framework.mdx b/website/pages/vi/developing/unit-testing-framework.mdx index b67edbb28b97..e0a3390bbb25 100644 --- a/website/pages/vi/developing/unit-testing-framework.mdx +++ b/website/pages/vi/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/vi/network/benefits.mdx b/website/pages/vi/network/benefits.mdx index c27a5f37f9f6..b2fa328ed82f 100644 --- a/website/pages/vi/network/benefits.mdx +++ b/website/pages/vi/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Cơ sở hạ tầng | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Cơ sở hạ tầng | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/vi/network/indexing.mdx b/website/pages/vi/network/indexing.mdx index cbff1daedbc3..8365be2856b1 100644 --- a/website/pages/vi/network/indexing.mdx +++ b/website/pages/vi/network/indexing.mdx @@ -112,12 +112,12 @@ Indexer có thể tự phân biệt bản thân bằng cách áp dụng các k - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Lớn** - Được chuẩn bị để index tất cả các subgraph hiện đang được sử dụng và phục vụ các yêu cầu cho lưu lượng truy cập liên quan. -| Cài đặt | Postgres
    (CPUs) | Postgres
    (bộ nhớ tính bằng GB) | Postgres
    (đĩa tính bằng TB) | VMs
    (CPUs) | VMs
    (bộ nhớ tính bằng GB) | -| ----------- |:--------------------------:|:-----------------------------------------:|:--------------------------------------:|:---------------------:|:------------------------------------:| -| Nhỏ | 4 | 8 | 1 | 4 | 16 | -| Tiêu chuẩn | 8 | 30 | 1 | 12 | 48 | -| Trung bình | 16 | 64 | 2 | 32 | 64 | -| Lớn | 72 | 468 | 3.5 | 48 | 184 | +| Cài đặt | Postgres
    (CPUs) | Postgres
    (bộ nhớ tính bằng GB) | Postgres
    (đĩa tính bằng TB) | VMs
    (CPUs) | VMs
    (bộ nhớ tính bằng GB) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Nhỏ | 4 | 8 | 1 | 4 | 16 | +| Tiêu chuẩn | 8 | 30 | 1 | 12 | 48 | +| Trung bình | 16 | 64 | 2 | 32 | 64 | +| Lớn | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Lưu ý: Để hỗ trợ mở rộng quy mô nhanh, bạn nên tách các mối #### Graph Node -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | -| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | -| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | -| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| --- | --- | --- | --- | --- | +| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | +| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | +| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | #### Dịch vụ Indexer -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| ---- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph có trả phí) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| --- | --- | --- | --- | --- | +| 7600 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph có trả phí) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Số liệu Prometheus | /metrics | --metrics-port | - | #### Đại lý Indexer diff --git a/website/pages/vi/operating-graph-node.mdx b/website/pages/vi/operating-graph-node.mdx index a600e22c0a05..7112da586680 100644 --- a/website/pages/vi/operating-graph-node.mdx +++ b/website/pages/vi/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | -| ---- | ----------------------------------------------------------- | ---------------------------------------------------- | ----------------- | --------------- | -| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | -| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | -| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | +| Cổng | Mục đích | Tuyến | Đối số CLI | Biến môi trường | +| --- | --- | --- | --- | --- | +| 8000 | Máy chủ GraphQL HTTP
    (cho các truy vấn subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (cho các đăng ký subgraph) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (để quản lý triển khai) | / | --admin-port | - | +| 8030 | API trạng thái lập chỉ mục Subgraph | /graphql | --index-node-port | - | +| 8040 | Số liệu Prometheus | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/vi/querying/graphql-api.mdx b/website/pages/vi/querying/graphql-api.mdx index 4acdfc3e2c56..d15b7659d204 100644 --- a/website/pages/vi/querying/graphql-api.mdx +++ b/website/pages/vi/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Biểu tượng | Toán tử | Miêu tả | -| ----------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `&` | `And` | Để kết hợp nhiều cụm từ tìm kiếm thành một bộ lọc cho các thực thể bao gồm tất cả các cụm từ được cung cấp | -| | | `Or` | Các truy vấn có nhiều cụm từ tìm kiếm được phân tách bằng toán tử hoặc sẽ trả về tất cả các thực thể có kết quả khớp với bất kỳ cụm từ nào được cung cấp | -| `<->` | `Follow by` | Chỉ định khoảng cách giữa hai từ. | -| `:*` | `Prefix` | Sử dụng cụm từ tìm kiếm tiền tố để tìm các từ có tiền tố khớp với nhau (yêu cầu 2 ký tự.) | +| Biểu tượng | Toán tử | Miêu tả | +| --- | --- | --- | +| `&` | `And` | Để kết hợp nhiều cụm từ tìm kiếm thành một bộ lọc cho các thực thể bao gồm tất cả các cụm từ được cung cấp | +| | | `Or` | Các truy vấn có nhiều cụm từ tìm kiếm được phân tách bằng toán tử hoặc sẽ trả về tất cả các thực thể có kết quả khớp với bất kỳ cụm từ nào được cung cấp | +| `<->` | `Follow by` | Chỉ định khoảng cách giữa hai từ. | +| `:*` | `Prefix` | Sử dụng cụm từ tìm kiếm tiền tố để tìm các từ có tiền tố khớp với nhau (yêu cầu 2 ký tự.) | #### Examples diff --git a/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx b/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx index 8536b657e78a..69c36218d8af 100644 --- a/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/vi/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + Bạn sẽ cần đổi tên các biến trùng lặp của mình nếu bạn có che biến. + ### So sánh Null + Bằng cách thực hiện nâng cấp trên subgraph của bạn, đôi khi bạn có thể gặp các lỗi như sau: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + Để giải quyết, bạn có thể chỉ cần thay đổi câu lệnh `if` thành một cái gì đó như sau: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + Để khắc phục sự cố này, bạn có thể tạo một biến cho quyền truy cập thuộc tính đó để trình biên dịch có thể thực hiện phép thuật kiểm tra tính nullability: ```typescript diff --git a/website/pages/yo/arbitrum/arbitrum-faq.mdx b/website/pages/yo/arbitrum/arbitrum-faq.mdx index 7c0e94324e40..61eaabee08aa 100644 --- a/website/pages/yo/arbitrum/arbitrum-faq.mdx +++ b/website/pages/yo/arbitrum/arbitrum-faq.mdx @@ -45,8 +45,7 @@ Jọwọ ṣe iranlọwọ [ṣe idanwo netiwọki](https://testnet.thegraph.com ## Ṣe awọn ewu eyikeyi wa ni nkan ṣe pẹlu iwọn nẹtiwọọki si L2? -Gbogbo awọn adehun ọlọgbọn ti jẹ daradara -[ayewo pipe](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). +Gbogbo awọn adehun ọlọgbọn ti jẹ daradara [ayewo pipe](https://github.com/graphprotocol/contracts/blob/dev/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf). Ohùn gbogbo tí ní ìdánwò dáradára, àti pé èrò airotẹlẹ kàn wá ní ayé láti ríi dájú wípé ìyípadà ailewu àti ailẹgbẹ. Àwọn àlàyé lè ṣé rí [níbi yìí](https://forum.thegraph.com/t/gip-0037-the-graph-arbitrum-deployment-with-linear-rewards-minted-in-l2/3551#risks-and-security-considerations-20). diff --git a/website/pages/yo/developing/creating-a-subgraph.mdx b/website/pages/yo/developing/creating-a-subgraph.mdx index db9e8a024571..39f58ac2083b 100644 --- a/website/pages/yo/developing/creating-a-subgraph.mdx +++ b/website/pages/yo/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ For some entity types the `id` is constructed from the id's of two other entitie We support the following scalars in our GraphQL API: -| Type | Description | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | -| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | -| `Boolean` | Scalar for `boolean` values. | -| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | -| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | -| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | +| Type | Description | +| --- | --- | +| `Bytes` | Byte array, represented as a hexadecimal string. Commonly used for Ethereum hashes and addresses. | +| `String` | Scalar for `string` values. Null characters are not supported and are automatically removed. | +| `Boolean` | Scalar for `boolean` values. | +| `Int` | The GraphQL spec defines `Int` to have a size of 32 bytes. | +| `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` | Large integers. Used for Ethereum's `uint32`, `int64`, `uint64`, ..., `uint256` types. Note: Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. | +| `BigDecimal` | `BigDecimal` High precision decimals represented as a significand and an exponent. The exponent range is from −6143 to +6144. Rounded to 34 significant digits. | #### Enums @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **Note:** A new data source will only process the calls and events for the block in which it was created and all following blocks, but will not process historical data, i.e., data that is contained in prior blocks. -> +> > If prior blocks contain data relevant to the new data source, it is best to index that data by reading the current state of the contract and creating entities representing that state at the time the new data source is created. ### Data Source Context @@ -716,7 +716,7 @@ dataSources: ``` > **Note:** The contract creation block can be quickly looked up on Etherscan: -> +> > 1. Search for the contract by entering its address in the search bar. > 2. Click on the creation transaction hash in the `Contract Creator` section. > 3. Load the transaction details page where you'll find the start block for that contract. diff --git a/website/pages/yo/developing/graph-ts/api.mdx b/website/pages/yo/developing/graph-ts/api.mdx index ab5e2b27b49e..9fc543d4ab6b 100644 --- a/website/pages/yo/developing/graph-ts/api.mdx +++ b/website/pages/yo/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ The `@graphprotocol/graph-ts` library provides the following APIs: The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. -| Version | Release notes | -| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | +| Version | Release notes | +| :-: | --- | +| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | +| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | +| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | +| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | +| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | +| 0.0.2 | Added `input` field to the Ethereum Transaction object | ### Built-in Types @@ -734,44 +734,44 @@ When the type of a value is certain, it can be converted to a [built-in type](#b ### Type Conversions Reference -| Source(s) | Destination | Conversion function | -| --------------------------------------- | --------------------------------------- | ------------------------------------------------------------------ | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| Source(s) | Destination | Conversion function | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toI64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### Data Source Metadata diff --git a/website/pages/yo/developing/unit-testing-framework.mdx b/website/pages/yo/developing/unit-testing-framework.mdx index 19a1ab73477e..8ffc66465e3a 100644 --- a/website/pages/yo/developing/unit-testing-framework.mdx +++ b/website/pages/yo/developing/unit-testing-framework.mdx @@ -1081,15 +1081,15 @@ The log output includes the test run duration. Here's an example: This means you have used `console.log` in your code, which is not supported by AssemblyScript. Please consider using the [Logging API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > return new ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version. diff --git a/website/pages/yo/network/benefits.mdx b/website/pages/yo/network/benefits.mdx index 09c0548bfc4f..864672b16515 100644 --- a/website/pages/yo/network/benefits.mdx +++ b/website/pages/yo/network/benefits.mdx @@ -27,47 +27,47 @@ Query costs may vary; the quoted cost is the average at time of publication (Dec ## Low Volume User (less than 30,000 queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:---------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $0+ | ~$15 per month | -| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | -| Cost per query | $0 | $0.0005 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $750+ per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $750+ | ~$15 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $0+ | ~$15 per month | +| Engineering time | $400 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000 (autoscaling) | +| Cost per query | $0 | $0.0005 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $750+ per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $750+ | ~$15 | ## Medium Volume User (3,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $350 per month | $0 | -| Query costs | $500 per month | $750 per month | -| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 3,000,000+ | -| Cost per query | $0 | $0.00025 | -| Infrastructure | Centralized | Decentralized | -| Engineering expense | $200 per hour | Included | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $1,650+ | $750 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $350 per month | $0 | +| Query costs | $500 per month | $750 per month | +| Engineering time | $800 per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 3,000,000+ | +| Cost per query | $0 | $0.00025 | +| Infrastructure | Centralized | Decentralized | +| Engineering expense | $200 per hour | Included | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $1,650+ | $750 | ## High Volume User (30,000,000+ queries per month) -| Cost Comparison | Self Hosted | Graph Network | -|:----------------------------:|:-------------------------------------------:|:---------------------------------------------------------------:| -| Monthly server cost\* | $1100 per month, per node | $0 | -| Query costs | $4000 | $4,500 per month | -| Number of nodes needed | 10 | Not applicable | -| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | -| Queries per month | Limited to infra capabilities | 30,000,000+ | -| Cost per query | $0 | $0.00015 | -| Infrastructure | Centralized | Decentralized | -| Geographic redundancy | $1,200 in total costs per additional node | Included | -| Uptime | Varies | 99.9%+ | -| Total Monthly Costs | $11,000+ | $4,500 | +| Cost Comparison | Self Hosted | Graph Network | +| :-: | :-: | :-: | +| Monthly server cost\* | $1100 per month, per node | $0 | +| Query costs | $4000 | $4,500 per month | +| Number of nodes needed | 10 | Not applicable | +| Engineering time | $6,000 or more per month | None, built into the network with globally distributed Indexers | +| Queries per month | Limited to infra capabilities | 30,000,000+ | +| Cost per query | $0 | $0.00015 | +| Infrastructure | Centralized | Decentralized | +| Geographic redundancy | $1,200 in total costs per additional node | Included | +| Uptime | Varies | 99.9%+ | +| Total Monthly Costs | $11,000+ | $4,500 | \*including costs for backup: $50-$100 per month diff --git a/website/pages/yo/network/indexing.mdx b/website/pages/yo/network/indexing.mdx index 842a5c8e0c74..9bdc2fb2eb7e 100644 --- a/website/pages/yo/network/indexing.mdx +++ b/website/pages/yo/network/indexing.mdx @@ -112,12 +112,12 @@ Indexers may differentiate themselves by applying advanced techniques for making - **Medium** - Production Indexer supporting 100 subgraphs and 200-500 requests per second. - **Large** - Prepared to index all currently used subgraphs and serve requests for the related traffic. -| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | -| -------- |:--------------------------:|:-----------------------------------:|:---------------------------------:|:---------------------:|:------------------------------:| -| Small | 4 | 8 | 1 | 4 | 16 | -| Standard | 8 | 30 | 1 | 12 | 48 | -| Medium | 16 | 64 | 2 | 32 | 64 | -| Large | 72 | 468 | 3.5 | 48 | 184 | +| Setup | Postgres
    (CPUs) | Postgres
    (memory in GBs) | Postgres
    (disk in TBs) | VMs
    (CPUs) | VMs
    (memory in GBs) | +| --- | :-: | :-: | :-: | :-: | :-: | +| Small | 4 | 8 | 1 | 4 | 16 | +| Standard | 8 | 30 | 1 | 12 | 48 | +| Medium | 16 | 64 | 2 | 32 | 64 | +| Large | 72 | 468 | 3.5 | 48 | 184 | ### What are some basic security precautions an Indexer should take? @@ -149,20 +149,20 @@ Note: To support agile scaling, it is recommended that query and indexing concer #### Graph Node -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Service -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP server
    (for paid subgraph queries) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus metrics | /metrics | --metrics-port | - | #### Indexer Agent diff --git a/website/pages/yo/operating-graph-node.mdx b/website/pages/yo/operating-graph-node.mdx index a7dd15e7a84c..4f0f856db111 100644 --- a/website/pages/yo/operating-graph-node.mdx +++ b/website/pages/yo/operating-graph-node.mdx @@ -77,13 +77,13 @@ A complete Kubernetes example configuration can be found in the [indexer reposit When it is running Graph Node exposes the following ports: -| Port | Purpose | Routes | CLI Argument | Environment Variable | -| ---- | ----------------------------------------------------- | ---------------------------------------------------- | ----------------- | -------------------- | -| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | -| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | -| 8040 | Prometheus metrics | /metrics | --metrics-port | - | +| Port | Purpose | Routes | CLI Argument | Environment Variable | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP server
    (for subgraph queries) | /subgraphs/id/...
    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (for subgraph subscriptions) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (for managing deployments) | / | --admin-port | - | +| 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | +| 8040 | Prometheus metrics | /metrics | --metrics-port | - | > **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. diff --git a/website/pages/yo/querying/graphql-api.mdx b/website/pages/yo/querying/graphql-api.mdx index 33bdce152375..89cda460d58f 100644 --- a/website/pages/yo/querying/graphql-api.mdx +++ b/website/pages/yo/querying/graphql-api.mdx @@ -208,7 +208,7 @@ In the following example, we are filtering for challenges with `outcome` `succee ``` > **Syntactic sugar:** You can simplify the above query by removing the `and` operator by passing a sub-expression separated by commas. -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ Fulltext search queries have one required field, `text`, for supplying search te Fulltext search operators: -| Symbol | Operator | Description | -| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | -| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | -| `<->` | `Follow by` | Specify the distance between two words. | -| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | +| Symbol | Operator | Description | +| --- | --- | --- | +| `&` | `And` | For combining multiple search terms into a filter for entities that include all of the provided terms | +| | | `Or` | Queries with multiple search terms separated by the or operator will return all entities with a match from any of the provided terms | +| `<->` | `Follow by` | Specify the distance between two words. | +| `:*` | `Prefix` | Use the prefix search term to find words whose prefix match (2 characters required.) | #### Examples diff --git a/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx b/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx index 17224699570d..85f6903a6c69 100644 --- a/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/yo/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + You'll need to rename your duplicate variables if you had variable shadowing. + ### Null Comparisons + By doing the upgrade on your subgraph, sometimes you might get errors like these: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + To solve you can simply change the `if` statement to something like this: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + To fix this issue, you can create a variable for that property access so that the compiler can do the nullability check magic: ```typescript diff --git a/website/pages/zh/cookbook/subgraph-debug-forking.mdx b/website/pages/zh/cookbook/subgraph-debug-forking.mdx index efcc65b2e0d4..9df8b35a7650 100644 --- a/website/pages/zh/cookbook/subgraph-debug-forking.mdx +++ b/website/pages/zh/cookbook/subgraph-debug-forking.mdx @@ -6,13 +6,13 @@ title: 使用分叉快速轻松地调试子图 ## 首先,让我们来看什么是子图分叉 -**子图分叉** 是从_另一个_ 子图的存储(通常是远程存储)中缓慢获取实体的过程。 +**子图分叉** 是从*另一个* 子图的存储(通常是远程存储)中缓慢获取实体的过程。 在调试时,**subgraph forking** 允许您在固定的区块 _X_ 中调试失败的子图,而无需等待区块同步 _X_。 ## 让我们看看这是如何做到的? -当您将子图部署到远程 Graph 节点进行索引而它在区块 _X_上失败时,好消息是Graph 节点仍能以同步至区块 _X_的数据响应GraphQL 查询。这意味着我们可以基于区块 _X_ 最新的数据来修复索引时出现的错误。 +当您将子图部署到远程 Graph 节点进行索引而它在区块 *X*上失败时,好消息是Graph 节点仍能以同步至区块 *X*的数据响应GraphQL 查询。这意味着我们可以基于区块 _X_ 最新的数据来修复索引时出现的错误。 简而言之,我们将从远程 Graph 节点 _分叉失败的子图_,保证子图索引更新至区块 *X*的数据, 以便基于更新至区块 _X_ 的数据在本地部署的子图进行调试,以反映索引数据的最新状态。 @@ -44,7 +44,7 @@ export function handleUpdatedGravatar(event: UpdatedGravatar): void { } ``` -糟糕,不幸的是,当我将完美的子图部署到 [托管服务](https://thegraph.com/hosted-service/) 时,它会报_“未找到 Gravatar!”_ 的错误。 +糟糕,不幸的是,当我将完美的子图部署到 [托管服务](https://thegraph.com/hosted-service/) 时,它会报*“未找到 Gravatar!”* 的错误。 尝试修复的常用方法是: diff --git a/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx index 48a779ee5571..ba8ae0f97b38 100644 --- a/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx +++ b/website/pages/zh/deploying/deploying-a-subgraph-to-hosted.mdx @@ -8,7 +8,7 @@ title: 将子图部署到托管服务上 ## 创建托管服务账户 -在使用托管服务之前,在我们的托管服务中创建一个账户。您将需要一个 [Github 账户](https://github.com/); 如果您没有账户,则需要首先创建该账户。然后,导航到 [托管服务](https://thegraph.com/hosted-service/),单击_“ 注册Github”_按钮,完成 Github 的授权流程。 +在使用托管服务之前,在我们的托管服务中创建一个账户。您将需要一个 [Github 账户](https://github.com/); 如果您没有账户,则需要首先创建该账户。然后,导航到 [托管服务](https://thegraph.com/hosted-service/),单击*“ 注册Github”*按钮,完成 Github 的授权流程。 ## 存储访问令牌 @@ -42,7 +42,7 @@ title: 将子图部署到托管服务上 部署子图后,Graph浏览器将切换到显示子图的同步状态。根据需要从历史区块中提取的数据量和事件数量,从genesis区块开始,同步可能需要几分钟到几个小时。 -一旦Graph节点从历史区块中提取了所有数据,子图状态就会切换到` Synced `。在挖掘这些区块时,Graph节点将继续检查子图的区块。 +一旦Graph节点从历史区块中提取了所有数据,子图状态就会切换到`Synced`。在挖掘这些区块时,Graph节点将继续检查子图的区块。 ## 重新部署子图 diff --git a/website/pages/zh/developing/creating-a-subgraph.mdx b/website/pages/zh/developing/creating-a-subgraph.mdx index 4b422cf814e9..261219b482d3 100644 --- a/website/pages/zh/developing/creating-a-subgraph.mdx +++ b/website/pages/zh/developing/creating-a-subgraph.mdx @@ -248,15 +248,15 @@ Null value resolved for non-null field 'name' 我们在 GraphQL API 中支持以下标量: -| 类型 | 描述 | -| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `字节` | 字节数组,表示为十六进制字符串。 通常用于以太坊hash和地址。 | -| `字符串` | `string` 值的标量。 不支持空字符,并会自动进行删除。 | -| `Boolean` | `boolean` 值的标量。 | -| `Int` | GraphQL 规范将 `Int` 定义为 32 字节的大小。 | -| `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` | 大整数。 用于以太坊的 `uint32`、`int64`、`uint64`、...、`uint256` 类型。 注意:`uint32`以下的所有类型,例如`int32`、`uint24`或`int8`都表示为`i32`。 | -| `BigDecimal` | `BigDecimal` 表示为有效数字和指数的高精度小数。 指数范围是 -6143 到 +6144。 四舍五入到 34 位有效数字。 | +| 类型 | 描述 | +| --- | --- | +| `字节` | 字节数组,表示为十六进制字符串。 通常用于以太坊hash和地址。 | +| `字符串` | `string` 值的标量。 不支持空字符,并会自动进行删除。 | +| `Boolean` | `boolean` 值的标量。 | +| `Int` | GraphQL 规范将 `Int` 定义为 32 字节的大小。 | +| `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` | 大整数。 用于以太坊的 `uint32`、`int64`、`uint64`、...、`uint256` 类型。 注意:`uint32`以下的所有类型,例如`int32`、`uint24`或`int8`都表示为`i32`。 | +| `BigDecimal` | `BigDecimal` 表示为有效数字和指数的高精度小数。 指数范围是 -6143 到 +6144。 四舍五入到 34 位有效数字。 | #### 枚举类型 @@ -458,33 +458,33 @@ query { 支持的语言词典: -| 代码 | 词典 | -| ------ | ----- | -| simple | 通用 | -| da | 丹麦语 | -| nl | 荷兰语 | -| en | 英语 | -| fi | 芬兰语 | -| fr | 法语 | -| de | 德语 | -| hu | 匈牙利语 | -| it | 意大利语 | -| no | 挪威语 | -| pt | 葡萄牙语 | +| 代码 | 词典 | +| ------ | ---------- | +| simple | 通用 | +| da | 丹麦语 | +| nl | 荷兰语 | +| en | 英语 | +| fi | 芬兰语 | +| fr | 法语 | +| de | 德语 | +| hu | 匈牙利语 | +| it | 意大利语 | +| no | 挪威语 | +| pt | 葡萄牙语 | | ro | 罗马尼亚语 | -| ru | 俄语 | -| es | 西班牙语 | -| sv | 瑞典语 | -| tr | 土耳其语 | +| ru | 俄语 | +| es | 西班牙语 | +| sv | 瑞典语 | +| tr | 土耳其语 | ### 排序算法 支持的排序结果算法: -| 算法 | 描述 | -| ------------- | -------------------------- | +| 算法 | 描述 | +| ------------- | --------------------------------------------- | | rank | 使用全文查询的匹配质量 (0-1) 对结果进行排序。 | -| proximityRank | 与 rank 类似,但也包括匹配的接近程度。 | +| proximityRank | 与 rank 类似,但也包括匹配的接近程度。 | ## 编写映射 @@ -659,7 +659,7 @@ export function handleNewExchange(event: NewExchange): void { ``` > **注意:** 新的数据源只会处理创建它的区块和所有后续区块的调用和事件,而不会处理历史数据,也就是包含在先前区块中的数据。 -> +> > 如果先前的区块包含与新数据源相关的数据,最好通过读取合约的当前状态,并在创建新数据源时创建表示该状态的实体来索引该数据。 ### 数据源背景 @@ -716,7 +716,7 @@ dataSources: ``` > **注意:** 合约创建区块可以在 Etherscan 上快速查找: -> +> > 1. 通过在搜索栏中输入合约地址来搜索合约。 > 2. 单击 `Contract Creator` 部分中的创建交易hash。 > 3. 加载交易详情页面,您将在其中找到该合约的起始区块。 @@ -906,11 +906,11 @@ eventHandlers: 从 `specVersion` `0.0.4` 开始,子图特征必须使用它们的 `camelCase` 名称,在清单文件顶层的 `features` 部分中显式声明,如下表所列: -| 特征 | 名称 | -| --------------------------- | --------------------------------------------------- | -| [非致命错误](#非致命错误) | `nonFatalErrors` | -| [全文搜索](#定义全文搜索字段) | `fullTextSearch` | -| [嫁接](#嫁接到现有子图) | `grafting` | +| 特征 | 名称 | +| ----------------------------------------- | --------------------------------------------------- | +| [非致命错误](#非致命错误) | `nonFatalErrors` | +| [全文搜索](#定义全文搜索字段) | `fullTextSearch` | +| [嫁接](#嫁接到现有子图) | `grafting` | | [以太坊合约上的IPFS](#以太坊合约上的IPFS) | `ipfsOnEthereumContracts` or `nonDeterministicIpfs` | 例如,如果子图使用 **Full-Text Search** 和 **Non-fatal Errors** 功能,则清单中的 `features` 字段应为: @@ -990,7 +990,7 @@ _meta { > **注意:** 在初次升级到The Graph Network时,不建议使用grafting。可以在[这里](/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network)了解更多信息。 -首次部署子图时,它会在相应链的启动区块(或每个数据源定义的 `startBlock` 处)开始索引事件。在某些情况下,可以使用现有子图已经索引的数据并在更晚的区块上开始索引。 这种索引模式称为_Grafting_。 例如,嫁接在开发过程中非常有用,可以快速克服映射中的简单错误,或者在现有子图失败后暂时恢复工作。 +首次部署子图时,它会在相应链的启动区块(或每个数据源定义的 `startBlock` 处)开始索引事件。在某些情况下,可以使用现有子图已经索引的数据并在更晚的区块上开始索引。 这种索引模式称为*Grafting*。 例如,嫁接在开发过程中非常有用,可以快速克服映射中的简单错误,或者在现有子图失败后暂时恢复工作。 当 `subgraph.yaml` 中的子图清单在顶层包含 `graft` 区块时,子图被嫁接到基础子图: @@ -1163,7 +1163,7 @@ For Arweave, as of version 0.33.0 Graph Node can fetch files stored on Arweave b ```typescript import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates' -const ipfshash = "QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm" +const ipfshash = 'QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm' //This example code is for a Crypto coven subgraph. The above ipfs hash is a directory with token metadata for all crypto coven NFTs. export function handleTransfer(event: TransferEvent): void { diff --git a/website/pages/zh/developing/graph-ts/api.mdx b/website/pages/zh/developing/graph-ts/api.mdx index 8acdaea60b1d..c492fc65d087 100644 --- a/website/pages/zh/developing/graph-ts/api.mdx +++ b/website/pages/zh/developing/graph-ts/api.mdx @@ -27,14 +27,14 @@ title: AssemblyScript API 子图清单中的 `apiVersion` 指定了由 Graph Node 运行的特定子图的映射 API 版本。 -| 版本 | Release 说明 | -| :---: | ------------------------------------------------------------------------------------------------------------------------------------- | -| 0.0.7 | 添加了 `TransactionReceipt` 和 `Log` 类到以太坊类型。
    已将 `receipt` 字段添加到Ethereum Event对象。 | -| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加
    baseFeePerGas字段 | +| 版本 | Release 说明 | +| :-: | --- | +| 0.0.7 | 添加了 `TransactionReceipt` 和 `Log` 类到以太坊类型。
    已将 `receipt` 字段添加到Ethereum Event对象。 | +| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加
    baseFeePerGas字段 | | 0.0.5 | AssemblyScript 升级到版本 0.19.10(这包括重大更改,参阅
    迁移指南)ethereum.transaction.gasUsed 重命名为 ethereum.transaction.gasLimit | -| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 | -| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。
    `etherem.call.address` 被重命名为 `ethereum.call.to`。 | -| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 | +| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 | +| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。
    `etherem.call.address` 被重命名为 `ethereum.call.to`。 | +| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 | ### 内置类型 @@ -733,44 +733,44 @@ if (value.kind == JSONValueKind.BOOL) { ### 类型转换参考 -| 源类型 | 目标类型 | 转换函数 | -| --------------------------------------- | --------------------------------------- | ----------------------------------------------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() 或 s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toU64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | +| 源类型 | 目标类型 | 转换函数 | +| -------------------- | -------------------- | ---------------------------- | +| Address | Bytes | none | +| Address | String | s.toHexString() | +| BigDecimal | String | s.toString() | +| BigInt | BigDecimal | s.toBigDecimal() | +| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | +| BigInt | String (unicode) | s.toString() | +| BigInt | i32 | s.toI32() | +| Boolean | Boolean | none | +| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | +| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | +| Bytes | String (hexadecimal) | s.toHexString() 或 s.toHex() | +| Bytes | String (unicode) | s.toString() | +| Bytes | String (base58) | s.toBase58() | +| Bytes | i32 | s.toI32() | +| Bytes | u32 | s.toU32() | +| Bytes | JSON | json.fromBytes(s) | +| int8 | i32 | none | +| int32 | i32 | none | +| int32 | BigInt | BigInt.fromI32(s) | +| uint24 | i32 | none | +| int64 - int256 | BigInt | none | +| uint32 - uint256 | BigInt | none | +| JSON | boolean | s.toBool() | +| JSON | i64 | s.toU64() | +| JSON | u64 | s.toU64() | +| JSON | f64 | s.toF64() | +| JSON | BigInt | s.toBigInt() | +| JSON | string | s.toString() | +| JSON | Array | s.toArray() | +| JSON | Object | s.toObject() | +| String | Address | Address.fromString(s) | +| Bytes | Address | Address.fromBytes(s) | +| String | BigInt | BigInt.fromString(s) | +| String | BigDecimal | BigDecimal.fromString(s) | +| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | +| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | ### 数据源元数据 diff --git a/website/pages/zh/developing/unit-testing-framework.mdx b/website/pages/zh/developing/unit-testing-framework.mdx index f62996008c36..4af36839c168 100644 --- a/website/pages/zh/developing/unit-testing-framework.mdx +++ b/website/pages/zh/developing/unit-testing-framework.mdx @@ -24,7 +24,7 @@ Postgres 安装命令: brew install postgresql ``` -创建到最新 libpq.5. lib_ 的符号链接,可能需要首先创建这个目录_`/usr/local/opt/postgreql/lib/` +创建到最新 libpq.5. lib* 的符号链接,可能需要首先创建这个目录*`/usr/local/opt/postgreql/lib/` ```sh ln -sf /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib /usr/local/opt/postgresql/lib/libpq.5.dylib @@ -225,7 +225,7 @@ test("handleNewGravatar() should create a new entity", () => { 例子: -`beforeAll`中的代码将在文件中的_all_测试之前执行一次。 +`beforeAll`中的代码将在文件中的*all*测试之前执行一次。 ```typescript import { describe, test, beforeAll } from "matchstick-as/assembly/index" @@ -285,7 +285,7 @@ describe("handleUpdatedGravatar()", () => { 例子: -`afterAll`中的代码将在文件中的_all_测试之后执行一次。 +`afterAll`中的代码将在文件中的*all*测试之后执行一次。 ```typescript import { describe, test, afterAll } from "matchstick-as/assembly/index" @@ -1081,15 +1081,15 @@ Global test coverage: 22.2% (2/9 handlers). 这意味着您在代码中使用了`console.log`,而AssemblyScript不支持此选项。请考虑使用[日志API](/developing/assemblyscript-api/#logging-api) > ERROR TS2554: Expected ? arguments, but got ?. -> +> > 返回ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(18,12) -> +> > ERROR TS2554: Expected ? arguments, but got ?. -> +> > 返回新ethereum.Transaction(defaultAddressBytes, defaultBigInt, defaultAddress, defaultAddress, defaultBigInt, defaultBigInt, defaultBigInt, defaultAddressBytes, defaultBigInt); -> +> > in ~lib/matchstick-as/assembly/defaults.ts(24,12) 参数不匹配是由`graph-ts` and `matchstick-as`不匹配造成的。解决此类问题的最佳方法是将所有内容更新到最新发布的版本。 diff --git a/website/pages/zh/managing/deprecating-a-subgraph.mdx b/website/pages/zh/managing/deprecating-a-subgraph.mdx index 375761f56bcd..ed9e25949fc9 100644 --- a/website/pages/zh/managing/deprecating-a-subgraph.mdx +++ b/website/pages/zh/managing/deprecating-a-subgraph.mdx @@ -5,7 +5,7 @@ title: 弃用子图 如果您想在 Graph浏览器上弃用您的子图,您来对地方了! 请按照以下步骤操作: 1. 在[这里](https://etherscan.io/address/0xadca0dd4729c8ba3acf3e99f3a9f471ef37b6825#writeProxyContract)访问合约地址。 -2. 使用`SubgraphID`作为参数调用` deprecateSubgraph `。 +2. 使用`SubgraphID`作为参数调用`deprecateSubgraph`。 3. 瞧! 您的子图将不再显示在Graph浏览器上的搜索中。 请注意以下事项: diff --git a/website/pages/zh/network/benefits.mdx b/website/pages/zh/network/benefits.mdx index a6e203c5894b..1d1b32f131db 100644 --- a/website/pages/zh/network/benefits.mdx +++ b/website/pages/zh/network/benefits.mdx @@ -27,49 +27,49 @@ Graph的去中心化网络经过精心设计和完善,创造了强大的索引 ## 低容量用户(每月少于30,000次查询) -| 成本比较 | 自托管 | Graph网络 | -|:----------------:|:---------------------------------------:|:---------------------:| -| 每月服务器费用 \* | 每月350美元 | 0美元 | -| 查询成本 | $0+ | ~15美元每月 | -| 工程时间 | 400美元每月 | 没有,内置在具有全球去中心化索引者的网络中 | -| 每月查询 | 受限于基础设施能力 | 30,000(自动扩缩) | -| 每个查询的成本 | 0美元 | $0.0005 | -| 基础设施 | 中心化 | 去中心化 | -| 异地备援 | 每个额外节点 $750 + | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | $750+ | ~$15 | +| 成本比较 | 自托管 | Graph网络 | +| :------------------: | :-------------------------------------: | :----------------------------------------: | +| 每月服务器费用 \* | 每月350美元 | 0美元 | +| 查询成本 | $0+ | ~15美元每月 | +| 工程时间 | 400美元每月 | 没有,内置在具有全球去中心化索引者的网络中 | +| 每月查询 | 受限于基础设施能力 | 30,000(自动扩缩) | +| 每个查询的成本 | 0美元 | $0.0005 | +| 基础设施 | 中心化 | 去中心化 | +| 异地备援 | 每个额外节点 $750 + | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | $750+ | ~$15 | ## 中等容量用户(每月超过3,000,000次查询) -| 成本比较 | 自托管 | Graph网络 | -|:----------------:|:-------------------------------------------:|:---------------------:| -| 每月服务器费用 \* | 每月350美元 | 0美元 | -| 查询成本 | 每月500美元 | 每月750美元 | +| 成本比较 | 自托管 | Graph网络 | +| :------------------: | :---------------------------------------------: | :----------------------------------------: | +| 每月服务器费用 \* | 每月350美元 | 0美元 | +| 查询成本 | 每月500美元 | 每月750美元 | | 工程时间 | 每月800美元 | 没有,内置在具有全球去中心化索引者的网络中 | -| 每月查询 | 受限于基础设施能力 | 3,000,000+ | -| 每个查询的成本 | 0美元 | 0.00025美元 | -| 基础设施 | 中心化 | 去中心化 | -| 工程费用 | 每小时200美元 | 包括在内 | -| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | 1650美元以上 | 750美元 | +| 每月查询 | 受限于基础设施能力 | 3,000,000+ | +| 每个查询的成本 | 0美元 | 0.00025美元 | +| 基础设施 | 中心化 | 去中心化 | +| 工程费用 | 每小时200美元 | 包括在内 | +| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | 1650美元以上 | 750美元 | ## 高容量用户(每月超过30,000,000次查询) -| 成本比较 | 自托管 | Graph网络 | -|:----------------:|:-------------------------------------------:|:---------------------:| -| 每月服务器费用 \* | 1100美元每月每节点 | 0美元 | -| 查询成本 | 4000美元 | 4500美元每月 | -| 需要的节点数量 | 10 | 不适用 | -| 工程时间 | 每月6000美元或以上 | 没有,内置在具有全球去中心化索引人的网络中 | -| 每月查询 | 受限于基础设施能力 | 30,000,000+ | -| 每个查询的成本 | 0美元 | 0.00015美元 | -| 基础设施 | 中心化 | 去中心化 | -| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | -| 正常工作时间 | 变量 | 99.9%+ | -| 每月总成本 | 11000+美元 | 4500美元 | - -* 包括后备费用: 每月$50-$100美元 +| 成本比较 | 自托管 | Graph网络 | +| :------------------: | :-------------------------------------------: | :----------------------------------------: | +| 每月服务器费用 \* | 1100美元每月每节点 | 0美元 | +| 查询成本 | 4000美元 | 4500美元每月 | +| 需要的节点数量 | 10 | 不适用 | +| 工程时间 | 每月6000美元或以上 | 没有,内置在具有全球去中心化索引人的网络中 | +| 每月查询 | 受限于基础设施能力 | 30,000,000+ | +| 每个查询的成本 | 0美元 | 0.00015美元 | +| 基础设施 | 中心化 | 去中心化 | +| 异地备援 | 每个额外节点的总成本为1200美元 | 包括在内 | +| 正常工作时间 | 变量 | 99.9%+ | +| 每月总成本 | 11000+美元 | 4500美元 | + +- 包括后备费用: 每月$50-$100美元 按每小时200美元的假设计算的工程时间 diff --git a/website/pages/zh/network/delegating.mdx b/website/pages/zh/network/delegating.mdx index 09208995ad22..9a0d6888d54c 100644 --- a/website/pages/zh/network/delegating.mdx +++ b/website/pages/zh/network/delegating.mdx @@ -32,9 +32,7 @@ title: 委托 还需要考虑的一件事是明智地选择索引人。 如果您选择了一个不值得信赖的 索引人,或者没有做好工作,您将想要取消委托,这意味着您将失去很多获得奖励的机会,这可能与耗费 GRT 一样糟糕。 -
    - 请注意委托用户界面中的0.5%费用,以及28天的解约期。 -
    +
    请注意委托用户界面中的0.5%费用,以及28天的解约期。
    ### 选择一个为委托人提供公平的奖励分配的值得信赖的索引人 @@ -43,7 +41,8 @@ title: 委托 索引奖励分成- 索引奖励分成是指索引人将为自己保留的那部分奖励。 这意味着,如果它被设置为 100%,作为一个委托人,你将获得 0 个索引奖励。 如果你在 UI 中看到 80%,这意味着作为委托人,你将获得 20%。 一个重要的说明 -在网络的初期,索引奖励将占奖励的大部分比重。
    - ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *上 面的索引人分给委托人 90% 的收益。 中间的给委托人 20%。 下面的给委托人约 83%。 + ![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *上 面的索引人分给委托人 90% 的收益。 中间的给委托人 20%。 + 下面的给委托人约 83%。
    - 查询费分成-这与索引奖励分成的运作方式完全相同。 不过,这是专门针对索引人收取的查询费的回报。 需要注意的是,在网络初期,查询费的回报与索引奖励相比会非常小。 建议关注网络来确定网络中的查询费何时开始变的比较可观。 diff --git a/website/pages/zh/network/indexing.mdx b/website/pages/zh/network/indexing.mdx index 1218280c992d..1e3ae15b544a 100644 --- a/website/pages/zh/network/indexing.mdx +++ b/website/pages/zh/network/indexing.mdx @@ -113,11 +113,11 @@ Query fees are collected by the gateway and distributed to indexers according to - **大型** -准备对当前使用的所有子图进行索引,并为相关流量的请求提供服务。 | 设置 | (CPU 数量) | (内存 GB) | (硬盘 TB) | (CPU 数量) | (内存 GB) | -| -- |:--------:|:-------:|:-------:|:--------:|:-------:| -| 小型 | 4 | 8 | 1 | 4 | 16 | -| 标准 | 8 | 30 | 1 | 12 | 48 | -| 中型 | 16 | 64 | 2 | 32 | 64 | -| 大型 | 72 | 468 | 3.5 | 48 | 184 | +| ---- | :--------: | :-------: | :-------: | :--------: | :-------: | +| 小型 | 4 | 8 | 1 | 4 | 16 | +| 标准 | 8 | 30 | 1 | 12 | 48 | +| 中型 | 16 | 64 | 2 | 32 | 64 | +| 大型 | 72 | 468 | 3.5 | 48 | 184 | ### 索引人应该采取哪些基本的安全防范措施? @@ -149,26 +149,26 @@ Query fees are collected by the gateway and distributed to indexers according to #### Graph 节点 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| ---- | ------------------------------------ | ------------------------------------------------------------------- | ----------------- | ----- | -| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | -| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | -| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...
    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | +| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | +| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | #### 索引人服务 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| ---- | --------------------------------------- | --------------------------------------------------------------------------- | -------------- | ---------------------- | -| 7600 | GraphQL HTTP 服务器
    (用于付费子图查询) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | -| 7300 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| --- | --- | --- | --- | --- | +| 7600 | GraphQL HTTP 服务器
    (用于付费子图查询) | /subgraphs/id/...
    /status
    /channel-messages-inbox | --port | `INDEXER_SERVICE_PORT` | +| 7300 | Prometheus 指标 | /metrics | --metrics-port | - | #### 索引人代理 -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| ---- | --------- | -- | ------------------------- | --------------------------------------- | -| 8000 | 索引人管理 API | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| ---- | -------------- | ---- | ------------------------- | --------------------------------------- | +| 8000 | 索引人管理 API | / | --indexer-management-port | `INDEXER_AGENT_INDEXER_MANAGEMENT_PORT` | ### 在谷歌云上使用 Terraform 建立服务器基础设施 @@ -730,7 +730,7 @@ default => 0.1 * $SYSTEM_LOAD; 使用上述模型的查询成本计算示例: -| 询问 | 价格 | +| 询问 | 价格 | | ---------------------------------------------------------------------------- | ------- | | { pairs(skip: 5000) { id } } | 0.5 GRT | | { tokens { symbol } } | 0.1 GRT | diff --git a/website/pages/zh/operating-graph-node.mdx b/website/pages/zh/operating-graph-node.mdx index 9ed79ffbde45..78fa738fcf22 100644 --- a/website/pages/zh/operating-graph-node.mdx +++ b/website/pages/zh/operating-graph-node.mdx @@ -77,13 +77,13 @@ cargo run -p graph-node --release -- \ 当运行Graph Node时,会暴露以下端口: -| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | -| ---- | ------------------------------------ | ------------------------------------------------------------------- | ----------------- | ----- | -| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | -| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...

    /subgraphs/name/.../... | --ws-port | - | -| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | -| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | -| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | +| 端口 | 用途 | 路径 | CLI 参数 | 环境 变量 | +| --- | --- | --- | --- | --- | +| 8000 | GraphQL HTTP 服务
    (用于子图查询) | /subgraphs/id/...

    /subgraphs/name/.../... | --http-port | - | +| 8001 | GraphQL WS
    (用于子图订阅) | /subgraphs/id/...

    /subgraphs/name/.../... | --ws-port | - | +| 8020 | JSON-RPC
    (用于管理部署) | / | --admin-port | - | +| 8030 | 子图索引状态 API | /graphql | --index-node-port | - | +| 8040 | Prometheus 指标 | /metrics | --metrics-port | - | > **重要**: 公开暴露端口时要小心 - **管理端口** 应保持锁定。 这包括下面详述的 Graph 节点 JSON-RPC 和索引人管理端点。 diff --git a/website/pages/zh/querying/graphql-api.mdx b/website/pages/zh/querying/graphql-api.mdx index c798bdfd4ec6..9ab99b1eb0c2 100644 --- a/website/pages/zh/querying/graphql-api.mdx +++ b/website/pages/zh/querying/graphql-api.mdx @@ -208,7 +208,7 @@ query manyTokens($lastID: String) { tokens(first: 1000, where: { id_gt: $last ``` > **语法糖:**您可以通过传递一个用逗号分隔的子表达式来删除`and`运算符,从而简化上述查询。 -> +> > ```graphql > { > challenges(where: { number_gte: 100, outcome: "succeeded" }) { @@ -322,12 +322,12 @@ _change_block(number_gte: Int) 全文搜索运算符: -| 符号 | 运算符 | 描述 | -| ----------- | ----------- | ------------------------------------- | -| `&` | `And` | 用于将多个搜索词组合到包含所有提供词条的实体的过滤器中 | -| | | `Or` | 由 or 运算符分隔的多个搜索词的查询,将返回与任何提供的词匹配的所有实体 | -| `<->` | `Follow by` | 指定两个单词之间的距离。 | -| `:*` | `Prefix` | 使用前缀搜索词查找前缀匹配的单词(需要 2 个字符) | +| 符号 | 运算符 | 描述 | +| ------ | ----------- | ---------------------------------------------------------------------- | +| `&` | `And` | 用于将多个搜索词组合到包含所有提供词条的实体的过滤器中 | +| | | `Or` | 由 or 运算符分隔的多个搜索词的查询,将返回与任何提供的词匹配的所有实体 | +| `<->` | `Follow by` | 指定两个单词之间的距离。 | +| `:*` | `Prefix` | 使用前缀搜索词查找前缀匹配的单词(需要 2 个字符) | #### 例子 diff --git a/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx b/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx index 3ff2d318c88f..622bdeef307e 100644 --- a/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx +++ b/website/pages/zh/release-notes/assemblyscript-migration-guide.mdx @@ -127,8 +127,11 @@ ERROR TS2451: Cannot redeclare block-scoped variable 'a' ~~~~~~~~~~~~~ in assembly/index.ts(4,3) ``` + 如果您有变量遮蔽的情况,则需要重命名重名变量。 + ### 空值比较 + 对子图进行升级后,有时您可能会遇到如下错误: ```typescript @@ -137,6 +140,7 @@ ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/common/numbers/BigInt | null' i ~~~~ in src/mappings/file.ts(41,21) ``` + 要解决此问题,您只需将 `if` 语句更改为如下所示代码: ```typescript @@ -284,6 +288,7 @@ ERROR TS2322: Type '~lib/string/String | null' is not assignable to type '~lib/s let somethingOrElse: string = container.data ? container.data : "else"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` + 要解决此问题,您可以为该属性访问创建一个变量,以便编译器可以执行可空性检查: ```typescript diff --git a/website/route-lockfile.txt b/website/route-lockfile.txt index 93a9914077ae..b61743719ba6 100644 --- a/website/route-lockfile.txt +++ b/website/route-lockfile.txt @@ -55,7 +55,6 @@ /ar/querying/querying-from-an-application/ /ar/querying/querying-the-graph/ /ar/querying/querying-the-hosted-service/ -/ar/querying/querying-with-no-code/ /ar/querying/querying-with-python/ /ar/quick-start/ /ar/release-notes/assemblyscript-migration-guide/ @@ -117,7 +116,6 @@ /cs/querying/querying-from-an-application/ /cs/querying/querying-the-graph/ /cs/querying/querying-the-hosted-service/ -/cs/querying/querying-with-no-code/ /cs/querying/querying-with-python/ /cs/quick-start/ /cs/release-notes/assemblyscript-migration-guide/ @@ -179,7 +177,6 @@ /de/querying/querying-from-an-application/ /de/querying/querying-the-graph/ /de/querying/querying-the-hosted-service/ -/de/querying/querying-with-no-code/ /de/querying/querying-with-python/ /de/quick-start/ /de/release-notes/assemblyscript-migration-guide/ @@ -251,7 +248,6 @@ /en/querying/querying-by-subgraph-id-vs-deployment-id/ /en/querying/querying-from-an-application/ /en/querying/querying-the-graph/ -/en/querying/querying-with-no-code/ /en/querying/querying-with-python/ /en/quick-start/ /en/release-notes/assemblyscript-migration-guide/ @@ -315,7 +311,6 @@ /es/querying/querying-from-an-application/ /es/querying/querying-the-graph/ /es/querying/querying-the-hosted-service/ -/es/querying/querying-with-no-code/ /es/querying/querying-with-python/ /es/quick-start/ /es/release-notes/assemblyscript-migration-guide/ @@ -377,7 +372,6 @@ /fr/querying/querying-from-an-application/ /fr/querying/querying-the-graph/ /fr/querying/querying-the-hosted-service/ -/fr/querying/querying-with-no-code/ /fr/querying/querying-with-python/ /fr/quick-start/ /fr/release-notes/assemblyscript-migration-guide/ @@ -439,7 +433,6 @@ /ha/querying/querying-from-an-application/ /ha/querying/querying-the-graph/ /ha/querying/querying-the-hosted-service/ -/ha/querying/querying-with-no-code/ /ha/querying/querying-with-python/ /ha/quick-start/ /ha/release-notes/assemblyscript-migration-guide/ @@ -503,7 +496,6 @@ /hi/querying/querying-from-an-application/ /hi/querying/querying-the-graph/ /hi/querying/querying-the-hosted-service/ -/hi/querying/querying-with-no-code/ /hi/querying/querying-with-python/ /hi/quick-start/ /hi/release-notes/assemblyscript-migration-guide/ @@ -565,7 +557,6 @@ /it/querying/querying-from-an-application/ /it/querying/querying-the-graph/ /it/querying/querying-the-hosted-service/ -/it/querying/querying-with-no-code/ /it/querying/querying-with-python/ /it/quick-start/ /it/release-notes/assemblyscript-migration-guide/ @@ -629,7 +620,6 @@ /ja/querying/querying-from-an-application/ /ja/querying/querying-the-graph/ /ja/querying/querying-the-hosted-service/ -/ja/querying/querying-with-no-code/ /ja/querying/querying-with-python/ /ja/quick-start/ /ja/release-notes/assemblyscript-migration-guide/ @@ -691,7 +681,6 @@ /ko/querying/querying-from-an-application/ /ko/querying/querying-the-graph/ /ko/querying/querying-the-hosted-service/ -/ko/querying/querying-with-no-code/ /ko/querying/querying-with-python/ /ko/quick-start/ /ko/release-notes/assemblyscript-migration-guide/ @@ -755,7 +744,6 @@ /mr/querying/querying-from-an-application/ /mr/querying/querying-the-graph/ /mr/querying/querying-the-hosted-service/ -/mr/querying/querying-with-no-code/ /mr/querying/querying-with-python/ /mr/quick-start/ /mr/release-notes/assemblyscript-migration-guide/ @@ -817,7 +805,6 @@ /nl/querying/querying-from-an-application/ /nl/querying/querying-the-graph/ /nl/querying/querying-the-hosted-service/ -/nl/querying/querying-with-no-code/ /nl/querying/querying-with-python/ /nl/quick-start/ /nl/release-notes/assemblyscript-migration-guide/ @@ -879,7 +866,6 @@ /pl/querying/querying-from-an-application/ /pl/querying/querying-the-graph/ /pl/querying/querying-the-hosted-service/ -/pl/querying/querying-with-no-code/ /pl/querying/querying-with-python/ /pl/quick-start/ /pl/release-notes/assemblyscript-migration-guide/ @@ -943,7 +929,6 @@ /pt/querying/querying-from-an-application/ /pt/querying/querying-the-graph/ /pt/querying/querying-the-hosted-service/ -/pt/querying/querying-with-no-code/ /pt/querying/querying-with-python/ /pt/quick-start/ /pt/release-notes/assemblyscript-migration-guide/ @@ -1005,7 +990,6 @@ /ro/querying/querying-from-an-application/ /ro/querying/querying-the-graph/ /ro/querying/querying-the-hosted-service/ -/ro/querying/querying-with-no-code/ /ro/querying/querying-with-python/ /ro/quick-start/ /ro/release-notes/assemblyscript-migration-guide/ @@ -1069,7 +1053,6 @@ /ru/querying/querying-from-an-application/ /ru/querying/querying-the-graph/ /ru/querying/querying-the-hosted-service/ -/ru/querying/querying-with-no-code/ /ru/querying/querying-with-python/ /ru/quick-start/ /ru/release-notes/assemblyscript-migration-guide/ @@ -1133,7 +1116,6 @@ /sv/querying/querying-from-an-application/ /sv/querying/querying-the-graph/ /sv/querying/querying-the-hosted-service/ -/sv/querying/querying-with-no-code/ /sv/querying/querying-with-python/ /sv/quick-start/ /sv/release-notes/assemblyscript-migration-guide/ @@ -1197,7 +1179,6 @@ /tr/querying/querying-from-an-application/ /tr/querying/querying-the-graph/ /tr/querying/querying-the-hosted-service/ -/tr/querying/querying-with-no-code/ /tr/querying/querying-with-python/ /tr/quick-start/ /tr/release-notes/assemblyscript-migration-guide/ @@ -1259,7 +1240,6 @@ /uk/querying/querying-from-an-application/ /uk/querying/querying-the-graph/ /uk/querying/querying-the-hosted-service/ -/uk/querying/querying-with-no-code/ /uk/querying/querying-with-python/ /uk/quick-start/ /uk/release-notes/assemblyscript-migration-guide/ @@ -1323,7 +1303,6 @@ /ur/querying/querying-from-an-application/ /ur/querying/querying-the-graph/ /ur/querying/querying-the-hosted-service/ -/ur/querying/querying-with-no-code/ /ur/querying/querying-with-python/ /ur/quick-start/ /ur/release-notes/assemblyscript-migration-guide/ @@ -1385,7 +1364,6 @@ /vi/querying/querying-from-an-application/ /vi/querying/querying-the-graph/ /vi/querying/querying-the-hosted-service/ -/vi/querying/querying-with-no-code/ /vi/querying/querying-with-python/ /vi/quick-start/ /vi/release-notes/assemblyscript-migration-guide/ @@ -1447,7 +1425,6 @@ /yo/querying/querying-from-an-application/ /yo/querying/querying-the-graph/ /yo/querying/querying-the-hosted-service/ -/yo/querying/querying-with-no-code/ /yo/querying/querying-with-python/ /yo/quick-start/ /yo/release-notes/assemblyscript-migration-guide/ From f5eaa5afc55504df875f099e8d49d39004ef21c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Rouleau?= Date: Fri, 12 Apr 2024 18:03:20 -0400 Subject: [PATCH 924/924] Delete translated pages that no longer exist in English --- website/pages/ar/cookbook/quick-start.mdx | 164 ---- .../ar/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/ar/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/cs/cookbook/quick-start.mdx | 164 ---- .../cs/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/cs/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/de/cookbook/quick-start.mdx | 164 ---- .../de/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/de/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/es/cookbook/quick-start.mdx | 164 ---- .../es/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/es/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/fr/cookbook/quick-start.mdx | 164 ---- .../fr/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/fr/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/ha/cookbook/quick-start.mdx | 164 ---- .../ha/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/ha/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/hi/cookbook/quick-start.mdx | 164 ---- .../hi/developing/assemblyscript-api.mdx | 820 ------------------ website/pages/hi/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/it/cookbook/quick-start.mdx | 164 ---- .../it/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/it/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/ja/cookbook/quick-start.mdx | 163 ---- .../ja/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/ja/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/ko/cookbook/quick-start.mdx | 164 ---- .../ko/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/ko/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/mr/cookbook/quick-start.mdx | 164 ---- .../mr/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/mr/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/nl/cookbook/quick-start.mdx | 164 ---- .../nl/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/nl/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/pl/cookbook/quick-start.mdx | 164 ---- .../pl/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/pl/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/pt/cookbook/quick-start.mdx | 164 ---- .../pt/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/pt/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/ro/cookbook/quick-start.mdx | 164 ---- .../ro/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/ro/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/ru/cookbook/quick-start.mdx | 164 ---- .../ru/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/ru/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/sv/cookbook/quick-start.mdx | 164 ---- .../sv/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/sv/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/tr/cookbook/quick-start.mdx | 164 ---- .../tr/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/tr/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/uk/cookbook/quick-start.mdx | 164 ---- .../uk/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/uk/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/ur/cookbook/quick-start.mdx | 164 ---- .../ur/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/ur/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/vi/cookbook/quick-start.mdx | 164 ---- .../vi/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/vi/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/yo/cookbook/quick-start.mdx | 164 ---- .../yo/developing/assemblyscript-api.mdx | 816 ----------------- website/pages/yo/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - website/pages/zh/cookbook/quick-start.mdx | 164 ---- .../zh/developing/assemblyscript-api.mdx | 815 ----------------- website/pages/zh/network-transition-faq.mdx | 245 ------ .../querying/querying-the-hosted-service.mdx | 28 - 92 files changed, 28821 deletions(-) delete mode 100644 website/pages/ar/cookbook/quick-start.mdx delete mode 100644 website/pages/ar/developing/assemblyscript-api.mdx delete mode 100644 website/pages/ar/network-transition-faq.mdx delete mode 100644 website/pages/ar/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/cs/cookbook/quick-start.mdx delete mode 100644 website/pages/cs/developing/assemblyscript-api.mdx delete mode 100644 website/pages/cs/network-transition-faq.mdx delete mode 100644 website/pages/cs/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/de/cookbook/quick-start.mdx delete mode 100644 website/pages/de/developing/assemblyscript-api.mdx delete mode 100644 website/pages/de/network-transition-faq.mdx delete mode 100644 website/pages/de/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/es/cookbook/quick-start.mdx delete mode 100644 website/pages/es/developing/assemblyscript-api.mdx delete mode 100644 website/pages/es/network-transition-faq.mdx delete mode 100644 website/pages/es/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/fr/cookbook/quick-start.mdx delete mode 100644 website/pages/fr/developing/assemblyscript-api.mdx delete mode 100644 website/pages/fr/network-transition-faq.mdx delete mode 100644 website/pages/fr/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/ha/cookbook/quick-start.mdx delete mode 100644 website/pages/ha/developing/assemblyscript-api.mdx delete mode 100644 website/pages/ha/network-transition-faq.mdx delete mode 100644 website/pages/ha/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/hi/cookbook/quick-start.mdx delete mode 100644 website/pages/hi/developing/assemblyscript-api.mdx delete mode 100644 website/pages/hi/network-transition-faq.mdx delete mode 100644 website/pages/hi/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/it/cookbook/quick-start.mdx delete mode 100644 website/pages/it/developing/assemblyscript-api.mdx delete mode 100644 website/pages/it/network-transition-faq.mdx delete mode 100644 website/pages/it/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/ja/cookbook/quick-start.mdx delete mode 100644 website/pages/ja/developing/assemblyscript-api.mdx delete mode 100644 website/pages/ja/network-transition-faq.mdx delete mode 100644 website/pages/ja/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/ko/cookbook/quick-start.mdx delete mode 100644 website/pages/ko/developing/assemblyscript-api.mdx delete mode 100644 website/pages/ko/network-transition-faq.mdx delete mode 100644 website/pages/ko/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/mr/cookbook/quick-start.mdx delete mode 100644 website/pages/mr/developing/assemblyscript-api.mdx delete mode 100644 website/pages/mr/network-transition-faq.mdx delete mode 100644 website/pages/mr/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/nl/cookbook/quick-start.mdx delete mode 100644 website/pages/nl/developing/assemblyscript-api.mdx delete mode 100644 website/pages/nl/network-transition-faq.mdx delete mode 100644 website/pages/nl/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/pl/cookbook/quick-start.mdx delete mode 100644 website/pages/pl/developing/assemblyscript-api.mdx delete mode 100644 website/pages/pl/network-transition-faq.mdx delete mode 100644 website/pages/pl/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/pt/cookbook/quick-start.mdx delete mode 100644 website/pages/pt/developing/assemblyscript-api.mdx delete mode 100644 website/pages/pt/network-transition-faq.mdx delete mode 100644 website/pages/pt/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/ro/cookbook/quick-start.mdx delete mode 100644 website/pages/ro/developing/assemblyscript-api.mdx delete mode 100644 website/pages/ro/network-transition-faq.mdx delete mode 100644 website/pages/ro/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/ru/cookbook/quick-start.mdx delete mode 100644 website/pages/ru/developing/assemblyscript-api.mdx delete mode 100644 website/pages/ru/network-transition-faq.mdx delete mode 100644 website/pages/ru/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/sv/cookbook/quick-start.mdx delete mode 100644 website/pages/sv/developing/assemblyscript-api.mdx delete mode 100644 website/pages/sv/network-transition-faq.mdx delete mode 100644 website/pages/sv/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/tr/cookbook/quick-start.mdx delete mode 100644 website/pages/tr/developing/assemblyscript-api.mdx delete mode 100644 website/pages/tr/network-transition-faq.mdx delete mode 100644 website/pages/tr/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/uk/cookbook/quick-start.mdx delete mode 100644 website/pages/uk/developing/assemblyscript-api.mdx delete mode 100644 website/pages/uk/network-transition-faq.mdx delete mode 100644 website/pages/uk/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/ur/cookbook/quick-start.mdx delete mode 100644 website/pages/ur/developing/assemblyscript-api.mdx delete mode 100644 website/pages/ur/network-transition-faq.mdx delete mode 100644 website/pages/ur/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/vi/cookbook/quick-start.mdx delete mode 100644 website/pages/vi/developing/assemblyscript-api.mdx delete mode 100644 website/pages/vi/network-transition-faq.mdx delete mode 100644 website/pages/vi/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/yo/cookbook/quick-start.mdx delete mode 100644 website/pages/yo/developing/assemblyscript-api.mdx delete mode 100644 website/pages/yo/network-transition-faq.mdx delete mode 100644 website/pages/yo/querying/querying-the-hosted-service.mdx delete mode 100644 website/pages/zh/cookbook/quick-start.mdx delete mode 100644 website/pages/zh/developing/assemblyscript-api.mdx delete mode 100644 website/pages/zh/network-transition-faq.mdx delete mode 100644 website/pages/zh/querying/querying-the-hosted-service.mdx diff --git a/website/pages/ar/cookbook/quick-start.mdx b/website/pages/ar/cookbook/quick-start.mdx deleted file mode 100644 index cd42114a85e5..000000000000 --- a/website/pages/ar/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: بداية سريعة ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -انتقل إلى Subgraph Studio [ https://thegraph.com/studio/ ](https://thegraph.com/studio/) وقم بتوصيل محفظتك. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![أمر Subgraph](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- : (Manifest(subgraph.yaml يحدد ال manifest مصادر البيانات التي سيقوم Subgraphs الخاص بك بفهرستها. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- (AssemblyScript Mappings (mapping.ts هذا هو الكود الذي يترجم البيانات من مصادر البيانات الخاصة بك إلى الكيانات المحددة في المخطط. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- وثق وأنشر ال Subgraph الخاص بك. يمكن العثور على مفتاح النشر في صفحة Subgraph في Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/ar/developing/assemblyscript-api.mdx b/website/pages/ar/developing/assemblyscript-api.mdx deleted file mode 100644 index 8f9e39792367..000000000000 --- a/website/pages/ar/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -هذه الصفحة توثق APIs المضمنة التي يمكن استخدامها عند كتابة subgraph mappings. يتوفر نوعان من APIs خارج الصندوق: - -- [مكتبة رسم بياني تيبسكريبت](https://github.com/graphprotocol/graph-ts)(`graph-ts`) -- كود تم إنشاؤه من ملفات الـ subgraph بواسطة `graph codegen`. - -من الممكن أيضا إضافة مكتبات أخرى كـ dependencies، طالما أنها متوافقة مع [ AssemblyScript ](https://github.com/AssemblyScript/assemblyscript). نظرا لأنه تتم كتابة الـ mappings بهذه اللغة فإن [ AssemblyScript wiki ](https://github.com/AssemblyScript/assemblyscript/wiki) تعد مصدرا جيدا للغة ولميزات المكتبة القياسية. - -## التثبيت - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -إذا تم إنشاء الـ subgraph من البداية ، فسيقوم أحد الأمرين التاليين بتثبيت مكتبة Graph TypeScript كـ dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## مرجع API - -توفر مكتبة `graphprotocol / graph-ts@` الـ APIs التالية: - -- واجهة برمجة تطبيقات `ethereum` للعمل مع عقود Ethereum الذكية والأحداث والكتل والإجرءات وقيم Ethereum. -- واجهة برمجة تطبيقات `store` لتحميل الـ entities وحفظها من وإلى مخزن Graph Node. -- واجهة برمجة تطبيقات `log` لتسجيل الرسائل إلى خرج Graph Node ومستكشف Graph Explorer. -- واجهة برمجة تطبيقات `ipfs` لتحميل الملفات من IPFS. -- واجهة برمجة تطبيقات `json` لتحليل بيانات JSON. -- واجهة برمجة تطبيقات `crypto` لاستخدام وظائف التشفير. -- الأوامر الأساسية منخفضة المستوى للترجمة بين أنظمة الأنواع المختلفة مثل Ethereum و JSON و GraphQL و AssemblyScript. - -### إصدارات - -الـ `apiVersion` في الـ subgraph manifest تحدد إصدار الـ mapping API الذي يتم تشغيله بواسطة Graph Node للـ subgraph المحدد. الاصدار الحالي لـ mapping API هو 0.0.6. - -| الاصدار | ملاحظات الإصدار | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### الأنواع المضمنة (Built-in) - -يمكن العثور على الوثائق الخاصة بالأنواع الأساسية المضمنة في AssemblyScript في [ AssemblyScript wiki ](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -يتم توفير الأنواع الإضافية التالية بواسطة `graphprotocol/graph-ts@`. - -#### ByteArray - -```typescript -'import { ByteArray } from '@graphprotocol/graph-ts -``` - -تمثل `ByteArray` مصفوفة `u8`. - -_البناء_ - -- `fromI32(x: i32): ByteArray` - يحلل `x` إلى bytes. -- `fromHexString(hex: string): ByteArray` - طول الإدخال يجب أن يكون زوجي. البادئة بـ `0x` اختيارية. - -_تحويل الأنواع_ - -- `toHexString (): string` - تحول إلى سلسلة سداسية عشرية مسبوقة بـ `0x`. -- `toString (): string` - تترجم البايت كسلسلة UTF-8. -- `toBase58 (): string` - ترميز البايت لسلسلة base58. -- `toI32(): i32` - يترجم مصفوفة البايت كـ little-endian `i32`. يرمي في حالة تجاوز. -- `toI32(): i32` - يترجم مصفوفة البايت كـ little-endian `i32`. يرمي في حالة تجاوز. - -_العوامل_ - -- `equals(y: ByteArray): bool` – يمكن كتابتها كـ `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -'import { BigDecimal } from '@graphprotocol/graph-ts -``` - -يستخدم `BigDecimal` للتعبير عن الكسور العشرية. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_البناء_ - -- `constructor(bigInt: BigInt)` – يُنشئ `BigDecimal` من `BigInt`. -- `static fromString(s: string): BigDecimal` – يحلل من سلسلة عشرية. - -_تحويل الأنواع_ - -- `toString(): string` – يطبع سلسلة عشرية. - -_رياضيات_ - -- `plus(y: BigDecimal): BigDecimal` – يمكن كتابتها كـ `x + y`. -- `minus(y: BigDecimal): BigDecimal` – يمكن كتابتها كـ `x - y`. -- `times(y: BigDecimal): BigDecimal` – يمكن كتابتها كـ `x * y`. -- `div(y: BigDecimal): BigDecimal` – يمكن كتابتها كـ`x / y`. -- `equals(y: BigDecimal): bool` – يمكن كتابتها كـ `x == y`. -- `notEqual(y: BigDecimal): bool` –يمكن كتابتها كـ `x != y`. -- `lt(y: BigDecimal): bool` – يمكن كتابتها كـ `x < y`. -- `le(y: BigDecimal): bool` – يمكن كتابتها كـ `x <= y`. -- `gt(y: BigDecimal): bool` – يمكن كتابتها كـ `x > y`. -- `ge(y: BigDecimal): bool` – يمكن كتابتها كـ `x >= y`. -- `neg(): BigDecimal` - يمكن كتابتها كـ `-x`. - -#### BigInt - -```typescript -'import { BigInt } from '@graphprotocol/graph-ts -``` - -يستخدم `BigInt` لتمثيل أعداد صحيحة كبيرة. يتضمن ذلك قيم Ethereum من النوع `uint32` إلى `uint256` و `int64` إلى `int256`. كل شيء أدناه `uint32` ، مثل `int32` أو `uint24` أو `int8` يتم تمثيله كـ `i32`. - -تحتوي فئة `BigInt` على API التالية: - -_البناء_ - -- `BigInt.fromI32 (x: i32): BigInt` - ينشئ `BigInt` من `i32`. -- `BigInt.fromString(s: string): BigInt`– يحلل `BigInt` من سلسلة(string). -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – يترجم `bytes` باعتباره عددا صحيحا little-endian بدون إشارة. إذا كان الإدخال الخاص بك big-endian، فقم باستدعاء `.()reverse` أولا. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – يترجم `bytes` باعتباره عددا صحيحا little-endian له إشارة. إذا كان الإدخال الخاص بك big-endian، فاستدعي `.()reverse` أولا. - - _تحويل الأنواع_ - -- `x.toHex(): string` – ترجع `BigInt` إلى سلسلة سداسية العشرية. -- `x.toString(): string` – يقوم بإرجاع `BigInt` إلى سلسلة عدد عشري. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal (): BigDecimal` - يحول إلى رقم عشري بدون جزء كسري. - -_رياضيات_ - -- `x.plus(y: BigInt): BigInt` – يمكن كتابتها كـ `x + y`. -- `x.minus(y: BigInt): BigInt` – يمكن كتابتها كـ `x - y`. -- `x.times(y: BigInt): BigInt` – يمكن كتابتها كـ `x * y`. -- `x.div(y: BigInt): BigInt` – يمكن كتابتها كـ `x / y`. -- `x.mod(y: BigInt): BigInt` – يمكن كتابتها كـ `x % y`. -- `x.equals(y: BigInt): bool` – يمكن كتابتها كـ `x == y`. -- `x.notEqual(y: BigInt): bool` –يمكن كتابتها كـ `x != y`. -- `x.lt(y: BigInt): bool` – يمكن كتابتها كـ `x < y`. -- `x.le(y: BigInt): bool` – يمكن كتابتها كـ `x <= y`. -- `x.gt(y: BigInt): bool` – يمكن كتابتها كـ `x > y`. -- `x.ge(y: BigInt): bool` – يمكن كتابتها كـ `x >= y`. -- `x.neg(): BigInt` – يمكن كتابتها كـ `-x`. -- `x.divDecimal (y: BigDecimal): BigDecimal` - يتم القسمة على عدد عشري ، مما يعطي نتيجة عشرية. -- `x.isZero(): bool` – ملائم للتحقق مما إذا كان الرقم صفرا. -- `x.isI32(): bool` – يتحقق مما إذا كان الرقم يناسب `i32`. -- `x.abs(): BigInt` – قيمة مطلقة. -- `x.pow(exp: u8): BigInt` – أس. -- `bitOr(x: BigInt, y: BigInt): BigInt` – يمكن كتابتها كـ `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – يمكن كتابتها كـ `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` –يمكن كتابتها كـ `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – يمكن كتابتها كـ `x >> y`. - -#### TypedMap - -```typescript -'import { TypedMap } from '@graphprotocol/graph-ts -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -تحتوي فئة `TypedMap` على API التالية: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set (key: K، value: V): void` - يضبط قيمة الـ `key` لـ `value` -- `map.getEntry(key: K): TypedMapEntry | null` – يقوم بإرجاع زوج المفتاح-والقيمة لـ `key` أو `null` إذا كان الـ `key` غير موجود في الـ map -- `map.get(key: K): V | null` – يقوم بإرجاع زوج المفتاح-والقيمة لـ `key` أو `null` إذا كان الـ `key` غير موجود في الـ map -- `map.isSet(key: K): bool` – يرجع `true` إذا كان الـ `key` موجودا في الـ map ويرجع بـ `false` إذا كان غير موجود - -#### Bytes - -```typescript -'import { Bytes } from '@graphprotocol/graph-ts -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -فئة `Bytes` ترث من [ Uint8Array ](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) و لذا فهو يدعم جميع وظائف `Uint8Array` ، بالإضافة إلى الـ طُرق الجديدة التالية: - -_البناء_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_تحويل الأنواع_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_العوامل_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### العنوان - -```typescript -'import { Address } from '@graphprotocol/graph-ts -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### مخزن API - -```typescript -'import { store } from '@graphprotocol/graph-ts -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### إنشاء الكيانات - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### تحميل الكيانات من المخزن - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### تحديث الكيانات الموجودة - -There are two ways to update an existing entity: - -1. حمل الكيان بـ `Transfer.load (id)` على سبيل المثال، قم بتعيين الخصائص على الكيان ، ثم `()save.` للمخزن. -2. ببساطة أنشئ الكيان بـ `new Transfer(id)` على سبيل المثال، قم بتعيين الخصائص على الكيان ، ثم `()save.` للمخزن. إذا كان الكيان موجودا بالفعل ، يتم دمج التغييرات فيه. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### إزالة الكيانات من المخزن - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### API إيثيريوم - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### دعم أنواع الإيثيريوم - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### الأحداث وبيانات الكتلة/ الإجراء - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### الوصول إلى حالة العقد الذكي Smart Contract - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### معالجة الاستدعاءات المعادة - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### تشفير/فك تشفير ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### تسجيل قيمة واحدة أو أكثر - -##### تسجيل قيمة واحدة - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### تسجيل إدخال واحد من مصفوفة موجودة - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### تسجيل إدخالات متعددة من مصفوفة موجودة - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### تسجيل إدخال محدد من مصفوفة موجودة - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### تسجيل معلومات الحدث - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -'import { ipfs } from '@graphprotocol/graph-ts -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -'import { crypto } from '@graphprotocol/graph-ts -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -'import { json, JSONValueKind } from '@graphprotocol/graph-ts -``` - -يمكن تحليل بيانات JSON باستخدام `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -توفر فئة `JSONValue` طريقة لسحب القيم من مستند JSON عشوائي. نظرا لأن قيم JSON يمكن أن تكون منطقية وأرقاما ومصفوفات وغيرها، فإن `JSONValue` يأتي مع خاصية `kind` للتحقق من نوع القيمة: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### مرجع تحويلات الأنواع - -| المصدر(المصادر) | الغاية | دالة التحويل | -| -------------------- | -------------------- | ---------------------------- | -| العنوان | Bytes | لا يوجد | -| العنوان | String | ()s.toHexString | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | لا يوجد | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | لا يوجد | -| int32 | i32 | لا يوجد | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | لا يوجد | -| int64 - int256 | BigInt | لا يوجد | -| uint32 - uint256 | BigInt | لا يوجد | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | العنوان | Address.fromString(s) | -| Bytes | العنوان | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### البيانات الوصفية لمصدر البيانات - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### الكيان و DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/ar/network-transition-faq.mdx b/website/pages/ar/network-transition-faq.mdx deleted file mode 100644 index 08be4c8718ef..000000000000 --- a/website/pages/ar/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: الأسئلة الشائعة حول نقل الشبكة ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -سيتم إنهاء كل شبكة على الخدمة المستضافة تدريجيًا ، بما في ذلك Ethereum ، حيث يتم دعمها على الشبكة اللامركزية لتحقيق جودة خدمة عالية. سيتم تطبيق ذلك على كل شبكة بمساعدة المفهرسين في [برنامج MIPs](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/)، لتحقيق الدعم الكامل لكل شبكة على الشبكة اللامركزية. - -لمزيد من التفاصيل حول الدعم المستمر لكل شبكة على الخدمة المستضافة ، فهذه الأسئلة الشائعة تجيب على الأسئلة المتعلقة بتفاصيل عملية نقل الشبكة. إذا كنت ترغب في بدء عملية ترحيل الرسم البياني الفرعي الآن ، فإليك [ دليل خطوة بخطوة ](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). لتخطي الأسئلة الشائعة المتعلقة بالترحيل ، [ انقر هنا ](#migration-faqs). - -## Hosted Service Sunset FAQs - -### هل سيتطلب مني ترحيل الـ subgraph الخاص بي قبل أن يتم تقديم الوظائف الأساسية للـ subgraphs على الشبكة اللامركزية؟ - -يمكن لمطوري الرسم البياني الفرعي البدء في ترحيل الرسوم البيانية الفرعية لشبكة Ethereum الرئيسية الخاصة بهم الآن ، ولكن لن يتم إجبارهم على ترحيل الرسوم البيانية الفرعية إلى الشبكة قبل وجود وظائف أساسية للشبكة اللامركزية والخدمة المستضافة. ستبدأ أيضًا عملية ترحيل الرسوم البيانية الفرعية لشبكة Gnosis قريبًا ، وستتبعها شبكات أخرى بمجرد أن يختبر المفهرسون الشبكات وتصبح جاهزة لفهرستها. - -### ما هو الإجراء المتبع لإيقاف الخدمة المستضافة والمخطط الزمني له؟ - -لكل شبكة جدول زمني خاصة بها ، وذلك اعتمادًا على وقت تمكينها على الشبكة والجدول الزمني الذي تستغرقه عبر كل مرحلة. يعمل المطورون الأساسيون على ترحيل غالبية الخدمة المستضافة إلى الشبكة اللامركزية في أسرع وقت ممكن. - -الأهم من ذلك ، أنك لن تفقد الوصول إلى الخدمة المستضافة قبل أن تتوفر الوظيفة الأساسية للشبكة / الرسم البياني الفرعي الخاص بك على الشبكة اللامركزية. - -المراحل الثلاث لإيقاف الخدمة المستضافة لكل شبكة هي: - -#### المرحلة 1 (The Sunray): تعطيل إمكانية إنشاء الرسم البياني الفرعي للبلوكتشاين الذي له تكافؤ في الجودة على الشبكة - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -لم تبدأ أي شبكة حتى الآن المرحلة الأولى في الانتقال من الخدمة المستضافة إلى الشبكة اللامركزية. - -عندما تبدأ الشبكات في المرحلة الأولى ، يرجى ملاحظة أنه لا يزال بإمكان المطورين استخدام Developer Preview URL المحدودة في Subgraph Studio لتطوير واختبار الرسوم البيانية الفرعية الخاصة بهم (تصل لـ 1000 استعلام مجاني) بدون الحصول على GRT أو التفاعل مع اقتصاد البروتوكول. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -لا يوجد جدول زمني محدد لانتقال أي شبكة إلى هذه المرحلة ، حيث أن هذه العملية تستند على معايير متعلقة بالوظائف الأساسية ، وليس التواريخ. - -#### المرحلة 3 (The Sunrise): تعطيل استعلام الرسوم البيانية الفرعية - -في هذه المرحلة ، فإن الرسوم البيانية الفرعية على الخدمة المستضافة للشبكات التي تدعمها شبكة The Graph لن تقوم بمعالجة الاستعلامات. الطريقة الوحيدة للاستعلام عن بيانات blockchain للرسم البياني الفرعي في هذه المرحلة ستكون من خلال الشبكة اللامركزية. ستظل استعلامات الاختبار متاحة في[Subgraph Studio](https://thegraph.com/studio/) عبر Development Query URL. - -لن تنتقل الشبكات إلى المرحلة 3 حتى تنتقل بنجاح إلى المرحلة 2 ومنح المطورين متسعًا من الوقت للانتقال إلى الشبكة اللامركزية. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### ماذا يحدث لشبكات الاختبار مثل Goerli و Mumbai وغيرها؟ - -جميع الشبكات وشبكات الاختبار مؤهلة للحصول على عنوان URL مجاني لاستعلام النشر (Deployment Query URL) في [Subgraph Studio](https://thegraph.com/studio/).. عنوان URL هذا محدود ومخصص للاختبار والتطوير. ستتطلب حركة الإنتاج رسمًا بيانيًا فرعيًا منشورًا على شبكة The Graph من أجل الحصول على تكرار واستقرار عاليين في الإنتاج. - -![Rate limit](/img/rate-limit.png) - -### هل تمتلك شبكة Graph نفس وظائف الخدمة المستضافة؟ - -يقوم المفهرسون على شبكة The Graph بتشغيل أحدث [ إصدار من Graph Node ](https://github.com/graphprotocol/graph-node/releases) معتمد من الشبكة ، ويمكنهم دعم أي ميزات للرسم الفرعي والمدعومة في ذلك الإصدار. - -في بعض الأحيان ، قد تكون الميزات التي لم يتم طرحها والتي لا تزال قيد التطوير متاحة أولاً على Developer Preview URL ، والذي يقوم بتشغيل [Graph Node](https://github.com/graphprotocol/graph-node)الرئيسي الأخير. بعد ذلك ستصبح هذه الميزات متاحة على الشبكة مع إصدار Graph Node التالي. - -بعض ميزات الرسم البياني الفرعي إذا لم تكن قابلة للتحقق منها على الشبكة فستكون غير مؤهلة للحصول على مكافآت الفهرسة. ومن الأمثلة المحددة على ذلك جلب الملفات من IPFS وفهرسة الشبكات التي لم يتم دعمها بعد على شبكة The Graph. - -يمكن نشر الرسوم البيانية الفرعية على الشبكة التي تحتوي على هذه الميزات ، ولكن قد لا يتم اختيارها من قبل المفهرسين. ومع ذلك ، قد تستمر الرسوم البيانية الفرعية ذات الإشارات الكافية في جذب المفهرسين المهتمين بتحصيل رسوم الاستعلام ، والتي يحق لأي رسم بياني فرعي أن يكون مؤهلا لها. - -### ما هي تكلفة شبكة The Graph مقارنة بتشغيل البنية التحتية الخاصة بي؟ - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### هل هناك أي شيء يجب أن أفعله بالرسم البياني الفرعي للخدمة المستضافة بعد انتقالي إلى الشبكة؟ - -يوصى بشدة بإخفاء الرسم البياني الفرعي للخدمة المستضافة لتجنب الالتباس. يقدم هذا [الفيديو ](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9)شرحا للعملية. - -### متى ستدعم الشبكة اللامركزية شبكتي المفضلة؟ - -لا يوجد مخطط زمني محدد لكل شبكة ، سيتم تحديدها من خلال استعداد المفهرس عبر [ برنامج MIPs ](https://thegraph.com/migration-incentive-program/) حيث يتم اختبار الشبكات الجديدة بواسطة المفهرسين. نظرًا لأن الشبكات الجديدة مدعومة على الشبكة ، سيتلقى المستخدمون إشعارا للتحضير لعملية الترحيل. يعمل المطورون الأساسيون والمساهمون في النظام البيئي لـ The Graph على تنفيذ الدعم لمزيد من الشبكات في أقرب وقت ممكن. - -### هل تدخل شبكة Ethereum mainnet المرحلة الأولى من عملية انتقال الشبكة؟ - -بينما كان من المتوقع في البداية أن تبدأ Ethereum الانتقال من الخدمة المستضافة بحلول نهاية الربع الثالث من عام 2022 ، فقد تم تأجيل ذلك [ ](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) للتعامل مع ملاحظات المستخدمين. ستتطلب التحسينات الإضافية في تجربة المستخدم، والفوترة، وتلبية طلبات المستخدمين الأخرى إلى تعديل الجدول زمني لعملية انتقال الخدمة المستضافة على Ethereum. ابق على اطلاع دائم بموعد دخول Ethereum إلى مرحلة Sunray عبر متتبع حالة التكامل أدناه وعبر [ The Graph Twitter. ](https://twitter.com/graphprotocol) - -### متتبع حالة تكامل شبكة Graph - -يوضح الجدول أدناه مكان وجود كل شبكة في عملية التكامل. إذا لم تكن شبكتك المفضلة مدرجة بعد ، فهذا يعني أن التكامل لم يبدأ بعد ولا تزال هذه الشبكة مدعومة بالكامل بواسطة الخدمة المستضافة لـ The Graph. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | اكتمل تكامل الشبكة | المرحلة 1: تعطيل الرسوم البيانية الفرعية الجديدة على الخدمة المستضافة | Phase 2: disable subgraph updates on hosted service | المرحلة 3: تعطيل الرسوم البيانية الفرعية على الخدمة المستضافة | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| بوليجون | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\ \* الشبكة حاليًا في مرحلة بيتا على الشبكة اللامركزية لـ The Graph. - -## الأسئلة الشائعة حول رسوم الاستعلام ومفاتيح API والفوترة - -### كيف يتم تسعير رسوم الاستعلام؟ - -تتأثر أسعار رسوم الاستعلام بكمية طلب الاستعلام على الشبكة اللامركزية. أنشأ المطورون الأساسيون لغة لنموذج تكلفة تسعير الاستعلام تسمى [ Agora ](https://github.com/graphprotocol/agora).حيث أنها تمكن المفهرسين من تسعير الاستعلامات بكفاءة. تعرف على المزيد في [ وثائق Agora ](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### كيف يمكنني تعيين حد أقصى لميزانية الاستعلام؟ - -يمكن للمستخدمين تعيين الحد الأقصى لميزانية الاستعلام في قسم [ API Key ](https://thegraph.com/studio/apikeys/) في Subgraph Studio ، ضمن علامة التبويب Budget. [ شاهد هذا الفيديو ](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) للحصول على نظرة عامة حول هذه العملية ، بالإضافة إلى ضبط الأجزاء الأخرى لـ API Key. - -يرجى ملاحظة أن ضبط حدود الميزانية القصوى للاستعلام الخاص بك بشكل منخفض جدًا سيؤدي إلى استبعاد المُفهرسين، مما قد يؤدي في النهاية إلى تقديم خدمة ذات جودة سيئة على شكل استعلامات فاشلة أو بطيئة. - -اعتبارًا من نهاية سبتمبر 2022 ، فإنه من الأفضل أن يكون أدنى حد أقصى لميزانية الاستعلام في نطاق من 0.00035 إلى 0.0004 دولار. - -### كيف يمكنني حماية API Key الخاص بي؟ - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![تقييد الدومين](/img/restrictdomain.png) - -### كيف أقوم بملء مفتاح API الخاص بي لدفع رسوم الاستعلام؟ - -يمكنك ملء رصيد الفوترة الخاص بك في [ لوحة معلومات الفواتير ](https://thegraph.com/studio/billing/) في Subgraph Studio عن طريق الضغط على الزر "Add GRT". هناك عمل مستمر للتحسين لإضافة مدفوعات أكثر سلاسة. - -يحتوي [ هذا الفيديو ](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) على نظرة عامة حول هذه العملية. - -### كيف يمكنني ضبط تنبيهات لأرصدة الفوترة المنخفضة في مفتاح API الخاص بي؟ - -يجب على المستخدمين ضبط تنبيه فوترة لعنوان بريدهم الإلكتروني [ هنا ](https://thegraph.com/studio/settings/). - -أيضًا ، ستومض لافتة داخل واجهة المستخدم للتحذير عند انخفاض رصيد الفوترة. - -كيف أدير إعدادات مفتاح API الخاصة بي بأفضل طريقة؟ - -يوصى بميزانية استعلام قدرها 0.0004 دولارا كحد أقصى وذلك للحفاظ على متوسط أسعار استعلام منخفضة مع الحفاظ على خدمة ذات جودة عالية. يمكنك القيام بذلك في علامة التبويب "budget billing" [ في قسم API Key ](https://thegraph.com/studio/apikeys/). - -## الأسئلة الشائعة حول الترحيل - -### كيف يمكنني ترحيل الرسم البياني الفرعي الخاص بي إلى الشبكة اللامركزية لـ The Graph؟ - -تعرف على كيفية ترحيل الغراف الفرعي إلى شبكة الغراف باستخدام هذا [ الدليل البسيط خطوة بخطوة ](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) أو [ عن طريق هذا الفيديو ](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### هل يوجد أي دعم مالي / فني / تسويقي عبر عملية الترحيل من النظام البيئي للغراف؟ - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### ما هي المدة التي تستغرقها الاستعلامات؟ - -تستغرق الاستعلامات ما متوسطه 150-300 مللي ثانية على الشبكة اللامركزية. - -### هل عملية الفوترة على شبكة الغراف أكثر تعقيدًا من الخدمة المستضافة؟ - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### هل يمكنني الدفع مقابل استعلامات شبكة Graph بالأوراق النقدية وبطاقات الإئتمان والعملات المستقرة؟ - -في الأشهر القادمة، سيتم التقليل وبشكل كبير عدد الخطوات التي يحتاجها المستخدمون لمدفوعات الغراف الفرعي. وعلى الرغم من أن المدفوعات ستستمر في القيام بذلك باستخدام GRT، إلا أن هناك جهود جارية لتنفيذ نظام يسمح بتحويل العملات الورقية والعملات المشفرة إلى GRT تلقائيًا لتسهيل المدفوعات المتكررة. - -### Will the network ever have the same UX as the hosted service? - -بينما لا يزال هناك عمل يجب القيام به، إلا أن الهدف هو تقديم تجربة مستخدم مماثلة، إن لم تكن أفضل من تلك المتاحة حاليًا في الخدمة المستضافة. على المدى القصير، يهدف الجهود إلى توفير فوترة أكثر تيسيرًا وتنبؤًا تساعد المستخدمين على التركيز على بناء تطبيقات عالية الجودة. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### كيف أقوم بتبديل subgraph API في الواجهة الأمامية؟ - -بعد قيام مفهرس واحد على الأقل بفهرسة الرسم البياني الفرعي بالكامل ، يمكن للمستخدم الاستعلام عن الشبكة اللامركزية. - -لاسترداد عنوان الاستعلام للرسم الفرعي الخاص بك ، يمكنك نسخه / لصقه بالنقر فوق الرمز الموجود بجوار عنوان الاستعلام. سترى شيئًا مثل هذا: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -ما عليك سوى استبدال [api-key] بمفتاح API الذي تم إنشاؤه في [ قسم API Key ](https://thegraph.com/studio/apikeys/) في Subgraph Studio. - -### كم تكلفة الاستعلامات؟ - -يختلف متوسط تكلفة الاستعلام داخل الشبكة. لشهر سبتمبر 2022 ، فقد تراوح متوسط سعر تكلفة رسوم الاستعلام من 0.00012 إلى 0.00020 دولار. - -### كيف يمكنني معرفة حجم الرسم البياني الفرعي الخاص بي وكم سيكلف؟ - -بيانات حجم الخدمة المستضافة ليست عامة. يرجى التواصل للحصول على تقديرات الحجم والتكلفة [ هنا ](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## استخدام الأسئلة الشائعة حول الشبكة - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### كيف أقوم بإسراع وقت المزامنة؟ - -قلل من استخدام استدعاءات العقود الذكية داخل الغراف الفرعي. الوصول إلى حالة العقد الذكي يتطلب وجود eth_call إلى RPC، وهذا يبطئ وقت المزامنة. - -### هل هناك دعم لـ multisig في Subgraph Studio أثناء الترحيل؟ - -نعم ، تمت إضافة دعم لـ multisig مؤخرًا. يمكنك العثور على مزيد من المعلومات [ هنا ](https://thegraph.com/docs/studio/multisig). - -### ما هي عناوين عقود عملة القراف على إيثيريوم و أربترم؟ - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- أربترم: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### ما مقدار GRT التي تحتفظ بها المشاريع عادةً في مفتاح API الخاص بهم؟ - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### كيف تتم مدفوعات الاستعلام على الشبكة اللامركزية؟  - -الرسوم يتم فوترتها أسبوعياً وتسحب من مفتاح واجهة تطبيق البرمجة الخاص بالمستخدم, بعملة القراف المجسرة إلى أربترم وتستقر هناك. - -### كيف يتم استخدام مفاتيح API للرسم البياني الفرعي على الشبكة اللامركزية؟ - -تمنح الـ API المستخدمين القدرة على التحكم في الحد الأقصى لأسعار الاستعلامات التي يدفعونها وتحديد الأوليات مثل السعر والتحديث الاقتصادي وسرعة الاستعلام. - -### كيف تقارن جودة الخدمة حاليًا بين الخدمة المستضافة والشبكة اللامركزية؟ - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### ماذا لو لم يتم الرد على سؤالي من خلال هذه الأسئلة الشائعة؟ - -يرجى التواصل مع [igration@thegraph.foundation ](mailto:migration@thegraph.foundation) للحصول على أي مساعدة إضافية. diff --git a/website/pages/ar/querying/querying-the-hosted-service.mdx b/website/pages/ar/querying/querying-the-hosted-service.mdx deleted file mode 100644 index 5cac9c5c607d..000000000000 --- a/website/pages/ar/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## مثال - -يسرد هذا الاستعلام جميع العدادات التي أنشأها الـ mapping الخاص بنا. نظرا لأننا أنشأنا واحدا فقط ، فستحتوي النتيجة فقط على `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -بعض الميزات الرئيسية مفصلة أدناه: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/cs/cookbook/quick-start.mdx b/website/pages/cs/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/cs/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/cs/developing/assemblyscript-api.mdx b/website/pages/cs/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/cs/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/cs/network-transition-faq.mdx b/website/pages/cs/network-transition-faq.mdx deleted file mode 100644 index d3fed8968e36..000000000000 --- a/website/pages/cs/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - - - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/cs/querying/querying-the-hosted-service.mdx b/website/pages/cs/querying/querying-the-hosted-service.mdx deleted file mode 100644 index f00ff226ce09..000000000000 --- a/website/pages/cs/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Example - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/de/cookbook/quick-start.mdx b/website/pages/de/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/de/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/de/developing/assemblyscript-api.mdx b/website/pages/de/developing/assemblyscript-api.mdx deleted file mode 100644 index dfc41433bf83..000000000000 --- a/website/pages/de/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// Das wird nicht funktionieren -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// Das wird funktionieren -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/de/network-transition-faq.mdx b/website/pages/de/network-transition-faq.mdx deleted file mode 100644 index 7062d932272b..000000000000 --- a/website/pages/de/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (früher xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/de/querying/querying-the-hosted-service.mdx b/website/pages/de/querying/querying-the-hosted-service.mdx deleted file mode 100644 index f00ff226ce09..000000000000 --- a/website/pages/de/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Example - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/es/cookbook/quick-start.mdx b/website/pages/es/cookbook/quick-start.mdx deleted file mode 100644 index 735c6be39163..000000000000 --- a/website/pages/es/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Comienzo Rapido ---- - -Esta guía te mostrará como iniciar, crear y deployar tu subgrafo en el Subgraph Studio o en el [Servicio Alojado](#hosted-service). - -Asegúrate de que tu subgrafo esté indexando información desde [redes compatibles](/developing/supported-networks). - -Esta guía está escrita asumiendo que tú tienes: - -- Una dirección de un smart contract en la red de tu preferencia -- GRT para crear tu subgráfo -- Una wallet crypto - -## 1. Crea un subgrafo en el Subgraph Studio - -Ve a Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) y conecta tu wallet. - -Una vez conectado, puedes comenzar presionando "Crea un subgrafo". Selecciona la red de tu elección y presiona continuar. - -## 2. Instala the graph CLI - -The Graph CLI está escrito en JavaScript y necesitarás tener `npm` o `yarn` instalado para usarlo. - -En tu dispositivo, ejecuta alguno de los siguientes comandos: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Inicia tu subgrafo - -> Puedes encontrar comandos específicos para tu subgrafo en el [Subgraph Studio](https://thegraph.com/studio/). - -Cuando inicies tu subgrafo, la herramienta CLI te preguntará por la siguiente información: - -- Protocol: elige el protocolo desde el cual tu subgrafo indexará datos -- Subgraph slug: crea un nombre para tu subgrafo. El slug de tu subgrafo es un identificador para el mismo. -- Directorio para crear el subgrafo: elige el directorio local de tu elección -- Red Ethereum (opcional): Es posible que debas especificar desde qué red compatible con EVM tu subgrafo indexará datos -- Dirección del contrato: Localiza la dirección del contrato inteligente del que deseas consultar los datos -- ABI: Si el ABI no se completa automáticamente, deberás ingresar los datos manualmente en formato JSON -- Start Block: se sugiere que ingreses el bloque de inicio para ahorrar tiempo mientras tu subgrafo indexa los datos de la blockchain. Puedes ubicar el bloque de inicio encontrando el bloque en el que se deployó tu contrato. -- Nombre del contrato: introduce el nombre de tu contrato -- Indexar eventos del contrato como entidades: se sugiere que lo establezcas en "verdadero" ya que automáticamente agregará mapeos a tu subgrafo para cada evento emitido -- Añade otro contrato(opcional): puedes añadir otro contrato - -Inicializa tu subgrafo a partir de un contrato existente ejecutando el siguiente comando: - -```sh -graph init --studio -``` - -Ve la siguiente captura para un ejemplo de que debes de esperar cuando inicializes tu subgrafo: - -![Comando de Subgrafo](/img/subgraph-init-example.png) - -## 4. Escribe tu subgrafo - -Los comandos anteriores crean un subgrafo de andamio que puedes utilizar como punto de partida para construir tu subgrafo. Al realizar cambios en el subgrafo, trabajarás principalmente con tres archivos: - -- Manifest (subgraph.yaml) - El manifiesto define qué fuentes de datos indexarán tus subgrafos. -- Schema (schema.graphql) - El esquema GraphQL define los datos que deseas recuperar del subgrafo. -- AssemblyScript Mappings (mapping.ts) - Este es el código que traduce los datos de tus fuentes de datos a las entidades definidas en el esquema. - -Para obtener más información sobre cómo escribir su subgrafo, consulte [Creación de un subgrafo](/developing/creating-a-subgraph). - -## 5. Despliega en Subgraph Studio - -Una vez escrito tu subgrafo, ejecuta los siguientes comandos: - -```sh -$ graph codegen -$ graph build -``` - -- Autentica y deploya tu subgrafo. La clave para deployar se puede encontrar en la página de Subgraph en Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -Se te pedirá una etiqueta de versión. Se recomienda encarecidamente utilizar [semver](https://semver.org/) para la numeración de versiones, como `0.0.1`. Dicho esto, puedes elegir cualquier cadena como versión, como: `v1`, `version1`, `asdf`. - -## 6. Prueba tu subgrafo - -Puedes probar tu subgrafo haciendo una consulta de muestra en la sección de "playground". - -Los registros te indicarán si hay algún error con tu subgrafo. Los registros de un subgrafo operativo se verán así: - -![Registros del subgrafo](/img/subgraph-logs-image.png) - -Si tu subgrafo está fallando, puedes consultar la salud del subgrafo utilizando la función `GraphiQL Playground`. Ten en cuenta que puedes aprovechar la consulta de abajo e introducir tu ID de despliegue para tu subgrafo. En este caso, `Qm...` es el ID de despliegue (que se puede ubicar en la página Subgraph bajo **Detalles**). La siguiente consulta te dirá cuando falla un subgrafo para que puedas debug en consecuencia: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publica tu subgrafo en la red descentralizada de the graph - -Una vez que tu subgrafo se haya deployado en Subgraph Studio, lo hayas probado y estés listo para ponerlo en producción, lo podrás publicar en la red descentralizada. - -En el subgraph studio, da click en tu subgrafo. En la pagina del subgrafo, podrás darle click en el boton de publicar que se encuentra en la parte superior derecha. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Antes de poder hacer consultas a tu subgrafo, los indexadores deben comenzar a responder a las consultas sobre él. Para simplificar este proceso, puedes curar tu propio subgrafo utilizando GRT. - -Al momento de escribir este artículo, se recomienda que cures tu propio subgrafo con 10,000 GRT para asegurarte de que esté indexado y disponible para consultas lo antes posible. - -Para ahorrar en costos de gas, puedes curar tu subgrafo en la misma transacción en la que lo publicas seleccionando este botón al publicar tu subgrafo en la red descentralizada de The Graph: - -![Publicar subgrafo](/img/publish-and-signal-tx.png) - -## 8. Consulta tu subgrafo - -Ahora puedes hacer consultas a tu subgrafo enviando consultas GraphQL a la URL de consulta de tu subgrafo, que puedes encontrar haciendo clic en el botón de consulta. - -Puedes consultar desde tu dapp si no tienes tu clave de API a través de la URL de consulta temporal, libre y de tarifa limitada, que puede utilizarse para el desarrollo y la puesta en marcha. - -Para obtener más información sobre cómo hacer consultas de datos desde tu subgrafo, lee más [aquí](../querying/querying-the-graph/). diff --git a/website/pages/es/developing/assemblyscript-api.mdx b/website/pages/es/developing/assemblyscript-api.mdx deleted file mode 100644 index 347cc5103c9c..000000000000 --- a/website/pages/es/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Nota: si creaste un subgrafo antes de `graph-cli`/`graph-ts` versión `0.22.0`, estás utilizando una versión anterior de AssemblyScript, te recomendamos que consultes la [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -Esta página documenta qué API integradas se pueden usar al escribir mappings de subgrafos. Hay dos tipos de API disponibles listas para usar: - -- la [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) y -- código generado a partir de archivos de subgrafos por `graph codegen`. - -También es posible añadir otras librerías como dependencias, siempre y cuando sean compatible con [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Debido a que ese lenguaje de mapeo es el que usamos, la [wiki de AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki) es una buena fuente para las características de este lenguaje y librería estándar. - -## Instalación - -Los subgrafos creados con [`graph init`](/developing/creating-a-subgraph) vienen con dependencias preconfiguradas. Todo lo que se requiere para instalar estas dependencias es ejecutar uno de los siguientes comandos: - -```sh -yarn install # Yarn -npm install # NPM -``` - -Si el subgrafo se creó desde cero, uno de los siguientes dos comandos instalará la biblioteca Graph TypeScript como una dependencia: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## Referencias de API - -La librería de `@graphprotocol/graph-ts` proporciona las siguientes APIs: - -- Una API de `ethereum` para trabajar con contratos inteligentes de Ethereum, eventos, bloques, transacciones y valores de Ethereum. -- Un `store` para cargar y guardar entidades en el Graph Node store. -- Una `log` API para registrar mensajes en la salida de Graph Node y Graph Explorer. -- Una API de `ipfs` que permite cargar archivos provenientes de IPFS. -- Una API de `json` para analizar datos en formato JSON. -- Una API de `crypto` que permite usar funciones criptográficas. -- Primitivas de bajo nivel para traducir entre los distintos tipos de sistemas, tales como, Ethereum, JSON, GraphQL y AssemblyScript. - -### Versiones - -La `apiVersion` en el manifiesto del subgrafo especifica la versión de la API correspondiente al mapeo que está siendo ejecutado en el Graph Node de un subgrafo en específico. La versión actual para la APÍ de mapeo es la 0.0.6. - -| Version | Notas del lanzamiento | -| :-: | --- | -| 0.0.7 | Agregado de clases `TransactionReceipt` y `Log` a los tipos de Ethereum
    Agregado el campo `receipt` al objeto Ethereum Event | -| 0.0.6 | Agregado el campo `nonce` al objeto Ethereum Transaction
    Agregado `baseFeePerGas` al objeto Ethereum Block | -| 0.0.5 | AssemblyScript actualizado a la versión 0.19.10 (esto incluye cambios importantes, consulte la [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renombrado a `ethereum.transaction.gasLimit` | -| 0.0.4 | Agregado el campo `functionSignature` al objeto Ethereum SmartContractCall | -| 0.0.3 | Agregado el campo `from` al objeto Ethereum Call
    `etherem.call.address` renombrado `ethereum.call.to` | -| 0.0.2 | Agregado el campo `input` al objeto Ethereum Transaction | - -### Tipos Incorporados - -La documentación sobre las actualizaciones integradas en AssemblyScript puedes encontrarla en la [wiki de AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -Las siguientes integraciones son proporcionadas por `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` representa una matriz de `u8`. - -_Construcción_ - -- `fromI32(x: i32): ByteArray` - Descompone `x` en bytes. -- `fromHexString(hex: string): ByteArray` - La longitud de la entrada debe ser uniforme. El prefijo con `0x` es opcional. - -_Tipo de conversiones_ - -- `toHexString(): string` - Se convierte en una cadena hexadecimal con el prefijo `0x`. -- `toString(): string` - Interpreta los bytes como una cadena UTF-8. -- `toBase58(): string` - Codifica los bytes en una cadena base58. -- `toU32(): u32` - Interpeta los bytes como una little-endian `u32`. Se ejecuta en casos de un overflow. -- `toI32(): i32` - Interpreta la matriz de bytes como `i32` little-endian. Se ejecuta en casos de un overflow. - -_Operadores_ - -- `equals(y: ByteArray): bool` – se puede escribir como `x == y`. -- `concat(other: ByteArray) : ByteArray` - regresa un nuevo `ByteArray` que consiste en `this` directamente seguido por `other` -- `concatI32(other: i32) : ByteArray` - devuelve un nuevo `ByteArray` que consta de `this` seguido directamente de la representación de bytes de `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` se usa para representar una precisión decimal arbitraria. - -> Nota: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` es almacenado en [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), que admite 34 dígitos decimales de significante. Esto hace que `BigDecimal` sea inadecuado para representar tipos de punto fijo que pueden abarcar más de 34 dígitos, como un Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) o equivalente. - -_Construcción_ - -- `constructor(bigInt: BigInt)` – creará un `BigDecimal` en base a un `BigInt`. -- `static fromString(s: string): BigDecimal` – analiza una cadena de decimales. - -_Conversiones de tipo_ - -- `toString(): string` – imprime en una cadena decimal. - -_Matemática_ - -- `plus(y: BigDecimal): BigDecimal` – puede escribirse como `x + y`. -- `minus(y: BigDecimal): BigDecimal` – puede escribirse como `x - y`. -- `times(y: BigDecimal): BigDecimal` – puede escribirse como `x * y`. -- `div(y: BigDecimal): BigDecimal` – puede escribirse como `x / y`. -- `equals(y: BigDecimal): bool` – puede escribirse como `x == y`. -- `notEqual(y: BigDecimal): bool` – puede escribirse como `x != y`. -- `lt(y: BigDecimal): bool` – puede escribirse como `x < y`. -- `lt(y: BigDecimal): bool` – puede escribirse como `x < y`. -- `gt(y: BigDecimal): bool` – puede escribirse como `x > y`. -- `ge(y: BigDecimal): bool` – puede escribirse como `x >= y`. -- `neg(): BigDecimal` - puede escribirse como `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` es usado para representar números enteros grandes. Esto incluye valores de Ethereum de tipo `uint32` hasta `uint256` y `int64` hasta `int256`. Todo por debajo de `uint32`. como el `int32`, `uint24` o `int8` se representa como `i32`. - -La clase `BigInt` tiene la siguiente API: - -_Construcción_ - -- `BigInt.fromI32(x: i32): BigInt` – creará un `BigInt` en base a un `i32`. -- `BigInt.fromString(s: string): BigInt`– Analiza un `BigInt` desde una cadena. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interpreta `bytes` como un número entero little-endian sin firma. Si su entrada es big-endian, llame primero a `.reverse()`. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interpreta `bytes` como un número entero little-endian con firma. Si su entrada es big-endian, llame primero a `.reverse()`. - - _Tipo de conversiones_ - -- `x.toHex(): string` - transforma `BigInt` en una cadena de caracteres hexadecimales. -- `x.toString(): string` – transforma `BigInt` en una cadena de números decimales. -- `x.toI32(): i32`: devuelve `BigInt` como `i32`; falla si el valor no encaja en `i32`. Es una buena idea verificar primero `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - se convierte en un decimal sin parte fraccionaria. - -_Matemática_ - -- `x.plus(y: BigInt): BigInt` – puede ser escrito como `x + y`. -- `x.minus(y: BigInt): BigInt` – puede ser escrito como `x - y`. -- `x.times(y: BigInt): BigInt` – puede ser escrito como `x * y`. -- `x.div(y: BigInt): BigInt` – puede ser escrito como `x / y`. -- `x.mod(y: BigInt): BigInt` – puede ser escrito como `x % y`. -- `x.equals(y: BigInt): bool` – puede ser escrito como `x == y`. -- `x.notEqual(y: BigInt): bool` – puede ser escrito como `x != y`. -- `x.lt(y: BigInt): bool` – puede ser escrito como `x < y`. -- `x.le(y: BigInt): bool` – puede ser escrito como `x <= y`. -- `x.gt(y: BigInt): bool` – puede ser escrito como `x > y`. -- `x.ge(y: BigInt): bool` – puede ser escrito como `x >= y`. -- `x.neg(): BigInt` – puede ser escrito como `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divide por un decimal, dando un resultado decimal. -- `x.isZero(): bool` – Conveniencia para comprobar si el número es cero. -- `x.isI32(): bool` – Comprueba si el número encaja en un `i32`. -- `x.abs(): BigInt` –Valor absoluto. -- `x.pow(exp: u8): BigInt` – Exponenciación. -- `bitOr(x: BigInt, y: BigInt): BigInt` puede ser escrito como `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – puede ser escrito como `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – puede ser escrito como `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – puede ser escrito como `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` se puede utilizar para almacenar pares key-value. Ver [este ejemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -La `TypedMap` clase tiene la siguiente API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – establece el valor del `key` a `value` -- `map.getEntry(key: K): TypedMapEntry | null` – devuelve el par key-value de un `key` o `null` si el `key` no existe en el mapa -- `map.get(key: K): V | null` – returna el valor de una `key` o `null` si el `key` no existe en el mapa -- `map.isSet(key: K): bool` – returna `true` si el `key` existe en el mapa y `false` no es asi - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` se utiliza para representar matrices de bytes de longitud arbitraria. Esto incluye valores de Ethereum de tipo `bytes`, `bytes32`, etc. - -La clase `Bytes` extiende [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) de AssemblyScript y esto soporta todas las funcionalidades de `Uint8Array`, mas los siguientes nuevos métodos: - -_Construcción_ - -- `fromHexString(hex: string) : Bytes` - Convierte el string `hex` que debe consistir en un número par de dígitos hexadecimales a un `ByteArray`. El string `hex` puede opcionalmente comenzar con `0x` -- `fromI32(i: i32) : Bytes` - Convierte `i` en un matriz de bytes - -_Tipo de conversiones_ - -- `b.toHex()` – devuelve una cadena hexadecimal que representa los bytes en la matriz -- `b.toString()` – convierte los bytes en la matriz a una cadena de caracteres unicode -- `b.toBase58()` – convierte un valor Ethereum Bytes en codificacion base58 (usada para los hashes IPFS) - -_Operadores_ - -- `b.concat(other: Bytes) : Bytes` - - retorna nuevo `Bytes` consistente en `this` directamente seguido por `other` -- `b.concatI32(other: i32) : ByteArray` - retorna un nuevo `Bytes` que consistente de `this` seguido directamente de la representacion byte de `other` - -#### Dirección - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extiende `Bytes` para representar valores de Ethereum `address`. - -Añade el siguiente método sobre la API `Bytes`: - -- `Address.fromString(s: string): Address` – crea una `Address` desde una cadena hexadecimal -- `Address.fromBytes(b: Bytes): Address` – crea un `Address` desde `b` que debe tener exactamente 20 bytes de longitud. Pasar un valor con menos o mas bytes resultará en un error - -### Almacén de API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -La API `store` permite cargar, guardar y eliminar entidades desde y hacia el almacén de Graph Node. - -Las entidades escritas en el store asignan uno a uno a los tipos `@entity` definidos en el esquema GraphQL del subgrafo. Para facilitar el trabajo con estas entidades, el comando `graph codegen` proporcionado por [Graph CLI](https://github.com/graphprotocol/graph-cli) genera las clases de entidades, que son subclases de `Entity` de tipo integrado, con captadores y definidores de propiedades para los campos en el esquema, así como métodos para cargar y guardar estas entidades. - -#### Creacion de entidades - -El siguiente es un patrón común para crear entidades a partir de eventos de Ethereum. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -Cuando se encuentra un evento `Transfer` mientras se procesa la cadena, se pasa al handler de eventos `handleTransfer` utilizando el tipo generado `Transfer` (con el alias de `TransferEvent` aquí para evitar un conflicto de nombres con el tipo de entidad). Este tipo permite acceder a datos como la transacción padre del evento y sus parámetros. - -Cada entidad debe tener un identificador único para evitar colisiones con otras entidades. Es bastante común que los parámetros de los eventos incluyan un identificador único que pueda ser utilizado. Nota: El uso del hash de la transacción como ID asume que ningún otro evento en la misma transacción crea entidades con este hash como ID. - -#### Carga de entidades desde el store - -Si una entidad ya existe, se puede cargar desde el store con lo siguiente: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -Como la entidad puede no existir todavía en el almacén, el método `load` devuelve un valor de tipo `Transfer | null`. Por lo tanto, puede ser necesario comprobar el caso `null` antes de utilizar el valor. - -> **Nota:** La carga de entidades sólo es necesaria si los cambios realizados en el mapeo dependen de los datos anteriores de una entidad. Consulta en la siguiente sección las dos formas de actualizar las entidades existentes. - -#### Buscando entidades creadas dentro de un bloque - -A partir de `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 y `@graphprotocol/graph-cli` v0.49.0, el método `loadInBlock` está disponible para todos los tipos de entidades. - -La API de almacenamiento facilita la recuperación de entidades que se crearon o actualizaron en el bloque actual. Una situación típica para esto es cuando un handler crea una Transacción a partir de algún evento en la cadena, y un handler posterior quiere acceder a esta transacción si existe. En el caso de que la transacción no exista, el subgrafo tendrá que ir a la base de datos solo para averiguar que la entidad no existe; si el autor del subgrafo ya sabe que la entidad debe haber sido creada en el mismo bloque, el uso de loadInBlock evita este viaje de ida y vuelta a la base de datos. Para algunos subgrafos, estas búsquedas perdidas pueden contribuir significativamente al tiempo de indexación. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Usa la identidad de transferencia como se indica arriba -``` - -> Nota: si no hay ninguna entidad creada en el bloque dado, `loadInBlock` devolverá `null`, incluso si hay una entidad con la ID dada en el almacenamiento. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Actualización de las entidades existentes - -Hay dos maneras de actualizar una entidad existente: - -1. Cargar la entidad con, por ejemplo `Transfer.load(id)`, establecer propiedades en la entidad, entonces `.save()` de nuevo en el store. -2. Simplemente crear una entidad con, por ejemplo `new Transfer(id)`, establecer las propiedades en la entidad, luego `.save()` en el store. Si la entidad ya existe, los cambios se fusionan con ella. - -Cambiar las propiedades es sencillo en la mayoría de los casos, gracias a los definidores de propiedades generados: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -También es posible desajustar las propiedades con una de las dos instrucciones siguientes: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -Esto sólo funciona con propiedades opcionales, es decir, propiedades que se declaran sin un `!` en GraphQL. Dos ejemplos serían `owner: Bytes` o `amount: BigInt`. - -La actualización de las propiedades de la matriz es un poco más complicada, ya que al obtener una matriz de una entidad se crea una copia de esa matriz. Esto significa que las propiedades de la matriz tienen que ser establecidas de nuevo explícitamente después de cambiar la matriz. Lo siguiente supone que la `entity` tiene un campo `numbers: [BigInt!]!`. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Eliminar entidades del store - -Actualmente no hay forma de eliminar una entidad a través de los tipos generados. En su lugar, la eliminación de una entidad requiere pasar el nombre del tipo de entidad y el ID de la entidad a `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### API de Ethereum - -La API de Ethereum proporciona acceso a los contratos inteligentes, a las variables de estado públicas, a las funciones de los contratos, a los eventos, a las transacciones, a los bloques y a la codificación/decodificación de los datos de Ethereum. - -#### Compatibilidad con los tipos de Ethereum - -Al igual que con las entidades, `graph codegen` genera clases para todos los contratos inteligentes y eventos utilizados en un subgrafo. Para ello, las ABIs de los contratos deben formar parte de la fuente de datos en el manifiesto del subgrafo. Normalmente, los archivos ABI se almacenan en una carpeta `abis/`. - -Con las clases generadas, las conversiones entre los tipos de Ethereum y los tipos [built-in types](#built-in-types) tienen lugar detras de escena para que los autores de los subgrafos no tengan que preocuparse por ellos. - -El siguiente ejemplo lo ilustra. Dado un esquema de subgrafos como - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -y un evento de firma `Transfer(address,address,uint256)` en Ethereum, el `from`, `to` y `amount` valores del tipo `address`, `address` y `uint256` se convierten a `Address` y `BigInt`, lo que permite pasarlos a las propiedades `Bytes!` y `BigInt!` de la entidad `Transfer`: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Eventos y datos de bloques/transacciones - -Los eventos de Ethereum pasados a los handlers de eventos, como el evento `Transfer` de los ejemplos anteriores, no sólo proporcionan acceso a los parámetros del evento, sino también a su transacción padre y al bloque del que forman parte. Los siguientes datos pueden obtenerse de las instancias de `event` (estas clases forman parte del módulo `ethereum` en `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Acceso al Estado del Contrato Inteligente - -El código generado por `graph codegen` también incluye clases para los contratos inteligentes utilizados en el subgrafo. Estas se pueden utilizar para acceder a las variables de estado públicas y llamar a las funciones del contrato en el bloque actual. - -Un patrón común es acceder al contrato desde el que se origina un evento. Esto se consigue con el siguiente código: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` tiene un alias de `TransferEvent` aquí para evitar un conflicto de nombres con el tipo de entidad - -Siempre que el `ERC20Contract` de Ethereum tenga una función pública de sólo lectura llamada `symbol`, se puede llamar con `.symbol()`. Para las variables de estado públicas se crea automáticamente un método con el mismo nombre. - -Cualquier otro contrato que forme parte del subgrafo puede ser importado desde el código generado y puede ser vinculado a una dirección válida. - -#### Tratamiento de las Llamadas Revertidas - -Si los métodos de sólo lectura de tu contrato pueden revertirse, entonces debes manejar eso llamando al método del contrato generado prefijado con `try_`. Por ejemplo, el contrato Gravity expone el método `gravatarToOwner`. Este código sería capaz de manejar una reversión en ese método: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Ten en cuenta que un nodo Graph conectado a un cliente Geth o Infura puede no detectar todas las reversiones, si confías en esto te recomendamos que utilices un nodo Graph conectado a un cliente Parity. - -#### Codificación/Descodificación ABI - -Los datos pueden ser codificados y decodificados según el formato de codificación ABI de Ethereum utilizando las funciones `encode` y `decode` del módulo `ethereum`. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -Para mas informacion: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Codificación/descodificación [Librería Rust/CLI](https://github.com/rust-ethereum/ethabi) -- Un ejemplo más [complejo](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### API de Registro - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -La API `log` permite a los subgrafos registrar información en la salida estándar del Nodo Graph así como en Graph Explorer. Los mensajes pueden ser registrados usando diferentes niveles de registro. Se proporciona una sintaxis de cadena de formato básico para redactar mensajes de registro a partir del argumento. - -La API `log` incluye las siguientes funciones: - -- `log.debug(fmt: string, args: Array): void` - registra un mensaje de depuración. -- `log.debug(fmt: string, args: Array): void` - registra un mensaje informativo. -- `log.warning(fmt: string, args: Array): void` - registra una advertencia. -- `log.error(fmt: string, args: Array): void` - registra un mensaje de error. -- `log.critical(fmt: string, args: Array): void` – registra un mensaje crítico _y_ termina el subgrafo. - -La API `log` toma una cadena de formato y una matriz de valores de cadena. Luego reemplaza los marcadores de posición con los valores de cadena de la matriz. El primer marcador de posición `{}` se reemplaza por el primer valor de la matriz, el segundo marcador de posición `{}` se reemplaza por el segundo valor y así sucesivamente. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Registro de uno o varios valores - -##### Registro de un solo valor - -En el ejemplo siguiente, el valor del string "A" se pasa a un array para convertirse en`['A']` antes de ser registrado: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Registro de una sola entrada de una matriz existente - -En el ejemplo siguiente, sólo se registra el primer valor de la matriz de argumentos, a pesar de que la matriz contiene tres valores. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Registro de múltiples entradas de una matriz existente - -Cada entrada del array de argumentos requiere su propio marcador de posición `{}` en el string del mensaje de registro. El siguiente ejemplo contiene tres marcadores de posición `{}` en el mensaje de registro. Debido a esto, los tres valores en `myArray` se registran. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Registro de una entrada específica de una matriz existente - -Para mostrar un valor específico en el array, se debe proporcionar el valor indexado. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Registro de información de eventos - -El ejemplo siguiente registra el número de bloque, el hash del bloque y el hash de la transacción de un evento: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### API IPFS - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Los contratos inteligentes anclan ocasionalmente archivos IPFS en la cadena. Esto permite a los mapeos obtener los hashes de IPFS del contrato y leer los archivos correspondientes de IPFS. Los datos de los archivos se devolverán como `Bytes`, lo que normalmente requiere un procesamiento posterior, por ejemplo, con la API `json` documentada más adelante en esta página. - -Dado un hash o ruta de IPFS, la lectura de un archivo desde IPFS se realiza de la siguiente manera: - -```typescript -// Colocar esto dentro del gestor de eventos del mapeo -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Rutas como `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// que incluye documentos en directorios que son soportados -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Nota:** `ipfs.cat` no es determinístico por el momento. Si el archivo no puede ser recuperado a través de la red IPFS antes de que se agote el tiempo de espera de la solicitud, devolverá `null`. Debido a esto, siempre vale la pena comprobar el resultado de `null`. - -También es posible procesar archivos de mayor tamaño en forma de flujo con `ipfs.map`. La función espera el hash o la ruta de un archivo IPFS, el nombre de una callback y banderas para modificar su comportamiento: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -La única bandera actualmente soportada es `json`, que debe ser pasada a `ipfs.map`. Con la bandera `json`, el archivo IPFS debe consistir en una serie de valores JSON, un valor por línea. La llamada a `ipfs.map` leerá cada línea del archivo, la deserializará en un `JSONValue` y llamará a la callback para cada una de ellas. La callback puede entonces utilizar operaciones de entidad para almacenar los datos del `JSONValue`. Los cambios de entidad se almacenan sólo cuando el handler que llamó a `ipfs.map` termina con éxito; mientras tanto, se mantienen en memoria, y el tamaño del archivo que `ipfs.map` puede procesar es, por tanto, limitado. - -En caso de éxito, `ipfs.map` devuelve `void`. Si alguna invocación de la callback causa un error, el handler que invocó `ipfs.map` es abortado, y el subgrafo es marcado como fallido. - -### API Cripto - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -La API `crypto` pone a disposición una serie de funciones criptográficas para su uso en los mapeos. En este momento, sólo hay una: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### API JSON - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -Los datos JSON pueden ser analizados utilizando la API `json`: - -- `json.fromBytes(data: Bytes): JSONValue` - analiza los datos JSON a partir de una matriz `Bytes` interpretada como una secuencia UTF-8 válida -- `json.try_fromBytes(data: Bytes): Result` - versión segura de `json.fromBytes`, devuelve una variante de error si el análisis sintáctico falló -- `json.fromString(data: string): JSONValue` - analiza los datos JSON a partir de una `String` válida en UTF-8 -- `json.try_fromString(data: string): Result` - versión segura de `json.fromString`, devuelve una variante de error si el análisis sintáctico falló - -La clase `JSONValue` proporciona una forma de extraer valores de un documento JSON arbitrario. Como los valores JSON pueden ser booleans, números, matrices y más, `JSONValue` viene con una propiedad `kind` para comprobar el tipo de un valor: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -Además, existe un método para comprobar si el valor es `null`: - -- `value.isNull(): boolean` - -Cuando el tipo de un valor es cierto, se puede convertir a un [built-in type](#built-in-types) utilizando uno de los siguientes métodos: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (y luego convertir `JSONValue` con uno de los 5 métodos anteriores) - -### Referencias de Tipo de Conversiones - -| Origen(es) | Destino | Funcion de Conversion | -| -------------------- | -------------------- | ---------------------------- | -| Dirección | Bytes | ninguno | -| Dirección | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | ninguno | -| Bytes (firmado) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (sin firma) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | ninguno | -| int32 | i32 | ninguno | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | ninguno | -| int64 - int256 | BigInt | ninguno | -| uint32 - uint256 | BigInt | ninguno | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Matriz | s.toArray() | -| JSON | Object | s.toObject() | -| String | Dirección | Address.fromString(s) | -| Bytes | Dirección | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Metadatos de la Fuente de Datos - -Puedes inspeccionar la dirección del contrato, la red y el contexto de la fuente de datos que invocó el handler a través del espacio de nombres `dataSource`: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity y DataSourceContext - -La clase base `Entity` y la clase hija `DataSourceContext` tienen ayudantes para establecer y obtener campos de forma dinámica: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Problemas comunes de AssemblyScript - -Hay ciertos problemas de [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) que son comunes durante el desarrollo de subgrafos. Varían en dificultad de depuración, sin embargo, ser consciente de ellos puede ayudar. La siguiente es una lista no exhaustiva de estos problemas: - -- Las variables de clase `Private` no se aplican en [AssembyScript](https://www.assemblyscript.org/status.html#language-features). No hay forma de proteger las variables de clase para que no se cambien directamente desde el objeto de clase. -- El alcance no se hereda en las [closure functions](https://www.assemblyscript.org/status.html#on-closures), es decir, las variables declaradas fuera de las closure functions no se pueden usar. Explicación en [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/es/network-transition-faq.mdx b/website/pages/es/network-transition-faq.mdx deleted file mode 100644 index 51ce714ec127..000000000000 --- a/website/pages/es/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Preguntas Frecuentes sobre la Transición de la Red ---- - -Los desarrolladores tendrán suficiente tiempo para migrar sus subgrafos a la red descentralizada. Los plazos exactos variarán de una red a otra en función de la preparación del Indexador y de la red. El Servicio Alojado no dejará de admitir todas las redes a la vez ni se suspenderá de forma abrupta. - -Cada red en el Servicio Alojado, incluyendo Ethereum, se suspenderá gradualmente a medida que sea compatible en la red descentralizada para lograr la paridad de características y una alta calidad de servicio. Esto ocurrirá de manera individual para cada red con la ayuda de los Indexadores en el programa [MIPs](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), para permitir el soporte completo de cada red en la red descentralizada. - -Para brindar mayor claridad sobre el soporte continuo para cada red en el Servicio Alojado, estas Preguntas Frecuentes responden a las preguntas más comunes sobre los detalles del proceso de transición de red. Si deseas comenzar el proceso de migración del subgrafo ahora, aquí tienes una [guía paso a paso](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). Para ir directamente a las Preguntas Frecuentes sobre migración, [haz clic aquí](#migration-faqs). - -## Preguntas Frecuentes sobre la Desaparición del Servicio Alojado - -### ¿Tendré que migrar mi subgrafo antes de que la red descentralizada sirva para las funciones básicas de los subgrafos? - -Los desarrolladores de subgrafos pueden comenzar a migrar sus subgrafos de Ethereum mainnet ahora, pero no se les obligará a migrar los subgrafos a la red antes de que exista una funcionalidad principal para la red descentralizada y el Servicio Alojado. La migración de los subgrafos de la red de Gnosis también comenzará pronto, y se seguirán otras redes una vez que los Indexadores hayan probado las redes y estén listos para indexarlas en producción. - -### ¿Cuál es el plazo y el proceso para deprecar el Servicio Alojado? - -Todas las redes tendrán sus propios plazos, dependiendo de cuándo se habiliten en la red y el tiempo que lleve pasar por cada fase. Los core devs están trabajando para migrar la mayor parte del tráfico del Servicio Alojado a la red descentralizada lo antes posible. - -Lo más importante es que no perderás el acceso al Servicio Alojado antes de que esté disponible la funcionalidad principal para tu red/subgrafo específico en la red descentralizada. - -Las tres fases distintas de la descontinuación del Servicio Alojado para cada red son: - -#### Fase 1 (The Sunray): Desactivar la creación de nuevos subgrafos para las blockchains que tengan paridad de calidad en la red - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -Ninguna red ha comenzado aún la Fase 1 de transición del Servicio Alojado a la red descentralizada. - -A medida que las redes ingresan a la Fase 1, es importante tener en cuenta que los desarrolladores aún pueden utilizar la URL de vista previa limitada para desarrolladores en Subgraph Studio para desarrollar y probar sus subgrafos (hasta 1,000 consultas gratuitas) sin necesidad de adquirir GRT o interactuar con la economía del protocolo. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -No hay plazos exactos para cuándo una red pasará a esta fase, ya que el proceso está impulsado por los criterios de salida relacionados con la funcionalidad principal, no por fechas. - -#### Fase 3 (The Sunrise): Desactivar la consulta de subgrafos - -En esta fase, los subgrafos en el Servicio Alojado para las redes compatibles con The Graph Network dejarán de procesar consultas. La única forma de realizar consultas de datos de blockchain para los subgrafos en redes en esta fase será a través de la red descentralizada. Las consultas de prueba seguirán estando disponibles en [Subgraph Studio](https://thegraph.com/studio/) a través de la URL de consulta de desarrollo. - -Las redes no pasarán a la Fase 3 hasta que hayan completado exitosamente la Fase 2 y hayan brindado a los desarrolladores tiempo suficiente para migrar a la red descentralizada. - -![Gráfico del subgrafo](/img/subgraph-chart.png) - -> Nota: Este diagrama refleja el proceso de cese por red. Los tiempos de cese del Servicio Alojado variarán y no se terminarán todos al mismo tiempo. - -### ¿Qué sucede con las redes de prueba como Goerli, Mumbai, etc? - -Todas las redes y redes de prueba son elegibles para obtener una URL de consulta de deploy gratuita en [Subgraph Studio](https://thegraph.com/studio/). Esta URL tiene una limitación de velocidad y está destinada al tráfico de pruebas y desarrollo. Para el tráfico de producción, se requerirá un subgrafo publicado en The Graph Network para contar con redundancia y estabilidad de calidad de producción. - -![Límite de la tarifa](/img/rate-limit.png) - -### ¿Tiene The Graph Network las mismas funcionalidades que el Servicio Alojado? - -Los Indexadores de The Graph Network ejecutan la [versión más reciente de Graph Node](https://github.com/graphprotocol/graph-node/releases) aprobada por la red, y pueden soportar cualquier feature del subgrafo soportada en esa versión. - -A veces, los features no publicados que aún están en desarrollo pueden estar disponibles primero en la Developer Preview URL, que ejecuta el último commit principal de [Graph Node](https://github.com/graphprotocol/graph-node). Estas características estarán disponibles en la red con la próxima versión de Graph Node. - -Algunos features de los subgrafos no son elegibles para las recompensas de indexación, si no son deterministas o verificables en la red. Ejemplos específicos son la obtención de archivos de IPFS y la indexación de redes que aún no son compatibles con The Graph Network. - -Los subgrafos con estos features pueden ser publicados en la red, pero puede que no sean recogidos por los Indexadores. Sin embargo, los subgrafos con suficiente señal pueden seguir atrayendo a los Indexadores interesados en cobrar las tasas de consulta, a las que puede optar cualquier subgrafo. - -### ¿Cuánto cuesta The Graph Network en comparación con el funcionamiento de mi propia infraestructura? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### ¿Hay algo que deba hacer con mi subgrafo del Servicio Alojado después de migrar a la red? - -Se recomienda encarecidamente ocultar el subgrafo del Servicio Alojado para evitar confusiones. [Este vídeo](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) explica el proceso. - -### ¿Cuándo admitirá la red descentralizada mi red preferida? - -No hay un plazo establecido por red, ya que esto estará determinado por la preparación de los Indexadores a través del [programa MIPs](https://thegraph.com/migration-incentive-program/), donde se prueban las nuevas redes por parte de los Indexadores. A medida que se admitan nuevas redes en la red, los usuarios recibirán notificaciones suficientes para prepararse para la migración. Los core devs y los colaboradores del ecosistema de The Graph están trabajando para implementar el soporte de más redes lo antes posible. - -### ¿Está entrando la mainnet de Ethereum en la Fase 1 del proceso de transición de la red? - -Aunque en un principio se preveía que Ethereum comenzara la transición del Servicio Alojado a finales del tercer trimestre de 2022, esto se ha [pospuesto](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) para atender al feedback de los usuarios. Las mejoras adicionales en la experiencia del usuario, la facturación y otros cumplimientos de las peticiones de los usuarios impulsarán el calendario de transición del Servicio Alojado de Ethereum. Manténte al día sobre cuándo Ethereum entrará en la fase de The Sunray a través del rastreador del estado de la integración a continuación y a través del [Twitter de The Graph.](https://twitter.com/graphprotocol) - -### Seguimiento del estado de la integración de The Graph Network - -La tabla a continuación ilustra en qué etapa se encuentra cada red en el proceso de integración en la red. Si tu red preferida aún no aparece en la lista, significa que la integración aún no ha comenzado y esa red sigue siendo completamente compatible con el Servicio Alojado de The Graph. - -> Esta tabla no incluirá redes de prueba, las cuales seguirán siendo gratuitas en [Subgraph Studio](https://thegraph.com/studio/). - -| Red | Anuncio de integración en The Graph Network | Integración de la red completa | Fase 1: inhabilitar nuevos subgrafos en el Servicio Alojado | Phase 2: disable subgraph updates on hosted service | Fase 3: inhabilitar subgrafos en el Servicio Alojado | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (Anteriormente xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* La red se encuentra actualmente en fase beta en la red descentralizada de The Graph. - -## Preguntas frecuentes sobre Tarifas de Consulta, Claves API, y Facturación - -### ¿Cómo se establece el precio de las tarifas de consulta? - -Los precios de las Tarifas de Consulta se ven afectados por la demanda de consultas en la red descentralizada. Los core devs crearon un lenguaje del modelo de fijación de costes de las consultas llamado[ Agora](https://github.com/graphprotocol/agora). Esto permite a los Indexadores fijar el precio de las consultas de forma eficiente. Obtén más información en la [documentación de Agora](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### ¿Cómo puedo establecer un presupuesto máximo de consulta? - -Los usuarios pueden establecer un presupuesto máximo de consulta en la sección de [Clave API](https://thegraph.com/studio/apikeys/) del Subgraph Studio, en la pestaña de Presupuesto. [Ve este vídeo](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) para obtener una visión general de ese proceso, así como para ajustar otras partes de tu clave de API. - -Ten en cuenta que si estableces un presupuesto máximo de consultas demasiado bajo, excluirás a los Indexadores, lo que puede dar lugar a un servicio de baja calidad en forma de consultas fallidas, consultas lentas, etc. - -A partir de finales de septiembre de 2022, la mejor práctica es mantenerse dentro del rango de 0,00035 a 0,0004 dólares como el menor presupuesto de consulta máximo. - -### ¿Cómo puedo proteger mi clave API? - -Se anima a los usuarios a restringir la clave de la API tanto por subgrafo como por dominio en el [Subgraph Studio](https://thegraph.com/studio/): - -![Restringir el dominio](/img/restrictdomain.png) - -### ¿Cómo puedo rellenar mi clave API para pagar las tasas de consulta? - -Puedes rellenar tu saldo de facturación en el [Panel de Facturación](https://thegraph.com/studio/billing/) del Subgraph Studio pulsando el botón "Añadir GRT". Se está trabajando en la mejora de esta experiencia para añadir pagos más fluidos y recurrentes. - -[Este vídeo](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) ofrece una visión general de ese proceso. - -### ¿Cómo puedo establecer alertas de saldos de facturación bajos en mi clave API? - -Los usuarios deben establecer una alerta de facturación a su dirección de correo electrónico [aquí](https://thegraph.com/studio/settings/). - -Además, un banner parpadeará en la interfaz de usuario para avisar cuando el saldo de facturación sea bajo. - -¿Cuáles son las mejores prácticas para gestionar la configuración de mi clave API? - -Se recomienda un presupuesto máximo de consulta de 0,0004 dólares para mantener un precio promedio de consulta bajo y al mismo tiempo una alta calidad de servicio. Esto se puede hacer en la pestaña de facturación de presupuesto de la [sección de Clave API](https://thegraph.com/studio/apikeys/). - -## Preguntas Frecuentes sobre la Migración - -### ¿Cómo puedo migrar mi subgrafo a la red descentralizada de The Graph? - -Aprende a migrar tu subgrafo a The Graph Network con esta sencilla [guía paso a paso](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) o con [este vídeo](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### ¿Existe algún tipo de apoyo financiero/técnico/de marketing durante el proceso de migración del ecosistema de The Graph? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### ¿Cuánto tiempo tardan las consultas? - -Las consultas tardan una media de 150-300 milisegundos en la red descentralizada. - -### ¿Es el proceso de facturación en The Graph Network más complejo que en el Servicio Alojado? - -Sí, la UX de la red todavía no está a la altura de la calidad del Servicio Alojado. La UX de facturación, en particular, está todavía en sus primeras etapas y hay muchas partes cambiantes que los equipos de core devs están trabajando para abstraer del proceso. Muchas de estas mejoras se harán públicas en un futuro próximo. - -### ¿Puedo pagar las consultas de The Graph Network en fiat, tarjeta de crédito o stablecoins? - -En los próximos meses, se reducirá enormemente el número de pasos que los usuarios deben dar para pagar por sus subgrafos. Aunque los pagos se seguirán realizando en GRT, ya se está trabajando en la implantación de una rampa de entrada de fiat y de sistemas de pago automatizados para convertir fiat y cripto en GRT para realizar pagos recurrentes. - -### ¿Tendrá la red la misma UX que el Servicio Alojado? - -Aunque todavía queda trabajo por hacer, el objetivo es ofrecer una UX de calidad comparable, si no mejor, en The Graph Network que la que existe actualmente en el Servicio Alojado. A corto plazo, el objetivo es ofrecer una experiencia de facturación más ágil y predecible que ayude a los usuarios a dedicar más tiempo a crear dApps de alta calidad. - -### ¿Cómo puedo asegurarme de que mi subgrafo será recogido por un Indexador en The Graph Network? - -Se recomienda curar con al menos 10.000 GRT, lo que los usuarios pueden hacer en la misma transacción que cuando publican. Los usuarios también pueden pedir a la comunidad de curadores que curen su subgrafo [aquí](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### ¿Por qué un subgrafo necesita señal de los Curadores? ¿Qué pasa si no hay suficiente señal en mi subgrafo por parte de los Curadores? - -Cuanto más alta sea la señal de curación, más atractivo será un subgrafo para los Indexadores, ya que existe una correlación lineal entre una señal más alta y mayores recompensas de indexación. Sin curación, no hay incentivo para que los Indexadores recojan un subgrafo. - -### ¿Qué ocurre con el GRT que un desarrollador de subgrafos utiliza para la señal de curación? - -Si eres el primero en señalar un subgrafo, tu cantidad de GRT señalada no disminuirá. El GRT utilizado para la curación puede ser removido posteriormente. Además, los curadores obtienen el 10% de todas las tasas de consulta que reciben los Indexadores. - -### ¿Qué mejoras se van a introducir en el proceso de curación? - -A corto plazo, el modelo inicial de curación en Arbitrum proporcionará principle-protection a la señal de curación. A largo plazo, los core devs darán prioridad a ofrecer a los developers la capacidad de alquilar la señal de curación, abriendo una experiencia de precios más predecible mientras se garantiza que los subgrafos están suficientemente indexados. - -### ¿Cómo puedo cambiar la API del subgrafo en el front-end? - -Después de que al menos un Indexador haya indexado completamente un subgrafo, un usuario puede consultar la red descentralizada. - -Para recuperar la URL de consulta de tu subgrafo, puedes copiar/pegar haciendo clic en el símbolo que aparece junto a la URL de consulta. Verás algo así: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simplemente sustituye [api-key] por una clave API generada en la [sección de claves API](https://thegraph.com/studio/apikeys/) de Subgraph Studio. - -### ¿Cuánto cuestan las consultas? - -El coste promedio de la consulta dentro de la red varía. En el mes de septiembre de 2022, el precio promedio por tarifa de consulta osciló entre 0,00012 y 0,00020 dólares. - -### ¿Cómo puedo saber qué volumen tiene mi subgrafo y cuánto va a costar? - -Los datos de volumen del Servicio Alojados no son públicos. Por favor comunícate [aquí](mailto:migration@thegraph.foundation) para obtener estimaciones de volumen y costes. - -### ¿Cómo funciona el Gateway? ¿Está totalmente descentralizado? - -El Gateway procesa las consultas para que los Indexadores puedan servir a las dApps. El Gateway está en una fase intermedia que se está descentralizando progresivamente. Más sobre esto pronto. - -## Preguntas Frecuentes sobre el uso de la red - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### ¿Cómo puedo acelerar el tiempo de sincronización? - -Minimiza el uso de llamadas a contratos inteligentes dentro del subgrafo. Acceder al estado de un contrato inteligente requiere una eth_call a la RPC, lo que ralentiza los tiempos de sincronización. - -### ¿Existe soporte para multisig en el Subgraph Studio al migrar? - -Sí, recientemente se ha añadido la compatibilidad con multisig. Puedes encontrar más información [aquí](https://thegraph.com/docs/studio/multisig). - -### ¿Cuáles son las direcciones de los contratos de GRT en Ethereum y Polygon? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### ¿Qué cantidad de GRT suelen guardar los proyectos en su clave API? - -Muchos proyectos guardan 30-60 días de GRT en su clave API, por lo que no necesitan rellenarla a menudo. Para saber cuáles serían tus tarifas de 30-60 días de GRT, ponte en contacto [aquí](mailto:migration@thegraph.foundation). - -### ¿Cómo se realizan los pagos de las consultas en la red descentralizada?  - -Las tarifas se facturan semanalmente y se extraen de la clave API del usuario, con GRT que es bridgeado y permanece en Arbitrum. - -### ¿Cómo se utilizan las claves API para los subgrafos en la red descentralizada? - -Las claves API permiten a los usuarios opinar tanto sobre los precios máximos de consulta que pagan como priorizar factores como el precio, la frescura económica y la velocidad de consulta. - -### ¿Cómo se compara actualmente la calidad del servicio entre el Servicio Alojado y la red descentralizada? - -El Servicio Alojado y la red descentralizada tienen más o menos la misma latencia media, pero la red descentralizada tiende a tener una latencia mayor en los percentiles más altos. Los índices de 200 para las consultas son en general similares, con ambos > 99,9%. Como resultado de su descentralización, la red no ha tenido una interrupción amplia en los subgrsfos, mientras que el Servicio Alojado tiene en raras ocasiones interrupciones temporales como resultado de su naturaleza centralizada. - -### ¿Y si mi pregunta no tiene respuesta en estas Preguntas Frecuentes? - -Por favor, ponte en contacto con [migration@thegraph.foundation](mailto:migration@thegraph.foundation) para cualquier ayuda adicional. diff --git a/website/pages/es/querying/querying-the-hosted-service.mdx b/website/pages/es/querying/querying-the-hosted-service.mdx deleted file mode 100644 index 2ecdab47bfd3..000000000000 --- a/website/pages/es/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Consultar el Servicio Alojado ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -A continuación se proporciona un ejemplo, pero consulta la [Query API](/querying/graphql-api) para obtener una referencia completa sobre cómo consultar las entidades del subgrafo. - -## Ejemplo - -Estas listas de consultas muestran todos los contadores que nuestro mapping ha creado. Como sólo creamos uno, el resultado sólo contendrá nuestro único `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -A continuación se detallan algunas de las principales características: - -![Explora el Playground](/img/explorer-playground.png) diff --git a/website/pages/fr/cookbook/quick-start.mdx b/website/pages/fr/cookbook/quick-start.mdx deleted file mode 100644 index 8a8a14748da1..000000000000 --- a/website/pages/fr/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Démarrage rapide ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Dirigez-vous vers le Subgraph Studio [https://thegraph.com/studio/ et connectez](https://thegraph.com/studio/) votre portefeuille. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -Le Graph CLI est écrit en JavaScript et il est nécessaire d'avoir installé au préalable `npm` ou `yarn` afin de l'utiliser. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Commandes d'un subgraphe](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -Les commandes précédentes créent une structure de base que vous pouvez utiliser comme point de départ pour construire votre subgraphe. Lorsque vous apporterez des modifications au subgraphe, vous travaillerez principalement avec trois fichiers : - -- Manifest (subgraph.yaml) : le manifeste définit les sources de données que vos subgraphes indexeront. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -Pour plus d'informations sur la façon d'écrire votre subgraphe, voir « [création d'un subgraphe](/developing/creating-a-subgraph) ». - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authentifiez et déployez votre subgraphe. La clé de déploiement se trouve sur la page du subgraphe dans Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/fr/developing/assemblyscript-api.mdx b/website/pages/fr/developing/assemblyscript-api.mdx deleted file mode 100644 index 3d1a00cfde79..000000000000 --- a/website/pages/fr/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: API AssemblyScript ---- - -> Remarque : si vous avez créé un subgraphe avant la version `graph-cli`/`graph-ts` `0.22.0`, vous utilisez une ancienne version de AssemblyScript, nous vous recommandons de consulter le [`Guide de migration`](/release-notes/assemblyscript-migration-guide) - -Cette page documente les API intégrées qui peuvent être utilisées lors de l'écriture de mappages de subgraphes. Deux types d'API sont disponibles prêtes à l'emploi : - -- la [bibliothèque Graph TypeScript](https://github.com/graphprotocol/graph-ts) (`graph-ts`) et -- code généré à partir des fichiers de subgraphes par `graph codegen`. - -Il est également possible d'ajouter d'autres bibliothèques comme dépendances, à condition qu'elles soient compatibles avec[AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Puisqu'il s'agit de la langue dans laquelle les mappages sont écrits, le [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki). - -## Installation - -Subgraphes créés avec [`graph init`](/developing/creating-a-subgraph)viennent avec des dépendances préconfigurées. Pour installer ces dépendances, il suffit d'exécuter l'une des commandes suivantes : - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## Référence API - -La bibliothèque `@graphprotocol/graph-ts` fournit les API suivantes : - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/fr/network-transition-faq.mdx b/website/pages/fr/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/fr/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/fr/querying/querying-the-hosted-service.mdx b/website/pages/fr/querying/querying-the-hosted-service.mdx deleted file mode 100644 index 3ba2019be83a..000000000000 --- a/website/pages/fr/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Interrogation du Service Hébergé ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -Un exemple est fourni ci-dessous, mais veuillez consulter l'[API de requête](/querying/graphql-api) pour une référence complète sur la façon d'interroger les entités du subgraph. - -## L'exemple - -Cette requête répertorie tous les compteurs créés par notre mappage. Puisque nous n'en créons qu'un, le résultat ne contiendra qu'un seul `compteur par défaut` : - -```graphql -{ - compteurs { - identifiant - valeur - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Certaines des principales caractéristiques sont détaillées ci-dessous : - -![L'Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/ha/cookbook/quick-start.mdx b/website/pages/ha/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/ha/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/ha/developing/assemblyscript-api.mdx b/website/pages/ha/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/ha/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/ha/network-transition-faq.mdx b/website/pages/ha/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/ha/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/ha/querying/querying-the-hosted-service.mdx b/website/pages/ha/querying/querying-the-hosted-service.mdx deleted file mode 100644 index f00ff226ce09..000000000000 --- a/website/pages/ha/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Example - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/hi/cookbook/quick-start.mdx b/website/pages/hi/cookbook/quick-start.mdx deleted file mode 100644 index 039e15e7e5b0..000000000000 --- a/website/pages/hi/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: क्विक स्टार्ट ---- - -यह गाइड आपको सबग्राफ स्टूडियो या [होस्ट की गई सेवा](#hosted-service) में अपने सबग्राफ को आरंभ करने, बनाने और तैनात करने के तरीके के बारे में जल्दी से बताएगी। - -सुनिश्चित करें कि आपका सबग्राफ [समर्थित नेटवर्क](/Developing/supported-networks) से डेटा को अनुक्रमित करेगा। - -यह मार्गदर्शिका यह मानते हुए लिखी गई है कि आपके पास: - -- आपकी पसंद के नेटवर्क पर एक स्मार्ट अनुबंध पता -- आपके सबग्राफ को क्यूरेट करने के लिए GRT -- एक क्रिप्टो वॉलेट - -## 1. सबग्राफ स्टूडियो पर एक सबग्राफ बनाएं - -सबग्राफ स्टूडियो [https://thegraph.com/studio/](https://thegraph.com/studio/) पर जाएं और अपने वॉलेट को कनेक्ट करें। - -एक बार कनेक्ट होने के बाद, आप "एक सबग्राफ बनाएं" पर क्लिक करके शुरू कर सकते हैं। अपनी पसंद का नेटवर्क चुनें और जारी रखें पर क्लिक करें। - -## 2. ग्राफ़ सीएलआई स्थापित करें - -ग्राफ़ सीएलआई जावास्क्रिप्ट में लिखा गया है और इसका उपयोग करने के लिए आपको या तो `npm` या `yarn` इंस्टॉल करना होगा। - -अपनी स्थानीय मशीन पर, निम्न आदेशों में से कोई एक चलाएँ: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. अपना सबग्राफ इनिशियलाइज़ करें - -> आप [सबग्राफ स्टूडियो](https://thegraph.com/studio/) में सबग्राफ पेज पर अपने विशिष्ट सबग्राफ के लिए आदेश प्राप्त कर सकते हैं। - -जब आप अपना सबग्राफ इनिशियलाइज़ करते हैं, तो सीएलआई टूल आपसे निम्नलिखित जानकारी मांगेगा: - -- प्रोटोकॉल: वह प्रोटोकॉल चुनें जिससे आपका सबग्राफ डेटा को अनुक्रमित करेगा -- सबग्राफ स्लग: अपने सबग्राफ के लिए एक नाम बनाएं। आपका सबग्राफ स्लग आपके सबग्राफ के लिए एक पहचानकर्ता है। -- सबग्राफ बनाने के लिए निर्देशिका: अपनी स्थानीय निर्देशिका चुनें -- एथेरियम नेटवर्क (वैकल्पिक): आपको यह निर्दिष्ट करने की आवश्यकता हो सकती है कि आपका सबग्राफ किस ईवीएम-संगत नेटवर्क से डेटा को अनुक्रमित करेगा -- अनुबंध का पता: उस स्मार्ट अनुबंध के पते का पता लगाएं, जिससे आप डेटा की क्वेरी करना चाहते हैं -- ABI: यदि ABI ऑटोपॉप्युलेटेड नहीं है, तो आपको इसे JSON फ़ाइल के रूप में मैन्युअल रूप से इनपुट करना होगा -- स्टार्ट ब्लॉक: यह सुझाव दिया जाता है कि आप समय बचाने के लिए स्टार्ट ब्लॉक इनपुट करें जबकि आपका सबग्राफ ब्लॉकचैन डेटा को अनुक्रमित करता है। आप उस ब्लॉक को ढूंढकर स्टार्ट ब्लॉक का पता लगा सकते हैं जहां आपका अनुबंध तैनात किया गया था। -- अनुबंध का नाम: अपने अनुबंध का नाम इनपुट करें -- इकाइयों के रूप में अनुक्रमणिका अनुबंध ईवेंट: यह सुझाव दिया जाता है कि आप इसे सही पर सेट करें क्योंकि यह प्रत्येक उत्सर्जित ईवेंट के लिए स्वचालित रूप से आपके सबग्राफ में मैपिंग जोड़ देगा -- दूसरा अनुबंध जोड़ें (वैकल्पिक): आप एक और अनुबंध जोड़ सकते हैं - -निम्न आदेश चलाकर मौजूदा अनुबंध से अपना सबग्राफ प्रारंभ करें: - -```sh -graph init --studio -``` - -अपने सबग्राफ को इनिशियलाइज़ करते समय क्या अपेक्षा की जाए, इसके उदाहरण के लिए निम्न स्क्रीनशॉट देखें: - -![सबग्राफ कमांड](/img/subgraph-init-example.png) - -## 4. अपना सबग्राफ लिखें - -पिछले आदेश एक मचान सबग्राफ बनाते हैं जिसका उपयोग आप अपने सबग्राफ के निर्माण के लिए शुरुआती बिंदु के रूप में कर सकते हैं। सबग्राफ में बदलाव करते समय, आप मुख्य रूप से तीन फाइलों के साथ काम करेंगे: - -- मेनिफेस्ट (subgraph.yaml) - मेनिफेस्ट परिभाषित करता है कि आपके सबग्राफ को कौन से डेटा सोर्स इंडेक्स करेंगे। -- स्कीमा (schema.graphql) - ग्राफक्यूएल स्कीमा परिभाषित करता है कि आप सबग्राफ से कौन सा डेटा प्राप्त करना चाहते हैं। -- असेंबलीस्क्रिप्ट मैपिंग (mapping.ts) - यह वह कोड है जो स्कीमा में परिभाषित इकाई के लिए आपके डेटा सोर्स से डेटा का अनुवाद करता है। - -अपना सबग्राफ लिखने के बारे में अधिक जानकारी के लिए, [एक सबग्राफ बनाना](/developing/creating-a-subgraph) देखें। - -## 5. सबग्राफ स्टूडियो में तैनात करें - -एक बार आपका सबग्राफ लिखे जाने के बाद, निम्नलिखित कमांड चलाएँ: - -```sh -$ graph codegen -$ graph build -``` - -- अपने सबग्राफ को प्रमाणित और तैनात करें। तैनाती key सबग्राफ स्टूडियो में सबग्राफ पेज पर पाई जा सकती है। - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -आपसे एक संस्करण लेबल के लिए कहा जाएगा। इसका उपयोग करने की दृढ़ता से अनुशंसा की जाती है [सेमवर](https://semver.org/)`0.0.1` जैसे वर्जनिंग के लिए उस ने कहा, आप किसी भी स्ट्रिंग को संस्करण के रूप में चुनने के लिए स्वतंत्र हैं:`v1`, `version1`, `asdf`। - -## 6. अपने सबग्राफ का परीक्षण करें - -आप खेल के मैदान अनुभाग में एक नमूना क्वेरी बनाकर अपने सबग्राफ का परीक्षण कर सकते हैं। - -लॉग आपको बताएंगे कि क्या आपके सबग्राफ में कोई त्रुटि है। एक ऑपरेशनल सबग्राफ के लॉग इस तरह दिखेंगे: - -![सबग्राफ लॉग](/img/subgraph-logs-image.png) - -यदि आपका सबग्राफ विफल हो रहा है, तो आप ग्राफीक्यूएल प्लेग्राउंड का उपयोग करके सबग्राफ स्वास्थ्य को क्वेरी कर सकते हैं। ध्यान दें कि आप नीचे दी गई क्वेरी का लाभ उठा सकते हैं और अपने सबग्राफ के लिए अपनी परिनियोजन आईडी इनपुट कर सकते हैं। इस मामले में, `Qm...` परिनियोजन आईडी है (जिसे **विवरण** के अंतर्गत सबग्राफ पेज पर पाया जा सकता है)। नीचे दी गई क्वेरी आपको बताएगी कि कब सबग्राफ विफल हो जाता है, इसलिए आप तदनुसार डीबग कर सकते हैं: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. अपने सबग्राफ को ग्राफ़ के विकेंद्रीकृत नेटवर्क पर प्रकाशित करें - -एक बार जब आपका सबग्राफ सबग्राफ स्टूडियो में तैनात हो जाता है, तो आपने इसका परीक्षण कर लिया है, और इसे उत्पादन में लगाने के लिए तैयार हैं, फिर आप इसे विकेंद्रीकृत नेटवर्क पर प्रकाशित कर सकते हैं। - -सबग्राफ स्टूडियो में, अपने सबग्राफ पर क्लिक करें। सबग्राफ के पृष्ठ पर, आप शीर्ष दाईं ओर प्रकाशित बटन पर क्लिक कर सकेंगे। - -उस नेटवर्क का चयन करें जिस पर आप अपना सबग्राफ प्रकाशित करना चाहते हैं। [तेज़ लेनदेन गति और कम गैस लागत](/arbitrum/arbitrum-faq) का लाभ उठाने के लिए आर्बिट्रम वन में सबग्राफ प्रकाशित करने की अनुशंसा की जाती है। - -इससे पहले कि आप अपने सबग्राफ को क्वेरी कर सकें, इंडेक्सर्स को इस पर क्वेरीज़ परोसना शुरू करना होगा। इस प्रक्रिया को सुव्यवस्थित करने के लिए, आप GRT का उपयोग करके अपने स्वयं के सबग्राफ को क्यूरेट कर सकते हैं। - -यह लिखते समय, यह अनुशंसा की जाती है कि आप 10,000 GRT के साथ अपने स्वयं के सबग्राफ को क्यूरेट करें ताकि यह सुनिश्चित हो सके कि यह अनुक्रमित है और जितनी जल्दी हो सके पूछताछ के लिए उपलब्ध है। - -गैस की लागत बचाने के लिए, जब आप ग्राफ़ के विकेंद्रीकृत नेटवर्क पर अपना सबग्राफ प्रकाशित करते हैं, तो आप अपने सबग्राफ को उसी लेन-देन में क्यूरेट कर सकते हैं, जिसे आपने इस बटन का चयन करके प्रकाशित किया था: - -![सबग्राफ प्रकाशित](/img/publish-and-signal-tx.png) - -## 8. अपना सबग्राफ पूछें - -अब, आप अपने सबग्राफ को अपने सबग्राफ के क्वेरी URL पर ग्राफ़क्यूएल क्वेरी भेजकर क्वेरी कर सकते हैं, जिसे आप क्वेरी बटन पर क्लिक करके पा सकते हैं। - -यदि आपके पास अपनी एपीआई कुंजी नहीं है, तो आप अपने डैप से मुफ्त, दर-सीमित अस्थायी क्वेरी URL के माध्यम से पूछ सकते हैं, जिसका उपयोग विकास और मंचन के लिए किया जा सकता है। - -अपने सबग्राफ से डेटा क्वेरी करने के बारे में अधिक जानकारी के लिए [यहां](../querying/querying-the-graph/) अधिक पढ़ें। diff --git a/website/pages/hi/developing/assemblyscript-api.mdx b/website/pages/hi/developing/assemblyscript-api.mdx deleted file mode 100644 index 085eedba22b8..000000000000 --- a/website/pages/hi/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,820 +0,0 @@ ---- -title: असेंबलीस्क्रिप्ट एपीआई ---- - -> नोट: यदि आपने `graph-cli`/`graph-ts` संस्करण `0.22.0` से पहले एक सबग्राफ बनाया है, तो आप इसके पुराने संस्करण का उपयोग कर रहे हैं असेंबलीस्क्रिप्ट, हम [`माइग्रेशन गाइड`](/release-notes/assemblyscript-migration-guide) पर एक नज़र डालने की सलाह देते हैं - -यह पृष्ठ दस्तावेज करता है कि सबग्राफ मैपिंग लिखते समय किन अंतर्निहित एपीआई का उपयोग किया जा सकता है। बॉक्स से बाहर दो प्रकार के एपीआई उपलब्ध हैं: - -- [ग्राफ़ टाइपस्क्रिप्ट लाइब्रेरी](https://github.com/graphprotocol/graph-ts) (`ग्राफ़-टीएस`) और -- `graph codegen` द्वारा सबग्राफ फ़ाइलों से उत्पन्न कोड। - -निर्भरता के रूप में अन्य लाइब्रेरीज को जोड़ना भी संभव है, जब तक कि वे [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) के साथ संगत हों।क्योंकि यह वह भाषा मैपिंग है जिसमें लिखा जाता है, [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) भाषा और मानक लाइब्रेरी सुविधाओं के लिए एक अच्छा स्रोत है। - -## स्थापना - -[`graph init`](/developing/creating-a-subgraph) के साथ बनाए गए सबग्राफ पूर्व-कॉन्फ़िगर निर्भरता के साथ आते हैं। इन निर्भरताओं को स्थापित करने के लिए आवश्यक सभी निम्न आदेशों में से एक को चलाना होगा: - -```sh -yarn install # Yarn -npm install # NPM -``` - -यदि सबग्राफ स्क्रैच से बनाया गया था, तो निम्नलिखित दो आदेशों में से एक ग्राफ़ टाइपस्क्रिप्ट लाइब्रेरी को निर्भरता के रूप में स्थापित करेगा: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## एपीआई संदर्भ - -`@graphprotocol/graph-ts` लाइब्रेरी निम्नलिखित एपीआई प्रदान करता है: - -- एथेरियम स्मार्ट कॉन्ट्रैक्ट, घटनाओं, ब्लॉकों, लेन-देन और एथेरियम मूल्यों के साथ काम करने के लिए एक `ethereum` एपीआई। -- एक `store` API जो कि संस्थाओं को ग्राफ़ नोड स्टोर से लोड करने और सहेजने के लिए है। -- ग्राफ़ नोड आउटपुट और ग्राफ़ एक्सप्लोरर में संदेशों को लॉग करने के लिए एक `लॉग` API। -- IPFS से फ़ाइलें लोड करने के लिए एक `ipfs` एपीआई। -- JSON डेटा को पार्स करने के लिए एक `json` एपीआई। -- क्रिप्टोग्राफिक कार्यों का उपयोग करने के लिए `क्रिप्टो` एपीआई। -- एथेरियम, JSON, ग्राफक्यूएल और असेंबलीस्क्रिप्ट जैसे विभिन्न प्रकार की प्रणालियों के बीच अनुवाद करने के लिए निम्न-स्तरीय आदिम। - -### संस्करणों - -सबग्राफ मेनिफ़ेस्ट में `apiVersion` मैपिंग एपीआई संस्करण निर्दिष्ट करता है जो किसी दिए गए सबग्राफ़ के लिए ग्राफ़ नोड द्वारा चलाया जाता है। वर्तमान मैपिंग एपीआई संस्करण 0.0.6 है। - -| संस्करण | रिलीज नोट्स | -| :-: | --- | -| 0.0.7 | जोड़े गए `TransactionReceipt` और `Log` कक्षाओं को Ethereum प्रकारों में
    Added `receipt` फ़ील्ड को Ethereum Event ऑब्जेक्ट में जोड़ा गया | -| 0.0.6 | एथेरियम ट्रांजैक्शन ऑब्जेक्ट में `nonce` फील्ड जोड़ा गया
    एथेरियम ब्लॉक ऑब्जेक्ट में `baseFeePerGas` जोड़ा गया | -| 0.0.5 | असेंबलीस्क्रिप्ट संस्करण 0.19.10 में अपग्रेड किया गया (इसमें ब्रेकिंग परिवर्तन शामिल हैं, कृपया [`माइग्रेशन गाइड`](/release-notes/assemblyscript-migration-guide) देखें)
    `ethereum.transaction.gasUsed` का नाम बदलकर `ethereum.transaction.gasLimit` कर दिया गया | -| 0.0.4 | एथेरियम स्मार्टकॉन्ट्रेक्टकॉल ऑब्जेक्ट में `functionSignature` फ़ील्ड जोड़ा गया | -| 0.0.3 | एथेरियम कॉल ऑब्जेक्ट में `from` फ़ील्ड जोड़ा गया
    `etherem.call.address` का नाम बदलकर `ethereum.call.to` कर दिया गया | -| 0.0.2 | एथेरियम लेनदेन ऑब्जेक्ट में `input` फ़ील्ड जोड़ा गया | - -### अंतर्निहित प्रकार - -असेंबलीस्क्रिप्ट में निर्मित आधार प्रकारों पर प्रलेखन [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types) में पाया जा सकता है। - -निम्न अतिरिक्त प्रकार `@graphprotocol/graph-ts` द्वारा प्रदान किए जाते हैं। - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` `u8` की एक सरणी का प्रतिनिधित्व करता है। - -_निर्माण_ - -- `fromI32(x: i32): ByteArray` - `x` को बाइट्स में विघटित करता है। -- `fromHexString(hex: string): ByteArray` - इनपुट लंबाई समान होनी चाहिए। `0x` के साथ उपसर्ग करना वैकल्पिक है। - -_रूपांतरण टाइप करें_ - -- `toHexString(): string` - एक हेक्स स्ट्रिंग को `0x` के साथ उपसर्ग में कनवर्ट करता है। -- `toString(): string` - बाइट्स को UTF-8 स्ट्रिंग के रूप में व्याख्या करता है। -- `toBase58(): string` - बाइट्स को बेस58 स्ट्रिंग में एनकोड करता है। -- `toU32(): u32` - बाइट्स को लिटिल-एंडियन `u32` के रूप में व्याख्या करता है। अतिप्रवाह के मामले में फेंकता है। -- `toI32(): i32` - बाइट सरणी को एक लिटिल-एंडियन `i32` के रूप में व्याख्या करता है। अतिप्रवाह के मामले में फेंकता है। - -_ऑपरेटर्स_ - -- `equals(y: ByteArray): bool` - को `x == y` के रूप में लिखा जा सकता है। -- `concat(other: ByteArray): ByteArray` - एक नया `ByteArray` लौटाता है जिसमें `यह` होता है और उसके बाद `other` होता है -- `concatI32(other: i32): ByteArray` - एक नया `ByteArray` देता है जिसमें `यह` होता है और इसके बाद `other` का बाइट प्रतिनिधित्व होता है| - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` का उपयोग मनमाना सटीक दशमलव का प्रतिनिधित्व करने के लिए किया जाता है। - -> नोट: [आंतरिक रूप से](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` [IEEE-754 दशमलव128 फ्लोटिंग-पॉइंट प्रारूप](https://en.wikipedia.org/wiki/Decimal128_floating-point_format) में संग्रहीत है, जो महत्व के 34 दशमलव अंकों का समर्थन करता है। यह `BigDecimal` को फिक्स्ड-पॉइंट प्रकारों का प्रतिनिधित्व करने के लिए अनुपयुक्त बनाता है जो 34 अंकों से अधिक विस्तृत हो सकते हैं, जैसे कि सॉलिडिटी [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) या समकक्ष। - -_निर्माण_ - -- `constructor(bigInt: BigInt)` – एक `BigInt` से `BigDecimal` बनाता है। -- `static fromString(s: string): BigDecimal` – एक दशमलव स्ट्रिंग से पार्स करता है। - -_रूपांतरण टाइप करें_ - -- `toString(): string` - दशमलव स्ट्रिंग पर प्रिंट करता है। - -_गणित_ - -- `plus(y: BigDecimal): BigDecimal` – को `x + y` के रूप में लिखा जा सकता है। -- `minus(y: BigDecimal): BigDecimal` – को `x - y` के रूप में लिखा जा सकता है। -- `times(y: BigDecimal): BigDecimal` - को `x * y` के रूप में लिखा जा सकता है। -- `div(y: BigDecimal): BigDecimal` – को `x / y` के रूप में लिखा जा सकता है। -- `equals(y: BigDecimal): bool` – को `x == y` के रूप में लिखा जा सकता है। -- `notEqual(y: BigDecimal): bool` – को `x != y` के रूप में लिखा जा सकता है। -- `lt(y: BigDecimal): bool` – को लिखा जा सकता है `x < y`. -- `lt(y: BigDecimal): bool` – को लिखा जा सकता है `x <= y`. -- `gt(y: BigDecimal): bool` – को लिखा जा सकता है `x > y`. -- `ge(y: BigDecimal): bool` - को `x >= y` के रूप में लिखा जा सकता है। -- `neg(): BigDecimal` - को `-x` के रूप में लिखा जा सकता है। - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` का उपयोग बड़े पूर्णांकों को दर्शाने के लिए किया जाता है। इसमें `uint32` से `uint256` और `int64` से `int256` प्रकार के एथेरियम मान शामिल हैं। `uint32` के नीचे सब कुछ, जैसे `int32`, `uint24` या `int8` को `i32` के रूप में दर्शाया गया है. - -`BigInt` वर्ग में निम्न API है: - -_निर्माण_ - -- `BigInt.fromI32(x: i32): BigInt` - `i32` से `BigInt` बनाता है। -- `BigInt.fromString(s: string): BigInt`– एक स्ट्रिंग से `BigInt` को पार्स करता है। -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` - `बाइट्स` को एक अहस्ताक्षरित, छोटे-एंडियन पूर्णांक के रूप में व्याख्या करता है। यदि आपका इनपुट बिग-एंडियन है, तो `.reverse()` पहले कॉल करें। -- `BigInt.fromSignedBytes(x: Bytes): BigInt` - `बाइट्स` को एक हस्ताक्षरित, छोटे-एंडियन पूर्णांक के रूप में व्याख्या करता है। यदि आपका इनपुट बिग-एंडियन है, तो `.reverse()` पहले कॉल करें। - - _रूपांतरण टाइप करें_ - -- `x.toHex(): string` - `BigInt` को हेक्साडेसिमल वर्णों की एक स्ट्रिंग में बदल देता है। -- `x.toString(): string` - `BigInt` को दशमलव संख्या स्ट्रिंग में बदल देता है। -- `x.toI32(): i32` - `BigInt` को `i32` के रूप में देता है; यदि मान `i32` में फ़िट नहीं होता है तो विफल हो जाता है। पहले `x.isI32()` की जांच करना एक अच्छा विचार है। -- `x.toBigDecimal(): BigDecimal` - बिना किसी आंशिक भाग के दशमलव में परिवर्तित हो जाता है। - -_गणित_ - -- `x.plus(y: BigInt): BigInt` – को `x + y` के रूप में लिखा जा सकता है। -- `x.minus(y: BigInt): BigInt` – को `x - y` के रूप में लिखा जा सकता है। -- `x.times(y: BigInt): BigInt` – को `x * y` के रूप में लिखा जा सकता है। -- `x.div(y: BigInt): BigInt` – को `x / y` के रूप में लिखा जा सकता है। -- `x.mod(y: BigInt): BigInt` – को `x % y` के रूप में लिखा जा सकता है। -- `x.equals(y: BigInt): bool` – को `x == y` के रूप में लिखा जा सकता है -- `x.notEqual(y: BigInt): bool` – को `x != y` के रूप में लिखा जा सकता है। -- `x.lt(y: BigInt): bool` – को `x < y`के रूप में लिखा जा सकता है। -- `x.le(y: BigInt): bool` - को `x <= y` के रूप में लिखा जा सकता है। -- `x.gt(y: BigInt): bool` – को `x > y`के रूप में लिखा जा सकता है। -- `x.ge(y: BigInt): bool` – को `x >= y` के रूप में लिखा जा सकता है। -- `x.neg(): BigInt` - `-x` के रूप में लिखा जा सकता है। -- `x.divDecimal(y: BigDecimal): BigDecimal` - दशमलव से विभाजित करके दशमलव परिणाम देता है। -- `x.isZero(): bool` - संख्या शून्य है या नहीं, यह जांचने की सुविधा। -- `x.isI32(): bool` - जांचें कि क्या नंबर `i32` में फिट बैठता है। -- `x.abs(): BigInt` - एब्सोल्यूट वैल्यू। -- `x.pow(exp: u8): BigInt` - घातांक। -- `bitOr(x: BigInt, y: BigInt): BigInt` – को `x | वाई`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – को `x & वाई`. -- `leftShift(x: BigInt, bits: u8): BigInt` – को `x << वाई`. -- `rightShift(x: BigInt, bits: u8): BigInt` – को `x >> वाई`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` का उपयोग की-वैल्यू पेयर को स्टोर करने के लिए किया जा सकता है। [यह उदाहरण](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51) देखें। - -`TypedMap` वर्ग में निम्न API है: - -- `नया टाइप किया गया नक्शा()` - `के` प्रकार की कुंजियों और `वी` प्रकार के मानों के साथ एक खाली नक्शा बनाता है -- `map.set(key: K, value: V): void` - `key` की वैल्यू को `value` पर सेट करता है -- `map.getEntry(key: K): TypedMapEntry | null` - `key` या `null` के लिए कुंजी-मूल्य जोड़ी लौटाता है यदि `key` मानचित्र में मौजूद नहीं है -- `map.get(key: K): V | null` -`key`या `null`> के लिए मान लौटाता है यदि मानचित्र में `key` मौजूद नहीं है -- `map.isSet(key: K): bool` - रिटर्न `true` देता है यदि `key` मैप में मौजूद है और `false` यदि यह काम न करें - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` का उपयोग बाइट्स की मनमाना-लंबाई सरणियों का प्रतिनिधित्व करने के लिए किया जाता है। इसमें `बाइट्स`, `बाइट्स32` आदि प्रकार के एथेरियम मान शामिल हैं। - -`बाइट्स` वर्ग असेंबलीस्क्रिप्ट के [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) का विस्तार करता है और यह सभी `Uint8Array` कार्यक्षमता का समर्थन करता है, साथ ही निम्नलिखित नई विधियों का भी समर्थन करता है: - -_निर्माण_ - -- `fromHexString(hex: string) : Bytes` - उस स्ट्रिंग `hex` को कनवर्ट करें जिसमें हेक्साडेसिमल अंकों की सम संख्या होनी चाहिए `ByteArray` में। स्ट्रिंग `hex` वैकल्पिक रूप से `0x` से शुरू हो सकता है -- `fromI32(i: i32): बाइट्स` - `i` को बाइट्स की एक सरणी में कनवर्ट करें - -_रूपांतरण टाइप करें_ - -- `b.toHex()` - सरणी में बाइट्स का प्रतिनिधित्व करने वाला एक हेक्साडेसिमल स्ट्रिंग देता है -- `b.toString()` - सरणी में बाइट्स को यूनिकोड वर्णों की एक स्ट्रिंग में परिवर्तित करता है -- `b.toBase58()` - एथेरियम बाइट्स मान को बेस58 एन्कोडिंग में बदल देता है (IPFS हैश के लिए उपयोग किया जाता है) - -_ऑपरेटर्स_ - -- `b.concat(other: Bytes): Bytes` - - नए `बाइट्स` लौटाएं जिसमें `this` शामिल हों और उसके बाद `other` हों -- `b.concatI32(other: i32) : ByteArray` नया `बाइट्स` लौटाएं `this` से मिलकर `other` के बाइट प्रतिनिधित्व द्वारा सीधे अनुसरण करें - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` एथेरियम `address` मानों का प्रतिनिधित्व करने के लिए `Bytes` का विस्तार करता है। - -यह `Bytes` API के शीर्ष पर निम्न विधि जोड़ता है: - -- `Address.fromString(s: string): Address` - एक हेक्साडेसिमल स्ट्रिंग से `Address` बनाता है -- `Address.fromBytes(b: Bytes): पता` - `b` से एक `Address` बनाएं जो ठीक 20 बाइट लंबा होना चाहिए। कम या अधिक बाइट वाले मान में पास होने से त्रुटि होगी - -### स्टोर एपीआई - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -`store` API ग्राफ़ नोड स्टोर में और से संस्थाओं को लोड करने, सहेजने और निकालने की अनुमति देता है। - -सबग्राफ के ग्राफक्यूएल स्कीमा में परिभाषित `@entity` टाइप के लिए स्टोर मैप में लिखे एंटिटीज वन-टू-वन टाइप करते हैं। इन संस्थाओं के साथ काम करना सुविधाजनक बनाने के लिए, [ग्राफ़ सीएलआई](https://github.com/graphprotocol/graph-cli) द्वारा प्रदान किया गया `ग्राफ़ कोडजेन` कमांड इकाई बनाता है क्लासेस, जो बिल्ट-इन `Entity` प्रकार के उप-वर्ग हैं, स्कीमा में फ़ील्ड्स के लिए प्रॉपर्टी गेटर्स और सेटर्स के साथ-साथ इन संस्थाओं को लोड करने और सहेजने के तरीकों के साथ। - -#### संस्थाओं का निर्माण - -एथेरियम घटनाओं से संस्थाओं को बनाने के लिए निम्नलिखित एक सामान्य पैटर्न है। - -```typescript -/ Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -जब श्रृंखला को संसाधित करते समय एक `स्थानांतरण` घटना का सामना करना पड़ता है, तो इसे उत्पन्न `स्थानांतरण` प्रकार (उपनाम `TransferEvent` इकाई प्रकार के साथ नामकरण विरोध से बचने के लिए)। यह प्रकार ईवेंट के मूल लेन-देन और उसके पैरामीटर जैसे डेटा तक पहुँचने की अनुमति देता है। - -अन्य संस्थाओं के साथ टकराव से बचने के लिए प्रत्येक इकाई के पास एक विशिष्ट आईडी होनी चाहिए। ईवेंट पैरामीटर के लिए एक अद्वितीय पहचानकर्ता शामिल करना काफी सामान्य है जिसका उपयोग किया जा सकता है। नोट: आईडी के रूप में लेन-देन हैश का उपयोग करना मानता है कि एक ही लेन-देन में कोई अन्य घटना इस हैश के साथ आईडी के रूप में संस्था नहीं बनाती है। - -#### Loading entities from the store - -यदि कोई इकाई पहले से मौजूद है, तो इसे स्टोर से निम्न के साथ लोड किया जा सकता है: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -जैसा कि इकाई अभी तक स्टोर में मौजूद नहीं हो सकती है, `load` विधि `Transfer | null `। इस प्रकार मूल्य का उपयोग करने से पहले `null` केस की जांच करना आवश्यक हो सकता है। - -> **ध्यान दें:** निकायों को लोड करना केवल तभी आवश्यक है जब मैपिंग में किए गए परिवर्तन किसी इकाई के पिछले डेटा पर निर्भर करते हैं। मौजूदा संस्थाओं को अद्यतन करने के दो तरीकों के लिए अगला भाग देखें। - -#### एक ब्लॉक के साथ बनाई गई संस्थाओं को देखना - -`graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 और `@graphprotocol/graph-cli` v0.49.0 के अनुसार `loadInBlock` विधि सभी इकाई प्रकारों पर उपलब्ध है। - -स्टोर एपीआई उन संस्थाओं की पुनर्प्राप्ति की सुविधा देता है जो वर्तमान ब्लॉक में बनाई या अपडेट की गई थीं। इसके लिए एक विशिष्ट स्थिति यह है कि एक हैंडलर कुछ ऑन-चेन ईवेंट से लेन-देन बनाता है, और बाद में हैंडलर मौजूद होने पर इस लेनदेन तक पहुंचना चाहता है। ऐसे मामले में जहां लेन-देन मौजूद नहीं है, सबग्राफ को केवल यह पता लगाने के लिए डेटाबेस में जाना होगा कि इकाई मौजूद नहीं है; अगर सबग्राफ लेखक पहले से ही जानता है कि इकाई को उसी ब्लॉक में बनाया जाना चाहिए, तो loadInBlock का उपयोग करके इस डेटाबेस राउंडट्रिप से बचा जाता है। कुछ सबग्राफ के लिए, ये छूटे हुए लुकअप इंडेक्सिंग समय में महत्वपूर्ण योगदान दे सकते हैं। - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> नोट: यदि दिए गए ब्लॉक में कोई इकाई नहीं बनाई गई है, तो स्टोर में दिए गए आईडी के साथ एक इकाई होने पर भी `loadInBlock` `null` वापस आ जाएगा। - -#### व्युत्पन्न संस्थाओं को देख रहे हैं - -`graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 और `@graphprotocol/graph-cli` v0.51.0 के अनुसार `loadRelated` विधि उपलब्ध है। - -यह इवेंट हैंडलर के भीतर से व्युत्पन्न इकाई फ़ील्ड को लोड करने में सक्षम बनाता है। उदाहरण के लिए, निम्नलिखित स्कीमा दी गई है: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -निम्नलिखित कोड उस `टोकन` इकाई को लोड करेगा जिससे `धारक` इकाई प्राप्त हुई थी: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### मौजूदा संस्थाओं को अद्यतन करना - -किसी मौजूदा निकाय को अद्यतन करने के दो तरीके हैं: - -1. इकाई को उदा। `Transfer.load(id)`, इकाई पर गुण सेट करें, फिर `.save()` इसे स्टोर पर वापस लाएं। -2. बस इकाई बनाएं जैसे उदा। `new Transfer(id)`, इकाई पर गुण सेट करें, फिर `.save()` इसे स्टोर में। यदि इकाई पहले से मौजूद है, तो परिवर्तनों को इसमें मिला दिया जाता है। - -ज्यादातर मामलों में गुण बदलना सीधे आगे है, उत्पन्न संपत्ति सेटर्स के लिए धन्यवाद: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -यह केवल वैकल्पिक प्रॉपर्टीज के साथ काम करता है, यानी ऐसी प्रॉपर्टीज जिन्हें ग्राफक्यूएल में `!` के बिना घोषित किया गया है। दो उदाहरण होंगे `owner: Bytes` या `amount: BigInt`। - -सरणी गुणों को अपडेट करना थोड़ा अधिक शामिल है, क्योंकि किसी इकाई से सरणी प्राप्त करने से उस सरणी की एक प्रति बन जाती है। इसका मतलब है कि सरणी बदलने के बाद सरणी गुणों को फिर से स्पष्ट रूप से सेट करना होगा। निम्नलिखित मानते हैं `entity` में `numbers: [BigInt!]!` फ़ील्ड है। - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### स्टोर से संस्थाओं को हटाना - -जेनरेट किए गए प्रकारों के माध्यम से किसी इकाई को निकालने का वर्तमान में कोई तरीका नहीं है। इसके बजाय, किसी इकाई को हटाने के लिए इकाई प्रकार का नाम और इकाई आईडी `store.remove` को पास करना होगा: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### एथेरियम एपीआई - -एथेरियम एपीआई स्मार्ट कॉन्ट्रैक्ट्स, पब्लिक स्टेट वेरिएबल्स, कॉन्ट्रैक्ट फ़ंक्शंस, इवेंट्स, ट्रांजेक्शन, ब्लॉक्स और एन्कोडिंग / डिकोडिंग एथेरियम डेटा तक पहुंच प्रदान करता है। - -#### एथेरियम प्रकार के लिए समर्थन - -संस्थाओं की तरह, `ग्राफ़ कोडजेन` सबग्राफ़ में इस्तेमाल होने वाले सभी स्मार्ट कॉन्ट्रैक्ट और इवेंट के लिए क्लास बनाता है। इसके लिए, अनुबंध एबीआई को सबग्राफ मेनिफेस्ट में डेटा स्रोत का हिस्सा होना चाहिए। विशिष्ट रूप से, ABI फ़ाइलें `abis/` फ़ोल्डर में संग्रहित की जाती हैं। - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -और एथेरियम पर `स्थानांतरण(पता, पता,uint256)` ईवेंट हस्ताक्षर, `से`, `से` और `राशि` मान प्रकार के `पते`, `पते` और `uint256` को `पते` और `BigInt` में बदल दिया जाता है, जिससे उन्हें `बाइट्स!` और `बिगइंट!` `स्थानांतरण` इकाई के गुणों पर पारित किया जाना है: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### घटनाक्रम और ब्लॉक/लेनदेन डेटा - -ईवेंट हैंडलर्स को पास किए गए एथेरियम इवेंट्स, जैसे कि पिछले उदाहरणों में `ट्रांसफर` इवेंट, न केवल इवेंट पैरामीटर्स तक पहुंच प्रदान करते हैं, बल्कि उनके पैरेंट ट्रांजैक्शन और उस ब्लॉक तक भी पहुंच प्रदान करते हैं, जिसका वे हिस्सा हैं। निम्न डेटा `ईवेंट` उदाहरणों से प्राप्त किया जा सकता है (ये वर्ग `ग्राफ़-टीएस` में `एथेरियम` मॉड्यूल का एक हिस्सा हैं): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -`कोडग्राफ़ कोडजेन` द्वारा जनरेट किए गए कोड में सबग्राफ़ में उपयोग किए जाने वाले स्मार्ट अनुबंधों की कक्षाएं भी शामिल होती हैं। इनका उपयोग सार्वजनिक राज्य चरों तक पहुँचने और वर्तमान ब्लॉक में अनुबंध के कार्यों को कॉल करने के लिए किया जा सकता है। - -एक सामान्य पैटर्न उस अनुबंध का उपयोग करना है जिससे कोई घटना उत्पन्न होती है। यह निम्नलिखित कोड के साथ हासिल किया गया है: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` को यहां `TransferEvent` के नाम से जाना जाता है, ताकि एंटिटी टाइप के साथ नामकरण विवाद से बचा जा सके - -जब तक एथेरियम पर `ERC20Contract` में `प्रतीक` नामक एक सार्वजनिक रीड-ओनली फ़ंक्शन है, इसे `.symbol()` के साथ कॉल किया जा सकता है। सार्वजनिक राज्य चर के लिए समान नाम वाली विधि स्वचालित रूप से बनाई जाती है। - -कोई अन्य अनुबंध जो सबग्राफ का हिस्सा है, उत्पन्न कोड से आयात किया जा सकता है और एक वैध पते के लिए बाध्य किया जा सकता है। - -#### रिवर्टेड कॉल्स को हैंडल करना - -यदि आपके अनुबंध की रीड-ओनली विधियां वापस आ सकती हैं, तो आपको `try_` के साथ प्रीफ़िक्स्ड जनरेट की गई अनुबंध विधि को कॉल करके इसे संभालना चाहिए। उदाहरण के लिए, गुरुत्वाकर्षण अनुबंध `gravatarToOwner` विधि को उजागर करता है। यह कोड उस विधि में वापसी को संभालने में सक्षम होगा: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -ध्यान दें कि Geth या Infura क्लाइंट से जुड़ा एक ग्राफ़ नोड सभी रिवर्ट का पता नहीं लगा सकता है, अगर आप इस पर भरोसा करते हैं तो हम पैरिटी क्लाइंट से जुड़े ग्राफ़ नोड का उपयोग करने की सलाह देते हैं। - -#### एन्कोडिंग/डिकोडिंग एबीआई - -`encode` और `decode` फ़ंक्शन का `ethereum` मॉड्यूल में उपयोग करके Ethereum के ABI एन्कोडिंग प्रारूप के अनुसार डेटा को एन्कोड और डिकोड किया जा सकता है। - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -अधिक जानकारी के लिए: - -- [एबीआई युक्ति](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- एन्कोडिंग/डिकोडिंग [Rust पुस्तकालय/CLI](https://github.com/rust-ethereum/ethabi) -- अधिक [जटिल उदाहरण](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72)। - -### लॉगिंग एपीआई - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -`लॉग` एपीआई सबग्राफ को ग्राफ़ नोड मानक आउटपुट के साथ-साथ ग्राफ़ एक्सप्लोरर में जानकारी लॉग करने की अनुमति देता है। संदेशों को विभिन्न लॉग स्तरों का उपयोग करके लॉग किया जा सकता है। तर्क से लॉग संदेश बनाने के लिए एक मूल स्वरूप स्ट्रिंग सिंटैक्स प्रदान किया जाता है। - -`लॉग` API में निम्नलिखित कार्य शामिल हैं: - -- `log.debug(fmt: string, args: Array): void` - एक डीबग संदेश लॉग करता है। -- `log.info(fmt: string, args: Array): void` - एक सूचनात्मक संदेश लॉग करता है। -- `log.warning(fmt: string, args: Array): void` - एक चेतावनी लॉग करता है। -- `log.warning(fmt: string, args: Array): void` - एक चेतावनी शुरू होती है। -- `log.critical(fmt: string, args: Array): void` - एक महत्वपूर्ण संदेश _ को लॉग करता है और_ सबग्राफ को समाप्त कर देता है। - -`लॉग` एपीआई एक प्रारूप स्ट्रिंग और स्ट्रिंग मानों की एक सरणी लेता है। यह तब प्लेसहोल्डर्स को सरणी से स्ट्रिंग मानों के साथ बदल देता है। पहले `{}` प्लेसहोल्डर को सरणी में पहले मान से बदल दिया जाता है, दूसरे `{}` प्लेसहोल्डर को दूसरे मान से बदल दिया जाता है और इसी तरह। - -```typescript -log.info('संदेश प्रदर्शित किया जाना है: {}, {}, {}', [ - value.toString(), - OtherValue.toString(), - 'पहले से ही एक स्ट्रिंग', -]) -``` - -#### एक या अधिक मान लॉग करना - -##### एकल मान लॉग करना - -नीचे दिए गए उदाहरण में, स्ट्रिंग मान "ए" लॉग होने से पहले `['ए']` बनने के लिए एक सरणी में पारित किया गया है: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### किसी मौजूदा सरणी से एकल प्रविष्टि लॉग करना - -नीचे दिए गए उदाहरण में, तीन मानों वाले सरणी के बावजूद, तर्क सरणी का केवल पहला मान लॉग किया गया है। - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### मौजूदा सरणी से एकाधिक प्रविष्टियां लॉग करना - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### मौजूदा सरणी से एक विशिष्ट प्रविष्टि लॉग करना - -सरणी में एक विशिष्ट मान प्रदर्शित करने के लिए, अनुक्रमित मान प्रदान किया जाना चाहिए। - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### लॉगिंग घटना की जानकारी - -नीचे दिया गया उदाहरण एक घटना से ब्लॉक संख्या, ब्लॉक हैश और लेनदेन हैश को लॉग करता है: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### आईपीएफएस एपीआई - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -स्मार्ट अनुबंध कभी-कभी आईपीएफएस फाइलों को चेन पर एंकर करते हैं। यह मैपिंग को अनुबंध से आईपीएफएस हैश प्राप्त करने और आईपीएफएस से संबंधित फाइलों को पढ़ने की अनुमति देता है। फ़ाइल डेटा `बाइट्स` के रूप में लौटाया जाएगा, जिसके लिए आमतौर पर आगे की प्रक्रिया की आवश्यकता होती है, उदा। `json` API के साथ इस पृष्ठ पर बाद में प्रलेखित। - -IPFS हैश या पथ को देखते हुए, IPFS से फ़ाइल पढ़ना निम्नानुसार किया जाता है: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**ध्यान दें:** `ipfs.cat` इस समय नियतात्मक नहीं है। यदि अनुरोध समय समाप्त होने से पहले फ़ाइल को IPFS नेटवर्क पर पुनर्प्राप्त नहीं किया जा सकता है, तो यह `null` वापस आ जाएगी। इसके कारण, हमेशा `null` के परिणाम की जांच करना उचित होता है। - -`ipfs.map` के साथ स्ट्रीमिंग फैशन में बड़ी फ़ाइलों को प्रोसेस करना भी संभव है। फ़ंक्शन IPFS फ़ाइल के लिए हैश या पथ, कॉलबैक का नाम और उसके व्यवहार को संशोधित करने के लिए फ़्लैग की अपेक्षा करता है: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -वर्तमान में समर्थित एकमात्र ध्वज `json` है, जिसे `ipfs.map` को भेजा जाना चाहिए। `json` फ़्लैग के साथ, IPFS फ़ाइल में JSON मानों की एक श्रृंखला होनी चाहिए, प्रति पंक्ति एक मान। `ipfs.map` को कॉल फ़ाइल में प्रत्येक पंक्ति को पढ़ेगा, इसे `JSONValue` में डिसेरिअलाइज़ करेगा और उनमें से प्रत्येक के लिए कॉलबैक कॉल करेगा। फिर कॉलबैक `JSONValue` से डेटा स्टोर करने के लिए इकाई संचालन का उपयोग कर सकता है। निकाय परिवर्तन केवल तभी संग्रहीत किए जाते हैं जब `ipfs.map` कॉल करने वाला हैंडलर सफलतापूर्वक समाप्त हो जाता है; इस बीच, उन्हें स्मृति में रखा जाता है, और फ़ाइल का आकार जिसे `ipfs.map` संसाधित कर सकता है, इसलिए सीमित है। - -सफल होने पर, `ipfs.map` रिटर्न `void` देता है। यदि कॉलबैक का कोई भी आह्वान एक त्रुटि का कारण बनता है, तो `ipfs.map` का आह्वान करने वाला हैंडलर निरस्त कर दिया जाता है, और सबग्राफ को असफल के रूप में चिह्नित किया जाता है। - -### क्रिप्टो एपीआई - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -`crypto` एपीआई क्रिप्टोग्राफ़िक फ़ंक्शन को मैपिंग में उपयोग के लिए उपलब्ध कराता है। अभी, केवल एक ही है: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON डेटा को `json` API का उपयोग करके पार्स किया जा सकता है: - -- `json.fromBytes(data: Bytes): JSONValue` - JSON डेटा को `Bytes` सरणी से पार्स करता है जिसे एक मान्य UTF-8 अनुक्रम के रूप में समझा जाता है -- `json.try_fromBytes(डेटा: बाइट्स): परिणाम` – `json.fromBytes` का सुरक्षित संस्करण, यह पार्सिंग विफल होने पर एक त्रुटि संस्करण देता है -- `json.fromString(data: string): JSONValue` - JSON डेटा को एक मान्य UTF-8 `String` से पार्स करता है -- `json.try_fromString(डेटा: स्ट्रिंग): परिणाम` – `json.fromString` का सुरक्षित संस्करण, पार्सिंग विफल होने पर यह एक त्रुटि संस्करण देता है - -`JSONValue` वर्ग मनमाने ढंग से JSON दस्तावेज़ से मूल्यों को निकालने का एक तरीका प्रदान करता है। चूँकि JSON मान बूलियन्स, संख्याएँ, सरणियाँ और बहुत कुछ हो सकते हैं, `JSONValue` किसी मान के प्रकार की जाँच करने के लिए `kind` गुण के साथ आता है: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -इसके अलावा, यह जांचने का एक तरीका है कि क्या मान `null` है: - -- `value.isNull(): boolean` - -जब किसी मान का प्रकार निश्चित होता है, तो उसे निम्न विधियों में से किसी एक का उपयोग करके [built-in type](#built-in-types) में बदला जा सकता है: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toI64(): i64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (और फिर उपरोक्त 5 विधियों में से एक के साथ `JSONValue` को रूपांतरित करें) - -### प्रकार रूपांतरण संदर्भ - -| स्रोत(s) | गंतव्य | रूपांतरण समारोह | -| -------------------- | -------------------- | ------------------------------ | -| Address | बाइट्स | none | -| Address | String | s.toHexString() Contextrequest | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() या s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() या s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | बिगइंट | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### डेटा स्रोत मेटाडेटा - -आप `dataSource` नामस्थान के माध्यम से हैंडलर को आमंत्रित करने वाले डेटा स्रोत के अनुबंध पते, नेटवर्क और संदर्भ का निरीक्षण कर सकते हैं: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### इकाई और डेटासोर्स कॉन्टेक्स्ट - -आधार `Entity` वर्ग और चाइल्ड `DataSourceContext` वर्ग में गतिशील रूप से सेट करने और फ़ील्ड प्राप्त करने में सहायक होते हैं: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setI32(key: string, value: i32): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### आम AssemblyScript मुद्दे - -कुछ [असेंबलीस्क्रिप्ट](https://github.com/AssemblyScript/assemblyscript) समस्याएं हैं जो सबग्राफ विकास के दौरान सामान्य हैं। वे डिबग कठिनाई में हैं, हालांकि, उनके बारे में जागरूक होने से मदद मिल सकती है। निम्नलिखित इन मुद्दों की एक गैर-विस्तृत सूची है: - -- `निजी` वर्ग चर [AssembyScript](https://www.assemblyscript.org/status.html#language-features) में लागू नहीं किए जाते हैं। क्लास वेरिएबल्स को क्लास ऑब्जेक्ट से सीधे बदले जाने से बचाने का कोई तरीका नहीं है। -- [क्लोज़र फ़ंक्शंस](https://www.assemblyscript.org/status.html#on-closures) में स्कोप इनहेरिट नहीं किया गया है, यानी क्लोजर फ़ंक्शंस के बाहर घोषित वेरिएबल्स का उपयोग नहीं किया जा सकता है। [डेवलपर हाइलाइट #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s) में स्पष्टीकरण। diff --git a/website/pages/hi/network-transition-faq.mdx b/website/pages/hi/network-transition-faq.mdx deleted file mode 100644 index 461455388375..000000000000 --- a/website/pages/hi/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: नेटवर्क संक्रमण अक्सर पूछे जाने वाले प्रश्न ---- - -डेवलपर्स के पास अपने सबग्राफ को विकेंद्रीकृत नेटवर्क में माइग्रेट करने के लिए बहुत समय होगा। इंडेक्सर और नेटवर्क की तैयारी के आधार पर सटीक समय-सीमा नेटवर्क से नेटवर्क में भिन्न होगी-होस्ट की गई सेवा एक बार में सभी नेटवर्क के लिए समर्थन समाप्त नहीं करेगी और अचानक बंद नहीं होगी। - -एथेरियम सहित होस्ट की गई सेवा पर प्रत्येक नेटवर्क धीरे-धीरे समाप्त हो जाएगा क्योंकि यह फीचर समानता और सेवा की उच्च गुणवत्ता प्राप्त करने के लिए विकेंद्रीकृत नेटवर्क पर समर्थित है। यह [MIPs प्रोग्राम](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/) में इंडेक्सर्स की मदद से नेटवर्क-टू-नेटवर्क के आधार पर होगा। विकेंद्रीकृत नेटवर्क पर प्रत्येक नेटवर्क के लिए पूर्ण समर्थन सक्षम करने के लिए। - -होस्ट की गई सेवा पर प्रत्येक नेटवर्क के लिए निरंतर समर्थन के बारे में अधिक स्पष्टता जोड़ने के लिए, ये अक्सर पूछे जाने वाले प्रश्न नेटवर्क संक्रमण प्रक्रिया की बारीकियों के बारे में सामान्य प्रश्नों के उत्तर देते हैं। यदि आप सबग्राफ माइग्रेशन प्रक्रिया अभी प्रारंभ करना चाहते हैं, तो यहां [चरण-दर-चरण मार्गदर्शिका](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) दी गई है । माइग्रेशन FAQ पर जाने के लिए, [यहां क्लिक करें](#migration-faqs)। - -## होस्टेड सर्विस सनसेट एफएक्यू - -### क्या मुझे अपना सबग्राफ माइग्रेट करना होगा, इससे पहले कि विकेंद्रीकृत नेटवर्क सबग्राफ के लिए मुख्य कार्यात्मकता प्रदान करे? - -सबग्राफ डेवलपर्स अब अपने एथेरियम मेननेट सबग्राफ को माइग्रेट करना शुरू कर सकते हैं, लेकिन विकेंद्रीकृत नेटवर्क और होस्टेड सर्विस के लिए फीचर कोर कार्यक्षमता मौजूद होने से पहले सबग्राफ को नेटवर्क पर माइग्रेट करने के लिए मजबूर नहीं किया जाएगा। ग्नोसिस नेटवर्क सबग्राफ का माइग्रेशन भी जल्द ही शुरू हो जाएगा, अन्य नेटवर्क के साथ एक बार इंडेक्सर्स ने नेटवर्क का परीक्षण कर लिया है और उन्हें उत्पादन में अनुक्रमित करने के लिए तैयार हैं। - -### होस्ट की गई सेवा को बहिष्कृत करने की समय-सीमा और प्रक्रिया क्या है? - -सभी नेटवर्क की अपनी टाइमलाइन होगी, यह इस बात पर निर्भर करता है कि वे नेटवर्क पर कब सक्षम हैं और प्रत्येक चरण को पूरा करने में लगने वाली टाइमलाइन। कोर डेवलपर्स जितनी जल्दी हो सके विकेंद्रीकृत नेटवर्क में अधिकांश होस्ट किए गए सेवा ट्रैफ़िक को माइग्रेट करने के लिए काम कर रहे हैं। - -सबसे महत्वपूर्ण बात यह है कि विकेंद्रीकृत नेटवर्क पर आपके विशिष्ट नेटवर्क/सबग्राफ के लिए मुख्य कार्यक्षमता उपलब्ध होने से पहले आप होस्ट की गई सेवा तक पहुंच नहीं खोएंगे। - -प्रत्येक शृंखला के लिए होस्टेड सर्विस डेप्रिसिएशन के तीन अलग-अलग चरण हैं: - -#### चरण 1 (द सनरे): नेटवर्क पर गुणवत्ता समानता वाले ब्लॉकचेन के लिए नए सबग्राफ निर्माण को अक्षम करें - -इस चरण में, डेवलपर्स को उस नेटवर्क के लिए होस्टेड सेवा पर नए सबग्राफ्स को डिप्लॉय करने की अनुमति नहीं होगी। डेवलपर्स अब भी होस्टेड सेवा पर मौजूदा सबग्राफ्स को अपडेट करने की अनुमति होगी। - -होस्ट की गई सेवा से विकेंद्रीकृत नेटवर्क में संक्रमण के चरण 1 में अभी तक कोई श्रृंखला शुरू नहीं हुई है। - -जैसा कि नेटवर्क ने चरण 1 में प्रवेश किया है, कृपया ध्यान दें कि डेवलपर्स अभी भी सबग्राफ स्टूडियो में दर सीमित डेवलपर पूर्वावलोकन यूआरएल का उपयोग जीआरटी प्राप्त किए बिना या प्रोटोकॉल अर्थशास्त्र के साथ बातचीत किए बिना अपने सबग्राफ (1,000 मुक्त प्रश्नों तक) का विकास और परीक्षण करने के लिए कर सकते हैं। - -#### चरण 2 (द सनबीम): सबग्राफ अपडेट अक्षम करें - -इस चरण में, सबग्राफ्स के अपडेट सबग्राफ स्टूडियो के माध्यम से किए जाने होंगे और उसके बाद उन्हें डिसेंट्रलाइज़ड नेटवर्क पर प्रकाशित किया जाना होगा। इस चरण में होस्टेड सेवा सबग्राफ्स उपलब्ध रहेंगे और उन्हें क्वेरी किया जा सकता है, लेकिन सबग्राफ्स के अपडेट द ग्राफ के डिसेंट्रलाइज़ड नेटवर्क पर किए जाने होंगे। - -कोई भी नेटवर्क इस चरण में कब जाएगा, इसकी कोई सटीक समय-सीमा नहीं है, क्योंकि प्रक्रिया मुख्य कार्यक्षमता के आसपास के निकास मानदंडों द्वारा संचालित होती है, तारीखों से नहीं। - -#### चरण 3 (सूर्योदय): क्वेरी सबग्राफ अक्षम करें - -इस चरण में, द ग्राफ़ नेटवर्क द्वारा समर्थित नेटवर्क के लिए होस्ट की गई सेवा पर सबग्राफ अब प्रश्नों को संसाधित नहीं करेंगे। इस चरण में नेटवर्क पर सबग्राफ के लिए ब्लॉकचेन डेटा को क्वेरी करने का एकमात्र तरीका विकेंद्रीकृत नेटवर्क के माध्यम से होगा। टेस्ट क्वेरी अभी भी [सबग्राफ स्टूडियो](https://thegraph.com/studio/) में डेवलपमेंट क्वेरी यूआरएल के ज़रिए उपलब्ध होंगी। - -नेटवर्क तब तक तीसरे चरण में नहीं जाएगा जब तक कि दूसरे चरण में सफलतापूर्वक स्थानांतरित नहीं हो जाता है और डेवलपर्स को विकेंद्रीकृत नेटवर्क में माइग्रेट करने के लिए पर्याप्त समय नहीं दिया जाता है। - -![सबग्राफ चार्ट](/img/subgraph-chart.png) - -> नोट: यह आरेख प्रति-नेटवर्क सूर्यास्त प्रक्रिया को दर्शाता है। होस्ट की गई सेवा के सूर्यास्त का समय अलग-अलग होगा और एक साथ सूर्यास्त नहीं होगा। - -### गोएरली, मुंबई आदि जैसे परीक्षण नेटवर्क का क्या होता है? - -सभी नेटवर्क और परीक्षण नेटवर्क [सबग्राफ स्टूडियो](https://thegraph.com/studio/) में निःशुल्क परिनियोजन क्वेरी URL के लिए पात्र हैं। यह URL दर सीमित है और परीक्षण और विकास यातायात के लिए अभिप्रेत है। प्रोडक्शन ग्रेड अतिरेक और स्थिरता के लिए प्रोडक्शन ट्रैफिक को द ग्राफ नेटवर्क पर प्रकाशित एक सबग्राफ की आवश्यकता होगी। - -![कीमत सीमा](/img/rate-limit.png) - -### क्या ग्राफ़ नेटवर्क में होस्ट की गई सेवा के समान कार्यक्षमता है? - -ग्राफ़ नेटवर्क पर इंडेक्सर नवीनतम नेटवर्क-अनुमोदित [ग्राफ़ नोड की रिलीज़](https://github.com/graphprotocol/graph-node/releases) चलाते हैं, और समर्थित किसी भी सबग्राफ़ सुविधाओं का समर्थन कर सकते हैं उस रिलीज में। - -कभी-कभी रिलीज़ न की गई विशेषताएं जो अभी भी विकास के अधीन हैं, पहले डेवलपर प्रीव्यू URL पर उपलब्ध हो सकती हैं, जो [ग्राफ़ नोड](https://github.com/graphprotocol/graph-node) की नवीनतम मुख्य कमिट को चलाता है। ये सुविधाएं अगली ग्राफ़ नोड रिलीज़ के साथ नेटवर्क पर उपलब्ध हो जाएंगी। - -कुछ सबग्राफ विशेषताएँ इंडेक्सिंग पुरस्कारों के योग्य नहीं हैं, यदि वे नेटवर्क पर नियतात्मक या सत्यापन योग्य नहीं हैं। विशिष्ट उदाहरण IPFS से फ़ाइलें ला रहे हैं, और इंडेक्सिंग नेटवर्क अभी तक ग्राफ़ नेटवर्क पर समर्थित नहीं हैं। - -इन विशेषताओं वाले सबग्राफ को नेटवर्क पर प्रकाशित किया जा सकता है, लेकिन उन्हें इंडेक्सर्स द्वारा नहीं उठाया जा सकता है। हालांकि, पर्याप्त संकेत वाले सबग्राफ अभी भी क्वेरी फीस एकत्र करने में रुचि रखने वाले इंडेक्सर्स को आकर्षित कर सकते हैं, जिसके लिए कोई भी सबग्राफ पात्र है। - -### मेरे स्वयं के बुनियादी ढांचे को चलाने की तुलना में ग्राफ़ नेटवर्क की लागत कितनी है? - -ग्राफ़ का विकेन्द्रीकृत नेटवर्क समर्पित बुनियादी ढांचे को चलाने की तुलना में 60-90% कम महंगा है, जैसा कि [इन केस अध्ययनों](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month) में दिखाया गया है। - -### नेटवर्क पर माइग्रेट करने के बाद क्या मुझे अपने होस्टेड सर्विस सबग्राफ के साथ कुछ करना चाहिए? - -भ्रम से बचने के लिए अपने होस्ट किए गए सर्विस सबग्राफ को छिपाने की पुरजोर सिफारिश की जाती है। [यह वीडियो](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) पूरी प्रक्रिया से गुजरता है। - -### विकेंद्रीकृत नेटवर्क मेरे पसंदीदा नेटवर्क का समर्थन कब करेगा? - -प्रति नेटवर्क कोई निर्धारित समयरेखा नहीं है, वे [एमआईपी प्रोग्राम](https://thegraph.com/migration-incentive-program/) के माध्यम से इंडेक्सर रेडीनेस द्वारा तय किए जाएंगे जहां इंडेक्सर्स द्वारा नए नेटवर्क का परीक्षण किया जाता है। जैसे ही नेटवर्क पर नए नेटवर्क समर्थित होते हैं, उपयोगकर्ताओं को माइग्रेशन की तैयारी के लिए पर्याप्त सूचना प्राप्त होगी। द ग्राफ इकोसिस्टम के कोर देव और योगदानकर्ता जल्द से जल्द अधिक नेटवर्क के लिए समर्थन लागू करने के लिए काम कर रहे हैं। - -### क्या एथेरियम मेननेट नेटवर्क संक्रमण प्रक्रिया के चरण 1 में प्रवेश कर रहा है? - -जबकि एथेरियम को शुरू में Q3 2022 के अंत तक होस्ट की गई सेवा से संक्रमण शुरू करने की उम्मीद थी, इसे [स्थगित किया गया ](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) उपयोगकर्ता प्रतिक्रिया को संबोधित करने के लिए। उपयोगकर्ता अनुभव, बिलिंग और उपयोगकर्ता अनुरोधों की अन्य पूर्ति में अतिरिक्त सुधार एथेरियम की होस्ट की गई सेवा संक्रमण समयरेखा को चलाएगा। नीचे दिए गए एकीकरण स्थिति ट्रैकर के माध्यम से और [द ग्राफ ट्विटर](https://twitter.com/graphprotocol) के माध्यम से एथेरियम सनरे चरण में कब प्रवेश करेगा, इस पर अद्यतित रहें। - -### ग्राफ़ नेटवर्क एकीकरण स्थिति ट्रैकर - -नीचे दी गई तालिका दर्शाती है कि नेटवर्क एकीकरण प्रक्रिया में प्रत्येक नेटवर्क कहां है। यदि आपका पसंदीदा नेटवर्क अभी तक सूचीबद्ध नहीं है, तो एकीकरण अभी तक शुरू नहीं हुआ है, और वह नेटवर्क अभी भी ग्राफ़ की होस्ट की गई सेवा द्वारा पूरी तरह से समर्थित है। - -> इस तालिका में परीक्षण नेटवर्क शामिल नहीं होंगे, जो [सबग्राफ स्टूडियो](https://thegraph.com/studio/) में निःशुल्क रहते हैं। - -| नेटवर्क | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | चरण 2: होस्ट की गई सेवा पर सबग्राफ अपडेट अक्षम करें | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum-one | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* नेटवर्क वर्तमान में ग्राफ़ के विकेंद्रीकृत नेटवर्क पर बीटा में है। - -## प्रश्न शुल्क, एपीआई कुंजी, और बिलिंग अक्सर पूछे जाने वाले प्रश्न - -### प्रश्न शुल्क का मूल्य निर्धारण कैसे किया जाता है? - -विकेंद्रीकृत नेटवर्क पर क्वेरी की मांग से क्वेरी शुल्क की कीमतें प्रभावित होती हैं। कोर डेवलपर्स ने [अगोरा](https://github.com/graphprotocol/agora) नामक क्वेरी मूल्य निर्धारण लागत मॉडल भाषा बनाई। यह अनुक्रमणकों को कुशलतापूर्वक प्रश्नों का मूल्य निर्धारण करने में सक्षम बनाता है। [अगोरा दस्तावेज़ीकरण](https://github.com/graphprotocol/agora/blob/master/docs/README.md) में अधिक जानें। - -### मैं एक अधिकतम क्वेरी बजट कैसे निर्धारित कर सकता हूँ? - -उपयोगकर्ता बजट टैब के अंतर्गत Subgraph Studio [API कुंजी](https://thegraph.com/studio/apikeys/) अनुभाग में अधिकतम क्वेरी बजट सेट कर सकते हैं। [इस वीडियो को देखें](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) उस प्रक्रिया के अवलोकन के लिए, साथ ही साथ अपनी API कुंजी के अन्य भागों को समायोजित करें। - -कृपया ध्यान दें कि आपके अधिकतम क्वेरी बजट को बहुत कम सेट करने से इंडेक्सर्स बहिष्कृत हो जाएंगे, जो संभावित रूप से विफल क्वेरीज़, धीमी क्वेरीज़ आदि के रूप में खराब गुणवत्ता सेवा का कारण बनेंगे। - -सितंबर 2022 के अंत तक, न्यूनतम अधिकतम क्वेरी बजट के रूप में $0.00035-$0.0004 की सीमा के भीतर रहना सबसे अच्छा अभ्यास है। - -### मैं अपनी एपीआई कुंजी की सुरक्षा कैसे कर सकता हूं? - -उपयोगकर्ताओं को [सबग्राफ स्टूडियो](https://thegraph.com/studio/) में सबग्राफ और डोमेन दोनों द्वारा API कुंजी को प्रतिबंधित करने के लिए प्रोत्साहित किया जाता है: - -![डोमेन प्रतिबंधित करें](/img/restrictdomain.png) - -### प्रश्न शुल्क का भुगतान करने के लिए मैं अपनी एपीआई कुंजी कैसे भरूं? - -आप "जीआरटी जोड़ें" बटन दबाकर सबग्राफ स्टूडियो [बिलिंग डैशबोर्ड](https://thegraph.com/studio/billing/) में अपनी बिलिंग शेष राशि भर सकते हैं। अधिक निर्बाध और आवर्ती भुगतान जोड़ने के लिए इस अनुभव को बेहतर बनाने के लिए काम चल रहा है। - -[इस वीडियो](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) में उस प्रक्रिया का अवलोकन है। - -### मैं अपनी API कुंजी में कम बिलिंग शेष के लिए अलर्ट कैसे सेट करूं? - -उपयोगकर्ताओं को [यहां](https://thegraph.com/studio/settings/) अपने ईमेल पते पर बिलिंग अलर्ट सेट करना चाहिए। - -साथ ही, बिलिंग शेष कम होने पर चेतावनी देने के लिए उपयोगकर्ता के UI के भीतर एक बैनर फ्लैश करेगा। - -मेरी API कुंजी सेटिंग प्रबंधित करने के लिए सर्वोत्तम प्रथाएं क्या हैं? - -सेवा की उच्च गुणवत्ता बनाए रखते हुए कम औसत क्वेरी मूल्य बनाए रखने के लिए $0.0004 के अधिकतम क्वेरी बजट की अनुशंसा की जाती है। यह [API कुंजी अनुभाग](https://thegraph.com/studio/apikeys/) के बजट बिलिंग टैब में किया जा सकता है। - -## प्रवासन अक्सर पूछे जाने वाले प्रश्न - -### मैं अपने सबग्राफ को ग्राफ़ के विकेंद्रीकृत नेटवर्क में कैसे माइग्रेट कर सकता हूँ? - -इस सरल [चरण-दर-चरण मार्गदर्शिका](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) के साथ अपने सबग्राफ को द ग्राफ़ नेटवर्क में माइग्रेट करना सीखें या [यह वीडियो](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s)। - -### क्या उन सबग्राफ़ों के लिए नेटवर्क अनुदान हैं जो ग्राफ़ नेटवर्क पर जल्दी माइग्रेट होते हैं? - -हाँ। नेटवर्क अनुदान के लिए आवेदन करने के लिए, [यहां](mailto:migration@thegraph.foundation) संपर्क करें। - -### क्या ग्राफ़ ईकोसिस्टम से माइग्रेशन प्रक्रिया के माध्यम से कोई वित्तीय/तकनीकी/विपणन सहायता है? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### प्रश्नों में कितना समय लगता है? - -विकेंद्रीकृत नेटवर्क पर क्वेरी औसतन 150-300 मिलीसेकंड लेती हैं। - -### क्या ग्राफ़ नेटवर्क पर बिलिंग प्रक्रिया होस्टेड सेवा की तुलना में अधिक जटिल है? - -हां, नेटवर्क के लिए UX अभी तक होस्ट की गई सेवा के साथ गुणवत्ता समानता पर नहीं है। बिलिंग UX, विशेष रूप से, अभी भी बहुत शुरुआती चरणों में है और ऐसे कई चलते हुए भाग हैं जिन्हें कोर विकास दल प्रक्रिया से अलग करने के लिए काम कर रहे हैं। इनमें से अधिकांश सुधार निकट भविष्य में सार्वजनिक किए जाएंगे। - -### क्या मैं ग्राफ़ नेटवर्क प्रश्नों के लिए फिएट, क्रेडिट कार्ड या स्थिर मुद्रा में भुगतान कर सकता हूँ? - -आने वाले महीनों में, उपयोगकर्ताओं को अपने सबग्राफ के लिए भुगतान करने के लिए आवश्यक चरणों की संख्या बहुत कम हो जाएगी। जबकि भुगतान अभी भी जीआरटी में किए जाएंगे, आवर्ती भुगतान करने के लिए फिएट और क्रिप्टो को जीआरटी में बदलने के लिए फिएट ऑन-रैंप और स्वचालित भुगतान प्रणाली को लागू करने के प्रयास पहले से ही चल रहे हैं। - -### क्या नेटवर्क का कभी भी होस्ट की गई सेवा के समान UX होगा? - -जबकि अभी भी काम करना बाकी है, इसका उद्देश्य द ग्राफ नेटवर्क पर वर्तमान में होस्ट की गई सेवा की तुलना में बेहतर गुणवत्ता वाले UX की पेशकश करना है। अल्पावधि में, इसका उद्देश्य अधिक सुव्यवस्थित और पूर्वानुमेय बिलिंग अनुभव प्रदान करना है जो उपयोगकर्ताओं को उच्च-गुणवत्ता वाले डैप बनाने में अधिक समय देने में मदद करता है। - -### मैं यह कैसे सुनिश्चित कर सकता हूं कि मेरा सबग्राफ इंडेक्सर द्वारा ग्राफ़ नेटवर्क पर उठाया जाएगा? - -कम से कम 10,000 जीआरटी के साथ क्यूरेट करने की सिफारिश की जाती है, जो उपयोगकर्ता उसी लेनदेन में कर सकते हैं जब वे प्रकाशित करते हैं। उपयोगकर्ता क्यूरेशन समुदाय को [यहां](https://t.me/CurationStation) अपना सबग्राफ क्यूरेट करने के लिए भी कह सकते हैं। - -प्रारंभिक प्रवासियों के लिए इन प्रारंभिक लागतों को कवर करने के लिए नेटवर्क अनुदान हैं। बेझिझक [यहां](mailto:migration@thegraph.foundation) आवेदन करें। - -### सबग्राफ को क्यूरेशन सिग्नल की आवश्यकता क्यों होती है? क्या होगा अगर क्यूरेटर से मेरे सबग्राफ पर पर्याप्त संकेत नहीं है? - -क्यूरेशन सिग्नल जितना अधिक होता है, इंडेक्सर्स के लिए एक सबग्राफ उतना ही अधिक आकर्षक होता है, क्योंकि उच्च सिग्नल और उच्च इंडेक्सिंग पुरस्कारों के बीच एक रैखिक संबंध होता है। क्यूरेशन के बिना, इंडेक्सर्स के लिए सबग्राफ लेने के लिए कोई प्रोत्साहन नहीं है। - -### जीआरटी का क्या होता है एक सबग्राफ डेवलपर क्यूरेशन सिग्नल के लिए उपयोग करता है? - -यदि आप किसी सबग्राफ का संकेत देने वाले पहले व्यक्ति हैं, तो आपकी GRT संकेतित राशि कम नहीं होगी। क्यूरेशन के लिए इस्तेमाल किए गए जीआरटी को बाद में हटाया जा सकता है। इसके अलावा, क्यूरेटर को इंडेक्सर्स द्वारा ली गई सभी क्वेरी फीस का 10% मिलता है। - -### क्यूरेशन प्रक्रिया में क्या सुधार आ रहे हैं? - -अल्पावधि, आर्बिट्रम पर प्रारंभिक क्यूरेशन मॉडल, क्यूरेशन सिग्नल को सिद्धांत-संरक्षण प्रदान करेगा। लंबे समय तक, कोर देव डेवलपर्स को क्यूरेशन सिग्नल किराए पर लेने की क्षमता प्रदान करने को प्राथमिकता देंगे, एक अधिक अनुमानित मूल्य निर्धारण अनुभव खोलते हुए यह सुनिश्चित करते हुए कि सबग्राफ पर्याप्त रूप से अनुक्रमित हैं। - -### मैं सबग्राफ एपीआई को फ्रंट-एंड में कैसे स्विच करूं? - -कम से कम एक इंडेक्सर द्वारा एक सबग्राफ को पूरी तरह से अनुक्रमित करने के बाद, एक उपयोगकर्ता विकेंद्रीकृत नेटवर्क से पूछताछ कर सकता है। - -अपने सबग्राफ के लिए क्वेरी URL को पुनः प्राप्त करने के लिए, आप क्वेरी URL के बगल में स्थित प्रतीक पर क्लिक करके इसे कॉपी/पेस्ट कर सकते हैं। आपको कुछ ऐसा दिखाई देगा: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -बस [api-key] को सबग्राफ स्टूडियो [API कुंजी अनुभाग](https://thegraph.com/studio/apikeys/) में जनरेट की गई API कुंजी से बदलें। - -### प्रश्नों की लागत कितनी है? - -नेटवर्क के भीतर औसत क्वेरी लागत भिन्न होती है। सितंबर 2022 के महीने के लिए, प्रति क्वेरी शुल्क लागत का औसत मूल्य $0.00012 - $0.00020 के बीच था। - -### मैं कैसे पता लगा सकता हूं कि मेरे सबग्राफ में कितना वॉल्यूम है और इसकी लागत कितनी होगी? - -होस्ट की गई सेवा मात्रा डेटा सार्वजनिक नहीं है। मात्रा और लागत अनुमान प्राप्त करने के लिए कृपया [यहां](mailto:migration@thegraph.foundation) संपर्क करें। - -### गेटवे कैसे काम करता है? क्या यह पूरी तरह विकेंद्रीकृत है? - -गेटवे प्रक्रिया पूछताछ करती है ताकि इंडेक्सर्स डैप की सेवा कर सकें। प्रवेश द्वार एक मध्यवर्ती चरण में हैं जो उत्तरोत्तर विकेंद्रीकृत हो रहे हैं। इस पर और जल्द ही। - -## नेटवर्क एफएक्यू का उपयोग करना - -### क्या मेरे सबग्राफ को अद्यतन करने की कोई लागत है? - -हां, यह संकेतित क्यूरेशन का 1% है। 1% को क्यूरेटर (0.5%) और सबग्राफ डेवलपर्स (0.5%) के बीच समान रूप से विभाजित किया गया है। इसलिए, प्रत्येक 10K GRT सिग्नल के लिए, अपडेट करने के लिए सबग्राफ डेवलपर्स को 50 GRT का खर्च आता है। - -### How do I speed up sync time? - -सबग्राफ के भीतर स्मार्ट कॉन्ट्रैक्ट कॉल्स का उपयोग कम से कम करें। स्मार्ट अनुबंध स्थिति तक पहुँचने के लिए RPC को एक eth_call की आवश्यकता होती है, जो सिंक समय को धीमा कर देती है। - -### Is there multisig support in Subgraph Studio as I migrate? - -हां, मल्टीसिग सपोर्ट हाल ही में जोड़ा गया है। आप अधिक जानकारी [यहां](https://thegraph.com/docs/studio/multisig) प्राप्त कर सकते हैं। - -### एथेरियम और आर्बिट्रम पर जीआरटी के लिए अनुबंध के पते क्या हैं? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### आमतौर पर प्रोजेक्ट अपनी API कुंजी में कितना GRT रखते हैं? - -कई प्रोजेक्ट अपनी API कुंजी में 30-60 दिनों का GRT रखते हैं, इसलिए उन्हें अक्सर फिर से भरने की आवश्यकता नहीं होती है। यह समझने के लिए कि आपका 30-60 दिन का जीआरटी शुल्क क्या होगा, कृपया [यहां](mailto:migration@thegraph.foundation) संपर्क करें। - -### विकेंद्रीकृत नेटवर्क पर क्वेरी भुगतान कैसे किए जाते हैं?  - -शुल्क को साप्ताहिक रूप से चालान किया जाता है और जीआरटी के साथ एक उपयोगकर्ता की एपीआई कुंजी से निकाला जाता है जिसे आर्बिट्रम पर लगाया जाता है और बैठता है। - -### विकेंद्रीकृत नेटवर्क पर सबग्राफ के लिए एपीआई कुंजियों का उपयोग कैसे किया जाता है? - -एपीआई कुंजी उपयोगकर्ताओं को उनके द्वारा भुगतान की जाने वाली अधिकतम क्वेरी कीमतों और मूल्य, आर्थिक ताजगी और क्वेरी गति जैसे कारकों को प्राथमिकता देने के लिए कहने के लिए सशक्त बनाती है। - -### सेवा की गुणवत्ता वर्तमान में होस्ट की गई सेवा और विकेंद्रीकृत नेटवर्क के बीच तुलना कैसे करती है? - -होस्ट की गई सेवा और विकेंद्रीकृत नेटवर्क में लगभग समान विलंबता होती है, लेकिन विकेंद्रीकृत नेटवर्क में उच्च प्रतिशतता पर उच्च विलंबता होती है। प्रश्नों के लिए 200 दरें आम तौर पर समान होती हैं, दोनों के साथ > 99.9%। इसके विकेंद्रीकरण के परिणामस्वरूप, नेटवर्क के सबग्राफ में व्यापक आउटेज नहीं हुआ है, जबकि होस्ट की गई सेवा दुर्लभ अवसरों पर अपनी केंद्रीकृत प्रकृति के परिणामस्वरूप अस्थायी आउटेज होती है। - -### क्या होगा यदि मेरे प्रश्न का उत्तर इन अक्सर पूछे जाने वाले प्रश्नों से नहीं मिलता है? - -किसी भी अतिरिक्त सहायता के लिए कृपया [migration@thegraph.foundation](mailto:migration@thegraph.foundation) से संपर्क करें। diff --git a/website/pages/hi/querying/querying-the-hosted-service.mdx b/website/pages/hi/querying/querying-the-hosted-service.mdx deleted file mode 100644 index 7732498539b8..000000000000 --- a/website/pages/hi/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: होस्ट की गई सेवा को क्वेरी करना ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -एक उदाहरण नीचे दिया गया है, लेकिन कृपया [क्वेरी एपीआई](/querying/graphql-api) देखें, ताकि सबग्राफ की संस्थाओं से क्वेरी कैसे की जाए, इस पर एक पूर्ण संदर्भ प्राप्त हो सके। - -## उदाहरण - -यह क्वेरी हमारे मैपिंग द्वारा बनाए गए सभी काउंटरों को सूचीबद्ध करती है। चूंकि हम केवल एक बनाते हैं, परिणाम में केवल हमारा `डिफ़ॉल्ट-काउंटर` होगा: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -कुछ मुख्य विशेषताओं का विवरण नीचे दिया गया है: - -![एक्सप्लोरर खेल का मैदान](/img/explorer-playground.png) diff --git a/website/pages/it/cookbook/quick-start.mdx b/website/pages/it/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/it/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/it/developing/assemblyscript-api.mdx b/website/pages/it/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/it/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/it/network-transition-faq.mdx b/website/pages/it/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/it/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/it/querying/querying-the-hosted-service.mdx b/website/pages/it/querying/querying-the-hosted-service.mdx deleted file mode 100644 index f00ff226ce09..000000000000 --- a/website/pages/it/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Example - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/ja/cookbook/quick-start.mdx b/website/pages/ja/cookbook/quick-start.mdx deleted file mode 100644 index 4e745b9502f2..000000000000 --- a/website/pages/ja/cookbook/quick-start.mdx +++ /dev/null @@ -1,163 +0,0 @@ ---- -title: クイックスタート ---- - -このガイドでは、サブグラフを初期化、作成、および Subgraph Studio または [ホストされたサービス](#hosted-service) にデプロイする方法について簡単に説明します。 - -サブグラフが [サポートされているネットワーク](/developing/supported-networks) からのデータをインデックス化していることを確認してください。 - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -[https://thegraph.com/studio/](https://thegraph.com/studio/) にアクセスし、ウォレットを接続します。 - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -Graph CLI は JavaScript で書かれており、使用するには `npm` または `yarn` のいずれかをインストールする必要があります。 - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. サブグラフの初期化 - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![サブグラフ コマンド](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -前述のコマンドでは、サブグラフを作成するための出発点として使用できる scaffold サブグラフを作成します。 サブグラフに変更を加える際には、主に 3 つのファイルを使用します: - -- マニフェスト (subgraph.yaml) - マニフェストは、サブグラフがインデックスするデータソースを定義します。 -- スキーマ (schema.graphql) - GraphQL スキーマは、サブグラフから取得するデータを定義します. -- AssemblyScript Mappings (mapping.ts) - データソースからのデータを、スキーマで定義されたエンティティに変換するコードです。 - -サブグラフの書き方の詳細については、 [Create a Subgraph](/developing/creating-a-subgraph) を参照してください。 - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- サブグラフの認証とデプロイを行います。 デプロイキーは、Subgraph Studio の Subgraph ページにあります。 - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/ja/developing/assemblyscript-api.mdx b/website/pages/ja/developing/assemblyscript-api.mdx deleted file mode 100644 index 4383826af51d..000000000000 --- a/website/pages/ja/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: `graph-cli`/`graph-ts` version `0.22.0`より前にサブグラフを作成した場合、古いバージョンの AssemblyScript を使用しているので、[`Migration Guide`](/release-notes/assemblyscript-migration-guide)を参照することをお勧めします。 - -このページでは、サブグラフのマッピングを記述する際に、どのような組み込み API を使用できるかを説明します。 すぐに使える API は 2 種類あります: - -- [Graph TypeScript ライブラリ](https://github.com/graphprotocol/graph-ts) (`graph-ts`)と -- `graph codegen`によってサブグラフファイルから生成されたコードです。 - -また、[AssemblyScript](https://github.com/AssemblyScript/assemblyscript)との互換性があれば、他のライブラリを依存関係に追加することも可能です。 マッピングはこの言語で書かれているので、言語や標準ライブラリの機能については、 [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki)が参考になります。 - -## インストール - -[`graph init`](/developing/creating-a-subgraph)で作成されたサブグラフには、あらかじめ設定された依存関係があります。 これらの依存関係をインストールするために必要なのは、以下のコマンドのいずれかを実行することです: - -```sh -yarn install # Yarn -npm install # NPM -``` - -サブグラフが最初から作成されている場合は、次の 2 つのコマンドのいずれかを実行すると、Graph TypeScript ライブラリが依存関係としてインストールされます: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install -save-dev @graphprotocol/graph-ts # NPM -``` - -## API リファレンス - -`@graphprotocol/graph-ts`ライブラリは、以下の API を提供しています: - -- Ethereum スマートコントラクト、イベント、ブロック、トランザクション、Ethereum の値を扱うための`ethereum`API -- エンティティをグラフノードのストアからロードしたり、ストアに保存したりする`store`API -- Graph Node の出力や Graph Explorer にメッセージを記録するための`log`API です -- IPFS からファイルをロードする`ipfs`API -- JSON データを解析するための`json`API -- 暗号機能を使用するための`crypto`API -- Ethereum、JSON、GraphQL、AssemblyScript など、異なるタイプのシステム間で変換するための低レベルプリミティブ - -### バージョン - -サブグラフマニフェストの`apiVersion` は、指定されたサブグラフに対してグラフノードが実行するマッピング API のバージョンを指定します。 現在のマッピング API のバージョンは 0.0.6 です。 - -| バージョン | リリースノート | -| :-: | --- | -| 0.0.7 | Ethereumタイプに `TransactionReceipt`と`Log`クラスを追加
    Ethereum Eventオブジェクトに`receipt`フィールドを追加。 | -| 0.0.6 | Ethereum Transaction オブジェクトに`nonce`フィールドを追加 イーサリアムブロックオブジェクトに
    Added `baseFeePerGas`を追加 | -| 0.0.5 | AssemblyScript がバージョン 0.19.10 にアップグレード(変更点がありますので[`Migration Guide`](/release-notes/assemblyscript-migration-guide))をご覧ください)。
    `ethereum.transaction.gasUsed`の名前が`ethereum.transaction.gasLimit`に変更 | -| 0.0.4 | Ethereum SmartContractCall オブジェクトに`functionSignature`フィールドを追加 | -| 0.0.3 | Ethereum Call オブジェクトに`from`フィールドを追加
    `etherem.call.address`の名前を `ethereum.call.to`に変更 | -| 0.0.2 | Ethereum Transaction オブジェクトに `input`フィールドを追加 | - -### 組み込み型 - -AssemblyScript に組み込まれている基本型のドキュメントは[AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types)にあります。 - -以下の追加型は`@graphprotocol/graph-ts`で提供されています。 - -#### バイト配列 - -```typescript -'@graphprotocol/graph-ts'から{ ByteArray } をインポートします。 -``` - -`ByteArray`は、`u8`の配列を表します。 - -_工事_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_型変換_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_オペレーター_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -'@graphprotocol/graph-ts'から { BigDecimal } をインポートします。 -``` - -`BigDecimal`は、任意の精度の小数を表現するために使用されます。 - -> 注: [内部的には](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` は [IEEE-754 decimal128 浮動小数点フォーマット](https://en.wikipedia.org/wiki/Decimal128_floating-point_format) で保存されており、これは小数点以下の34桁をシグニフィカントでサポートします。このため、`BigDecimal` は、Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) などのように 34 桁より広い固定小数点を表現するには不向きです。 - -_工事_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_型変換_ - -- `toString(): string` – prints to a decimal string. - -_数学_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y` -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y` -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y` -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y` -- `equals(y: BigDecimal): bool` – can be written as `x == y` -- `notEqual(y: BigDecimal): bool` – can be written as `x != y` -- `lt(y: BigDecimal): bool` – can be written as `x < y` -- `le(y: BigDecimal): bool` – can be written as `x <= y` -- `gt(y: BigDecimal): bool` – can be written as `x > y` -- `ge(y: BigDecimal): bool` – can be written as `x >= y` -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -'@graphprotocol/graph-ts'から { BigInt } をインポートします。 -``` - -`BigInt`は大きな整数を表すのに使われます。 これには、Ethereum の`uint32`~`uint256` 、`int64` ~`int256`の値が含まれます。 `uint32`、`int32`、`uint24`、`int8`以下のものはすべて`i32`で表されます。 - -`BigInt`クラスの API は以下の通りです。 - -_工事_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32` -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _型変換_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_数学_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -'@graphprotocol/graph-ts'から { TypedMap } をインポートします。 -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -`TypedMap` クラスには次の API があります - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -'@graphprotocol/graph-ts'から { Bytes } をインポートします。 -``` - -`Bytes` は、任意の長さの bytes 配列を表すために使用されます。 これには、Ethereum の `bytes`、`bytes32` などの型の値が含まれます。 - -`Bytes`クラスは AssemblyScript の[Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64)を継承しており、`Uint8Array` のすべての機能に加えて、以下の新しいメソッドをサポートしています。 - -_工事_ - -- `fromHexString(hex: string) : Bytes` - 文字列 `hex` を `ByteArray` に変換します。これは偶数個の 16 進数で構成される必要があります。文字列 `hex` は、必要に応じて `0x` で開始できます -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_型変換_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_オペレーター_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### 住所 - -```typescript -'@graphprotocol/graph-ts'から { Address } をインポートします。 -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -`Bytes`の API の上に以下のメソッドを追加しています。 - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### ストア API - -```typescript -'@graphprotocol/graph-ts'から { store } をインポートします。 -``` - -`store` API は、グラフノードのストアにエンティティを読み込んだり、保存したり、削除したりすることができます。 - -ストアに書き込まれたエンティティは、サブグラフの GraphQL スキーマで定義された`@entity`タイプに一対一でマッピングされます。 これらのエンティティの扱いを便利にするために、[Graph CLI](https://github.com/graphprotocol/graph-cli)で提供される `graph codegen` コマンドは、組み込みの`Entity`型のサブクラスであるエンティティ・クラスを生成します。 - -#### エンティティの作成 - -Ethereum のイベントからエンティティを作成する際の一般的なパターンを以下に示します。 - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -チェーンの処理中に`Transfer` イベントが発生すると、生成された`Transfer`タイプ(ここではエンティティタイプとの名前の衝突を避けるために`TransferEvent`とエイリアスされています)を使用して、`handleTransfer`イベントハンドラに渡されます。 このタイプでは、イベントの親トランザクションやそのパラメータなどのデータにアクセスすることができます。 - -各エンティティは、他のエンティティとの衝突を避けるために、ユニークな ID を持たなければなりません。 イベントのパラメータには、使用可能な一意の識別子が含まれているのが一般的です。 注:トランザクションのハッシュを ID として使用することは、同じトランザクション内の他のイベントがこのハッシュを ID としてエンティティを作成しないことを前提としています。 - -#### ストアからのエンティティの読み込み - -エンティティがすでに存在する場合、以下の方法でストアからロードすることができます。 - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -エンティティはまだストアに存在していない可能性があるため、`load`メソッドは`Transfer | null`型の値を返します。 そのため、値を使用する前に、`null`のケースをチェックする必要があるかもしれません。 - -> **Note:** エンティティのロードは、マッピングでの変更がエンティティの以前のデータに依存する場合にのみ必要です。 既存のエンティティを更新する 2 つの方法については、次のセクションを参照してください。 - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### 既存のエンティティの更新 - -既存のエンティティを更新するには 2 つの方法があります。 - -1. `Transfer.load(id)`などでエンティティをロードし、エンティティにプロパティを設定した後、`.save()`でストアに戻す。 -2. 単純に`new Transfer(id)`でエンティティを作成し、エンティティにプロパティを設定し、ストアに `.save()`します。 エンティティがすでに存在する場合は、変更内容がマージされます。 - -プロパティの変更は、生成されたプロパティセッターのおかげで、ほとんどの場合、簡単です。 - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -また、次の 2 つの命令のいずれかで、プロパティの設定を解除することも可能です。 - -```typescript -transfer.from.unset() -transfer.from = null -``` - -これは、オプションのプロパティ、つまり GraphQL で`!`を付けずに宣言されているプロパティでのみ機能します。 例としては、`owner: Bytes`や`amount: BigInt`です。 - -エンティティから配列を取得すると、その配列のコピーが作成されるため、配列のプロパティの更新には少し手間がかかります。 つまり、配列を変更した後は、明示的に配列のプロパティを設定し直す必要があります。 次の例では、`entity` が `numbers: [BigInt!]!` を持っていると仮定します。 - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### ストアからのエンティティの削除 - -現在、生成された型を使ってエンティティを削除する方法はありません。 代わりに、エンティティを削除するには、エンティティタイプの名前とエンティティ ID を`store.remove`に渡す必要があります。 - -```typescript -mport { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -Ethereum API は、スマートコントラクト、パブリックステート変数、コントラクト関数、イベント、トランザクション、ブロック、および Ethereum データのエンコード/デコードへのアクセスを提供します。 - -#### Ethereum タイプのサポート - -エンティティと同様に、`graph codegen`は、サブグラフで使用されるすべてのスマートコントラクトとイベントのためのクラスを生成します。 このためには、コントラクト ABI がサブグラフマニフェストのデータソースの一部である必要があります。 通常、ABI ファイルは`abis/`フォルダに格納されています。 - -生成されたクラスでは、Ethereum 型と [組み込み型](#built-in-types)の間の変換が背後で行われるため、サブグラフの作成者はそれらを気にする必要がありません。 - -以下の例で説明します。 以下のようなサブグラフのスキーマが与えられます。 - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### イベントとブロック/トランザクションデータ - -前述の例の`Transfer`イベントのように、イベントハンドラに渡された Ethereum イベントは、イベントパラメータへのアクセスだけでなく、その親となるトランザクションや、それらが属するブロックへのアクセスも提供します。 `event` インスタンスからは、以下のデータを取得することができます(これらのクラスは、 `graph-ts`の`ethereum`モジュールの一部です)。 - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### スマートコントラクトの状態へのアクセス - -`graph codegen`が生成するコードには、サブグラフで使用されるスマートコントラクトのクラスも含まれています。 これらを使って、パブリックな状態変数にアクセスしたり、現在のブロックにあるコントラクトの関数を呼び出したりすることができます。 - -よくあるパターンは、イベントが発生したコントラクトにアクセスすることです。 これは以下のコードで実現できます。 - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer`は、エンティティタイプとの名前の衝突を避けるために、ここでは`TransferEvent`にエイリアスされています。 - -Ethereum の `ERC20Contract`に`symbol`というパブリックな読み取り専用の関数があれば、`.symbol()`で呼び出すことができます。 パブリックな状態変数については、同じ名前のメソッドが自動的に作成されます。 - -サブグラフの一部である他のコントラクトは、生成されたコードからインポートすることができ、有効なアドレスにバインドすることができます。 - -#### リバートされた呼び出しの処理 - -コントラクトの読み取り専用メソッドが復帰する可能性がある場合は、`try_`を前置して生成されたコントラクトメソッドを呼び出すことで対処しなければなりません。 例えば、Gravity コントラクトでは`gravatarToOwner`メソッドを公開しています。 このコードでは、そのメソッドの復帰を処理することができます。 - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -ただし、Geth や Infura のクライアントに接続された Graph ノードでは、すべてのリバートを検出できない場合があるので、これに依存する場合は Parity のクライアントに接続された Graph ノードを使用することをお勧めします。 - -#### 符号化/復号化 ABI - -`ethereum`モジュールの`encode`/ `decode`関数を使用して、Ethereum の ABI エンコーディングフォーマットに従ってデータをエンコード/デコードすることができます。 - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -その他の情報: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -'@graphprotocol/graph-ts'から{ log } をインポートします。 -``` - -`log` API は、サブグラフがグラフノードの標準出力やグラフエクスプローラに情報を記録するためのものです。 メッセージは、異なるログレベルを使って記録することができます。 基本的なフォーマット文字列の構文が提供されており、引数からログメッセージを構成することができます。 - -`log` API には以下の機能があります: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -`log` API は、フォーマット文字列と文字列値の配列を受け取ります。 そして、プレースホルダーを配列の文字列値で置き換えます。 最初の`{}`プレースホルダーは配列の最初の値に置き換えられ、2 番目の`{}`プレースホルダーは 2 番目の値に置き換えられ、以下のようになります。 - -```typescript -log.info('表示されるメッセージ。{}, {}, {}', [value.toString(), anotherValue.toString(), 'すでに文字列']) -``` - -#### 1 つまたは複数の値を記録する - -##### 1 つの値を記録する - -以下の例では、文字列値 "A" を配列に渡して`['A']` にしてからログに記録しています。 - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### 既存の配列から 1 つのエントリをロギングする - -以下の例では、配列に 3 つの値が含まれているにもかかわらず、引数の配列の最初の値だけがログに記録されます。 - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### 既存の配列から複数のエントリを記録する - -引数配列の各エントリは、ログメッセージ文字列に独自のプレースホルダー`{}`を必要とします。 以下の例では、ログメッセージに 3 つのプレースホルダー`{}`が含まれています。 このため、`myArray`の 3 つの値すべてがログに記録されます。 - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### 既存の配列から特定のエントリをロギングする - -配列内の特定の値を表示するには、インデックス化された値を指定する必要があります。 - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### イベント情報の記録 - -以下の例では、イベントからブロック番号、ブロックハッシュ、トランザクションハッシュをログに記録しています。 - -```typescript -'@graphprotocol/graph-ts'から { log } をインポートします。 - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -'@graphprotocol/graph-ts'から { ipfs } をインポートします。 -``` - -スマートコントラクトは時折、チェーン上の IPFS ファイルをアンカリングします。 これにより、マッピングはコントラクトから IPFS ハッシュを取得し、IPFS から対応するファイルを読み取ることができます。 ファイルのデータは`Bytes`として返されますが、通常は、このページで後述する `json` API などを使ってさらに処理する必要があります。 - -IPFS のハッシュやパスが与えられた場合、IPFS からのファイルの読み込みは以下のように行われます。 - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**注:** `ipfs.cat` は今のところ決定論的なものではありません。もし要求がタイムアウトする前にIPFSネットワーク上でファイルを取得できなければ、 `null`を返します。このため、常に `null` の結果をチェックする価値があります。 - -また、`ipfs.map`.を使って、大きなファイルをストリーミングで処理することも可能です。 この関数は、IPFS ファイルのハッシュまたはパス、コールバックの名前、そして動作を変更するためのフラグを受け取ります。 - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -現在サポートされている唯一のフラグは`json`で、これを`ipfs.map`に渡さなければなりません。 `json`フラグを使用すると、IPFS ファイルは一連の JSON 値で構成され、1 行に 1 つの値が必要です。 `ipfs.map`への呼び出しは、ファイルの各行を読み込み、`JSONValue`にデシリアライズし、それぞれのコールバックを呼び出します。 コールバックは、エンティティ・オペレーションを使って、`JSONValue`からデータを保存することができます。 エンティティの変更は、`ipfs.map`を呼び出したハンドラが正常に終了したときにのみ保存されます。それまでの間は、メモリ上に保持されるため、`ipfs.map`が処理できるファイルのサイズは制限されます。 - -成功すると,`ipfs.map`は `void`を返します。 コールバックの呼び出しでエラーが発生した場合、`ipfs.map`を呼び出したハンドラは中止され、サブグラフは失敗とマークされます。 - -### Crypto API - -```typescript -'@graphprotocol/graph-ts'から { crypto } をインポートします。 -``` - -`crypto` API は、マッピングで使用できる暗号化関数を提供します。 今のところ、1 つしかありません。 - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -'@graphprotocol/graph-ts'から{ json, JSONValueKind } をインポートします。 -``` - -JSON データは、`json` API を使って解析することができます。 - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: Bytes): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – `json.fromString` の安全なバージョンで、解析に失敗した場合はエラー バリアントを返します - -`JSONValue` クラスは、任意の JSON ドキュメントから値を引き出す方法を提供します。 JSON の値には、ブーリアン、数値、配列などがあるため、`JSONValue`には、値の種類をチェックするための`kind`プロパティが付属しています。 - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -さらに、値が`null`かどうかをチェックするメソッドもあります: - -- `value.isNull(): boolean` - -値の型が確定している場合は,以下のいずれかの方法で[組み込み型](#built-in-types)に変換することができます。 - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### タイプ 変換参照 - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| 住所 | Bytes | none | -| 住所 | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | Bigint.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | 住所 | Address.fromString(s) | -| Bytes | 住所 | Address.fromString(s) | -| String | BigInt | BigDecimal.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### データソースのメタデータ - -ハンドラを起動した`データソース`のコントラクトアドレス、ネットワーク、コンテキストは、以下のようにして調べることができます。 - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### エンティティと DataSourceContext - -ベースとなる`エンティティ`クラスと子クラスの`DataSourceContext`クラスには、フィールドを動的に設定・取得するためのヘルパーが用意されています。 - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### AssemblyScriptのよくある問題 - -サブグラフの開発でよく遭遇する[AssemblyScript](https://github.com/AssemblyScript/assemblyscript)の問題があるようです。これらの問題は、デバッグの難易度に幅がありますが、意識しておくと役に立つかもしれません。以下は、これらの問題の非網羅的なリストです。 - -- [AssembyScript](https://www.assemblyscript.org/status.html#language-features)では、`Private`クラス変数が強制されるわけではありません。クラス変数がクラスオブジェクトから直接変更されないように保護する方法はありません。 -- スコープは [closure functions](https://www.assemblyscript.org/status.html#on-closures) に継承されません。つまり、closure functions の外部で宣言された変数は使用できません。[Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s) で説明されています。 diff --git a/website/pages/ja/network-transition-faq.mdx b/website/pages/ja/network-transition-faq.mdx deleted file mode 100644 index 72ff79c2a1dc..000000000000 --- a/website/pages/ja/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: ネットワーク移行に関するFAQ ---- - -開発者には、サブグラフを分散型ネットワークに移行するための十分な時間があります。正確なタイムラインは、インデクサーとネットワークの準備状況に基づいて、ネットワークごとに異なります。ホステッド サービスは、すべてのネットワークのサポートを一度に終了したり、突然終了したりすることはありません。 - -イーサリアムを含むホストされたサービスの各ネットワークは、機能の同等性と高品質のサービスを実現するために分散型ネットワークでサポートされるため、徐々に廃止されます。これは [MIPs プログラム](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/)、分散ネットワーク上の各ネットワークの完全なサポートを有効にします。 - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## ホストされたサービスのサンセットに関するFAQ - -### 分散型ネットワークがサブグラフの中核機能を提供する前に、自分のサブグラフを移行しなければならないのでしょうか? - -サブグラフの開発者は、今すぐ Ethereum メインネット サブグラフの移行を開始できますが、分散型ネットワークとホステッド サービスの機能コア機能が存在する前に、サブグラフをネットワークに移行することを強制されることはありません。 Gnosis ネットワーク サブグラフの移行もすぐに開始され、インデクサーがネットワークをテストし、運用環境でインデックスを作成する準備が整ったら、他のネットワークが続きます。 - -### ホスティングサービスを廃止するスケジュールとプロセスを教えてください。 - -すべてのネットワークには、ネットワークでいつ有効になるか、および各フェーズを通過するのにかかるタイムラインに応じて、独自のタイムラインがあります。コア開発者は、ホストされたサービス トラフィックの大部分をできるだけ早く分散型ネットワークに移行するために取り組んでいます。 - -最も重要なことは、コア機能が分散ネットワーク上の特定のネットワーク/サブグラフで利用可能になる前に、ホストされたサービスへのアクセスを失わないことです。 - -各ネットワークのホステッド サービスの廃止には、次の 3 つの段階があります: - -#### フェーズ1(The Sunray)ネットワーク上で品質パリティを持つブロックチェーンの新規サブグラフ作成を無効にする - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -ホスト型サービスから分散型ネットワークへの移行のフェーズ 1 を開始したネットワークはまだありません。 - -ネットワークがフェーズ 1 に入っても、開発者は GRT を取得したり、プロトコル エコノミクスを操作したりすることなく、Subgraph Studio のレート制限された Developer Preview URL を引き続き使用して、サブグラフ (最大 1,000 件の無料クエリ) を開発およびテストできることに注意してください。 - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -プロセスは日付ではなく、コア機能に関する終了基準によって決定されるため、ネットワークがこのフェーズに移行する正確なタイムラインはありません。 - -#### フェーズ3 (The Sunrise) サブグラフのクエリを無効にする - -この段階では、The Graph Network がサポートするネットワークのホステッド サービスのサブグラフは、クエリを処理しなくなります。このフェーズでネットワーク上のサブグラフのブロックチェーン データをクエリする唯一の方法は、分散型ネットワークを使用することです。テスト クエリは、開発クエリ URL を介して [Subgraph Studio](https://thegraph.com/studio/) で引き続き利用できます。 - -フェーズ 2 への移行が成功し、開発者が分散型ネットワークに移行するための十分な時間を与えるまで、ネットワークはフェーズ 3 に移行しません。 - -![サブグラフチャート](/img/subgraph-chart.png) - -> 注: この図は、ネットワークごとの廃止プロセスを反映しています。ホステッド サービスの廃止時間はさまざまであり、一度にすべてが廃止されるわけではありません。 - -### Goerli、Mumbai などのテスト ネットワークはどうなりますか? - -すべてのネットワークとテスト ネットワークは、[Subgraph Studio](https://thegraph.com/studio/) で無料の展開クエリ URL を利用できます。この URL はレート制限されており、テストおよび開発トラフィック用です。プロダクション トラフィックには、プロダクション グレードの冗長性と安定性を確保するために、The Graph Network に発行されたサブグラフが必要です。 - -![レートリミット](/img/rate-limit.png) - -### The Graph Networkは、ホスティングサービスと同じ機能を備えていますか? - -グラフネットワーク上のインデクサーは、ネットワークが承認した[グラフノードの最新リリース](https://github.com/graphprotocol/graph-node/releases)を実行し、そのリリースでサポートされているすべてのサブグラフ機能をサポートすることができます。 - -まだ開発中の未発表の機能は、[Graph Node](https://github.com/graphprotocol/graph-node) の最新のメインコミットが実行される開発者プレビュー URL で最初に利用可能になることがあります。これらの機能は、次の Graph Node のリリースでネットワーク上で利用可能になります。 - -特定のサブグラフ機能は、ネットワーク上で決定論的でない、または検証可能でない場合、インデックス作成報酬の対象とはなりません。具体的な例としては、IPFSからのファイルのフェッチや、グラフネットワークでまだサポートされていないネットワークのインデキシングなどがあります。 - -このような特徴を持つサブグラフはネットワークに公開することができますが、インデクサーに拾われない可能性があります。しかし、十分なシグナルを持つサブグラフは、どのサブグラフでも対象となるクエリフィーの徴収に興味を持つインデクサーを引きつけるかもしれません。 - -### グラフネットワークは、自社でインフラを運用する場合と比較して、どの程度のコストがかかるのでしょうか? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### ネットワークに移行した後、ホスティングサービスのサブグラフに何かすることはありますか? - -混乱を避けるために、ホスティングサービスのサブグラフを隠すことを強くお勧めします。[このビデオ](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9)は、その手順を説明しています。 - -### 分散型ネットワークが優先ネットワークをサポートするのはいつですか? - -チェーンごとに決まったスケジュールはなく、新しいチェーンがインデクサによってテストされる[MIPsプログラム](https://thegraph.com/migration-incentive-program/)を通じて、インデクサーの準備状況によって決定されるでしょう。新しいチェーンがネットワーク上でサポートされると、ユーザーは移行準備のために十分な通知を受け取ることになります。The Graphエコシステムのコア開発者と貢献者は、できるだけ早く、より多くのチェーンのサポートを実装するために取り組んでいます。 - -### イーサリアムのメインネットは、ネットワーク移行プロセスのフェーズ1に突入していますか? - -イーサリアムは当初、2022年第3四半期末までにホスティングサービスからの移行を開始すると予想されていましたが、ユーザーのフィードバックに対応するため、[延期](https://thegraph.com/blog/transitioning-to-decentralized-graph-network)されました。ユーザーエクスペリエンス、課金、その他ユーザーの要望を満たすための追加的な改善が、イーサリアムのホストサービス移行のタイムラインを推進することになります。イーサリアムがいつThe Sunrayフェーズに移行するかは、以下の統合状況トラッカーや[The Graph Twitter.](https://twitter.com/graphprotocol)でご確認ください。 - -### グラフネットワーク統合状況トラッカー - -次の表は、各ネットワークがネットワーク統合プロセスのどこにあるかを示しています。希望するネットワークがまだリストされていない場合、統合はまだ開始されておらず、そのネットワークはまだ The Graph のホストされたサービスによって完全にサポートされています。 - -> この表には、[Subgraph Studio](https://thegraph.com/studio/) で引き続き無料で提供されるテスト ネットワークは含まれません。 - -| ネットワーク | グラフネットワークへの統合を発表 | ネットワーク統合完了 | フェーズ1:ホスティングサービス上で新規サブグラフの無効化 | Phase 2: disable subgraph updates on hosted service | フェーズ3:ホスティングサービスでのサブグラフの無効化 | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (元 xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* ネットワークは現在、The Graph の分散型ネットワークでベータ版です。 - -## クエリフィー、APIキー、課金に関するFAQ - -### クエリ料金はどのように設定されていますか? - -クエリフィーの価格は、分散型ネットワーク上のクエリ需要に影響されます。Core開発者は、[Agora](https://github.com/graphprotocol/agora)と呼ばれるクエリ価格コストモデル言語を作成しました。これは、Indexers が効率的にクエリの価格を設定することを可能にします。詳しくは、[Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md)をご覧ください。 - -### クエリ予算の上限を設定する方法は? - -Subgraph Studioの[API Key](https://thegraph.com/studio/apikeys/)セクションのBudgetタブで、最大クエリ予算を設定することができます。[このビデオ](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0)で、API Keyの他の部分の調整と同様に、このプロセスの概要を見ることができます。 - -最大クエリ予算を低く設定しすぎると、インデクサーが除外され、クエリ失敗やクエリ速度低下など、質の低いサービスになる可能性があることに注意してください。 - -2022 年 9 月末の時点では、最小の最大クエリ バジェットとして $0.00035 ~ $0.0004 の範囲内にとどまることがベスト プラクティスです。 - -### API Keyを保護するにはどうすればよいですか? - -ユーザーは、[Subgraph Studio](https://thegraph.com/studio/)でサブグラフとドメインの両方でAPIキーを制限することが推奨されます: - -![ドメインを制限する](/img/restrictdomain.png) - -### クエリフィーの支払いに必要なAPIキーの入力方法を教えてください。 - -Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) の「Add GRT」ボタンを押すと、課金残高を記入することができます。よりシームレスで定期的な支払いを追加するために、このエクスペリエンスを改善するための作業が継続的に行われています。 - -[この動画](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5)には、その概要が紹介されています。 - -### APIキーに課金残高が少ない場合のアラートを設定するにはどうすればよいですか? - -ユーザーは、自分のメールアドレス[ここに](https://thegraph.com/studio/settings/)に課金アラートを設定する必要があります。 - -また、課金残高が少なくなると、ユーザーのUI内でバナーが点滅し、警告を表示します。 - -APIキーの設定を管理するためのベストプラクティスは何ですか? - -高いサービス品質を維持しつつ、低い平均クエリー価格を維持するために、最大クエリーバジェットを$0.0004にすることをお勧めします。これは、[API Keyセクション](https://thegraph.com/studio/apikeys/)のbudget billingタブで行うことができます。 - -## 移行に関するよくある質問 - -### The Graphの分散型ネットワークに自分のサブグラフを移行するにはどうすればよいですか? - -[ステップバイステップガイド](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph)または[このビデオ](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s)で、サブグラフをThe Graph Networkに移行する方法について説明します。 - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### The Graphのエコシステムからの移行プロセスにおいて、金銭的、技術的、マーケティング的なサポートはあるのでしょうか? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### クエリの所要時間は? - -分散型ネットワークでは、クエリに平均150〜300ミリ秒かかります。 - -### グラフネットワークの課金プロセスは、ホスティングサービスよりも複雑ですか? - -はい。ネットワークのUXは、まだホスティングサービスと同等の品質ではありません。特に課金UXはまだ非常に初期段階にあり、多くの可動部分があるため、コア開発チームがプロセスの抽象化に取り組んでいます。これらの改善の多くは、近い将来公開される予定です。 - -### グラフネットワーククエリの支払いは、フィアット、クレジットカード、またはステーブルコインで行えますか? - -今後数ヶ月の間に、ユーザーがサブグラフの支払いを行うために必要なステップの数は大幅に削減されます。支払いは引き続きGRTで行われますが、フィアットのオンランプと、フィアットと暗号をGRTに変換して定期的な支払いを行う自動支払いシステムの実装に向けた取り組みが、すでに行われています。 - -### ネットワークがホスティングサービスと同じUXになることはあるのでしょうか? - -まだやるべきことはありますが、グラフネットワークでは、現在のホスティングサービスと同等かそれ以上の質の高いUXを提供することを目標としています。短期的には、より合理的で予測可能な課金体験を提供し、ユーザーが高品質のdappsを構築することに集中できるようにすることを目指しています。 - -### 自分のサブグラフがグラフネットワークのインデクサーに拾われるようにするにはどうしたらいいですか? - -最低でも10,000GRTのキュレーションを行うことが推奨されており、ユーザーは公開時と同じトランザクションでキュレーションを行うことができます。また、キュレーションコミュニティに自分のサブグラフのキュレーションを依頼することも可能です[こちら](https://t.me/CurationStation)。 - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### なぜ、サブグラフにはキュレーションのシグナルが必要なのか?サブグラフにキュレーターからの十分なシグナルがない場合はどうすればよいのか? - -高シグナルと高インデックス報酬には線形相関があるため、キュレーションシグナルが高いほど、インデックス作成者にとってサブグラフは魅力的となります。キュレーションがなければ、インデクサーがサブグラフをピックアップするインセンティブはありません。 - -### サブグラフ開発者がキュレーションシグナルに使用するGRTはどうなるのでしょうか? - -サブグラフを最初にシグナルした場合、シグナルしたGRTの量は減らない。キュレーションのために使われたGRTは、後で削除することができます。また、キュレーターは、インデクサーの取り込んだクエリフィーの10%を得ることができます。 - -### キュレーションプロセスにはどのような改良が加えられるのでしょうか? - -短期的には、Arbitrumの最初のキュレーションモデルは、キュレーションシグナルに原則的な保護を提供します。長期的には、コア開発者は開発者にキュレーションシグナルのレンタル機能を提供することを優先し、サブグラフが十分にインデックス化されることを保証しつつ、より予測可能な価格体験を提供する予定です。 - -### フロントエンドでsubgraph APIを切り替えるには? - -少なくとも1つのインデクサーがサブグラフのインデックスを完全に作成した後、ユーザは分散型ネットワークにクエリすることができます。 - -サブグラフのクエリURLを取得するために、クエリURLの横にあるマークをクリックすると、コピー&ペーストすることができます。このように表示されます。 - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -[api-key]をSubgraph Studioの[API Keyセクション](https://thegraph.com/studio/apikeys/)で生成したAPI Keyに置き換えるだけで、簡単に利用できます. - -### クエリのコストはどのくらいですか? - -ネットワーク内の平均クエリフィーは変動します。2022年9月の1ヶ月間、クエリフィーコストの平均価格は$0.00012~$0.00020の範囲にあります。 - -### 自分のサブグラフの容量と金額を調べるにはどうしたらいいですか? - -ホスティングサービスのボリュームデータは公開されていません。ボリュームとコストの見積もりは[こちら](mailto:migration@thegraph.foundation)までご連絡ください。 - -### ゲートウェイはどのように機能するのですか?完全に分散化されているのですか? - -ゲートウェイは、IndexerがDappsにサービスを提供できるようにクエリーを処理します。ゲートウェイは中間段階にあり、徐々に非中央集権化が進んでいます。詳しくは近日中に公開予定です。 - -## 「ネットワークFAQ」 - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### シンクロ時間を短縮するには? - -サブグラフ内のスマートコントラクトの呼び出しを最小限にします。スマートコントラクトの状態にアクセスするには、RPCのeth_callが必要で、同期時間が遅くなります。 - -### Subgraph Studioの移行に伴い、マルチシグのサポートはありますか? - -はい。最近マルチシグのサポートが追加されました。詳細は[こちら](https://thegraph.com/docs/studio/multisig)をご覧ください。 - -### イーサリアムとArbitrumのGRTのコントラクトアドレスを教えてください。 - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### 通常、プロジェクトはAPI KeyにどれくらいのGRTを保持しているのでしょうか? - -多くのプロジェクトは、APIキーに30~60日分のGRTを保持しているため、頻繁に補充する必要はありません。30~60日分のGRT料金を理解するには、[こちら](mailto:migration@thegraph.foundation)までご連絡ください。 - -### 分散型ネットワークでのクエリ決済はどのように行われるのですか?  - -料金は毎週請求され、ユーザーのAPI Keyから引き出されます。GRTはArbitrumに接続され、Arbitrum上に配置されます。 - -### 分散型ネットワークにおけるサブグラフのAPIキーはどのように使われるのですか? - -APIキーは、ユーザーが支払う最大クエリフィーと、価格、経済的な鮮度、クエリ速度などの要素の優先順位の両方を可能にします。 - -### ホスティングサービスと分散型ネットワークのサービス品質の比較は、現状どうなっているのでしょうか? - -ホスティングサービスと分散型ネットワークの遅延の中央値はほぼ同じですが、分散型ネットワークは高いパーセンタイルで遅延が大きくなる傾向があります。クエリの 200 レートも概ね同様で、どちらも > 99.9% です。分散化の結果、ネットワークはサブグラフ間で広範な停止が発生しませんでしたが、ホスティングサービスは集中化の結果、まれに一時的な停止が発生します。 - -### FAQに答えがない場合はどうすればいいですか? - -ご不明な点がございましたら、[migration@thegraph.foundation](mailto:migration@thegraph.foundation) までご連絡ください。 diff --git a/website/pages/ja/querying/querying-the-hosted-service.mdx b/website/pages/ja/querying/querying-the-hosted-service.mdx deleted file mode 100644 index dfa22ac5f424..000000000000 --- a/website/pages/ja/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: ホスティングサービスのクエリ ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -以下に例を示しますが、サブグラフのエンティティへのクエリの方法については、[Query API](/querying/graphql-api)を参照してください。 - -## 例 - -このクエリは、マッピングによって作成されたすべてのカウンターを一覧表示します。 1 つしか作成しないため、結果には 1 つの `default-counter` のみが含まれます。 - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -主な機能を以下にご紹介します: - -![エクスプローラのプレイグラウンド](/img/explorer-playground.png) diff --git a/website/pages/ko/cookbook/quick-start.mdx b/website/pages/ko/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/ko/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/ko/developing/assemblyscript-api.mdx b/website/pages/ko/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/ko/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/ko/network-transition-faq.mdx b/website/pages/ko/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/ko/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/ko/querying/querying-the-hosted-service.mdx b/website/pages/ko/querying/querying-the-hosted-service.mdx deleted file mode 100644 index f00ff226ce09..000000000000 --- a/website/pages/ko/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Example - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/mr/cookbook/quick-start.mdx b/website/pages/mr/cookbook/quick-start.mdx deleted file mode 100644 index 4771572cf166..000000000000 --- a/website/pages/mr/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: क्विक स्टार्ट ---- - -सबग्राफ स्टुडिओ किंवा [होस्ट केलेल्या सेवे](#hosted-service) मध्ये तुमचा सबग्राफ कसा सुरू करायचा, तयार करायचा आणि उपयोजित करायचा हे मार्गदर्शक तुम्हाला त्वरीत घेऊन जाईल. - -तुमचा सबग्राफ [समर्थित नेटवर्क](/developing/supported-networks) वरून डेटा अनुक्रमित करत असल्याची खात्री करा. - -हे मार्गदर्शक तुमच्याकडे आहे असे गृहीत धरून लिहिले आहे: - -- तुमच्या पसंतीच्या नेटवर्कवर एक स्मार्ट करार पत्ता -- तुमचा सबग्राफ क्युरेट करण्यासाठी GRT -- एक क्रिप्टो वॉलेट - -## 1. सबग्राफ स्टुडिओवर सबग्राफ तयार करा - -सबग्राफ स्टुडिओ [https://thegraph.com/studio/](https://thegraph.com/studio/) वर जा आणि तुमचे वॉलेट कनेक्ट करा. - -एकदा कनेक्ट झाल्यानंतर, तुम्ही "सबग्राफ तयार करा" वर क्लिक करून सुरुवात करू शकता. तुमच्या पसंतीचे नेटवर्क निवडा आणि सुरू ठेवा क्लिक करा. - -## 2. आलेख CLI स्थापित करा - -आलेख CLI JavaScript मध्ये लिहिलेले आहे आणि ते वापरण्यासाठी तुम्हाला एकतर `npm` किंवा `यार्न` स्थापित करणे आवश्यक आहे. - -तुमच्या स्थानिक मशीनवर, खालीलपैकी एक कमांड चालवा: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. तुमचा सबग्राफ सुरू करा - -> तुम्ही [सबग्राफ स्टुडिओ](https://thegraph.com/studio/) मध्ये सबग्राफ पेजवर तुमच्या विशिष्ट सबग्राफसाठी कमांड शोधू शकता. - -तुम्ही तुमचा सबग्राफ सुरू करता तेव्हा, CLI टूल तुम्हाला खालील माहितीसाठी विचारेल: - -- प्रोटोकॉल: तुमचा सबग्राफ 4 वरून डेटा अनुक्रमित करेल असा प्रोटोकॉल निवडा -- सबग्राफ स्लग: तुमच्या सबग्राफसाठी नाव तयार करा. तुमचा सबग्राफ स्लग तुमच्या सबग्राफसाठी एक ओळखकर्ता आहे. -- उपग्राफ तयार करण्यासाठी निर्देशिका: तुमची स्थानिक निर्देशिका निवडा -- इथरियम नेटवर्क (पर्यायी): तुमचा सबग्राफ कोणत्या EVM-सुसंगत नेटवर्कवरून डेटा अनुक्रमित करेल ते तुम्हाला निर्दिष्ट करावे लागेल -- कॉन्ट्रॅक्ट अॅड्रेस: ​​तुम्ही ज्यावरून डेटा क्वेरी करू इच्छिता तो स्मार्ट कॉन्ट्रॅक्ट अॅड्रेस शोधा -- ABI: ABI ऑटोपॉप्युलेट नसल्यास, तुम्हाला JSON फाइल म्हणून व्यक्तिचलितपणे इनपुट करावे लागेल -- स्टार्ट ब्लॉक: तुमचा सबग्राफ ब्लॉकचेन डेटा इंडेक्स करत असताना वेळ वाचवण्यासाठी तुम्ही स्टार्ट ब्लॉक इनपुट करा असे सुचवले जाते. तुमचा करार जिथे तैनात करण्यात आला होता तो ब्लॉक शोधून तुम्ही स्टार्ट ब्लॉक शोधू शकता. -- कराराचे नाव: तुमच्या कराराचे नाव प्रविष्ट करा -- इंडेक्स कॉन्ट्रॅक्ट इव्हेंट्स घटक म्हणून: असे सुचवले जाते की तुम्ही हे सत्य वर सेट करा कारण ते प्रत्येक उत्सर्जित इव्हेंटसाठी तुमच्या सबग्राफमध्ये स्वयंचलितपणे मॅपिंग जोडेल -- दुसरा करार जोडा(पर्यायी): तुम्ही दुसरा करार जोडू शकता - -खालील आदेश चालवून विद्यमान करारातून तुमचा सबग्राफ सुरू करा: - -```sh -आलेख init --studio -``` - -तुमचा सबग्राफ सुरू करताना काय अपेक्षा करावी याच्या उदाहरणासाठी खालील स्क्रीनशॉट पहा: - -![सबग्राफ कमांड](/img/subgraph-init-example.png) - -## 4. तुमचा सबग्राफ लिहा - -मागील कमांड एक स्कॅफोल्ड सबग्राफ तयार करतात ज्याचा वापर तुम्ही तुमचा सबग्राफ तयार करण्यासाठी प्रारंभिक बिंदू म्हणून करू शकता. सबग्राफमध्ये बदल करताना, तुम्ही प्रामुख्याने तीन फाइल्ससह कार्य कराल: - -- मॅनिफेस्ट (subgraph.yaml) - मॅनिफेस्ट हे परिभाषित करते की तुमचे सबग्राफ कोणते डेटास्रोत अनुक्रमित करतील. -- स्कीमा (schema.graphql) - ग्राफक्यूएल स्कीमा तुम्हाला सबग्राफमधून कोणता डेटा मिळवायचा आहे ते परिभाषित करते. -- असेंबलीस्क्रिप्ट मॅपिंग (mapping.ts) - हा असा कोड आहे जो तुमच्या डेटास्रोतमधील डेटाचे स्कीमामध्ये परिभाषित केलेल्या घटकांमध्ये भाषांतर करतो. - -तुमचा सबग्राफ कसा लिहायचा याबद्दल अधिक माहितीसाठी, [एक सबग्राफ तयार करणे](/developing/creating-a-subgraph) पहा. - -## 5. सबग्राफ स्टुडिओमध्ये तैनात करा - -तुमचा सबग्राफ लिहिल्यानंतर, खालील आदेश चालवा: - -```sh -$ आलेख कोडजेन -$ आलेख बिल्ड -``` - -- तुमचा सबग्राफ प्रमाणित करा आणि उपयोजित करा. उपयोजन की सबग्राफ स्टुडिओमधील सबग्राफ पृष्ठावर आढळू शकते. - -```sh -$ ग्राफ ऑथ -- स्टुडिओ -$ आलेख तैनात -- स्टुडिओ -``` - -तुम्हाला आवृत्ती लेबलसाठी विचारले जाईल. ते वापरण्याची जोरदार शिफारस केली जाते[semver](https://semver.org/)`0.0.1` सारख्या आवृत्तीसाठी.ते म्हणाले, आपण आवृत्ती म्हणून कोणतीही स्ट्रिंग निवडण्यास मोकळे आहात जसे की:`v1`, `version1`, `asdf`. - -## 6. तुमच्या सबग्राफची चाचणी घ्या - -तुम्ही खेळाच्या मैदानाच्या विभागात नमुना क्वेरी करून तुमच्या सबग्राफची चाचणी घेऊ शकता. - -तुमच्या सबग्राफमध्ये काही त्रुटी असल्यास नोंदी तुम्हाला सांगतील. ऑपरेशनल सबग्राफचे लॉग यासारखे दिसतील: - -![सबग्राफ लॉग](/img/subgraph-logs-image.png) - -तुमचा सबग्राफ अयशस्वी होत असल्यास, तुम्ही ग्राफिक्युएल प्लेग्राउंड वापरून सबग्राफच्या आरोग्याची चौकशी करू शकता. लक्षात घ्या की तुम्ही खालील क्वेरीचा फायदा घेऊ शकता आणि तुमच्या सबग्राफसाठी तुमचा डिप्लॉयमेंट आयडी इनपुट करू शकता. या प्रकरणात, `Qm...` हा तैनाती आयडी आहे (जो सबग्राफ पृष्ठावर **तपशील** अंतर्गत स्थित असू शकतो). सबग्राफ अयशस्वी झाल्यावर खालील क्वेरी तुम्हाला सांगेल, त्यामुळे तुम्ही त्यानुसार डीबग करू शकता: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. ग्राफच्या विकेंद्रीकृत नेटवर्कवर तुमचा सबग्राफ प्रकाशित करा - -एकदा तुमचा सबग्राफ सबग्राफ स्टुडिओमध्ये तैनात केला गेला की, तुम्ही त्याची चाचणी घेतली आणि उत्पादनात ठेवण्यास तयार असाल, त्यानंतर तुम्ही ते विकेंद्रित नेटवर्कवर प्रकाशित करू शकता. - -सबग्राफ स्टुडिओमध्ये, तुमच्या सबग्राफवर क्लिक करा. सबग्राफच्या पृष्ठावर, आपण शीर्षस्थानी उजवीकडे प्रकाशित बटणावर क्लिक करण्यास सक्षम असाल. - -तुम्ही तुमचा सबग्राफ प्रकाशित करू इच्छित असलेले नेटवर्क निवडा. [वेगवान व्यवहाराचा वेग आणि कमी गॅस खर्च](/arbitrum/arbitrum-faq) चा लाभ घेण्यासाठी आर्बिट्रम वन वर सबग्राफ प्रकाशित करण्याची शिफारस केली जाते. - -तुम्‍ही तुमच्‍या सबग्राफची क्‍वेरी करण्‍यापूर्वी, इंडेक्सर्सना त्यावर क्‍वेरी देणे सुरू करणे आवश्‍यक आहे. ही प्रक्रिया सुव्यवस्थित करण्यासाठी, तुम्ही GRT वापरून तुमचा स्वतःचा सबग्राफ क्युरेट करू शकता. - -लेखनाच्या वेळी, तो अनुक्रमित केला गेला आहे आणि शक्य तितक्या लवकर क्वेरीसाठी उपलब्ध आहे याची खात्री करण्यासाठी तुम्ही तुमचा स्वतःचा सबग्राफ 10,000 GRT सह क्युरेट करा अशी शिफारस केली जाते. - -गॅसच्या खर्चावर बचत करण्यासाठी, जेव्हा तुम्ही तुमचा सबग्राफ The Graph च्या विकेंद्रित नेटवर्कवर प्रकाशित करता तेव्हा हे बटण निवडून तुम्ही प्रकाशित केलेल्या व्यवहारात तुम्ही तुमचा सबग्राफ क्युरेट करू शकता: - -![सबग्राफ प्रकाशित करा](/img/publish-and-signal-tx.png) - -## 8. तुमचा सबग्राफ क्वेरी करा - -आता, तुम्ही तुमच्या सबग्राफच्या क्वेरी URL वर GraphQL क्वेरी पाठवून तुमच्या सबग्राफची क्वेरी करू शकता, जी तुम्ही क्वेरी बटणावर क्लिक करून शोधू शकता. - -तुम्‍ही तुमच्‍या dapp वरून क्‍वेरी करू शकता जर तुमच्‍याकडे तुमच्‍या API की नसल्‍यास मोफत, रेट-मर्यादित तात्पुरती क्‍वेरी URL द्वारे जे डेव्हलपमेंट आणि स्‍टेजिंगसाठी वापरले जाऊ शकते. - -तुमच्या सबग्राफवरून डेटा क्वेरी करण्याबद्दल अधिक माहितीसाठी, [येथे](../querying/querying-the-graph/) अधिक वाचा. diff --git a/website/pages/mr/developing/assemblyscript-api.mdx b/website/pages/mr/developing/assemblyscript-api.mdx deleted file mode 100644 index 9a51626eca54..000000000000 --- a/website/pages/mr/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: असेंबलीस्क्रिप्ट API ---- - -> टीप: तुम्ही `graph-cli`/`graph-ts` आवृत्ती `0.22.0` पूर्वी सबग्राफ तयार केल्यास, तुम्ही ची जुनी आवृत्ती वापरत आहात असेंबलीस्क्रिप्ट, आम्ही [`स्थलांतर मार्गदर्शक`](/release-notes/assemblyscript-migration-guide) पाहण्याची शिफारस करतो - -सबग्राफ मॅपिंग लिहिताना कोणते अंगभूत API वापरले जाऊ शकतात हे हे पृष्ठ दस्तऐवजीकरण करते. बॉक्सच्या बाहेर दोन प्रकारचे API उपलब्ध आहेत: - -- [Graph TypeScript लायब्ररी](https://github.com/graphprotocol/graph-ts) (`graph-ts`) आणि -- `graph codegen` द्वारे सबग्राफ फाइल्समधून व्युत्पन्न केलेला कोड. - -जोपर्यंत ते [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) शी सुसंगत आहेत तोपर्यंत इतर लायब्ररी अवलंबित्व म्हणून जोडणे देखील शक्य आहे. या भाषेत मॅपिंग लिहिलेले असल्याने, [AssemblyScript विकी](https://github.com/AssemblyScript/assemblyscript/wiki) भाषा आणि मानक लायब्ररी वैशिष्ट्यांसाठी एक चांगला स्रोत आहे. - -## स्थापना - -[`graph init`](/developing/creating-a-subgraph) सह तयार केलेले सबग्राफ पूर्व-कॉन्फिगर केलेल्या अवलंबनांसह येतात. ही अवलंबित्वे स्थापित करण्यासाठी फक्त खालीलपैकी एक आज्ञा चालवणे आवश्यक आहे: - -```sh -yarn install # Yarn -npm install # NPM -``` - -जर सबग्राफ स्क्रॅचमधून तयार केला असेल, तर खालील दोन आदेशांपैकी एक ग्राफ टाइपस्क्रिप्ट लायब्ररी अवलंबित्व म्हणून स्थापित करेल: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API संदर्भ - -`@graphprotocol/graph-ts` लायब्ररी खालील API प्रदान करते: - -- इथरियम स्मार्ट कॉन्ट्रॅक्ट्स, इव्हेंट्स, ब्लॉक्स, व्यवहार आणि इथरियम व्हॅल्यूजसह काम करण्यासाठी `ethereum` API. -- ग्राफ नोड स्टोअरमधून आणि त्यामध्ये घटक लोड करण्यासाठी आणि जतन करण्यासाठी `स्टोअर` API. -- ग्राफ नोड आउटपुट आणि ग्राफ एक्सप्लोररवर संदेश लॉग करण्यासाठी `लॉग` API. -- IPFS वरून फाइल लोड करण्यासाठी `ipfs` API. -- JSON डेटा पार्स करण्यासाठी `json` API. -- क्रिप्टोग्राफिक कार्ये वापरण्यासाठी `क्रिप्टो` API. -- Ethereum, JSON, GraphQL आणि असेंबलीस्क्रिप्ट सारख्या विविध प्रकारच्या सिस्टीममध्ये भाषांतर करण्यासाठी निम्न-स्तरीय आदिम. - -### आवृत्त्या - -सबग्राफ मॅनिफेस्टमधील `apiVersion` मॅपिंग API आवृत्ती निर्दिष्ट करते जी दिलेल्या सबग्राफसाठी ग्राफ नोडद्वारे चालविली जाते. वर्तमान मॅपिंग API आवृत्ती 0.0.6 आहे. - -| आवृत्ती | रिलीझ नोट्स | -| :-: | --- | -| 0.0.7 | इथरियम प्रकारांमध्ये `TransactionReceipt` आणि `लॉग` वर्ग जोडले
    Ethereum इव्हेंट ऑब्जेक्टमध्ये `पावती` फील्ड जोडले | -| 0.0.6 | इथरियम ट्रान्झॅक्शन ऑब्जेक्टमध्ये `nonce` फील्ड जोडले
    Ethereum ब्लॉक ऑब्जेक्टमध्ये `baseFeePerGas` जोडले | -| 0.0.5 | असेंबलीस्क्रिप्ट आवृत्ती 0.19.10 वर श्रेणीसुधारित केली (यामध्ये ब्रेकिंग बदलांचा समावेश आहे, कृपया [`स्थलांतर मार्गदर्शक`](/release-notes/assemblyscript-migration-guide) पहा)
    `ethereum.transaction.gasUsed` पुनर्नामित केले `ethereum.transaction.gasLimit` वर | -| 0.0.4 | Ethereum SmartContractCall ऑब्जेक्टमध्ये `functionSignature` फील्ड जोडले | -| 0.0.3 | इथरियम कॉल ऑब्जेक्टमध्ये `वरून` फील्ड जोडले
    `etherem.call.address` चे नाव बदलून `ethereum.call.to` केले | -| 0.0.2 | इथरियम व्यवहार ऑब्जेक्टमध्ये `इनपुट` फील्ड जोडले | - -### अंगभूत प्रकार - -असेंबलीस्क्रिप्टमध्ये तयार केलेल्या बेस प्रकारांवरील दस्तऐवज [AssemblyScript विकी](https://github.com/AssemblyScript/assemblyscript/wiki/Types) मध्ये आढळू शकतात. - -खालील अतिरिक्त प्रकार `@graphprotocol/graph-ts` द्वारे प्रदान केले आहेत. - -#### ByteArray - -```typescript -'@graphprotocol/graph-ts' वरून { ByteArray } आयात करा -``` - -`ByteArray` `u8` च्या अॅरेचे प्रतिनिधित्व करते. - -_बांधकाम_ - -- `fromI32(x: i32): ByteArray` - `x` चे बाइट्समध्ये विघटन होते. -- `fromHexString(hex: string): ByteArray` - इनपुट लांबी सम असणे आवश्यक आहे. `0x` सह प्रीफिक्सिंग पर्यायी आहे. - -_प्रकार रूपांतरणे_ - -- `toHexString(): string` - `0x` सह उपसर्ग असलेल्या हेक्स स्ट्रिंगमध्ये रूपांतरित होते. -- `toHexString(): string` - UTF-8 स्ट्रिंग म्हणून बाइट्सचा अर्थ लावतो. -- `toBase58(): स्ट्रिंग` - बेस58 स्ट्रिंगमध्ये बाइट्स एन्कोड करते. -- `toU32(): u32` - बाइट्सचा अर्थ लिटल-एंडियन `u32`. ओव्हरफ्लो झाल्यास फेकतो. -- `toI32(): i32` - बाइट अ‍ॅरेला लिटल-एंडियन `i32` समजते. ओव्हरफ्लो झाल्यास फेकतो. - -_ऑपरेटर्स_ - -- `equals(y: ByteArray): bool` – `x == y` असे लिहिले जाऊ शकते. -- `concat(other: ByteArray) : ByteArray` - एक नवीन `ByteArray` परत करा ज्यामध्ये थेट `इतर` नंतर `हा` असेल -- `concatI32(other: i32) : ByteArray` - थेट `इतर` थेट `अन्य` च्या बाइट प्रतिनिधित्वानंतर `हा` समाविष्ट आहे - -#### बिग डेसिमल - -```typescript -'@graphprotocol/graph-ts' वरून { BigDecimal } आयात करा -``` - -`BigDecimal` चा वापर अनियंत्रित अचूक दशांश दर्शवण्यासाठी केला जातो. - -> टीप: [आंतरीक](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` [IEEE-754 decimal128 फ्लोटिंग-पॉइंट फॉरमॅट](https://en.wikipedia.org/wiki/Decimal128_floating-point_format) मध्ये संग्रहित आहे, जे 34 दशांश अंकांना सपोर्ट करते. हे `BigDecimal` स्थिर-बिंदू प्रकारांचे प्रतिनिधित्व करण्यासाठी अनुपयुक्त बनवते जे 34 अंकांपेक्षा विस्तृत असू शकतात, जसे की सॉलिडिटी [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) किंवा समतुल्य. - -_बांधकाम_ - -- `कंस्ट्रक्टर(bigInt: BigInt)` – `BigInt` वरून `BigDecimal` तयार करतो. -- `static fromString(s: string): BigDecimal` – दशांश स्ट्रिंगमधून पार्स करते. - -_प्रकार रूपांतरणे_ - -- `toString(): string` – दशांश स्ट्रिंगवर प्रिंट करते. - -_गणित_ - -- `plus(y: BigDecimal): BigDecimal` – `x + y` असे लिहिले जाऊ शकते. -- `minus(y: BigDecimal): BigDecimal` – `x - y` असे लिहिता येते. -- `times(y: BigDecimal): BigDecimal` – `x * y` असे लिहिता येते. -- `div(y: BigDecimal): BigDecimal` – `x / y` असे लिहिता येते. -- `equals(y: BigDecimal): bool` – `x == y` असे लिहिले जाऊ शकते. -- `notEqual(y: BigDecimal): bool` – `x != y` असे लिहिले जाऊ शकते. -- `lt(y: BigDecimal): bool`-म्हणून लिहिले जाऊ शकते`x < y`. -- `le(y: BigDecimal): bool` – `x <= y` असे लिहिले जाऊ शकते. -- `gt(y: BigDecimal): bool`म्हणून लिहिले जाऊ शकते`x > y`. -- `ge(y: BigDecimal): bool` – `x >= y` असे लिहिता येते. -- `neg(): BigDecimal` - `-x` असे लिहिले जाऊ शकते. - -#### BigInt - -```typescript -'@graphprotocol/graph-ts' वरून { BigInt } आयात करा -``` - -`BigInt` मोठ्या पूर्णांकांचे प्रतिनिधित्व करण्यासाठी वापरले जाते. यामध्ये `uint32` ते `uint256` आणि `int64` ते `int256` प्रकारातील इथरियम मूल्यांचा समावेश आहे. `uint32` खाली सर्व काही, जसे की `int32`, `uint24` किंवा `int8` `i32` म्हणून प्रस्तुत केले जाते. - -`BigInt` वर्गात खालील API आहे: - -_बांधकाम_ - -- `BigInt.fromI32(x: i32): BigInt` – `i32` वरून `BigInt` तयार करते. -- `BigInt.fromString(s: string): BigInt`- स्ट्रिंगमधून `BigInt` पार्स करते. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – `बाइट्स` ला स्वाक्षरी न केलेले, लिटल-एंडियन पूर्णांक म्हणून व्याख्या करते. तुमचे इनपुट मोठे-एंडियन असल्यास, प्रथम `.reverse()` वर कॉल करा. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – `bytes` ला स्वाक्षरी केलेले, लिटल-एंडियन पूर्णांक म्हणून अर्थ लावतो. तुमचे इनपुट मोठे-एंडियन असल्यास, प्रथम `.reverse()` वर कॉल करा. - - _प्रकार रूपांतरणे_ - -- `x.toHex(): स्ट्रिंग` – हेक्साडेसिमल वर्णांच्या स्ट्रिंगमध्ये `BigInt` बदलते. -- `x.toString(): string` – `BigInt` ला दशांश क्रमांकाच्या स्ट्रिंगमध्ये बदलते. -- `x.toI32(): i32` – `BigInt` `i32` म्हणून परत करतो; मूल्य `i32` मध्ये बसत नसल्यास अयशस्वी होते. प्रथम `x.isI32()` तपासणे चांगली कल्पना आहे. -- `x.toBigDecimal(): BigDecimal` - अपूर्णांक नसलेल्या दशांश मध्ये रूपांतरित करते. - -_गणित_ - -- `x.plus(y: BigInt): BigInt` – `x + y` असे लिहिले जाऊ शकते. -- `x.minus(y: BigInt): BigInt` – `x - y` म्हणून लिहिता येईल. -- `x.times(y: BigInt): BigInt` – `x * y` असे लिहिले जाऊ शकते. -- `x.div(y: BigInt): BigInt` – `x / y` असे लिहिता येते. -- `x.mod(y: BigInt): BigInt` – `x % y` असे लिहिता येते. -- `x.equals(y: BigInt): bool` – `x == y` असे लिहिले जाऊ शकते. -- `x.notEqual(y: BigInt): bool` – `x != y` असे लिहिले जाऊ शकते. -- `x.lt(y: BigInt): bool`म्हणून लिहिले जाऊ शकते `x < y`. -- `x.le(y: BigInt): bool` – `x <= y` असे लिहिले जाऊ शकते. -- `x.gt(y: BigInt): bool` – `x > असे लिहिले जाऊ शकते. y`. -- `x.ge(y: BigInt): bool` – `x >= y` असे लिहिले जाऊ शकते. -- `x.neg(): BigInt` – `-x` असे लिहिले जाऊ शकते. -- `x.divDecimal(y: BigDecimal): BigDecimal` – दशांशाने भागून, दशांश परिणाम देतो. -- `x.isZero(): bool` - संख्या शून्य आहे की नाही हे तपासण्याची सोय. -- `x.isI32(): bool` – नंबर `i32` मध्ये बसतो का ते तपासा. -- `x.abs(): BigInt` – परिपूर्ण मूल्य. -- `x.pow(exp: u8): BigInt` – घातांक. -- `bitOr(x: BigInt, y: BigInt): BigInt` – `x असे लिहिता येते | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – `x << असे लिहिले जाऊ शकते. y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – `x >> असे लिहिले जाऊ शकते. y`. - -#### TypedMap - -```typescript -'@graphprotocol/graph-ts' वरून { TypedMap } आयात करा -``` - -`TypedMap` चा वापर की-व्हॅल्यू जोड्या संग्रहित करण्यासाठी केला जाऊ शकतो. [हे उदाहरण पहा](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -`TypedMap` वर्गात खालील API आहे: - -- `नवीन TypedMap()` – प्रकार `K` आणि प्रकार `V` च्या मूल्यांसह रिक्त नकाशा तयार करतो -- `map.set(key: K, value: V): void` – `key` चे मूल्य `value` वर सेट करते -- `map.getEntry(की: K): TypedMapEntry | शून्य` – `की` किंवा `नल` नकाशामध्ये `की` अस्तित्वात नसल्यास की-व्हॅल्यू जोडी परत करते -- `map.get(की: K): V | null` – किंवा `key` नकाशामध्ये अस्तित्वात नसल्यास `key` किंवा `null` साठी मूल्य परत करते -- `map.isSet(key: K): bool` – `की` नकाशामध्ये अस्तित्वात असल्यास आणि `false` असल्यास `true` मिळवते नाही तर - -#### बाइट्स - -```typescript -'@graphprotocol/graph-ts' वरून { Bytes } आयात करा -``` - -`बाइट्स` चा वापर बाइट्सच्या अनियंत्रित-लांबीच्या अॅरेचे प्रतिनिधित्व करण्यासाठी केला जातो. यामध्ये `bytes`, `bytes32`, इत्यादी प्रकारची इथरियम मूल्ये समाविष्ट आहेत. - -`बाइट्स` वर्ग असेंबलीस्क्रिप्टचा विस्तार करतो [ Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64)आणि हे सर्व `Uint8Array` कार्यक्षमतेसह खालील नवीन पद्धतींना समर्थन देते: - -_बांधकाम_ - -- `fromHexString(hex: string) : Bytes` - `hex` या स्ट्रिंगला `ByteArray` मध्ये हेक्साडेसिमल अंकांची सम संख्या असणे आवश्यक आहे. `hex` स्ट्रिंग वैकल्पिकरित्या `0x` ने सुरू होऊ शकते -- `fromI32(i: i32) : बाइट्स` - `i` बाइट्सच्या अॅरेमध्ये रूपांतरित करा - -_प्रकार रूपांतरणे_ - -- `b.toHex()` - अॅरेमधील बाइट्सचे प्रतिनिधित्व करणारी हेक्साडेसिमल स्ट्रिंग मिळवते -- `b.toString()` - अॅरेमधील बाइट्स युनिकोड वर्णांच्या स्ट्रिंगमध्ये रूपांतरित करते -- `b.toBase58()` – इथरियम बाइट्सचे मूल्य बेस58 एन्कोडिंगमध्ये बदलते (IPFS हॅशसाठी वापरले जाते) - -_ऑपरेटर्स_ - -- `b.concat(other: Bytes) : Bytes` - - नवीन `Bytes` परत करा ज्यात `this` थेट `other` असेल -- `b.concatI32(other: i32) : ByteArray` - नवीन `Bytes` परत करा ज्यात `हा` थेट `इतर< च्या बाइट प्रतिनिधित्वाचे अनुसरण करा ` - -#### पत्ता - -```typescript -'@graphprotocol/graph-ts' वरून { Address } आयात करा -``` - -`पत्ता` इथरियम `पत्ता` मूल्यांचे प्रतिनिधित्व करण्यासाठी `बाइट्स` विस्तारित करतो. - -हे `बाइट्स` API च्या शीर्षस्थानी खालील पद्धत जोडते: - -- `Address.fromString(s: string): Address` – हेक्साडेसिमल स्ट्रिंगमधून `Address` तयार करते -- `Address.fromBytes(b: Bytes): पत्ता` – `b` वरून एक `Address` तयार करा जो 20 बाइट्स लांब असावा. कमी किंवा अधिक बाइट्ससह मूल्य पास केल्याने त्रुटी येईल - -### स्टोअर API - -```typescript -'@graphprotocol/graph-ts' वरून { store } आयात करा -``` - -`store` API ग्राफ नोड स्टोअरमधून आणि त्यामध्ये घटक लोड, जतन आणि काढण्याची परवानगी देते. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### अंदाज निर्मिती करणे - -इथरियम इव्हेंटमधून संस्था तयार करण्यासाठी खालील एक सामान्य नमुना आहे. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -इतर घटकांशी टक्कर टाळण्यासाठी प्रत्येक घटकाकडे एक अद्वितीय आयडी असणे आवश्यक आहे. इव्हेंट पॅरामीटर्समध्ये वापरला जाऊ शकणारा एक अद्वितीय अभिज्ञापक समाविष्ट करणे सामान्य आहे. टीप: आयडी म्हणून ट्रान्झॅक्शन हॅश वापरणे हे गृहित धरते की समान व्यवहारातील इतर कोणत्याही इव्हेंटमध्ये या हॅशसह आयडी म्हणून अस्तित्व निर्माण होत नाही. - -#### स्टोअरमधून घटक लोड करत आहे - -एखादी संस्था आधीपासून अस्तित्वात असल्यास, ती खालील गोष्टींसह स्टोअरमधून लोड केली जाऊ शकते: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -अद्याप स्टोअरमध्ये अस्तित्व नसल्यामुळे, `लोड` पद्धत `हस्तांतरण | शून्य`. त्यामुळे मूल्य वापरण्यापूर्वी `null` केस तपासणे आवश्यक असू शकते. - -> **टीप:** मॅपिंगमध्ये केलेले बदल एखाद्या घटकाच्या मागील डेटावर अवलंबून असल्यासच घटक लोड करणे आवश्यक आहे. विद्यमान घटक अद्यतनित करण्याच्या दोन मार्गांसाठी पुढील विभाग पहा. - -#### ब्लॉकसह तयार केलेल्या संस्था शोधत आहे - -`ग्राफ-नोड` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 आणि `@graphprotocol/graph-cli` v0.49.0 नुसार `loadInBlock` पद्धत सर्व घटक प्रकारांवर उपलब्ध आहे. - -स्टोर API वर्तमान ब्लॉक में बनाए गए या अपडेट किए गए संविष्टियों की रिट्रीवल को सुविधाजनक बनाता है। एक आम स्थिति इसके लिए होती है कि एक हैंडलर किसी ऑन-चेन इवेंट से कुछ ट्रांजैक्शन बनाता है, और बाद में एक दूसरा हैंडलर यदि इस ट्रांजैक्शन का अस्तित्व होता है तो इस ट्रांजैक्शन तक पहुँचना चाहता है। जहाँ ट्रांजैक्शन मौजूद नहीं है, वहाँ सबग्राफ डेटाबेस में जाकर यह जानने के लिए कि संविष्टि मौजूद नहीं है, अगर सबग्राफ लेखक पहले से ही जानते हैं कि संविष्टि उसी ब्लॉक में बनाई गई थी, तो loadInBlock का उपयोग इस डेटाबेस राउंडट्रिप से बचाता है। कुछ सबग्राफ के लिए, ये छूटी हुई लुकअप्स इंडेक्सिंग टाइम में अहम योगदान कर सकती हैं।. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> टीप: दिलेल्या ब्लॉकमध्ये कोणतीही संस्था तयार केली नसल्यास, स्टोअरमध्ये दिलेल्या आयडीसह एखादी संस्था असली तरीही `loadInBlock` `null` परत करेल. - -#### व्युत्पन्न घटक शोधत आहे - -`ग्राफ-नोड` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 आणि `@graphprotocol/graph-cli` v0.51.0 नुसार `लोड संबंधित` पद्धत उपलब्ध आहे. - -हे इव्हेंट हँडलरमधून व्युत्पन्न घटक फील्ड लोड करणे सक्षम करते. उदाहरणार्थ, खालील स्कीमा दिले आहे: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -खालील कोड `टोकन` घटक लोड करेल ज्यातून `धारक` घटक प्राप्त झाला आहे: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### विद्यमान घटक अद्यतनित करत आहे - -विद्यमान घटक अद्यतनित करण्याचे दोन मार्ग आहेत: - -1. घटक लोड करा उदा. `Transfer.load(id)`, घटकावर गुणधर्म सेट करा, नंतर ते स्टोअरमध्ये परत `.save()` करा. -2. फक्त यासह अस्तित्व तयार करा उदा. `नवीन हस्तांतरण(आयडी)`, घटकावर गुणधर्म सेट करा, नंतर ते स्टोअरमध्ये `.सेव्ह()` करा. अस्तित्व आधीच अस्तित्वात असल्यास, बदल त्यात विलीन केले जातात. - -व्युत्पन्न केलेल्या प्रॉपर्टी सेटरला धन्यवाद, बहुतेक प्रकरणांमध्ये गुणधर्म बदलणे सरळ पुढे आहे: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -खालील दोन सूचनांपैकी एकासह गुणधर्म अनसेट करणे देखील शक्य आहे: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -हे फक्त पर्यायी गुणधर्मांसह कार्य करते, म्हणजेच ग्राफक्यूएलमध्ये `!` शिवाय घोषित केलेले गुणधर्म. दोन उदाहरणे `मालक: बाइट्स` किंवा `रक्कम: BigInt` असतील. - -अॅरे गुणधर्म अपडेट करणे थोडे अधिक गुंतलेले आहे, कारण एखाद्या घटकाकडून अॅरे मिळवणे त्या अॅरेची प्रत तयार करते. याचा अर्थ अॅरे बदलल्यानंतर अॅरे गुणधर्म पुन्हा स्पष्टपणे सेट करावे लागतील. खालील गृहीत धरते की `संख्या` मध्ये `संख्या: [BigInt!]!` फील्ड आहे. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### स्टोअरमधून एंटिटीस काढून टाकणे - -व्युत्पन्न केलेल्या प्रकारांद्वारे अस्तित्व काढून टाकण्याचा सध्या कोणताही मार्ग नाही. त्याऐवजी, एंटिटी काढून टाकण्यासाठी एंटिटी प्रकाराचे नाव आणि एंटिटी आयडी `store.remove` वर पास करणे आवश्यक आहे: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### इथरियम API - -Ethereum API स्मार्ट कॉन्ट्रॅक्ट्स, पब्लिक स्टेट व्हेरिएबल्स, कॉन्ट्रॅक्ट फंक्शन्स, इव्हेंट्स, व्यवहार, ब्लॉक्स आणि एन्कोडिंग/डिकोडिंग इथरियम डेटामध्ये प्रवेश प्रदान करते. - -#### इथरियम प्रकारांसाठी समर्थन - -घटकांप्रमाणे, `ग्राफ कोडजेन` सबग्राफमध्ये वापरल्या जाणार्‍या सर्व स्मार्ट करार आणि इव्हेंटसाठी वर्ग व्युत्पन्न करते. यासाठी, करार ABIs सबग्राफ मॅनिफेस्टमधील डेटा स्रोताचा भाग असणे आवश्यक आहे. सामान्यतः, ABI फाइल्स `abis/` फोल्डरमध्ये संग्रहित केल्या जातात. - -व्युत्पन्न केलेल्या वर्गांसह, इथरियम प्रकार आणि [अंगभूत प्रकार](#built-in-types) मधील रूपांतरणे पडद्यामागे होतात जेणेकरून सबग्राफ लेखकांना त्यांच्याबद्दल काळजी करण्याची गरज नाही. - -पुढील उदाहरण हे स्पष्ट करते. सारखी सबग्राफ स्कीमा दिली - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -आणि Ethereum वर एक `Transfer(address,address,uint256)` इव्हेंट स्वाक्षरी, `पासून`, `ला` आणि `रक्कम` मूल्ये `पत्ता`, `पत्ता` आणि `uint256` प्रकार `Address` आणि `BigInt` मध्ये रूपांतरित केले जातात, परवानगी देऊन ते `Bytes!` आणि `BigInt!` गुणधर्मांना `Transfer` घटकाकडे पाठवले जातील: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### इव्हेंट आणि ब्लॉक/व्यवहार डेटा - -इथरियम इव्हेंट इव्हेंट हँडलर्सना पास केले जातात, जसे की मागील उदाहरणांमधील `Transfer` इव्हेंट, केवळ इव्हेंट पॅरामीटर्समध्येच प्रवेश प्रदान करत नाहीत तर त्यांच्या पालक व्यवहार आणि ते ज्या ब्लॉकचा भाग आहेत त्यामध्ये देखील प्रवेश प्रदान करतात. खालील डेटा `इव्हेंट` उदाहरणांमधून मिळू शकतो (हे वर्ग `graph-ts` मधील `ethereum` मॉड्यूलचा भाग आहेत): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### स्मार्ट कॉन्ट्रॅक्ट स्टेटमध्ये प्रवेश - -`graph codegen` द्वारे व्युत्पन्न केलेल्या कोडमध्ये सबग्राफमध्ये वापरल्या जाणार्‍या स्मार्ट कॉन्ट्रॅक्टचे वर्ग देखील समाविष्ट आहेत. सध्याच्या ब्लॉकमध्ये सार्वजनिक स्टेट व्हेरिएबल्स आणि कॉन्ट्रॅक्टच्या कॉल फंक्शन्समध्ये प्रवेश करण्यासाठी याचा वापर केला जाऊ शकतो. - -कॉन्ट्रॅक्टमध्ये प्रवेश करणे हा एक सामान्य पॅटर्न आहे ज्यातून इव्हेंटची उत्पत्ती होते. हे खालील कोडसह साध्य केले आहे: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` चे नाव येथे `TransferEvent` असे नाव देण्यात आले आहे जेणेकरुन अस्तित्व प्रकारासह नामकरणाचा विरोध होऊ नये - -जोपर्यंत Ethereum वरील `ERC20Contract` मध्ये `symbol` नावाचे सार्वजनिक वाचनीय फंक्शन आहे, तोपर्यंत त्याला `.symbol()` सह कॉल केले जाऊ शकते. पब्लिक स्टेट व्हेरिएबल्ससाठी समान नावाची पद्धत स्वयंचलितपणे तयार केली जाते. - -सबग्राफचा भाग असलेला इतर कोणताही करार व्युत्पन्न केलेल्या कोडमधून आयात केला जाऊ शकतो आणि वैध पत्त्यावर बांधला जाऊ शकतो. - -#### रिव्हर्ट केलेले कॉल हाताळणे - -जर तुमच्या कराराच्या केवळ-वाचनीय पद्धती परत येऊ शकतात, तर तुम्ही `प्रयत्न__` सह व्युत्पन्न केलेल्या करार पद्धतीला कॉल करून ते हाताळले पाहिजे. उदाहरणार्थ, गुरुत्वाकर्षण करार `gravatarToOwner` पद्धत उघड करतो. हा कोड त्या पद्धतीत रिव्हर्ट हाताळण्यास सक्षम असेल: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -लक्षात ठेवा की गेथ किंवा इन्फुरा क्लायंटशी कनेक्ट केलेला ग्राफ नोड सर्व रिव्हर्ट्स शोधू शकत नाही, जर तुम्ही यावर अवलंबून असाल तर आम्ही पॅरिटी क्लायंटशी कनेक्ट केलेला ग्राफ नोड वापरण्याची शिफारस करतो. - -#### एन्कोडिंग/डिकोडिंग ABI - -`ethereum` मॉड्यूलमधील `encode` आणि `decode` फंक्शन्स वापरून Ethereum च्या ABI एन्कोडिंग फॉरमॅटनुसार डेटा एन्कोड आणि डीकोड केला जाऊ शकतो. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -अधिक माहितीसाठी: - -- [ABI वैशिष्ट्य](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- एन्कोडिंग/डीकोडिंग [रस्ट लायब्ररी/CLI](https://github.com/rust-ethereum/ethabi) -- अधिक [जटिल उदाहरण](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### लॉगिंग API - -```typescript -'@graphprotocol/graph-ts' वरून { log } आयात करा -``` - -`लॉग` API सबग्राफना ग्राफ नोड मानक आउटपुट तसेच ग्राफ एक्सप्लोररवर माहिती लॉग करण्याची अनुमती देते. विविध लॉग स्तर वापरून संदेश लॉग केले जाऊ शकतात. वितर्कातून लॉग संदेश तयार करण्यासाठी मूलभूत स्वरूप स्ट्रिंग वाक्यरचना प्रदान केली जाते. - -`लॉग` API मध्ये खालील कार्ये समाविष्ट आहेत: - -- `log.debug(fmt: string, args: Array): void` - डीबग संदेश लॉग करतो. -- `log.info(fmt: string, args: Array): void` - माहितीपर संदेश लॉग करतो. -- `log.warning(fmt: string, args: Array): void` - चेतावणी लॉग करते. -- `log.error(fmt: string, args: Array): void` - त्रुटी संदेश लॉग करते. -- `log.critical(fmt: string, args: Array): void` – एक गंभीर संदेश लॉग करतो _आणि_ सबग्राफ समाप्त करतो. - -`लॉग` API फॉरमॅट स्ट्रिंग आणि स्ट्रिंग व्हॅल्यूजचा अॅरे घेते. ते नंतर अॅरेमधील स्ट्रिंग व्हॅल्यूसह प्लेसहोल्डर बदलते. पहिला `{}` प्लेसहोल्डर अॅरेमधील पहिल्या व्हॅल्यूने बदलला जातो, दुसरा `{}` प्लेसहोल्डर दुसऱ्या व्हॅल्यूने बदलला जातो इ. - -```typescript -log.info('प्रदर्शनासाठी संदेश: {}, {}, {}', [value.toString(), anotherValue.toString(), 'आधीपासूनच एक स्ट्रिंग']) -``` - -#### एक किंवा अधिक मूल्ये लॉग करणे - -##### एकल मूल्य लॉग करत आहे - -खालील उदाहरणामध्ये, स्ट्रिंग व्हॅल्यू "A" हे लॉग इन करण्यापूर्वी `['A']` होण्यासाठी अॅरेमध्ये पास केले जाते: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### विद्यमान अॅरेमधून एकल एंट्री लॉग करत आहे - -खालील उदाहरणामध्ये, तीन मूल्यांचा समावेश असूनही, केवळ वितर्क अॅरेचे पहिले मूल्य लॉग केले आहे. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### विद्यमान अॅरेमधून एकाधिक नोंदी लॉग करणे - -वितर्क अ‍ॅरेमधील प्रत्येक एंट्रीला लॉग मेसेज स्ट्रिंगमध्ये स्वतःचा प्लेसहोल्डर `{}` आवश्यक असतो. खालील उदाहरणामध्ये लॉग मेसेजमध्ये तीन प्लेसहोल्डर्स `{}` आहेत. यामुळे, `myArray` मधील तिन्ही मूल्ये लॉग केलेली आहेत. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### विद्यमान अॅरेमधून विशिष्ट एंट्री लॉग करणे - -अॅरेमध्ये विशिष्ट मूल्य प्रदर्शित करण्यासाठी, अनुक्रमित मूल्य प्रदान करणे आवश्यक आहे. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### कार्यक्रम माहिती लॉगिंग - -खालील उदाहरण इव्हेंटमधील ब्लॉक नंबर, ब्लॉक हॅश आणि ट्रान्झॅक्शन हॅश लॉग करते: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -'@graphprotocol/graph-ts' वरून { ipfs } आयात करा -``` - -स्मार्ट कॉन्ट्रॅक्ट्स अधूनमधून IPFS फाइल्स चेनवर अँकर करतात. हे मॅपिंगला कॉन्ट्रॅक्टमधून IPFS हॅश प्राप्त करण्यास आणि IPFS मधील संबंधित फाइल्स वाचण्यास अनुमती देते. फाइल डेटा `बाइट्स` म्हणून परत केला जाईल, ज्यासाठी सहसा पुढील प्रक्रिया आवश्यक असते, उदा. या पृष्ठावर नंतर दस्तऐवजीकरण केलेल्या `json` API सह. - -आयपीएफएस हॅश किंवा पथ दिल्यास, आयपीएफएस मधून फाइल वाचणे खालीलप्रमाणे केले जाते: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**टीप:** `ipfs.cat` याक्षणी निर्धारक नाही. विनंतीची वेळ संपण्यापूर्वी फाइल IPFS नेटवर्कवरून पुनर्प्राप्त केली जाऊ शकत नसल्यास, ती `null` परत करेल. यामुळे, `null` साठी परिणाम तपासणे नेहमीच फायदेशीर आहे. - -`ipfs.map` सह स्ट्रीमिंग पद्धतीने मोठ्या फाइल्सवर प्रक्रिया करणे देखील शक्य आहे. फंक्शन IPFS फाईलसाठी हॅश किंवा पथ, कॉलबॅकचे नाव आणि त्याचे वर्तन सुधारण्यासाठी ध्वजांची अपेक्षा करते: - -```typescript -'@graphprotocol/graph-ts' वरून { JSONValue, Value } आयात करा - -निर्यात कार्य प्रक्रिया आयटम(मूल्य: JSONValue, userData: मूल्य): void { - // व्यवहाराच्या तपशीलांसाठी JSONValue दस्तऐवजीकरण पहा - // JSON मूल्यांसह - द्या obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - जर (!id || !title) { - परत - } - - // कॉलबॅक देखील संस्था तयार करू शकतात - let newItem = newItem(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // पालकांना "parentId" वर सेट करा - newitem.save() -} - -// हे मॅपिंगमध्ये इव्हेंट हँडलरमध्ये ठेवा -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// वैकल्पिकरित्या, `ipfs.mapJSON` वापरा -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -सध्या समर्थित असलेला एकमेव ध्वज `json` आहे, जो `ipfs.map` ला पास करणे आवश्यक आहे. `json` ध्वजासह, IPFS फाइलमध्ये JSON मूल्यांची मालिका, प्रति ओळ एक मूल्य असणे आवश्यक आहे. `ipfs.map` ला केलेला कॉल फाइलमधील प्रत्येक ओळ वाचेल, ती `JSONValue` मध्ये डीसीरियलाइज करेल आणि त्या प्रत्येकासाठी कॉलबॅक कॉल करेल. कॉलबॅक नंतर `JSONValue` मधील डेटा संचयित करण्यासाठी अस्तित्व ऑपरेशन्स वापरू शकतो. `ipfs.map` नावाचा हँडलर यशस्वीरीत्या पूर्ण झाल्यावरच अस्तित्वातील बदल संचयित केले जातात; दरम्यान, ते मेमरीमध्ये ठेवले जातात, आणि `ipfs.map` प्रक्रिया करू शकतील अशा फाइलचा आकार मर्यादित आहे. - -यश मिळाल्यावर, `ipfs.map` `void` परत करतो. कॉलबॅकच्या कोणत्याही आवाहनामुळे त्रुटी उद्भवल्यास, `ipfs.map` मागवणारा हँडलर रद्द केला जातो आणि सबग्राफ अयशस्वी म्हणून चिन्हांकित केला जातो. - -### क्रिप्टो API - -```typescript -'@graphprotocol/graph-ts' वरून { crypto } आयात करा -``` - -`क्रिप्टो` API मॅपिंगमध्ये वापरण्यासाठी क्रिप्टोग्राफिक कार्ये उपलब्ध करून देते. सध्या, फक्त एक आहे: - -- `crypto.keccak256(इनपुट: ByteArray): ByteArray` - -### JSON API - -```typescript -'@graphprotocol/graph-ts' वरून { json, JSONValueKind } आयात करा -``` - -JSON डेटा `json` API वापरून पार्स केला जाऊ शकतो: - -- `json.fromBytes(डेटा: बाइट): JSONValue` – वैध UTF-8 क्रम म्हणून व्याख्या केलेल्या `बाइट्स` अॅरेमधून JSON डेटा पार्स करते -- `json.try_fromBytes(डेटा: बाइट): परिणाम` – `json.fromBytes` ची सुरक्षित आवृत्ती, पार्सिंग अयशस्वी झाल्यास ते त्रुटी प्रकार परत करते -- `json.fromString(डेटा: स्ट्रिंग): JSONValue` – वैध UTF-8 `स्ट्रिंग` वरून JSON डेटा पार्स करते -- `json.try_fromString(डेटा: स्ट्रिंग): परिणाम` – `json.fromString` ची सुरक्षित आवृत्ती, पार्सिंग अयशस्वी झाल्यास ते त्रुटी प्रकार परत करते - -`JSONValue` वर्ग अनियंत्रित JSON दस्तऐवजातून मूल्ये बाहेर काढण्याचा मार्ग प्रदान करतो. JSON मूल्ये बूलियन, संख्या, अॅरे आणि बरेच काही असू शकतात, `JSONValue` मूल्याचा प्रकार तपासण्यासाठी `प्रकार` गुणधर्मासह येतो: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -याव्यतिरिक्त, मूल्य `शून्य` आहे की नाही हे तपासण्याची एक पद्धत आहे: - -- `value.isNull(): बुलियन` - -जेव्हा मूल्याचा प्रकार निश्चित असतो, तेव्हा ते खालीलपैकी एक पद्धत वापरून [अंगभूत प्रकार](#built-in-types) मध्ये रूपांतरित केले जाऊ शकते: - -- `value.toBool(): बुलियन` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (आणि नंतर `JSONValue` वरील 5 पद्धतींपैकी एकाने रूपांतरित करा) - -### प्रकार रूपांतरण संदर्भ - -| स्रो(त) | गंतव्यस्थान | रूपांतरण कार्य | -| ------------------------- | ----------------------- | ---------------------------- | -| पत्ता | बाइट्स | काहीही नाही | -| पत्ता | स्ट्रिंग | s.toHexString() | -| बिग डेसिमल | स्ट्रिंग | s.toString() | -| BigInt | बिग डेसिमल | s.toBigDecimal() | -| BigInt | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | -| BigInt | स्ट्रिंग (युनिकोड) | s.toString() | -| BigInt | i32 | s.toI32() | -| बुलियन | बुलियन | काहीही नाही | -| बाइट्स (स्वाक्षरी केलेले) | BigInt | BigInt.fromSignedBytes(s) | -| बाइट्स (साइन न केलेले) | BigInt | BigInt.fromUnsignedBytes(s) | -| बाइट्स | स्ट्रिंग (हेक्साडेसिमल) | s.toHexString() or s.toHex() | -| बाइट्स | स्ट्रिंग (युनिकोड) | s.toString() | -| बाइट्स | स्ट्रिंग (बेस58) | s.toBase58() | -| बाइट्स | i32 | s.toI32() | -| बाइट्स | u32 | s.toU32() | -| बाइट्स | JSON | json.fromBytes(s) | -| int8 | i32 | काहीही नाही | -| int32 | i32 | काहीही नाही | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | काहीही नाही | -| int64 - int256 | BigInt | काहीही नाही | -| uint32 - uint256 | BigInt | काहीही नाही | -| JSON | बुलियन | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | स्ट्रिंग | s.toString() | -| JSON | अरेंज | s.toArray() | -| JSON | ऑब्जेक्ट | s.toObject() | -| स्ट्रिंग | पत्ता | Address.fromString(s) | -| बाइट्स | पत्ता | Address.fromBytes(s) | -| स्ट्रिंग | BigInt | BigInt.fromString(s) | -| स्ट्रिंग | बिग डेसिमल | BigDecimal.fromString(s) | -| स्ट्रिंग (हेक्साडेसिमल) | बाइट्स | ByteArray.fromHexString(s) | -| String (UTF-8) | बाइट्स | ByteArray.fromUTF8(s) | - -### डेटा स्रोत मेटाडेटा - -तुम्ही `डेटास्रोत` नेमस्पेसद्वारे हँडलरला आमंत्रित केलेल्या डेटा स्रोताचा करार पत्ता, नेटवर्क आणि संदर्भ तपासू शकता: - -- `dataSource.address(): पत्ता` -- `dataSource.network(): स्ट्रिंग` -- `dataSource.context(): DataSourceContext` - -### संस्था आणि डेटास्रोत संदर्भ - -बेस `एंटिटी` क्लास आणि चाइल्ड `डेटासोर्स कॉन्टेक्स्ट` क्लासमध्ये डायनॅमिकली फील्ड सेट करण्यासाठी आणि मिळवण्यासाठी मदतनीस आहेत: - -- `setString(की: स्ट्रिंग, मूल्य: स्ट्रिंग): शून्य` -- `setI32(की: स्ट्रिंग, मूल्य: i32): शून्य` -- `setBigInt(की: स्ट्रिंग, मूल्य: BigInt): शून्य` -- `setBytes(की: स्ट्रिंग, मूल्य: बाइट): शून्य` -- `setBoolean(की: स्ट्रिंग, मूल्य: bool): शून्य` -- `setBigDecimal(की, मूल्य: BigDecimal): शून्य` -- `getString(की: स्ट्रिंग): स्ट्रिंग` -- `getI32(की: स्ट्रिंग): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(की: स्ट्रिंग): बाइट्स` -- `getBoolean(की: स्ट्रिंग): बुलियन` -- `getBigDecimal(की: स्ट्रिंग): BigDecimal` - -### सामान्य असेंब्लीस्क्रिप्ट समस्या - -काही [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) समस्या आहेत ज्या सबग्राफ डेव्हलपमेंट दरम्यान सामान्य आहेत. ते डीबग अडचणीत आहेत, तथापि, त्यांच्याबद्दल जागरूक असणे मदत करू शकते. या समस्यांची संपूर्ण यादी खाली दिली आहे: - -- `खाजगी` वर्ग व्हेरिएबल्स [AssembyScript](https://www.assemblyscript.org/status.html#language-features) मध्ये लागू केले जात नाहीत. क्लास व्हेरिएबल्सना क्लास ऑब्जेक्टमधून थेट बदलण्यापासून संरक्षित करण्याचा कोणताही मार्ग नाही. -- व्याप्ती [क्लोजर फंक्शन्स](https://www.assemblyscript.org/status.html#on-closures) मध्ये वारशाने मिळत नाही, म्हणजे क्लोजर फंक्शन्सच्या बाहेर घोषित केलेले व्हेरिएबल्स वापरले जाऊ शकत नाहीत. [डेव्हलपर हायलाइट्स #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s) मध्ये स्पष्टीकरण. diff --git a/website/pages/mr/network-transition-faq.mdx b/website/pages/mr/network-transition-faq.mdx deleted file mode 100644 index b33425bcd985..000000000000 --- a/website/pages/mr/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: नेटवर्क संक्रमण FAQ ---- - -विकेंद्रित नेटवर्कमध्ये त्यांचे सबग्राफ स्थलांतरित करण्यासाठी विकसकांकडे भरपूर वेळ असेल. इंडेक्सर आणि नेटवर्क रेडिनेसवर आधारित अचूक टाइमलाइन प्रत्येक नेटवर्कमध्ये बदलू शकतात-होस्ट केलेली सेवा एकाच वेळी सर्व नेटवर्कसाठी समर्थन समाप्त करणार नाही आणि अचानक सूर्यास्त होणार नाही. - -इथरियमसह होस्ट केलेल्या सेवेवरील प्रत्येक नेटवर्क हळूहळू सूर्यास्त होईल कारण ते विकेंद्रित नेटवर्कवर वैशिष्ट्य समानता आणि उच्च दर्जाची सेवा प्राप्त करण्यासाठी समर्थित आहे. हे [MIPs प्रोग्राम](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/)मधील इंडेक्सर्सच्या मदतीने नेटवर्क-टू-नेटवर्क आधारावर होईल. a>, विकेंद्रित नेटवर्कवरील प्रत्येक नेटवर्कसाठी पूर्ण समर्थन सक्षम करण्यासाठी. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## होस्ट केलेले सेवा सूर्यास्त FAQ - -### विकेंद्रीकृत नेटवर्क सबग्राफसाठी मुख्य कार्ये पुरवण्यापूर्वी मला माझा सबग्राफ स्थलांतरित करावा लागेल का? - -सबग्राफ डेव्हलपर आता त्यांचे इथरियम मेननेट सबग्राफ स्थलांतरित करणे सुरू करू शकतात, परंतु विकेंद्रित नेटवर्क आणि होस्ट केलेल्या सेवेसाठी वैशिष्ट्य कोर कार्यक्षमता अस्तित्वात येण्यापूर्वी नेटवर्कवर सबग्राफ स्थलांतरित करण्यास भाग पाडले जाणार नाही. Gnosis नेटवर्क सबग्राफचे स्थलांतर देखील लवकरच सुरू होईल, इंडेक्सर्सनी नेटवर्कची चाचणी केल्यानंतर आणि उत्पादनात अनुक्रमित करण्यास तयार झाल्यावर इतर नेटवर्क्सचे अनुसरण केले जाईल. - -### होस्ट केलेल्या सेवेचे अवमूल्यन करण्यासाठी टाइमलाइन आणि प्रक्रिया काय आहे? - -नेटवर्कवर ते केव्हा सक्षम केले जातात आणि प्रत्येक टप्प्यातून जाण्यासाठी लागणारी टाइमलाइन यावर अवलंबून सर्व नेटवर्कची स्वतःची टाइमलाइन असेल. मुख्य विकासक शक्य तितक्या लवकर विकेंद्रित नेटवर्कवर बहुतेक होस्ट केलेल्या सेवा रहदारीचे स्थलांतर करण्यासाठी काम करत आहेत. - -सर्वात महत्त्वाचे म्हणजे, विकेंद्रित नेटवर्कवरील तुमच्या विशिष्ट नेटवर्क/सबग्राफसाठी मुख्य कार्यक्षमता उपलब्ध होण्यापूर्वी तुम्ही होस्ट केलेल्या सेवेचा प्रवेश गमावणार नाही. - -प्रत्येक नेटवर्कसाठी होस्ट केलेल्या सेवा वगळण्याचे तीन वेगळे टप्पे आहेत: - -#### फेज 1 (द सनरे): नेटवर्कवर गुणवत्ता समानता असलेल्या ब्लॉकचेनसाठी नवीन सबग्राफ तयार करणे अक्षम करा - -या टप्प्यात, डेव्हलपर्सला त्याच्या नेटवर्कसाठी होस्टेड सेवेसाठी नविन सबग्रॅफ डिप्लॉय करण्याची संधी आणि कोणतेही असेल नाही. डेव्हलपर्सला हल्ल्याच्या सेवेवर विद्यमान सबग्रॅफ अद्यतित करण्याची पर्वानगी असेल. - -कोणत्याही नेटवर्कने अद्याप होस्ट केलेल्या सेवेपासून विकेंद्रित नेटवर्कमध्ये संक्रमणाचा पहिला टप्पा सुरू केलेला नाही. - -नेटवर्क फेज 1 मध्ये प्रवेश करत असताना, कृपया लक्षात घ्या की विकासक अद्याप GRT प्राप्त न करता किंवा प्रोटोकॉल अर्थशास्त्राशी संवाद साधल्याशिवाय त्यांचे सबग्राफ विकसित आणि तपासण्यासाठी सबग्राफ स्टुडिओमधील मर्यादित विकासक पूर्वावलोकन URL वापरू शकतात. - -#### दोन चरण (द सनबीम): सबग्रॅफ अद्यतने अक्षम करा - -या टप्प्यात, सबग्रॅफ अद्यतने उपयोगकर्ता फेजच्या सबग्रॅफ स्टुडिओद्वारे करण्यात आणि नंतर डिसेंट्रलाइझ्ड नेटवर्कला प्रकाशित करण्यात आणणे आवश्यक आहे. हे चरणातील नेटवर्कसाठी होस्टेड सेव्हिस सबग्रॅफ्स अजूनही अस्तित्वात राहीले आणि त्यांची क्वेरी करण्यायोग्य असणार आहेत, परंतु सबग्रॅफ अद्यतने The Graph चं डिसेंट्रलाइझ्ड नेटवर्कवर करणे आवश्यक आहे. - -कोणतेही नेटवर्क या टप्प्यावर केव्हा हलेल याची कोणतीही अचूक टाइमलाइन नाही, कारण ही प्रक्रिया तारखांच्या नव्हे तर मुख्य कार्यक्षमतेच्या आसपासच्या निर्गमन निकषांद्वारे चालविली जाते. - -#### फेज 3 (सूर्योदय): क्वेरी सबग्राफ अक्षम करा - -या टप्प्यावर, ग्राफ नेटवर्कद्वारे समर्थित नेटवर्कसाठी होस्ट केलेल्या सेवेवरील सबग्राफ यापुढे क्वेरीवर प्रक्रिया करणार नाहीत. या टप्प्यातील नेटवर्कवरील सबग्राफसाठी ब्लॉकचेन डेटाची क्वेरी करण्याचा एकमेव मार्ग विकेंद्रित नेटवर्कद्वारे असेल. डेव्हलपमेंट क्वेरी URL द्वारे चाचणी क्वेरी अजूनही [सबग्राफ स्टुडिओ](https://thegraph.com/studio/) मध्ये उपलब्ध असतील. - -यशस्वीरित्या फेज 2 वर जाईपर्यंत आणि विकेंद्रित नेटवर्कमध्ये स्थलांतरित करण्यासाठी विकसकांना पुरेसा वेळ देत नाही तोपर्यंत नेटवर्क फेज 3 मध्ये जाणार नाहीत. - -![सबग्राफ चार्ट](/img/subgraph-chart.png) - -> टीप: हा आकृती प्रति-नेटवर्क सूर्यास्त प्रक्रिया प्रतिबिंबित करतो. होस्ट केलेल्या सेवेच्या सूर्यास्ताच्या वेळा भिन्न असतील आणि एकाच वेळी सूर्यास्त होणार नाहीत. - -### गोएर्ली, मुंबई इत्यादी चाचणी नेटवर्कचे काय होते? - -सर्व नेटवर्क आणि चाचणी नेटवर्क [सबग्राफ स्टुडिओ](https://thegraph.com/studio/) मधील विनामूल्य उपयोजन क्वेरी URL साठी पात्र आहेत. ही URL रेट मर्यादित आहे आणि चाचणी आणि विकास रहदारीसाठी आहे. उत्पादन ग्रेड रिडंडंसी आणि स्थिरता मिळविण्यासाठी उत्पादन रहदारीला ग्राफ नेटवर्कवर प्रकाशित सबग्राफची आवश्यकता असेल. - -![दर मर्यादा](/img/rate-limit.png) - -### ग्राफ नेटवर्कमध्ये होस्ट केलेल्या सेवेसारखीच कार्यक्षमता आहे का? - -ग्राफ नेटवर्कवरील अनुक्रमणिका सर्वात अलीकडील नेटवर्क-मंजूर [ग्राफ नोडचे प्रकाशन](https://github.com/graphprotocol/graph-node/releases) चालवतात आणि समर्थित कोणत्याही सबग्राफ वैशिष्ट्यांना समर्थन देऊ शकतात. त्या प्रकाशनात. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -काही सबग्राफ वैशिष्‍ट्ये इंडेक्सिंग रिवॉर्डसाठी पात्र नाहीत, जर ते नेटवर्कवर निर्धारक किंवा पडताळणीयोग्य नसतील. विशिष्ट उदाहरणे म्हणजे IPFS वरून फायली आणणे आणि ग्राफ नेटवर्कवर अद्याप समर्थित नसलेले इंडेक्सिंग नेटवर्क. - -या वैशिष्ट्यांसह सबग्राफ नेटवर्कवर प्रकाशित केले जाऊ शकतात, परंतु ते इंडेक्सर्सद्वारे उचलले जाऊ शकत नाहीत. तथापि, पुरेसा सिग्नल असलेले सबग्राफ तरीही क्वेरी फी गोळा करण्यात स्वारस्य असलेल्या इंडेक्सर्सना आकर्षित करू शकतात, ज्यासाठी कोणताही सबग्राफ पात्र आहे. - -### माझ्या स्वतःच्या पायाभूत सुविधा चालवण्याच्या तुलनेत ग्राफ नेटवर्कची किंमत किती आहे? - -द ग्राफचं डिसेंट्रलाइझ्ड नेटवर्क विशेषत: [या प्राधिकरणांच्या अध्ययनांमध्ये](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month) दर्शविलेल्या प्रमाणे, डेडिकेटेड अभियांत्रिकीसह तुलनेत 60-90% कमी खर्चावर काम करतं. - -### मी नेटवर्कवर स्थलांतर केल्यानंतर माझ्या होस्ट केलेल्या सेवा सबग्राफसह मला काही करावे लागेल का? - -गोंधळ टाळण्यासाठी तुमचा होस्ट केलेला सेवा सबग्राफ लपवण्याची जोरदार शिफारस केली जाते. [हा व्हिडिओ](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) प्रक्रियेतून जातो. - -### विकेंद्रित नेटवर्क माझ्या पसंतीच्या नेटवर्कला कधी समर्थन देईल? - -प्रति नेटवर्क कोणतीही सेट टाइमलाइन नाही, ते [MIPs प्रोग्राम](https://thegraph.com/migration-incentive-program/) द्वारे इंडेक्सर रेडिनेसद्वारे निर्देशित केले जातील जेथे इंडेक्सर्सद्वारे नवीन नेटवर्कची चाचणी केली जाते. नेटवर्कवर नवीन नेटवर्क समर्थित असल्याने, वापरकर्त्यांना स्थलांतराची तयारी करण्यासाठी भरपूर सूचना प्राप्त होतील. कोर डेव्ह आणि ग्राफ इकोसिस्टममधील योगदानकर्ते शक्य तितक्या लवकर अधिक नेटवर्कसाठी समर्थन लागू करण्यासाठी कार्य करत आहेत. - -### इथरियम मेननेट नेटवर्क संक्रमण प्रक्रियेच्या पहिल्या टप्प्यात प्रवेश करत आहे का? - -Ethereum प्रारंभी Q3 2022 च्या अखेरीस होस्ट केलेल्या सेवेचे संक्रमण सुरू होईल अशी अपेक्षा असताना, हे [ पुढे ढकलण्यात आले आहे ](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) वापरकर्ता अभिप्राय संबोधित करण्यासाठी. वापरकर्ता अनुभव, बिलिंग आणि वापरकर्ता विनंत्यांच्या इतर पूर्ततेसाठी अतिरिक्त सुधारणा इथरियमच्या होस्ट केलेल्या सेवा संक्रमण टाइमलाइनला चालना देतील. खालील इंटिग्रेशन स्टेटस ट्रॅकरद्वारे आणि [The Graph Twitter](https://twitter.com/graphprotocol) द्वारे इथरियम द सनरे फेजमध्ये कधी प्रवेश करेल याबद्दल अद्ययावत रहा - -### आलेख नेटवर्क एकत्रीकरण स्थिती ट्रॅकर - -खालील सारणी स्पष्ट करते की नेटवर्क एकत्रीकरण प्रक्रियेत प्रत्येक नेटवर्क कुठे आहे. तुमचे पसंतीचे नेटवर्क अद्याप सूचीबद्ध नसल्यास, एकीकरण अद्याप सुरू झाले नाही, आणि ते नेटवर्क अद्याप ग्राफच्या होस्ट केलेल्या सेवेद्वारे पूर्णपणे समर्थित आहे. - -> या सारणीमध्ये चाचणी नेटवर्क समाविष्ट नसतील, जे [सबग्राफ स्टुडिओ](https://thegraph.com/studio/) मध्ये विनामूल्य राहतात. - -| नेटवर्क्स | ग्राफ नेटवर्कवर एकत्रीकरणाची घोषणा करत आहे | नेटवर्क एकत्रीकरण पूर्ण झाले | फेज 1: होस्ट केलेल्या सेवेवर नवीन सबग्राफ अक्षम करा | दोन चरण (द सनबीम): होस्टेड सेव्हिसवर सबग्रॅफ अद्यतने अक्षम करा | फेज 3: होस्ट केलेल्या सेवेवर सबग्राफ अक्षम करा | -| --- | :-: | :-: | :-: | :-: | :-: | -| इथरियम | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| बहुभुज | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| हिमस्खलन | ✓ | ✓\* | | | | -| आशावाद | ✓ | | | | | -| फॅन्टम | ✓ | | | | | - -\*\* नेटवर्क सध्या द ग्राफच्या विकेंद्रित नेटवर्कवर बीटामध्ये आहे. - -## क्वेरी फी, API की आणि बिलिंग FAQ - -### क्वेरी फीची किंमत कशी आहे? - -विकेंद्रित नेटवर्कवरील क्वेरीच्या मागणीमुळे क्वेरी शुल्क किमती प्रभावित होतात. मुख्य विकासकांनी [अगोरा](https://github.com/graphprotocol/agora) नावाची क्वेरी किंमत किंमत मॉडेल भाषा तयार केली. हे इंडेक्सर्सना किमतीच्या प्रश्नांना कार्यक्षमतेने सक्षम करते. [Agora दस्तऐवजीकरण](https://github.com/graphprotocol/agora/blob/master/docs/README.md) मध्ये अधिक जाणून घ्या. - -### मी कमाल क्वेरी बजेट कसे सेट करू शकतो? - -वापरकर्ते बजेट टॅब अंतर्गत सबग्राफ स्टुडिओ [API की](https://thegraph.com/studio/apikeys/) विभागात कमाल क्वेरी बजेट सेट करू शकतात. [हा व्हिडिओ पहा](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) त्या प्रक्रियेचे विहंगावलोकन, तसेच तुमच्या API कीचे इतर भाग समायोजित करण्यासाठी. - -कृपया लक्षात घ्या की तुमची कमाल क्वेरी बजेट खूपच कमी सेट केल्याने इंडेक्सर्स वगळले जातील, ज्यामुळे अयशस्वी क्वेरी, धीमे क्वेरी इ. च्या स्वरूपात खराब दर्जाची सेवा होऊ शकते. - -सप्टेंबर 2022 च्या अखेरीस, सर्वात कमी कमाल क्वेरी बजेट म्हणून $0.00035-$0.0004 रेंजमध्ये राहणे हा सर्वोत्तम सराव आहे. - -### मी माझ्या API कीचे संरक्षण कसे करू शकतो? - -[सबग्राफ स्टुडिओ](https://thegraph.com/studio/) मधील सबग्राफ आणि डोमेन दोन्हीद्वारे API की प्रतिबंधित करण्यासाठी वापरकर्त्यांना प्रोत्साहित केले जाते: - -![डोमेन प्रतिबंधित करा](/img/restrictdomain.png) - -### क्वेरी फी भरण्यासाठी मी माझी API की कशी भरू? - -तुम्ही "GRT जोडा" बटण दाबून सबग्राफ स्टुडिओ [बिलिंग डॅशबोर्ड](https://thegraph.com/studio/billing/) मध्ये तुमची बिलिंग शिल्लक भरू शकता. अधिक अखंड आणि आवर्ती देयके जोडण्यासाठी हा अनुभव सुधारण्याचे काम चालू आहे. - -[या व्हिडिओमध्ये](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) त्या प्रक्रियेचे विहंगावलोकन आहे. - -### मी माझ्या API की मध्ये कमी बिलिंग शिल्लक साठी सूचना कसे सेट करू? - -वापरकर्त्यांनी त्यांच्या ईमेल पत्त्यावर [येथे](https://thegraph.com/studio/settings/) बिलिंग अलर्ट सेट करावा. - -तसेच, बिलिंग शिल्लक कमी होत असताना चेतावणी देण्यासाठी वापरकर्त्याच्या UI मध्ये बॅनर फ्लॅश होईल. - -माझ्या API की सेटिंग्ज व्यवस्थापित करण्यासाठी सर्वोत्तम पद्धती कोणत्या आहेत? - -सेवेची उच्च गुणवत्ता राखून किमान सरासरी क्वेरी किमती राखण्यासाठी $0.0004 चे कमाल क्वेरी बजेटची शिफारस केली जाते. हे [API की विभाग](https://thegraph.com/studio/apikeys/) च्या बजेट बिलिंग टॅबमध्ये केले जाऊ शकते. - -## स्थलांतर FAQ - -### मी माझा सबग्राफ द ग्राफच्या विकेंद्रीकृत नेटवर्कवर कसा स्थलांतरित करू शकतो? - -या सोप्या [चरण-दर-चरण मार्गदर्शक](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) सह तुमचा सबग्राफ ग्राफ नेटवर्कवर कसा स्थलांतरित करायचा ते शिका किंवा [हा व्हिडिओ](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### The Graph नेटवर्कवर आधीच उभारलेल्या सबग्रॅफ्ससाठी Network Grants आहेत का? - -होय. नेटवर्क अनुदानासाठी अर्ज करण्यासाठी, [येथे](mailto:migration@thegraph.foundation) संपर्क साधा. - -### ग्राफ इकोसिस्टममधून स्थलांतर प्रक्रियेद्वारे कोणतेही आर्थिक/तांत्रिक/विपणन समर्थन आहे का? - -सबग्राफ क्युरेट करण्यासाठी (इंडेक्सर्सला आकर्षित करण्यासाठी) आणि प्रारंभिक क्वेरी फी भरण्यासाठी प्रकल्पांसाठी नेटवर्क अनुदाने आहेत (लागू करा [येथे](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), अभियंत्यांना प्रत्येक टप्प्यावर मदत करण्यासाठी [थेट चॅनेल](https://discord.gg/graphprotocol) आणि तुमचा प्रकल्प प्रदर्शित करण्यासाठी प्राधान्यीकृत विपणन मोहिम स्थलांतरानंतर, या Twitter थ्रेड्समध्ये उदाहरणार्थ: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### प्रश्नांना किती वेळ लागतो? - -विकेंद्रित नेटवर्कवर क्वेरी सरासरी 150-300 मिलीसेकंद घेतात. - -### ग्राफ नेटवर्कवरील बिलिंग प्रक्रिया होस्ट केलेल्या सेवेपेक्षा अधिक जटिल आहे का? - -होय, नेटवर्कसाठी UX अद्याप होस्ट केलेल्या सेवेसह गुणवत्तेच्या समानतेवर नाही. बिलिंग UX, विशेषतः, अद्याप अगदी सुरुवातीच्या टप्प्यात आहे आणि असे बरेच भाग आहेत जे कोर डेव्ह टीम प्रक्रियेपासून दूर ठेवण्यासाठी काम करत आहेत. यातील बऱ्याच सुधारणा नजीकच्या भविष्यात सार्वजनिक केल्या जातील. - -### मी ग्राफ नेटवर्क प्रश्नांसाठी फिएट, क्रेडिट कार्ड किंवा स्टेबलकॉइन्समध्ये पैसे देऊ शकतो का? - -येत्या काही महिन्यांत, वापरकर्त्यांना त्यांच्या सबग्राफसाठी देय देण्यासाठी आवश्यक असलेल्या चरणांची संख्या मोठ्या प्रमाणात कमी केली जाईल. GRT मध्ये अद्याप पेमेंट केले जातील, रिकरिंग पेमेंट करण्यासाठी फिएट आणि क्रिप्टोचे GRT मध्ये रूपांतर करण्यासाठी फिएट ऑन-रॅम्प आणि स्वयंचलित पेमेंट सिस्टम लागू करण्याचे प्रयत्न आधीच सुरू आहेत. - -### होस्ट केलेल्या सेवेप्रमाणे नेटवर्कमध्ये कधीही समान UX असेल का? - -अजून काम बाकी असताना, सध्या होस्ट केलेल्या सेवेवर अस्तित्वात असलेल्या ग्राफ नेटवर्कवर उत्तम दर्जाचे UX नसल्यास तुलनात्मक ऑफर करणे हे उद्दिष्ट आहे. अल्पकालीन, अधिक सुव्यवस्थित आणि अंदाज लावता येण्याजोगा बिलिंग अनुभव प्रदान करणे हे उद्दिष्ट आहे जे वापरकर्त्यांना उच्च-गुणवत्तेचे डॅप तयार करण्यात अधिक वेळ केंद्रित करण्यात मदत करते. - -### माझा सबग्राफ द ग्राफ नेटवर्कवर इंडेक्सरद्वारे उचलला जाईल याची मी खात्री कशी करू शकतो? - -कमीत कमी 10,000 GRT सह क्युरेट करण्याची शिफारस केली जाते, जे वापरकर्ते प्रकाशित करतात त्याच व्यवहारात करू शकतात. वापरकर्ते क्युरेशन समुदायाला त्यांचा सबग्राफ [येथे](https://t.me/CurationStation) क्युरेट करण्यास सांगू शकतात. - -या प्रारंभिक खर्चाची पूर्तता करण्यासाठी सुरुवातीच्या स्थलांतरितांसाठी नेटवर्क अनुदाने आहेत. मोकळ्या मनाने [येथे](mailto:migration@thegraph.foundation) अर्ज करा. - -### सबग्राफला क्युरेशन सिग्नल का आवश्यक आहे? क्युरेटर्सकडून माझ्या सबग्राफवर पुरेसे सिग्नल नसल्यास काय? - -क्युरेशन सिग्नल जितका जास्त असेल तितका सबग्राफ इंडेक्सर्ससाठी अधिक आकर्षक असेल, कारण उच्च सिग्नल आणि उच्च इंडेक्सिंग रिवॉर्ड्स यांच्यात एक रेखीय सहसंबंध आहे. क्युरेशनशिवाय, इंडेक्सर्सना सबग्राफ उचलण्यासाठी कोणतेही प्रोत्साहन नाही. - -### सबग्राफ डेव्हलपर क्युरेशन सिग्नलसाठी वापरत असलेल्या GRT चे काय होते? - -सबग्राफ सिग्नल करणारे तुम्ही पहिले असाल, तर तुमची GRT सिग्नल केलेली रक्कम कमी होणार नाही. क्युरेशनसाठी वापरलेली जीआरटी नंतर काढली जाऊ शकते. तसेच, क्युरेटर्सना इंडेक्सर्सद्वारे घेतलेल्या सर्व क्वेरी फीपैकी 10% मिळते. - -### क्युरेशन प्रक्रियेत कोणत्या सुधारणा होत आहेत? - -अल्पकालीन, आर्बिट्रमवरील प्रारंभिक क्युरेशन मॉडेल क्युरेशन सिग्नलला तत्त्व-संरक्षण प्रदान करेल. दीर्घकालीन, कोर डेव्हलपर्सना क्यूरेशन सिग्नल भाड्याने देण्याची क्षमता ऑफर करण्यास प्राधान्य देईल, आणि तरीही सबग्राफ पुरेशा प्रमाणात अनुक्रमित आहेत याची खात्री करून अधिक अंदाजे किंमतीचा अनुभव उघडेल. - -### मी फ्रंट-एंडमध्ये सबग्राफ API कसे स्विच करू? - -कमीत कमी एका इंडेक्सरने सबग्राफ पूर्णपणे इंडेक्स केल्यानंतर, वापरकर्ता विकेंद्रित नेटवर्कची चौकशी करू शकतो. - -तुमच्या सबग्राफसाठी क्वेरी URL पुनर्प्राप्त करण्यासाठी, तुम्ही क्वेरी URL च्या पुढील चिन्हावर क्लिक करून कॉपी/पेस्ट करू शकता. तुम्हाला असे काहीतरी दिसेल: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -सबग्राफ स्टुडिओ [API की विभागात](https://thegraph.com/studio/apikeys/) व्युत्पन्न केलेल्या API की सह फक्त [api-key] बदला. - -### प्रश्नांची किंमत किती आहे? - -नेटवर्कमधील क्वेरीची सरासरी किंमत बदलते. सप्टेंबर 2022 च्या महिन्यासाठी, प्रति क्वेरी शुल्काची सरासरी किंमत $0.00012 - $0.00020 पर्यंत आहे. - -### माझा सबग्राफ किती व्हॉल्यूम आहे आणि त्याची किंमत किती आहे हे मी कसे शोधू शकतो? - -होस्ट केलेला सेवा खंड डेटा सार्वजनिक नाही. कृपया व्हॉल्यूम आणि किमतीचा अंदाज घेण्यासाठी [येथे](mailto:migration@thegraph.foundation) संपर्क साधा. - -### गेटवे कसे कार्य करते? ते पूर्णपणे विकेंद्रित आहे का? - -गेटवे प्रक्रिया क्वेरी जेणेकरून इंडेक्सर्स डॅप सर्व्ह करू शकतील. प्रवेशद्वार मध्यवर्ती टप्प्यात आहेत ज्याचे उत्तरोत्तर विकेंद्रीकरण केले जात आहे. यावर लवकरच अधिक. - -## नेटवर्क FAQ वापरणे - -### माझा सबग्राफ अपडेट करण्यासाठी काही किंमत आहे का? - -होय, ते 1% क्युरेशन सिग्नल आहे. ते 1% समानप्रमाणे क्युरेटर्स (0.5%) आणि सबग्रॅफ विकसकारांना (0.5%) विभाजले जाते. म्हणजे, प्रत्येक 10K GRT सिग्नल केल्यास, सबग्रॅफ विकसकारांना 50 GRT अपडेट करण्याची खर्च लागतो. - -### मी सिंक वेळेची गती कशी वाढवू? - -सबग्राफमध्ये स्मार्ट कॉन्ट्रॅक्ट कॉलचा वापर कमी करा. स्मार्ट कॉन्ट्रॅक्ट स्टेटमध्ये प्रवेश करण्यासाठी RPC ला eth_call आवश्यक आहे, जे सिंक वेळा कमी करते. - -### मी स्थलांतर करत असताना सबग्राफ स्टुडिओमध्ये मल्टीसिग सपोर्ट आहे का? - -होय, मल्टीसिग समर्थन अलीकडे जोडले गेले आहे. तुम्ही अधिक माहिती [येथे](https://thegraph.com/docs/studio/multisig) शोधू शकता. - -### इथरियम आणि आर्बिट्रम वर GRT साठी करार पत्ते काय आहेत? - -- इथरियम: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- आर्बिट्रम: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### प्रकल्प सहसा त्यांच्या API की मध्ये किती GRT ठेवतात? - -अनेक प्रकल्प त्यांच्या API कीमध्ये 30-60 दिवसांचे GRT ठेवतात, त्यामुळे त्यांना वारंवार रिफिल करण्याची आवश्यकता नसते. तुमचे 30-60 दिवसांचे GRT शुल्क काय असेल हे समजून घेण्यासाठी, कृपया [येथे](mailto:migration@thegraph.foundation) संपर्क साधा. - -### विकेंद्रित नेटवर्कवर क्वेरी पेमेंट कसे केले जातात?  - -शुल्क साप्ताहिक केले जाते आणि वापरकर्त्याच्या API की मधून काढले जाते, जीआरटीसह जी आरबिट्रमशी जोडली जाते आणि त्यावर बसते. - -### विकेंद्रीकृत नेटवर्कवरील सबग्राफसाठी API की कशा वापरल्या जातात? - -API की वापरकर्त्यांना त्यांनी देय असलेल्या कमाल क्वेरी किमती आणि किंमत, आर्थिक ताजेपणा आणि क्वेरी गती यासारख्या घटकांना प्राधान्य देण्यास सक्षम बनवतात. - -### सेवेच्या गुणवत्तेची सध्या होस्ट केलेली सेवा आणि विकेंद्रित नेटवर्क यांच्यात तुलना कशी होते? - -होस्ट केलेल्या सेवा आणि विकेंद्रित नेटवर्कमध्ये समान मध्यस्थ विलंबता असते, परंतु विकेंद्रीकृत नेटवर्कमध्ये उच्च पर्सेंटाइल्सवर उच्च विलंबता असते. प्रश्नांसाठी 200 दर सामान्यतः समान असतात, दोन्ही > 99.9%. विकेंद्रीकरणाचा परिणाम म्हणून, नेटवर्कला सबग्राफमध्ये व्यापक आउटेज नाही, तर होस्ट केलेल्या सेवेला क्वचित प्रसंगी त्याच्या केंद्रीकृत स्वरूपाचा परिणाम म्हणून तात्पुरते आउटेज होते. - -### माझ्या प्रश्नाचे उत्तर या FAQ द्वारे न मिळाल्यास? - -कोणत्याही अतिरिक्त सहाय्यासाठी कृपया [migration@thegraph.foundation](mailto:migration@thegraph.foundation) शी संपर्क साधा. diff --git a/website/pages/mr/querying/querying-the-hosted-service.mdx b/website/pages/mr/querying/querying-the-hosted-service.mdx deleted file mode 100644 index 51735f3b2ba9..000000000000 --- a/website/pages/mr/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: होस्ट केलेल्या सेवेची चौकशी करत आहे ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -खाली एक उदाहरण दिले आहे, परंतु कृपया सबग्राफच्या घटकांची चौकशी कशी करायची याच्या संपूर्ण संदर्भासाठी [Query API](/querying/graphql-api) पहा. - -## उदाहरण - -ही क्वेरी आमच्या मॅपिंगने तयार केलेल्या सर्व काउंटरची सूची देते. आम्ही फक्त एक तयार केल्यामुळे, परिणामामध्ये फक्त आमचे एक `डिफॉल्ट-काउंटर` असेल: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -काही मुख्य वैशिष्ट्ये खाली तपशीलवार आहेत: - -![एक्सप्लोरर खेळाचे मैदान](/img/explorer-playground.png) diff --git a/website/pages/nl/cookbook/quick-start.mdx b/website/pages/nl/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/nl/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/nl/developing/assemblyscript-api.mdx b/website/pages/nl/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/nl/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/nl/network-transition-faq.mdx b/website/pages/nl/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/nl/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/nl/querying/querying-the-hosted-service.mdx b/website/pages/nl/querying/querying-the-hosted-service.mdx deleted file mode 100644 index f00ff226ce09..000000000000 --- a/website/pages/nl/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Example - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/pl/cookbook/quick-start.mdx b/website/pages/pl/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/pl/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/pl/developing/assemblyscript-api.mdx b/website/pages/pl/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/pl/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/pl/network-transition-faq.mdx b/website/pages/pl/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/pl/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/pl/querying/querying-the-hosted-service.mdx b/website/pages/pl/querying/querying-the-hosted-service.mdx deleted file mode 100644 index f00ff226ce09..000000000000 --- a/website/pages/pl/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Example - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/pt/cookbook/quick-start.mdx b/website/pages/pt/cookbook/quick-start.mdx deleted file mode 100644 index 5198f2fcb2cc..000000000000 --- a/website/pages/pt/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Começo Rápido ---- - -Neste guia, aprenda como inicializar, criar e lançar o seu subgraph ao Subgraph Studio ou ao [serviço hospedado](#hosted-service). - -Tenha certeza de que o seu subgraph indexará dados de uma [rede apoiada](/developing/supported-networks). - -Este guia presume que tem: - -- Um endereço de contrato inteligente na rede da sua escolha -- GRT para a curadoria do seu subgraph -- Uma carteira de criptomoedas - -## 1. Como criar um subgraph no Subgraph Studio - -Conecte a sua carteira ao [Subgraph Studio](https://thegraph.com/studio/). - -Após conectar, pode começar com um clique em "create a subgraph" (criar um subgraph). Selecione a sua rede preferida e clique em Continue. - -## 2. Como instalar o Graph CLI - -O Graph CLI é escrito em JavaScript. Para usá-lo, instale o `npm` ou `yarn`. - -Execute um dos seguintes comandos na sua máquina local: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Como inicializar o seu Subgraph - -> Veja os comandos para o seu subgraph específico na página do subgraph no [Subgraph Studio](https://thegraph.com/studio/). - -Ao inicializar o seu subgraph, a ferramenta CLI pedirá pelas seguintes informações: - -- Protocolo: Escolha o protocolo do qual o subgraph indexará dados -- Slug do subgraph: crie um nome para o seu subgraph. O slug serve como uma identidade para o seu subgraph. -- Diretório onde o subgraph será criado: escolha o seu diretório local -- Rede Ethereum (opcional): é possível que tenha de especificar a rede compatível com EVM de onde o seu subgraph indexará dados -- Endereço de contrato: Localize o endereço do contrato inteligente do qual quer consultar dados -- ABI: Se a ABI não estiver preenchida automaticamente, insira-a manualmente como um arquivo JSON -- Bloco Inicial: Insira o bloco inicial para poupar tempo enquanto o seu subgraph indexa dados da blockchain. O bloco inicial pode ser localizado ao encontrar o bloco onde o seu contrato foi lançado. -- Nome do Contrato: insira o nome do seu contrato -- Indexar eventos de contrato como entidades: é sugerido configurar isto como true, já que ele automaticamente adicionará mapeamentos ao seu subgraph para cada evento emitido -- Adicionar outro contrato (opcional): adicionar outro contrato - -Inicialize o seu subgraph a partir de um contrato existente ao executar o seguinte comando: - -```sh -graph init --studio -``` - -Veja a imagem a seguir para um exemplo do que esperar quando for inicializar o seu subgraph: - -![Comando de subgraph](/img/subgraph-init-example.png) - -## 4. Como escrever o seu Subgraph - -O comando interior cria um subgraph de altura que pode ser usado como ponto de partida para construir o seu subgraph. Enquanto faz mudanças ao subgraph, trabalhará principalmente com três arquivos: - -- Manifest (subgraph.yaml) - O manifest define quais fontes de dados serão indexadas pelos seus subgraphs. -- Schema (schema.graphql) - O schema GraphQL define quais dados deseja retirar do subgraph. -- Mapeamentos em AssemblyScript (mapping.ts) — Este é o código que traduz dados das suas fontes de dados às entidades definidas no schema. - -Para mais informações sobre como criar o seu subgraph, veja [Como Criar um Subgraph](/developing/creating-a-subgraph). - -## 5. Como fazer um lançamento ao Subgraph Studio - -Quando o seu subgraph estiver escrito, execute os seguintes comandos: - -```sh -$ graph codegen -$ graph build -``` - -- Autentique e lance o seu subgraph. A chave de lançamento (deploy key) pode ser encontrada na página "Subgraph" do Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -Há de inserir um rótulo de versão. É altamente recomendado usar o [semver](https://semver.org/) para versionamentos, como `0.0.1`. Dito isto, dá para escolher qualquer string como versão, por exemplo: `v1`, `version1`, `asdf`. - -## 6. Como testar o seu subgraph - -Podes testar o seu subgraph ao fazer um exemplo de query na secção do playground. - -Os logs dirão-lhe se há quaisquer erros com o seu subgraph. Os logs de um subgraph operacional parecerão com isto: - -![Logs de subgraph](/img/subgraph-logs-image.png) - -Se o seu subgraph continuar a falhar, consulte a saúde do subgraph com o `GraphiQL Playground`. Note que dá para usar a consulta abaixo e inserir sua ID de lançamento para seu subgraph. Neste caso, `Qm...` é a ID de lançamento (na página Subgraph sob **Details**). O texto abaixo te dirá quando um subgraph falha para que você possa fazer o debug de acordo: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Como Publicar um Subgraph na Rede Descentralizada do The Graph - -Quando o seu subgraph for lançado ao Subgraph Studio, estiver testado, e estiver pronto para produção, pode então ser editado na rede descentralizada. - -No Subgraph Studio, clique no seu subgraph. Na página do subgraph, clique no botão Publish (editar) no canto superior direito. - -Selecione a rede onde quer editar o seu subgraph. É recomendado editar subgraphs no Arbitrum One, para aproveitar as [transações mais rápidas e custos menores de gas](/arbitrum/arbitrum-faq). - -Antes de poder consultar o seu subgraph, os Indexadores precisam começar a servir queries nele. O processo fica mais simples se curares o seu próprio subgraph com GRT. - -Até o fechamento deste texto, é recomendado que cure o seu próprio subgraph com 10.000 GRT para garantir que ele seja indexado e aberto a queries o mais rápido possível. - -Para poupar custos de gas, cure o seu subgraph na mesma transação em que ele foi publicado, ao selecionar este botão quando publicar o seu subgraph na rede descentralizada do The Graph: - -![Publicação de subgraph](/img/publish-and-signal-tx.png) - -## 8. Como consultar o seu subgraph - -Agora, podes consultar o seu subgraph com o envio de queries GraphQL para o URL de Consulta do seu subgraph, que pode ser visto ao clicar no botão Query (consultas). - -Caso não tenha a sua chave API, pode fazer um query do seu dApp pelo URL de consulta temporária, grátis e com rate-limit, que pode ser usado para desenvolvimento e encenação. - -Para mais informações sobre a consulta de dados do seu subgraph, leia mais [aqui](../querying/querying-the-graph/). diff --git a/website/pages/pt/developing/assemblyscript-api.mdx b/website/pages/pt/developing/assemblyscript-api.mdx deleted file mode 100644 index 914955277955..000000000000 --- a/website/pages/pt/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: API AssemblyScript ---- - -> Nota: Se criou um subgraph antes da versão `0.22.0` do `graph-cli`/`graph-ts`, está a usar uma versão mais antiga do AssemblyScript. Favor conferir o [`Guia de Migração`](/release-notes/assemblyscript-migration-guide) - -Esta página documenta quais APIs embutidas podem ser usadas ao escrever mapeamentos de subgraph. Há dois tipos de API disponíveis do início: - -- a [biblioteca Graph TypeScript](https://github.com/graphprotocol/graph-ts) (`graph-ts`) e -- código gerado a partir dos arquivos do subgraph por `graph codegen`. - -Também é possível adicionar outras bibliotecas como dependências, desde que sejam compatíveis com o [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Como esta é a linguagem na qual são escritos os mapeamentos, a [wiki do AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki) é uma boa referência para a linguagem e as características comuns das bibliotecas. - -## Instalação - -Subgraphs criados com o [`graph init`](/developing/creating-a-subgraph) vêm com dependências pré-configuradas. Para instalar estas dependências, é só executar um dos seguintes comandos: - -```sh -yarn install # Yarn -npm install # NPM -``` - -Se o subgraph for criado do zero, um dos seguintes dois comandos instalará a biblioteca Graph TypeScript como uma dependência: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## Referência da API - -A biblioteca `@graphprotocol/graph-ts` providencia as seguintes APIs: - -- Uma API `ethereum` para trabalhar com contratos inteligentes, eventos, blocos, transações, e valores no Ethereum. -- Uma API `store` para carregar e guardar entidades dentro e fora do armazenamento do Graph Node. -- Uma API `log` para gravar mensagens ao resultado do Graph Node e ao Graph Explorer. -- Uma API `json` para carregar arquivos do IPFS. -- Uma API `json` para analisar dados em JSON. -- Uma API `crypto` para usar funções criptográficas. -- Primitivos de baixo nível para traduzir entre sistemas de tipos diferentes, como Ethereum, JSON, GraphQL e AssemblyScript. - -### Versões - -No manifest do subgraph, `apiVersion` especifica a versão da API de mapeamento, executada pelo Graph Node para um dado subgraph. A versão atual da API de mapeamento é 0.0.6. - -| Versão | Notas de atualização | -| :-: | --- | -| 0.0.7 | Classes `TransactionReceipt` e `Log` adicionadas aos tipos do Ethereum
    Campo `receipt` adicionado ao objeto Ethereum Event | -| 0.0.6 | Campo `nonce` adicionado ao objeto Ethereum Transaction
    Campo `baseFeePerGas` adicionado ao objeto Ethereum Block | -| 0.0.5 | AssemblyScript atualizado à versão 0.19.10 (inclui mudanças recentes, favor ler o [`Guia de Migração`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renomeado para `ethereum.transaction.gasLimit` | -| 0.0.4 | Campo `fucntionSignature` adicionado ao objeto Ethereum SmartContractCall | -| 0.0.3 | Campo `from` adicionado ao objeto Ethereum Call
    `etherem.call.address` renomeado para `ethereum.call.to` | -| 0.0.2 | Campo `input` adicionado ao objeto Ethereum Transaction | - -### Tipos Embutidos - -A documentação sobre os tipos de base embutidos no AssemblyScript está na [wiki do AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -Os seguintes tipos adicionais são fornecidos pelo `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` representa um arranjo de `u8`. - -_Construção_ - -- `fromI32(x: i32): ByteArray` - Decompõe `x` em bytes. -- `fromHexString(hex: string): ByteArray` — O comprimento da entrada deve ser par. É facultativo prefixar com `0x`. - -_Conversões de tipo_ - -- `toHexString(): string` — Converte numa cadeia de caracteres hex prefixada com `0x`. -- `toString(): string` — Interpreta os bytes como uma cadeia de caracteres UTF-8. -- `toBase58(): string` — Codifica os bytes como uma cadeia base58. -- `toU32(): u32` — Interpreta os bytes como um `u32` little-endian. Dá um erro em caso de overflow. -- `toI32(): i32` - Interpreta o arranjo de byte como um `i32` little-endian. Dá erro em caso de overflow. - -_Operadores_ - -- `equals(y: ByteArray): bool` — pode ser escrito como `x == y`. -- `concat(other: ByteArray) : ByteArray` — retorna um novo `ByteArray` que consiste de `this` diretamente seguido de `other` -- `concatI32(other: i32) : ByteArray` — retorna um novo `ByteArray` que consiste de `this` diretamente seguido pela representação em byte de `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -O `BigDecimal` é usado para representar decimais de precisão arbitrária. - -> Nota: [Internalmente,](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) o `BigDecimal` é armazenado no [formato de ponto flutuante IEEE-754 decimal128](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), que apoia 34 dígitos decimais de significando. Portanto, o `BigDecimal` não serve para representar tipos de ponto fixo que possam exceder 34 dígitos, como um [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) em Solidity ou equivalente. - -_Construção_ - -- `constructor(bigInt: BigInt)` – cria um `BigDecimal` de um `BigInt`. -- `static fromString(s: string): BigDecimal` — faz uma análise sintática a partir de uma cadeia decimal. - -_Conversões de tipo_ - -- `toString(): string` — imprime para uma cadeia decimal. - -_Matemática_ - -- `plus(y: BigDecimal): BigDecimal` — pode ser escrito como `x + y`. -- `minus(y: BigDecimal): BigDecimal` — pode ser escrito como `x - y`. -- `times(y: BigDecimal): BigDecimal` — pode ser `x * y`. -- `div(y: BigDecimal): BigDecimal` — pode ser escrito como `x / y`. -- `equals(y: BigDecimal): bool` — pode ser `x == y`. -- `notEqual(y: BigDecimal): bool` — pode ser `x != y`. -- `lt(y: BigDecimal): bool` — pode ser `x < y`. -- `le(y: BigDecimal): bool` — pode ser `x <= y`. -- `gt(y: BigDecimal): bool` — pode ser `x > y`. -- `ge(y: BigDecimal): bool` — pode ser `x >= y`. -- `neg(): BigDecimal` — pode ser `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -O `BigInt` é usado para representar números inteiros grandes, inclusive valores em Ethereum de `uint32` até `uint256`, e `int64` até `int256`. Tudo abaixo de `uint32`, como o `int32`, `uint24` ou `int8` é representado como `i32`. - -A classe `BigInt` tem a seguinte API: - -_Construção_ - -- `BigInt.fromI32(x: i32): BigInt` – cria um `BigInt` de um `i32`. -- `BigInt.fromString(s: string): BigInt`– Analisa um `BigInt` de uma cadeia. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` — Interpreta `bytes` como um inteiro little-endian, não assinado. Se a sua entrada for big-endian, chame pelo `.reverse()` primeiro. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` — Interpreta `bytes` como um inteiro little-endian, assinado. Se a sua entrada for big-endian, chame pelo `.reverse()` primeiro. - - _Conversões de tipo_ - -- `x.toHex(): string` — transforma o `BigInt` numa cadeia de caracteres hexadecimais. -- `x.toString(): string` — transforma o `BigInt` numa cadeia de números decimais. -- `x.toI32(): i32` — retorna o `BigInt` como um `i32`; falha se o valor não couber no `i32`. É bom verificar o `x.isI32()` primeiro. -- `x.toBigDecimal(): BigDecimal` — converte num decimal sem fracionário. - -_Matemática_ - -- `x.plus(y: BigInt): BigInt` — pode ser escrito como `x + y`. -- `x.minus(y: BigInt): BigInt` — pode ser escrito como `x - y`. -- `x.times(y: BigInt): BigInt` — pode ser escrito como `x * y`. -- `x.div(y: BigInt): BigInt` — pode ser `x / y`. -- `x.mod(y: BigInt): BigInt` — pode ser `x % y`. -- `x.equals(y: BigInt): bool` — pode ser `x == y`. -- `x.notEqual(y: BigInt): bool` — pode ser `x != y`. -- `x.lt(y: BigInt): bool` — pode ser `x < y`. -- `x.le(y: BigInt): bool` — pode ser `x <= y`. -- `x.gt(y: BigInt): bool` — pode ser `x > y`. -- `x.ge(y: BigInt): bool` — pode ser `x >= y`. -- `x.neg(): BigInt` — pode ser `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` — divide por um decimal, e dá um resultado decimal. -- `x.isZero(): bool` — Conveniência para conferir se o número é zero. -- `x.isl32(): bool` — Confere se o número cabe em um `i32`. -- `x.abs(): BigInt` — Valor absoluto. -- `x.pow(exp: u8): BigInt` — Exponenciação. -- `bitOr(x: BigInt, y: BigInt): BigInt` — pode ser `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` — pode ser `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` — pode ser `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` — pode ser `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -O `TypedMap` pode servir para armazenar pares de chave-valor. Confira [este exemplo](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -A classe `TypedMap` tem a seguinte API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` — coloca o valor do `key` como `value` -- `map.getEntry(key: K): TypedMapEntry | null` — retorna o par de valor-chave para um `key` ou `null` se o `key` não existir no mapa -- `map.get(key: K): V | null` — retorna o valor para um `key` ou `null` se o `key` não existir no mapa -- `map.isSet(key: K): bool` — retorna `true` se o `key` existir no mapa e `false` se não existir - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -O `Bytes` serve para representar arranjos de comprimento arbitrário de bytes. Isto inclui valores do Ethereum do tipo `bytes`, `bytes32`, etc. - -A classe `Bytes` extende o [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) do AssemblyScript. Isto apoia toda a funcionalidade `Uint8Array`, além dos novos métodos a seguir: - -_Construção_ - -- `fromHexString(hex: string) : Bytes` — Converte a cadeia `hex`, que deve consistir de um número par de dígitos hexadecimais para um `ByteArray`. Opcionalmente, a cadeia `hex` pode começar com `0x` -- `fromI32(i: i32) : Bytes` - Converte o `i` em um arranjo de bytes - -_Conversões de tipo_ - -- `b.toHex()` — retorna uma cadeia hexadecimal que representa os bytes no arranjo -- `b.toString()` — converte os bytes no arranjo para uma cadeia de caracteres em unicode -- `b.toBase58()` — transforma um valor de Ethereum Bytes numa codificação base58 (usado para hashes IPFS) - -_Operadores_ - -- `b.concat(other: Bytes) : Bytes` - - retorna um novo `Bytes` que consiste de `this` diretamente seguido por `other` -- `b.concatI32(other: i32) : ByteArray` — retorna um novo `Bytes` consistindo de `this` diretamente seguido pela representação em byte de `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` estende o `Bytes` para representar valores de `address` do Ethereum. - -Ele adiciona o seguinte método em cima da API `Bytes`: - -- `Address.fromString(s: string): Address` — cria um `Address` a partir de uma cadeia hexadecimal -- `Address.fromBytes(b: Bytes): Address` — cria um `Address` a partir do `b`, que deve ter o comprimento exato de 20 bytes. Preencher um valor com menos ou mais bytes causará um erro - -### Armazenamento da API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -A API `store` permite carregar, salvar e remover entidades do/para o armazenamento do Graph Node. - -As entidades escritas no armazenamento mapeam um-por-um com os tipos de `@entity` definidos no schema GraphQL do subgraph. Para trabalhar com estas entidades de forma conveniente, o comando `graph codegen` fornecido pelo [Graph CLI](https://github.com/graphprotocol/graph-cli) gera classes de entidades, que são subclasses do tipo embutido `Entity`, com getters e setters para os campos no schema e métodos para carregar e salvar estas entidades. - -#### Como criar entidades - -Este é um padrão comum para a criação de entidades de eventos do Ethereum. - -```typescript -// Importar a classe de evento de transferência gerada da ABI ERC20 -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Importar o tipo de entidade de transferência gerado do schema do GraphQL -import { Transfer } from '../generated/schema' - -// Handler de evento de transferência -export function handleTransfer(event: TransferEvent): void { - // Criar uma entidade de Transferência, usando o hash da transação como a ID da entidade - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Determinar propriedades na entidade, usando os parâmetros do evento - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Salvar a entidade no armazenamento - transfer.save() -} -``` - -Quando um evento `Transfer` é encontrado durante o processamento da chain, ele é passado para o handler de evento `handleTransfer` com o tipo `Transfer` gerado (apelidado de `TransferEvent` aqui, para evitar confusões com o tipo de entidade). Este tipo permite o acesso a dados como a transação parente do evento e seus parâmetros. - -Cada entidade deve ter um ID única para evitar colisões com outras entidades. É bem comum que parâmetros de eventos incluam um identificador único a ser usado. Nota: usar o mesmo hash de transação como ID presume que nenhum outro evento na mesma transação criará entidades a usar este hash como o ID. - -#### Como carregar entidades a partir do armazenamento - -Se uma entidade já existe, ela pode ser carregada do armazenamento com os seguintes comandos: - -```typescript -let id = event.transaction.hash // ou como a ID for construída -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use a entidade Transfer como antes -``` - -Como a entidade pode ainda não existir no armazenamento, o método `load` retorna um valor de tipo `Transfer | null`. Portanto, é bom prestar atenção ao caso `null` antes de usar o valor. - -> **Nota:** Só é necessário carregar entidades se as mudanças feitas no mapeamento dependem dos dados anteriores de uma entidade. Veja a próxima seção para ver as duas maneiras de atualizar entidades existentes. - -#### Como consultar entidades criadas dentro de um bloco - -Desde o `graph-node` v0.31.0, o `@graphprotocol/graph-ts` v0.30.0 e o `@graphprotocol/graph-cli` v0.49.0, o método `loadInBlock` está disponível em todos os tipos de entidade. - -A API do armazenamento facilita o resgate de entidades que foram criadas ou atualizadas no bloco atual. Um caso comum: um handler cria uma Transação de algum evento on-chain, e um handler seguinte quer acessar esta transação caso ela exista. Se a transação não existe, o subgraph deve acessar o banco de dados para descobrir que a entidade não existe; se o autor do subgraph já souber que a entidade deve ter sido criada no mesmo bloco, o uso do loadInBlock evita esta volta pelo banco de dados. Para alguns subgraphs, estas consultas perdidas podem contribuir muito para o tempo de indexação. - -```typescript -let id = event.transaction.hash // ou como a ID for construída -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use a entidade Transfer como antes -``` - -> Nota: se não houver nenhuma entidade criada no bloco dado, o `loadInBlock` retornará um `null` mesmo se houver uma entidade com o ID dado no armazenamento. - -#### Como buscar entidades derivadas - -A partir da versão 0.31.0 do `graph-node`, `@graphprotocol/graph-ts` v0.31.0 e a versão 0.51.0 do `@graphprotocol/graph-cli`, está disponível o método `loadRelated`. - -Isto permite o carregamento de campos de entidade derivada a partir de um event handler. Por exemplo, considerando o schema a seguir: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -O código a seguir carregará a entidade `Token` de que foi derivada a entidade `Holder`: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Como atualizar entidades existentes - -Há duas maneiras de atualizar uma entidade existente: - -1. Carregar a entidade com, por ex., `Transfer.load(id)`, determinar as propriedades da entidade, e então usar o `.save()` para colocá-la no armazenamento. -2. Simplesmente criar a entidade com, por ex., `new Transfer(id)`, determinar as propriedades da entidade, e depois colocá-la no armazenamento com `.save()`. Se a entidade já existir, as mudanças serão integradas a ela. - -Geralmente é simples mudar propriedades, graças aos setters de propriedade gerados: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -Também é possível cancelar propriedades com uma das seguintes instruções: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -Isto só funciona com propriedades opcionais; por ex., propriedades declaradas sem um `!` no GraphQL. Dois exemplos seriam `owner: Bytes` ou `amount: BigInt`. - -Atualizar propriedades de arranjos é um processo um pouco mais envolvido, pois pegar um arranjo de uma entidade cria uma cópia deste mesmo arranjo. Isto significa que as propriedades de arranjos devem ser impostas explicitamente após mudar um arranjo. O seguinte assume que o `entity` tem um campo `numbers: [BigInt!]!`. - -```typescript -// Isto não funcionará -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// Isto funcionará -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Como remover entidades do armazenamento - -Atualmente, não há como remover uma entidade através dos tipos gerados. Em vez disto, o processo requer a passagem do ID da entidade e do nome do tipo da mesma ao `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### API do Ethereum - -A API do Ethereum fornece acesso a contratos inteligentes, variáveis de estado público, funções de contrato, eventos, transações, blocos e a codificação/decodificação de dados no Ethereum. - -#### Apoio para Tipos no Ethereum - -Assim como em entidades, o `graph codegen` gera classes para todos os contratos inteligentes e eventos usados em um subgraph. Para isto, as ABIs dos contratos devem ser parte da fonte de dados no manifest do subgraph. Tipicamente, os arquivos da ABI são armazenados em uma pasta `abis/`. - -Com as classes geradas, conversões entre tipos no Ethereum e os [tipos embutidos](#built-in-types) acontecem em segundo plano para que os autores de subgraphs não precisem se preocupar com elas. - -Veja um exemplo a seguir. Considerando um schema de subgraph como - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -e uma assinatura de evento `Transfer(address,address,uint256)` na Ethereum, os valores `from`, `to` e `amount` do tipo `address`, `address` and `uint256` são convertidos para `Address` and `BigInt`, o que permite que sejam passados para as propriedades `Bytes!` and `BigInt!` da entidade `Transfer`: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Eventos e Dados de Blocos/Transações - -Eventos de Ethereum passados para handlers de eventos, como o evento `Transfer` nos exemplos anteriores, não só permitem acessar os parâmetros de evento, mas também sua transação parente e o bloco de qual fazem parte. Os seguintes dados podem ser obtidos de instâncias `event` (estas classes são parte do módulo `ethereum` no `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Acesso ao Estado do Contrato Inteligente - -O código gerado pelo `graph codegen` também inclui classes para os contratos inteligentes usados no subgraph. Estes servem para acessar variáveis de estado público e funções de chamada do contrato no bloco atual. - -É comum acessar o contrato de qual origina um evento. Isto é feito com o seguinte código: - -```typescript -// Importar a classe do contrato gerado e a classe do evento de transferência gerado -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Ligar o contrato ao endereço que emitiu o evento - let contract = ERC20Contract.bind(event.address) - - // Acessar variáveis e funções de estado fazendo chamadas - let erc20Symbol = contract.symbol() -} -``` - -O `Transfer` é apelidado de `TransferEvent` aqui para evitar confusões de nomenclatura com o tipo da entidade - -Enquanto o `ERC20Contract` no Ethereum tiver uma função pública de apenas-leitura chamada `symbol`, ele pode ser chamado com o `.symbol()`. Para variáveis de estado público, um método com o mesmo nome é criado automaticamente. - -Qualquer outro contrato que seja parte do subgraph pode ser importado do código gerado e ligado a um endereço válido. - -#### Como Lidar com Chamadas Revertidas - -Se os métodos de apenas-leitura do seu contrato forem revertidos, chame o método do contrato gerado prefixado com `try_`. Por exemplo, o contrato do Gravity expõe o método `gravatarToOwner`. Este código poderia lidar com uma reversão naquele método: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note que um Graph Node conectado a um cliente Geth ou Infura pode não detectar todas as reversões; se depender disto, recomendamos usar um Graph Node conectado a um cliente Parity. - -#### ABI de Codificação/Decodificação - -Dados podem ser codificados e decodificados conforme o formato de codificação da ABI do Ethereum, através das funções `encode` e `decode` no módulo `ethereum`. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -Para mais informações: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Como codificar/decodificar a [biblioteca/CLI do Rust](https://github.com/rust-ethereum/ethabi) -- Um [exemplo mais complexo](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### API de Logging - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -A API `log` permite que os subgraphs gravem informações à saída padrão do Graph Node, assim como ao Graph Explorer. Mensagens podem ser gravadas com níveis diferentes de log. É fornecida uma sintaxe básica de formatação de strings para compor mensagens de log do argumento. - -A API `log` inclui as seguintes funções: - -- `log.debug(fmt: string, args: Array): void` — loga uma mensagem de debug. -- `log.info(fmt: string, args: Array): void` — loga uma mensagem informativa. -- `log.warning(fmt: string, args: Array): void` — loga um aviso. -- `log.error(fmt: string, args: Array): void` — loga uma mensagem de erro. -- `log.critical(fmt: string, args: Array): void` — loga uma mensagem crítica _e_ encerra o subgraph. - -A API `log` toma um string de formato e um arranjo de valores de string. Ele então substitui os temporários com os valores de strings do arranjo. O primeiro `{}` temporário é substituído pelo primeiro valor no arranjo, o segundo `{}` temporário é substituído pelo segundo valor, e assim por diante. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Como logar um ou mais valores - -##### Como logar um único valor - -No exemplo abaixo, o valor de string "A" é passado a um arranjo para tornar-se `['A']` antes de ser registado no log: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Mostra : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Como logar uma única entrada de um arranjo existente - -No exemplo abaixo, só é logado o primeiro valor do arranjo do argumento, apesar de haver três valores no arranjo. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Apesar de três valores serem passados ao `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Como logar várias entradas de um arranjo existente - -Cada entrada no arranjo dos argumentos exige o seu próprio `{}` no string de mensagens de log. O exemplo abaixo contém três `{}` temporários na mensagem de log. Por causa disto, são logados todos os três valores no `myArray`. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Mostra : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Como logar uma entrada específica de um arranjo existente - -Para mostrar um valor específico no arranjo, forneça o valor indexado. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Mostra : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Como logar informações de eventos - -O exemplo abaixo loga o número do bloco, hash do bloco e o hash da transação de um evento: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### API do IPFS - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Contratos inteligentes ocasionalmente ancoram arquivos IPFS on-chain. Assim, os mapeamentos obtém os hashes IPFS do contrato e lêem os arquivos correspondentes do IPFS. Os dados dos arquivos serão retornados como `Bytes`, o que costuma exigir mais processamento; por ex., com a API `jason` documentada mais abaixo nesta página. - -Considerando um hash ou local IPFS, um arquivo do IPFS é lido da seguinte maneira: - -```typescript -// Coloque isto dentro de um handler de evento no mapeamento -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Locais como `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// que incluem arquivos em diretorias também são apoiados -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Nota:** O `ipfs.cat` não é determinístico no momento. Se o arquivo não puder ser retirado sobre a rede IPFS antes do tempo do pedido acabar, ele retornará um `null`. Com isto, sempre vale a pena procurar o `null` no resultado. - -Também é possível processar arquivos maiores em streaming com o `ipfs.map`. A função espera o hash ou local de um arquivo IPFS, o nome de um callback, e flags para modificar o seu comportamento: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // Ver a documentação do JSONValue para detalhes sobre - // como lidar com valores JSON - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks também podem criar entidades - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Coloque isto dentro de um handler de evento no mapeamento -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Como alternativa, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -O único flag atualmente apoiado é o `json`, que deve ser passado ao `ipfs.map`. Com o flag `json`, o arquivo IPFS deve consistir de uma série de valores JSON, com um valor por linha. Chamar `ipfs.map`, irá ler cada linha no arquivo, desserializá-lo em um `JSONValue`, e chamar o callback para cada linha. O callback pode então armazenar dados do `JSONValue` com operações de entidade. As mudanças na entidade só serão armazenadas quando o handler que chamou o `ipfs.map` concluir com sucesso; enquanto isso, elas ficam na memória, e o tamanho do arquivo que o `ipfs.map` pode processar é então limitado. - -Em caso de sucesso, o `ipfs.map` retorna `void`. Se qualquer invocação do callback causar um erro, o handler que invocou o `ipfs.map` é abortado, e o subgraph é marcado como falho. - -### API de Criptografia - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -A API `crypto` disponibiliza funções criptográficas para uso em mapeamentos. No momento, apenas um está disponível: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### API JSON - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -Dados em JSON podem ser analisados usando a API `json`: - -- `json.fromBytes(data: Bytes): JSONValue` — analisa dados JSON de um arranjo `Bytes` interpretado como uma sequência válida de UTF-8 -- `json.try_fromBytes(data: Bytes): Result` — versão segura do `json.fromBytes`, retorna um erro se houver falha no parsing -- `json.fromString(data: string): JSONValue` — faz parsing de dados JSON de um `String` em UTF-8 válido -- `json.try_fromString(data: string): Result` — versão segura do `json.fromString`, retorna um erro se houver falha no parsing - -A classe `JSONValue` fornece uma maneira de retirar valores de um documento JSON arbitrário. Como valores JSON podem ser booleans, números, arranjos e mais, o `JSONValue` vem com uma propriedade `kind` para conferir o tipo de um valor: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -Além disso, há um método para conferir se o valor é `null`: - -- `value.isNull(): boolean` - -Quando o tipo de um valor é confirmado, ele pode ser convertido num [tipo embutido](#built-in-types) usando um dos seguintes métodos: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` — (e depois converter o `JSONValue` com um dos 5 métodos acima) - -### Referência de Conversões de Tipos - -| Fonte(s) | Destino | Função de conversão | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | nenhum | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() ou s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (assinado) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (não assinado) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() ou s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | nenhum | -| int32 | i32 | nenhum | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | nenhum | -| int64 - int256 | BigInt | nenhum | -| uint32 - uint256 | BigInt | nenhum | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Arranjo | s.toArray() | -| JSON | Objeto | s.toObject() | -| String | Endereço | Address.fromString(s) | -| Bytes | Endereço | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Metadados de Fontes de Dados - -É possível inspecionar o endereço do contrato, a rede, e o contexto das fontes de dados que invocaram o handler através do namespace `dataSource`: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entidade e DataSourceContext - -A classe base `Entity` e a subclasse `DataSourceContext` têm helpers para determinar e conseguir campos de forma dinâmica: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Problemas Comuns no AssemblyScript - -É comum encontrar certos problemas no [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) durante o desenvolvimento do subgraph. Eles variam em dificuldade de debug, mas ter consciência deles é útil. A seguir, uma lista não exaustiva destes problemas: - -- Variáveis de classe `Private` não são aplicadas no [AssemblyScript](https://www.assemblyscript.org/status.html#language-features). Não há como evitar que estas variáveis sejam alteradas diretamente a partir do objeto de classe. -- O escopo não é herdado em [funções de closure](https://www.assemblyscript.org/status.html#on-closures), por ex., não é possível usar variáveis declaradas fora de funções de closure. Há uma explicação [neste vídeo](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/pt/network-transition-faq.mdx b/website/pages/pt/network-transition-faq.mdx deleted file mode 100644 index 2d94e38edb46..000000000000 --- a/website/pages/pt/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: 'Perguntas Frequentes: Transição de Redes' ---- - -Os programadores terão bastante tempo para migrar os seus subgraphs à rede descentralizada. As linhas de tempo exatas variam entre redes, com base na prontidão da rede e do Indexador — o serviço hospedado não encerrará o seu apoio para todas as redes de uma vez, e o seu encerramento não será abrupto. - -Cada rede no serviço hospedado, inclusive Ethereum, será encerrada gradualmente conforme for apoiada na rede descentralizada, para alcançar a paridade de recursos e alta qualidade de serviço. Isto acontecerá em uma base de rede a rede, com ajuda dos Indexadores no [programa de MIPs](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), para permitir apoio total para cada rede na rede descentralizada. - -Para mais esclarecimentos em torno do apoio continuado para cada rede no serviço hospedado, estas perguntas frequentes respondem perguntas comuns sobre as especificações do processo de transição de redes. Se quiser começar o processo de migração de subgraph agora, aqui está um [guia passo a passo](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). Para pular para as perguntas frequentes da migração, [clique aqui](#migration-faqs). - -## Perguntas Frequentes: Fim do Serviço Hospedado - -### Eu terei que migrar o meu subgraph antes da rede descentralizada servir funcionalidades importantes para subgraphs? - -Os programadores de subgraph podem começar a migrar os seus subgraphs da mainnet Ethereum agora, mas não serão obrigados a migrá-los à rede antes da funcionalidade central de recursos chegar à rede descentralizada e ao serviço hospedado. A migração de subgraphs na rede Gnosis também começará em breve, com outras redes em seguida, após os Indexadores testarem as redes e estiverem prontos para indexá-las na produção. - -### Qual é a linha do tempo e o processo para a depreciação do serviço hospedado? - -Todas as redes terão as suas próprias linhas do tempo, a depender de quando serão ativadas na rede e o tempo estimado para passar por cada fase. Os programadores centrais estão, com muito esforço, a migrar a maioria do tráfego do serviço hospedado à rede descentralizada o mais rápido possível. - -O mais importante, não haverá perda de acesso ao serviço hospedado antes da funcionalidade central ficar disponível para o seu subgraph específico, ou rede específica, na rede descentralizada. - -As três fases distintas da depreciação do serviço hospedado para cada rede são: - -#### Fase 1 (Raio de Sol): Desativar a criação de novos subgraphs para blockchains que têm paridade de qualidade na rede - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No momento, nenhuma rede começou a Fase 1 da transição à rede descentralizada. - -À medida que as redes entram na Fase 1, perceba que os programadores ainda podem usar o URL de Prévia (com rate limit) no Subgraph Studio para programar e testar os seus subgraphs (até 1.000 queries gratuitos) sem adquirir GRT ou interagir com a economia do protocolo. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -Não há prazos exatos para quando alguma rede moverá a esta fase, já que o processo é movido por critérios de saída em torno de funcionalidades centrais, e não datas. - -#### Fase 3 (Nascer do Sol): Desativar queries de subgraphs - -Nesta fase, os subgraphs no serviço hospedado para redes apoiadas pela Graph Network deixarão de processar queries. Só haverá como consultar dados na blockchain para subgraphs em redes, nesta fase, pela rede descentralizada. Os queries de teste ainda poderão ser feitos no [Subgraph Studio](https://thegraph.com/studio/) pelo URL de Queries de Teste. - -As redes não entrarão na Fase 3 até entrar na Fase 2 com êxito, para que os programadores tenham tempo para migrar à rede descentralizada. - -![gráfico de Subgraphs](/img/subgraph-chart.png) - -> Nota: Este diagrama reflete o processo de encerramento por rede. Os tempos de encerramento no serviço hospedado variarão e as redes não serão encerradas todas de uma vez. - -### O que acontece com redes de teste como Goerli, Mumbai, etc.? - -Todas as redes, e redes de teste, têm direito a um URL de Queries de Teste no [Subgraph Studio](https://thegraph.com/studio/). Este URL tem rate limit e deve ser usado para testes e programação. O tráfego da produção exigirá um subgraph editado na Graph Network para poder ter redundância e estabilidade em nível de produção. - -![Rate limit](/img/rate-limit.png) - -### A Graph Network precisa ter as mesmas funcionalidades do serviço hospedado? - -Os Indexadores na Graph Network executam o [lançamento do Graph Node](https://github.com/graphprotocol/graph-node/releases) mais recente e aprovado pela rede, e pode apoiar quaisquer recursos de subgraph apoiados nesse lançamento. - -Às vezes, funções inéditas ainda em progresso podem ser disponibilizadas primeiro no URL de Prévia para Programadores, que executa o último commit principal do [Graph Node](https://github.com/graphprotocol/graph-node). Estas funções então serão disponibilizadas na rede com o próximo lançamento do Graph Node. - -Certas funções de subgraph não têm direito a recompensas de indexação, se não forem determinísticas ou verificáveis na rede. Por exemplo: o retiro de arquivos do IPFS, e a indexação de redes ainda não apoiadas na Graph Network. - -Subgraphs com estas funções ainda podem ser editados à rede, mas podem não ser visíveis a Indexadores. Porém, subgraphs com sinais suficientes ainda podem atrair Indexadores interessados em resgatar taxas de query, às quais qualquer subgraph tem direito. - -### Quanto a Graph Network custa, em comparação a executar a minha própria infraestrutura? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Devo fazer algo com o meu subgraph no serviço hospedado após migrar à rede? - -É bom esconder o seu subgraph no serviço hospedado, para evitar confusões. [Este guia](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) descreve o processo. - -### Quando a rede descentralizada apoiará a minha rede preferida? - -Não há prazos definidos para redes; estes serão ditados pela prontidão do Indexador através do [programa de MIPs](https://thegraph.com/migration-incentive-program/), onde os Indexadores testarão novas redes. À medida que novas redes são apoiadas, os utilizadores receberão notificações amplas para se prepararem para a migração. Os programadores e contribuidores centrais ao ecossistema do The Graph estão a trabalhar duro para implementar o apoio a mais redes o mais rápido possível. - -### A mainnet Ethereum está na Fase 1 do processo de transição de rede? - -Enquanto esperava-se que a Ethereum começaria a sair do serviço hospedado até o fim do terceiro trimestre de 2022, isto foi [adiado](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) para cuidar do feedback dos usuários. O prazo da transição da Ethereum será definido por mais melhorias à experiência do utilizador, cobranças, e outros atendimentos de pedidos de utilizadores. Atualize-se sobre quando a Ethereum entrará na fase Raio de Sol através do rastreador do estado da integração abaixo, e através do [Twitter do The Graph.](https://twitter.com/graphprotocol) - -### Rastreador do estado da integração da Graph Network - -A tábua abaixo ilustra onde cada rede está no processo de integração. Se a sua rede preferida ainda não está listada, significa que a integração ainda não começou, e que aquela rede ainda é apoiada por completo pelo serviço hospedado do The Graph. - -> Esta tábua não incluirá redes de teste, que permanecem gratuitas no [Subgraph Studio](https://thegraph.com/studio/). - -| Rede | Anúncio de integração na Graph Network | Integração de rede completa | Fase 1: Desativar novos subgraphs no serviço hospedado | Phase 2: disable subgraph updates on hosted service | Fase 3: Desativar novos subgraphs no serviço hospedado | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* A rede está em beta na rede descentralizada do The Graph. - -## Perguntas Frequentes de Taxas de Consulta, Chaves de API e Cobranças - -### Como são determinados os preços de taxas de query? - -As taxas de query são impactadas pela demanda por queries na rede descentralizada. Os programadores centrais criaram um modelo de precificação de consultas chamado [Agora](https://github.com/graphprotocol/agora), que permite que os Indexadores precifiquem os seus queries com eficiência. Leia mais na [documentação do Agora](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### Como posso configurar um orçamento máximo de queries? - -Os utilizadores podem configurar um orçamento máximo de consultas na seção [API Key](https://thegraph.com/studio/apikeys/) do Subgraph Studio, na aba Budget. [Assista este vídeo](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) para um resumo desse processo, além de como ajustar outras partes da sua chave de API. - -Perceba que configurar um valor pequeno para o seu orçamento máximo de queries excluirá os Indexadores, o que pode levar a um serviço de má qualidade por queries falhos ou lentos, entre outros. - -No fim de setembro de 2022, a melhor prática era deixar o menor orçamento máximo de query entre $0.00035-$0.0004. - -### Como posso proteger a minha chave de API? - -Os utilizadores devem restringir a chave de API tanto por subgraph quanto por domínio no [Subgraph Studio](https://thegraph.com/studio/): - -![Restringir domínio](/img/restrictdomain.png) - -### Como posso encher a minha chave de API para pagar por taxas de consulta? - -Pode encher o seu saldo de cobrança no [Billing Dashboard](https://thegraph.com/studio/billing/) do Subgraph Studio no botão "Add GRT". Atualmente, há trabalhos em progresso para melhorar esta experiência, de modo a deixar os pagamentos mais suaves e recorrentes. - -[Este vídeo](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) oferece uma visão geral desse processo. - -### Como determino alertas para saldos de cobranças baixos na minha chave de API? - -Os utilizadores devem determinar um alerta de cobrança no seu endereço eletrónico [aqui](https://thegraph.com/studio/settings/). - -Além disto, um banner aparecerá na interface do utilizador para avisar quando um saldo de cobranças está baixo. - -Quais são as melhores práticas para gestar as minhas configurações de chave de API? - -Um orçamento máximo de queries de $0.0004 serve bem para manter a média dos preços de consulta baixa, além de melhorar a qualidade do serviço. Isto é possível na aba de orçamento de cobranças na [seção de Chaves de API](https://thegraph.com/studio/apikeys/). - -## Perguntas Frequentes: Migração - -### Como posso migrar o meu subgraph à rede descentralizada do The Graph? - -Aprenda como migrar o seu subgraph à Graph Network com este [guia passo a passo simples](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph), ou com [este vídeo](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### O ecossistema do The Graph oferece algum suporte financeiro/técnico/publicitário pelo processo de migração? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### Quanto tempo levam os queries? - -Queries levam, em média, de 150 a 300 milisegundos na rede descentralizada. - -### O processo de cobrança na Graph Network é mais complexo do que no serviço hospedado? - -Sim. A qualidade da UX para a rede ainda não está em par com o serviço hospedado. A UX de cobrança, em particular, ainda está nas suas primeiras fases e há muitas partes em movimento nas quais as equipas de desenvolvimento estão a trabalhar para abstrair do processo. Várias destas melhorias serão reveladas ao público no futuro. - -### Posso pagar os queries da Graph Network em moeda fiduciária, cartão de crédito, ou stablecoins? - -Nos próximos meses, os utilizadores precisarão tomar muito menos passos para pagar pelos seus subgraphs. Enquanto os pagamentos continuarão em GRT, já estão em progresso esforços para implementar um on-ramp fiduciário, e sistemas de pagamento automatizado para converter moeda fiduciária e criptomoedas em GRT a fim de fazer pagamentos recorrentes. - -### A rede ainda terá a mesma UX que o serviço hospedado? - -Enquanto ainda há trabalho a ser feito, a meta é oferecer uma UX na Graph Network comparável, se não melhor do que a existente no serviço hospedado. A curto prazo, miramos uma experiência de cobrança mais suave e previsível, que ajude os utilizadores a dedicar mais tempo à construção de dApps de alto nível. - -### Como posso garantir que o meu subgraph será visto por Indexadores na Graph Network? - -Vale curar com pelo menos 10.000 GRT, o que os utilizadores podem fazer na mesma transação na que editam. Os mesmos também podem pedir à comunidade de curadoria para curarem o seu subgraph [aqui](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Por que um subgraph precisa de um sinal de curadoria? E se não houver sinal suficiente dos curadores no meu subgraph? - -Quanto maior o sinal de curadoria, mais atrativo um subgraph é para Indexadores, já que há uma correlação linear entre sinal maior e recompensas de indexação maiores. Sem a curadoria, não há incentivo para os Indexadores adotarem um subgraph. - -### O que acontece com o GRT que um programador de subgraph usa para o sinal de curadoria? - -Se for o primeiro a sinalizar um subgraph, a sua quantia de GRT sinalizado não diminuirá. O GRT usado para curadoria pode ser removido depois. Além disto, os Curadores ganham 10% de todas as taxas de query recebidas pelos Indexadores. - -### Quais são as melhorias a caminho do processo de curadoria? - -A curto prazo, o modelo inicial de curadoria no Arbitrum permitirá a proteção de princípio ao sinal de curadoria. A longo prazo, os programadores centrais priorizarão a oferta de alugar sinais de curadoria, a fim de abrir uma experiência de precificação mais previsível enquanto garantir que subgraphs sejam indexados o suficiente. - -### Como troco a API do subgraph no front-end? - -Após pelo menos um Indexador ter totalmente indexado um subgraph, um utilizador pode fazer um query para a rede descentralizada. - -Para poder retirar o URL de query para o seu subgraph, pode copiar e colá-lo ao clicar no símbolo próximo ao URL de query. Aparecerá algo parecido com isto: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -É só substituir o [api-key] com uma chave de api gerada na seção [API Key](https://thegraph.com/studio/apikeys/) do Subgraph Studio. - -### Quanto custam os queries? - -O custo médio de queries na rede varia. Em setembro de 2022, o preço normal por taxa de consulta variou de $0.00012 a $0.00020. - -### Como posso descobrir quanto volume o meu subgraph tem e quanto ele vai custar? - -Dados de volume no serviço hospedado não são públicos. Por favor, entre em contacto [aqui](mailto:migration@thegraph.foundation) para receber estimativas de volume e custo. - -### Como o gateway funciona? Ele é totalmente descentralizado? - -O gateway processa queries para que os Indexadores sirvam dApps. Os gateways estão numa fase intermediária, que está num processo progressivo de descentralização. Mais informações em breve. - -## Perguntas Frequentes sobre o Uso da Rede - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### Como posso acelerar o tempo de sincronização? - -Minimize as chamadas de contratos inteligentes dentro do subgraph. Acessar um estado de contrato inteligente exige uma chamada eth_call ao RPC, o que retarda o tempo de sincronização. - -### Há apoio a multisig no Subgraph Studio enquanto eu migro? - -Sim, o apoio a multisigs foi adicionado recentemente. Leia mais informações [aqui](https://thegraph.com/docs/studio/multisig). - -### Quais são os endereços de contrato para o GRT no Ethereum e no Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### Quantos GRT os projetos costumam guardar na sua Chave de API? - -Vários projetos guardam um valor correspondente a 30 – 60 dias em GRT na sua chave de API, para que não precisem recarregar com frequência. Para entender quais seriam as suas taxas de GRT em 30 – 60 dias, por favor entre em contacto [aqui](mailto:migration@thegraph.foundation). - -### Como são feitos os pagamentos de queries na rede descentralizada?  - -As taxas são cobradas semanalmente e retiradas da chave de API de um utilizador, com GRT que é bridgeado, e reside, no Arbitrum. - -### Como as chaves de API são usadas para subgraphs na rede descentralizada? - -As Chaves de API dão aos utilizadores uma voz nos preços máximos de query que pagam, e os permitem priorizar fatores como preço, atualidade económica e velocidade de query. - -### Como a qualidade do serviço se compara atualmente, entre o serviço hospedado e a rede descentralizada? - -O serviço hospedado e a rede descentralizada têm a mesma latência média, mas a rede descentralizada tende a ter mais latência em percentuais maiores. Taxas de 200 por queries tendem a ser semelhantes, com ambas maiores que 99%. Pela sua descentralização, a rede não teve uma queda ampla entre subgraphs, enquanto o serviço hospedado, em raras ocasiões, tem quedas temporárias por sua natureza centralizada. - -### E se a minha pergunta não for respondida neste guia? - -Por favor, entre em contacto com [migration@thegraph.foundation](mailto:migration@thegraph.foundation). diff --git a/website/pages/pt/querying/querying-the-hosted-service.mdx b/website/pages/pt/querying/querying-the-hosted-service.mdx deleted file mode 100644 index 5b7df3a729b7..000000000000 --- a/website/pages/pt/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Queries no Serviço Hospedado ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -Há um exemplo abaixo, mas vale ver a [API de Queries](/querying/graphql-api) para uma referência completa em como fazer queries às entidades do subgraph. - -## Exemplo - -Esta consulta lista todos os counters criados pelo nosso mapeamento. Como só criamos um, o resultado só conterá o nosso único `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Alguns dos recursos principais são detalhados abaixo: - -![Playground do Explorer](/img/explorer-playground.png) diff --git a/website/pages/ro/cookbook/quick-start.mdx b/website/pages/ro/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/ro/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/ro/developing/assemblyscript-api.mdx b/website/pages/ro/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/ro/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/ro/network-transition-faq.mdx b/website/pages/ro/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/ro/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/ro/querying/querying-the-hosted-service.mdx b/website/pages/ro/querying/querying-the-hosted-service.mdx deleted file mode 100644 index f00ff226ce09..000000000000 --- a/website/pages/ro/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Example - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/ru/cookbook/quick-start.mdx b/website/pages/ru/cookbook/quick-start.mdx deleted file mode 100644 index ab07ada260f4..000000000000 --- a/website/pages/ru/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Быстрый старт ---- - -Из этого руководства Вы быстро узнаете, как инициализировать, создать и развернуть свой субграф в Subgraph Studio или [хостинговом сервисе](#hosted-service). - -Убедитесь, что Ваш субграф будет индексировать данные из [поддерживаемой сети](/developing/supported-networks). - -Это руководство написано, исходя из того, что у Вас есть: - -- Адрес смарт-контракта в выбранной Вами сети -- GRT для курирования вашего субграфа -- Криптовалютный кошелек - -## 1. Создание субграфа в Subgraph Studio - -Перейдите в Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) и подключите свой кошелек. - -После подключения Вы можете начать с нажатия кнопки «Создать субграф». Выберите нужную сеть и нажмите «Продолжить». - -## 2. Установка Graph CLI - -Графический интерфейс Graph CLI написан на JavaScript, и для его использования Вам потребуется установить либо `npm`, либо `yarn`. - -Выполните одну из следующих команд на своём локальном компьютере: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Инициализация Вашего Субграфа - -> Вы можете найти команды для своего конкретного субграфа в [Subgraph Studio](https://thegraph.com/studio/) на странице субграфа. - -При инициализации субграфа инструмент CLI запросит у Вас следующую информацию: - -- Протокол: выберите протокол, по которому Ваш субграф будет индексировать данные -- Слаг субграфа: создайте имя для своего субграфа. Ваш слаг субграфа — это идентификатор для Вашего субграфа. -- Директория для создания субграфа: выберите локальную директорию -- Сеть Ethereum (необязательно): Вам может потребоваться указать, из какой сети, совместимой с EVM, ваш субграф будет индексировать данные -- Адрес контракта: найдите адрес смарт-контракта, с которого хотите запросить данные -- ABI: если ABI не заполняется автоматически, Вам нужно будет ввести его вручную как файл JSON -- Стартовый блок: рекомендуется ввести стартовый блок, чтобы сэкономить время, пока Ваш субграф индексирует данные блокчейна. Вы можете найти стартовый блок, найдя блок, в котором был развернут Ваш контракт. -- Имя контракта: введите имя Вашего контракта -- Индексировать события контракта как объекты: рекомендуется установить для этого параметра значение true, поскольку он автоматически добавит сопоставления в Ваш субграф для каждого запускаемого события -- Добавить еще один контракт (опционально): Вы можете добавить еще один контракт - -Инициализируйте свой субграф из существующего контракта, выполнив следующую команду: - -```sh -graph init --studio -``` - -На следующем скриншоте показан пример того, чего следует ожидать при инициализации субграфа: - -![Команда субграфа](/img/subgraph-init-example.png) - -## 4. Создание Вашего субграфа - -Предыдущая команда создала "скелет" субграфа, который Вы можете использовать в качестве отправной точки для построения своего субграфа. При внесении изменений в субграф Вы будете в основном работать с тремя файлами: - -- Манифест (subgraph.yaml) - Манифест определяет, какие источники данных будут индексироваться Вашими субграфами. -- Схема (schema.graphql) - Схема GraphQL определяет, какие данные Вы хотите извлечь из субграфа. -- AssemblyScript Mappings (mapping.ts) - это код, который преобразует данные из ваших источников данных в объекты, определенные в схеме. - -Для получения дополнительной информации о том, как написать свой субграф, см. [Создание субграфа](/developing/creating-a-subgraph). - -## 5. Развертывание в Subgraph Studio - -После того как Ваш субграф будет написан, выполните следующие команды: - -```sh -$ graph codegen -$ graph build -``` - -- Аутентифицируйте и разверните свой субграф. Ключ развертывания можно найти на странице Subgraph в Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -Вам будет предложено ввести метку версии. Настоятельно рекомендуется использовать [semver](https://semver.org/) для управления версиями, например `0.0.1`. При этом, Вы можете выбрать любую строку в качестве версии, например: `v1`, `version1`, `asdf`. - -## 6. Тестирование Вашего субграфа - -Вы можете протестировать свой субграф, осуществив пример запроса в разделе игровой площадки. - -Логи сообщат вам, есть ли какие-либо ошибки с вашим субграфом. Логи рабочего субграфа будут выглядеть следующим образом: - -![Логи субграфа](/img/subgraph-logs-image.png) - -Если Ваш субграф даст сбой, Вы сможете запросить его работоспособность с помощью GraphiQL Playground. Обратите внимание, что Вы сможете использовать приведенный ниже запрос и ввести идентификатор развертывания для своего субграфа. В этом случае `Qm...` — это идентификатор развертывания (который можно найти на странице Субграфа в разделе **Подробности**). Приведенный ниже запрос сообщит Вам, если произойдёт сбой субграфа, благодаря этому Вы сможете соответствующим образом выполнить отладку: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## Публикация субграфа в децентрализованной сети The Graph - -После того как Ваш субграф был развернут в Subgraph Studio, Вы его протестировали и готовы запустить в производство, Вы можете опубликовать его в децентрализованной сети. - -В Subgraph Studio кликните по своему субграфу. На странице субграфа Вы сможете нажать кнопку публикации в правом верхнем углу. - -Выберите сеть, в которой Вы хотели бы опубликовать свой субграф. Рекомендуется публиковать субграфы в Arbitrum One, чтобы воспользоваться преимуществами [более высокой скорости транзакций и снижения затрат на газ](/arbitrum/arbitrum-faq). - -Прежде чем Вы сможете запросить свой субграф, индексаторы должны начать обслуживать запросы к нему. Чтобы упростить этот процесс, Вы можете создать свой собственный субграф, используя GRT. - -На момент написания этой статьи рекомендуется создать собственный субграф с 10 000 GRT, чтобы обеспечить его индексацию и доступность для запросов как можно скорее. - -Чтобы сэкономить на расходах за газ, Вы можете курировать свой субграф в той же транзакции, в которой Вы его опубликовали, нажав эту кнопку при публикации своего субграфа в децентрализованной сети The Graph: - -![Публикация субграфа](/img/publish-and-signal-tx.png) - -## 8. Запрос Вашего Субграфа - -Теперь Вы можете запросить свой субграф, отправив запросы GraphQL на URL-адрес запроса Вашего субграфа, который можно найти, нажав кнопку запроса. - -Вы можете сделать запрос из своего децентрализованного приложения, если у Вас нет ключа API, с помощью бесплатного временного URL-адреса запроса с ограниченной скоростью, который можно использовать для разработки и подготовки. - -Для получения дополнительной информации о запросе данных из Вашего субграфа читайте [здесь](../querying/querying-the-graph/). diff --git a/website/pages/ru/developing/assemblyscript-api.mdx b/website/pages/ru/developing/assemblyscript-api.mdx deleted file mode 100644 index 368a6f3b8bd8..000000000000 --- a/website/pages/ru/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Примечание: если Вы создали субграф `graph-cli`/`graph-ts` версии, предшествующей `0.22.0`, Вы используете более старую версию AssemblyScript. Мы рекомендуем Вам ознакомиться с [`Руководством по миграции`](/release-notes/assemblyscript-migration-guide) - -На этой странице описаны встроенные API, которые можно использовать при написании мэппингов субграфов. По умолчанию доступны два вида API: - -- [библиотека Graph TypeScript](https://github.com/graphprotocol/graph-ts) (`graph-ts`) и -- код, сгенерированный из файлов субграфов с помощью `graph codegen`. - -Также возможно добавлять другие библиотеки в качестве зависимостей, если они совместимы с [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Поскольку это язык, на котором написаны мэппинги, [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) является хорошим источником информации о языке и функциях стандартной библиотеки. - -## Установка - -Субграфы, созданные с помощью [`graph init`](/developing/creating-a-subgraph), поставляются с предварительно настроенными зависимостями. Всё, что требуется для установки этих зависимостей, - это выполнить одну из следующих команд: - -```sh -yarn install # Yarn -npm install # NPM -``` - -Если субграф был создан с нуля, одна из следующих двух команд установит библиотеку Graph TypeScript в качестве зависимости: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## Референс API - -Библиотека `@graphprotocol/graph-ts` предоставляет следующие API: - -- API `ethereum` для работы со смарт-контактами Ethereum, событиями, блоками, транзакциями и значениями Ethereum. -- API `store` для загрузки и сохранения объектов из хранилища ноды The Graph и в него. -- `log` API для регистрации сообщений в выходных данных ноды The Graph и Graph Explorer. -- `ipfs` API для загрузки файлов из IPFS. -- `json` API для анализа данных в формате JSON. -- `crypto` API для использования криптографических функций. -- Низкоуровневые примитивы для перевода между системами различных типов, таких как Ethereum, JSON, GraphQL и AssemblyScript. - -### Версии - -`apiVersion` в манифесте субграфа указывает версию мэппинга API, которая запускается Graph Node для данного субграфа. Текущая версия мэппинга API - 0.0.6. - -| Версия | Примечания к релизу | -| :-: | --- | -| 0.0.7 | К типам Ethereum добавлены классы `transactionReceipt` и `Log`
    К объекту Ethereum Event добавлено поле `receivation` | -| 0.0.6 | В объект Ethereum Transaction добавлено поле `nonce`
    В объект Ethereum Block добавлено поле `baseFeePerGas` | -| 0.0.5 | AssemblyScript обновлен до версии 0.19.10 (сюда включены критические изменения, см. [`Руководство по миграции`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` переименован в `ethereum.transaction.gasLimit` | -| 0.0.4 | В объект Ethereum SmartContractCall добавлено поле `functionSignature` | -| 0.0.3 | В объект Ethereum Call добавлено поле `from`
    `etherem.call.address` переименован в `ethereum.call.to` | -| 0.0.2 | В объект Ethereum Transaction добавлено поле `input` | - -### Встроенные типы - -Документацию по базовым типам, встроенным в AssemblyScript, можно найти в [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -Следующие дополнительные типы предоставляются `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` представляет собой массив `u8`. - -_Конструкция_ - -- `fromI32(x: i32): ByteArray` — Разбивает `x` на байты. -- `fromHexString(hex: string): ByteArray` - Длина ввода должна быть четной. Префикс `0x` необязателен. - -_Конверсии типов_ - -- `toHexString(): строка` - Преобразуется в шестнадцатеричную строку с префиксом `0x`. -- `toString(): строка` - Интерпретирует байты как строку UTF-8. -- `to Base 58(): string` - Кодирует байты в строку base58. -- `to U32(): u32` - Интерпретирует байты как little-endian `u32`. Выбрасывает в случае переполнения. -- `to I32(): i32` - Интерпретирует массив байтов как little-endian `i32`. Выбрасывает в случае переполнения. - -_Операторы_ - -- `equals(y: ByteArray): bool` – может быть записано как `x == y`. -- `concat(other: ByteArray) : ByteArray` - возвращает новый `ByteArray`, состоящий из `this`, за которым непосредственно следует `other` -- `concatI32(other: i32) : ByteArray` - возвращает новый `ByteArray`, состоящий из `this`, за которым непосредственно следует байтовое представление `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` используется для представления десятичных знаков произвольной точности. - -> Примечание: [Внутренний](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` хранится в [формате IEEE-754 decimal128 с плавающей запятой](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), который поддерживает 34 десятичных знака значащего числа. Это делает `BigDecimal` неподходящим для представления типов с фиксированной запятой, которые могут содержать более 34 цифр, таких как Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) или его эквивалентов. - -_Конструкция_ - -- `constructor(bigInt: BigInt)` — создает `BigDecimal` из `BigInt`. -- `static fromString(s: string): BigDecimal` – выполняет синтаксический анализ из десятичной строки. - -_Конверсии типов_ - -- `toString(): string` – выводит в виде десятичной строки. - -_Математика_ - -- `plus(y: BigDecimal): BigDecimal` – может быть записано как `x + y`. -- `minus(y: BigDecimal): BigDecimal` – может быть записано как `x - y`. -- `times(y: BigDecimal): BigDecimal` – может быть записано как `x * y`. -- `div(y: BigDecimal): BigDecimal` – может быть записано как `x / y`. -- `equals(y: BigDecimal): bool` – может быть записано как `x == y`. -- `notEqual(y: BigDecimal): bool` – может быть записано как `x != y`. -- `lt(y: BigDecimal): bool` – может быть записано как `x < y`. -- `le(y: BigDecimal): bool` – может быть записано как `x <= y`. -- `gt(y: BigDecimal): bool` – может быть записано как `x > y`. -- `ge(y: BigDecimal): bool` – может быть записано как `x >= y`. -- `neg(): BigDecimal` - может быть записано как `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` используется для представления больших целых чисел. Сюда входят значения Ethereum типа от `uint32` до `uint256` и от `int64` до `int256`. Все, что находится ниже `uint32`, например `int32`, `uint24` или `int8`, представлено как `i32`. - -Класс `BigInt` имеет следующий API: - -_Конструкция_ - -- `BigInt.fromI32(x: i32): BigInt` – создает `BigInt` из `i32`. -- `BigInt.fromString(s: строка): BigInt`– Анализирует `BigInt` из строки. -- `BigInt.fromUnsignedBytes(x: байты): BigInt` – Интерпретирует `bytes` как little-endian целое число без знака. Если Вы вводите big-endian, сначала вызовите `.reverse()`. -- `BigInt.fromSignedBytes(x: байты): BigInt` – Интерпретирует `bytes` как little-endian целое число со знаком. Если Вы вводите big-endian, сначала вызовите `.reverse()`. - - _Конверсии типов_ - -- `x.toHex(): string` – преобразует `BigInt` в строку шестнадцатеричных символов. -- `x.toString(): string` – преобразует `BigInt` в строку десятичных чисел. -- `x.toI32(): i32` – возвращает `BigInt` в виде `i32`; завершается с ошибкой, если значение не соответствует `i32`. Рекомендуется сначала проверить `x.is I32()`. -- `x.to BigDecimal(): BigDecimal` - преобразует в десятичное число без дробной части. - -_Математика_ - -- `x.plus(y: BigInt): BigInt` – может быть записано как `x + y`. -- `x.minus(y: BigInt): BigInt` – может быть записано как `x - y`. -- `x.times(y: BigInt): BigInt` – может быть записано как `x * y`. -- `x.div(y: BigInt): BigInt`– может быть записано как `x / y`. -- `x.mod(y: BigInt): BigInt` – может быть записано как `x % y`. -- `x.equals(y: BigInt): bool` – может быть записано как `x == y`. -- `x.NotEqual(y: BigInt): bool` – может быть записано как `x != y`. -- `x.lt (y: BigInt): bool` – может быть записано как `x < y`. -- `x.le(y: BigInt): bool` – может быть записано как `x <= y`. -- `x.gt (y: BigInt): bool` – может быть записано как `x > y`. -- `x.ge(y: BigInt): bool` – может быть записано как `x >= y`. -- `x.neg(): BigInt` – может быть записано как `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – делит на десятичное число, что дает десятичный результат. -- `x.isZero(): bool` – Удобство для проверки, равно ли число нулю. -- `x.isI32(): bool` – Проверяет, соответствует ли число `i32`. -- `x.abs(): BigInt` – Абсолютное значение. -- `x.pow(exp: u8): BigInt` – Возведение в степень. -- `bitOr(x: BigInt, y: BigInt): BigInt` – может быть записан как `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – может быть записан как `x && y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – может быть записан как `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – может быть записан как `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` может использоваться для хранения пар ключ-значений. Смотрите [ этот пример](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -Класс `TypedMap` имеет следующий API: - -- `new TypedMap()` создает пустую карту с ключами типа `K` и значениями типа `V` -- `map.set(key: K, value: V): void` – устанавливает значение `key` в `value` -- `map.getEntry(key: K): TypedMapEntry | null` – возвращает пару ключ-значение для `key` или `null`, если `key` не существует на карте -- `map.get(key: K): V | null` – возвращает значение для `key` или `null`, если `key` не существует на карте -- `map.isSet(key: K): bool` – возвращает `true`, если `key` существует на карте, и `false`, если его нет - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` используется для представления массивов байтов произвольной длины. Сюда входят значения Ethereum типа `bytes`, `bytes32` и т. д. - -Класс `Bytes` расширяет [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) в AssemblyScript и это поддерживает все функциональные возможности `Uint8Array`, а также следующие новые методы: - -_Конструкция_ - -- `fromHexString(hex: string) : Bytes` - Преобразует строку `hex`, которая должна состоять из четного числа шестнадцатеричных цифр, в `ByteArray`. Строка `hex` может опционально начинаться с `0x` -- `fromI32(i: i32) : Bytes` - Преобразовывает `i` в массив байтов - -_Конверсии типов_ - -- `b.toHex()` – возвращает шестнадцатеричную строку, представляющую байты в массиве -- `b.toString()` – преобразует байты в массиве в строку символов Unicode -- `b.toBase58()` – преобразует значение Ethereum Bytes в кодировку base58 (используется для хэшей IPFS) - -_Операторы_ - -- `b.concat(other: Bytes) : Bytes` - - возвращает новые `Bytes`, состоящие из `this`, за которым непосредственно следует `other` -- `b.concatI32(other: i32) : ByteArray` - возвращает новые `Bytes`, состоящие из `this`, за которым непосредственно следует байтовое представление `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` расширяет `Bytes` для представления значений Ethereum `address`. - -Поверх `Bytes` API добавляется следующий метод: - -- `Address.fromString(s: string): Address` – создает `Address` из шестнадцатеричной строки -- `Address.fromBytes(b: Bytes): Address` — создайте `Address` из `b` длиной ровно 20 байт. Передача значения с меньшим или большим количеством байт приведет к ошибке - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -API `store` позволяет загружать, сохранять и удалять объекты из хранилища the Graph Node и в него. - -Объекты, записанные в хранилище, сопоставляются один к одному с типами `@entity`, определенными в схеме субграфов GraphQL. Чтобы сделать работу с этими объектами удобной, команда `graph codegen`, предоставляемая [Graph CLI](https://github.com/graphprotocol/graph-cli) генерирует классы объектов, которые являются подклассами встроенного типа `Entity`, с геттерами и сеттерами свойств для полей в схеме, а также методами загрузки и сохранения этих объектов. - -#### Создание объектов - -Ниже приведен общий шаблон для создания объектов из событий Ethereum. - -```typescript -// Импорт класса событий Transfer, сгенерированного из ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Импорт типа объекта Transfer, сгенерированного из схемы GraphQL -import { Transfer } from '../generated/schema' -событие -// Обработчик события передачи -экспортирует функцию handleTransfer(event: TransferEvent): void { - // Создание объекта Transfer, с использованием хеша транзакции в качестве идентификатора объекта -let id = event.transaction.hash - let transfer = new Transfer(id) - - // Установка свойства объекта, с использованием параметров события -transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Сохранение объекта в хранилище -transfer.save() -} -``` - -Когда при обработке чейна возникает событие `Transfer`, оно передается обработчику события `handleTransfer`, используя сгенерированный тип `Transfer` (здесь используется псевдоним `TransferEvent`, чтобы избежать конфликта наименования с типом объект). Этот тип позволяет получить доступ к таким данным, как родительская транзакция события и ее параметры. - -Каждый объект должен иметь уникальный идентификатор, чтобы избежать коллизий с другими объектами. Довольно часто параметры события включают уникальный идентификатор, который может быть использован. Примечание: Использование хэша транзакции в качестве идентификатора предполагает, что никакие другие события в той же транзакции не создают объекты с этим хэшем в качестве идентификатора. - -#### Загрузка объектов из хранилища - -Если объект уже существует, его можно загрузить из хранилища следующим образом: - -```typescript -let id = event.transaction.hash // или некоторым образом создается идентификатор -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Используйте объект Transfer, как и раньше -``` - -Поскольку объект может еще не существовать в хранилище, метод `load` возвращает значение типа `Transfer | null`. Таким образом, перед использованием значения может потребоваться проверка на наличие `null`. - -> ** Примечание:** Загрузка объектов необходима только в том случае, если изменения, внесенные в мэппинг, зависят от предыдущих данных объекта. В следующем разделе описаны два способа обновления существующих объектов. - -#### Поиск объектов, созданных внутри блока - -Начиная с `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 и `@graphprotocol/graph-cli` v0.49.0 метод `loadInBlock ` доступен для всех типов объектов. - -Хранилище API облегчает поиск объектов, которые были созданы или обновлены в текущем блоке. Типичная ситуация для этого заключается в том, что один обработчик создает транзакцию из некоторого события в чейне, а более поздний обработчик хочет получить доступ к этой транзакции, если она существует. В случае, когда транзакция не была осуществлена, субграфу придется обратиться к базе данных только для того, чтобы узнать, что объект не существует; если же автор субграфа знает, что объект, должен был быть создан в том же блоке, использование loadInBlock позволит избежать этого обхода базы данных. Для некоторых субграфов эти пропущенные запросы могут значительно увеличить время индексации. - -```typescript -let id = event.transaction.hash // или некоторым образом создается идентификатор -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Используйте объект Transfer, как и раньше -``` - -> Примечание: Если в данном блоке не создан объект, `loadInBlock` вернет `null`, даже если в хранилище есть объект с данным идентификатором. - -#### Поиск производных объектов - -Начиная с `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 и `@graphprotocol/graph-cli` v0.51.0 метод `loadRelated ` доступен. - -Это позволяет загружать поля производных объектов из обработчика событий. Например, учитывая следующую схему: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -Следующий код загрузит объект `Token`, из которого был получен объект `Holder`: - -```typescript -let holder = Holder.load('test-id') -// Загрузите объект Token, из которого был получен объект Holder -let token = holder.tokens.load() -``` - -#### Обновление существующих объектов - -Существует два способа обновить существующий объект: - -1. Загрузите объект, например, с помощью `Transfer.load(id)`, установите свойства объекта, затем `.save()` верните его обратно в хранилище. -2. Просто создайте объект, например, с помощью `new Transfer(id)`, установите свойства объекта, затем сохраните `.save()` его в хранилище. Если объект уже существует, изменения будут объединены с ним. - -Изменение свойств в большинстве случаев не вызывает затруднений благодаря сгенерированным установщикам свойств: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -Также можно сбросить свойства с помощью одной из следующих двух инструкций: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -Это работает только с необязательными свойствами, т.е. свойствами, которые объявлены без `!` в GraphQL. Двумя примерами могут служить `owner: Bytes` или `amount: BigInt`. - -Обновление свойств массива немного сложнее, поскольку получение массива из объекта создает копию этого массива. Это означает, что после изменения массива свойства массива должны быть снова явно установлены. Далее предполагается, что `entity` имеет поле `numbers: [BigInt!]!`. - -```typescript -// Это не сработает -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// Это сработает -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Удаление объектов из хранилища - -В настоящее время нет способа удалить объект с помощью сгенерированных типов. Вместо этого для удаления объекта требуется передать имя типа объекта и идентификатор объекта в `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -Ethereum API предоставляет доступ к смарт-контрактам, общедоступным переменным состояния, функциям контрактов, событиям, транзакциям, блокам и кодированию/декодированию данных Ethereum. - -#### Поддержка типов Ethereum - -Как и в случае с объектами, `graph codegen` генерирует классы для всех смарт-контрактов и событий, используемых в субграфе. Для этого ABI контракта должны быть частью источника данных в манифесте субграфа. Как правило, файлы ABI хранятся в папке `abis/`. - -С помощью сгенерированных классов преобразования между типами Ethereum и [встроенными типами](#built-in-types) происходят за кулисами, так что авторам субграфов не нужно беспокоиться о них. - -Следующий пример иллюстрирует это. С учётом схемы субграфа, такой как - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -и сигнатура события `Transfer(address,address,uint256)` на Ethereum, значения `from`, `to` и `amount` типа `address`, `address` и `uint256` преобразуются в `Address` и `BigInt`, что позволяет передавать их в свойства `Bytes!` и `BigInt!` объекта `Transfer`: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### События и данные о блоках/транзакциях - -События Ethereum, передаваемые обработчикам событий, такие как событие `Transfer` в предыдущих примерах, предоставляют доступ не только к параметрам события, но и к их родительской транзакции и блоку, частью которого они являются. Следующие данные могут быть получены из экземпляров `event` (эти классы являются частью модуля `ethereum` в `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Доступ к состоянию смарт-контракта - -Код, сгенерированный с помощью `graph codegen`, также включает классы для смарт-контрактов, используемых в субграфе. Они могут быть использованы для доступа к общедоступным переменным состояния и вызова функций контракта в текущем блоке. - -Распространенным шаблоном является доступ к контракту, из которого исходит событие. Это достигается с помощью следующего кода: - -```typescript -// Импорт сгенерированного класса контракта и сгенерированного класса события Transfer -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Импорт созданного класса объекта -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Привязка контракта к адресу, сгенерировавшему событие - let contract = ERC20Contract.bind(event.address) - - // Доступ к переменным состояния и функциям путем их вызова - пусть erc20Symbol = контракт.символ() -} -``` - -`Transfer` связывается с `TransferEvent`, чтобы избежать конфликта наименований с типом объекта - -Пока `ERC20Contract` в Ethereum имеет общедоступную функцию только для чтения, называемую `symbol`, ее можно вызвать с помощью `.symbol()`. Для общедоступных переменных состояния автоматически создается метод с таким же именем. - -Любой другой контракт, который является частью субграфа, может быть импортирован из сгенерированного кода и привязан к действительному адресу. - -#### Обработка возвращенных вызовов - -Если доступные только для чтения методы Вашего контракта могут вызвать откат, то Вам следует справиться с этим, вызвав сгенерированный метод контракта с префиксом `try_`. Например, в контракте Gravity используется метод `gravatarToOwner`. Этот код сможет обработать откат в этом методе: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Обратите внимание, что Graph Node, подключенная к клиенту Geth или Infura, может обнаруживать не все откаты. Если Вы полагаетесь на это, мы рекомендуем использовать Graph Node, подключенную к клиенту Parity. - -#### Кодирование/декодирование ABI - -Данные могут быть закодированы и декодированы в соответствии с форматом кодирования ABI Ethereum с использованием функций `encode` и `decode` в модуле `ethereum`. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -Для получения дополнительной информации: - -- [[Спецификация ABI](https://crowdin. com/backend/phrases/phrases_as_html? project_id=447430&target_language_id=41&file_id=674)](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Кодирование/декодирование [Библиотека Rust/CLI](https://github.com/rust-ethereum/ethabi) -- Ещё [ сложный пример](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Регистрация API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -API `log` позволяет субграфам записывать информацию в стандартный вывод Graph Node, а также в Graph Explorer. Сообщения могут быть зарегистрированы с использованием различных уровней ведения лога. Для составления сообщений лога из аргумента предусмотрен синтаксис строки базового формата. - -API `log` включает в себя следующие функции: - -- `log.debug(fmt: string, args: Array): void` - регистрирует сообщение об отладке. -- `log.info (fmt: string, args: Array): void` - регистрирует информационное сообщение. -- `log.warning(fmt: string, args: Array): void` - регистрирует предупреждение. -- `log.error(fmt: string, args: Array): void` - регистрирует сообщение об ошибке. -- `log.critical(fmt: string, args: Array): void` – регистрирует критическое сообщение _и_ завершает работу субграфа. - -API `log` принимает строку формата и массив строковых значений. Затем он заменяет заполнители строковыми значениями из массива. Первый `{}` заполнитель заменяется первым значением в массиве, второй `{}` заполнитель заменяется вторым значением и так далее. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Регистрация одного или нескольких значений - -##### Регистрация одного значения - -В приведенном ниже примере строковое значение "A" передается в массив, чтобы стать`['A']` до регистрации: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Отображает: "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Регистрация одной записи из существующего массива - -В приведенном ниже примере регистрируется только первое значение массива аргументов, несмотря на то, что массив содержит три значения. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Отображает : "My value is: A" (Несмотря на то, что в `log.info` передаются три значения) - log.info('My value is: {}', myArray) -} -``` - -#### Регистрация нескольких записей из существующего массива - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Отображает : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Регистрация конкретной записи из существующего массива - -Чтобы отобразить определенное значение в массиве, необходимо указать индексированное значение. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Отображает : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Регистрация информации о событии - -В приведенном ниже примере регистрируется номер блока, хэш блока и хэш транзакции из события: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Смарт-контракты иногда привязывают файлы IPFS к чейну. Это позволяет мэппингам получать хэши IPFS из контракта и считывать соответствующие файлы из IPFS. Данные файла будут возвращены в виде `Bytes`, что обычно требует дальнейшей обработки, например, с помощью `json` API, описанного далее на этой странице. - -При наличии хеша или пути IPFS чтение файла из IPFS выполняется следующим образом: - -```typescript -// Поместите это в обработчик события в мэппинге -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Пути, подобные `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile`, -// которые включают файлы в директориях, также поддерживаются -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -** Примечание:** `pfs.cat ` на данный момент не является детерминированным. Если файл не может быть получен по сети IPFS до истечения времени ожидания запроса, он вернет `null`. В связи с этим всегда стоит проверять результат на наличие `null`. - -С помощью `ipfs.map` можно также обрабатывать файлы большего размера в потоковом режиме. Функция ожидает, что хэш или путь к файлу IPFS, имя обратного вызова и флаги изменят его поведение: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // Смотрите документацию по JsonValue для получения подробной информации о работе - // со значениями JSON - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Обратные вызовы также могут создавать объекты - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Установите для родителя значение "parentId" - newitem.save() -} - -// Поместите это внутри обработчика событий в мэппинге -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// В качестве альтернативы, используйте `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -Единственным поддерживаемым в настоящее время флагом является `json`, который должен быть передан в `ipfs.map`. С флагом `json` файл IPFS должен состоять из серии значений JSON, по одному значению в строке. Вызов `ipfs.map` прочитает каждую строку в файле, десериализует ее в `JsonValue` и совершит обратный вызов для каждой из них. Затем обратный вызов может использовать операции с объектами для хранения данных из `JsonValue`. Изменения объекта сохраняются только после успешного завершения обработчика, вызвавшего `ipfs.map`; в то же время они хранятся в памяти, и поэтому размер файла, который может обработать `ipfs.map`, ограничен. - -При успешном завершении `ipfs.map` возвращает `void`. Если какое-либо совершение обратного вызова вызывает ошибку, обработчик, вызвавший `ipfs.map`, прерывается, а субграф помечается как неудавшийся. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/ru/network-transition-faq.mdx b/website/pages/ru/network-transition-faq.mdx deleted file mode 100644 index 4b3a6776a640..000000000000 --- a/website/pages/ru/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Часто задаваемые вопросы о переносе сети ---- - -У разработчиков будет достаточно времени, чтобы перенести свои субграфы в децентрализованную сеть. Точные сроки будут варьироваться от сети к сети в зависимости от индексатора и готовности сети — сервис хостинга не прекратит поддержку всех сетей сразу и не завершит свою работу внезапно. - -Каждая сеть в хостинговом сервисе, включая Ethereum, будет постепенно закрываться, поскольку она поддерживается децентрализованной сетью для достижения паритета функций и высокого качества обслуживания. Это будет происходить от сети к сети с помощью индексаторов в [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), чтобы обеспечить полную поддержку каждой сети в децентрализованной сети. - -Раздел часто задаваемых вопросов вносит ясность в отношении дальнейшей поддержки каждой сети в хостинговом сервисе и содержит ответы на самые распространённые вопросы об особенностях процесса перехода к сети. Если Вы хотите начать процесс переноса субграфа, воспользуйтесь [пошаговым руководством](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). Перейти к часто задаваемым вопросам о миграции Вы можете [здесь](#migration-faqs). - -## Часто задаваемые вопросы о закрытии хостингового сервиса - -### Нужно ли будет переносить субграф перед тем, как децентрализованная сеть предоставит обслуживание субграфов? - -Разработчики субграфов могут начать перенос своих субграфов основной сети Ethereum уже сейчас, но не следует переносить субграфы в сеть, пока не появятся основные функции для децентрализованной сети и хостингового сервиса. Перенос субграфов Gnosis network также скоро начнется, а другие сети последуют после того, как индексаторы их протестируют и будут готовы индексировать в производстве. - -### Каковы сроки и процесс прекращения поддержки хостингового сервиса? - -Все сети будут иметь свои временные шкалы, в зависимости от того, когда они включены в сеть, и сколько времени необходимо для прохождения каждой фазы. Разработчики ядра работают над тем, чтобы как можно скорее перенести большую часть трафика хостингового сервиса в децентрализованную сеть. - -Что наиболее важно, Вы не потеряете доступ к сервису хостинга до того, как основные функции станут доступны для Ваших конкретных сети/субграфа в децентрализованной сети. - -Три этапа прекращения поддержки хостинговых услуг для каждой сети: - -#### Этап 1 (The Sunray): отключение создания нового субграфа для блокчейнов, которые имеют паритет качества в сети - -На этом этапе разработчики больше не смогут разворачивать новые субграфы в Хостинговой службе для этой сети. При этом разработчики по-прежнему смогут обновлять существующие субграфы в Хостинговой службе. - -Ни одна сеть еще не начал Этап 1 перехода от хостингового сервиса к децентрализованной сети. - -По мере того, как сети переходят в Этап 1, обратите внимание, что разработчики по-прежнему могут использовать ограниченный URL-адрес предварительного просмотра в Subgraph Studio для разработки и тестирования своих субграфов (до 1000 бесплатных запросов) без приобретения GRT или взаимодействия с экономикой протокола. - -#### Этап 2 (The Sunbeam): отключение обновления субграфа - -На этом этапе обновления субграфов должны выполняться через Subgraph Studio и впоследствии публиковаться в децентрализованной сети. Субграфы, размещенные в Хостинговой службе, для сетей на этом этапе все еще будут существовать и будут доступны для запросов, но обновления субграфов должны выполняться в децентрализованной сети The Graph. - -Точных сроков, когда та или иная сеть перейдет к этой фазе, нет, поскольку процесс определяется критериями выхода, связанными с основными функциями, а не с датами. - -#### Этап 3 (The Sunrise): Отключение запросов субграфов - -На этом этапе субграфы хостинговой службы для сетей, поддерживаемых The Graph Network, больше не будут обрабатывать запросы. Единственный способ запросить данные блокчейна для субграфов в сетях на этом этапе — через децентрализованную сеть. Тестовые запросы по-прежнему будут доступны в [Subgraph Studio](https://thegraph.com/studio/) через URL запроса разработки. - -Сети не перейдут к Этапу 3 до тех пор, пока успешно не перейдут к Этапу 2 и не предоставят разработчикам достаточно времени для перехода на децентрализованную сеть. - -![диаграмма субграфа](/img/subgraph-chart.png) - -> Примечание. На этой диаграмме показан процесс закрытия для каждой сети. Время прекращения действия Хостинговой службы будет различным, а работа Хостинговой службы не будет прекращена сразу. - -### Что происходит с такими тестовыми сетями, как Goerli, Mumbai и т. д.? - -Для всех сетей, в том числе тестовых, доступен бесплатный URL-адрес запроса на развертывание в [Subgraph Studio](https://thegraph.com/studio/). Этот URL-адрес ограничен по скорости и предназначен для тестирования и разработки трафика. Для производственного трафика потребуется субграф, опубликованный в The Graph Network, чтобы обеспечить резервирование и стабильность производственного уровня. - -![Ограничение скорости](/img/rate-limit.png) - -### Обладает ли The Graph Network теми же функциями, что и сервис хостинга? - -Индексаторы в The Graph Network используют самый последний, утвержденный сетью, [выпуск Graph Node](https://github.com/graphprotocol/graph-node/releases) и могут поддерживать в этом релизе любые поддерживаемые функции субграфов. - -Иногда невыпущенные функции, которые все еще находятся в стадии разработки, могут быть доступны разработчикам сначала по URL-адресу предварительного просмотра, который запускает последнюю основную фиксацию [Graph Node](https://github.com/graphprotocol/graph-node). Эти функции станут доступны в сети со следующим выпуском Graph Node. - -Определенные функции субграфа не имеют права на получение вознаграждения за индексацию, если они не являются детерминированными или не поддающимися проверке в сети. Конкретными примерами являются извлечение файлов из IPFS и индексация сетей, которые еще не поддерживаются в The Graph Network. - -Субграфы с такими характеристиками могут быть опубликованы в сети, но индексаторы не смогут их получить. Тем не менее субграфы с достаточным сигналом могут по-прежнему привлекать индексаторов, заинтересованных в сборе платы за запросы, на которую может претендовать любой субграф. - -### Сколько стоит The Graph Network по сравнению с запуском моей собственной инфраструктуры? - -Децентрализованная сеть The Graph на 60–90 % дешевле, чем выделенная инфраструктура, как показано в [этих примерах](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Нужно ли мне что-то делать с субграфом хостингового сервиса после переноса в сеть? - -Во избежание недоразумений настоятельно рекомендуется скрывать субграф хостингового сервиса. [В этом видео](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) показано, как это сделать. - -### Когда децентрализованная сеть начнёт поддерживать предпочитаемую мною сеть? - -Для каждой сети нет установленных сроков, они будут определяться готовностью индексатора через [программу MIP](https://thegraph.com/migration-incentive-program/), где индексаторы тестируют новые сети. По мере того, как в сети будут поддерживаться новые сети, пользователи получат определённое количество уведомлений, чтобы подготовиться к переходу. Разработчики ядра и участники экосистемы The Graph работают над скорейшей реализацией поддержки большего количества сетей. - -### Вступает ли основная сеть Ethereum в Этап 1 процесса перехода к сети? - -Первоначально предполагалось, что Ethereum начнет переход с хостингового сервиса к концу третьего квартала 2022 года, но этот переход был [отложен](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) благодаря полученной обратной связи от пользователей. Дополнительные улучшения в пользовательском опыте, биллинге и других запросах пользователей определят сроки перехода хостинговых сервисов Ethereum. Чтобы узнать, когда Ethereum перейдет в фазу Sunray, воспользуйтесь трекером статуса интеграции ниже и [The Graph Twitter.](https://twitter.com/graphprotocol) - -### Трекер состояния интеграции The Graph Network - -В приведенной ниже таблице показано, на каком этапе процесса сетевой интеграции находится каждая сеть. Если предпочитаемой сети нет в списке, значит, интеграция еще не началась, и эта сеть по-прежнему полностью поддерживается хостинговой службой The Graph. - -> В эту таблицу не будут включены тестовые сети, которые остаются бесплатными в [Subgraph Studio](https://thegraph.com/studio/). - -| Сеть | Объявление об интеграции в The Graph Network | Сетевая интеграция завершена | Этап 1: отключение новых субграфов в хостинговом сервисе | Этап 2: отключение обновления субграфов в хостинговом сервисе | Этап 3: отключение субграфов в хостинговом сервисе | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (ранее xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* Сеть в настоящее время находится в стадии бета-тестирования в децентрализованной сети The Graph. - -## Часто задаваемые вопросы о комиссиях за запросы, API-ключах и биллинге - -### Как рассчитываются сборы за запросы? - -На стоимость запросов влияет спрос на них в децентрализованной сети. Разработчики ядра создали язык модели ценообразования запросов под названием [Agora](https://github.com/graphprotocol/agora). Он позволяет индексаторам эффективно оценивать запросы. Дополнительные сведения см. в [документации Agora](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### Как установить максимальный бюджет запроса? - -Пользователи могут установить максимальный бюджет запроса в разделе Subgraph Studio [Ключ API](https://thegraph.com/studio/apikeys/) на вкладке Бюджет. [Посмотрите это видео](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0), чтобы получить представление об этом процессе, а также о настройке других частей вашего ключа API. - -Обратите внимание, что установка слишком низкого максимального бюджета запросов приведет к исключению индексаторов, что может привести к низкому качеству обслуживания в виде неудачных запросов, медленных запросов и т. д. - -По состоянию на конец сентября 2022 г. рекомендуется оставаться в диапазоне от 0,00035 до 0,0004 доллара США в качестве наименьшего максимального бюджета запроса. - -### Как я могу защитить свой ключ API? - -Пользователям рекомендуется ограничить ключ API как субграфом, так и доменом в [Subgraph Studio](https://thegraph.com/studio/): - -![Рестрикт домена](/img/restrictdomain.png) - -### Как пополнить ключ API для оплаты сборов за запросы? - -Вы можете пополнить свой платежный баланс в Subgraph Studio на [Панели управления счетами](https://thegraph.com/studio/billing/), нажав кнопку "Добавить GRT". В настоящее время ведется работа по улучшению этого процесса, чтобы добавить больше бесшовных и повторяющихся платежей. - -[В этом видео](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) представлен обзор этого процесса. - -### Как настроить оповещения о низком остатке на счетах в моем ключе API? - -Пользователям следует настроить оповещение о выставлении счетов на свой адрес электронной почты [здесь](https://thegraph.com/studio/settings/). - -Кроме того, в пользовательском интерфейсе будет мигать баннер, чтобы предупредить, когда баланс счета становится низким. - -Каковы наилучшие методы управления настройками моего ключа API? - -Рекомендуется максимальный бюджет запроса в размере 0,0004 доллара США, чтобы поддерживать низкую среднюю цену запроса при сохранении высокого качества обслуживания. Это можно сделать на вкладке "Оплата бюджета" раздела [Ключ API](https://thegraph.com/studio/apikeys/). - -## Часто задаваемые вопросы о миграции - -### Как я могу перенести свой субграф в децентрализованную сеть The Graph? - -Узнайте, как перенести свой субграф в The Graph Network, с помощью этого простого [пошагового руководства](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) или [этого видео](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Существуют ли Сетевые Гранты для субграфов, которые раньше перейдут в The Graph Network? - -Да. Чтобы подать заявку на получение Сетевого Гранта, свяжитесь с нами [здесь](mailto:migration@thegraph.foundation). - -### Предоставляется ли какая-либо финансовая/техническая/маркетинговая поддержка в процессе миграции из экосистемы The Graph? - -Существуют Сетевые Гранты для проектов, которые можно использовать для курирования субграфов (для привлечения индексаторов) и оплаты первоначальных сборов за запросы (подайте заявку [здесь](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), [прямой канал](https://discord.gg/graphprotocol) для инженеров, чтобы помочь им на каждом этапе, и расставить приоритеты в маркетинговых кампаниях для демонстрации их проекта после переноса, примером которой служат следующие темы Twitter: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### Как долго выполняются запросы? - -Запросы в децентрализованной сети занимают в среднем 150-300 миллисекунд. - -### Процесс выставления счетов в The Graph Network сложнее, чем в хостинговом сервисе? - -Да, UX для сети еще не соответствует качеству хостинга. В частности, биллинговый UX все еще находится на очень ранней стадии, и имеет много подвижных частей, поэтому команда разработчиков ядра работает над устранением их из процесса. Большая часть этих улучшений будет обнародована в ближайшем будущем. - -### Могу ли я оплачивать запросы The Graph Network фиатными деньгами, кредитной картой или стейблкоинами? - -В ближайшие месяцы количество шагов, которые пользователи должны предпринять для оплаты своих подграфов, будет значительно сокращено. Хотя платежи по-прежнему будут производиться в GRT, уже предпринимаются усилия по внедрению фиатных и автоматизированных платежных систем для конвертации фиата и криптовалюты в GRT для осуществления регулярных платежей. - -### Будет ли когда-нибудь сеть иметь тот же UX, что и сервис хостинга? - -Несмотря на то, что еще многое предстоит сделать, цель состоит в том, чтобы предложить сравнимый, если не более качественный UX в The Graph Network, чем тот, который в настоящее время существует в хостинговом сервисе. В краткосрочной перспективе цель состоит в том, чтобы предложить более рациональный и предсказуемый способ выставления счетов, который поможет пользователям уделять больше времени созданию высококачественных децентрализованных приложений. - -### Как я могу гарантировать, что мой субграф будет выбран индексатором в The Graph Network? - -Рекомендуется курировать как минимум 10 000 GRT, что позволяет пользователям курировать ту же транзакцию, что и при публикации. Пользователи также могут попросить сообщество кураторов курировать их субграф [здесь](https://t.me/CurationStation). - -Чтобы покрыть эти первоначальные расходы, существуют Сетевые Гранты для первых мигрантов. Подайте заявку [здесь](mailto:migration@thegraph.foundation). - -### Зачем субграфу нужен кураторский сигнал? Что делать, если на моем субграфе недостаточно сигнала от кураторов? - -Чем выше сигнал курирования, тем более привлекательным является субграф для индексаторов, поскольку существует линейная корреляция между более высоким сигналом и более высоким вознаграждением за индексирование. Без курации у индексаторов нет стимула выбирать субграф. - -### Что происходит с GRT, которые разработчик субграфа использует в качестве сигнала курирования? - -Если Вы первым просигнализируете о субграфе, сумма вашего сигнала GRT не уменьшится. GRT, используемый для курирования, может быть удален позже. Кроме того, кураторы получают 10% от всех сборов за запросы, взимаемых индексаторами. - -### Какие улучшения внесены в процесс курирования? - -В краткосрочной перспективе первоначальная модель курирования на Arbitrum обеспечит принципиальную защиту сигнала курирования. В долгосрочной перспективе разработчики ядра будут уделять первоочередное внимание предоставлению разработчикам возможности арендовать сигнал курирования, открывая более предсказуемый ценовой опыт, обеспечивая при этом достаточную индексацию субграфов. - -### Как переключить API-интерфейс субграфа во внешнем интерфейсе? - -После того как хотя бы один индексатор полностью проиндексировал субграф, пользователь может запросить децентрализованную сеть. - -Чтобы получить URL-адрес запроса для вашего субграфа, Вы можете скопировать/вставить его, нажав символ рядом с URL-адресом запроса. Вы увидите примерно следующее: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Просто замените [api-key] ключом API, сгенерированным в [разделе Ключ API](https://thegraph.com/studio/apikeys/) в Subgraph Studio. - -### Сколько стоят запросы? - -Средняя стоимость запроса в сети варьируется. В сентябре 2022 года средняя цена за плату за запрос варьировалась от 0,00012 до 0,00020 долларов США. - -### Как узнать, какой объем у моего субграфа и сколько это будет стоить? - -Данные объема хостингового сервиса не являются общедоступными. Пожалуйста, свяжитесь с нами [здесь](mailto:migration@thegraph.foundation), чтобы получить оценку объема и стоимости. - -### Как работает шлюз? Он полностью децентрализован? - -Шлюз обрабатывает запросы, чтобы индексаторы могли обслуживать децентрализованные приложения. Шлюзы находятся в промежуточной фазе, которая постепенно децентрализуется. Подробнее об этом в ближайшее время. - -## Часто задаваемые вопросы об использовании сети - -### Взимается ли плата за обновление моего субграфа? - -Да, это 1% от курирования. 1% поровну делится между кураторами (0,5%) и разработчиками субграфов (0,5%). Таким образом, каждые 10 000 GRT обходятся разработчикам субграфов в 50 GRT. - -### Как ускорить время синхронизации? - -Сведите к минимуму использование вызовов смарт-контрактов внутри субграфа. Для доступа к состоянию смарт-контракта требуется eth_call для RPC, это замедлит время синхронизации. - -### Есть ли в Subgraph Studio поддержка мультиподписи при переходе? - -Да, поддержка мультиподписи была недавно добавлена. Дополнительную информацию можно найти [здесь](https://thegraph.com/docs/studio/multisig). - -### Каковы адреса контрактов для GRT на Ethereum и Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### Сколько GRT обычно хранят проекты в своем API-ключе? - -Многие проекты хранят GRT в своем API-ключе 30-60 дней, поэтому им не нужно часто пополнять баланс. Чтобы узнать, каковы будут ваши сборы GRT за 30-60 дней, обратитесь [сюда](mailto:migration@thegraph.foundation). - -### Как в децентрализованной сети производятся платежи по запросам?  - -Счета на оплату выставляются еженедельно и извлекаются из ключа API пользователя, а GRT подключается к Arbitrum и размещается на нем. - -### Как ключи API используются для субграфов в децентрализованной сети? - -Ключи API позволяют пользователям влиять как на максимальные цены запросов, которые они платят, так и на приоритетность таких факторов, как цена, экономическая значимость и скорость запросов. - -### Как в настоящее время сравнивается качество обслуживания между хостингом и децентрализованной сетью? - -Хостинговая служба и децентрализованная сеть имеют примерно одинаковую медианную задержку, но децентрализованная сеть, как правило, имеет более высокую задержку при более высоких процентилях. Показатель 200 для запросов также примерно одинаков, оба на уровне > 99,9%. В результате децентрализации в сети не было серьезных сбоев в субграфах, в то время как у хостинговой службы в редких случаях бывают временные сбои из-за ее централизованного характера. - -### Что, если на мой вопрос нет ответа в этих FAQ? - -За дополнительной помощью обратитесь по адресу [migration@thegraph.foundation](mailto:migration@thegraph.foundation). diff --git a/website/pages/ru/querying/querying-the-hosted-service.mdx b/website/pages/ru/querying/querying-the-hosted-service.mdx deleted file mode 100644 index d28355b14cd0..000000000000 --- a/website/pages/ru/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Пример - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/sv/cookbook/quick-start.mdx b/website/pages/sv/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/sv/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/sv/developing/assemblyscript-api.mdx b/website/pages/sv/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/sv/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/sv/network-transition-faq.mdx b/website/pages/sv/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/sv/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/sv/querying/querying-the-hosted-service.mdx b/website/pages/sv/querying/querying-the-hosted-service.mdx deleted file mode 100644 index 474b3c1b2a05..000000000000 --- a/website/pages/sv/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Förfrågan om hostad tjänst ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -Ett exempel ges nedan, men se [Fråge-API](/querying/graphql-api) för en komplett referens om hur du frågar subgrafens enheter. - -## Exempel - -Denna fråga listar alla räknare som vår mappning har skapat. Eftersom vi endast skapar en, kommer resultatet endast att innehålla vår enda `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Några av de viktigaste funktionerna beskrivs nedan: - -![Lekplats för utforskare](/img/explorer-playground.png) diff --git a/website/pages/tr/cookbook/quick-start.mdx b/website/pages/tr/cookbook/quick-start.mdx deleted file mode 100644 index f600fb46aefe..000000000000 --- a/website/pages/tr/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Subgraph'ınızı başlatın - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/tr/developing/assemblyscript-api.mdx b/website/pages/tr/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/tr/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/tr/network-transition-faq.mdx b/website/pages/tr/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/tr/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/tr/querying/querying-the-hosted-service.mdx b/website/pages/tr/querying/querying-the-hosted-service.mdx deleted file mode 100644 index 639aa66ed5e7..000000000000 --- a/website/pages/tr/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Barındırılan Hizmeti Sorgulama ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -Aşağıda bir örnek verilmiştir, ancak subgraph'in varlıklarının nasıl sorgulanacağına ilişkin eksiksiz bir referans için lütfen [Query API](/querying/graphql-api)'a bakın. - -## Örnek - -Bu sorgu, eşlememizin oluşturduğu tüm sayaçları listeler. Yalnızca bir tane oluşturduğumuz için, sonuç yalnızca bir `varsayılan sayacımızı` içerecektir: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Ana özelliklerden bazıları aşağıda ayrıntılı olarak açıklanmıştır: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/uk/cookbook/quick-start.mdx b/website/pages/uk/cookbook/quick-start.mdx deleted file mode 100644 index 6b69e7582c73..000000000000 --- a/website/pages/uk/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Швидкий старт ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/uk/developing/assemblyscript-api.mdx b/website/pages/uk/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/uk/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/uk/network-transition-faq.mdx b/website/pages/uk/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/uk/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/uk/querying/querying-the-hosted-service.mdx b/website/pages/uk/querying/querying-the-hosted-service.mdx deleted file mode 100644 index f00ff226ce09..000000000000 --- a/website/pages/uk/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Example - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/ur/cookbook/quick-start.mdx b/website/pages/ur/cookbook/quick-start.mdx deleted file mode 100644 index 23f053e1f8a7..000000000000 --- a/website/pages/ur/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: فورا شروع کریں ---- - -یہ گائیڈ آپ کو سب گراف اسٹوڈیو یا [ہوسٹڈ سروس](#hosted-service) میں اپنے سب گراف کو شروع کرنے، تخلیق کرنے اور تعینات کرنے کے طریقہ کے بارے میں فوری طور پر لے جائے گا. - -اس بات کو یقینی بنائیں کہ آپ کا سب گراف کسی [تعاون یافتہ نیٹ ورک](/developing/supported-networks) سے ڈیٹا کو ترتیب دے رہا ہے. - -یہ گائیڈ یہ فرض کرتے ہوئے لکھی گئ ہے کہ آپ کے پاس ہے: - -- ایک سمارٹ کنٹریکٹ ایڈریس جو آپ کی مرضی کے نیٹ ورک پر ہے -- آپ کے سب گراف کو کیوریٹ کرنے کے لۓ جی آر ٹی -- ایک کرپٹو والیٹ - -## 1. سب گراف سٹوڈیو پر سب گراف بنائیں - -سب گراف سٹوڈیو پر جائیں [https://thegraph.com/studio/](https://thegraph.com/studio/) اور اپنا والیٹ کونیکٹ کریں. - -ایک بار منسلک ہو جاۓ، آپ "سب گراف بنائیں" کو دبا کر شروع کر سکتے ہیں. اپنی مرظی کے نیٹ ورک کو چنیں اور جاری رکھیں پر کلک کریں. - -## 2. گراف CLI انسٹال کریں - -گراف CLI جاوا اسکریپٹ میں لکہی گئ ہے اور اسے استعمال کرنے کے لیے آپ کو یا تو `npm` یا ` Yarn` انسٹال کرنے کی ضرورت ہوگی. - -اپنی مقامی مشین پر، درج زیل کمانڈز میں سے ایک کو رن کریں: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. اپنا سب گراف شروع کریں - -> آپ [سب گراف سٹوڈیو](https://thegraph.com/studio/) میں سب گراف پیج پر اپنے مخصوص سب گراف کے لیے کمانڈز تلاش کر سکتے ہیں. - -جب آپ اپنے سب گراف کو شروع کرتے ہیں, CLI ٹول درج ذیل معلومات کے لۓ آپ سے پوچھے گا: - -- پروٹوکول: پروٹوکول منتخب جس سے آپ کا سب گراف ڈیٹا انڈیکس کرے گا -- سب گراف سلگ: اپنے سب گراف کے لیےؑ نام رکھیں. آپ کا سب گراف سلگ آپ کع سب گراف کا شناخت کنندہ ہے. -- سب گراف بنانے کے لیۓ ڈائریکٹری: اپنی مقامی ڈائریکٹری منتخب کریں -- ایتھیریم نیٹ ورک(اختیاری): آپ کو یہ بتانے کی ضرورت ہو سکتی ہے کہ آپ کا سب گراف کس EVM سے مطابقت رکھنے والے نیٹ ورک سے ڈیٹا کو انڈیکس کرے گا -- کنٹریکٹ ایڈریس: وہ سمارٹ کنٹریکٹ ایڈریس تلاش کریں جس سے آپ ڈیٹا کیوری کرنا چاہتے ہیں -- ABI: اگر ABI خود بخود نہیں ہے، آپ کو اسے JSON فائل کے طور پر دستی طور پر ان پٹ کرنے کی ضرورت ہوگی -- سٹارٹ بلاک: یہ تجویز کیا جاتا ہے کے آپ وقت بچانے کے لیۓ سٹارٹ بلاک میں ان پٹ کریں جبکہ آپ کا سب گراف بلاکچین ڈیٹا کو انڈیکس کرتا ہے۔ آپ اس بلاک کو تلاش کر کے سٹارٹ بلاک کا پتہ لگا سکتے ہیں جہاں آپ کا کنٹریکٹ تعینات کیا گیا تھا. -- کنٹریکٹ کا نام: اپنے کنٹریکٹ کا نام درج کریں -- کنٹریکٹ کے واقعات کو انڈیکس کریں بطور ادارے: یہ تجویز کیا جاتا ہے کہ آپ اسے درست پر سیٹ کریں کیونکہ یہ خود بخود ہر خارج ہونے والے واقع کے لیے آپ کے سب گراف میں میپنگس کا اضافہ کر دے گا۔ -- ایک اور کنٹریکٹ شامل کریں(اختیاری): آپ ایک اور کنٹریکٹ شامل کر سکتے ہیں۔ - -درج ذیل کمانڈ کو رن کر کے اپنے سب گراف کو موجودہ کنٹریکٹ سے شروع کریں: - -```sh -graph init --studio -``` - -اپنے سب گراف کو شروع کرتے وقت کیا توقع کی جائے اس کی مثال کے لیے درج ذیل اسکرین شاٹ دیکھیں: - -![سب گراف کمانڈ](/img/subgraph-init-example.png) - -## 4. اپنا سب گراف لکھیں - -پچھلی کمانڈز ایک سکیفولڈ سب گراف بناتی ہیں جسے آپ اپنے سب گراف کی تعمیر کے لیے نقطہ آغاز کے طور پر استعمال کر سکتے ہیں۔ سب گراف میں تبدیلی کرتے وقت، آپ بنیادی طور پر تین فائلوں کے ساتھ کام کریں گے: - -- مینی فیسٹ (subgraph.yaml) - مینی فیسٹ اس بات کی وضاحت کرتا ہے کہ آپ کے سب گراف کس ڈیٹا سورسز کو انڈیکس کریں گے. -- سکیما (schema.graphql) - GraphQL سکیما اس بات کی وضاحت کرتا ہے کہ آپ سب گراف سے کون سا ڈیٹا حاصل کرنا چاہتے ہیں. -- اسمبلی اسکرپٹ میپنگ (mapping.ts) - یہ وہ کوڈ ہے جو آپ کے ڈیٹا سورس سے ڈیٹا کو اسکیما میں بیان کردہ اداروں میں ترجمہ کرتا ہے. - -مزید معلومات کے کیسے سب گراف لکہا جاۓ، [سب گراف بنانا](/developing/creating-a-subgraph) دیکہیں. - -## 5. سب گراف سٹوڈیو پر تعینات کریں - -ایک بار آپ کا سب گراف لکھا جائے، درج ذیل کمانڈز رن کریں: - -```sh -$ graph codegen -$ graph build -``` - -- اپنے سب گراف کی تصدیق اور اسے تعینات کریں. تعیناتی کی کلید آپ کو سب گراف پیج پر ملے گی جو سب گراف سٹوڈیو میں موجود ہے. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -آپ سے ورزن لیبل طلب کیا جاۓ گا۔ `0.0.1` کی طرح ورژن بنانے کے لیے [سیم ور](https://semver.org/) استعمال کرنے کی سختی سے سفارش کی جاتی ہے۔ جس نے کہا، آپ ورژن کے طور پر کسی بھی سٹرنگ کو منتخب کرنے کے لیے آزاد ہیں جیسے:`v1`, `asdf`, `version1`. - -## 6. اپنے سب گراف کو ٹیسٹ کریں - -آپ پلے گراؤنڈ سیکشن میں اپنا سب گراف ایک سامپل کیوری بنا کر ٹیسٹ کر سکتے ہیں. - -لوگز آپ کو بتائیں گے اکر آپ کے سب گراف میں مسائل ہیں۔ آپریشنل سب گراف کے لوگز اس طرح کے دکھیں گے: - -![سب گراف لوگز](/img/subgraph-logs-image.png) - -اگر آپ کا سب گراف فیل ہو رہا ہے, آپ GraphiQL پلے گراؤنڈ کا استعمال کر کے سب گراف کی صحت کیوری کر سکتے ہیں۔ نوٹ کریں کے آپ نیچے دی گئ کیوری سے فائدہ اٹھا سکتے ہیں اور اپنے سب گراف کے لیے اپنی تعیناتی ID درج کر سکتے ہیں۔ اس صورت میں، `Qm...` تعیناتی ID ہے (جو **تفصیلات** کے تحت سب گراف کے پیج پر واقع ہوسکتی ہے)۔ ذیل کی کیوری آپ کو بتائے گی کہ سب گراف کب ناکام ہوجاتا ہے، لہذا آپ اس کے مطابق ڈی بگ کرسکتے ہیں: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. اپنے سب گراف کو گراف کے ڈیسینٹرالائزڈ نیٹ ورک پر شائع کریں - -ایک بار آپ کا سب گراف سب گراف سٹوڈیو میں تعینات ہو جاتا ہے، آپ نے اسے ٹیسٹ کر لیا ہے، اور اسے پروڈکشن میں ڈالنے کے لیے تیار ہیں، پھر آپ اسے ڈیسینٹرالائزڈ نیٹ ورک پر شائع کر سکتے ہیں. - -سب گراف سٹوڈیو میں، سب گراف پر کلک کریں۔ سب گراف کے پیج پر، آپ اوپر دائیں جانب شائع کے بٹن پر کلک کر سکیں گے. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -اس سے پہلے کے آپ اپنا سب گراف کیوری کریں، انڈیکسرز کو اس پر کیوریز پیش کرنا شروع کرنے کی ضرورت ہے۔ اس عمل کو ہموار کرنے کے لیے، آپ جی آر ٹی کا استعمال کرتے ہوئے اپنا سب گراف کیوریٹ کر سکتے ہیں. - -لکھنے کے وقت، یہ تجویز کیا جاتا ہے کہ آپ 10,000 GRT کے ساتھ اپنا سب گراف کیوریٹ کریں تاکہ یہ یقینی بنایا جا سکے کہ یہ انڈیکسڈ ہے اور جلد از جلد کیوری کے لیے دستیاب ہے. - -گیس کی قیمتیں بچانے کے لیے، جب آپ اپنا سب گراف گراف کے ڈیسینٹرالائزڈ نیٹ ورک پر شائع کرتے ہیں تو آپ اس بٹن کو منتخب کرکے اپنے سب گراف کو اسی ٹرانزیکشن میں درست کر سکتے ہیں جسے آپ نے شائع کیا تھا: - -![سب گراف شائع](/img/publish-and-signal-tx.png) - -## 8. اپنے سب گراف کو کیوری کریں - -اب، آپ اپنے سب گراف کی کیوریز کو اپنے سب گراف کے کیوری URL پر بھیج کر اپنے سب گراف سے کیوری کر سکتے ہیں، جسے آپ کیوری کے بٹن پر کلک کر کے تلاش کر سکتے ہیں. - -اگر آپ کے پاس اپنی API کلید فری کے ذریعے نہیں ہے تو آپ اپنے ڈیپ سے کیوری کر سکتے ہیں، ریٹ محدود عارضی کیوری URL کے ذریعے نہیں ہے جسے ترقی اور سٹیجنگ کے لیے استعمال کیا جا سکتا ہے. - -اپنے سب گراف سے ڈیٹا کیوری کرنے کے بارے مزید معلومات جاننے کے لیے، مزید [یہاں](../querying/querying-the-graph/) پڑھیں. diff --git a/website/pages/ur/developing/assemblyscript-api.mdx b/website/pages/ur/developing/assemblyscript-api.mdx deleted file mode 100644 index 0a8596dddaed..000000000000 --- a/website/pages/ur/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: اسمبلی اسکرپٹ API ---- - -> نوٹ: اگر آپ نے `graph-cli`/`graph-ts` ورژن `0.22.0` سے پہلے ایک سب گراف بنایا ہے، تو آپ اس کا پرانا ورژن استعمال کر رہے ہیں اسمبلی اسکرپٹ، ہم [`Migration Guide`](/release-notes/assemblyscript-migration-guide) پر ایک نظر ڈالنے کی تجویز کرتے ہیں - -یہ صفحہ دستاویز کرتا ہے کہ سب گراف میپنگ لکھتے وقت کیا بلٹ ان APIs استعمال کیا جا سکتا ہے۔ دو قسم کے APIs باکس سے باہر دستیاب ہیں: - -- [گراف ٹائپ سکرپٹ لائبریری](https://github.com/graphprotocol/graph-ts) (`graph-ts`) اور -- `graph codegen` کے ذریعہ سب گراف فائلوں سے تیار کردہ کوڈ. - -دیگر لائبریریوں کو انحصار کے طور پر شامل کرنا بھی ممکن ہے، جب تک کہ وہ [اسمبلی سکرپٹ](https://github.com/AssemblyScript/assemblyscript) کے ساتھ مطابقت رکھتی ہوں۔ چونکہ زبان کی میپنگ اسی میں لکھی جاتی ہے، اس لیے [اسمبلی سکرپٹ وکی](https://github.com/AssemblyScript/assemblyscript/wiki) زبان اور معیاری لائبریری کی خصوصیات کے لیے ایک اچھا ذریعہ ہے. - -## انسٹالیشن - -[`graph init`](/developing/creating-a-subgraph) کے ساتھ بنائے گئے سب گراف پہلے سے تشکیل شدہ انحصار کے ساتھ آتے ہیں۔ ان انحصارات کو انسٹال کرنے کے لیے جو کچھ درکار ہے وہ درج ذیل کمانڈز میں سے ایک کو چلانا ہے: - -```sh -yarn install # Yarn -npm install # NPM -``` - -اگر سب گراف شروع سے بنایا گیا تھا، تو درج ذیل دو کمانڈز میں سے ایک گراف ٹائپ اسکرپٹ لائبریری کو انحصار کے طور پر انسٹال کرے گی: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API حوالہ - -`@graphprotocol/graph-ts` لائبریری درج ذیل APIs فراہم کرتی ہے: - -- ایتھیریم سمارٹ کنٹریکٹس، ایونٹس، بلاکس، ٹرانزیکشنز اور ایتھیریم ویلیوز کے ساتھ کام کرنے کے لیے ایک `ethereum` API. -- ایک `store` API جو گراف نوڈ اسٹور سے اور اس میں ہستیوں کو لوڈ اور محفوظ کرتا ہے. -- گراف نوڈ آؤٹ پٹ اور گراف ایکسپلورر پر پیغامات لاگ کرنے کے لیے ایک `log` API. -- IPFS سے فائلیں لوڈ کرنے کے لیے ایک `ipfs` API. -- JSON ڈیٹا کو پارس کرنے کے لیے ایک `json` API. -- کرپٹوگرافک فنکشنز استعمال کرنے کے لیے ایک `crypto` API. -- مختلف قسم کے سسٹمز جیسے کہ ایتھیریم، JSON، GraphQL اور اسمبلی اسکرپٹ کے درمیان ترجمہ کرنے کے لیے نچلی سطح کے قدیم. - -### ورژنز - -سب گراف مینی فیسٹ میں `apiVersion` میپنگ API ورژن کی وضاحت کرتا ہے جو گراف نوڈ کے ذریعہ دیئے گئے سب گراف کے لیے چلایا جاتا ہے۔ موجودہ میپنگ API ورژن 0.0.6 ہے. - -| ورزن | جاری کردہ نوٹس | -| :-: | --- | -| 0.0.7 | ایتھیریم کی قسموں میں `TransactionReceipt` اور `Log` کلاسز کو شامل کیا گیا
    ایتھیریم ایونٹ آبجیکٹ میں `receipt` فیلڈ شامل کیا گیا | -| 0.0.6 | ایتھیریم ٹرانزیکشن آبجیکٹ میں `nonce` فیلڈ کو شامل کیا گیا
    ایتھیریم بلاک آبجیکٹ میں `baseFeePerGas` شامل کیا گیا | -| 0.0.5 | اسمبلی اسکرپٹ کو ورژن 0.19.10 میں اپ گریڈ کیا گیا (اس میں بریکنگ تبدیلیاں شامل ہیں، براہ کرم دیکھیں [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` سے `ethereum.transaction.gasLimit` نام تبدیل کر دیا گیا ہے | -| 0.0.4 | ایتھیریم SmartContractCall آبجیکٹ میں `functionSignature` فیلڈ کو شامل کیا گیا | -| 0.0.3 | فیلڈ `سے` ایتھیریم کال آبجیکٹ میں شامل کیا گیا
    />`etherem.call.address` کا نام بدل کر `ethereum.call.to` کردیا گیا | -| 0.0.2 | ایتھیریم ٹرانزیکشن آبجیکٹ میں `input` فیلڈ کو شامل کیا گیا | - -### بلٹ ان اقسام - -اسمبلی اسکرپٹ میں بنی بنیادی اقسام پر دستاویزات [اسمبلی اسکرپٹ وکی](https://github.com/AssemblyScript/assemblyscript/wiki/Types) میں مل سکتی ہیں. - -درج ذیل اضافی اقسام `@graphprotocol/graph-ts` کے ذریعے فراہم کی گئی ہیں. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` `u8` کی ایک صف کی نمائندگی کرتا ہے. - -_تعمیراتی_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - ان پٹ کی لمبائی برابر ہونی چاہیے۔ `0x` کے ساتھ سابقہ ​​لگانا اختیاری ہے. - -_تبادلوں کی قسم_ - -- `toHexString(): string` - `0x` کے ساتھ سابقہ ​​والی ہیکس سٹرنگ میں تبدیل ہوتا ہے. -- `toString(): string` - بائٹس کو UTF-8 سٹرنگ سے تعبیر کرتا ہے. -- `toBase58(): string` - بائٹس کو بیس 58 سٹرنگ میں انکوڈ کرتا ہے. -- `toU32(): u32` - بائٹس کی تشریح لٹل اینڈین `u32` سے کرتا ہے۔ اوور فلو کی صورت میں پھینک دیتا ہے. -- `toI32(): i32` - بائٹ سرنی کو لٹل اینڈین `i32` کے طور پر تشریح کرتا ہے۔ اوور فلو کی صورت میں پھینک دیتا ہے. - -_آپریٹرز_ - -- `equals(y: ByteArray): bool` – کو `x == y` لکھا جا سکتا ہے. -- `b. concat(other: Bytes) : Bytes` - - نئے `Bytes` واپس کریں جس میں `this` براہ راست اس کے بعد `other` -- `b. concatI32(other: i32) : ByteArray` - `this` پر مشتمل نئی `Bytes` واپس کریں براہ راست `other` کی بائٹ نمائندگی کی پیروی کریں - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` کا استعمال صوابدیدی درستگی کے اعشاریہ کی نمائندگی کے لیے کیا جاتا ہے. - -> نوٹ: [اندرونی طور پر](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` [IEEE-754 decimal128 فلوٹنگ پوائنٹ فارمیٹ](https://en.wikipedia.org/wiki/Decimal128_floating-point_format) میں محفوظ ہے، جو 34 اعشاریہ کے ہندسوں کو سپورٹ کرتا ہے۔ یہ `BigDecimal` کو فکسڈ پوائنٹ کی قسموں کی نمائندگی کرنے کے لیے نامناسب بناتا ہے جو 34 ہندسوں سے زیادہ وسیع ہوسکتی ہیں، جیسے کہ سالیڈٹی [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) یا اس کے مساوی. - -_تعمیراتی_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – اعشاریہ تار سے تجزیہ کرتا ہے. - -_تبادلوں کی قسم_ - -- `toString(): string` – اعشاریہ سٹرنگ پر پرنٹ کرتا ہے. - -_ریاضی_ - -- `plus(y: BigDecimal): BigDecimal` – کو `x + y` لکھا جا سکتا ہے. -- `مائنس(y: BigDecimal): BigDecimal` – کو `x - y` لکھا جا سکتا ہے. -- `times(y: BigDecimal): BigDecimal` – کو `x * y` لکھا جا سکتا ہے. -- `div(y: BigDecimal): BigDecimal` – کو `x / y` لکھا جا سکتا ہے. -- `مساوات(y: BigDecimal): bool` – کو `x == y` لکھا جا سکتا ہے. -- `notEqual(y: BigDecimal): bool` – کو `x != y` لکھا جا سکتا ہے. -- `lt(y: BigDecimal): bool` – کے طور پر لکھا جا سکتا ہے `x < y`. -- `le(y: BigDecimal): bool` – کو `x <= y` لکھا جا سکتا ہے. -- `gt(y: BigDecimal): bool` – لکھا جا سکتا ہے `x > y`. -- `ge(y: BigDecimal): bool` – کو `x >= y` لکھا جا سکتا ہے. -- `neg(): BigDecimal` - بطور `-x` لکھا جا سکتا ہے. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` بڑے عدد کی نمائندگی کرنے کے لیے استعمال ہوتا ہے۔ اس میں `uint32` سے `uint256` اور `int64` سے `int256` قسم کی ایتھیریم اقدار شامل ہیں۔ `uint32` کے نیچے ہر چیز، جیسے `int32`، `uint24` یا `int8` کو `i32` کے طور پر دکھایا گیا ہے. - -`BigInt` کلاس میں درج ذیل API ہے: - -_تعمیراتی_ - -- `BigInt.fromI32(x: i32): BigInt` – `i32` سے `BigInt` بناتا ہے. -- `BigInt.fromString(s: string): BigInt`– سٹرنگ سے `BigInt` پارس کرتا ہے. -- `BigInt.fromUnsignedBytes(x: bytes): BigInt` – `bytes` کو ایک غیر دستخط شدہ، لٹل اینڈین انٹیجر کے طور پر تشریح کرتا ہے۔ اگر آپ کا ان پٹ بڑا اینڈین ہے تو پہلے `.reverse()` کو کال کریں. -- `BigInt.fromSignedBytes(x: bytes): BigInt` – `bytes` کو ایک دستخط شدہ، لٹل اینڈین انٹیجر کے بطور تشریح کرتا ہے۔ اگر آپ کا ان پٹ بڑا اینڈین ہے تو پہلے `.reverse()` کو کال کریں. - - _تبادلوں کی قسم_ - -- `x.toHex(): string` – `BigInt` کو ہیکساڈیسیمل حروف کی تار میں بدل دیتا ہے. -- `x.toString(): string` – `BigInt` کو اعشاریہ نمبر کی تار میں بدل دیتا ہے. -- `x.toI32(): i32` – `BigInt` کو بطور `i32` لوٹاتا ہے؛ ناکام ہوجاتا ہے اگر قدر `i32` میں فٹ نہیں ہوتی ہے۔ پہلے `x.isI32()` کو چیک کرنا اچھا خیال ہے. -- `x.toBigDecimal(): BigDecimal` - بغیر کسی جزوی حصے کے اعشاریہ میں تبدیل ہوتا ہے. - -_ریاضی_ - -- `x.plus(y: BigInt): BigInt` – کو `x + y` لکھا جا سکتا ہے. -- `x.minus(y: BigInt): BigInt` – کو `x - y` لکھا جا سکتا ہے. -- `x.times(y: BigInt): BigInt` – کو `x * y` لکھا جا سکتا ہے. -- `x.div(y: BigInt): BigInt` – کو `x / y` لکھا جا سکتا ہے. -- `x.mod(y: BigInt): BigInt` – کو `x % y` لکھا جا سکتا ہے. -- `x.equals(y: BigInt): bool` – کو `x == y` لکھا جا سکتا ہے. -- `x.notEqual(y: BigInt): bool` – کو `x != y` لکھا جا سکتا ہے. -- `x.lt(y: BigInt): bool` – کے طور پر لکھا جا سکتا ہے `x < y`. -- `x.le(y: BigInt): bool` – کو `x <= y` لکھا جا سکتا ہے. -- `x.gt(y: BigInt): bool` – لکھا جا سکتا ہے `x > y`. -- `x.ge(y: BigInt): bool` – کو `x >= y` لکھا جا سکتا ہے. -- `x.neg(): BigInt` – لکھا جا سکتا ہے بطور `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – اعشاریہ سے تقسیم کرتا ہے، اعشاریہ نتیجہ دیتا ہے. -- `x.isZero(): bool` - یہ چیک کرنے کی سہولت کہ آیا نمبر صفر ہے. -- `x.isI32(): bool` – چیک کریں کہ آیا نمبر `i32` میں فٹ بیٹھتا ہے. -- `x.abs(): BigInt` - مطلق قدر. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – لکھا جا سکتا ہے `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – لکھا جا سکتا ہے بطور `x & y`. -- `leftshift(x: BigInt, bits: u8): BigInt` – لکھا جا سکتا ہے `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – لکھا جا سکتا ہے `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` کو کلیدی قدر کے جوڑوں کو ذخیرہ کرنے کے لیے استعمال کیا جا سکتا ہے۔ [یہ مثال](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51) دیکھیں. - -`TypedMap` کلاس میں درج ذیل API ہے: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K، value: V): void` – `key` کی قدر کو `value` پر سیٹ کرتا ہے -- `map.getEntry(key: K): TypedMapEntry | null` – `key` یا `null` کے لیے کلیدی قدر کا جوڑا واپس کرتا ہے اگر `key` نقشے میں موجود نہیں ہے -- `map.get(key: K): V | null` - `key` یا `null` کی قدر لوٹاتا ہے اگر `key` نقشے میں موجود نہیں ہے -- `map.isSet(key: K): bool` – `true` واپس کرتا ہے اگر نقشے میں `key` موجود ہو اور `false` اگر ایسا نہیں ہوتا - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`bytes` کا استعمال بائٹس کی صوابدیدی لمبائی والی صفوں کی نمائندگی کے لیے کیا جاتا ہے۔ اس میں `bytes`، `bytes32`، وغیرہ کی ایتھریم قدریں شامل ہیں. - -`Bytes` کلاس اسمبلی اسکرپٹ کی [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) اور یہ تمام `Uint8Array` فعالیت کے علاوہ درج ذیل نئے طریقوں کی حمایت کرتا ہے: - -_تعمیراتی_ - -- `fromHexString(hex: string) : Bytes` - اسٹرنگ `hex` کو تبدیل کریں جس میں ہیکساڈیسیمل ہندسوں کی یکساں تعداد کو `ByteArray` میں تبدیل کریں۔ سٹرنگ `hex` اختیاری طور پر `0x` سے شروع ہو سکتی ہے -- `fromI32(i: i32) : Bytes` - `i` کو بائٹس کی صف میں تبدیل کریں - -_تبادلوں کی قسم_ - -- `b.toHex()` - صف میں بائٹس کی نمائندگی کرنے والی ایک ہیکساڈیسیمل سٹرنگ لوٹاتا ہے -- `b.toString()` - صف میں موجود بائٹس کو یونیکوڈ حروف کی تار میں تبدیل کرتا ہے -- `b.toBase58()` - ایک ایتھریم بائٹس ویلیو کو base58 انکوڈنگ میں بدل دیتا ہے (IPFS ہیشز کے لیے استعمال کیا جاتا ہے) - -_آپریٹرز_ - -- `b.concat(other: Bytes) : Bytes` - - نئے `Bytes` واپس کریں جس میں `this` براہ راست اس کے بعد `other` -- `b.concatI32(other: i32) : ByteArray` - `اس` پر مشتمل نئی `Bytes` واپس کریں براہ راست `other` کی بائٹ نمائندگی کی پیروی کریں - -#### ایڈریس - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`address` ایتھریم `Address` اقدار کی نمائندگی کرنے کے لیے `Bytes` کو بڑھاتا ہے. - -یہ `Bytes` API کے اوپر درج ذیل طریقہ کو شامل کرتا ہے: - -- `Address.fromString(s: string): Address` – ایک ہیکساڈیسیمل سٹرنگ سے ایک `Address` بناتا ہے -- `Address.fromBytes(b: Bytes): Address` – `b` سے ایک `address` بنائیں جو بالکل 20 بائٹس لمبا ہونا چاہیے۔ کم یا زیادہ بائٹس والی قدر میں گزرنے کے نتیجے میں ایک خرابی ہوگی - -### سٹور API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -`store` API ہستیوں کو گراف نوڈ اسٹور سے اور اس میں لوڈ کرنے، محفوظ کرنے اور ہٹانے کی اجازت دیتا ہے. - -سب گراف کے گراف کیو ایل اسکیما میں بیان کردہ `@entity` اقسام کے لیے اسٹور کے نقشے پر لکھی گئی ہستیاں۔ ان اداروں کے ساتھ کام کرنے کو آسان بنانے کے لیے،[گراف CLI](https://github.com/graphprotocol/graph-cli) کی فراہم کردہ `graph codegen` کمانڈ ہستی تیار کرتی ہے۔ کلاسز، جو بلٹ ان `Entity` قسم کی سب کلاسیں ہیں، اسکیما میں موجود فیلڈز کے لیے پراپرٹی حاصل کرنے والے اور سیٹرز کے ساتھ ساتھ ان اداروں کو لوڈ کرنے اور محفوظ کرنے کے طریقے. - -#### ہستیوں کی تخلیق - -ایتھریم ایونٹس سے ہستیوں کو بنانے کے لیے درج ذیل ایک عام نمونہ ہے. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -جب چین پر کارروائی کرتے وقت کسی `Transfer` ایونٹ کا سامنا ہوتا ہے، تو اسے `HandleTransfer` ایونٹ ہینڈلر کے پاس بھیج دیا جاتا ہے جس کا استعمال کیا گیا `Transfer` قسم (عرف ` >TransferEvent` یہاں ہستی کی قسم کے ساتھ نام کے تنازعہ سے بچنے کے لیے)۔ یہ قسم ایونٹ کے پیرنٹ ٹرانزیکشن اور اس کے پیرامیٹرز جیسے ڈیٹا تک رسائی کی اجازت دیتی ہے. - -دیگر ہستیوں کے ساتھ ٹکراؤ سے بچنے کے لیے ہر ایک کے پاس ایک منفرد ID ہونا ضروری ہے۔ ایونٹ کے پیرامیٹرز میں ایک منفرد شناخت کنندہ شامل کرنا کافی عام ہے جسے استعمال کیا جا سکتا ہے۔ نوٹ: ٹرانزیکشن ہیش کو ID کے طور پر استعمال کرنے سے یہ فرض ہوتا ہے کہ ایک ہی ٹرانزیکشن میں کوئی اور ایونٹ اس ہیش کے ساتھ ID کے طور پر نہیں بنتا ہے. - -#### اسٹور سے ہستیوں کو لوڈ کرنا - -اگر کوئی ہستی پہلے سے موجود ہے تو اسے اسٹور سے درج ذیل کے ساتھ لوڈ کیا جا سکتا ہے: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -چونکہ ہستی ابھی تک اسٹور میں موجود نہیں ہوسکتی ہے، اس لیے `load` طریقہ `Transfer | method returns a value of type null`۔ اس لیے قدر کو استعمال کرنے سے پہلے `null` کیس کو چیک کرنا ضروری ہو سکتا ہے. - -> **نوٹ:** ہستیوں کو لوڈ کرنا صرف اس صورت میں ضروری ہے جب میپنگ میں کی گئی تبدیلیاں کسی ہستی کے سابقہ ​​ڈیٹا پر منحصر ہوں۔ موجودہ ہستیوں کو اپ ڈیٹ کرنے کے دو طریقوں کے لیے اگلا حصہ دیکھیں. - -#### بلاک کے ساتھ تخلیق کردہ ہستیوں کو تلاش کرنا - -`graph-node` v0.31.0، `@graphprotocol/graph-ts` v0.30.0 اور `@graphprotocol/graph-cli` v0.49.0 کے مطابق `loadInBlock` طریقہ تمام ہستی کی اقسام پر دستیاب ہے. - -اسٹور API ان اینٹیٹیز کی بازیافت میں سہولت فراہم کرتا ہے جو موجودہ بلاک میں تخلیق یا اپ ڈیٹ کی گئی تھیں۔ اس کے لیے ایک عام صورت حال یہ ہے کہ ایک ہینڈلر کسی آن چین ایونٹ سے ٹرانزیکشن بناتا ہے، اور بعد کا ہینڈلر اس ٹرانزیکشن تک رسائی حاصل کرنا چاہتا ہے اگر یہ موجود ہو۔ ایسی صورت میں جہاں ٹرانزیکشن موجود نہیں ہے، سب گراف کو صرف یہ جاننے کے لیے ڈیٹا بیس میں جانا پڑے گا کہ ہستی موجود نہیں ہے۔ اگر سب گراف مصنف پہلے ہی جانتا ہے کہ ہستی کو اسی بلاک میں بنایا گیا ہو گا، تو loadInBlock کا استعمال اس ڈیٹا بیس راؤنڈ ٹرپ سے گریز کرتا ہے۔ کچھ سب گرافس کے لیے، یہ کھوئی ہوئی تلاشیں انڈیکسنگ کے وقت میں اہم کردار ادا کر سکتی ہیں. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> نوٹ: اگر دیے گئے بلاک میں کوئی ہستی نہیں بنائی گئی ہے، تو `loadInBlock` `null` لوٹائے گا چاہے اسٹور میں دی گئی ID والی کوئی ہستی موجود ہو. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### موجودہ ہستیوں کو اپ ڈیٹ کرنا - -موجودہ ہستی کو اپ ڈیٹ کرنے کے دو طریقے ہیں: - -1. ہستی کو اس کے ساتھ لوڈ کریں جیسے `Transfer.load(id)`، ہستی پر پراپرٹیز سیٹ کریں، پھر `.save()` اسے اسٹور پر واپس کریں. -2. بس اس کے ساتھ ہستی بنائیں جیسے `new Transfer(id)`، ہستی پر پراپرٹیز سیٹ کریں، پھر اسے اسٹور پر `.save()` کریں۔ اگر ہستی پہلے سے موجود ہے تو تبدیلیاں اس میں ضم ہوجاتی ہیں. - -پراپرٹیز کو تبدیل کرنا زیادہ تر معاملات میں سیدھا آگے ہے، جنریٹڈ پراپرٹی سیٹرز کی بدولت: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -درج ذیل دو ہدایات میں سے کسی ایک کے ساتھ پراپرٹیز کو غیر سیٹ کرنا بھی ممکن ہے: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -یہ صرف اختیاری خصوصیات کے ساتھ کام کرتا ہے، یعنی وہ خصوصیات جو GraphQL میں `!` کے بغیر اعلان کی جاتی ہیں۔ دو مثالیں ہوں گی `owner: bytes` یا `amount: BigInt`. - -ایرے کی خصوصیات کو اپ ڈیٹ کرنا کچھ زیادہ ہی شامل ہے، کیونکہ کسی ہستی سے صف حاصل کرنے سے اس صف کی ایک کاپی بن جاتی ہے۔ اس کا مطلب ہے کہ ایرے کو تبدیل کرنے کے بعد ایرے کی خصوصیات کو دوبارہ واضح طور پر سیٹ کرنا ہوگا۔ مندرجہ ذیل فرض کرتا ہے کہ `entity` میں `numbers: [BigInt!]!` فیلڈ. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### اسٹور سے ہستیوں کو ہٹانا - -فی الحال پیدا شدہ اقسام کے ذریعے کسی ہستی کو ہٹانے کا کوئی طریقہ نہیں ہے۔ اس کے بجائے، کسی ہستی کو ہٹانے کے لیے ہستی کی قسم کا نام اور ہستی ID کو `store.remove` پر منتقل کرنا ہوگا: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### ایتھیریم API - -ایتھیریم API سمارٹ کنٹریکٹس، پبلک سٹیٹ ویری ایبلز، کنٹریکٹ فنکشنز، ایونٹس، ٹرانزیکشنز، بلاکس اور انکوڈنگ/ڈی کوڈنگ ایتھیریم ڈیٹا تک رسائی فراہم کرتا ہے. - -#### ایتھریم کی اقسام کے لیے سپورٹایتھیریم - -ہستیوں کی طرح، `graph codegen` سب گراف میں استعمال ہونے والے تمام سمارٹ کنٹریکٹس اور ایونٹس کے لیے کلاسز تیار کرتا ہے۔ اس کے لیے، کنٹریکٹ ABIs کو سب گراف مینی فیسٹ میں ڈیٹا سورس کا حصہ بننے کی ضرورت ہے۔ عام طور پر، ABI فائلیں `abis/` فولڈر میں محفوظ ہوتی ہیں. - -تیار کردہ کلاسوں کے ساتھ، ایتھریم کی اقسام اور [بلٹ ان اقسام](#built-in-types) کے درمیان تبدیلیاں پردے کے پیچھے ہوتی ہیں تاکہ سب گراف مصنفین کو ان کے بارے میں فکر کرنے کی ضرورت نہ ہو. - -مندرجہ ذیل مثال اس کی وضاحت کرتی ہے۔ جیسا کہ سب گراف اسکیما دیا گیا - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -اور ایتھیریم پر ایک `Transfer(address,address,uint256)` ایونٹ کے دستخط، `سے`، `سے` اور `رقم` اقدار قسم کی `address`، `address` اور `uint256` کو `Address` اور `BigInt` میں تبدیل کیا جاتا ہے، جس کی اجازت دی جاتی ہے۔ انہیں `Bytes!` اور `BigInt!` خصوصیات کو `Transfer` ہستی کو منتقل کیا جائے گا: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### ایونٹس اور بلاک/ٹرانزیکشن ڈیٹا - -ایتھیریم ایونٹس ایونٹ ہینڈلرز کو منتقل کیے گئے، جیسے کہ پچھلی مثالوں میں `Transfer` ایونٹ، نہ صرف ایونٹ کے پیرامیٹرز تک رسائی فراہم کرتے ہیں بلکہ ان کے پیرنٹ ٹرانزیکشن اور اس بلاک تک بھی رسائی فراہم کرتے ہیں جس کا وہ حصہ ہیں۔ مندرجہ ذیل ڈیٹا کو `event` مثالوں سے حاصل کیا جاسکتا ہے (یہ کلاسز `graph-ts` میں `ethereum` ماڈیول کا حصہ ہیں): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### سمارٹ کنٹریکٹ اسٹیٹ تک رسائی - -`graph codegen` کے ذریعے تیار کردہ کوڈ میں سب گراف میں استعمال ہونے والے سمارٹ کنٹریکٹس کی کلاسز بھی شامل ہیں۔ یہ موجودہ بلاک میں عوامی ریاست کے متغیرات اور معاہدے کے کال فنکشنز تک رسائی حاصل کرنے کے لیے استعمال کیے جا سکتے ہیں. - -ایک عام نمونہ اس معاہدے تک رسائی حاصل کرنا ہے جہاں سے کوئی واقعہ شروع ہوتا ہے۔ یہ مندرجہ ذیل کوڈ کے ساتھ حاصل کیا جاتا ہے: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` کو یہاں `TransferEvent` کا نام دیا گیا ہے تاکہ ہستی کی قسم کے ساتھ نام کے تنازعہ سے بچا جا سکے - -جب تک ایتھیریم پر `ERC20Contract` میں ایک عوامی صرف پڑھنے والا فنکشن ہے جسے `symbol` کہتے ہیں، اسے `.symbol()` کے ساتھ بلایا جا سکتا ہے۔ عوامی ریاست کے متغیرات کے لیے اسی نام کے ساتھ ایک طریقہ خود بخود بن جاتا ہے. - -کوئی بھی دوسرا کنٹریکٹ جو سب گراف کا حصہ ہے، تیار کردہ کوڈ سے درآمد کیا جا سکتا ہے اور اسے ایک درست ایڈریس کا پابند کیا جا سکتا ہے. - -#### واپس آنے والی کالوں کو ہینڈل کرنا - -اگر آپ کے کنٹریکٹ کے صرف پڑھنے کے طریقے واپس آ سکتے ہیں، تو آپ کو `try_` کے ساتھ پہلے سے تیار کردہ کنٹریکٹ کے طریقہ کار کو کال کرکے ہینڈل کرنا چاہیے۔ مثال کے طور پر، کشش ثقل کا کنٹریکٹ `gravatarToOwner` طریقہ کو بے نقاب کرتا ہے۔ یہ کوڈ اس طریقہ میں واپسی کو سنبھالنے کے قابل ہو گا: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -نوٹ کریں کہ گیتھ یا انفورا کلائنٹ سے منسلک گراف نوڈ تمام ریورٹس کا پتہ نہیں لگا سکتا، اگر آپ اس پر بھروسہ کرتے ہیں تو ہم پیراٹی کلائنٹ سے منسلک گراف نوڈ استعمال کرنے کی تجویز کرتے ہیں. - -#### انکوڈنگ/ڈی کوڈنگ ABI - -ڈیٹا کو `ethereum` ماڈیول میں `encode` اور `decode` فنکشنز کا استعمال کرتے ہوئے ایتھیریم کے ABI انکوڈنگ فارمیٹ کے مطابق انکوڈ اور ڈی کوڈ کیا جا سکتا ہے. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -مزید معلومات کے لیے: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- انکوڈنگ/ڈی کوڈنگ [رسٹ لائبریری/CLI](https://github.com/rust-ethereum/ethabi) -- مزید [پیچیدہ مثال](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### لاگنگ API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -`log` API سب گرافوں کو گراف نوڈ معیاری آؤٹ پٹ کے ساتھ ساتھ گراف ایکسپلورر میں معلومات کو لاگ کرنے کی اجازت دیتا ہے۔ مختلف لاگ سطحوں کا استعمال کرتے ہوئے پیغامات کو لاگ ان کیا جا سکتا ہے۔ دلیل سے لاگ پیغامات تحریر کرنے کے لیے ایک بنیادی فارمیٹ سٹرنگ نحو فراہم کیا جاتا ہے. - -`log` API میں درج ذیل افعال شامل ہیں: - -- `log.debug(fmt: string, args: Array): void` - ڈیبگ پیغام کو لاگ کرتا ہے. -- `log.info(fmt: string, args: Array): void` - ایک معلوماتی پیغام کو لاگ کرتا ہے. -- `log.warning(fmt: string, args: Array): void` - ایک وارننگ لاگ کرتا ہے. -- `log.error(fmt: string، args: Array): void` - غلطی کا پیغام لاگ کرتا ہے. -- `log.critical(fmt: string, args: Array): void` – ایک اہم پیغام لاگ کرتا ہے _اور_ سب گراف کو ختم کرتا ہے. - -`log` API فارمیٹ سٹرنگ اور سٹرنگ کی قدروں کی ایک صف لیتا ہے۔ اس کے بعد یہ پلیس ہولڈرز کو صف سے سٹرنگ ویلیوز سے بدل دیتا ہے۔ پہلا `{}` پلیس ہولڈر صف میں پہلی قدر سے بدل جاتا ہے، دوسرا `{}` پلیس ہولڈر دوسری قدر سے بدل جاتا ہے وغیرہ. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### ایک یا زیادہ اقدار کو لاگ کرنا - -##### ایک سنگل ویلیو لاگ کرنا - -ذیل کی مثال میں، اسٹرنگ ویلیو "A" کو لاگ ان ہونے سے پہلے `['A']` بننے کے لیے ایک صف میں منتقل کیا جاتا ہے: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### موجودہ صف سے ایک ہی اندراج کو لاگ کرنا - -نیچے دی گئی مثال میں، تین ویلیوس پر مشتمل ایرے کے باوجود، آرگیومینٹ ایرے کی صرف پہلی ویلیو لاگ ان ہوتی ہے. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### موجودہ ایرے سے متعدد اندراجات کو لاگ کرنا - -دلائل کی صف میں ہر اندراج کے لیے لاگ میسج سٹرنگ میں اس کے اپنے پلیس ہولڈر `{}` کی ضرورت ہوتی ہے۔ ذیل کی مثال لاگ پیغام میں تین پلیس ہولڈرز `{}` پر مشتمل ہے۔ اس کی وجہ سے، `myArray` میں تینوں اقدار لاگ ان ہیں. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### موجودہ صف سے مخصوص اندراج کو لاگ کرنا - -صف میں ایک مخصوص قدر ظاہر کرنے کے لیے، انڈیکس قدر فراہم کی جانی چاہیے. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### لاگنگ ایونٹ کی معلومات - -ذیل کی مثال کسی ایونٹ سے بلاک نمبر، بلاک ہیش اور ٹرانزیکشن ہیش کو لاگ کرتی ہے: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -سمارٹ کنٹریکٹس کبھی کبھار IPFS فائلوں کو چین پر اینکر کرتے ہیں۔ یہ میپنگ کو کنٹریکٹس سے IPFS ہیشز حاصل کرنے اور IPFS سے متعلقہ فائلوں کو پڑھنے کی اجازت دیتا ہے۔ فائل ڈیٹا کو `Bytes` کے بطور واپس کیا جائے گا، جس کے لیے عام طور پر مزید کارروائی کی ضرورت ہوتی ہے، جیسے `json` API کے ساتھ اس صفحہ پر بعد میں دستاویز کیا گیا ہے. - -IPFS ہیش یا پاتھ کو دیکھتے ہوئے، IPFS سے فائل کو پڑھنا اس طرح کیا جاتا ہے: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**نوٹ:** `ipfs.cat` اس وقت فیصلہ کن نہیں ہے۔ اگر درخواست کا وقت ختم ہونے سے پہلے فائل کو IPFS نیٹ ورک پر بازیافت نہیں کیا جا سکتا ہے، تو یہ `null` لوٹائے گی۔ اس کی وجہ سے، یہ ہمیشہ `null` کا نتیجہ چیک کرنے کے قابل ہے. - -`ipfs.map` کے ساتھ اسٹریمنگ انداز میں بڑی فائلوں پر کارروائی کرنا بھی ممکن ہے۔ فنکشن IPFS فائل کے لیے ہیش یا پاتھ، کال بیک کا نام، اور جھنڈوں سے اس کے رویے میں ترمیم کی توقع رکھتا ہے: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -فی الحال تعاون یافتہ واحد فلیگ `json` ہے، جسے `ipfs.map` کو پاس کرنا ضروری ہے۔ `json` فلیگ کے ساتھ، IPFS فائل JSON اقدار کی ایک سیریز پر مشتمل ہونی چاہیے، فی لائن ایک ویلیو۔ `ipfs.map` پر کال فائل کی ہر سطر کو پڑھے گی، اسے `JSONValue` میں ڈی سیریلائز کرے گی اور ان میں سے ہر ایک کے لیے کال بیک کال کرے گی۔ کال بیک پھر `JSONValue` سے ڈیٹا اسٹور کرنے کے لیے ہستی کی کاروائیوں کا استعمال کر سکتا ہے۔ ہستی کی تبدیلیاں صرف اس وقت محفوظ کی جاتی ہیں جب ہینڈلر جسے `ipfs.map` کہتے ہیں کامیابی سے ختم ہو جاتا ہے۔ اس دوران، وہ میموری میں رکھے جاتے ہیں، اور فائل کا سائز جس پر `ipfs.map` کارروائی کر سکتا ہے اس لیے محدود ہے. - -کامیابی پر، `ipfs.map` `void` لوٹاتا ہے۔ اگر کال بیک کی کوئی درخواست غلطی کا باعث بنتی ہے تو، ہینڈلر جس نے `ipfs.map` کی درخواست کی تھی اسے روک دیا جاتا ہے، اور سب گراف کو ناکام کے بطور نشان زد کیا جاتا ہے. - -### کرپٹو API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -`crypto` API نقشہ سازی میں استعمال کے لیے ایک کرپٹوگرافک فنکشنز دستیاب کرتا ہے۔ ابھی، صرف ایک ہے: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON ڈیٹا کو `json` API کا استعمال کرتے ہوئے پارس کیا جا سکتا ہے: - -- `json.fromBytes(data: bytes): JSONValue` - ایک درست UTF-8 ترتیب کے طور پر تشریح کردہ `Bytes` صف سے JSON ڈیٹا کو پارس کرتا ہے -- `json.try_fromBytes(data: bytes): نتیجہ` – `json.fromBytes` کا محفوظ ورژن، اگر پارسنگ ناکام ہو جاتی ہے تو یہ ایک خرابی کی قسم لوٹاتا ہے -- `json.fromString(data: string): JSONValue` – JSON ڈیٹا کو ایک درست UTF-8 `String` سے پارس کرتا ہے -- `json.try_fromString(data: string): Result ` – `json.fromString` کا محفوظ ورژن، اگر پارسنگ ناکام ہو جاتی ہے تو یہ ایک خرابی کی قسم لوٹاتا ہے - -`JSONValue` کلاس صوابدیدی JSON دستاویز سے ویلیوز کو نکالنے کا ایک طریقہ فراہم کرتی ہے۔ چونکہ JSON قدریں بولین، نمبرز، ارے اور بہت کچھ ہو سکتی ہیں، اس لیے `JSONValue` کسی ویلیو کی قسم کو چیک کرنے کے لیے ایک `kind` پراپرٹی کے ساتھ آتا ہے: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -اس کے علاوہ، یہ چیک کرنے کا ایک طریقہ ہے کہ آیا قدر `null` ہے: - -- `value.isNull(): boolean` - -جب کسی ویلیو کی قسم یقینی ہو، تو اسے درج ذیل طریقوں میں سے کسی ایک کا استعمال کرتے ہوئے [بلٹ ان ٹائپ](#built-in-types) میں تبدیل کیا جا سکتا ہے: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (اور پھر `JSONValue` کو اوپر کے 5 طریقوں میں سے ایک کے ساتھ تبدیل کریں) - -### تبادلوں کا حوالہ ٹائپ کریں - -| ذرائع | منزل | تبادلوں کی تقریب | -| -------------------- | -------------------- | ---------------------------- | -| ایڈریس | Bytes | none | -| ایڈریس | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toBase58() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | بولیئن | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | ایڈریس | Address.fromString(s) | -| Bytes | ایڈریس | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### ڈیٹا ماخذ میٹا ڈیٹا - -آپ ڈیٹا سورس کے کنٹریکٹ ایڈریس کو انسپیکٹ کر سکتے ہیں، نیٹ ورک اور سیاق و سباق کا معائنہ کر سکتے ہیں جس نے ہینڈلر کو `dataSource` نام کی جگہ کے ذریعے مدعو کیا تھا: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### ہستی اور ڈیٹا سورس سیاق و سباق - -بیس `Entity` کلاس اور چائلڈ `DataSourceContext` کلاس میں فیلڈز کو متحرک طور پر سیٹ کرنے اور حاصل کرنے میں مددگار ہوتے ہیں: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### مشترکہ اسمبلی سکرپٹ کے مسائل - -کچھ [اسمبلی اسکرپٹ](https://github.com/AssemblyScript/assemblyscript) کے مسائل ہیں جو سب گراف کی ترقی کے دوران عام ہیں۔ وہ ڈیبگ کی دشواری میں ہیں، تاہم، ان کے بارے میں آگاہ ہونے سے مدد مل سکتی ہے۔ مندرجہ ذیل ان مسائل کی ایک غیر مکمل فہرست ہے: - -- `Private` کلاس متغیرات کو [اسمبلی اسکرپٹ](https://www.assemblyscript.org/status.html#language-features) میں نافذ نہیں کیا جاتا ہے۔ کلاس کے متغیرات کو کلاس آبجیکٹ سے براہ راست تبدیل ہونے سے بچانے کا کوئی طریقہ نہیں ہے. -- دائرہ کار [کلوژر فنکشنز](https://www.assemblyscript.org/status.html#on-closures) میں وراثت میں نہیں ملا ہے، یعنی بندش کے فنکشنز سے باہر اعلان کردہ متغیرات کو استعمال نہیں کیا جا سکتا۔ [ڈیولپر ہائی لائٹس #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s) میں وضاحت. diff --git a/website/pages/ur/network-transition-faq.mdx b/website/pages/ur/network-transition-faq.mdx deleted file mode 100644 index f015132d0f40..000000000000 --- a/website/pages/ur/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: نیٹ ورک کی منتقلی کے اکثر پوچھے گئے سوالات ---- - -ڈویلپرز کے پاس اپنے سب گراف کو ڈیسینٹرالائزڈ نیٹ ورک میں منتقل کرنے کے لیے کافی وقت ہوگا۔ درست ٹائم لائنز انڈیکسر اور نیٹ ورک کی تیاری کی بنیاد پر نیٹ ورک سے دوسرے نیٹ ورک میں مختلف ہوں گی- ہوسٹڈ سروس ایک ساتھ تمام نیٹ ورکس کے لیے سپورٹ ختم نہیں کرے گی اور اچانک غروب نہیں ہو گی. - -ہوسٹڈ سروس پر ہر نیٹ ورک، بشمول ایتھیریم، بتدریج غروب ہو جائے گا کیونکہ اسے خصوصیت کی برابری اور اعلیٰ معیار کی خدمت کے حصول کے لیے ڈیسینٹرالائزڈ نیٹ ورک پر تعاون حاصل ہے۔ یہ [MIPs پروگرام](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/) میں انڈیکسرز کی مدد سے نیٹ ورک ٹو نیٹ ورک کی بنیاد پر ہوگا۔ a>، ڈیسینٹرالائزڈ نیٹ ورک پر ہر نیٹ ورک کے لیے مکمل تعاون کو فعال کرنے کے لیے. - -ہوسٹڈ سروس پر ہر نیٹ ورک کے لیے مسلسل تعاون کے بارے میں مزید وضاحت شامل کرنے کے لیے، یہ عمومی سوالنامہ نیٹ ورک کی منتقلی کے عمل کی تفصیلات سے متعلق عام سوالات کے جوابات دیتے ہیں۔ اگر آپ سب گراف کی منتقلی کا عمل ابھی شروع کرنا چاہتے ہیں تو، یہاں ایک [مرحلہ وار گائیڈ](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) ہے۔ منتقلی کے اکثر پوچھے گئے سوالات پر جانے کے لیے، [یہاں کلک کریں](#migration-faqs). - -## ہوسٹڈ سروس سن سیٹ کے عمومی سوالنامہ - -### کیا مجھے اپنا سب گراف منتقل کرنا پڑے گا اس سے پہلے کہ ڈیسینٹرالائزڈ نیٹ ورک سب گرافس کے لیے بنیادی افعال پیش کرے؟ - -سب گراف ڈویلپرز اب اپنے ایتھریم مینیٹ سب گرافس کو منتقل کرنا شروع کر سکتے ہیں، لیکن ڈیسینٹرالائزڈ نیٹ ورک اور ہوسٹڈ سروس کے لیے فیچر کور فنکشنلٹی موجود ہونے سے پہلے سب گراف کو نیٹ ورک میں منتقل کرنے پر مجبور نہیں کیا جائے گا۔ Gnosis نیٹ ورک کے سب گراف کی منتقلی بھی جلد ہی شروع ہو جائے گی، دوسرے نیٹ ورکس کی پیروی کرنے کے بعد ایک بار جب انڈیکسرز نیٹ ورکس کا تجربہ کر لیں اور انہیں پیداوار میں انڈیکس کرنے کے لیے تیار ہو جائیں. - -### ہوسٹڈ سروس کو فرسودہ کرنے کے لیے ٹائم لائن اور عمل کیا ہے؟ - -تمام نیٹ ورکس کی اپنی ٹائم لائنز ہوں گی، اس بات پر منحصر ہے کہ وہ نیٹ ورک پر کب فعال ہوتے ہیں اور ہر مرحلے سے گزرنے میں جو ٹائم لائن لگتی ہے۔ بنیادی ڈویلپرز ہوسٹڈ سروس ٹریفک کی اکثریت کو جلد از جلد ڈیسینٹرالائزڈ نیٹ ورک پر منتقل کرنے کے لیے کام کر رہے ہیں. - -سب سے اہم بات، ڈیسینٹرالائزڈ نیٹ ورک پر آپ کی مخصوص نیٹ ورک/​سب گراف کے لیے بنیادی فعالیت دستیاب ہونے سے پہلے آپ ہوسٹڈ سروس تک رسائی سے محروم نہیں ہوں گے. - -ہر نیٹ ورک کے لیے ہوسٹڈ سروس فرسودگی کے تین الگ الگ مراحل ہیں: - -#### فیز1 (سن رے): نیٹ ورک پر معیار کی برابری رکھنے والے بلاک چینز کے لیے نئے سب گراف کی تخلیق کو غیر فعال کریں - -اس مرحلے میں، اس نیٹ ورک کے لیے ہوسٹڈ سروس میں نئے سب گراف کو مزید تعینات نہیں کر سکیں گے۔ ڈویلپرز اب بھی ہوسٹڈ سروس پر موجودہ سب گراف کو اپ گریڈ کر سکیں گے۔ - -کسی نیٹ ورک نے ابھی تک ہوسٹڈ سروس سے ڈیسینٹرالائزڈ نیٹ ورک میں منتقلی کا مرحلہ 1 شروع نہیں کیا ہے. - -جیسے ہی نیٹ ورکس فیز 1 میں داخل ہوتی ہیں، براہ کرم نوٹ کریں کہ ڈویلپر اب بھی GRT حاصل کیے یا پروٹوکول اکنامکس کے ساتھ تعامل کیے بغیر اپنے سب گراف (1,000 مفت کیوریز) کو تیار کرنے اور جانچنے کے لیے سب گراف سٹوڈیو میں ریٹ محدود ڈویلپر پیش نظارہ URL کا استعمال کر سکتے ہیں. - -#### فیز 2 (سن بیم): سب گراف اپ ڈیٹس کو غیر فعال کریں - -اس مرحلے میں، سب گرافس میں اپ ڈیٹ سب گراف سٹوڈیو کے ذریعے کیا جانا چاہیے اور بعدازاں ڈیسینٹرالائزڈ نیٹ ورک پر شائع کیا جانا چاہیے۔ اس مرحلے میں نیٹ ورکس کے لیے ہوسٹڈ سروس سب گراف اب بھی موجود رہیں گے اور کیوری کے قابل ہوں گے، لیکن سب گراف میں اپ ڈیٹ کرنے کے لیے وہ گراف کے ڈیسینٹرالائزڈ نیٹ ورک پر ہونا چاہیے۔ - -اس فیز میں کوئی نیٹ ورک کب منتقل ہوگی اس کی کوئی درست ٹائم لائنز نہیں ہیں، چونکہ یہ عمل بنیادی فعالیت کے ارد گرد خارجی معیار کے ذریعے چلتا ہے، تاریخوں سے نہیں. - -#### فیز 3 ( سن رائز): کیورنگ کرنے والے سب گراف کو غیر فعال کریں - -اس فیز پر، گراف نیٹ ورک کے ذریعے تعاون یافتہ نیٹ ورک ے لیے ہوسٹڈ سروس پر سب گراف مزید کیوریز پر کارروائی نہیں کریں گے۔ اس فیز میں چینز پر سب گرافس کے لیے بلاکچین ڈیٹا سے کیوری کرنے کا واحد طریقہ ڈیسینٹرالائزڈ نیٹ ورک کے ذریعے ہوگا. ٹیسٹ کے کیوریز اب بھی [سب گراف سٹوڈیو](https://thegraph.com/studio/) میں ڈیولپمنٹ کیوری URL کے ذریعے دستیاب ہوں گے. - -نیٹ ورکس فیز 3 میں اس وقت تک منتقل نہیں ہوں گی جب تک کہ فیز 2 میں کامیابی سے منتقل نہ ہو جائے اور ڈویلپرز کو ڈیسینٹرالائزڈ نیٹ ورک پر منتقل ہونے کے لیے کافی وقت نہ دیا جائے. - -![سب گراف چارٹ](/img/subgraph-chart.png) - -> نوٹ: یہ خاکہ فی نیٹ ورک غروب آفتاب کے عمل کی عکاسی کرتا ہے۔ ہوسٹڈ سروس کے غروب ہونے کے اوقات مختلف ہوں گے اور ایک ساتھ غروب نہیں ہوں گے. - -### Goerli، Mumbai وغیرہ جیسے ٹیسٹ نیٹ ورکس کا کیا ہوتا ہے؟ - -تمام نیٹ ورکس اور ٹیسٹ نیٹ ورکس[سب گراف سٹوڈیو](https://thegraph.com/studio/) میں ایک مفت تعیناتی URL کے لیے اہل ہیں. یہ URL ریٹ محدود ہے اور ٹیسٹ اور ڈویلپمنٹ ٹریفک کے لیے ہے۔ پیداواری ٹریفک کے لیے گراف نیٹ ورک پر شائع ہونے والے سب گراف کی ضرورت ہوگی تاکہ پروڈکشن گریڈ کی فالتو پن اور استحکام ہو. - -![شرح کی حد](/img/rate-limit.png) - -### کیا گراف نیٹ ورک میں وہی فنکشنلٹیز ہیں جو ہوسٹڈ سروس کی ہیں؟ - -گراف نیٹ ورک پر انڈیکسرز سب سے حالیہ نیٹ ورک سے منظور شدہ [گراف نوڈ کی ریلیز](https://github.com/graphprotocol/graph-node/releases) چلاتے ہیں، اور اس ریلیز میں تعاون یافتہ کسی بھی سب گراف کی خصوصیات کو سپورٹ کر سکتا ہے. - -بعض اوقات غیر ریلیز شدہ خصوصیات جو ابھی تک ترقی کے مراحل میں ہیں پہلے ڈیولپر پیش نظارہ URL پر دستیاب ہو سکتی ہیں، جو [گراف نوڈ](https://github.com/graphprotocol/graph-node) کا تازہ ترین مین کمٹ چلاتا ہے. یہ خصوصیات پھر اگلے گراف نوڈ ریلیز کے ساتھ نیٹ ورک پر دستیاب ہو جائیں گی. - -سب گراف کی کچھ خصوصیات انڈیکس کرنے والے انعامات کے لیے اہل نہیں ہیں۔ اگر وہ فیصلہ کن یا نیٹ ورک پر قابل تصدیق نہیں ہیں۔ مخصوص مثالیں IPFS سے فائلیں لانا، اور انڈیکسنگ نیٹ ورکس ہیں جو ابھی تک گراف نیٹ ورک پر تعاون یافتہ نہیں ہیں. - -ان خصوصیات کے ساتھ سب گراف نیٹ ورک پر شائع کیے جا سکتے ہیں، لیکن وہ انڈیکسرز کے ذریعہ نہیں اٹھا سکتے ہیں۔ تاہم، کافی سگنل والے سب گراف اب بھی کیوری کی فیس جمع کرنے میں دلچسپی رکھنے والے انڈیکسرز کو اپنی طرف متوجہ کر سکتے ہیں، جس کے لیے کوئی بھی سب گراف اہل ہے. - -### میرے اپنے انفراسٹرکچر کو چلانے کے مقابلے میں گراف نیٹ ورک کی قیمت کتنی ہے؟ - -جیسا کہ [یہ کیس اسٹڈیز](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month) میں دکھایا گیا ہے، گراف کا ڈیسینٹرالائزڈ نیٹ ورک وقف شدہ انفراسٹرکچر چلانے کے مقابلے میں 90-60% کم مہنکا ہے۔ - -### کیا نیٹ ورک پر منتقل ہونے کے بعد مجھے اپنے ہوسٹڈ سروس سب گراف کے ساتھ کچھ کرنا چاہیے؟ - -الجھن سے بچنے کے لیے اپنے ہوسٹڈ سروس سب گراف کو چھپانے کی سختی سے سفارش کی جاتی ہے۔ [یہ ویڈیو](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) اس عمل سے گزرتا ہے. - -### ڈیسینٹرالائزڈ نیٹ ورک میری ترجیحی نیٹ ورک کو کب سپورٹ کرے گا؟ - -فی نیٹ ورک کی کوئی مقررہ ٹائم لائن نہیں ہے، وہ [MIPs پروگرام](https://thegraph.com/migration-incentive-program/) کے ذریعے انڈیکسنگ کی تیاری کے ذریعے طے کیے جائیں گے جہاں نئے نیٹ ورکس کی جانچ کی جاتی ہے انڈیکسرز چونکہ نیٹ ورک پر نئے نیٹ ورکس کی حمایت کی جاتی ہے، صارفین کو نقل مکانی کی تیاری کے لیے کافی اطلاعات موصول ہوں گی۔ گراف ایکو سسٹم کے کور ڈویلپرز اور تعاون کرنے والے جلد از جلد مزید نیٹ ورکس کے لیے تعاون کو نافذ کرنے کے لیے کام کر رہے ہیں. - -### کیا ایتھیریم مینیٹ نیٹ ورک کی منتقلی کے عمل کے فیز 1 میں داخل ہو رہا ہے؟ - -جبکہ ایتھیریم کی ابتدائی طور پر توقع تھی کہ Q3 2022 کے آخر تک ہوسٹڈ سروس کی منتقلی شروع ہو جائے گی، صارف کے تاثرات کو حل کرنے کے لیے اسے [ملتوی](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) کر دیا گیا ہے۔ صارف کے تجربے میں اضافی بہتری، بلنگ،اور صارف کی درخواستوں کی دیگر تکمیلات میں اضافی بہتری ایتھیریم کی ہوسٹڈ سروس کی منتقلی کی ٹائم لائن کو آگے بڑھائے گی. ذیل میں انٹیگریشن اسٹیٹس ٹریکر کے ذریعے اور [گراف ٹویٹر](https://twitter.com/graphprotocol)کے ذریعے ایتھیریم سن رے مرحلے میں کب داخل ہو گا اس پر تازہ ترین رہیں - -### گراف نیٹ ورک انٹیگریشن اسٹیٹس ٹریکر - -نیچے دی گئی جدول واضح کرتی ہے کہ ہر نیٹ ورک نیٹ ورک انٹیگریشن کے عمل میں کہاں ہے۔ اگر آپ کا ترجیحی نیٹ ورک ابھی تک درج نہیں ہے، انضمام ابھی شروع نہیں ہوا ہے، اور وہ نیٹ ورک اب بھی گراف کی میزبانی کی خدمت کے ذریعے مکمل طور پر تعاون یافتہ ہے. - -> اس ٹیبل میں ٹیسٹ نیٹ ورک شامل نہیں ہوں گی، جو [سب گراف اسٹوڈیو](https://thegraph.com/studio/) میں فارغ رہتی ہیں. - -| نیٹ ورک | گراف نیٹ ورک پر انٹیگریشن کا اعلان | نیٹ ورک انٹیگریشن مکمل | فیز 1: ہوسٹڈ سروس پر نئے سب گراف کو غیر فعال کریں | فیز 2: ہوسٹڈ سروس پر سب گراف اپ ڈیٹس کو غیر فعال کریں | فیز 3: ہوسٹڈ سروس پر سب گراف کو غیر فعال کریں | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (سابقہ ​​xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum-one | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* نیٹ ورک فی الحال گراف کے ڈیسینٹرالائزڈ نیٹ ورک پر بیٹا میں ہے. - -## کیوری کی فیس، API کیز، اور بلنگ کے اکثر پوچھے گئے سوالات - -### کیوری کی فیس کی قیمت کیسے ہے؟ - -کیوری فیس کی قیمتیں ڈیسینٹرالائزڈ نیٹ ورک پر کیوری کی طلب سے متاثر ہوتی ہیں۔ بنیادی ڈویلپرز نے ایک سوال کی قیمت کا تعین کرنے والی لاگت کی ماڈل زبان بنائی جسے [Agora](https://github.com/graphprotocol/agora) کہتے ہیں۔ یہ انڈیکسرز کو قیمت کے کیوریز کو مؤثر طریقے سے قابل بناتا ہے۔ [Agora دستاویزات](https://github.com/graphprotocol/agora/blob/master/docs/README.md) میں مزید جانیں. - -### میں زیادہ سے زیادہ کیوری کا بجٹ کیسے ترتیب دے سکتا ہوں؟ - -صارفین بجٹ ٹیب کے نیچے سب گراف اسٹوڈیو [API کلید](https://thegraph.com/studio/apikeys/) سیکشن میں زیادہ سے زیادہ کیوری کا بجٹ سیٹ کر سکتے ہیں۔ [یہ ویڈیو دیکھیں](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) اس عمل کے جائزہ کے ساتھ ساتھ اپنی API کلید کے دیگر حصوں کو ایڈجسٹ کرنے کے لیے. - -براہ کرم نوٹ کریں کہ آپ کے زیادہ سے زیادہ کیوری کے بجٹ کو بہت کم رکھنے سے انڈیکسرز کو خارج کر دیا جائے گا، جو ممکنہ طور پر ناکام کیوریز، سست کیوریز, وغیرہ کی صورت میں خراب معیار کی خدمت کا باعث بنتا ہے. - -ستمبر 2022 کے آخر تک، سب سے کم کیوری کے بجٹ کے طور پر $0.00035-$0.0004 کی حد کے اندر رہنا بہترین عمل ہے. - -### میں اپنی API کلید کی حفاظت کیسے کر سکتا ہوں؟ - -صارفین کو [ سب گراف اسٹوڈیو](https://thegraph.com/studio/) میں سب گراف اور ڈومین دونوں کے ذریعہ API کلید کو محدود کرنے کی ترغیب دی جاتی ہے: - -![ڈومین کو محدود کریں](/img/restrictdomain.png) - -### کیوری کی فیس کی ادائیگی کے لیے میں اپنی API کلید کو کیسے پُر کروں؟ - -آپ "GRT شامل کریں" کے بٹن کو دبا کر سب گراف اسٹوڈیو [بلنگ ڈیش بورڈ](https://thegraph.com/studio/billing/) میں اپنا بلنگ بیلنس بھر سکتے ہیں۔ مزید ہموار اور اعادی ادائیگیوں کو شامل کرنے کے لیے اس تجربے کو بہتر بنانے کے لیے کام جاری ہے. - -[اس ویڈیو](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) میں اس عمل کا ایک جائزہ ہے. - -### میں اپنی API کلید میں کم بلنگ بیلنس کے لیے انتباہات کیسے ترتیب دوں؟ - -صارفین کو اپنے ای میل پتے پر بلنگ انتباہات [یہاں](https://thegraph.com/studio/settings/) سیٹ کرنا چاہیے. - -نیز، ایک بینر صارف کے UI کے اندر چمکے گا تاکہ بلنگ بیلنس کم ہونے پر خبردار کیا جا سکے. - -میری API کلیدی ترتیبات کو منظم کرنے کے بہترین طریقے کیا ہیں؟ - -سروس کے اعلی معیار کو برقرار رکھتے ہوئے کم اوسط کیوری کی قیمتوں کو برقرار رکھنے کے لیے $0.0004 کے زیادہ سے زیادہ کیوری کے بجٹ کی سفارش کی جاتی ہے۔ یہ [API کلید سیکشن](https://thegraph.com/studio/apikeys/) کے بجٹ بلنگ ٹیب میں کیا جا سکتا ہے. - -## منتقلی کے اکثر پوچھے گئے سوالات - -### میں اپنے سب گراف کو گراف کے ڈیسینٹرالائزڈ نیٹ ورک میں کیسے منتقل کر سکتا ہوں؟ - -اس آسان [مرحلہ بہ قدم گائیڈ](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) کے ساتھ اپنے سب گراف کو گراف نیٹ ورک میں منتقل کرنے کا طریقہ سیکھیں یا [یہ ویڈیو](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### کیا سب گراف کے لیے مائیگریشن گرانٹس ہیں جو پہلے گراف نیٹ ورک میں منتقل ہو جاتے ہیں؟ - -جی ہاں۔ گرانٹ کے لیے درخواست دینے کے لیے، [یہاں](mailto:migration@thegraph.foundation) پہنچیں۔ - -### کیا گراف ایکوسسٹم سے منتقلی کے عمل کے ذریعے کوئی مالی/تکنیکی/مارکیٹنگ سپورٹ ہے؟ - -پروجیکٹس کے لیے مائیگریشن گرانٹس موجود ہیں جن کا استعمال سب گراف (انڈیکسرز کو راغب کرنے کے لیے) اور ابتدائی کیوری کی فیس کی ادائیگی کے لیے ہے (درخواست کریں [یہاں](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com))، ایک [براہ راست چینل](https://discord.gg/graphprotocol) انجینئرز کے لیے ہر قدم پر مدد کرنے کے لیے، اور منتقلی کے بعد آپ کے پروجیکٹس کی نمائش کے لیے ترجیحی مارکیٹنگ مہمات، ان ٹویٹر تھریڈز میں مثال:[1](https://twitter.com/graphprotocol/status/1496891582401814537)[2](https://twitter.com/graphprotocol/status/1491926128302379008)&[3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### کیوریز میں کتنا وقت لگتا ہے؟ - -ڈیسینٹرالائزڈ نیٹ ورک پر کیوریز اوسطاً 150-300 ملی سیکنڈ لیتا ہے. - -### کیا گراف نیٹ ورک پر بلنگ کا عمل ہوسٹڈ سروس سے زیادہ پیچیدہ ہے؟ - -ہاں، نیٹ ورک کے لیے UX ابھی تک ہوسٹڈ سروس کے ساتھ معیار کی برابری پر نہیں ہے۔ بلنگ UX، خاص طور پر، ابھی بھی بہت ابتدائی مراحل میں ہے اور بہت سے متحرک حصے ہیں جنہیں بنیادی دیو ٹیمیں اس عمل سے الگ کرنے کے لیے کام کر رہی ہیں۔ ان میں سے زیادہ تر بہتری کو مستقبل قریب میں عام کیا جائے گا. - -### کیا میں گراف نیٹ ورک کے کیوریز کے لیے فیاٹ، کریڈٹ کارڈ، یا سٹیبل کوائنز میں ادائیگی کر سکتا ہوں؟ - -آنے والے مہینوں میں، صارفین کو اپنے سب گرافس کی ادائیگی کے لیے جو اقدامات کرنے کی ضرورت ہے ان کی تعداد میں کافی حد تک کمی ہو جائے گی۔ جبکہ ادائیگیاں ابھی بھی GRT میں کی جائیں گی، فیاٹ آن ریمپ اور خودکار ادائیگی کے نظام کو لاگو کرنے کی کوششیں فیاٹ اور کرپٹو کو GRT میں تبدیل کرنے کے لیے پہلے سے ہی جاری ہیں. - -### کیا نیٹ ورک میں کبھی بھی وہی UX ہوگا جو ہوسٹڈ سروس ہے؟ - -اگرچہ ابھی کام کرنا باقی ہے، مقصد یہ ہے کہ اگر گراف نیٹ ورک پر اس وقت ہوسٹڈ سروس پر موجود اس سے بہتر معیار کا UX نہیں تو موازنہ پیش کرنا ہے۔ قلیل مدتی، مقصد ایک زیادہ ہموار اور پیش قیاسی بلنگ کا تجربہ پیش کرنا ہے جو صارفین کو اعلیٰ معیار کے ڈیپ بنانے میں زیادہ وقت مرکوز کرنے میں مدد کرتا ہے. - -### میں یہ کیسے یقینی بنا سکتا ہوں کہ میرا سب گراف گراف نیٹ ورک پر انڈیکسر کے ذریعے اٹھایا جائے گا؟ - -کم از کم 10,000 GRT کے ساتھ کیوریٹ کرنے کی سفارش کی جاتی ہے، جسے صارفین اسی ٹرانزیکشن میں کر سکتے ہیں جیسا کہ وہ شائع کرتے وقت کرتے ہیں۔ صارفین کیوریشن کمیونٹی سے [یہاں](https://t.me/CurationStation) اپنا سب گراف کیوریشن کرنے کے لیے بھی کہہ سکتے ہیں. - -ان ابتدائی اخراجات کو پورا کرنے کے لیے ابتدائی منتقلی کرنے والوں کے لیے منتقلی کی گرانٹس موجود ہیں۔ بلا جھجھک [یہاں](mailto:migration@thegraph.foundation) اپلائی کریں۔ - -### سب گراف کو کیوریشن سگنل کی ضرورت کیوں ہے؟ اگر میرے سب گراف پر کیوریٹرز کی طرف سے کافی سگنل نہیں ہے تو کیا ہوگا؟ - -کیوریشن سگنل جتنا اونچا ہوگا، انڈیکسرز کے لیے سب گراف اتنا ہی زیادہ پرکشش ہوگا، کیونکہ اعلیٰ سگنل اور اعلیٰ انڈیکسنگ کے انعامات کے درمیان ایک لکیری تعلق ہے۔ کیوریشن کے بغیر، انڈیکسرز کے لیے سب گراف لینے کی کوئی ترغیب نہیں ہے. - -### GRT کا کیا ہوتا ہے جو سب گراف ڈویلپر کیوریشن سگنل کے لیے استعمال کرتا ہے؟ - -اگر آپ سب گراف کو سگنل دینے والے پہلے فرد ہیں، تو آپ کی GRT سگنل کی رقم کم نہیں ہوگی۔ کیوریشن کے لیے استعمال ہونے والا GRT بعد میں ہٹایا جا سکتا ہے۔ نیز، کیوریٹرز انڈیکسرز کے ذریعہ لی گئی تمام کیوری کی فیس کا 10% حاصل کرتے ہیں. - -### کیوریشن کے عمل میں کیا بہتری آ رہی ہے؟ - -قلیل مدتی، آربٹرم پر ابتدائی کیوریشن ماڈل کیوریشن سگنل کو اصولی تحفظ فراہم کرے گا۔ طویل مدتی، بنیادی ڈیویلپرز کو کیوریشن سگنل کرایہ پر لینے کی صلاحیت کی پیشکش کرنے کو ترجیح دیں گے، قیمتوں کا ایک زیادہ متوقع تجربہ شروع کرنا جبکہ اس بات کو یقینی بناتے ہوئے کہ سب گراف کافی حد تک انڈیکس کیے گئے ہیں. - -### میں فرنٹ اینڈ میں سب گراف API کو کیسے تبدیل کروں؟ - -کم از کم ایک انڈیکسر نے سب گراف کو مکمل طور پر انڈیکس کرنے کے بعد، صارف ڈیسینٹرالائزڈ نیٹ ورک سے کیوری کر سکتا ہے. - -اپنے سب گراف کے لیے کیوری کا URL بازیافت کرنے کے لیے، آپ کیوری کے URL کے آگے علامت پر کلک کر کے اسے کاپی/پیسٹ کر سکتے ہیں۔ آپ کو کچھ اس طرح نظر آئے گا: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -بس [api-key] کو سب گراف اسٹوڈیو [API کلیدی سیکشن](https://thegraph.com/studio/apikeys/) میں تیار کردہ API کلید سے بدل دیں. - -### کیوریز کی قیمت کتنی ہے؟ - -نیٹ ورک کے اندر کیوری کی اوسط قیمت مختلف ہوتی ہے۔ ستمبر 2022 کے مہینے کے لیے، اوسط قیمت فی کیوری فیس لاگت $0.00012 - $0.00020 کے درمیان ہے. - -### میں کیسے جان سکتا ہوں کہ میرے سب گراف کا حجم کتنا ہے اور اس کی قیمت کتنی ہوگی؟ - -ہوسٹڈ سروس والیوم ڈیٹا عوامی نہیں ہے۔ حجم اور لاگت کے تخمینے حاصل کرنے کے لیے براہ کرم [here](mailto:migration@thegraph.foundation) رابطہ کریں. - -### گیٹ وے کیسے کام کرتا ہے؟ کیا یہ مکمل طور پر ڈیسینٹرالائزڈ ہے؟ - -گیٹ وے پراسیس کیوری کرتا ہے تاکہ انڈیکسرز ڈی ایپ پیش کر سکیں۔ گیٹ وے ایک درمیانی مرحلے میں ہیں جسے بتدریج ڈیسینٹرالائزڈ بنایا جا رہا ہے۔ جلد ہی اس پر مزید. - -## نیٹ ورک کے اکثر پوچھے گئے سوالات کا استعمال - -### کیا میرے سب گراف کو اپ ڈیٹ کرنے کی کوئی قیمت ہے؟ - -جی ہاں، یہ کیوریشن کا 1% اشارہ ہے۔ یہ 1% کیوریٹرز (0.5%) اور سب گراف ڈویلپرز (0.5%) کے درمیان یکساں طور پر تقسیم ہے۔ لہذا، ہر 10 ہزار GRT سگنل کے لیے، سب گراف ڈویلپرز کو اپ ڈیٹ کرنے کے لیے 50 GRT کی لاگت آتی ہے۔ - -### میں مطابقت پذیری کے وقت کو کیسے تیز کروں؟ - -سب گراف کے اندر سمارٹ کنٹریکٹ کالز کا استعمال کم سے کم کریں۔ سمارٹ کنٹریکٹ سٹیٹ تک رسائی کے لیے RPC کو eth_call کی ضرورت ہوتی ہے، جو مطابقت پذیری کے اوقات کو کم کر دیتی ہے. - -### کیا سب گراف اسٹوڈیو میں ملٹیسگ سپورٹ ہے جیسا کہ میں منتقل ہوتا ہوں؟ - -ہاں، ملٹیسگ سپورٹ حال ہی میں شامل کی گئی ہے۔ آپ مزید معلومات [یہاں](https://thegraph.com/docs/studio/multisig) حاصل کر سکتے ہیں. - -### ایتھریم اور آربٹرم پر GRT کے کنٹریکٹ ایڈریسیز کے پتے کیا ہیں؟ - -- ایتھریم: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### پروجیکٹ اپنی API کی میں عام طور پر کتنا GRT رکھتے ہیں؟ - -بہت سے پراجیکٹس اپنی API کلید میں 30-60 دنوں کی مالیت کا GRT رکھتے ہیں، اس لیے انہیں اکثر دوبارہ بھرنے کی ضرورت نہیں ہوتی ہے۔ یہ سمجھنے کے لیے کہ آپ کی 30-60 دنوں کی GRT فیسیں کیا ہوں گی، براہ کرم [یہاں](mailto:migration@thegraph.foundation) پہنچیں. - -### ڈیسینٹرالائزڈ نیٹ ورک پر کیوری کی ادائیگی کیسے کی جاتی ہے؟  - -فیس ہفتہ وار انوائس کی جاتی ہے اور صارف کی API کی سے نکالی جاتی ہے، GRT کے ساتھ جو آربٹرم پر بریج جاتا ہے اور اس پر بیٹھتا ہے. - -### ڈیسینٹرالائزڈ نیٹ ورک پر سب گرافس کے لیے API کیز کیسے استعمال ہوتی ہیں؟ - -API کیز صارفین کو کیوری کرنے کی زیادہ سے زیادہ قیمتیں ادا کرنے اور قیمت، اقتصادی تازگی اور کیوری کی رفتار جیسے عوامل کو ترجیح دینے کے لیے بااختیار بناتی ہیں. - -### سروس کا معیار فی الحال ہوسٹڈ سروس اور ڈیسینٹرالائزڈ نیٹ ورک کے درمیان کیسے موازنہ کرتا ہے؟ - -ہوسٹڈ سروس اور ڈیسینٹرالائزڈ نیٹ ورک میں تقریباً ایک ہی درمیانی تاخیر ہوتی ہے، لیکن ڈیسینٹرالائزڈ نیٹ ورک میں زیادہ پرسنٹائلز پر زیادہ تاخیر ہوتی ہے۔ کیوریز کے لیے 200 کی شرحیں عام طور پر ایک جیسی ہوتی ہیں، دونوں > 99.9% اس کی ڈیسینٹرالائزڈ کے نتیجے میں، نیٹ ورک کو تمام سب گرافس میں وسیع پیمانے پر بندش کا سامنا نہیں کرنا پڑا ہے، جب کہ ہوسٹڈ سروس کی مرکزی نوعیت کے نتیجے میں غیر معمولی مواقع پر عارضی بندش ہوتی ہے. - -### اگر میرے سوال کا جواب ان FAQs سے نہیں ملتا ہے تو کیا ہوگا؟ - -کسی بھی اضافی مدد کے لیے براہ کرم [migration@thegraph.foundation](mailto:migration@thegraph.foundation) سے رابطہ کریں. diff --git a/website/pages/ur/querying/querying-the-hosted-service.mdx b/website/pages/ur/querying/querying-the-hosted-service.mdx deleted file mode 100644 index 6c0ad182dc84..000000000000 --- a/website/pages/ur/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: ہوسٹڈ سروس سے کیوری کرنا ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -ذیل میں ایک مثال فراہم کی گئی ہے، لیکن براہ کرم سب گراف کی ہستیوں سے کیوری کرنے کے مکمل حوالہ کے لیے [کیوری API](/querying/graphql-api) دیکھیں. - -## مثال - -یہ کیوری ان تمام کاؤنٹرز کی فہرست دیتا ہے جو ہماری میپنگ نے بنائے ہیں۔ چونکہ ہم صرف ایک بناتے ہیں، نتیجہ میں صرف ہمارا ایک `default-counter` ہوگا: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -کچھ اہم خصوصیات ذیل میں تفصیلی ہیں: - -![ایکسپلورر پلے گراؤنڈ](/img/explorer-playground.png) diff --git a/website/pages/vi/cookbook/quick-start.mdx b/website/pages/vi/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/vi/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/vi/developing/assemblyscript-api.mdx b/website/pages/vi/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/vi/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/vi/network-transition-faq.mdx b/website/pages/vi/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/vi/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/vi/querying/querying-the-hosted-service.mdx b/website/pages/vi/querying/querying-the-hosted-service.mdx deleted file mode 100644 index 779cefc0028b..000000000000 --- a/website/pages/vi/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Ví dụ - -Truy vấn này liệt kê tất cả các bộ đếm mà ánh xạ của chúng tôi đã tạo. Vì chúng tôi chỉ tạo một, kết quả sẽ chỉ chứa một `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/yo/cookbook/quick-start.mdx b/website/pages/yo/cookbook/quick-start.mdx deleted file mode 100644 index 123caf840497..000000000000 --- a/website/pages/yo/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Quick Start ---- - -This guide will quickly take you through how to initialize, create, and deploy your subgraph to the Subgraph Studio or the [hosted service](#hosted-service). - -Ensure that your subgraph will be indexing data from a [supported network](/developing/supported-networks). - -This guide is written assuming that you have: - -- A smart contract address on the network of your choice -- GRT to curate your subgraph -- A crypto wallet - -## 1. Create a subgraph on Subgraph Studio - -Go to the Subgraph Studio [https://thegraph.com/studio/](https://thegraph.com/studio/) and connect your wallet. - -Once connected, you can begin by clicking “create a subgraph.” Select the network of your choice and click continue. - -## 2. Install the Graph CLI - -The Graph CLI is written in JavaScript and you will need to have either `npm` or `yarn` installed to use it. - -On your local machine, run one of the following commands: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. Initialize your Subgraph - -> You can find commands for your specific subgraph on the subgraph page in [Subgraph Studio](https://thegraph.com/studio/). - -When you initialize your subgraph, the CLI tool will ask you for the following information: - -- Protocol: choose the protocol your subgraph will be indexing data from -- Subgraph slug: create a name for your subgraph. Your subgraph slug is an identifier for your subgraph. -- Directory to create the subgraph in: choose your local directory -- Ethereum network(optional): you may need to specify which EVM-compatible network your subgraph will be indexing data from -- Contract address: Locate the smart contract address you’d like to query data from -- ABI: If the ABI is not autopopulated, you will need to input it manually as a JSON file -- Start Block: it is suggested that you input the start block to save time while your subgraph indexes blockchain data. You can locate the start block by finding the block where your contract was deployed. -- Contract Name: input the name of your contract -- Index contract events as entities: it is suggested that you set this to true as it will automatically add mappings to your subgraph for every emitted event -- Add another contract(optional): you can add another contract - -Initialize your subgraph from an existing contract by running the following command: - -```sh -graph init --studio -``` - -See the following screenshot for an example for what to expect when initializing your subgraph: - -![Subgraph command](/img/subgraph-init-example.png) - -## 4. Write your Subgraph - -The previous commands create a scaffold subgraph that you can use as a starting point for building your subgraph. When making changes to the subgraph, you will mainly work with three files: - -- Manifest (subgraph.yaml) - The manifest defines what datasources your subgraphs will index. -- Schema (schema.graphql) - The GraphQL schema defines what data you wish to retrieve from the subgraph. -- AssemblyScript Mappings (mapping.ts) - This is the code that translates data from your datasources to the entities defined in the schema. - -For more information on how to write your subgraph, see [Creating a Subgraph](/developing/creating-a-subgraph). - -## 5. Deploy to the Subgraph Studio - -Once your subgraph is written, run the following commands: - -```sh -$ graph codegen -$ graph build -``` - -- Authenticate and deploy your subgraph. The deploy key can be found on the Subgraph page in Subgraph Studio. - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -You will be asked for a version label. It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`. - -## 6. Test your subgraph - -You can test your subgraph by making a sample query in the playground section. - -The logs will tell you if there are any errors with your subgraph. The logs of an operational subgraph will look like this: - -![Subgraph logs](/img/subgraph-logs-image.png) - -If your subgraph is failing, you can query the subgraph health by using the GraphiQL Playground. Note that you can leverage the query below and input your deployment ID for your subgraph. In this case, `Qm...` is the deployment ID (which can be located on the Subgraph page under **Details**). The query below will tell you when a subgraph fails, so you can debug accordingly: - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. Publish Your Subgraph to The Graph’s Decentralized Network - -Once your subgraph has been deployed to the Subgraph Studio, you have tested it out, and are ready to put it into production, you can then publish it to the decentralized network. - -In the Subgraph Studio, click on your subgraph. On the subgraph’s page, you will be able to click the publish button on the top right. - -Select the network you would like to publish your subgraph to. It is recommended to publish subgraphs to Arbitrum One to take advantage of the [faster transaction speeds and lower gas costs](/arbitrum/arbitrum-faq). - -Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT. - -At the time of writing, it is recommended that you curate your own subgraph with 10,000 GRT to ensure that it is indexed and available for querying as soon as possible. - -To save on gas costs, you can curate your subgraph in the same transaction that you published it by selecting this button when you publish your subgraph to The Graph’s decentralized network: - -![Subgraph publish](/img/publish-and-signal-tx.png) - -## 8. Query your Subgraph - -Now, you can query your subgraph by sending GraphQL queries to your subgraph’s Query URL, which you can find by clicking on the query button. - -You can query from your dapp if you don't have your API key via the free, rate-limited temporary query URL that can be used for development and staging. - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/yo/developing/assemblyscript-api.mdx b/website/pages/yo/developing/assemblyscript-api.mdx deleted file mode 100644 index 35637a39f401..000000000000 --- a/website/pages/yo/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: AssemblyScript API ---- - -> Note: if you created a subgraph prior to `graph-cli`/`graph-ts` version `0.22.0`, you're using an older version of AssemblyScript, we recommend taking a look at the [`Migration Guide`](/release-notes/assemblyscript-migration-guide) - -This page documents what built-in APIs can be used when writing subgraph mappings. Two kinds of APIs are available out of the box: - -- the [Graph TypeScript library](https://github.com/graphprotocol/graph-ts) (`graph-ts`) and -- code generated from subgraph files by `graph codegen`. - -It is also possible to add other libraries as dependencies, as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Since this is the language mappings are written in, the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) is a good source for language and standard library features. - -## Installation - -Subgraphs created with [`graph init`](/developing/creating-a-subgraph) come with preconfigured dependencies. All that is required to install these dependencies is to run one of the following commands: - -```sh -yarn install # Yarn -npm install # NPM -``` - -If the subgraph was created from scratch, one of the following two commands will install the Graph TypeScript library as a dependency: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API Reference - -The `@graphprotocol/graph-ts` library provides the following APIs: - -- An `ethereum` API for working with Ethereum smart contracts, events, blocks, transactions, and Ethereum values. -- A `store` API to load and save entities from and to the Graph Node store. -- A `log` API to log messages to the Graph Node output and the Graph Explorer. -- An `ipfs` API to load files from IPFS. -- A `json` API to parse JSON data. -- A `crypto` API to use cryptographic functions. -- Low-level primitives to translate between different type systems such as Ethereum, JSON, GraphQL and AssemblyScript. - -### Versions - -The `apiVersion` in the subgraph manifest specifies the mapping API version which is run by Graph Node for a given subgraph. The current mapping API version is 0.0.6. - -| Version | Release notes | -| :-: | --- | -| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types
    Added `receipt` field to the Ethereum Event object | -| 0.0.6 | Added `nonce` field to the Ethereum Transaction object
    Added `baseFeePerGas` to the Ethereum Block object | -| 0.0.5 | AssemblyScript upgraded to version 0.19.10 (this includes breaking changes, please see the [`Migration Guide`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` renamed to `ethereum.transaction.gasLimit` | -| 0.0.4 | Added `functionSignature` field to the Ethereum SmartContractCall object | -| 0.0.3 | Added `from` field to the Ethereum Call object
    `etherem.call.address` renamed to `ethereum.call.to` | -| 0.0.2 | Added `input` field to the Ethereum Transaction object | - -### Built-in Types - -Documentation on the base types built into AssemblyScript can be found in the [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types). - -The following additional types are provided by `@graphprotocol/graph-ts`. - -#### ByteArray - -```typescript -import { ByteArray } from '@graphprotocol/graph-ts' -``` - -`ByteArray` represents an array of `u8`. - -_Construction_ - -- `fromI32(x: i32): ByteArray` - Decomposes `x` into bytes. -- `fromHexString(hex: string): ByteArray` - Input length must be even. Prefixing with `0x` is optional. - -_Type conversions_ - -- `toHexString(): string` - Converts to a hex string prefixed with `0x`. -- `toString(): string` - Interprets the bytes as a UTF-8 string. -- `toBase58(): string` - Encodes the bytes into a base58 string. -- `toU32(): u32` - Interprets the bytes as a little-endian `u32`. Throws in case of overflow. -- `toI32(): i32` - Interprets the byte array as a little-endian `i32`. Throws in case of overflow. - -_Operators_ - -- `equals(y: ByteArray): bool` – can be written as `x == y`. -- `concat(other: ByteArray) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by `other` -- `concatI32(other: i32) : ByteArray` - return a new `ByteArray` consisting of `this` directly followed by the byte representation of `other` - -#### BigDecimal - -```typescript -import { BigDecimal } from '@graphprotocol/graph-ts' -``` - -`BigDecimal` is used to represent arbitrary precision decimals. - -> Note: [Internally](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` is stored in [IEEE-754 decimal128 floating-point format](https://en.wikipedia.org/wiki/Decimal128_floating-point_format), which supports 34 decimal digits of significand. This makes `BigDecimal` unsuitable for representing fixed-point types that can span wider than 34 digits, such as a Solidity [`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers) or equivalent. - -_Construction_ - -- `constructor(bigInt: BigInt)` – creates a `BigDecimal` from an `BigInt`. -- `static fromString(s: string): BigDecimal` – parses from a decimal string. - -_Type conversions_ - -- `toString(): string` – prints to a decimal string. - -_Math_ - -- `plus(y: BigDecimal): BigDecimal` – can be written as `x + y`. -- `minus(y: BigDecimal): BigDecimal` – can be written as `x - y`. -- `times(y: BigDecimal): BigDecimal` – can be written as `x * y`. -- `div(y: BigDecimal): BigDecimal` – can be written as `x / y`. -- `equals(y: BigDecimal): bool` – can be written as `x == y`. -- `notEqual(y: BigDecimal): bool` – can be written as `x != y`. -- `lt(y: BigDecimal): bool` – can be written as `x < y`. -- `le(y: BigDecimal): bool` – can be written as `x <= y`. -- `gt(y: BigDecimal): bool` – can be written as `x > y`. -- `ge(y: BigDecimal): bool` – can be written as `x >= y`. -- `neg(): BigDecimal` - can be written as `-x`. - -#### BigInt - -```typescript -import { BigInt } from '@graphprotocol/graph-ts' -``` - -`BigInt` is used to represent big integers. This includes Ethereum values of type `uint32` to `uint256` and `int64` to `int256`. Everything below `uint32`, such as `int32`, `uint24` or `int8` is represented as `i32`. - -The `BigInt` class has the following API: - -_Construction_ - -- `BigInt.fromI32(x: i32): BigInt` – creates a `BigInt` from an `i32`. -- `BigInt.fromString(s: string): BigInt`– Parses a `BigInt` from a string. -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – Interprets `bytes` as an unsigned, little-endian integer. If your input is big-endian, call `.reverse()` first. -- `BigInt.fromSignedBytes(x: Bytes): BigInt` – Interprets `bytes` as a signed, little-endian integer. If your input is big-endian, call `.reverse()` first. - - _Type conversions_ - -- `x.toHex(): string` – turns `BigInt` into a string of hexadecimal characters. -- `x.toString(): string` – turns `BigInt` into a decimal number string. -- `x.toI32(): i32` – returns the `BigInt` as an `i32`; fails if the value does not fit into `i32`. It's a good idea to first check `x.isI32()`. -- `x.toBigDecimal(): BigDecimal` - converts into a decimal with no fractional part. - -_Math_ - -- `x.plus(y: BigInt): BigInt` – can be written as `x + y`. -- `x.minus(y: BigInt): BigInt` – can be written as `x - y`. -- `x.times(y: BigInt): BigInt` – can be written as `x * y`. -- `x.div(y: BigInt): BigInt` – can be written as `x / y`. -- `x.mod(y: BigInt): BigInt` – can be written as `x % y`. -- `x.equals(y: BigInt): bool` – can be written as `x == y`. -- `x.notEqual(y: BigInt): bool` – can be written as `x != y`. -- `x.lt(y: BigInt): bool` – can be written as `x < y`. -- `x.le(y: BigInt): bool` – can be written as `x <= y`. -- `x.gt(y: BigInt): bool` – can be written as `x > y`. -- `x.ge(y: BigInt): bool` – can be written as `x >= y`. -- `x.neg(): BigInt` – can be written as `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – divides by a decimal, giving a decimal result. -- `x.isZero(): bool` – Convenience for checking if the number is zero. -- `x.isI32(): bool` – Check if the number fits in an `i32`. -- `x.abs(): BigInt` – Absolute value. -- `x.pow(exp: u8): BigInt` – Exponentiation. -- `bitOr(x: BigInt, y: BigInt): BigInt` – can be written as `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – can be written as `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – can be written as `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – can be written as `x >> y`. - -#### TypedMap - -```typescript -import { TypedMap } from '@graphprotocol/graph-ts' -``` - -`TypedMap` can be used to store key-value pairs. See [this example](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51). - -The `TypedMap` class has the following API: - -- `new TypedMap()` – creates an empty map with keys of type `K` and values of type `V` -- `map.set(key: K, value: V): void` – sets the value of `key` to `value` -- `map.getEntry(key: K): TypedMapEntry | null` – returns the key-value pair for a `key` or `null` if the `key` does not exist in the map -- `map.get(key: K): V | null` – returns the value for a `key` or `null` if the `key` does not exist in the map -- `map.isSet(key: K): bool` – returns `true` if the `key` exists in the map and `false` if it does not - -#### Bytes - -```typescript -import { Bytes } from '@graphprotocol/graph-ts' -``` - -`Bytes` is used to represent arbitrary-length arrays of bytes. This includes Ethereum values of type `bytes`, `bytes32`, etc. - -The `Bytes` class extends AssemblyScript's [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64) and this supports all the `Uint8Array` functionality, plus the following new methods: - -_Construction_ - -- `fromHexString(hex: string) : Bytes` - Convert the string `hex` which must consist of an even number of hexadecimal digits to a `ByteArray`. The string `hex` can optionally start with `0x` -- `fromI32(i: i32) : Bytes` - Convert `i` to an array of bytes - -_Type conversions_ - -- `b.toHex()` – returns a hexadecimal string representing the bytes in the array -- `b.toString()` – converts the bytes in the array to a string of unicode characters -- `b.toBase58()` – turns an Ethereum Bytes value to base58 encoding (used for IPFS hashes) - -_Operators_ - -- `b.concat(other: Bytes) : Bytes` - - return new `Bytes` consisting of `this` directly followed by `other` -- `b.concatI32(other: i32) : ByteArray` - return new `Bytes` consisting of `this` directly follow by the byte representation of `other` - -#### Address - -```typescript -import { Address } from '@graphprotocol/graph-ts' -``` - -`Address` extends `Bytes` to represent Ethereum `address` values. - -It adds the following method on top of the `Bytes` API: - -- `Address.fromString(s: string): Address` – creates an `Address` from a hexadecimal string -- `Address.fromBytes(b: Bytes): Address` – create an `Address` from `b` which must be exactly 20 bytes long. Passing in a value with fewer or more bytes will result in an error - -### Store API - -```typescript -import { store } from '@graphprotocol/graph-ts' -``` - -The `store` API allows to load, save and remove entities from and to the Graph Node store. - -Entities written to the store map one-to-one to the `@entity` types defined in the subgraph's GraphQL schema. To make working with these entities convenient, the `graph codegen` command provided by the [Graph CLI](https://github.com/graphprotocol/graph-cli) generates entity classes, which are subclasses of the built-in `Entity` type, with property getters and setters for the fields in the schema as well as methods to load and save these entities. - -#### Creating entities - -The following is a common pattern for creating entities from Ethereum events. - -```typescript -// Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -When a `Transfer` event is encountered while processing the chain, it is passed to the `handleTransfer` event handler using the generated `Transfer` type (aliased to `TransferEvent` here to avoid a naming conflict with the entity type). This type allows accessing data such as the event's parent transaction and its parameters. - -Each entity must have a unique ID to avoid collisions with other entities. It is fairly common for event parameters to include a unique identifier that can be used. Note: Using the transaction hash as the ID assumes that no other events in the same transaction create entities with this hash as the ID. - -#### Loading entities from the store - -If an entity already exists, it can be loaded from the store with the following: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -As the entity may not exist in the store yet, the `load` method returns a value of type `Transfer | null`. It may thus be necessary to check for the `null` case before using the value. - -> **Note:** Loading entities is only necessary if the changes made in the mapping depend on the previous data of an entity. See the next section for the two ways of updating existing entities. - -#### Looking up entities created withing a block - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.30.0 and `@graphprotocol/graph-cli` v0.49.0 the `loadInBlock` method is available on all entity types. - -The store API facilitates the retrieval of entities that were created or updated in the current block. A typical situation for this is that one handler creates a Transaction from some on-chain event, and a later handler wants to access this transaction if it exists. In the case where the transaction does not exist, the subgraph will have to go to the database just to find out that the entity does not exist; if the subgraph author already knows that the entity must have been created in the same block, using loadInBlock avoids this database roundtrip. For some subgraphs, these missed lookups can contribute significantly to the indexing time. - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> Note: If there is no entity created in the given block, `loadInBlock` will return `null` even if there is an entity with the given ID in the store. - -#### Looking up derived entities - -As of `graph-node` v0.31.0, `@graphprotocol/graph-ts` v0.31.0 and `@graphprotocol/graph-cli` v0.51.0 the `loadRelated` method is available. - -This enables loading derived entity fields from within an event handler. For example, given the following schema: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -The following code will load the `Token` entity that the `Holder` entity was derived from: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### Updating existing entities - -There are two ways to update an existing entity: - -1. Load the entity with e.g. `Transfer.load(id)`, set properties on the entity, then `.save()` it back to the store. -2. Simply create the entity with e.g. `new Transfer(id)`, set properties on the entity, then `.save()` it to the store. If the entity already exists, the changes are merged into it. - -Changing properties is straight forward in most cases, thanks to the generated property setters: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -It is also possible to unset properties with one of the following two instructions: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -This only works with optional properties, i.e. properties that are declared without a `!` in GraphQL. Two examples would be `owner: Bytes` or `amount: BigInt`. - -Updating array properties is a little more involved, as the getting an array from an entity creates a copy of that array. This means array properties have to be set again explicitly after changing the array. The following assumes `entity` has a `numbers: [BigInt!]!` field. - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### Removing entities from the store - -There is currently no way to remove an entity via the generated types. Instead, removing an entity requires passing the name of the entity type and the entity ID to `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### Ethereum API - -The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data. - -#### Support for Ethereum Types - -As with entities, `graph codegen` generates classes for all smart contracts and events used in a subgraph. For this, the contract ABIs need to be part of the data source in the subgraph manifest. Typically, the ABI files are stored in an `abis/` folder. - -With the generated classes, conversions between Ethereum types and the [built-in types](#built-in-types) take place behind the scenes so that subgraph authors do not have to worry about them. - -The following example illustrates this. Given a subgraph schema like - -```graphql -type Transfer @entity { - id: Bytes! - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -and a `Transfer(address,address,uint256)` event signature on Ethereum, the `from`, `to` and `amount` values of type `address`, `address` and `uint256` are converted to `Address` and `BigInt`, allowing them to be passed on to the `Bytes!` and `BigInt!` properties of the `Transfer` entity: - -```typescript -let id = event.transaction.hash -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### Events and Block/Transaction Data - -Ethereum events passed to event handlers, such as the `Transfer` event in the previous examples, not only provide access to the event parameters but also to their parent transaction and the block they are part of. The following data can be obtained from `event` instances (these classes are a part of the `ethereum` module in `graph-ts`): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### Access to Smart Contract State - -The code generated by `graph codegen` also includes classes for the smart contracts used in the subgraph. These can be used to access public state variables and call functions of the contract at the current block. - -A common pattern is to access the contract from which an event originates. This is achieved with the following code: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -`Transfer` is aliased to `TransferEvent` here to avoid a naming conflict with the entity type - -As long as the `ERC20Contract` on Ethereum has a public read-only function called `symbol`, it can be called with `.symbol()`. For public state variables a method with the same name is created automatically. - -Any other contract that is part of the subgraph can be imported from the generated code and can be bound to a valid address. - -#### Handling Reverted Calls - -If the read-only methods of your contract may revert, then you should handle that by calling the generated contract method prefixed with `try_`. For example, the Gravity contract exposes the `gravatarToOwner` method. This code would be able to handle a revert in that method: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -Note that a Graph node connected to a Geth or Infura client may not detect all reverts, if you rely on this we recommend using a Graph node connected to a Parity client. - -#### Encoding/Decoding ABI - -Data can be encoded and decoded according to Ethereum's ABI encoding format using the `encode` and `decode` functions in the `ethereum` module. - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -For more information: - -- [ABI Spec](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- Encoding/decoding [Rust library/CLI](https://github.com/rust-ethereum/ethabi) -- More [complex example](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72). - -### Logging API - -```typescript -import { log } from '@graphprotocol/graph-ts' -``` - -The `log` API allows subgraphs to log information to the Graph Node standard output as well as the Graph Explorer. Messages can be logged using different log levels. A basic format string syntax is provided to compose log messages from argument. - -The `log` API includes the following functions: - -- `log.debug(fmt: string, args: Array): void` - logs a debug message. -- `log.info(fmt: string, args: Array): void` - logs an informational message. -- `log.warning(fmt: string, args: Array): void` - logs a warning. -- `log.error(fmt: string, args: Array): void` - logs an error message. -- `log.critical(fmt: string, args: Array): void` – logs a critical message _and_ terminates the subgraph. - -The `log` API takes a format string and an array of string values. It then replaces placeholders with the string values from the array. The first `{}` placeholder gets replaced by the first value in the array, the second `{}` placeholder gets replaced by the second value and so on. - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### Logging one or more values - -##### Logging a single value - -In the example below, the string value "A" is passed into an array to become`['A']` before being logged: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### Logging a single entry from an existing array - -In the example below, only the first value of the argument array is logged, despite the array containing three values. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### Logging multiple entries from an existing array - -Each entry in the arguments array requires its own placeholder `{}` in the log message string. The below example contains three placeholders `{}` in the log message. Because of this, all three values in `myArray` are logged. - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### Logging a specific entry from an existing array - -To display a specific value in the array, the indexed value must be provided. - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### Logging event information - -The example below logs the block number, block hash and transaction hash from an event: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -import { ipfs } from '@graphprotocol/graph-ts' -``` - -Smart contracts occasionally anchor IPFS files on chain. This allows mappings to obtain the IPFS hashes from the contract and read the corresponding files from IPFS. The file data will be returned as `Bytes`, which usually requires further processing, e.g. with the `json` API documented later on this page. - -Given an IPFS hash or path, reading a file from IPFS is done as follows: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**Note:** `ipfs.cat` is not deterministic at the moment. If the file cannot be retrieved over the IPFS network before the request times out, it will return `null`. Due to this, it's always worth checking the result for `null`. - -It is also possible to process larger files in a streaming fashion with `ipfs.map`. The function expects the hash or path for an IPFS file, the name of a callback, and flags to modify its behavior: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -The only flag currently supported is `json`, which must be passed to `ipfs.map`. With the `json` flag, the IPFS file must consist of a series of JSON values, one value per line. The call to `ipfs.map` will read each line in the file, deserialize it into a `JSONValue` and call the callback for each of them. The callback can then use entity operations to store data from the `JSONValue`. Entity changes are stored only when the handler that called `ipfs.map` finishes successfully; in the meantime, they are kept in memory, and the size of the file that `ipfs.map` can process is therefore limited. - -On success, `ipfs.map` returns `void`. If any invocation of the callback causes an error, the handler that invoked `ipfs.map` is aborted, and the subgraph is marked as failed. - -### Crypto API - -```typescript -import { crypto } from '@graphprotocol/graph-ts' -``` - -The `crypto` API makes a cryptographic functions available for use in mappings. Right now, there is only one: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -import { json, JSONValueKind } from '@graphprotocol/graph-ts' -``` - -JSON data can be parsed using the `json` API: - -- `json.fromBytes(data: Bytes): JSONValue` – parses JSON data from a `Bytes` array interpreted as a valid UTF-8 sequence -- `json.try_fromBytes(data: Bytes): Result` – safe version of `json.fromBytes`, it returns an error variant if the parsing failed -- `json.fromString(data: string): JSONValue` – parses JSON data from a valid UTF-8 `String` -- `json.try_fromString(data: string): Result` – safe version of `json.fromString`, it returns an error variant if the parsing failed - -The `JSONValue` class provides a way to pull values out of an arbitrary JSON document. Since JSON values can be booleans, numbers, arrays and more, `JSONValue` comes with a `kind` property to check the type of a value: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -In addition, there is a method to check if the value is `null`: - -- `value.isNull(): boolean` - -When the type of a value is certain, it can be converted to a [built-in type](#built-in-types) using one of the following methods: - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (and then convert `JSONValue` with one of the 5 methods above) - -### Type Conversions Reference - -| Source(s) | Destination | Conversion function | -| -------------------- | -------------------- | ---------------------------- | -| Address | Bytes | none | -| Address | String | s.toHexString() | -| BigDecimal | String | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() or s.toHex() | -| BigInt | String (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| Bytes (signed) | BigInt | BigInt.fromSignedBytes(s) | -| Bytes (unsigned) | BigInt | BigInt.fromUnsignedBytes(s) | -| Bytes | String (hexadecimal) | s.toHexString() or s.toHex() | -| Bytes | String (unicode) | s.toString() | -| Bytes | String (base58) | s.toBase58() | -| Bytes | i32 | s.toI32() | -| Bytes | u32 | s.toU32() | -| Bytes | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | BigInt.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | string | s.toString() | -| JSON | Array | s.toArray() | -| JSON | Object | s.toObject() | -| String | Address | Address.fromString(s) | -| Bytes | Address | Address.fromBytes(s) | -| String | BigInt | BigInt.fromString(s) | -| String | BigDecimal | BigDecimal.fromString(s) | -| String (hexadecimal) | Bytes | ByteArray.fromHexString(s) | -| String (UTF-8) | Bytes | ByteArray.fromUTF8(s) | - -### Data Source Metadata - -You can inspect the contract address, network and context of the data source that invoked the handler through the `dataSource` namespace: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity and DataSourceContext - -The base `Entity` class and the child `DataSourceContext` class have helpers to dynamically set and get fields: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### Common AssemblyScript Issues - -There are certain [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) issues that are common to run into during subgraph development. They range in debug difficulty, however, being aware of them may help. The following is a non-exhaustive list of these issues: - -- `Private` class variables are not enforced in [AssembyScript](https://www.assemblyscript.org/status.html#language-features). There is no way to protect class variables from being directly changed from the class object. -- Scope is not inherited into [closure functions](https://www.assemblyscript.org/status.html#on-closures), i.e. variables declared outside of closure functions cannot be used. Explanation in [Developer Highlights #3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s). diff --git a/website/pages/yo/network-transition-faq.mdx b/website/pages/yo/network-transition-faq.mdx deleted file mode 100644 index a01789f59cba..000000000000 --- a/website/pages/yo/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: Network Transition FAQ ---- - -Developers will have plenty of time to migrate their subgraphs to the decentralized network. Exact timelines will vary from network to network based on Indexer and network readiness-the hosted service will not end support for all networks at once and will not be sunset abruptly. - -Each network on the hosted service, including Ethereum, will sunset gradually as it is supported on the decentralized network to achieve feature parity and a high quality of service. This will happen on a network-to-network basis with help from Indexers in the [MIPs program](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/), to enable full support for each network on the decentralized network. - -To add more clarity around continued support for each network on the hosted service, these FAQs answer common questions regarding the specifics of the network transition process. If you would like to start the subgraph migration process now, here is a [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph). To skip to the migration FAQ, [click here](#migration-faqs). - -## Hosted Service Sunset FAQs - -### Will I have to migrate my subgraph before the decentralized network serves core functionalities for subgraphs? - -Subgraph developers can begin migrating their Ethereum mainnet subgraphs now, but will not be forced to migrate subgraphs to the network before feature core functionality exists for the decentralized network and hosted service. Migration of Gnosis network subgraphs will also begin soon, with other networks to follow once Indexers have tested the networks and are ready to index them in production. - -### What is the timeline and process for deprecating the hosted service? - -All networks will have their own timelines, depending on when they are enabled on the network and the timeline it takes to get through each phase. Core developers are working to migrate the majority of hosted service traffic to the decentralized network as soon as possible. - -Most importantly, you will not lose access to the hosted service before core functionality is available for your specific network/subgraph on the decentralized network. - -The three distinct phases of hosted service deprecation for each network are: - -#### Phase 1 (The Sunray): Disable new subgraph creation for blockchains that have quality parity on the network - -In this stage, developers will no longer be able to deploy new subgraphs to the hosted service for that network. Developers will still be able to update existing subgraphs on the hosted service. - -No network has yet begun Phase 1 of transitioning from the hosted service to the decentralized network. - -As networks enter Phase 1, please note that developers can still use the rate limited Developer Preview URL in the Subgraph Studio to develop and test their subgraphs (up to 1,000 free queries) without acquiring GRT or interacting with protocol economics. - -#### Phase 2 (The Sunbeam): Disable subgraph updates - -In this phase, updates to subgraphs must be made through Subgraph Studio and subsequently published to the decentralized network. Hosted service subgraphs for networks in this phase will still exist and will be queryable, but updates to subgraphs must be made on The Graph's decentralized network. - -There are no exact timelines for when any network will move to this phase, as the process is driven by exit criteria surrounding core functionality, not dates. - -#### Phase 3 (The Sunrise): Disable querying subgraphs - -At this phase, subgraphs on the hosted service for networks supported by The Graph Network will no longer process queries. The only way to query blockchain data for subgraphs on networks in this phase will be through the decentralized network. Test queries will still be available in [Subgraph Studio](https://thegraph.com/studio/) via the Development Query URL. - -Networks will not move to Phase 3 until successfully moving to Phase 2 and giving developers ample time to migrate to the decentralized network. - -![subgraph chart](/img/subgraph-chart.png) - -> Note: This diagram reflects the per-network sunsetting process. Hosted service sunsetting times will vary and will not sunset all at once. - -### What happens to test networks like Goerli, Mumbai, etc? - -All networks and test networks are eligible for a free Deployment Query URL in the [Subgraph Studio](https://thegraph.com/studio/). This URL is rate limited and intended for test and development traffic. Production traffic will require a subgraph published to The Graph Network in order to have production grade redundancy and stability. - -![Rate limit](/img/rate-limit.png) - -### Does The Graph Network have the same functionalities as the hosted service? - -Indexers on The Graph Network run the most recent network-approved [release of Graph Node](https://github.com/graphprotocol/graph-node/releases), and can support any subgraph features supported in that release. - -Sometimes unreleased features which are still under development might be available first on the Developer Preview URL, which runs the latest main commit of [Graph Node](https://github.com/graphprotocol/graph-node). These features will then become available on the network with the next Graph Node release. - -Certain subgraph features are not eligible for indexing rewards, if they are not deterministic or verifiable on the network. Specific examples are fetching files from IPFS, and indexing networks not yet supported on The Graph Network. - -Subgraphs with these features can be published to the network, but they may not be picked up by Indexers. However, subgraphs with sufficient signal may still attract Indexers interested in collecting query fees, which any subgraph is eligible for. - -### How much does The Graph Network cost in comparison to running my own infrastructure? - -The Graph's decentralized network is 60-90% less expensive than running dedicated infrastructure, as shown in [these case studies](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month). - -### Is there anything I should do with my hosted service subgraph after I migrate to the network? - -Hiding your hosted service subgraph is strongly recommended to avoid confusion. [This video](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9) walks through the process. - -### When will the decentralized network support my preferred network? - -There is no set timeline per network, they will be dictated by Indexer readiness via the [MIPs program](https://thegraph.com/migration-incentive-program/) where new networks are tested by Indexers. As new networks are supported on the network, users will receive ample notification to prepare for migration. Core devs and contributors to The Graph ecosystem are working to implement support for more networks as soon as possible. - -### Is Ethereum mainnet entering Phase 1 of the network transition process? - -While Ethereum was initially anticipated to begin transition off of the hosted service by the end of Q3 2022, this has been [postponed](https://thegraph.com/blog/transitioning-to-decentralized-graph-network) to address user feedback. Additional improvements to user experience, billing, and other fulfillments of user requests will drive Ethereum's hosted service transition timeline. Stay up to date on when Ethereum will enter The Sunray phase via the integration status tracker below and via [The Graph Twitter.](https://twitter.com/graphprotocol) - -### The Graph Network integration status tracker - -The table below illustrates where each network is in the network integration process. If your preferred network is not yet listed, integration has not yet begun, and that network is still fully supported by The Graph's hosted service. - -> This table will not include test networks, which remain free in [Subgraph Studio](https://thegraph.com/studio/). - -| Network | Announcing integration on The Graph Network | Network Integration complete | Phase 1: disable new subgraphs on hosted service | Phase 2: disable subgraph updates on hosted service | Phase 3: disable subgraphs on hosted service | -| --- | :-: | :-: | :-: | :-: | :-: | -| Ethereum | ✓ | ✓ | | | | -| Gnosis (formerly xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\* The network is currently in beta on The Graph's decentralized network. - -## Query Fees, API Keys, and Billing FAQs - -### How are query fees priced? - -Query fee prices are impacted by query demand on the decentralized network. Core developers created a query pricing cost model language called [Agora](https://github.com/graphprotocol/agora). It enables Indexers to price queries efficiently. Learn more in the [Agora documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md). - -### How can I set a maximum query budget? - -Users can set a max query budget in the Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/) section, under the Budget tab. [Watch this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0) for an overview of that process, as well as adjusting other parts of your API Key. - -Please note that setting your max query budget too low will exclude Indexers, potentially leading to poor quality service in the form of failed queries, slow queries, etc. - -As of the end of September 2022, it's best practice to stay within the $0.00035-$0.0004 range as the lowest max query budget. - -### How can I protect my API Key? - -Users are encouraged to restrict the API key by both subgraph and domain in the [Subgraph Studio](https://thegraph.com/studio/): - -![Restrict domain](/img/restrictdomain.png) - -### How do I fill up my API key to pay for query fees? - -You can fill up your billing balance in the Subgraph Studio [Billing Dashboard](https://thegraph.com/studio/billing/) by pressing the "Add GRT" button. There is ongoing work to improve this experience to add more seamless and recurring payments. - -[This video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5) has an overview of that process. - -### How do I set alerts for low billing balances in my API key? - -Users should set a billing alert to their email address [here](https://thegraph.com/studio/settings/). - -Also, a banner will flash within a user's UI to warn when a billing balance is getting low. - -What are the best practices for managing my API key settings? - -A max query budget of $0.0004 is recommended to maintain low average query prices while maintaining high quality of service. This can be done in the budget billing tab of the [API Key section](https://thegraph.com/studio/apikeys/). - -## Migration FAQs - -### How can I migrate my subgraph to The Graph's decentralized network? - -Learn how to migrate your subgraph to The Graph Network with this simple [step-by-step guide](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph) or [this video](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s). - -### Are there Network Grants for subgraphs that migrate early to The Graph Network? - -Yes. To apply for a Network Grant, reach out [here](mailto:migration@thegraph.foundation). - -### Is there any financial/technical/marketing support through the migration process from The Graph ecosystem? - -There are Network Grants for projects to use to curate subgraphs (to attract Indexers) and pay for initial query fees (apply [here](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)), a [direct channel](https://discord.gg/graphprotocol) to engineers to help every step of the way, and prioritized marketing campaigns to showcase your project after migration, exampled in these Twitter threads: [1](https://twitter.com/graphprotocol/status/1496891582401814537), [2](https://twitter.com/graphprotocol/status/1491926128302379008), & [3](https://twitter.com/graphprotocol/status/1491126245396201473). - -### How long do queries take? - -Queries take an average of 150-300 milliseconds on the decentralized network. - -### Is the billing process on The Graph Network more complex than on the hosted service? - -Yes, the UX for the network is not yet at quality parity with the hosted service. The billing UX, in particular, is still in very early stages and there are many moving parts that the core dev teams are working to abstract away from the process. Much of these improvements will be made public in the near future. - -### Can I pay for The Graph Network queries in fiat, credit card, or stablecoins? - -In the coming months, the number of steps that users need to take to pay for their subgraphs will be vastly reduced. While payments will still be made in GRT, efforts to implement a fiat on-ramp and automated payment systems to convert fiat and crypto into GRT to make recurring payments are already underway. - -### Will the network ever have the same UX as the hosted service? - -While there is still work to do, the aim is to offer comparable if not better quality UX on The Graph Network than currently exists on the hosted service. Short term, the aim is to offer a more streamlined and predictable billing experience that helps users focus more time building high-quality dapps. - -### How can I ensure that my subgraph will be picked up by Indexer on The Graph Network? - -It is recommended to curate with at least 10,000 GRT, which users can do in the same transaction as when they publish. Users can also ask the curation community to curate their subgraph [here](https://t.me/CurationStation). - -There are Network Grants for the early migrants to cover these initial costs. Feel free to apply [here](mailto:migration@thegraph.foundation). - -### Why does a subgraph need curation signal? What if there isn't enough signal on my subgraph from curators? - -The higher the curation signal, the more attractive a subgraph is to Indexers, as there is a linear correlation between higher signal and higher indexing rewards. Without curation, there is no incentive for Indexers to pick up a subgraph. - -### What happens to the GRT a subgraph developer uses for curation signal? - -If you are the first to signal a subgraph, your GRT signaled amount will not go down. GRT used for curation can be removed later. Also, Curators get 10% of all query fees taken in by Indexers. - -### What improvements are coming to the curation process? - -Short term, the initial curation model on Arbitrum will provide principle-protection to curation signal. Longer term, the core devs will prioritize offering developers the capacity to rent curation signal, opening up a more predictable pricing experience while still ensuring subgraphs are sufficiently indexed. - -### How do I switch the subgraph API in the front-end? - -After at least one Indexer has fully indexed a subgraph, a user can query the decentralized network. - -In order to retrieve the query URL for your subgraph, you can copy/paste it by clicking on the symbol next to the query URL. You will see something like this: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -Simply replace [api-key] with an API key generated in the Subgraph Studio [API Key section](https://thegraph.com/studio/apikeys/). - -### How much do queries cost? - -The average query cost within the network varies. For the month of September 2022, the average price per query fee cost ranged from $0.00012 - $0.00020. - -### How can I find out how much volume my subgraph has and how much it will cost? - -Hosted service volume data is not public. Please reach out to get volume and cost estimates [here](mailto:migration@thegraph.foundation). - -### How does the gateway work? Is it fully decentralized? - -The gateway process queries so Indexers can serve dapps. The gateways are in an intermediate phase that is being progressively decentralized. More on this soon. - -## Using The Network FAQs - -### Is there a cost to update my subgraph? - -Yes, it is 1% of curation signaled. The 1% is split evenly between Curators (0.5%) and subgraph developers (0.5%). So, for every 10K GRT signaled, it costs subgraph developers 50 GRT to update. - -### How do I speed up sync time? - -Minimize the use of smart contract calls within the subgraph. Accessing a smart contract state requires an eth_call to the RPC, which slows down sync times. - -### Is there multisig support in Subgraph Studio as I migrate? - -Yes, multisig support has recently been added. You can find more information [here](https://thegraph.com/docs/studio/multisig). - -### What are the contract addresses for GRT on Ethereum and Arbitrum? - -- Ethereum: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- Ethereum Goerli: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### How much GRT do projects usually keep in their API Key? - -Many projects keep 30-60 days worth of GRT in their API key, so they don't need to refill often. To understand what your 30-60 day GRT fees would be, please reach out [here](mailto:migration@thegraph.foundation). - -### How are query payments made on the decentralized network?  - -Fees are invoiced weekly and pulled out of a user's API Key, with GRT that is bridged to and sits on Arbitrum. - -### How are API keys used for subgraphs on the decentralized network? - -API Keys empower users to have a say in both the max query prices they pay and to prioritize factors like price, economic freshness, and query speed. - -### How does quality of service currently compare between the hosted service and the decentralized network? - -The hosted service and decentralized network have about the same median latency, but the decentralized network tends to have higher latency at higher percentiles. 200 rates for queries are generally similar, with both > 99.9%. As a result of its decentralization, the network has not had a broad outage across subgraphs, whereas the hosted service does on rare occasions have temporary outages as a result of its centralized nature. - -### What if my question isn't answered by these FAQs? - -Please reach out to [migration@thegraph.foundation](mailto:migration@thegraph.foundation) for any additional assistance. diff --git a/website/pages/yo/querying/querying-the-hosted-service.mdx b/website/pages/yo/querying/querying-the-hosted-service.mdx deleted file mode 100644 index f00ff226ce09..000000000000 --- a/website/pages/yo/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Querying the Hosted Service ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. - -## Example - -This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -Some of the main features are detailed below: - -![Explorer Playground](/img/explorer-playground.png) diff --git a/website/pages/zh/cookbook/quick-start.mdx b/website/pages/zh/cookbook/quick-start.mdx deleted file mode 100644 index 9f2a3f812ac6..000000000000 --- a/website/pages/zh/cookbook/quick-start.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: 快速开始 ---- - -本指南将快速带您了解如何初始化、创建子图,并将其部署到子图工作室或[托管服务](#hosted-service)。 - -确保您的子图将索引来自[支持的网络](/developing/supported-networks)的数据。 - -本指南是在假设您具备以下条件的情况下编写的: - -- 您选择的网络上的智能合约地址 -- GRT来策划你的子图 -- 一个加密钱包 - -## 1. 在子图工作室中创建子图 - -进入子图工作室 [https://thegraph.com/studio/](https://thegraph.com/studio/) 并连接钱包。 - -连接后,您可以单击“创建子图”开始。选择您选择的网络,然后单击“继续”。 - -## 2. 安装 Graph CLI - -Graph CLI 是用 JavaScript 编写的,需要安装`npm` 或`yarn` 来使用。 - -在本地计算机上,运行以下命令之一: - -```sh -# NPM -$ npm install -g @graphprotocol/graph-cli - -# Yarn -$ yarn global add @graphprotocol/graph-cli -``` - -## 3. 初始化子图 - -> 您可以在[subgraph Studio](https://thegraph.com/studio/)的子图页面上找到子图的特定命令。 - -初始化子图时,CLI工具会要求您提供以下信息: - -- 协议:选择子图索引数据的协议 -- 子图段塞:为您的子图创建一个名称。您的子图段塞是子图的标识符。 -- 创建子图的目录:选择您的本地目录 -- 以太坊网络(可选):您可能需要指定子图将从哪个EVM兼容网络索引数据 -- 合约地址:找到要查询数据的智能合约地址 -- ABI:如果ABI不是自动填充的,则需要将其手动输入为JSON文件 -- 起始区块:建议您在子图索引区块链数据时输入起始区块以节省时间。您可以通过查找部署合约区块来定位起始区块。 -- 合约名称:输入您的合约名称 -- 将合约事件作为实体进行索引:建议您将其设置为true,因为它将自动为每个发出的事件向子图添加映射 -- 添加其他合约(可选):您可以添加其他合约 - -通过运行以下命令从现有合约初始化子图: - -```sh -graph init --studio -``` - -请参阅下面的屏幕截图,以获取初始化子图时所需的示例: - -![子图命令](/img/subgraph-init-example.png) - -## 4. 编写子图 - -前面的命令创建了一个原始子图,可以将其用作构建子图的起点。当对子图进行更改时,将主要使用三个文件: - -- 清单(subgraph.yaml)--清单定义子图将索引哪些数据源。 -- 模式(schema.graphql)--GraphQL 模式定义从子图中检索到的数据。 -- AssemblyScript 映射(mapping.ts)--将数据源中的数据转换为模式中定义的实体的代码。 - -关于如何编写子图的更多信息,请参见 [创建子图](/developing/creating-a-subgraph) - -## 5. 部署到子图工作室 - -一旦您的子图被编写好,请运行以下命令: - -```sh -$ graph codegen -$ graph build -``` - -- 认证并部署子图。部署密钥可以在子图工作室的子图页面上找到。 - -```sh -$ graph auth --studio -$ graph deploy --studio -``` - -您将被要求提供版本标签。强烈建议使用[semver](https://semver.org/)进行版本控制,如`0.0.1`。也就是说,您可以自由选择任何字符串作为版本,例如:`v1`、`version1`、`asdf`。 - -## 6. 测试子图 - -您可以通过在playground部分进行示例查询来测试子图。 - -日志会告诉你你的子图是否有任何错误。操作子图的日志如下所示: - -![子图日志](/img/subgraph-logs-image.png) - -如果子图失败了,可以通过使用 GraphiQL Playground查询子图的健康状况。注意,你可以利用下面的查询,输入你的子图的部署 ID。在这种情况下,`Qm... `是部署 ID(可以在子图页面的**详细信息**下找到)。下面的查询会提示,当一个子图失败时,则可进行相应调试。 - -```graphql -{ - indexingStatuses(subgraphs: ["Qm..."]) { - node - synced - health - fatalError { - message - block { - number - hash - } - handler - } - nonFatalErrors { - message - block { - number - hash - } - handler - } - chains { - network - chainHeadBlock { - number - } - earliestBlock { - number - } - latestBlock { - number - } - lastHealthyBlock { - number - } - } - entityCount - } -} -``` - -## 7. 将你的子图发布到Graph的去中心化网络 - -一旦你的子图被部署到子图工作室,你已经测试了它,并准备把它投入生产,你就可以把它发布到去中心化的网络。 - -在子图工作室中,单击您的子图。在子图的页面上,您可以单击右上角的发布按钮。 - -选择要发布子图的网络。建议将子图发布到Arbitrum One,以利用[更快的交易速度和更低的gas成本](/arbitrum/arbitrum-faq)。 - -在你可以查询你的子图之前,索引人需要开始在上面提供查询。为了简化这个过程,你可以使用GRT来策展你自己的子图。 - -在撰写本文时,建议您用10000 GRT策展自己的子图,以确保它被索引并可尽快查询。 - -为了节省gas成本,您可以在将子图发布到Graph的去中心化网络时选择此按钮,在发布子图的同一交易中策展子图: - -![子图发布](/img/publish-and-signal-tx.png) - -## 8. 查询子图 - -现在,您可以通过将GraphQL查询发送到子图的查询URL来查询子图,您可以单击查询按钮找到该查询URL。 - -如果你没有你的API密钥,你可以通过免费的、速率有限的临时查询URL从你的去中心化应用查询,该URL可用于开发和暂存。 - -For more information about querying data from your subgraph, read more [here](../querying/querying-the-graph/). diff --git a/website/pages/zh/developing/assemblyscript-api.mdx b/website/pages/zh/developing/assemblyscript-api.mdx deleted file mode 100644 index b114c8b3a85b..000000000000 --- a/website/pages/zh/developing/assemblyscript-api.mdx +++ /dev/null @@ -1,815 +0,0 @@ ---- -title: AssemblyScript API ---- - -> 注意:如果您在`graph cli`或`graph ts`版本`0.22.0`之前创建了子图,那么您使用的是较旧版本的AssemblyScript,我们建议您查看[`迁移指南`](/release-notes/assemblyscript-migration-guide)。 - -此页面记录了编写子图映射时可以使用的内置 API。有两种开箱即用的 API: - -- [Graph TypeScript 库](https://github.com/graphprotocol/graph-ts) (`graph-ts`) -- 使用`graph codegen`从子图文件生成的代码。 - -也可以添加其他库作为依赖项,只要它们与 [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) 兼容。 由于这是汇编语言映射,因此可以参考 [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki) 了解相应的语言和标准库功能。 - -## 安装 - -使用 [`graph init`](/developing/creating-a-subgraph) 创建的子图带有预配置的依赖项。 安装这些依赖项只需运行以下命令之一: - -```sh -yarn install # Yarn -npm install # NPM -``` - -如果子图是从头开始创建的,则以下两个命令之一将安装 Graph TypeScript 库作为依赖项: - -```sh -yarn add --dev @graphprotocol/graph-ts # Yarn -npm install --save-dev @graphprotocol/graph-ts # NPM -``` - -## API 参考 - -`@graphprotocol/graph-ts` 库提供以下 API: - -- 用于处理以太坊智能合约、事件、区块、交易和以太坊价值的`以太坊` API。 -- 用于与图形节点交互,存储和加载实体的 `存储` API。 -- 用于将消息记录到图形节点输出和图形浏览器的`log` API。 -- 用于从 IPFS 加载文件的`ipfs` API。 -- 用于解析 JSON 数据的`json` API。 -- 使用加密功能的`crypto` API。 -- 用于在不同类型系统(例如 Ethereum、JSON、GraphQL 和 AssemblyScript)之间进行转换的低级原语。 - -### 版本 - -子图清单中的 `apiVersion` 指定了由 Graph 节点为给定子图运行的映射 API 版本。 当前的映射 API 版本是 0.0.6。 - -| 版本 | Release 说明 | -| :-: | --- | -| 0.0.7 | 在以太坊类型中添加了 `TransactionReceipt` 和 `Log` 类
    添加了`收据`字段到以太坊事件对象 | -| 0.0.6 | 向以太坊交易对象添加了 `nonce` 字段 向 Etherum 区块对象
    添加` baseFeePerGas` | -| 0.0.5 | AssemblyScript 升级到版本 0.19.10(这包括重大更改,参阅 [`迁移指南`](/release-notes/assemblyscript-migration-guide))
    `ethereum.transaction.gasUsed` 重命名为 `ethereum.transaction.gasLimit` | -| 0.0.4 | 向以太坊智能合约唤起对象添加了 `功能` 签名字段 | -| 0.0.3 | `从`字段添加到以太坊唤起对象
    `Etherem.call. 地址`重命名为 `ethereum.call.to` | -| 0.0.2 | 添加了以太坊交易对象的`输入`字段 | - -### 内置类型 - -可以在 [AssemblyScript wiki](https://github.com/AssemblyScript/assemblyscript/wiki/Types) 中找到有关 AssemblyScript 中内置的基本类型的文档。 - -`@graphprotocol/graph-ts` 提供了以下附加类型。 - -#### 字节数组 - -```typescript -从'@graphprotocol/graph-ts'导入{ ByteArray } -``` - -`ByteArray` 表示 `u8` 的数组。 - -_构造_ - -- `From I32(x: i32): ByteArray`-将 `x` 分解为字节。 -- `From HexString (hex: string): ByteArray`-输入长度必须是偶数。前缀为`0x` 是可选的。 - -_类型转换_ - -- `toHexString (): string`-转换为前缀为`0x` 的十六进制字符串。 -- `toString (): string`-将字节解释为 UTF-8的字符串。 -- `toBase58(): string`-将字节编码为 base58字符串。 -- `toU32(): u32`-将字节解释为 little-endian `u32`。在溢出情况下抛出。 -- `toI32(): i32`-将字节数组解释为little-endian `i32`。在溢出情况下抛出。 - -_运算符_ - -- `等于(y: 字节数组): bool`-可以写成 `x = = y`。 -- `Concat (其他: 字节数组) : ByteArray`-返回一个新的 `ByteArray`,其中包含`这个`函数,然后是 `other`。 -- `ConcatI32(other: i32) : ByteArray`-返回一个新的 `ByteArray`,该 ByteArray 由 `this` 直接组成,其后是 `other` 的字节表示形式。 - -#### BigDecimal - -```typescript -从“@Graphprotocol/graph-ts”导入{ BigDecimal } -``` - -`BigDecimal` 用于表示任意精度的小数。 - -> 注意: [内部](https://github.com/graphprotocol/graph-node/blob/master/graph/src/data/store/scalar.rs) `BigDecimal` 以 [IEEE-754 decimal128浮点格式](https://en.wikipedia.org/wiki/Decimal128_floating-point_format)存储,该格式支持34位有效小数位。这使得 `BigDecimal` 不适合表示跨度大于34位的定点类型,例如 Solidty[`ufixed256x18`](https://docs.soliditylang.org/en/latest/types.html#fixed-point-numbers)或等效的定点类型。 - -_建造_ - -- `构造函数(bigInt: BigInt)`-从 `BigInt` 创建一个 `BigDecimal`。 -- `static from String (s: string): BigDecimal`-从十进制字符串解析。 - -_类型转换_ - -- `toString (): string` - 打印为十进制字符串。 - -_数学_ - -- `加(y: BigDecimal): BigDecimal` –可以写成 `x + y`. -- `减(y: BigDecimal): BigDecimal` – 可以写成 `x - y`. -- `乘(y: BigDecimal): BigDecimal` – 可以写成 `x * y`. -- `除(y: BigDecimal): BigDecimal` – 可以写成`x / y`. -- `等于(y: BigDecimal): bool` – 可以写成 `x == y`. -- `不等于(y: BigDecimal): bool` – 可以写成 `x != y`. -- `小于(y: BigDecimal): bool` – 可以写成 `x < y`. -- `小于等于(y: BigDecimal): bool` – 可以写成 `x <= y`. -- `大于(y: BigDecimal): bool` – 可以写成 `x > y`. -- `大于等于(y: BigDecimal): bool` – 可以写成 `x >= y`. -- `负(): BigDecimal` - 可以写成 `-x`. - -#### BigInt - -```typescript -从'@graphprotocol/graph-ts'导入{ BigInt } -``` - -`BigInt` 用于表示大整数。 这包括 `uint32` 到 `uint256` 和 `int64` 到 `int256` 类型的以太坊值。 `uint32` 下的所有内容,例如 `int32`、`uint24` 或 `int8` 都表示为 `i32` 。 - -`BigInt` 类具有以下 API: - -_构造_ - -- `BigInt.fromI32(x: i32): BigInt`-从 `i32`创建一个 `BigInt`。 -- `BigInt.fromString(s: string): BigInt`– 从字符串中解析 `BigInt`。 -- `BigInt.fromUnsignedBytes(x: Bytes): BigInt` – 将`字节`解释为一个无符号的little-endian整数。如果您输入的是 big-endian,请首先调用`转换()`。 -- `BigInt.fromSignedBytes(x: Bytes): BigInt` –将`字节`解释为有符号的little-endian整数。如果您输入的是 big-endian,请首先调用`转换()`。 - - _类型转换_ - -- `x.toHex(): string` –将 `BigInt` 转换为十六进制字符串。 -- `x.toString(): string` – 将 `BigInt` 转换为十进制数字字符串。 -- `x.toI32(): i32` – 将 `BigInt` 作为 `i32`返回; 如果值不适合 `i32`,则失败。最好先检查 `x.isI32()`。 -- `x.toBigDecimal(): BigDecimal` - 转换为没有小数部分的小数 - -_数学_ - -- `x.plus(y: BigInt): BigInt` – 可以写成 `x + y`. -- `x.minus(y: BigInt): BigInt` – 可以写成 `x - y`. -- `x.times(y: BigInt): BigInt` – 可以写成 `x * y`. -- `x.div(y: BigInt): BigInt` – 可以写成 `x / y`. -- `x.mod(y: BigInt): BigInt` – 可以写成 `x % y`. -- `x.equals(y: BigInt): bool` – 可以写成 `x == y`. -- `x.notEqual(y: BigInt): bool` – 可以写成 `x != y`. -- `x.lt(y: BigInt): bool` – 可以写成 `x < y`. -- `x.le(y: BigInt): bool` – 可以写成 `x <= y`. -- `x.gt(y: BigInt): bool` – 可以写成 `x > y`. -- `x.ge(y: BigInt): bool` – 可以写成 `x >= y`. -- `x.neg(): BigInt` – 可以写成 `-x`. -- `x.divDecimal(y: BigDecimal): BigDecimal` – 除以十进制,得到十进制结果。 -- `x.isZero(): bool` – 方便检查数字是否为零。 -- `x.isI32(): bool` – 检查数字是否适合`i32`。 -- `x.abs(): BigInt` – 绝对值。 -- `x.pow(exp: u8): BigInt` – 指数。 -- `bitOr(x: BigInt, y: BigInt): BigInt` – 可以写成 `x | y`. -- `bitAnd(x: BigInt, y: BigInt): BigInt` – 可以写成 `x & y`. -- `leftShift(x: BigInt, bits: u8): BigInt` – 可以写成 `x << y`. -- `rightShift(x: BigInt, bits: u8): BigInt` – 可以写成 `x >> y`. - -#### 类型化映射 - -```typescript -从'@graphprotocol/graph-ts'导入{ TypedMap } -``` - -`类型化映射`可用于存储密钥值对。请参见[此示例](https://github.com/graphprotocol/aragon-subgraph/blob/29dd38680c5e5104d9fdc2f90e740298c67e4a31/individual-dao-subgraph/mappings/constants.ts#L51)。 - -`TypedMap` 类具有以下 API: - -- `new TypedMap()` – 创建一个空映射,密钥为 `K`,值为 `T` -- `map.set(key: K, value: V): void` – 将 `密钥` 的值设置为 `value` -- `map.getEntry(key: K): TypedMapEntry | null` – 返回某个`密钥`的密钥值对,如果该`密钥`在映射中不存在,则返回`无效` -- `map.get(key: K): V | null` – 返回一个`密钥`的值,或者如果该`密钥`在映射中不存在,则返回`无效` -- `map.isSet(key: K): bool` –如果`密钥`存在于映射中,返回`真`; 如果不存在,返回`假` - -#### 字节 - -```typescript -从 '@graphprotocol/graph-ts'导入{ Bytes } -``` - -`字节`用于表示任意长度的字节数组,包括`字节`类型的以太坊值、 `bytes32`等。 - -`字节` 类扩展了 AssemblyScript 的 [Uint8Array](https://github.com/AssemblyScript/assemblyscript/blob/3b1852bc376ae799d9ebca888e6413afac7b572f/std/assembly/typedarray.ts#L64),它支持所有 `Uint8Array` 功能,以及以下新方法: - -_构造_ - -- `From HexString (hex: string) : Bytes`-将必须包含偶数个`十六进制`数字的字符串十六进制转换为 `ByteArray`。字符串`十六进制`可以选择以`0x` 开始 -- `fromI32(i: i32) : Bytes`-将 `i` 转换为字节数组 - -_类型转换_ - -- `b.toHex()` –返回表示数组中字节的十六进制字符串 -- `b.toString()` – 将数组中的字节转换为 Unicode 字符串 -- `b.toBase58()` – 将以太坊值转换为 base58编码(用于 IPFS hashes) - -_运算符_ - -- `b.Concat (其他: 字节) : Byte`-返回新的 `字节`,其中包含`这个`字节,然后是 `其他`。 -- `b.ConcatI32(other: i32) : ByteArray`-返回新的 `字节数组`,该字节数组由 `这个` 直接组成,其后是 `其他` 的字节表示形式。 - -#### 地址 - -```typescript -从 '@graphprotocol/graph-ts'导入{ Address } -``` - -`地址` 扩展了 `字节` 以表示以太坊`地址` 值。 - -它在 `字节` API 之上添加了以下方法: - -- `Address.fromString(s: string): Address` –从十六进制字符串创建一个`地址` -- `Address.fromBytes(b: Bytes): Address`-从 `b` 中创建一个必须正好是20个字节长的`地址`。传入字节数较少或较多的值将导致错误 - -### 商店API - -```typescript -从 '@graphprotocol/graph-ts'导入 { store } -``` - -`存储` API 允许从图形节点存储中加载、保存和删除实体。 - -写入存储的实体与子图的 GraphQL 模式中定义的 `@entity` 类型一一对应。 为了方便使用这些实体,[Graph CLI](https://github.com/graphprotocol/graph-cli) 提供的 `graph codegen` 命令可以用来生成实体类。这些实体类是内置 `Entity` 类型的子类,具有模式中字段的属性获取和设置方法,以及加载和保存这些实体的方法。 - -#### 创建实体 - -以下是从以太坊事件创建实体的常见模式。 - -```typescript -/ Import the Transfer event class generated from the ERC20 ABI -import { Transfer as TransferEvent } from '../generated/ERC20/ERC20' - -// Import the Transfer entity type generated from the GraphQL schema -import { Transfer } from '../generated/schema' - -// Transfer event handler -export function handleTransfer(event: TransferEvent): void { - // Create a Transfer entity, using the transaction hash as the entity ID - let id = event.transaction.hash - let transfer = new Transfer(id) - - // Set properties on the entity, using the event parameters - transfer.from = event.params.from - transfer.to = event.params.to - transfer.amount = event.params.amount - - // Save the entity to the store - transfer.save() -} -``` - -如果在处理链时遇到 `Transfer` 事件,它会使用生成的 `Transfer` 类型(别名为 `TransferEvent` 以避免与实体类型的命名冲突) 传递给 `handleTransfer` 事件处理器。 此类型允许访问事件的母交易及其参数等数据。 - -每个实体都必须有一个唯一的 ID 以避免与其他实体发生冲突。 事件参数包含可以使用的唯一标识符是相当常见的。 注意:使用交易hash作为 ID 时, 假定同一交易中没有其他事件创建以该hash作为 ID 的实体。 - -#### 从存储中加载实体 - -如果实体已经存在,则可以使用以下内容从存储中加载它: - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.load(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -由于实体可能尚不存在于存储中,因此 `load` 方法返回一个 `Transfer | null`。 因此,在使用该值之前,需要检查值为 `null` 情况。 - -> **注意:** 仅当映射中所做的更改依赖于实体的先前数据时,才需要加载实体。 有关更新现有实体的两种方法,请参阅下一节。 - -#### 查找在区块中创建的实体 - -`graph-节点`v0.31.0、`@graphprotocol/graph-ts` v0.30.0和`@graphproto协议/graph cli` v0.49.0起,`loadInBlock`方法可用于所有实体类型。 - -存储API有助于检索在当前区块中创建或更新的实体。这方面的一种典型情况是,一个处理程序从某个链上事件创建一个,之交易后的处理程序希望访问该交易(如果存在)。在交易不存在的情况下,子图必须去数据库才能发现实体不存在;如果子图作者已经知道实体必须是在同一个区块中创建的,那么使用loadInBlock可以避免这种数据库往返。对于某些子图,这些遗漏的查找可能会显著增加索引时间。 - -```typescript -let id = event.transaction.hash // or however the ID is constructed -let transfer = Transfer.loadInBlock(id) -if (transfer == null) { - transfer = new Transfer(id) -} - -// Use the Transfer entity as before -``` - -> 注意:如果在给定的区块中没有创建实体,则`loadInBlock`将返回`null`,即使存储中有具有给定ID的实体。 - -#### 查找派生实体 - -`graph-节点`v0.31.0、`@graphprotocol/graph-ts` v0.31.0和`@graphproto协议/graph cli` v0.51.0起,`loadInBlock`方法可用于所有实体类型。 - -这允许从事件处理程序中加载派生实体字段。例如,给定以下模式: - -```graphql -type Token @entity { - id: ID! - holder: Holder! - color: String -} - -type Holder @entity { - id: ID! - tokens: [Token!]! @derivedFrom(field: "holder") -} -``` - -以下代码将加载`Holder`实体来源的`Token`实体: - -```typescript -let holder = Holder.load('test-id') -// Load the Token entity that the Holder entity was derived from -let token = holder.tokens.load() -``` - -#### 更新现有实体 - -有两种方法可以更新现有实体: - -1. 利用 `Transfer.load(id)`加载实体,在实体上设置属性,然后调用`.save()` 将其返回到存储。 -2. 使用 `new Transfer(id)`创建实体,在实体上设置属性,然后调用`.save()`将其保存到存储。 如果实体已经存在,则将更改合并到其中。 - -由于生成的属性设置器,在大多数情况下更改属性是直截了当的: - -```typescript -let transfer = new Transfer(id) -transfer.from = ... -transfer.to = ... -transfer.amount = ... -``` - -也可以使用以下两条指令之一取消设置属性: - -```typescript -transfer.from.unset() -transfer.from = null -``` - -这仅适用于可选属性,即在 GraphQL 中没有 `!` 声明的属性。 两个例子是`owner: Bytes` 或 `amount: BigInt`。 - -更新数组属性有点复杂,因为从实体获取数组会创建该数组的副本。 这意味着必须在更改数组后必须再次显式设置数组属性。 以下代码假设 `entity` 有 `numbers: [BigInt!]!` 字段。 - -```typescript -// This won't work -entity.numbers.push(BigInt.fromI32(1)) -entity.save() - -// This will work -let numbers = entity.numbers -numbers.push(BigInt.fromI32(1)) -entity.numbers = numbers -entity.save() -``` - -#### 从存储中删除实体 - -目前无法通过生成的类型删除实体。 相反,删除实体需要将实体类型的名称和实体 ID 传递给 `store.remove`: - -```typescript -import { store } from '@graphprotocol/graph-ts' -... -let id = event.transaction.hash -store.remove('Transfer', id) -``` - -### 以太坊 API - -以太坊 API 提供对智能合约、公共状态变量、合约函数、事件、交易、区块和编码/解码以太坊数据的访问。 - -#### 对以太坊类型的支持 - -与实体一样,`graph codegen` 为子图中使用的所有智能合约和事件生成类。 为此,合约 ABI 需要成为子图清单中数据源的一部分。 通常,ABI 文件存储在 `abis/` 文件夹中。 - -通过生成的类,以太坊类型和[内置类型](#built-in-types)之间的转换发生在幕后,因此子图开发者不必担心。 - -以下示例说明了这一点。 给定一个子图模式,如 - -```graphql -type Transfer @entity { - from: Bytes! - to: Bytes! - amount: BigInt! -} -``` - -和以太坊上的 `Transfer(address,address,uint256)` 事件签名,`from`、`to` 和 `amount` 值`address` 类型,`address` 和 `uint256` 被转换为 `Address` 和 `BigInt`,允许它们被传递给 `Transfer` 实体的 `Bytes!` 和 `BigInt!` 属性: - -```typescript -let id = event.transaction.hash.toHex() -let transfer = new Transfer(id) -transfer.from = event.params.from -transfer.to = event.params.to -transfer.amount = event.params.amount -transfer.save() -``` - -#### 事件和区块/交易数据 - -传递给事件处理程序的以太坊事件,例如前面示例中的 `Transfer` 事件,不仅提供对事件参数的访问,还提供对它们的父事务和它们所属的块的访问。以下数据可以从`event`实例中获取(这些类是`graph-ts`中`ethereum`模块的一部分): - -```typescript -class Event { - address: Address - logIndex: BigInt - transactionLogIndex: BigInt - logType: string | null - block: Block - transaction: Transaction - parameters: Array - receipt: TransactionReceipt | null -} - -class Block { - hash: Bytes - parentHash: Bytes - unclesHash: Bytes - author: Address - stateRoot: Bytes - transactionsRoot: Bytes - receiptsRoot: Bytes - number: BigInt - gasUsed: BigInt - gasLimit: BigInt - timestamp: BigInt - difficulty: BigInt - totalDifficulty: BigInt - size: BigInt | null - baseFeePerGas: BigInt | null -} - -class Transaction { - hash: Bytes - index: BigInt - from: Address - to: Address | null - value: BigInt - gasLimit: BigInt - gasPrice: BigInt - input: Bytes - nonce: BigInt -} - -class TransactionReceipt { - transactionHash: Bytes - transactionIndex: BigInt - blockHash: Bytes - blockNumber: BigInt - cumulativeGasUsed: BigInt - gasUsed: BigInt - contractAddress: Address - logs: Array - status: BigInt - root: Bytes - logsBloom: Bytes -} - -class Log { - address: Address - topics: Array - data: Bytes - blockHash: Bytes - blockNumber: Bytes - transactionHash: Bytes - transactionIndex: BigInt - logIndex: BigInt - transactionLogIndex: BigInt - logType: string - removed: bool | null -} -``` - -#### 访问智能合约状态 - -`graph codegen` 生成的代码还包括子图中使用的智能合约的相关类。 这些可用于访问公共状态变量,并在当前区块调用合约的函数。 - -一种常见的模式是访问事件起源的合约。 这是通过以下代码实现的: - -```typescript -// Import the generated contract class and generated Transfer event class -import { ERC20Contract, Transfer as TransferEvent } from '../generated/ERC20Contract/ERC20Contract' -// Import the generated entity class -import { Transfer } from '../generated/schema' - -export function handleTransfer(event: TransferEvent) { - // Bind the contract to the address that emitted the event - let contract = ERC20Contract.bind(event.address) - - // Access state variables and functions by calling them - let erc20Symbol = contract.symbol() -} -``` - -此处`Transfer`别名为`TransferEvent`,以避免与实体类型发生命名冲突。 - -只要以太坊上的`ERC20Contract`有一个名为`symbol`的公共只读函数,就可以用`.symbol()`进行调用。 对于公共状态变量,会自动创建一个具有相同名称的方法。 - -作为子图一部分的任何其他合约都可以从生成的代码中导入,并且可以绑定到一个有效地址。 - -#### 处理重复调用 - -如果您合约的只读方法可能会重复使用,那么您应该通过调用生成的以 `try_` 为前缀的合约方法来处理它。 例如,Gravity 合约公开了 `gravatarToOwner` 方法。 此代码将能够处理该方法中的重复使用: - -```typescript -let gravity = Gravity.bind(event.address) -let callResult = gravity.try_gravatarToOwner(gravatar) -if (callResult.reverted) { - log.info('getGravatar reverted', []) -} else { - let owner = callResult.value -} -``` - -请注意,连接到 Geth 或 Infura 客户端的 Graph 节点可能无法检测到所有重复使用,如果您依赖于此,我们建议使用连接到 Parity 客户端的 Graph 节点。 - -#### 编码/解码 ABI - -使用 `ethereum` 模块中的 `encode` 和 `decode` 函数,可以根据以太坊的 ABI 编码格式对数据进行编码和解码。 - -```typescript -import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' - -let tupleArray: Array = [ - ethereum.Value.fromAddress(Address.fromString('0x0000000000000000000000000000000000000420')), - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(62)), -] - -let tuple = tupleArray as ethereum.Tuple - -let encoded = ethereum.encode(ethereum.Value.fromTuple(tuple))! - -let decoded = ethereum.decode('(address,uint256)', encoded) -``` - -查询更多的信息: - -- [ABI 规范](https://docs.soliditylang.org/en/v0.7.4/abi-spec.html#types) -- 编码/解码 [Rust 库/CLI](https://github.com/rust-ethereum/ethabi) -- 更多[复杂示例](https://github.com/graphprotocol/graph-node/blob/6a7806cc465949ebb9e5b8269eeb763857797efc/tests/integration-tests/host-exports/src/mapping.ts#L72)。 - -### 日志记录 API - -```typescript -从 '@graphprotocol/graph-ts'导入 { log } -``` - -`log` API 允许子图将信息记录到 Graph 节点标准输出以及 Graph 浏览器。 可以使用不同的日志级别记录消息。有一个基本格式字符串语法可以用来编写带参数的日志消息。 - -`log` API 包括以下函数: - -- `log.debug(fmt: string, args:Array): void` - 记录调试消息。 -- `log.info(fmt: string, args:Array): void` - 记录信息性消息。 -- `log.warning(fmt: string, args: ): void` - 记录警告。 -- `log.error(fmt: string, args: ): void` - 记录一条错误消息。 -- `log.critical(fmt: string, args: ): void` – 记录一条关键消息*并*终止子图。 - -`log` API 采用格式字符串和字符串值数组,然后用数组中的字符串值替换占位符。 第一个 `{}` 占位符被数组中的第一个值替换,第二个 `{}` 占位符被第二个值替换,依此类推。 - -```typescript -log.info('Message to be displayed: {}, {}, {}', [value.toString(), anotherValue.toString(), 'already a string']) -``` - -#### 记录一个或多个值 - -##### 记录单个值 - -在下面的示例中,字符串值“A”在被记录之前被传递到一个数组中成为`['A']`: - -```typescript -let myValue = 'A' - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" - log.info('My value is: {}', [myValue]) -} -``` - -##### 从现有数组记录单个条目 - -在下面的示例中,尽管参数数组包含三个值,只有该数组的第一个值被记录了。 - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My value is: A" (Even though three values are passed to `log.info`) - log.info('My value is: {}', myArray) -} -``` - -#### 从现有数组记录多个条目 - -参数数组中的每个条目都需要在日志消息字符串中有自己的占位符 `{}`。 下面的示例在日志消息中包含三个占位符 `{}`。 因此,`myArray` 中的所有三个值都会被记录。 - -```typescript -let myArray = ['A', 'B', 'C'] - -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My first value is: A, second value is: B, third value is: C" - log.info('My first value is: {}, second value is: {}, third value is: {}', myArray) -} -``` - -##### 从现有数组记录特定条目 - -要在数组中显示特定值,必须提供它的索引值。 - -```typescript -export function handleSomeEvent(event: SomeEvent): void { - // Displays : "My third value is C" - log.info('My third value is: {}', [myArray[2]]) -} -``` - -##### 记录事件信息 - -下面的例子记录了一个事件的区块号、区块hash和交易hash: - -```typescript -import { log } from '@graphprotocol/graph-ts' - -export function handleSomeEvent(event: SomeEvent): void { - log.debug('Block number: {}, block hash: {}, transaction hash: {}', [ - event.block.number.toString(), // "47596000" - event.block.hash.toHexString(), // "0x..." - event.transaction.hash.toHexString(), // "0x..." - ]) -} -``` - -### IPFS API - -```typescript -从 '@graphprotocol/graph-ts'导入{ ipfs } -``` - -智能合约偶尔会在链上锚定 IPFS 文件。 这允许映射从合约中获取 IPFS hash并从 IPFS 读取相应的文件。 文件数据将以 `Bytes` 形式返回,这通常需要进一步处理,例如使用本页后面记录的 `json` API 进行处理。 - -给定一个 IPFS hash或路径,从 IPFS 读取文件的过程如下: - -```typescript -// Put this inside an event handler in the mapping -let hash = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D' -let data = ipfs.cat(hash) - -// Paths like `QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile` -// that include files in directories are also supported -let path = 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/Makefile' -let data = ipfs.cat(path) -``` - -**注意: **`ipfs.cat` 目前不是确定性的。如果在请求超时之前无法通过 IPFS 网络检索该文件,它将返回 `null`。因此,总是值得检查结果是否为 `null`。 - -还可以使用 `ipfs.map` 以流方式处理较大的文件。 该函数需要 IPFS 文件的hash或路径、回调的名称以及修改其行为的标志: - -```typescript -import { JSONValue, Value } from '@graphprotocol/graph-ts' - -export function processItem(value: JSONValue, userData: Value): void { - // See the JSONValue documentation for details on dealing - // with JSON values - let obj = value.toObject() - let id = obj.get('id') - let title = obj.get('title') - - if (!id || !title) { - return - } - - // Callbacks can also created entities - let newItem = new Item(id) - newItem.title = title.toString() - newitem.parent = userData.toString() // Set parent to "parentId" - newitem.save() -} - -// Put this inside an event handler in the mapping -ipfs.map('Qm...', 'processItem', Value.fromString('parentId'), ['json']) - -// Alternatively, use `ipfs.mapJSON` -ipfs.mapJSON('Qm...', 'processItem', Value.fromString('parentId')) -``` - -当前支持的唯一标志是 `json`,它必须传递给 `ipfs.map`。 使用 `json` 标志,IPFS 文件必须包含一系列 JSON 值,每行一个值。 对 `ipfs.map` 的调用将读取文件中的每一行,将其反序列化为 `JSONValue` 并为每一行调用回调函数。 回调函数可以使用实体操作存储来自 `JSONValue` 的数据。 实体更改仅在调用 `ipfs.map` 的处理程序成功完成时存储; 同时,它们被保存在内存中,因此 `ipfs.map` 可以处理的文件的大小是有限的。 - -成功时,`ipfs.map` 返回 `void`。 如果回调函数的任何调用导致错误,则调用 `ipfs.map` 的处理程序将被中止,并且子图被标记为失败。 - -### Crypto API - -```typescript -从'@graphprotocol/graph-ts'导入{ crypto } -``` - -`crypto` API 使加密函数可用于映射。 目前,只有一个函数: - -- `crypto.keccak256(input: ByteArray): ByteArray` - -### JSON API - -```typescript -从'@graphprotocol/graph-ts'导入{ json, JSONValueKind } -``` - -JSON 数据可以使用 `json` API 进行解析: - -- `json.fromBytes(data: Bytes): JSONValue` – 解析来自 `Bytes` 数组的 JSON 数据,解释为有效的 UTF-8 序列 -- `json.try_fromBytes(data: Bytes): Result` – `json.fromBytes`的安全版本, 如果解析失败则返回错误变体 -- `json.fromString(data: string): JSONValue` – 从有效的 UTF-8 `String` 解析 JSON 数据 -- `json.try_fromString(data: Bytes): Result` – `json.fromString`的安全版本, 如果解析失败则返回错误变体 - -`JSONValue` 类提供了一种从任意 JSON 文档中提取值的方法。 由于 JSON 值可以是布尔值、数字、数组等,因此 `JSONValue` 带有一个 `kind` 属性来检查值的类型: - -```typescript -let value = json.fromBytes(...) -if (value.kind == JSONValueKind.BOOL) { - ... -} -``` - -此外,还有一个方法可以检查该值是否为`空`: - -- `value.isNull(): boolean` - -当值的类型确定时,可以使用以下方法之一将其转换为[内置类型](#built-in-types): - -- `value.toBool(): boolean` -- `value.toI64(): i64` -- `value.toF64(): f64` -- `value.toBigInt(): BigInt` -- `value.toString(): string` -- `value.toArray(): Array` - (然后使用上述 5 种方法之一转换 `JSONValue`) - -### 类型转换参考 - -| 源 | 目标 | 转换函数 | -| ---------------- | -------------------- | ---------------------------- | -| 地址 | 字节 | none | -| 地址 | 字符串 | s.toHexString() | -| BigDecimal | 字符串 | s.toString() | -| BigInt | BigDecimal | s.toBigDecimal() | -| BigInt | String (hexadecimal) | s.toHexString() 或 s.toHex() | -| BigInt | 字符串 (unicode) | s.toString() | -| BigInt | i32 | s.toI32() | -| Boolean | Boolean | none | -| 字节 (签字) | BigInt | BigInt.fromSignedBytes(s) | -| 字节(未签字) | BigInt | BigInt.fromUnsignedBytes(s) | -| 字节 | 字串(十六进制) | s.toHexString() 或 s.toHex() | -| 字节 | 字符串 (unicode) | s.toString() | -| 字节 | 字符串 (base58) | s.toBase58() | -| 字节 | i32 | s.toI32() | -| 字节 | u32 | s.toU32() | -| 字节 | JSON | json.fromBytes(s) | -| int8 | i32 | none | -| int32 | i32 | none | -| int32 | BigInt | Bigint.fromI32(s) | -| uint24 | i32 | none | -| int64 - int256 | BigInt | none | -| uint32 - uint256 | BigInt | none | -| JSON | boolean | s.toBool() | -| JSON | i64 | s.toI64() | -| JSON | u64 | s.toU64() | -| JSON | f64 | s.toF64() | -| JSON | BigInt | s.toBigInt() | -| JSON | 字符串 | s.toString() | -| JSON | 数组 | s.toArray() | -| JSON | 对象 | s.toObject() | -| 字符串 | 地址 | Address.fromString(s) | -| 字节 | 地址 | Address.fromString(s) | -| 字符串 | BigInt | BigDecimal.fromString(s) | -| 字符串 | BigDecimal | BigDecimal.fromString(s) | -| 字串(十六进制) | 字节 | 字节数组.fromHexString(s) | -| 字符串 (UTF-8) | 字节 | 字节数组.fromUTF8(s) | - -### 数据源元数据 - -您可以通过 `dataSource` 命名空间检查调用处理程序数据源的合约地址、网络和内容: - -- `dataSource.address(): Address` -- `dataSource.network(): string` -- `dataSource.context(): DataSourceContext` - -### Entity 和 DataSourceContext - -基本的 `Entity` 类和 `DataSourceContext` 子类可以帮助动态设置和获取字段: - -- `setString(key: string, value: string): void` -- `setI32(key: string, value: i32): void` -- `setBigInt(key: string, value: BigInt): void` -- `setBytes(key: string, value: Bytes): void` -- `setBoolean(key: string, value: bool): void` -- `setBigDecimal(key, value: BigDecimal): void` -- `getString(key: string): string` -- `getI32(key: string): i32` -- `getBigInt(key: string): BigInt` -- `getBytes(key: string): Bytes` -- `getBoolean(key: string): boolean` -- `getBigDecimal(key: string): BigDecimal` - -### AssemblyScript的常见问题 - -在子图开发过程中,常常会遇到某些 [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) 问题。它们在调试难度范围内,但是,意识到它们可能会有所帮助。以下是这些问题的非详尽清单: - -- `Private` 类变量未在 [AssembyScript](https://www.assemblyscript.org/status.html#language-features) 中强制执行。没有办法保护类变量不被类对象直接更改。 -- 范围不能继承到[闭包函数](https://www.assemblyscript.org/status.html#on-closures)中,也就是说,不能使用在闭包函数之外声明的变量。解释在[开发者亮点 # 3](https://www.youtube.com/watch?v=1-8AW-lVfrA&t=3243s)。 diff --git a/website/pages/zh/network-transition-faq.mdx b/website/pages/zh/network-transition-faq.mdx deleted file mode 100644 index 5fb8cc27321e..000000000000 --- a/website/pages/zh/network-transition-faq.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: 网络过渡常见问题解答 ---- - -开发者将有充足的时间将其子图迁移到去中心化网络。根据索引人和网络准备情况,每个链的确切时间会有所不同,托管服务不会立即终止对所有链的支持,也不会突然停止。 - -托管服务(包括以太坊)上的每个链都将逐渐衰落,因为它在去中心化网络上得到支持,以实现功能对等和高质量的服务。这将在[MIPs计划](https://thegraph.com/blog/mips-multi-chain-indexing-incentivized-program/)中索引人的帮助下,在网络到网络的基础上进行,以实现对去中心化网络上每个网络的全面支持。 - -为了进一步明确对托管服务上每个网络的持续支持,这些FAQS解答了有关网络过渡过程细节的常见问题。如果您想现在开始子图迁移过程,这里有一个[分步指南](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph)。要跳到迁移常见问题解答,请[单击此处](#migration-faqs)。 - -## 托管服务末期常见问题解答 - -### 在去中心化网络为子图提供核心功能之前,是否必须迁移子图? - -子图开发人员现在可以开始迁移他们的以太坊主网子图,但在去中心化网络和托管服务存在功能核心功能之前,不会强制将子图迁移到网络。Gnosis链子图的迁移也将很快开始,一旦索引人测试了链并准备好在生产中对其进行索引,其他网络也将跟进。 - -### 弃用托管服务的时间线和流程是什么? - -所有网络都将有自己的时间线,这取决于它们在网络上的启用时间以及完成每个阶段所需的时间线。核心开发人员正在努力尽快将大部分托管服务流量迁移到去中心化网络。 - -最重要的是,在去中心化网络上特定网络/子图的核心功能可用之前,您不会失去对托管服务的访问。 - -每个网络的托管服务弃用的三个不同阶段是: - -#### 阶段1(The Sunray):禁止为网络上质量相同的区块链创建新的子图 - -在此阶段,开发人员将无法再为该链的托管服务部署新的子图。开发人员仍然可以升级托管服务上的现有子图。 - -还没有网络开始从托管服务向去中心化网络过渡的第一阶段。 - -随着网络进入第1阶段,请注意,开发人员仍然可以使用子图工作室中速率受限的开发者预览URL来开发和测试其子图(最多1000个免费查询),而无需获取GRT或与协议经济性交互。 - -#### 阶段2(The Sunbeam):禁用子图升级 - -在此阶段,必须通过子图工作室升级子图,然后发布到去中心化网络。网络的托管服务子图仍然存在,并且可以查询,但必须在Graph的去中心化网络上升级子图。 - -由于流程是由核心功能的退出标准驱动的,而不是日期,因此没有确切的时间表来确定任何网络何时会进入该阶段。 - -#### 阶段3(The Sunrise):禁用查询子图 - -在此阶段,托管服务上的子图不再处理由Graph网络支持的网络的查询。在这个阶段,查询网络上子图的区块链数据的唯一方法是通过去中心化网络。测试查询仍然可以通过开发查询URL在[子图工作室](https://thegraph.com/studio/)中使用。 - -直到成功移动到第2阶段,网络将不会移动到第3阶段,并给开发者足够的时间迁移到去中心化网络。 - -![子图图表](/img/subgraph-chart.png) - -> 注意:此图反映了每个网络的消减过程。托管服务消减时间会有所不同,不会一次消减。 - -### Goerli, Mumbai等测试网络会发生什么? - -所有网络和测试网络都有资格在[子图工作室](https://thegraph.com/studio/)中获得免费的部署查询URL。此URL受速率限制,仅用于用于测试和开发产生的流量。想拥有产品级流量将需要已经发布到Graph网络的子图,以便具有生产级冗余和稳定性。 - -![速率上限](/img/rate-limit.png) - -### Graph网络是否具有与托管服务相同的功能? - -Graph网络上的索引人运行[Graph节点](https://github.com/graphprotocol/graph-node/releases)的最新网络批准版本,并且可以支持该版本中支持的任何子图功能。 - -有时,仍在开发中的未发布功能可能首先在Developer Preview URL上可用,该URL运行[Graph节点](https://github.com/graphprotocol/graph-node)的最新主提交。这些功能将在下一个Graph节点版本中在网络上可用。 - -如果某些子图功能在网络上不具有确定性或可验证性,则它们不符合索引奖励的条件。具体示例是从IPFS获取文件,以及在Graph网络上尚未支持的索引网络。 - -具有这些功能的子图可以发布到网络,但索引人可能无法获取。然而,具有足够信号的子图仍然可能吸引对收集查询费用感兴趣的索引人,任何子图都有资格获得查询费用。 - -### 与运行自己的基础设施相比,Graph网络的成本是多少? - -如[这些案例研究](https://thegraph.com/docs/en/network/benefits/#low-volume-user-less-than-30000-queries-per-month)所示,Graph的去中心化网络比运行专用基础设施的成本低60-90%。 - -### 迁移到网络后,应该对托管服务子图做什么? - -强烈建议隐藏托管服务子图以避免混淆。[本视频](https://www.loom.com/share/7cffd2a7845e4fbd8c51f45c516cb7f9)将介绍整个过程。 - -### 去中心化网络何时支持首选网络? - -每个网络没有设定的时间线,它们将由索引人通过[MIP计划](https://thegraph.com/migration-incentive-program/)决定,其中新网络由索引人测试。由于网络上支持新的网络,用户将收到充分的通知,为迁移做好准备。Graph生态系统的核心开发人员和贡献者正在努力尽快实现对更多网络的支持。 - -### 以太坊主网是否进入网络过渡过程的第一阶段? - -虽然以太坊最初预计将于2022年第三个季度末开始脱离托管服务,但这一计划已被[推迟](https://thegraph.com/blog/transitioning-to-decentralized-graph-network),以解决用户反馈问题。对用户体验、计费和其他用户请求实现的额外改进将推动以太坊的托管服务过渡时间表。通过下面的集成状态跟踪器和[The Graph Twitter](https://twitter.com/graphprotocol)了解以太坊何时进入Sunray阶段。 - -### Graph 网络集成状态跟踪器 - -下表说明了每个网络在网络集成过程中的位置。如果您的首选网络尚未列出,则集成尚未开始,且该网络仍由Graph的托管服务完全支持。 - -> 此表将不包含[子图工作室](https://thegraph.com/studio/)中保持免费的测试网络。 - -| 网络 | 宣布在Graph网络上集成 | 网络集成完成 | 阶段1:禁用托管服务上的新子图 | 阶段2:禁用托管服务上的子图升级 | 阶段3:禁用托管服务上的子图 | -| --- | :-: | :-: | :-: | :-: | :-: | -| 以太坊 | ✓ | ✓ | | | | -| Gnosis(以前称为 xDAI) | ✓ | ✓\* | | | | -| Polygon | ✓ | | | | | -| Celo | ✓ | ✓\* | | | | -| Arbitrum One | ✓ | ✓\* | | | | -| Avalanche | ✓ | ✓\* | | | | -| Optimism | ✓ | | | | | -| Fantom | ✓ | | | | | - -\*该网络目前正在Graph的去中心化网络上进行测试。 - -## 查询费用、API密钥和计费常见问题解答 - -### 查询费用如何定价? - -在去中心化网络中,查询费用受到查询需求的影响。核心开发人员创建了一个名为 [Agora](https://github.com/graphprotocol/agora) 的查询定价成本模型语言。它使索引人能够有效地为查询定价。在 [Agora](https://github.com/graphprotocol/agora/blob/master/docs/README.md) 文档中了解更多信息。 - -### 如何设置最大查询预算? - -用户可以在“预算”选项卡下的“ Subgraph Studio [API Key](https://thegraph.com/studio/apikeys/)”部分中设置最大查询预算。[观看此视频](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0),以了解该过程的概述,以及调整您的 API 密钥的其他部分。 - -请注意,将您的最大查询预算设置得太低将排除索引人,可能导致低质量的服务,如查询失败、查询缓慢等。 - -截至2022年9月底,最佳实践是将最大查询预算保持在 0.00035-0.0004美元范围内。 - -### 如何保护 API 密钥? - -鼓励用户在 [子图工作室](https://thegraph.com/studio/) 中通过子图和域来限制 API 密钥: - -![受限制的域](/img/restrictdomain.png) - -### 如何填写 API 密钥以支付查询费用? - -您可以通过按“添加 GRT”按钮来填充子图工作室 [计费仪表板](https://thegraph.com/studio/billing/)中的计费余额。目前正在努力改善这方面的经验,以增加更多的无缝和经常性付款。 - -[这段视频](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5)概述了这个过程。 - -### 如何在 API 密钥中设置低账单余额警报? - -用户应该在[这里](https://thegraph.com/studio/settings/)设置一个账单提醒到他们的电子邮件地址。 - -此外,当账单余额越来越低时,用户的用户界面中会闪现一个横幅来发出警告。 - -管理 API 密钥设置的最佳实践是什么? - -建议使用0.0004美元的最大查询预算来维持较低的平均查询价格,同时保持高质量的服务。这可以在 [API Key 部分](https://thegraph.com/studio/apikeys/)的预算计费选项卡中完成。 - -## 迁移常见问题 - -### 怎样才能将子图迁移到Graph的去中心化网络中呢? - -了解如何迁移您的子图到Graph网络与这个简单的[一步一步的指南](https://thegraph.com/blog/how-to-migrate-ethereum-subgraph)或[此视频](https://www.youtube.com/watch?v=syXwYEk-VnU&t=1s)。 - -### 对于早期迁移到Graph网络的子图,是否有迁移补助金? - -是的,要申请补助金,就到[这里](mailto:migration@thegraph.foundation)来。 - -### 通过从 Graph 生态系统的迁移过程,是否有任何财务/技术/市场支持? - -项目有移植补助金,用于管理子图(吸引索引人)和支付初始查询费用(在[这里](https://thegraph.typeform.com/to/Zz8UAPri?typeform-source=thegraph.com)申请) ,一个[直接的渠道](https://discord.gg/graphprotocol),以帮助工程师的每一个步骤,并优先营销活动,以展示你的项目迁移后,例如这些 Twitter 里: [1](https://twitter.com/graphprotocol/status/1496891582401814537),[2](https://twitter.com/graphprotocol/status/1491926128302379008),&[3](https://twitter.com/graphprotocol/status/1491126245396201473)。 - -### 查询需要多长时间? - -在去中心化网络中,查询平均需要150-300毫秒。 - -### Graph网络上的计费流程是否比托管服务上的更复杂? - -是的,网络的用户体验还没有达到托管服务的质量平价。特别是计费用户体验,仍然处于非常早期的阶段,核心开发团队正在努力从流程中抽象出许多移动的部分。这些改进中的大部分将在不久的将来公布于众。 - -### 我可以支付Graph网络查询法令,信用卡,或稳定硬币? - -在接下来的几个月里,用户为了支付他们的子图而需要采取的步骤将大大减少。尽管仍将使用 GRT 进行支付,但已经在努力实施一个法定的入口匝道和自动化支付系统,将法定和加密货币转换为 GRT 进行经常性支付。 - -### 网络是否会拥有与托管服务相同的用户体验? - -虽然仍有工作要做,但目标是在 The Graph Network 上提供与目前托管服务上存在的质量相当甚至更好的用户体验。短期内,目标是提供更精简和可预测的计费体验,帮助用户将更多时间用于构建高质量的 dapp。 - -### 如何确保子图将被Graph网络上的索引人获取? - -建议使用至少10,000 GRT 进行策划,用户可以在发布时的同一交易中进行策划。用户也可以要求策展社区在[这里](https://t.me/CurationStation)策展他们的子图。 - -早期移民有移民补助金来支付这些初始费用,你可以在[这里](mailto:migration@thegraph.foundation)申请。 - -### 为什么子图需要策展信号? 如果策展人在子图上没有足够的信号怎么办? - -策划信号越高,子图对索引者越有吸引力,因为较高的信号和较高的索引回报之间存在线性相关。如果没有策展,索引人就没有动力选择子图。 - -### 子图开发人员用于策展信号的 GRT 会发生什么变化? - -如果您是第一个信号子图,您的 GRT 信号量将不会下降。用于治疗的 GRT 可以稍后移除。此外,策展人获得索引人收取所有查询费用的10% 。 - -### 策展过程有哪些改进? - -短期内,Arbitrum的初始策展模型将为策展信号提供原理性保护。从长远来看,核心开发人员将优先考虑为开发人员提供租赁策展信号的能力,打开一个更可预测的定价体验,同时仍然确保子图被充分索引。 - -### 如何在前端切换子图 API? - -在至少一个索引人完全索引了一个子图之后,用户可以查询去中心化的网络。 - -为了检索子图的查询 URL,您可以通过单击查询 URL 旁边的符号来复制/粘贴它。你会看到这样的东西: - -`https://gateway.thegraph.com/api/[api-key]/subgraphs/id/S9ihna8D733WTEShJ1KctSTCvY1VJ7gdVwhUujq4Ejo` - -只需将[ API-Key] 替换为子图工作室 [API Key部分](https://thegraph.com/studio/apikeys/)中生成的 API 密钥。 - -### 查询的成本是多少? - -网络中的平均查询成本是不同的。在2022年9月,每个查询费用的平均价格介于 0.00012-0.00020美元之间。 - -### 怎样才能知道子图有多少体积,将花费多少? - -托管服务数量数据不公开。请在[这里](mailto:migration@thegraph.foundation)获取数量和成本估算。 - -### 网关是如何工作的? 它是完全去中心化的吗? - -网关进程查询,以便索引人可以为 dapps 提供服务。网关处于一个逐步去中心化的中间阶段。很快会有更多消息。 - -## 使用网络的常见问题 - -### 升级子图有成本吗? - -是的,这是1% 的策展信号。1% 平均分配给策展人 (0.5%) 和子图开发者(0.5%)。因此,每发出一个10K GRT 信号,子图开发人员就要花费50 GRT 进行升级。 - -### 如何加快同步时间? - -尽量减少子图中智能合约调用的使用。访问智能合约状态需要对 RPC 进行 eth \_ call,这会减慢同步时间。 - -### 迁移子图工作室的时候有多重签名支持吗? - -是的,最近增加了对多重签名的支持。您可以在[这里](https://thegraph.com/docs/studio/multisig)找到更多信息。 - -### 以太坊和Arbitrum上GRT的合约地址是什么? - -- 以太坊: `0xc944E90C64B2c07662A292be6244BDf05Cda44a7` -- 以太坊Goerli测试网地址: `0x5c946740441C12510a167B447B7dE565C20b9E3C` -- Arbitrum: `0x9623063377AD1B27544C965cCd7342f7EA7e88C7` -- Arbitrum Goerli地址: `0x18c924bd5e8b83b47efadd632b7178e2fd36073d` - -### 项目通常在 API 密钥中保留多少 GRT? - -许多项目在 API 密钥中保留了30-60天的 GRT,所以他们不需要经常重新填充。要了解您的30-60天 GRT 费用是什么,请到[这里](mailto:migration@thegraph.foundation)来。 - -### 如何在去中心化的网络上进行查询支付?  - -费用每周开一次发票,从用户的 API 密钥中取出,用GRT 桥接并位于Arbitrum 上。 - -### 如何在去中心化网络中使用子图的 API 密钥? - -API 密钥使用户能够在他们支付的最高查询价格和优先考虑价格、经济新鲜度和查询速度等因素方面拥有发言权。 - -### 当前托管服务和去中心化网络之间的服务质量比较如何? - -托管服务和去中心化网络具有大致相同的中值延迟,但是去中心化网络在较高的百分位数具有较高的延迟。200个查询的比率通常相似,都> 99.9% 。由于它的去中心化,网络没有广泛的子图中断,而托管服务确实在罕见的情况下有临时中断,由于其中心化的性质。 - -### 如果这些常见问题没有回答我的问题怎么办? - -如需任何其他帮助,请联系 [mobile@thegraph. foundation](mailto:migration@thegraph.foundation)。 diff --git a/website/pages/zh/querying/querying-the-hosted-service.mdx b/website/pages/zh/querying/querying-the-hosted-service.mdx deleted file mode 100644 index b47509b28134..000000000000 --- a/website/pages/zh/querying/querying-the-hosted-service.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: 查询托管服务 ---- - -With the subgraph deployed, visit the [hosted service](https://thegraph.com/hosted-service/) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema. - -下面提供了一个示例,但请参阅 [查询 API](/querying/graphql-api) 以获取有关如何查询子图实体的完整参考。 - -## 示例 - -此查询列出了我们的映射创建的所有计数器。 由于我们只创建一个,结果将只包含我们的一个 `default-counter`: - -```graphql -{ - counters { - id - value - } -} -``` - -## Using the hosted service - -The Graph Explorer and its GraphQL playground is a useful way to explore and query deployed subgraphs on the hosted service. - -下面详细介绍了一些主要功能: - -![浏览器操作面板](/img/explorer-playground.png)