Publicación
Comparte tu conocimiento.
Caplec104
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
1andreweth.148
Feb 5 2025, 11:02icon_url
Debe 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.