Beitrag
Teile dein Wissen.
Caplec104
Feb 05, 2025
Experten Q&A
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
Teilen
Kommentare
Antworten
1andreweth.148
Feb 5 2025, 11:02Der icon_url
sollte ein Wert von seinOption<Url>
. Sie können dies einstellen mitoption::some(url::new_unsafe_from_bytes(b""))
. Stellen Sie sicher, dass Sie die erforderliche use-Anweisung angeben:use::sui::url::{Self}
, um den 'URL'-Namensfehler zu beheben.
2
Kommentare
Weißt du die Antwort?
Bitte melde dich an und teile sie.