Move.

Bài viết

Chia sẻ kiến thức của bạn.

Caplec.
Feb 05, 2025
Hỏi đáp Chuyên Gia

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
Chia sẻ
Bình luận
.

Câu trả lời

1
andreweth..
Feb 5 2025, 11:02

icon_urlphải là một giá trị củaOption<Url>. Bạn có thể thiết lập điều này bằng cách sử dụngoption::some(url::new_unsafe_from_bytes(b"")). Đảm bảo bao gồm câu lệnh use cần thiết: use::sui::url::{Self}để giải quyết lỗi tên 'url'.

2
Bình luận
.

Bạn có biết câu trả lời không?

Hãy đăng nhập và chia sẻ nó.

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

148Bài viết231Câu trả lời
Sui.X.Peera.

Kiếm phần của bạn từ 1000 Sui

Tích lũy điểm danh tiếng và nhận phần thưởng khi giúp cộng đồng Sui phát triển.

Chiến dịch phần thưởngTháng Bảy