Function block_index

Source
pub fn block_index() -> BlockHeight
๐Ÿ‘ŽDeprecated since 4.0.0: Use block_height instead
Expand description

Current block index.

ยงExamples

use near_sdk::env::block_index;

assert_eq!(block_index(), 0);