Module utils

Source
Expand description

Numerical and Ethereum utilities

Traits§

Eth
Convert values in in eth to weth

Functions§

address_from_hex
Create a revm address from a hex string.
clamp_u256_to_u128
Clamp a u256 to the u128 range and cast
constructor_data
Append contract bytecode and encoded arguments for use in deployment
data_bytes_from_hex
Create a Bytes object from a hex string.
div_u256
Divide two u256 values returning a f64
scale_data_value
Scale a U256 value representing a fixed number of decimals into a value that fits a f64 (discarding some precision)