帖子
分享您的知识。
Caplec104
Feb 05, 2025
专家问答
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
分享
评论
答案
1andreweth.148
Feb 5 2025, 11:02的icon_url
值应为Option<Url>
. 你可以使用进行设置option::some(url::new_unsafe_from_bytes(b""))
. 确保包含必要的 use 语句:use::sui::url::{Self}
以解决 “url” 名称错误.
2
评论
你知道答案吗?
请登录并分享。
Move is an executable bytecode language used to implement custom transactions and smart contracts.
148帖子231答案