Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New translations api.mdx (Chinese Simplified)
Browse files Browse the repository at this point in the history
benface committed Dec 16, 2024
1 parent ab22a32 commit 9128349
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions website/pages/zh/developing/graph-ts/api.mdx
Original file line number Diff line number Diff line change
@@ -29,16 +29,16 @@ Since language mappings are written in AssemblyScript, it is useful to review th

子图清单中的 `apiVersion` 指定了由 Graph Node 运行的特定子图的映射 API 版本。

| 版本 | Release 说明 |
| :-: | --- |
| 版本 | Release 说明 |
| :---: | ---------------------------------------------------------------------------------------------------------------------------- |
| 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 | 添加了 `TransactionReceipt``Log` 类到以太坊类型。<br />已将 `receipt` 字段添加到Ethereum Event对象。 |
| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加<br /> baseFeePerGas字段 |
| 0.0.5 | AssemblyScript 升级到版本 0.19.10(这包括重大更改,参阅 <br />迁移指南)ethereum.transaction.gasUsed 重命名为 ethereum.transaction.gasLimit |
| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 |
| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。<br />`etherem.call.address` 被重命名为 `ethereum.call.to`|
| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 |
| 0.0.8 | Adds validation for existence of fields in the schema when saving an entity. |
| 0.0.7 | 添加了 `TransactionReceipt``Log` 类到以太坊类型。<br />已将 `receipt` 字段添加到Ethereum Event对象。 |
| 0.0.6 | 向Ethereum Transaction对象添加了 nonce 字段 向 Etherum Block对象添加<br /> baseFeePerGas字段 |
| 0.0.5 | AssemblyScript 升级到版本 0.19.10(这包括重大更改,参阅 <br />迁移指南)ethereum.transaction.gasUsed 重命名为 ethereum.transaction.gasLimit |
| 0.0.4 | 已向 Ethereum SmartContractCall对象添加了 `functionSignature` 字段。 |
| 0.0.3 | 已向Ethereum Call 对象添加了 `from` 字段。<br />`etherem.call.address` 被重命名为 `ethereum.call.to` |
| 0.0.2 | 已向Ethereum Transaction对象添加了 `input` 字段。 |

### 内置类型

@@ -769,19 +769,19 @@ 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 (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 (hexadecimal) | s.toHexString() 或 s.toHex() |
| Bytes | String (unicode) | s.toString() |
| Bytes | String (base58) | s.toBase58() |
| Bytes | i32 | s.toI32() |

0 comments on commit 9128349

Please sign in to comment.