wall-echain 0.1.2

Wall-Echain is a product for obtaining block information, transaction details, and the latest block height of the Ethereum system through JSON-RPC.
Documentation
1
2
3
4
5
6
7
8
use log::debug;
use rand::{thread_rng, Rng};

pub fn random_number(max: usize) -> usize {
    debug!("🔧 Random maximum {:?}", max);
    let mut rng = thread_rng();
    rng.gen_range(0..=(max as u128 - 1)) as usize
}