Skip to content

Commit

Permalink
rlp encode
Browse files Browse the repository at this point in the history
  • Loading branch information
rkdud007 committed Apr 3, 2024
1 parent 281cefb commit 68a546f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@ use alloy_consensus::{
};
use alloy_eips::eip2930::AccessList;
use alloy_eips::eip2930::AccessListItem;
use alloy_network::eip2718::Encodable2718;
use alloy_primitives::{Parity, Signature, TxKind, U64};
use alloy_rpc_types::Transaction;

#[derive(Debug, Clone)]
pub struct ConsensusTx(pub TxEnvelope);

impl ConsensusTx {
pub fn rlp_encode(&self) -> Vec<u8> {
self.0.encoded_2718()
}
}

#[derive(Debug, Clone)]
pub(crate) struct RpcTx(pub Transaction);

Expand Down

0 comments on commit 68a546f

Please sign in to comment.