Post
Share your knowledge.
Why do I keep getting 'MoveAbort' error in signAndExecuteTransaction?
I'm trying to make swaps using the functions client.findRouters, client.fastRouterSwap, and client.signAndExecuteTransaction but frequently encounter the 'MoveAbort' error. My balance seems stable at 100+ SUI, yet 1 out of 10 transactions fails. This error still persists after restoring the blockchain. How can I figure out what's going wrong?
- Move CLI
- Move
- Move Module
Answers
4The error you are encountering likely indicates that the 'split' function is being called during the transaction process and the balance may not be sufficient, even if it appears stable. Checking your coin objects and the methods you're calling, along with the arguments passed, might provide more insights. You might also consider tracking your objects throughout the transaction process to diagnose the issue.
The error 'MoveAbort(MoveLocation { module: ModuleId { address: [..], name: Identifier("balance") }, function: 7, instruction: 10, function_name: Some("split") }, 2)' suggests that there might be an issue with the balance not being enough when a split operation is attempted. You may want to ensure all parts of your balance are accounted for in every transaction.
You should definitely check the objects involved in the transactions and monitor their states closely. Also, reviewing the specific transaction details on SuiScan could provide additional clues.
That error likely means the split function is being triggered with a coin object that doesn’t have enough balance at the point of execution—even if it looks fine beforehand. This can happen if the coin was mutated, spent, or used in another operation earlier in the same transaction. To fix it, double-check the coin’s actual balance and status before calling split, verify the amount you’re trying to split, and inspect how the coin is handled throughout the transaction. Tracking its usage step by step can help pinpoint where things go wrong.
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.
