Skip to content

Upstream txtype derive to TransactionRequest #16231

Open
@mattsse

Description

@mattsse

Describe the feature

we have this:

let tx_type = if request.authorization_list.is_some() {
TxType::Eip7702
} else if request.has_eip4844_fields() {
TxType::Eip4844
} else if request.has_eip1559_fields() {
TxType::Eip1559
} else if request.access_list.is_some() {
TxType::Eip2930
} else {
TxType::Legacy
} as u8;

let tx_type = if request.authorization_list.is_some() {
TxType::Eip7702
} else if request.has_eip4844_fields() {
TxType::Eip4844
} else if request.has_eip1559_fields() {
TxType::Eip1559
} else if request.access_list.is_some() {
TxType::Eip2930
} else {
TxType::Legacy
} as u8;

we can now upstream this to TransactionRequest

as a new function, or maybe this could even be unified with:

https://github.com/alloy-rs/alloy/blob/722f4e95b1980eb4bec4c9ee8d2f3112a3ef92bb/crates/rpc-types-eth/src/transaction/request.rs#L615-L615

Additional context

No response

Metadata

Metadata

Assignees

Labels

A-rpcRelated to the RPC implementationC-enhancementNew feature or request

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions