Move.

帖子

分享您的知识。

kryptoschain.
Feb 13, 2025
专家问答

Can I assign a specific ID to a shared object in Move?

I'm trying to create a shared object within the init function of a Move module and want to assign it a specific predetermined ID like 0x123. Is this possible, or do I need to follow another approach?

  • Move CLI
1
1
分享
评论
.

答案

1
dudley_smith.
Feb 13 2025, 11:09

不,您无法在 Move 中直接为共享对象分配特定 UID. 系统自动为交易中创建的新对象生成唯一标识符,确保它们在全局对象池中的唯一性.

0
评论
.

你知道答案吗?

请登录并分享。

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

148帖子231答案
Sui.X.Peera.

赚取你的 1000 Sui 份额

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

奖励活动七月