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

Method encode

crates/consensus/protocol/src/batch/tx_data/wrapper.rs:30–52  ·  view source on GitHub ↗
(&self, out: &mut dyn alloy_rlp::BufMut)

Source from the content-addressed store, hash-verified

28
29impl Encodable for SpanBatchTransactionData {
30 fn encode(&self, out: &mut dyn alloy_rlp::BufMut) {
31 match self {
32 Self::Legacy(data) => {
33 data.encode(out);
34 }
35 Self::Eip2930(data) => {
36 out.put_u8(OpTxType::Eip2930 as u8);
37 data.encode(out);
38 }
39 Self::Eip1559(data) => {
40 out.put_u8(OpTxType::Eip1559 as u8);
41 data.encode(out);
42 }
43 Self::Eip7702(data) => {
44 out.put_u8(OpTxType::Eip7702 as u8);
45 data.encode(out);
46 }
47 Self::Eip8130(data) => {
48 out.put_u8(OpTxType::Eip8130 as u8);
49 data.encode(out);
50 }
51 }
52 }
53}
54
55impl Decodable for SpanBatchTransactionData {

Calls

no outgoing calls