Move.

Publicación

Comparte tu conocimiento.

Caplec.
Feb 05, 2025
P&R expertos

How to set token icon URL in smart contract?

I'm working with the coin::create_currency function in a smart contract and struggling with setting the URL for the token icon. How should I correctly set the URL for the token icon in this context?

  • Move CLI
2
1
Cuota
Comentarios
.

Respuestas

1
andreweth..
Feb 5 2025, 11:02

icon_urlDebe tener un valor deOption<Url>. Puede configurar esto usandooption::some(url::new_unsafe_from_bytes(b"")). Asegúrese de incluir la declaración de uso necesaria: use::sui::url::{Self}para resolver el error en el nombre de la «URL».

2
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