Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tx-fees.md #422

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions builders/get-started/eth-compare/tx-fees.md
Expand Up @@ -257,6 +257,9 @@ contract SayHello {
Transaction Fee = (GasPrice * TransactionWeight) / {{ networks.moonbase.tx_weight_to_gas_ratio }}
```

!!! 请注意
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!!! 请注意
!!! 注意事项

This has to match what is defined in the moonbeam-mkdocs repo, so that the css understands and renders the correct color

You can see where it is defined here: https://github.com/papermoonio/moonbeam-mkdocs/blob/master/material-overrides/assets/stylesheets/moonbeam.css#L627

Same for the other admonitions like remember: https://github.com/papermoonio/moonbeam-mkdocs/blob/master/material-overrides/assets/stylesheets/moonbeam.css#L680

and challenge (not used a whole lot): https://github.com/papermoonio/moonbeam-mkdocs/blob/master/material-overrides/assets/stylesheets/moonbeam.css#L663

EIP-1559在Moonbeam上的交易费用根据前个区块的基本费用计算得来。

以下部分更详细地描述了计算交易费用的每个组成部分。

### 基础费用 {: #base-fee}
Expand Down Expand Up @@ -433,6 +436,9 @@ Moonbeam网络实施[`eth_feeHistory`](https://docs.alchemy.com/reference/eth-fe

以下代码片段使用[Axios HTTP客户端](https://axios-http.com/){target=\_blank}来为最终区块查询[Sidecar端点`/blocks/head`](https://paritytech.github.io/substrate-api-sidecar/dist/#operations-tag-blocks){target=\_blank}。随后,根据交易类型(以太坊API:legacy、EIP-1559或EIP-2930标准以及Substrate API)计算区块中所有交易的交易费用,以及区块中的总交易费用。

!!! 请注意
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!!! 请注意
!!! 注意事项

EIP-1559在Moonbeam上的交易费用根据前个区块的基本费用计算得来。

以下代码示例仅用于演示目的,代码需进行修改并进一步测试后才可正式用于生产环境。

您可以将以下代码片段用于任何基于Moonbeam的网络,但您需要相应地修改`baseFee`。您可以参考[基本费用](#base-fee)部分以获取每个网络的计算结果。
Expand Down