Move.

Beitrag

Teile dein Wissen.

Caplec.
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

1
andreweth..
Feb 5 2025, 11:02

Der icon_urlsollte 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.

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

148Beiträge231Antworten
Sui.X.Peera.

Verdiene deinen Anteil an 1000 Sui

Sammle Reputationspunkte und erhalte Belohnungen für deine Hilfe beim Wachstum der Sui-Community.

BelohnungskampagneJuli