Move.

Post

Share your knowledge.

Pluto Dev👽.
Jan 22, 2025
Expert Q&A

How to fix MoveAbort error in `create_currency` function?

I'm trying to create a coin using the create_currency function in my smart contract and encountering a MoveAbort error. The error message indicates a problem with MoveLocation referencing the coin module and create_currency function. I'm not sure what's causing the issue. Any ideas on what could be going wrong here?

  • Move CLI
1
1
Share
Comments
.

Answers

1
McMMoKing.
Jan 23 2025, 00:00

The MoveAbort error you are facing typically occurs if the type passed to the create_currency function doesn't match expectations. From what you've described, it looks like you're passing an incorrectly formed one-time witness (OTW) to the function. The one-time witness should be named after the module in all uppercase letters. Make sure your OTW follows this convention, and you should be able to resolve the error. For more details, you can check this definition: move-book.com/programmability/one-time-witness.html#definition.

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