Move.

帖子

分享您的知识。

mssoni.
Feb 17, 2025
专家问答

How to resolve CommandArgumentError with tx failed issue?

I've been trying to execute a transaction using the CommandArgumentError { arg_idx: 1, kind: InvalidBCSBytes } error. Here's the snippet I used:

const tx = new Transaction();
const [newCoin] = tx.splitCoins(
tx.object(coinObjectId),
[1000]
);

tx.transferObjects([newCoin], tx.pure.string(wallet.address || ""));

tx.setGasBudget(750000);
const result = await wallet.signAndExecuteTransaction({ transaction: tx, });

I've tried using tx.pure.u64 but it didn't help. Any solutions?

  • Move CLI
1
1
分享
评论
.

答案

1
Grizzly.
Feb 17 2025, 15:38

您可能需要检查自己的交易意图是否正确. 尝试使用CoinWithBalance此处 Mysten Labs 官方文档中所述的意图:Mysten Labs SDK. 这可能有助于解决CommandArgumentError.

0
评论
.

你知道答案吗?

请登录并分享。

我们使用 cookie 确保您在我们的网站上获得最佳体验。
更多信息