eip-utils 0.1.5

Ethereum Improvement Proposal helpers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::str::FromStr;

use num_bigint::BigUint;

pub fn option_to_big(value: Option<&str>) -> BigUint {
    str_to_big(value.unwrap())
}

pub fn str_to_big(value: &str) -> BigUint {
    BigUint::from_str(value).expect("invalid literal value specified, expected valid BigUint value")
}