Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/developers/developer-reference/sc-api-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand Down