Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl From alloy-consensus::TxType for reth_primitives::TxType #10522

Closed
nkysg opened this issue Aug 26, 2024 · 0 comments · Fixed by #10523
Closed

impl From alloy-consensus::TxType for reth_primitives::TxType #10522

nkysg opened this issue Aug 26, 2024 · 0 comments · Fixed by #10523
Labels
C-enhancement New feature or request S-needs-triage This issue needs to be labelled

Comments

@nkysg
Copy link
Contributor

nkysg commented Aug 26, 2024

Describe the feature

alloy-consensus::TxType almost same reth_primitives::TxType.

https://github.com/alloy-rs/alloy/blob/main/crates/consensus/src/transaction/envelope.rs#L25-L36

#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc(alias = "TransactionType")]
pub enum TxType {
    /// Legacy transaction type.
    Legacy = 0,
    /// EIP-2930 transaction type.
    Eip2930 = 1,
    /// EIP-1559 transaction type.
    Eip1559 = 2,
    /// EIP-4844 transaction type.
    Eip4844 = 3,
    /// EIP-7702 transaction type.
    Eip7702 = 4,
}

pub enum TxType {
/// Legacy transaction pre EIP-2929
#[default]
Legacy = 0_isize,
/// AccessList transaction
Eip2930 = 1_isize,
/// Transaction with Priority fee
Eip1559 = 2_isize,
/// Shard Blob Transactions - EIP-4844
Eip4844 = 3_isize,
/// EOA Contract Code Transactions - EIP-7702
Eip7702 = 4_isize,
/// Optimism Deposit transaction.
#[cfg(feature = "optimism")]
Deposit = 126_isize,

Additional context

No response

@nkysg nkysg added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Aug 26, 2024
@nkysg nkysg changed the title impl alloy-consensus::TxType From for reth_primitives::TxType impl From alloy-consensus::TxType for reth_primitives::TxType Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request S-needs-triage This issue needs to be labelled
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant