(r: &mut &[u8])
| 54 | |
| 55 | impl Decodable for SpanBatchTransactionData { |
| 56 | fn decode(r: &mut &[u8]) -> Result<Self, alloy_rlp::Error> { |
| 57 | if !r.is_empty() && r[0] > 0x7F { |
| 58 | // Legacy transaction |
| 59 | return Ok(Self::Legacy(SpanBatchLegacyTransactionData::decode(r)?)); |
| 60 | } |
| 61 | // Non-legacy transaction (EIP-2718 envelope encoding) |
| 62 | Self::decode_typed(r) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | impl TryFrom<&BaseTxEnvelope> for SpanBatchTransactionData { |