ether-converter 0.1.3

Ether unit converter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
extern crate ether_converter;

fn main() {
    let amt = "1";
    let amt_unit = "ether";
    let to_unit = "wei";
    let map = ether_converter::convert(&amt, &amt_unit);
    let val = map.get(to_unit).unwrap();

    println!("{} {} = {} {}", amt, amt_unit, val, to_unit);
    // 1 ether = 1000000000000000000 wei
}