Function block_height

Source
pub fn block_height() -> BlockHeight
Expand description

Returns the height of the block the transaction is being executed in.

ยงExamples

use near_sdk::env::block_height;

assert_eq!(block_height(), 0);