Function std::block::height

pub fn height() -> u32 
Expand description

Get the current block height.

Returns

  • [u32] - The current block height.

Examples

use std::block::height;

fn foo() {
    let current_height = height();
    log(current_height);
}