Skip to content

Commit

Permalink
Run pnpm check:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benface committed Dec 13, 2024
1 parent 1bce0f1 commit 87cd681
Show file tree
Hide file tree
Showing 329 changed files with 3,757 additions and 3,442 deletions.
6 changes: 3 additions & 3 deletions website/pages/ar/cookbook/near.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,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).

Expand Down Expand Up @@ -163,7 +163,7 @@ class ReceiptWithOutcome {
These types are passed to block & receipt handlers:

- معالجات الكتلة ستتلقى`Block`
- معالجات الاستلام ستتلقى` ReceiptWithOutcome `
- معالجات الاستلام ستتلقى`ReceiptWithOutcome`

Otherwise, the rest of the [AssemblyScript API](/developing/graph-ts/api) is available to NEAR subgraph developers during mapping execution.

Expand Down
6 changes: 3 additions & 3 deletions website/pages/ar/cookbook/subgraph-debug-forking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ Oops, how unfortunate, when I deploy my perfect looking subgraph to [Subgraph St

وأنا أجيب:

1. ` fork-base ` هو عنوان URL "الأساسي" ،فمثلا عند إلحاق _subgraph id_ ، يكون عنوان URL الناتج (`<fork-base>/<subgraph-id>`) هو GraphQL endpoint صالح لمخزن الـ subgraph.
1. `fork-base` هو عنوان URL "الأساسي" ،فمثلا عند إلحاق _subgraph id_ ، يكون عنوان URL الناتج (`<fork-base>/<subgraph-id>`) هو GraphQL endpoint صالح لمخزن الـ subgraph.
2. الـتفريع سهل ، فلا داعي للقلق:

```bash
$ graph deploy <subgraph-name> --debug-fork <subgraph-id> --ipfs http://localhost:5001 --node http://localhost:8020
```

أيضًا ، لا تنس تعيين حقل ` dataSources.source.startBlock ` في subgraph manifest لرقم الكتلة(block) التي بها المشكلة، حتى تتمكن من تخطي فهرسة الكتل الغير ضرورية والاستفادة من التفريع!
أيضًا ، لا تنس تعيين حقل `dataSources.source.startBlock` في subgraph manifest لرقم الكتلة(block) التي بها المشكلة، حتى تتمكن من تخطي فهرسة الكتل الغير ضرورية والاستفادة من التفريع!

لذلك ، هذا ما أفعله:

Expand All @@ -90,7 +90,7 @@ $ cargo run -p graph-node --release -- \
--fork-base https://api.thegraph.com/subgraphs/id/
```

2. بعد فحص دقيق ، لاحظت أن هناك عدم تطابق في تمثيلات الـ ` id ` المستخدمة عند فهرسة ` Gravatar ` في المعالجين الخاصين بي. بينما ` handleNewGravatar ` يحول (`event.params.id.toHex()`) إلى سداسي ، `handleUpdatedGravatar` يستخدم int32 (`event.params.id.toI32()`) مما يجعل ` handleUpdatedGravatar ` قلقا من "Gravatar not found!". أنا أجعلهم كلاهما يحولان ` id ` إلى سداسي.
2. بعد فحص دقيق ، لاحظت أن هناك عدم تطابق في تمثيلات الـ `id` المستخدمة عند فهرسة `Gravatar` في المعالجين الخاصين بي. بينما `handleNewGravatar` يحول (`event.params.id.toHex()`) إلى سداسي ، `handleUpdatedGravatar` يستخدم int32 (`event.params.id.toI32()`) مما يجعل `handleUpdatedGravatar` قلقا من "Gravatar not found!". أنا أجعلهم كلاهما يحولان `id` إلى سداسي.
3. 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`:

```bash
Expand Down
22 changes: 11 additions & 11 deletions website/pages/ar/developing/creating-a-subgraph/install-the-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ The `graph add` command will fetch the ABI from Etherscan (unless an ABI path is

## SpecVersion Releases

| الاصدار | ملاحظات الإصدار |
| :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` |
| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. |
| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune subgraphs |
| 0.0.9 | Supports `endBlock` feature |
| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). |
| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). |
| 0.0.6 | Supports fast [Proof of Indexing](/network/indexing/#what-is-a-proof-of-indexing-poi) calculation variant. |
| 0.0.5 | Added support for event handlers having access to transaction receipts. |
| 0.0.4 | Added support for managing subgraph features. |
| الاصدار | ملاحظات الإصدار |
| :-: | --- |
| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` |
| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. |
| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune subgraphs |
| 0.0.9 | Supports `endBlock` feature |
| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). |
| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). |
| 0.0.6 | Supports fast [Proof of Indexing](/network/indexing/#what-is-a-proof-of-indexing-poi) calculation variant. |
| 0.0.5 | Added support for event handlers having access to transaction receipts. |
| 0.0.4 | Added support for managing subgraph features. |
28 changes: 14 additions & 14 deletions website/pages/ar/developing/creating-a-subgraph/ql-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ For some entity types the `id` for `Bytes!` is constructed from the id's of two

The following scalars are supported in the 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 be a signed 32-bit integer. |
| `Int8` | An 8-byte signed integer, also known as a 64-bit signed integer, can store values in the range from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Prefer using this to represent `i64` from ethereum. |
| `BigInt` | 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. |
| `Timestamp` | It is an `i64` value in microseconds. Commonly used for `timestamp` fields for timeseries and aggregations. |
| النوع | الوصف |
| --- | --- |
| `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 be a signed 32-bit integer. |
| `Int8` | An 8-byte signed integer, also known as a 64-bit signed integer, can store values in the range from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Prefer using this to represent `i64` from ethereum. |
| `BigInt` | 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. |
| `Timestamp` | It is an `i64` value in microseconds. Commonly used for `timestamp` fields for timeseries and aggregations. |

### Enums

Expand Down Expand Up @@ -306,7 +306,7 @@ Supported language dictionaries:

Supported algorithms for ordering results:

| Algorithm | Description |
| ------------- | ----------------------------------------------------------------------- |
| rank | استخدم جودة مطابقة استعلام النص-الكامل (0-1) لترتيب النتائج. |
| proximityRank | Similar to rank but also includes the proximity of the matches. |
| Algorithm | Description |
| ------------- | --------------------------------------------------------------- |
| rank | استخدم جودة مطابقة استعلام النص-الكامل (0-1) لترتيب النتائج. |
| proximityRank | Similar to rank but also includes the proximity of the matches. |
20 changes: 10 additions & 10 deletions website/pages/ar/developing/graph-ts/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ 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.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) |
| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. |
| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types<br />Added `receipt` field to the Ethereum Event object |
| 0.0.6 | Added `nonce` field to the Ethereum Transaction object<br />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))<br />`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<br />`etherem.call.address` renamed to `ethereum.call.to` |
| 0.0.2 | Added `input` field to the Ethereum Transaction object |
| الاصدار | ملاحظات الإصدار |
| :-: | --- |
| 0.0.9 | Adds new host functions [`eth_get_balance`](#balance-of-an-address) & [`hasCode`](#check-if-an-address-is-a-contract-or-eoa) |
| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. |
| 0.0.7 | Added `TransactionReceipt` and `Log` classes to the Ethereum types<br />Added `receipt` field to the Ethereum Event object |
| 0.0.6 | Added `nonce` field to the Ethereum Transaction object<br />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))<br />`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<br />`etherem.call.address` renamed to `ethereum.call.to` |
| 0.0.2 | Added `input` field to the Ethereum Transaction object |

### الأنواع المضمنة (Built-in)

Expand Down
10 changes: 5 additions & 5 deletions website/pages/ar/developing/unit-testing-framework.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1380,15 +1380,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/graph-ts/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.
Expand Down
Loading

0 comments on commit 87cd681

Please sign in to comment.