Function convert_u256_to_f64

Source
pub fn convert_u256_to_f64(amount: U256, decimals: u8) -> Result<f64>
Expand description

Convert an alloy’s U256 value to f64, accounting for token decimals.

§Errors

Returns an error if the U256 value cannot be parsed to f64.