alloy icon indicating copy to clipboard operation
alloy copied to clipboard

[Feature] Manually impl serialisation for `reth_rpc_types_eth::Transaction`

Open emhane opened this issue 4 months ago • 0 comments

Component

rpc

Describe the feature you would like

Manually impl serde Serialization and Deserializationfor reth_rpc_types_eth::Transaction. For the field max_fee_per_gas, this should use the json label gasPrice if the tx type is < 2, i.e. pre-eip1559. This way the field gas_price can be removed from the struct, as it is redundant

https://github.com/alloy-rs/alloy/blob/8d99c28da17232a26afe7af0251fde2cd00a89fe/crates/rpc-types-eth/src/transaction/mod.rs#L39-L154

Additional context

No response

emhane avatar Oct 02 '24 00:10 emhane