帖子
分享您的知识。
Tawhid128
Mar 26, 2025
专家问答
How to ensure a smart contract doesn't resend a capability?
I'm working on a smart contract and I want to ensure that it doesn't send a capability if the user already owns one. This is to avoid unwanted transactions. I am thinking about using an SDK to check all objects a user holds and perhaps using a sui::table::Table
to keep a list of minted capabilities. Is this the right approach, or is there a better way to confirm if an address holds a certain object on-chain?
- Move CLI
- Move
0
3
分享
评论
答案
3dudley_smith124
Mar 27 2025, 07:47对于您的用例,建议保留一份已在共享对象中赋予功能的地址列表. 您可以使用 a 来管理对象大小限制sui::table::Table
,这使您可以高效地维护列表/地图.
2
最佳答案
评论
你知道答案吗?
请登录并分享。
Move is an executable bytecode language used to implement custom transactions and smart contracts.
148帖子231答案