Skip to content

Blockchain api fix #953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2024
Merged
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
8 changes: 8 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 (UNIX timestamp).

[comment]: # (mx-context-auto)

### get_block_nonce
Expand All @@ -154,6 +156,8 @@ get_block_timestamp() -> u64
get_block_nonce() -> u64
```

Returns the unique nonce of the block that includes the current transaction.

[comment]: # (mx-context-auto)

### get_block_round
Expand All @@ -162,6 +166,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 +176,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
Loading