artemis
artemis copied to clipboard
Added some more data fields for block collector
A PR for adding more data fields into the block creator. I think it would be beneficial if we had the base_fee_per_gas, the total gas, timestamp, and the extra_data of the block being collected.
Open question: I've set the base fee to be 0 for blocks previous to London. Maybe there's a cleaner way to do this.
P.S.: I'm new to rust and the library, so I wanted to draft a small PR as I learn and explore Artemis further.
If we are adding more data fields, is returning the whole block as ethers::types::Block<TxHash>
an overkill?
Agree with @pistomat, let's make this a Collector<ethers::types::Block<TxHash>>
instead of Collector<NewBlock>
to avoid having to do manual destructuring
Okay, added block
as a subitem of NewBlock
. block
is of type Block<TxHash>
and modified some stuff that would change due to this.
@FrankieIsLost was revisiting some old PRs, is this still merge-worthy or close?