Near交易的手续费如何获取,哪些操作涉及Near金额?

How to get the transaction fees of Near transactions and which operations involves Near amount?

https://explorer.near.org/blocks/99qdUGNmGMMQQdKGmgA7Lf6PjaXAHgVVy53DLHJZpcbb

块 - 35866073 有 5 个交易

ChunkHash - GwMUrTgEfqEaV9s8ngvqUn9c4hi4G8Ywpggoy4VDwnok

5 个事务处理

事务哈希 2 - AMDbiQUJx2Dd9FfbaYYbNj2D6T6xPJMHgWCZ4RTrN1UU

从comchien.near转移到85a577d5db02df7830c8ad3db76ca6a90dee6f176c8478eb12dbf30d8d2d54ee - 5.58572

交易费 - ?资源管理器中显示了一些交易费用,但在 Json 结构中我没有看到交易费用,你能帮我如何获得交易费用吗

交易哈希 2- 6Beo8SFyjPjjtFnT3b2aEGDHgPY9HxGZ17vWvpSN733c

我可以看到 storage_deposit、near_deposit 和 ft_transfer_call。是否所有金额都转移到 wrap.near。 json 结构中缺少相同的交易费用。

NEAR 中的交易只是输入。要查看输出(执行结果),您需要使用 tx RPC to see transaction_outcome -> outcome -> tokens_burned field. That is the transaction initial processing fee. Next, you need to fetch receipt execution outcomes (well, it is right there in the tx RPC response) and sum all the receipts_outcome -> outcome -> tokens_burned. That is exactly what NEAR Explorer does.

查询交易详情

您还可以找到 this doc 有用的地方,我在那里解释了所有平衡变化。