Move.

Post

Share your knowledge.

doodee.
Feb 05, 2025
Expert Q&A

How to merge two Coins using the SUI client without extra gas?

I'm trying to merge two Coins using the SUI client, but I'm running into an issue. The client requires at least one Coin for gas, making it seem impossible to merge exactly these two Coins because I don't have any additional ones for gas. Has anyone else experienced this, and how did you solve it?

  • Move CLI
  • Move
3
2
Share
Comments
.

Answers

2
cod.
cod95
Feb 5 2025, 11:01

If you're using the TS SDK, it might automatically use all your coins as long as they're not engaged in the transaction. It can be challenging with exactly 2 coins, but if you set it up correctly, it should work. Despite initial difficulties, it seems that once you try again or follow the correct process, the sui client merge-coins function can work effectively.

2
Comments
.
LargeCappWithTwo.
Feb 5 2025, 11:02

Gas coins are automatically merged, so if you execute an empty transaction with your coins used for gas, you will end up with a single coin. The SUI client (CLI) only lets you specify one Coin to be used for gas. You might try executing without specifying any coin, or make sure the transaction automatically computes the necessary coins.

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