pub fn eth_to_wei(eth: BigDecimal) -> Result<U256>
Expand description
Converts an ETH amount to wei as a U256
.
Accepts a BigDecimal
ETH value and returns the equivalent amount in wei as a U256
.
This is useful for preparing values for smart contract calls or transactions.
Returns an error if the value is too large to fit in a u128
.