MCPcopy Create free account
hub / github.com/base/base / decode

Method decode

crates/consensus/protocol/src/batch/tx_data/wrapper.rs:56–63  ·  view source on GitHub ↗
(r: &mut &[u8])

Source from the content-addressed store, hash-verified

54
55impl 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
66impl TryFrom<&BaseTxEnvelope> for SpanBatchTransactionData {

Callers

nothing calls this directly

Calls 2

decodeFunction · 0.50
is_emptyMethod · 0.45

Tested by

no test coverage detected