使用Flow-JS测试测试时如何获得交易费用

发布于 2025-02-10 06:04:24 字数 240 浏览 0 评论 0原文

我有一个正在测试的MINT TX,我希望这是真的:

usersBalanceAfterMinting == usersBalanceBeforeMinting - costOfMinting - txFee

但是,当我从TX中打印出事件时,没有feesdeducted事件,也没有信息TX关于TX的成本是多少...

如何使用Flow-JS测试输出TXFEE?

I have a mint tx that is paid which I am testing, and i expect this to be true:

usersBalanceAfterMinting == usersBalanceBeforeMinting - costOfMinting - txFee

However, when i print out the events from the tx, there is no feesDeducted event, and no info in the tx as to what the cost of the tx was...

How do I output the txFee using flow-js-testing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一杆小烟枪 2025-02-17 06:04:24

您可以使用启动模拟器 - Transaction-Fees标志如下:

await emulator.start(port, { flags: "--transaction-fees", logging: false });

然后您可以看到费用事件。

You can start emulator with --transaction-fees flag like below:

await emulator.start(port, { flags: "--transaction-fees", logging: false });

Then you can see FeesDeducted events.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文