MCPcopy Create free account
hub / github.com/Commit-Boost/commit-boost-client / eth_to_wei

Function eth_to_wei

crates/common/src/utils.rs:143–145  ·  view source on GitHub ↗
(eth: f64)

Source from the content-addressed store, hash-verified

141
142pub const WEI_PER_ETH: u64 = 1_000_000_000_000_000_000;
143pub fn eth_to_wei(eth: f64) -> U256 {
144 U256::from((eth * WEI_PER_ETH as f64).floor())
145}
146
147// Serde
148/// Test that the encoding and decoding works, returns the decoded struct

Callers 1

deserializeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected