flashbots / rbuilder

rbuilder is a blazingly fast, state of the art Ethereum MEV-Boost block builder written in Rust
Apache License 2.0
242 stars 48 forks source link

Store eth values in config with denominator #29

Open ryanschneider opened 3 months ago

ryanschneider commented 3 months ago

We should look at what cast --to-unit uses, maybe we can store the values in the config w/ a denominator.

> cast --to-unit "1 ether" wei
1000000000000000000

> cast --to-unit "100 gwei" wei
100000000000
ryanschneider commented 3 months ago

https://github.com/foundry-rs/foundry/blob/master/crates/cast/src/lib.rs#L1261-L1273