From 7a79c031b56a96f5a888ad2742d12c36e8fe4c02 Mon Sep 17 00:00:00 2001 From: janniksam Date: Sun, 30 Jun 2024 12:49:47 +0200 Subject: [PATCH] get_block_timestamp and get_block_round documentation --- docs/developers/developer-reference/sc-api-functions.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/developers/developer-reference/sc-api-functions.md b/docs/developers/developer-reference/sc-api-functions.md index 7be2f486a..28ce8fb9f 100644 --- a/docs/developers/developer-reference/sc-api-functions.md +++ b/docs/developers/developer-reference/sc-api-functions.md @@ -146,6 +146,8 @@ A smart contract call that runs out of gas will revert all operations, so this f get_block_timestamp() -> u64 ``` +Returns the timestamp of the current block in seconds. + [comment]: # (mx-context-auto) ### get_block_nonce @@ -162,6 +164,8 @@ get_block_nonce() -> u64 get_block_round() -> u64 ``` +Returns the round number of the current block. Each epoch consists of a fixed number of rounds. The round number resets to 1 at the start of every new epoch. + [comment]: # (mx-context-auto) ### get_block_epoch @@ -170,6 +174,8 @@ get_block_round() -> u64 get_block_epoch() -> u64 ``` +Returns the epoch of the current block. + These functions are mostly used for setting up deadlines, so they've been grouped together. [comment]: # (mx-context-auto)