Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从 !ink 智能合约访问底层链中的存储或常量?例如,在链中,timestamp(in Moment) 被设置为外在的。如何访问时间戳并将变量放入智能合约?
let timestamp_now: u128: <access to chain when function is being called>
您可以查看https://paritytech.github.io/ink/ink_env/提供的功能block_number和block_timestamp
block_number
block_timestamp
墨水!https://github.com/paritytech/ink#table-of-contents中的文档