gakonst / ethers-rs

Complete Ethereum & Celo library and wallet implementation in Rust. https://docs.rs/ethers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optimism (0x7e) transaction is not RLP decoded

DaniPopes opened this issue · comments

Version
cdb7802

Platform
All

Description
Originally reported by @IcedewW in TG: https://t.me/ethers_rs/32701

Tx type 0x7e is not handled when RLP decoding a Transaction:

match first {
0x01 => {
txn.decode_base_eip2930(&rest, &mut offset)?;
txn.transaction_type = Some(1u64.into());
}
0x02 => {
txn.decode_base_eip1559(&rest, &mut offset)?;
txn.transaction_type = Some(2u64.into());
}
_ => return Err(DecoderError::Custom("invalid tx type")),
}

cc @refcell @merklefruit @ncitron who worked on this in the past