Move.

帖子

分享您的知识。

Caplec.
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
分享
评论
.

答案

1
andreweth..
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答案
Sui.X.Peera.

赚取你的 1000 Sui 份额

获取声誉积分,并因帮助 Sui 社区成长而获得奖励。

奖励活动七月