Move.

Publicación

Comparte tu conocimiento.

Pluto Dev👽.
Jan 22, 2025
P&R expertos

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
Cuota
Comentarios
.

Respuestas

1
McMMoKing.
Jan 23 2025, 00:00

El error MoveAbort al que se enfrenta normalmente se produce si el tipo pasado a la create_currencyfunción no cumple con las expectativas. Por lo que has descrito, parece que estás transfiriendo a la función un testigo único (OTW) mal formado. El testigo único debe llevar el nombre del módulo en mayúsculas. Asegúrate de que tu OTW siga esta convención y podrás resolver el error. Para obtener más información, consulta esta definición: move-book.com/programmability/one-time-witness.html #definition.

1
Comentarios
.

Sabes la respuesta?

Inicie sesión y compártalo.

Move is an executable bytecode language used to implement custom transactions and smart contracts.

148Publicaciones231Respuestas
Sui.X.Peera.

Gana tu parte de 1000 Sui

Gana puntos de reputación y obtén recompensas por ayudar a crecer a la comunidad de Sui.

Campaña de RecompensasJulio