Move.

帖子

分享您的知识。

jogador_1.
Feb 05, 2025
专家问答

How to get remaining balance after a transaction using TypeScript?

I'm working on a project using the TypeScript SDK and need to fetch the recipient and balance left after a transaction. I tried using the showBalanceChanges option, but it's giving me the amount used in the transaction. How can I obtain the remaining balance after the transaction is completed?

  • Move CLI
2
2
分享
评论
.

答案

2
dudley_smith.
Feb 5 2025, 16:49

如果该showBalanceChanges选项仅向您提供所用金额,请尝试使用该getBalance方法. 你可以在这里找到更多细节:getBalance Method. 这个方法应该可以帮助你在交易后提取剩余的余额.

1
评论
.
Theoremus.
Feb 5 2025, 17:29

options: { showBalanceChanges: true }你必须像这样在请求中传递showBalanceChanges选项:.

1
评论
.

你知道答案吗?

请登录并分享。

Move is an executable bytecode language used to implement custom transactions and smart contracts.

148帖子231答案
Sui.X.Peera.

赚取你的 1000 Sui 份额

获取声誉积分,并因帮助 Sui 社区成长而获得奖励。

奖励活动七月