Post
Share your knowledge.
mssoni30
Feb 17, 2025
Expert Q&A
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
Share
Comments
Answers
1Grizzly25
Feb 17 2025, 15:38You may want to check whether you're using the correct intent for your transaction. Try using the CoinWithBalance
intent as described in the official Mysten Labs documentation here: Mysten Labs SDK. This might help in resolving the CommandArgumentError
.
0
Comments
Do you know the answer?
Please log in and share it.
Move is an executable bytecode language used to implement custom transactions and smart contracts.
98Posts158Answers
Trending posts