帖子
分享您的知识。
doodee105
Apr 01, 2025
专家问答
Can you get a timestamp when an object is created in Move?
Hey there! I'm working with Move and I'm curious if it's possible to get a timestamp of when an object is created. I've seen something about using sui::clock to capture this, but I was wondering if there's a native way to access this timestamp directly in Move code without additional attributes or if we can avoid additional computations. Any insights?
- Move CLI
- Move
2
2
分享
评论
答案
2elfDani139
Apr 1 2025, 14:19您可以使用 sui:: clock 将对象创建期间的时间戳作为属性捕获,例如 timestamp_ms. 此方法涉及添加一个属性来存储共享时钟对象中的 “time_ms”.
1
评论
你知道答案吗?
请登录并分享。
Move is an executable bytecode language used to implement custom transactions and smart contracts.
148帖子231答案
热门帖子