Move.

帖子

分享您的知识。

Tawhid.
Jan 23, 2025
专家问答

How can I merge Sui coins for a move call without gas issues?

I'm trying to make a move call where one argument requires a mutable Coin. My account holds two Sui tokens with balances of .29 and .71. I want to merge these coins first in the transaction and then use the resulting coin to make the move call. However, I'm encountering an issue where the transaction complains it can't find a coin for gas after the merge. Is it because I'm using both tokens in the transaction, so they're unavailable for gas? Any ideas on how to resolve this?

  • Move CLI
  • Move
1
2
分享
评论
.

答案

2
Michelle .
Jan 23 2025, 00:00

你试过使用merge coins功能吗?它有可能在不造成任何与汽油要求冲突的情况下合并您的硬币. 添加此功能是为了减少手动硬币管理的麻烦. 该过程旨在代表您在交易中想要的内容,同时将硬币的来源推迟到您建立并签署交易之前.

1
评论
.
kryptoschain.
Jan 23 2025, 00:00

您无需手动管理硬币. 您可以简单地使用coinWithBalance,SDK将自动为您查找和合并硬币. 尝试指定要用于单独支付费用的硬币,因为这可能会解决汽油的问题. 以下是 SDK 文档链接,了解更多信息:汽油支付.

0
评论
.

你知道答案吗?

请登录并分享。

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

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

赚取你的 1000 Sui 份额

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

奖励活动七月