如何在 Pact / Kadena 中获取当前时间
How to get current time in Pact / Kadena
pact 中如何获取当前时间?
我在文档中找不到它
https://pact-language.readthedocs.io/en/stable/pact-functions.html?highlight=time#time-2
找到答案-
可以在chain-data
下的block-time
变量下找到
documentation
示例:
pact> (chain-data)
{"block-height": 0,"block-time": "1970-01-01T00:00:00Z",
"chain-id": "","gas-limit": 0,"gas-price": 0.0,
"prev-block-hash": "","sender": ""}
pact 中如何获取当前时间? 我在文档中找不到它
https://pact-language.readthedocs.io/en/stable/pact-functions.html?highlight=time#time-2
找到答案-
可以在chain-data
下的block-time
变量下找到
documentation
示例:
pact> (chain-data)
{"block-height": 0,"block-time": "1970-01-01T00:00:00Z",
"chain-id": "","gas-limit": 0,"gas-price": 0.0,
"prev-block-hash": "","sender": ""}