帖子
分享您的知识。
mssoni30
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
分享
评论
答案
1Grizzly25
Feb 17 2025, 15:38您可能需要检查自己的交易意图是否正确. 尝试使用CoinWithBalance
此处 Mysten Labs 官方文档中所述的意图:Mysten Labs SDK. 这可能有助于解决CommandArgumentError
.
0
评论
你知道答案吗?
请登录并分享。
Move is an executable bytecode language used to implement custom transactions and smart contracts.
98帖子158答案