Move.

Post

Share your knowledge.

mssoni.
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
2
1
Share
Comments
.

Answers

1
Grizzly.
Feb 17 2025, 15:38

You 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.

1
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.

148Posts231Answers
Sui.X.Peera.

Earn Your Share of 1000 Sui

Gain Reputation Points & Get Rewards for Helping the Sui Community Grow.

Reward CampaignJune
We use cookies to ensure you get the best experience on our website.
More info