Function convert_i256_to_f64

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

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

§Errors

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