Bài viết
Chia sẻ kiến thức của bạn.
Caplec104
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
1andreweth.148
Feb 5 2025, 11:02Nó icon_url
phả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ó.